@zeniai/web-cockpit-ui 2.0.34-dev → 2.0.35-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/CreditAgentRoutes-BAYWgMlK.js +4 -0
- package/dist/assets/Preview-CAmOkbjw.js +1 -0
- package/dist/assets/ScreenRoutes-huXsD4uj.js +180 -0
- package/dist/assets/SignInScreen-C8XI97SE.js +1 -0
- package/dist/assets/analytics-BfH6x-bh.js +68 -0
- package/dist/assets/analyticsHelper-DghMqKBk.js +1 -0
- package/dist/assets/core-BMXdW52V.js +12 -0
- package/dist/assets/dash.all.min-BNMSYYE9.js +21 -0
- package/dist/assets/empty-CMgD5T-3.js +1 -0
- package/dist/assets/empty-CURC4K9t.js +1 -0
- package/dist/assets/epic-0u3weRPq.js +2 -0
- package/dist/assets/favicon-D56XvgAH.ico +0 -0
- package/dist/assets/hls-DifHSkbp.js +40 -0
- package/dist/assets/index-BcCMwDMT.js +1 -0
- package/dist/assets/index-CPEf0ZcG.js +79830 -0
- package/dist/assets/index-CY8CEYeK.js +3304 -0
- package/dist/assets/index-D9Zhqjkb.js +2 -0
- package/dist/assets/index-DSJ2w1jZ.js +1 -0
- package/dist/assets/index-OG0h_gMR.js +1 -0
- package/dist/assets/index-sjMkGJDk.js +1 -0
- package/dist/assets/index-y98xvd7i.css +1 -0
- package/dist/assets/lexical-Cj6VOpGX.js +21 -0
- package/dist/assets/liveblocks-BQqAIDc5.js +54 -0
- package/dist/assets/lottie-qwRZdbTy.js +2 -0
- package/dist/assets/mixin-BPAPQfSE.js +43 -0
- package/dist/assets/mui-BQBCqqWF.js +9 -0
- package/dist/assets/react-BFtEL_0u.js +34 -0
- package/dist/assets/react-BfNEEjJ_.js +19 -0
- package/dist/assets/react-C83wXUqV.js +6 -0
- package/dist/assets/react-C8sJgD0w.js +22 -0
- package/dist/assets/react-Cu6ubvAK.js +7 -0
- package/dist/assets/react-DZq71Z0g.js +19 -0
- package/dist/assets/react-hF-9mrjI.js +21 -0
- package/dist/assets/react-jnSxQgdS.js +17 -0
- package/dist/assets/recharts-BZRqFQc_.js +65 -0
- package/dist/assets/sentry-B9T9CHF5.js +500 -0
- package/dist/assets/url-BEGh4GqD.js +1 -0
- package/dist/assets/url-BMK-Vtzl.js +6 -0
- package/dist/assets/utils-Fih0Jz-h.js +36 -0
- package/dist/assets/zeni-epic-state-DSTkpZye.js +13 -0
- package/dist/index.html +1 -0
- package/dist/robots.txt +3 -0
- package/dist/service-worker.js +160 -0
- package/package.json +4 -4
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cb856ef9-0ab6-495f-a81a-63334440c4ca",e._sentryDebugIdIdentifier="sentry-dbid-cb856ef9-0ab6-495f-a81a-63334440c4ca")}catch{}})();function xh(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Mh=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};Mh.SENTRY_RELEASE={id:"c7d7c6a17ec0f8b1d29e0a4c1025502b9e783cc1"};var OR=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function NR(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Os={exports:{}},ne={};var oc;function Ah(){if(oc)return ne;oc=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),l=Symbol.iterator;function f(m){return m===null||typeof m!="object"?null:(m=l&&m[l]||m["@@iterator"],typeof m=="function"?m:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(m,T,H){this.props=m,this.context=T,this.refs=g,this.updater=H||p}_.prototype.isReactComponent={},_.prototype.setState=function(m,T){if(typeof m!="object"&&typeof m!="function"&&m!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,m,T,"setState")},_.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function b(){}b.prototype=_.prototype;function v(m,T,H){this.props=m,this.context=T,this.refs=g,this.updater=H||p}var C=v.prototype=new b;C.constructor=v,h(C,_.prototype),C.isPureReactComponent=!0;var k=Array.isArray,S=Object.prototype.hasOwnProperty,E={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function A(m,T,H){var z,Z={},ae=null,me=null;if(T!=null)for(z in T.ref!==void 0&&(me=T.ref),T.key!==void 0&&(ae=""+T.key),T)S.call(T,z)&&!R.hasOwnProperty(z)&&(Z[z]=T[z]);var le=arguments.length-2;if(le===1)Z.children=H;else if(1<le){for(var de=Array(le),Me=0;Me<le;Me++)de[Me]=arguments[Me+2];Z.children=de}if(m&&m.defaultProps)for(z in le=m.defaultProps,le)Z[z]===void 0&&(Z[z]=le[z]);return{$$typeof:e,type:m,key:ae,ref:me,props:Z,_owner:E.current}}function w(m,T){return{$$typeof:e,type:m.type,key:T,ref:m.ref,props:m.props,_owner:m._owner}}function x(m){return typeof m=="object"&&m!==null&&m.$$typeof===e}function B(m){var T={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(H){return T[H]})}var I=/\/+/g;function O(m,T){return typeof m=="object"&&m!==null&&m.key!=null?B(""+m.key):T.toString(36)}function U(m,T,H,z,Z){var ae=typeof m;(ae==="undefined"||ae==="boolean")&&(m=null);var me=!1;if(m===null)me=!0;else switch(ae){case"string":case"number":me=!0;break;case"object":switch(m.$$typeof){case e:case t:me=!0}}if(me)return me=m,Z=Z(me),m=z===""?"."+O(me,0):z,k(Z)?(H="",m!=null&&(H=m.replace(I,"$&/")+"/"),U(Z,T,H,"",function(Me){return Me})):Z!=null&&(x(Z)&&(Z=w(Z,H+(!Z.key||me&&me.key===Z.key?"":(""+Z.key).replace(I,"$&/")+"/")+m)),T.push(Z)),1;if(me=0,z=z===""?".":z+":",k(m))for(var le=0;le<m.length;le++){ae=m[le];var de=z+O(ae,le);me+=U(ae,T,H,de,Z)}else if(de=f(m),typeof de=="function")for(m=de.call(m),le=0;!(ae=m.next()).done;)ae=ae.value,de=z+O(ae,le++),me+=U(ae,T,H,de,Z);else if(ae==="object")throw T=String(m),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.");return me}function F(m,T,H){if(m==null)return m;var z=[],Z=0;return U(m,z,"","",function(ae){return T.call(H,ae,Z++)}),z}function L(m){if(m._status===-1){var T=m._result;T=T(),T.then(function(H){(m._status===0||m._status===-1)&&(m._status=1,m._result=H)},function(H){(m._status===0||m._status===-1)&&(m._status=2,m._result=H)}),m._status===-1&&(m._status=0,m._result=T)}if(m._status===1)return m._result.default;throw m._result}var N={current:null},D={transition:null},Y={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:D,ReactCurrentOwner:E};function J(){throw Error("act(...) is not supported in production builds of React.")}return ne.Children={map:F,forEach:function(m,T,H){F(m,function(){T.apply(this,arguments)},H)},count:function(m){var T=0;return F(m,function(){T++}),T},toArray:function(m){return F(m,function(T){return T})||[]},only:function(m){if(!x(m))throw Error("React.Children.only expected to receive a single React element child.");return m}},ne.Component=_,ne.Fragment=n,ne.Profiler=o,ne.PureComponent=v,ne.StrictMode=r,ne.Suspense=c,ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,ne.act=J,ne.cloneElement=function(m,T,H){if(m==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+m+".");var z=h({},m.props),Z=m.key,ae=m.ref,me=m._owner;if(T!=null){if(T.ref!==void 0&&(ae=T.ref,me=E.current),T.key!==void 0&&(Z=""+T.key),m.type&&m.type.defaultProps)var le=m.type.defaultProps;for(de in T)S.call(T,de)&&!R.hasOwnProperty(de)&&(z[de]=T[de]===void 0&&le!==void 0?le[de]:T[de])}var de=arguments.length-2;if(de===1)z.children=H;else if(1<de){le=Array(de);for(var Me=0;Me<de;Me++)le[Me]=arguments[Me+2];z.children=le}return{$$typeof:e,type:m.type,key:Z,ref:ae,props:z,_owner:me}},ne.createContext=function(m){return m={$$typeof:i,_currentValue:m,_currentValue2:m,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},m.Provider={$$typeof:s,_context:m},m.Consumer=m},ne.createElement=A,ne.createFactory=function(m){var T=A.bind(null,m);return T.type=m,T},ne.createRef=function(){return{current:null}},ne.forwardRef=function(m){return{$$typeof:a,render:m}},ne.isValidElement=x,ne.lazy=function(m){return{$$typeof:d,_payload:{_status:-1,_result:m},_init:L}},ne.memo=function(m,T){return{$$typeof:u,type:m,compare:T===void 0?null:T}},ne.startTransition=function(m){var T=D.transition;D.transition={};try{m()}finally{D.transition=T}},ne.unstable_act=J,ne.useCallback=function(m,T){return N.current.useCallback(m,T)},ne.useContext=function(m){return N.current.useContext(m)},ne.useDebugValue=function(){},ne.useDeferredValue=function(m){return N.current.useDeferredValue(m)},ne.useEffect=function(m,T){return N.current.useEffect(m,T)},ne.useId=function(){return N.current.useId()},ne.useImperativeHandle=function(m,T,H){return N.current.useImperativeHandle(m,T,H)},ne.useInsertionEffect=function(m,T){return N.current.useInsertionEffect(m,T)},ne.useLayoutEffect=function(m,T){return N.current.useLayoutEffect(m,T)},ne.useMemo=function(m,T){return N.current.useMemo(m,T)},ne.useReducer=function(m,T,H){return N.current.useReducer(m,T,H)},ne.useRef=function(m){return N.current.useRef(m)},ne.useState=function(m){return N.current.useState(m)},ne.useSyncExternalStore=function(m,T,H){return N.current.useSyncExternalStore(m,T,H)},ne.useTransition=function(){return N.current.useTransition()},ne.version="18.3.1",ne}var sc;function Oh(){return sc||(sc=1,Os.exports=Ah()),Os.exports}var Oe=Oh();const Nh=vl(Oe),LR=xh({__proto__:null,default:Nh},[Oe]),M=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,G=globalThis,yt="9.42.1";function xt(){return Tr(G),G}function Tr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||yt,t[yt]=t[yt]||{}}function Ir(e,t,n=G){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[yt]=r[yt]||{};return o[e]||(o[e]=t())}const Zi=["debug","info","warn","error","log","assert","trace"],Lh="Sentry Logger ",Mo={};function qt(e){if(!("console"in G))return e();const t=G.console,n={},r=Object.keys(Mo);r.forEach(o=>{const s=Mo[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Ph(){ea().enabled=!0}function Dh(){ea().enabled=!1}function wl(){return ea().enabled}function Fh(...e){Qi("log",...e)}function $h(...e){Qi("warn",...e)}function Bh(...e){Qi("error",...e)}function Qi(e,...t){M&&wl()&&qt(()=>{G.console[e](`${Lh}[${e}]:`,...t)})}function ea(){return M?Ir("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const y={enable:Ph,disable:Dh,isEnabled:wl,log:Fh,warn:$h,error:Bh},Tl=50,pt="?",ic=/\(error: (.*)\)/,ac=/captureMessage|captureException/;function Il(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{const s=[],i=n.split(`
|
|
2
|
+
`);for(let a=r;a<i.length;a++){const c=i[a];if(c.length>1024)continue;const u=ic.test(c)?c.replace(ic,"$1"):c;if(!u.match(/\S*Error: /)){for(const d of t){const l=d(u);if(l){s.push(l);break}}if(s.length>=Tl+o)break}}return Hh(s.slice(o))}}function Uh(e){return Array.isArray(e)?Il(...e):e}function Hh(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(zr(t).function||"")&&t.pop(),t.reverse(),ac.test(zr(t).function||"")&&(t.pop(),ac.test(zr(t).function||"")&&t.pop()),t.slice(0,Tl).map(n=>({...n,filename:n.filename||zr(t).filename,function:n.function||pt}))}function zr(e){return e[e.length-1]||{}}const Ns="<anonymous>";function Et(e){try{return!e||typeof e!="function"?Ns:e.name||Ns}catch{return Ns}}function li(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const fo={},cc={};function Gt(e,t){fo[e]=fo[e]||[],fo[e].push(t)}function Vt(e,t){if(!cc[e]){cc[e]=!0;try{t()}catch(n){M&&y.error(`Error while instrumenting ${e}`,n)}}}function Ke(e,t){const n=e&&fo[e];if(n)for(const r of n)try{r(t)}catch(o){M&&y.error(`Error while triggering instrumentation handler.
|
|
3
|
+
Type: ${e}
|
|
4
|
+
Name: ${Et(r)}
|
|
5
|
+
Error:`,o)}}let Ls=null;function kl(e){const t="error";Gt(t,e),Vt(t,Wh)}function Wh(){Ls=G.onerror,G.onerror=function(e,t,n,r,o){return Ke("error",{column:r,error:o,line:n,msg:e,url:t}),Ls?Ls.apply(this,arguments):!1},G.onerror.__SENTRY_INSTRUMENTED__=!0}let Ps=null;function Rl(e){const t="unhandledrejection";Gt(t,e),Vt(t,jh)}function jh(){Ps=G.onunhandledrejection,G.onunhandledrejection=function(e){return Ke("unhandledrejection",e),Ps?Ps.apply(this,arguments):!0},G.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Cl=Object.prototype.toString;function St(e){switch(Cl.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return wt(e,Error)}}function Xn(e,t){return Cl.call(e)===`[object ${t}]`}function xl(e){return Xn(e,"ErrorEvent")}function uc(e){return Xn(e,"DOMError")}function zh(e){return Xn(e,"DOMException")}function tt(e){return Xn(e,"String")}function os(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Nn(e){return e===null||os(e)||typeof e!="object"&&typeof e!="function"}function vt(e){return Xn(e,"Object")}function ss(e){return typeof Event<"u"&&wt(e,Event)}function qh(e){return typeof Element<"u"&&wt(e,Element)}function Gh(e){return Xn(e,"RegExp")}function kr(e){return!!(e?.then&&typeof e.then=="function")}function Vh(e){return vt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function wt(e,t){try{return e instanceof t}catch{return!1}}function Ml(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Al(e){return typeof Request<"u"&&wt(e,Request)}const ta=G,Yh=80;function Je(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=a.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||Yh;for(;n&&s++<r&&(u=Kh(n,d),!(u==="html"||s>1&&i+o.length*c+u.length>=l));)o.push(u),i+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function Kh(e,t){const n=e,r=[];if(!n?.tagName)return"";if(ta.HTMLElement&&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 o=t?.length?t.filter(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(o?.length)o.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const i=n.className;if(i&&tt(i)){const a=i.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const s=["aria-label","type","name","title","alt"];for(const i of s){const a=n.getAttribute(i);a&&r.push(`[${i}="${a}"]`)}return r.join("")}function fn(){try{return ta.document.location.href}catch{return""}}function Ol(e){if(!ta.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Ln(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Ds(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let s=Math.min(o+140,r);return s>r-5&&(s=r),s===r&&(o=Math.max(s-140,0)),n=n.slice(o,s),o>0&&(n=`'{snip} ${n}`),s<r&&(n+=" {snip}"),n}function Ao(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const o=e[r];try{Ml(o)?n.push("[VueViewModel]"):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Xh(e,t,n=!1){return tt(e)?Gh(t)?t.test(e):tt(t)?n?e===t:e.includes(t):!1:!1}function nt(e,t=[],n=!1){return t.some(r=>Xh(e,r,n))}function He(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const o=n(r);typeof o=="function"&&Nl(o,r);try{e[t]=o}catch{M&&y.log(`Failed to replace method "${t}" in object`,e)}}function je(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{M&&y.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Nl(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,je(e,"__sentry_original__",t)}catch{}}function na(e){return e.__sentry_original__}function Ll(e){if(St(e))return{message:e.message,name:e.name,stack:e.stack,...dc(e)};if(ss(e)){const t={type:e.type,target:lc(e.target),currentTarget:lc(e.currentTarget),...dc(e)};return typeof CustomEvent<"u"&&wt(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function lc(e){try{return qh(e)?Je(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function dc(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function Jh(e,t=40){const n=Object.keys(Ll(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Ln(r,t);for(let o=n.length;o>0;o--){const s=n.slice(0,o).join(", ");if(!(s.length>t))return o===n.length?s:Ln(s,t)}return""}function Zh(){const e=G;return e.crypto||e.msCrypto}function We(e=Zh()){let t=()=>Math.random()*16;try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(t=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function Pl(e){return e.exception?.values?.[0]}function Jt(e){const{message:t,event_id:n}=e;if(t)return t;const r=Pl(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function di(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function Ht(e,t){const n=Pl(e);if(!n)return;const r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){const s={...o?.data,...t.data};n.mechanism.data=s}}function Qh(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(i=>Ds(i,0));const s=Math.min(r-1,o);t.context_line=Ds(e[s],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(i=>Ds(i,0))}function fc(e){if(em(e))return!0;try{je(e,"__sentry_captured__",!0)}catch{}return!1}function em(e){try{return e.__sentry_captured__}catch{}}const Dl=1e3;function pn(){return Date.now()/Dl}function tm(){const{performance:e}=G;if(!e?.now||!e.timeOrigin)return pn;const t=e.timeOrigin;return()=>(t+e.now())/Dl}let pc;function Ee(){return(pc??(pc=tm()))()}let Fs;function nm(){const{performance:e}=G;if(!e?.now)return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=o<t,i=e.timing?.navigationStart,c=typeof i=="number"?Math.abs(i+n-r):t,u=c<t;return s||u?o<=c?[e.timeOrigin,"timeOrigin"]:[i,"navigationStart"]:[r,"dateNow"]}function Fe(){return Fs||(Fs=nm()),Fs[0]}function rm(e){const t=Ee(),n={sid:We(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>sm(n)};return e&&Pn(n,e),n}function Pn(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Ee(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:We()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function om(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Pn(e,n)}function sm(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Rr(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=Rr(r[o],t[o],n-1));return r}function Tt(){return We()}function Cr(){return We().substring(16)}const fi="_sentrySpan";function an(e,t){t?je(e,fi,t):delete e[fi]}function hr(e){return e[fi]}const im=100;class rt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Tt(),sampleRand:Math.random()}}clone(){const t=new rt;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),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._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,an(t,hr(this)),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){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Pn(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof rt?n.getScopeData():vt(n)?t:void 0,{tags:o,extra:s,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:d}=r||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,an(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Tt(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:im;if(r<=0)return this;const o={timestamp:pn(),...t,message:t.message?Ln(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],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:hr(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Rr(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||We();if(!this._client)return M&&y.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){const o=r?.event_id||We();if(!this._client)return M&&y.warn("No client configured on scope - will not capture message!"),o;const s=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:o},this),o}captureEvent(t,n){const r=n?.event_id||We();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(M&&y.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function am(){return Ir("defaultCurrentScope",()=>new rt)}function cm(){return Ir("defaultIsolationScope",()=>new rt)}class um{constructor(t,n){let r;t?r=t:r=new rt;let o;n?o=n:o=new rt,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(o){throw this._popScope(),o}return kr(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Dn(){const e=xt(),t=Tr(e);return t.stack=t.stack||new um(am(),cm())}function lm(e){return Dn().withScope(e)}function dm(e,t){const n=Dn();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function hc(e){return Dn().withScope(()=>e(Dn().getIsolationScope()))}function fm(){return{withIsolationScope:hc,withScope:lm,withSetScope:dm,withSetIsolationScope:(e,t)=>hc(t),getCurrentScope:()=>Dn().getScope(),getIsolationScope:()=>Dn().getIsolationScope()}}function Yt(e){const t=Tr(e);return t.acs?t.acs:fm()}function K(){const e=xt();return Yt(e).getCurrentScope()}function Ne(){const e=xt();return Yt(e).getIsolationScope()}function xr(){return Ir("globalScope",()=>new rt)}function qe(...e){const t=xt(),n=Yt(t);if(e.length===2){const[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function pm(...e){const t=xt(),n=Yt(t);if(e.length===2){const[r,o]=e;return r?n.withSetIsolationScope(r,o):n.withIsolationScope(o)}return n.withIsolationScope(e[0])}function P(){return K().getClient()}function Fl(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||Cr()};return r&&(s.parent_span_id=r),s}const ye="sentry.source",is="sentry.sample_rate",$l="sentry.previous_trace_sample_rate",Ce="sentry.op",re="sentry.origin",Oo="sentry.idle_span_finish_reason",Mr="sentry.measurement_unit",Ar="sentry.measurement_value",pi="sentry.custom_span_name",ra="sentry.profile_id",Jn="sentry.exclusive_time",hm="http.request.method",mm="url.full",gm="sentry.link.type",_m=0,oa=1,Te=2;function Bl(e){if(e<400&&e>=100)return{code:oa};if(e>=400&&e<500)switch(e){case 401:return{code:Te,message:"unauthenticated"};case 403:return{code:Te,message:"permission_denied"};case 404:return{code:Te,message:"not_found"};case 409:return{code:Te,message:"already_exists"};case 413:return{code:Te,message:"failed_precondition"};case 429:return{code:Te,message:"resource_exhausted"};case 499:return{code:Te,message:"cancelled"};default:return{code:Te,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Te,message:"unimplemented"};case 503:return{code:Te,message:"unavailable"};case 504:return{code:Te,message:"deadline_exceeded"};default:return{code:Te,message:"internal_error"}}return{code:Te,message:"unknown_error"}}function mr(e,t){e.setAttribute("http.response.status_code",t);const n=Bl(t);n.message!=="unknown_error"&&e.setStatus(n)}const Ul="_sentryScope",Hl="_sentryIsolationScope";function ym(e,t,n){e&&(je(e,Hl,n),je(e,Ul,t))}function No(e){return{scope:e[Ul],isolationScope:e[Hl]}}const sa="sentry-",Sm=/^sentry-/,bm=8192;function Wl(e){const t=Em(e);if(!t)return;const n=Object.entries(t).reduce((r,[o,s])=>{if(o.match(Sm)){const i=o.slice(sa.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function jl(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${sa}${r}`]=o),n),{});return vm(t)}function Em(e){if(!(!e||!tt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=mc(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):mc(e)}function mc(e){return e.split(",").map(t=>t.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function vm(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],o)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=o===0?s:`${t},${s}`;return i.length>bm?(M&&y.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}function cn(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const zl=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function wm(e){if(!e)return;const t=e.match(zl);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function ql(e,t){const n=wm(e),r=Wl(t);if(!n?.traceId)return{traceId:Tt(),sampleRand:Math.random()};const o=Tm(n,r);r&&(r.sample_rand=o.toString());const{traceId:s,parentSpanId:i,parentSampled:a}=n;return{traceId:s,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:o}}function Gl(e=Tt(),t=Cr(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Tm(e,t){const n=cn(t?.sample_rand);if(n!==void 0)return n;const r=cn(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const Vl=0,ia=1;let gc=!1;function Im(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a,links:c}=q(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a,links:c}}function Yl(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:q(e).parent_span_id,s=No(e).scope,i=r?s?.getPropagationContext().propagationSpanId||Cr():t;return{parent_span_id:o,span_id:i,trace_id:n}}function Kl(e){const{traceId:t,spanId:n}=e.spanContext(),r=hn(e);return Gl(t,n,r)}function Xl(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...o},attributes:s})=>({span_id:t,trace_id:n,sampled:r===ia,attributes:s,...o}))}function rn(e){return typeof e=="number"?_c(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?_c(e.getTime()):Ee()}function _c(e){return e>9999999999?e/1e3:e}function q(e){if(Rm(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(km(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:u,start_timestamp:rn(o),timestamp:rn(i)||void 0,status:Jl(a),op:r[Ce],origin:r[re],links:Xl(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function km(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Rm(e){return typeof e.getSpanJSON=="function"}function hn(e){const{traceFlags:t}=e.spanContext();return t===ia}function Jl(e){if(!(!e||e.code===_m))return e.code===oa?"ok":e.message||"unknown_error"}const on="_sentryChildSpans",hi="_sentryRootSpan";function Zl(e,t){const n=e[hi]||e;je(t,hi,n),e[on]?e[on].add(t):je(e,on,new Set([t]))}function Cm(e,t){e[on]&&e[on].delete(t)}function cr(e){const t=new Set;function n(r){if(!t.has(r)&&hn(r)){t.add(r);const o=r[on]?Array.from(r[on]):[];for(const s of o)n(s)}}return n(e),Array.from(t)}function Re(e){return e[hi]||e}function Ie(){const e=xt(),t=Yt(e);return t.getActiveSpan?t.getActiveSpan():hr(K())}function mi(){gc||(qt(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),gc=!0)}function xm(e,t){e.updateName(t),e.setAttributes({[ye]:"custom",[pi]:t})}let yc=!1;function Ql(){if(yc)return;function e(){const t=Ie(),n=t&&Re(t);if(n){const r="internal_error";M&&y.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:Te,message:r})}}e.tag="sentry_tracingErrorCallback",yc=!0,kl(e),Rl(e)}function Wt(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||P()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const as="production",Mm=/^o(\d+)\./,Am=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Om(e){return e==="http"||e==="https"}function mn(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${i}`}function ed(e){const t=Am.exec(e);if(!t){qt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return td({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function td(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Nm(e){if(!M)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(y.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?Om(r)?t&&isNaN(parseInt(t,10))?(y.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(y.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(y.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Lm(e){return e.match(Mm)?.[1]}function nd(e){const t=typeof e=="string"?ed(e):td(e);if(!(!t||!Nm(t)))return t}const rd="_frozenDsc";function po(e,t){je(e,rd,t)}function od(e,t){const n=t.getOptions(),{publicKey:r,host:o}=t.getDsn()||{};let s;n.orgId?s=String(n.orgId):o&&(s=Lm(o));const i={environment:n.environment||as,release:n.release,public_key:r,trace_id:e,org_id:s};return t.emit("createDsc",i),i}function aa(e,t){const n=t.getPropagationContext();return n.dsc||od(n.traceId,e)}function ot(e){const t=P();if(!t)return{};const n=Re(e),r=q(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[is]??o[$l];function a(h){return(typeof i=="number"||typeof i=="string")&&(h.sample_rate=`${i}`),h}const c=n[rd];if(c)return a(c);const u=s?.get("sentry.dsc"),d=u&&Wl(u);if(d)return a(d);const l=od(e.spanContext().traceId,t),f=o[ye],p=r.description;return f!=="url"&&p&&(l.transaction=p),Wt()&&(l.sampled=String(hn(n)),l.sample_rand=s?.get("sentry.sample_rand")??No(n).scope?.getPropagationContext().sampleRand.toString()),a(l),t.emit("createDsc",l,n),l}function Pm(e){const t=ot(e);return jl(t)}class It{constructor(t={}){this._traceId=t.traceId||Tt(),this._spanId=t.spanId||Cr()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Vl}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}const Sc=globalThis||void 0||self;function Ge(e,t=100,n=1/0){try{return gi("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function sd(e,t=3,n=100*1024){const r=Ge(e,t);return Bm(r)>n?sd(e,t-1,n):r}function gi(e,t,n=1/0,r=1/0,o=Um()){const[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=Dm(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(s(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const p=u.toJSON();return gi("",p,c-1,r,o)}catch{}const d=Array.isArray(t)?[]:{};let l=0;const f=Ll(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(l>=r){d[p]="[MaxProperties ~]";break}const h=f[p];d[p]=gi(p,h,c-1,r,o),l++}return i(t),d}function Dm(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof Sc<"u"&&t===Sc)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Ml(t))return"[VueViewModel]";if(Vh(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Et(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=Fm(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Fm(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function $m(e){return~-encodeURI(e).split(/%..|./).length}function Bm(e){return $m(JSON.stringify(e))}function Um(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function Mt(e,t=[]){return[e,t]}function Hm(e,t){const[n,r]=e;return[n,[...r,t]]}function un(e,t){const n=e[1];for(const r of n){const o=r[0].type;if(t(r,o))return!0}return!1}function bc(e,t){return un(e,(n,r)=>t.includes(r))}function Lo(e){const t=Tr(G);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Wm(e){const t=Tr(G);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function Po(e){const[t,n]=e;let r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[Lo(r),s]:r.push(typeof s=="string"?Lo(s):s)}for(const s of n){const[i,a]=s;if(o(`
|
|
6
|
+
${JSON.stringify(i)}
|
|
7
|
+
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Ge(a))}o(c)}}return typeof r=="string"?r:jm(r)}function jm(e){const t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function zm(e){let t=typeof e=="string"?Lo(e):e;function n(i){const a=t.subarray(0,i);return t=t.subarray(i+1),a}function r(){let i=t.indexOf(10);return i<0&&(i=t.length),JSON.parse(Wm(n(i)))}const o=r(),s=[];for(;t.length;){const i=r(),a=typeof i.length=="number"?i.length:void 0;s.push([i,a?n(a):r()])}return[o,s]}function qm(e){return[{type:"span"},e]}function Gm(e){const t=typeof e.data=="string"?Lo(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Vm={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",raw_security:"security",log:"log_item"};function Ec(e){return Vm[e]}function ca(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function id(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:mn(r)},...o&&{trace:o}}}function Ym(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Km(e,t,n,r){const o=ca(n),s={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:mn(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Mt(s,[i])}function Xm(e,t,n,r){const o=ca(n),s=e.type&&e.type!=="replay_event"?e.type:"event";Ym(e,n?.sdk);const i=id(e,o,r,t);return delete e.sdkProcessingMetadata,Mt(i,[[{type:s},e]])}function Jm(e,t){function n(d){return!!d.trace_id&&!!d.public_key}const r=ot(e[0]),o=t?.getDsn(),s=t?.getOptions().tunnel,i={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!s&&o&&{dsn:mn(o)}},a=t?.getOptions().beforeSendSpan,c=a?d=>{const l=q(d),f=a(l);return f||(mi(),l)}:q,u=[];for(const d of e){const l=c(d);l&&u.push(qm(l))}return Mt(i,u)}function Zm(e){if(!M)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=q(e),{spanId:o}=e.spanContext(),s=hn(e),i=Re(e),a=i===e,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:d,description:l}=q(i);u.push(`root ID: ${i.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}y.log(`${c}
|
|
8
|
+
${u.join(`
|
|
9
|
+
`)}`)}function Qm(e){if(!M)return;const{description:t="< unknown name >",op:n="< unknown op >"}=q(e),{spanId:r}=e.spanContext(),s=Re(e)===e,i=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${t}" with ID ${r}`;y.log(i)}function ad(e,t,n,r=Ie()){const o=r&&Re(r);o&&(M&&y.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[Ar]:t,[Mr]:n}))}function vc(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},o=r[Mr],s=r[Ar];typeof o=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:o})}),t}const wc=1e3;class cs{constructor(t={}){this._traceId=t.traceId||Tt(),this._spanId=t.spanId||Cr(),this._startTime=t.startTimestamp||Ee(),this._links=t.links,this._attributes={},this.setAttributes({[re]:"manual",[Ce]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?ia:Vl}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=rn(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(ye,"custom"),this}end(t){this._endTime||(this._endTime=rn(t),Qm(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Ce],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Jl(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[re],profile_id:this._attributes[ra],exclusive_time:this._attributes[Jn],measurements:vc(this._events),is_segment:this._isStandaloneSpan&&Re(this)===this||void 0,segment_id:this._isStandaloneSpan?Re(this).spanContext().spanId:void 0,links:Xl(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){M&&y.log("[Tracing] Adding an event to span:",t);const o=Tc(n)?n:r||Ee(),s=Tc(n)?{}:n||{},i={name:t,time:rn(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=P();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Re(this)))return;if(this._isStandaloneSpan){this._sampled?tg(Jm([this],t)):(M&&y.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(No(this).scope||K()).captureEvent(r)}_convertSpanToTransaction(){if(!Ic(q(this)))return;this._name||(M&&y.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=No(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const s=cr(this).filter(d=>d!==this&&!eg(d)).map(d=>q(d)).filter(Ic),i=this._attributes[ye];delete this._attributes[pi],s.forEach(d=>{delete d.data[pi]});const a={contexts:{trace:Im(this)},spans:s.length>wc?s.sort((d,l)=>d.start_timestamp-l.start_timestamp).slice(0,wc):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:ot(this)},request:r,...i&&{transaction_info:{source:i}}},c=vc(this._events);return c&&Object.keys(c).length&&(M&&y.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}}function Tc(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Ic(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function eg(e){return e instanceof cs&&e.isStandaloneSpan()}function tg(e){const t=P();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function cd(e,t,n=()=>{}){let r;try{r=e()}catch(o){throw t(o),n(),o}return ng(r,t,n)}function ng(e,t,n){return kr(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}function rg(e,t,n){if(!Wt(e))return[!1];let r,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,r=!0);const s=cn(o);if(s===void 0)return M&&y.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!s)return M&&y.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,s,r];const i=n<s;return i||M&&y.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[i,s,r]}const Do="__SENTRY_SUPPRESS_TRACING__";function us(e,t){const n=Or();if(n.startSpan)return n.startSpan(e,t);const r=la(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return qe(a,()=>ud(s)(()=>{const u=K(),d=da(u,s),f=e.onlyIfParent&&!d?new It:ua({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return an(u,f),cd(()=>t(f),()=>{const{status:p}=q(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:Te,message:"internal_error"})},()=>{f.end()})}))}function og(e,t){const n=Or();if(n.startSpanManual)return n.startSpanManual(e,t);const r=la(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return qe(a,()=>ud(s)(()=>{const u=K(),d=da(u,s),f=e.onlyIfParent&&!d?new It:ua({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return an(u,f),cd(()=>t(f,()=>f.end()),()=>{const{status:p}=q(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:Te,message:"internal_error"})})}))}function Xe(e){const t=Or();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=la(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?i=>qe(e.scope,i):o!==void 0?i=>ln(o,i):i=>i())(()=>{const i=K(),a=da(i,o);return e.onlyIfParent&&!a?new It:ua({parentSpan:a,spanArguments:n,forceTransaction:r,scope:i})})}const sg=(e,t)=>{const n=xt(),r=Yt(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:o,baggage:s}=e;return qe(i=>{const a=ql(o,s);return i.setPropagationContext(a),t()})};function ln(e,t){const n=Or();return n.withActiveSpan?n.withActiveSpan(e,t):qe(r=>(an(r,e||void 0),t(r)))}function ig(e){const t=Or();return t.suppressTracing?t.suppressTracing(e):qe(n=>{n.setSDKProcessingMetadata({[Do]:!0});const r=e();return n.setSDKProcessingMetadata({[Do]:void 0}),r})}function ag(e){return qe(t=>(t.setPropagationContext({traceId:Tt(),sampleRand:Math.random()}),M&&y.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),ln(null,e)))}function ua({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Wt()){const i=new It;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...ot(i)};po(i,a)}return i}const o=Ne();let s;if(e&&!n)s=cg(e,r,t),Zl(e,s);else if(e){const i=ot(e),{traceId:a,spanId:c}=e.spanContext(),u=hn(e);s=kc({traceId:a,parentSpanId:c,...t},r,u),po(s,i)}else{const{traceId:i,dsc:a,parentSpanId:c,sampled:u}={...o.getPropagationContext(),...r.getPropagationContext()};s=kc({traceId:i,parentSpanId:c,...t},r,u),a&&po(s,a)}return Zm(s),ym(s,r,o),s}function la(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=rn(e.startTime),delete r.startTime,r}return n}function Or(){const e=xt();return Yt(e)}function kc(e,t,n){const r=P(),o=r?.getOptions()||{},{name:s=""}=e,i={spanAttributes:{...e.attributes},spanName:s,parentSampled:n};r?.emit("beforeSampling",i,{decision:!1});const a=i.parentSampled??n,c=i.spanAttributes,u=t.getPropagationContext(),[d,l,f]=t.getScopeData().sdkProcessingMetadata[Do]?[!1]:rg(o,{name:s,parentSampled:a,attributes:c,parentSampleRate:cn(u.dsc?.sample_rate)},u.sampleRand),p=new cs({...e,attributes:{[ye]:"custom",[is]:l!==void 0&&f?l:void 0,...c},sampled:d});return!d&&r&&(M&&y.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",p),p}function cg(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),s=t.getScopeData().sdkProcessingMetadata[Do]?!1:hn(e),i=s?new cs({...n,parentSpanId:r,traceId:o,sampled:s}):new It({traceId:o});Zl(e,i);const a=P();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}function da(e,t){if(t)return t;if(t===null)return;const n=hr(e);if(!n)return;const r=P();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Re(n):n}function ud(e){return e!==void 0?t=>ln(e,t):t=>t()}const ho={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},ug="heartbeatFailed",lg="idleTimeout",dg="finalTimeout",fg="externalFinish";function ld(e,t={}){const n=new Map;let r=!1,o,s=fg,i=!t.disableAutoFinish;const a=[],{idleTimeout:c=ho.idleTimeout,finalTimeout:u=ho.finalTimeout,childSpanTimeout:d=ho.childSpanTimeout,beforeSpanEnd:l}=t,f=P();if(!f||!Wt()){const E=new It,R={sample_rate:"0",sampled:"false",...ot(E)};return po(E,R),E}const p=K(),h=Ie(),g=pg(e);g.end=new Proxy(g.end,{apply(E,R,A){if(l&&l(g),R instanceof It)return;const[w,...x]=A,B=w||Ee(),I=rn(B),O=cr(g).filter(D=>D!==g);if(!O.length)return S(I),Reflect.apply(E,R,[I,...x]);const U=O.map(D=>q(D).timestamp).filter(D=>!!D),F=U.length?Math.max(...U):void 0,L=q(g).start_timestamp,N=Math.min(L?L+u/1e3:1/0,Math.max(L||-1/0,Math.min(I,F||1/0)));return S(N),Reflect.apply(E,R,[N,...x])}});function _(){o&&(clearTimeout(o),o=void 0)}function b(E){_(),o=setTimeout(()=>{!r&&n.size===0&&i&&(s=lg,g.end(E))},c)}function v(E){o=setTimeout(()=>{!r&&i&&(s=ug,g.end(E))},d)}function C(E){_(),n.set(E,!0);const R=Ee();v(R+d/1e3)}function k(E){if(n.has(E)&&n.delete(E),n.size===0){const R=Ee();b(R+c/1e3)}}function S(E){r=!0,n.clear(),a.forEach(I=>I()),an(p,h);const R=q(g),{start_timestamp:A}=R;if(!A)return;R.data[Oo]||g.setAttribute(Oo,s),y.log(`[Tracing] Idle span "${R.op}" finished`);const x=cr(g).filter(I=>I!==g);let B=0;x.forEach(I=>{I.isRecording()&&(I.setStatus({code:Te,message:"cancelled"}),I.end(E),M&&y.log("[Tracing] Cancelling span since span ended early",JSON.stringify(I,void 0,2)));const O=q(I),{timestamp:U=0,start_timestamp:F=0}=O,L=F<=E,N=(u+c)/1e3,D=U-F<=N;if(M){const Y=JSON.stringify(I,void 0,2);L?D||y.log("[Tracing] Discarding span since it finished after idle span final timeout",Y):y.log("[Tracing] Discarding span since it happened after idle span was finished",Y)}(!D||!L)&&(Cm(g,I),B++)}),B>0&&g.setAttribute("sentry.idle_span_discarded_spans",B)}return a.push(f.on("spanStart",E=>{if(r||E===g||q(E).timestamp||E instanceof cs&&E.isStandaloneSpan())return;cr(g).includes(E)&&C(E.spanContext().spanId)})),a.push(f.on("spanEnd",E=>{r||k(E.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",E=>{E===g&&(i=!0,b(),n.size&&v())})),t.disableAutoFinish||b(),setTimeout(()=>{r||(g.setStatus({code:Te,message:"deadline_exceeded"}),s=dg,g.end())},u),g}function pg(e){const t=Xe(e);return an(K(),t),M&&y.log("[Tracing] Started span is an idle span"),t}const $s=0,Rc=1,Cc=2;function kt(e){return new jt(t=>{t(e)})}function Fo(e){return new jt((t,n)=>{n(e)})}class jt{constructor(t){this._state=$s,this._handlers=[],this._runExecutor(t)}then(t,n){return new jt((r,o)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(i){o(i)}},s=>{if(!n)o(s);else try{r(n(s))}catch(i){o(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new jt((n,r)=>{let o,s;return this.then(i=>{s=!1,o=i,t&&t()},i=>{s=!0,o=i,t&&t()}).then(()=>{if(s){r(o);return}n(o)})})}_executeHandlers(){if(this._state===$s)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Rc&&n[1](this._value),this._state===Cc&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,i)=>{if(this._state===$s){if(kr(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Rc,s)},o=s=>{n(Cc,s)};try{t(r,o)}catch(s){o(s)}}}function _i(e,t,n,r=0){return new jt((o,s)=>{const i=e[r];if(t===null||typeof i!="function")o(t);else{const a=i({...t},n);M&&i.id&&a===null&&y.log(`Event processor "${i.id}" dropped event`),kr(a)?a.then(c=>_i(e,c,n,r+1).then(o)).then(null,s):_i(e,a,n,r+1).then(o).then(null,s)}})}function hg(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;mg(e,t),r&&yg(e,r),Sg(e,n),gg(e,o),_g(e,s)}function $o(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:l,propagationContext:f,transactionName:p,span:h}=t;qr(e,"extra",n),qr(e,"tags",r),qr(e,"user",o),qr(e,"contexts",s),e.sdkProcessingMetadata=Rr(e.sdkProcessingMetadata,a,2),i&&(e.level=i),p&&(e.transactionName=p),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext={...e.propagationContext,...f}}function qr(e,t,n){e[t]=Rr(e[t],n,1)}function mg(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function gg(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function _g(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function yg(e,t){e.contexts={trace:Yl(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ot(t),...e.sdkProcessingMetadata};const n=Re(t),r=q(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Sg(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}let Gr,xc,Vr;function dd(e){const t=G._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return Vr&&n.length===xc||(xc=n.length,Vr=n.reduce((r,o)=>{Gr||(Gr={});const s=Gr[o];if(s)r[s[0]]=s[1];else{const i=e(o);for(let a=i.length-1;a>=0;a--){const u=i[a]?.filename,d=t[o];if(u&&d){r[u]=d,Gr[o]=[u,d];break}}}return r},{})),Vr}function bg(e,t){const n=dd(e);if(!n)return[];const r=[];for(const o of t)o&&n[o]&&r.push({type:"sourcemap",code_file:o,debug_id:n[o]});return r}function fd(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||We(),timestamp:t.timestamp||pn()},u=n.integrations||e.integrations.map(_=>_.name);Eg(c,e),Tg(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&vg(c,e.stackParser);const d=kg(r,n.captureContext);n.mechanism&&Ht(c,n.mechanism);const l=o?o.getEventProcessors():[],f=xr().getScopeData();if(s){const _=s.getScopeData();$o(f,_)}if(d){const _=d.getScopeData();$o(f,_)}const p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),hg(c,f);const h=[...l,...f.eventProcessors];return _i(h,c,n).then(_=>(_&&wg(_),typeof i=="number"&&i>0?Ig(_,i,a):_))}function Eg(e,t){const{environment:n,release:r,dist:o,maxValueLength:s=250}=t;e.environment=e.environment||n||as,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&(i.url=Ln(i.url,s))}function vg(e,t){const n=dd(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function wg(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function Tg(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Ig(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:Ge(o.data,t,n)}}))},...e.user&&{user:Ge(e.user,t,n)},...e.contexts&&{contexts:Ge(e.contexts,t,n)},...e.extra&&{extra:Ge(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ge(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:Ge(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Ge(e.contexts.flags,3,n)),r}function kg(e,t){if(!t)return e;const n=e?e.clone():new rt;return n.update(t),n}function Rg(e){if(e)return Cg(e)?{captureContext:e}:Mg(e)?{captureContext:e}:e}function Cg(e){return e instanceof rt||typeof e=="function"}const xg=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Mg(e){return Object.keys(e).some(t=>xg.includes(t))}function zt(e,t){return K().captureException(e,Rg(t))}function Bo(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return K().captureMessage(e,n,r)}function Nr(e,t){return K().captureEvent(e,t)}function fa(e,t){Ne().setContext(e,t)}function Ag(e){Ne().setExtras(e)}function Og(e,t){Ne().setExtra(e,t)}function Ng(e){Ne().setTags(e)}function Lg(e,t){Ne().setTag(e,t)}function Pg(e){Ne().setUser(e)}function pd(){return Ne().lastEventId()}async function Dg(e){const t=P();return t?t.flush(e):(M&&y.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Fg(e){const t=P();return t?t.close(e):(M&&y.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function $g(){return!!P()}function hd(){const e=P();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function md(e){Ne().addEventProcessor(e)}function yi(e){const t=Ne(),n=K(),{userAgent:r}=G.navigator||{},o=rm({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),s=t.getSession();return s?.status==="ok"&&Pn(s,{status:"exited"}),pa(),t.setSession(o),o}function pa(){const e=Ne(),n=K().getSession()||e.getSession();n&&om(n),gd(),e.setSession()}function gd(){const e=Ne(),t=P(),n=e.getSession();n&&t&&t.captureSession(n)}function Si(e=!1){if(e){pa();return}gd()}const Bg="7";function _d(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Ug(e){return`${_d(e)}${e.projectId}/envelope/`}function Hg(e,t){const n={sentry_version:Bg};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function yd(e,t,n){return t||`${Ug(e)}?${Hg(e,n)}`}function Wg(e,t){const n=nd(e);if(!n)return"";const r=`${_d(n)}embed/error-page/`;let o=`dsn=${mn(n)}`;for(const s in t)if(s!=="dsn"&&s!=="onClose")if(s==="user"){const i=t.user;if(!i)continue;i.name&&(o+=`&name=${encodeURIComponent(i.name)}`),i.email&&(o+=`&email=${encodeURIComponent(i.email)}`)}else o+=`&${encodeURIComponent(s)}=${encodeURIComponent(t[s])}`;return`${r}?${o}`}const Mc=[];function jg(e){const t={};return e.forEach(n=>{const{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function zg(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return jg(r)}function qg(e,t){const n={};return t.forEach(r=>{r&&Sd(e,r,n)}),n}function Ac(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Sd(e,t,n){if(n[t.name]){M&&y.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Mc.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Mc.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,s)=>r(o,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(o)}M&&y.log(`Integration installed: ${t.name}`)}function bi(e){const t=P();if(!t){M&&y.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function Gg(e,t,n){const r=[{type:"client_report"},{timestamp:pn(),discarded_events:e}];return Mt(t?{dsn:t}:{},[r])}function bd(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Vg(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[ra],exclusive_time:i?.[Jn],measurements:e.measurements,is_segment:!0}}function Yg(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[ra]:e.profile_id},...e.exclusive_time&&{[Jn]:e.exclusive_time}}}},measurements:e.measurements}}const Oc="Not capturing exception because it's already been captured.",Nc="Discarded session because of missing or non-string release",Ed=Symbol.for("SentryInternalError"),vd=Symbol.for("SentryDoNotSendEventError");function mo(e){return{message:e,[Ed]:!0}}function Bs(e){return{message:e,[vd]:!0}}function Lc(e){return!!e&&typeof e=="object"&&Ed in e}function Pc(e){return!!e&&typeof e=="object"&&vd in e}class Kg{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=nd(t.dsn):M&&y.warn("No DSN provided, client will not send events."),this._dsn){const n=yd(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){const o=We();if(fc(t))return M&&y.log(Oc),o;const s={event_id:o,...n};return this._process(this.eventFromException(t,s).then(i=>this._captureEvent(i,s,r))),s.event_id}captureMessage(t,n,r,o){const s={event_id:We(),...r},i=os(t)?t:String(t),a=Nn(t)?this.eventFromMessage(i,n,s):this.eventFromException(t,s);return this._process(a.then(c=>this._captureEvent(c,s,o))),s.event_id}captureEvent(t,n,r){const o=We();if(n?.originalException&&fc(n.originalException))return M&&y.log(Oc),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope;return this._process(this._captureEvent(t,s,a||r,c)),s.event_id}captureSession(t){this.sendSession(t),Pn(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(o=>r&&o))):kt(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];Sd(this,t,this._integrations),n||Ac(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Xm(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=Hm(r,Gm(s));const o=this.sendEnvelope(r);o&&o.then(s=>this.emit("afterSendEvent",t,s),null)}sendSession(t){const{release:n,environment:r=as}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){M&&y.warn(Nc);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){M&&y.warn(Nc);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=Km(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const o=`${t}:${n}`;M&&y.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const o=r.indexOf(n);o>-1&&r.splice(o,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(M&&y.error("Error while sending envelope:",n),n)):(M&&y.error("Transport disabled"),kt({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=qg(this,t),Ac(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1;const s=n.exception?.values;if(s){o=!0;for(const c of s)if(c.mechanism?.handled===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(Pn(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new jt(n=>{let r=0;const o=1,s=setInterval(()=>{this._numProcessing==0?(clearInterval(s),n(!0)):(r+=o,t&&r>=t&&(clearInterval(s),n(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){const s=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),fd(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:Fl(r),...a.contexts};const c=aa(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=K(),o=Ne()){return M&&Ei(t)&&y.log(`Captured error event \`${bd(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{M&&(Pc(s)?y.log(s.message):Lc(s)?y.warn(s.message):y.warn(s))})}_processEvent(t,n,r,o){const s=this.getOptions(),{sampleRate:i}=s,a=wd(t),c=Ei(t),u=t.type||"error",d=`before send for type \`${u}\``,l=typeof i>"u"?void 0:cn(i);if(c&&typeof l=="number"&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error"),Fo(Bs(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const f=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,o).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),Bs("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return p;const g=Jg(this,s,p,n);return Xg(g,d)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",f),a){const b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw Bs(`${d} returned \`null\`, will not send event.`)}const h=r.getSession()||o.getSession();if(c&&h&&this._updateSessionFromEvent(h,p),a){const _=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,b=p.spans?p.spans.length:0,v=_-b;v>0&&this.recordDroppedEvent("before_send","span",v)}const g=p.transaction_info;if(a&&g&&p.transaction!==t.transaction){const _="custom";p.transaction_info={...g,source:_}}return this.sendEvent(p,n),p}).then(null,p=>{throw Pc(p)||Lc(p)?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),mo(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
10
|
+
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,s]=n.split(":");return{reason:o,category:s,quantity:r}})}_flushOutcomes(){M&&y.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){M&&y.log("No outcomes to send");return}if(!this._dsn){M&&y.log("No dsn provided, will not send outcomes");return}M&&y.log("Sending outcomes:",t);const n=Gg(t,this._options.tunnel&&mn(this._dsn));this.sendEnvelope(n)}}function Xg(e,t){const n=`${t} must return \`null\` or a valid event.`;if(kr(e))return e.then(r=>{if(!vt(r)&&r!==null)throw mo(n);return r},r=>{throw mo(`${t} rejected with ${r}`)});if(!vt(e)&&e!==null)throw mo(n);return e}function Jg(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i}=t;let a=n;if(Ei(a)&&o)return o(a,r);if(wd(a)){if(i){const c=i(Vg(a));if(c?a=Rr(n,Yg(c)):mi(),a.spans){const u=[];for(const d of a.spans){const l=i(d);l?u.push(l):(mi(),u.push(d))}a.spans=u}}if(s){if(a.spans){const c=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return s(a,r)}}return a}function Ei(e){return e.type===void 0}function wd(e){return e.type==="transaction"}function Zg(e,t){return t?qe(t,()=>{const n=Ie(),r=n?Yl(n):Fl(t);return[n?ot(n):aa(e,t),r]}):[void 0,void 0]}const Qg={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function e_(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function t_(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=mn(r)),Mt(o,[e_(e)])}const n_=100;function r_(e){switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let t="";try{t=JSON.stringify(e)??""}catch{}return{value:t,type:"string"}}}}function Ot(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function o_(e,t){const n=ha(),r=Td(e);r===void 0?n.set(e,[t]):(n.set(e,[...r,t]),r.length>=n_&&go(e,r))}function vi(e,t=P(),n=K(),r=o_){if(!t){M&&y.warn("No client available to capture log.");return}const{release:o,environment:s,enableLogs:i,beforeSendLog:a,_experiments:c}=t.getOptions();if(!(i??c?.enableLogs)){M&&y.warn("logging option not enabled, log will not be captured.");return}const d=a??c?.beforeSendLog,[,l]=Zg(t,n),f={...e.attributes},{user:{id:p,email:h,username:g}}=s_(n);Ot(f,"user.id",p,!1),Ot(f,"user.email",h,!1),Ot(f,"user.name",g,!1),Ot(f,"sentry.release",o),Ot(f,"sentry.environment",s);const{name:_,version:b}=t.getSdkMetadata()?.sdk??{};Ot(f,"sentry.sdk.name",_),Ot(f,"sentry.sdk.version",b);const v=e.message;if(os(v)){const{__sentry_template_string__:B,__sentry_template_values__:I=[]}=v;f["sentry.message.template"]=B,I.forEach((O,U)=>{f[`sentry.message.parameter.${U}`]=O})}const C=hr(n);Ot(f,"sentry.trace.parent_span_id",C?.spanContext().spanId);const k={...e,attributes:f};t.emit("beforeCaptureLog",k);const S=d?qt(()=>d(k)):k;if(!S){t.recordDroppedEvent("before_send","log_item",1),M&&y.warn("beforeSendLog returned null, log will not be captured.");return}const{level:E,message:R,attributes:A={},severityNumber:w}=S,x={timestamp:Ee(),level:E,body:R,trace_id:l?.trace_id,severity_number:w??Qg[E],attributes:Object.keys(A).reduce((B,I)=>(B[I]=r_(A[I]),B),{})};r(t,x),t.emit("afterCaptureLog",S)}function go(e,t){const n=t??Td(e)??[];if(n.length===0)return;const r=e.getOptions(),o=t_(n,r._metadata,r.tunnel,e.getDsn());ha().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function Td(e){return ha().get(e)}function s_(e){const t=xr().getScopeData();return $o(t,Ne().getScopeData()),$o(t,e.getScopeData()),t}function ha(){return Ir("clientToLogBufferMap",()=>new WeakMap)}function i_(e,t){t.debug===!0&&(M?y.enable():qt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),K().update(t.initialScope);const r=new e(t);return Id(r),r.init(),r}function Id(e){K().setClient(e)}const kd=Symbol.for("SentryBufferFullError");function a_(e){const t=[];function n(){return e===void 0||t.length<e}function r(i){return t.splice(t.indexOf(i),1)[0]||Promise.resolve(void 0)}function o(i){if(!n())return Fo(kd);const a=i();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function s(i){return new jt((a,c)=>{let u=t.length;if(!u)return a(!0);const d=setTimeout(()=>{i&&i>0&&a(!1)},i);t.forEach(l=>{kt(l).then(()=>{--u||(clearTimeout(d),a(!0))},c)})})}return{$:t,add:o,drain:s}}const c_=60*1e3;function Rd(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?c_:r-t}function u_(e,t){return e[t]||e.all||0}function Cd(e,t,n=Date.now()){return u_(e,t)>n}function xd(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const a of s.trim().split(",")){const[c,u,,,d]=a.split(":",5),l=parseInt(c,10),f=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[p]=r+f):o[p]=r+f}else i?o.all=r+Rd(i,r):t===429&&(o.all=r+60*1e3);return o}const l_=64;function Md(e,t,n=a_(e.bufferSize||l_)){let r={};const o=i=>n.drain(i);function s(i){const a=[];if(un(i,(l,f)=>{const p=Ec(f);Cd(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):a.push(l)}),a.length===0)return kt({});const c=Mt(i[0],a),u=l=>{un(c,(f,p)=>{e.recordDroppedEvent(l,Ec(p))})},d=()=>t({body:Po(c)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&M&&y.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=xd(r,l),l),l=>{throw u("network_error"),M&&y.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===kd)return M&&y.error("Skipped sending event because buffer is full."),u("queue_overflow"),kt({});throw l})}return{send:s,flush:o}}const Us=100,Hs=5e3,d_=36e5;function f_(e){function t(...n){M&&y.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const o=n.createStore(n);let s=Hs,i;function a(l,f,p){return bc(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,f,p):!0}function c(l){i&&clearTimeout(i),i=setTimeout(async()=>{i=void 0;const f=await o.shift();f&&(t("Attempting to send previously queued event"),f[0].sent_at=new Date().toISOString(),d(f,!0).catch(p=>{t("Failed to retry sending",p)}))},l),typeof i!="number"&&i.unref&&i.unref()}function u(){i||(c(s),s=Math.min(s*2,d_))}async function d(l,f=!1){if(!f&&bc(l,["replay_event","replay_recording"]))return await o.push(l),c(Us),{};try{if(n.shouldSend&&await n.shouldSend(l)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const p=await r.send(l);let h=Us;if(p){if(p.headers?.["retry-after"])h=Rd(p.headers["retry-after"]);else if(p.headers?.["x-sentry-rate-limits"])h=6e4;else if((p.statusCode||0)>=400)return p}return c(h),s=Hs,p}catch(p){if(await a(l,p,s))return f?await o.unshift(l):await o.push(l),u(),t("Error sending. Event queued.",p),{};throw p}}return n.flushAtStartup&&u(),{send:d,flush:l=>(l===void 0&&(s=Hs,c(Us)),r.flush(l))}}}function Ad(e,t){let n;return un(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function p_(e,t){return n=>{const r=e(n);return{...r,send:async o=>{const s=Ad(o,["event","transaction","profile","replay_event"]);return s&&(s.release=t),r.send(o)}}}}function h_(e,t){return Mt(t?{...e[0],dsn:t}:e[0],e[1])}function m_(e,t){return n=>{const r=e(n),o=new Map;function s(c,u){const d=u?`${c}:${u}`:c;let l=o.get(d);if(!l){const f=ed(c);if(!f)return;const p=yd(f,n.tunnel);l=u?p_(e,u)({...n,url:p}):e({...n,url:p}),o.set(d,l)}return[c,l]}async function i(c){function u(p){const h=p?.length?p:["event"];return Ad(c,h)}const d=t({envelope:c,getEvent:u}).map(p=>typeof p=="string"?s(p,void 0):s(p.dsn,p.release)).filter(p=>!!p),l=d.length?d:[["",r]];return(await Promise.all(l.map(([p,h])=>h.send(h_(c,p)))))[0]}async function a(c){const u=[...o.values(),r];return(await Promise.all(u.map(l=>l.flush(c)))).every(l=>l)}return{send:i,flush:a}}}function Od(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return __(e,n)||g_(e,r)}function g_(e,t){return t?Dc(e)===Dc(t):!1}function __(e,t){return t?e.includes(t.host):!1}function Dc(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Nd(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const y_=Nd;function S_(e){e.user?.ip_address===void 0&&(e.user={...e.user,ip_address:"{{auto}}"})}function b_(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Ld(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:yt})),version:yt}),e._metadata=o}function ma(e={}){const t=e.client||P();if(!hd()||!t)return{};const n=xt(),r=Yt(n);if(r.getTraceData)return r.getTraceData(e);const o=e.scope||K(),s=e.span||Ie(),i=s?Kl(s):E_(o),a=s?ot(s):aa(t,o),c=jl(a);return zl.test(i)?{"sentry-trace":i,baggage:c}:(y.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function E_(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Gl(t,r,n)}function v_(e,t,n){let r,o,s;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){o!==void 0&&clearTimeout(o),s!==void 0&&clearTimeout(s),o=s=void 0}function d(){return o!==void 0||s!==void 0?c():r}function l(){return o&&clearTimeout(o),o=a(c,t),i&&s===void 0&&(s=a(c,i)),r}return l.cancel=u,l.flush=d,l}const w_=100;function st(e,t){const n=P(),r=Ne();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=w_}=n.getOptions();if(s<=0)return;const a={timestamp:pn(),...e},c=o?qt(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}let Fc;const T_="FunctionToString",$c=new WeakMap,I_=()=>({name:T_,setupOnce(){Fc=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=na(this),n=$c.has(P())&&t!==void 0?t:this;return Fc.apply(n,e)}}catch{}},setup(e){$c.set(e,!0)}}),Pd=I_,k_=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`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",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],R_="EventFilters",Dd=(e={})=>{let t;return{name:R_,setup(n){const r=n.getOptions();t=Bc(e,r)},processEvent(n,r,o){if(!t){const s=o.getOptions();t=Bc(e,s)}return C_(n,t)?null:n}}},Fd=(e={})=>({...Dd(e),name:"InboundFilters"});function Bc(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:k_],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function C_(e,t){if(e.type){if(e.type==="transaction"&&M_(e,t.ignoreTransactions))return M&&y.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
11
|
+
Event: ${Jt(e)}`),!0}else{if(x_(e,t.ignoreErrors))return M&&y.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
12
|
+
Event: ${Jt(e)}`),!0;if(L_(e))return M&&y.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
13
|
+
Event: ${Jt(e)}`),!0;if(A_(e,t.denyUrls))return M&&y.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
14
|
+
Event: ${Jt(e)}.
|
|
15
|
+
Url: ${Uo(e)}`),!0;if(!O_(e,t.allowUrls))return M&&y.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
16
|
+
Event: ${Jt(e)}.
|
|
17
|
+
Url: ${Uo(e)}`),!0}return!1}function x_(e,t){return t?.length?bd(e).some(n=>nt(n,t)):!1}function M_(e,t){if(!t?.length)return!1;const n=e.transaction;return n?nt(n,t):!1}function A_(e,t){if(!t?.length)return!1;const n=Uo(e);return n?nt(n,t):!1}function O_(e,t){if(!t?.length)return!0;const n=Uo(e);return n?nt(n,t):!0}function N_(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Uo(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?N_(n):null}catch{return M&&y.error(`Cannot extract url for event ${Jt(e)}`),null}}function L_(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function P_(e,t,n,r,o,s){if(!o.exception?.values||!s||!wt(s.originalException,Error))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=wi(e,t,r,s.originalException,n,o.exception.values,i,0))}function wi(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(wt(r[o],Error)){Uc(i,a);const u=e(t,r[o]),d=c.length;Hc(u,o,d,a),c=wi(e,t,n,r[o],o,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(wt(u,Error)){Uc(i,a);const l=e(t,u),f=c.length;Hc(l,`errors[${d}]`,f,a),c=wi(e,t,n,u,o,[l,...c],l,f)}}),c}function Uc(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Hc(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const $d=new Map,Wc=new Set;function D_(e){if(G._sentryModuleMetadata)for(const t of Object.keys(G._sentryModuleMetadata)){const n=G._sentryModuleMetadata[t];if(Wc.has(t))continue;Wc.add(t);const r=e(t);for(const o of r.reverse())if(o.filename){$d.set(o.filename,n);break}}}function F_(e,t){return D_(e),$d.get(t)}function Bd(e,t){try{t.exception.values.forEach(n=>{if(n.stacktrace)for(const r of n.stacktrace.frames||[]){if(!r.filename||r.module_metadata)continue;const o=F_(e,r.filename);o&&(r.module_metadata=o)}})}catch{}}function Ud(e){try{e.exception.values.forEach(t=>{if(t.stacktrace)for(const n of t.stacktrace.frames||[])delete n.module_metadata})}catch{}}const $_=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{un(t,(n,r)=>{if(r==="event"){const o=Array.isArray(n)?n[1]:void 0;o&&(Ud(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;Bd(n,t)})}});function ga(e){const t="console";Gt(t,e),Vt(t,B_)}function B_(){"console"in G&&Zi.forEach(function(e){e in G.console&&He(G.console,e,function(t){return Mo[e]=t,function(...n){Ke("console",{args:n,level:e}),Mo[e]?.apply(G.console,n)}})})}function _a(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const U_="CaptureConsole",H_=(e={})=>{const t=e.levels||Zi,n=e.handled??!0;return{name:U_,setup(r){"console"in G&&ga(({args:o,level:s})=>{P()!==r||!t.includes(s)||j_(o,s,n)})}}},W_=H_;function j_(e,t,n){const r={level:_a(t),extra:{arguments:e}};qe(o=>{if(o.addEventProcessor(a=>(a.logger="console",Ht(a,{handled:n,type:"console"}),a)),t==="assert"){if(!e[0]){const a=`Assertion failed: ${Ao(e.slice(1)," ")||"console.assert"}`;o.setExtra("arguments",e.slice(1)),Bo(a,r)}return}const s=e.find(a=>a instanceof Error);if(s){zt(s,r);return}const i=Ao(e," ");Bo(i,r)})}const z_="Dedupe",q_=()=>{let e;return{name:z_,processEvent(t){if(t.type)return t;try{if(G_(t,e))return M&&y.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Hd=q_;function G_(e,t){return t?!!(V_(e,t)||Y_(e,t)):!1}function V_(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!jd(e,t)||!Wd(e,t))}function Y_(e,t){const n=jc(t),r=jc(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!jd(e,t)||!Wd(e,t))}function Wd(e,t){let n=li(e),r=li(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){const s=r[o],i=n[o];if(s.filename!==i.filename||s.lineno!==i.lineno||s.colno!==i.colno||s.function!==i.function)return!1}return!0}function jd(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function jc(e){return e.exception?.values?.[0]}const K_="ExtraErrorData",X_=(e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:K_,processEvent(r,o,s){const{maxValueLength:i=250}=s.getOptions();return Z_(r,o,t,n,i)}}},J_=X_;function Z_(e,t={},n,r,o){if(!t.originalException||!St(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=Q_(t.originalException,r,o);if(i){const a={...e.contexts},c=Ge(i,n);return vt(c)&&(je(c,"__sentry_skip_normalization__",!0),a[s]=c),{...e,contexts:a}}return e}function Q_(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const s of Object.keys(e)){if(r.indexOf(s)!==-1)continue;const i=e[s];o[s]=St(i)||typeof i=="string"?Ln(`${i}`,n):i}if(t&&e.cause!==void 0&&(o.cause=St(e.cause)?e.cause.toString():e.cause),typeof e.toJSON=="function"){const s=e.toJSON();for(const i of Object.keys(s)){const a=s[i];o[i]=St(a)?a.toString():a}}return o}catch(r){M&&y.error("Unable to extract extra data from the Error object:",r)}return null}function ey(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const ty=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function ny(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=ty.exec(t);return n?n.slice(1):[]}function zc(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=ey(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function qc(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function ry(e,t){e=zc(e).slice(1),t=zc(t).slice(1);const n=qc(e.split("/")),r=qc(t.split("/")),o=Math.min(n.length,r.length);let s=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){s=a;break}let i=[];for(let a=s;a<n.length;a++)i.push("..");return i=i.concat(r.slice(s)),i.join("/")}function oy(e,t){return ny(e)[2]||""}const sy="RewriteFrames",iy=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in G&&!!G.window,o=e.iteratee||ay({isBrowser:r,root:t,prefix:n});function s(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:i(c.stacktrace)}}))}}}catch{return a}}function i(a){return{...a,frames:a?.frames?.map(c=>o(c))}}return{name:sy,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=s(c)),c}}};function ay({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),s=/^\//.test(r.filename);if(e){if(t){const i=r.filename;i.indexOf(t)===0&&(r.filename=i.replace(t,n))}}else if(o||s){const i=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?ry(t,i):oy(i);r.filename=`${n}${a}`}return r}}const cy=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],uy=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],ly={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},zd=["select","insert","upsert","update","delete"];function ls(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function ds(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function dy(e,t={}){switch(e){case"GET":return"select";case"POST":return t.Prefer?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function fy(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let o;return n?.startsWith("fts")?o="textSearch":n?.startsWith("plfts")?o="textSearch[plain]":n?.startsWith("phfts")?o="textSearch[phrase]":n?.startsWith("wfts")?o="textSearch[websearch]":o=n&&ly[n]||"filter",`${o}(${e}, ${r.join(".")})`}function Gc(e,t=!1){return new Proxy(e,{apply(n,r,o){return us({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[re]:"auto.db.supabase",[Ce]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},s=>Reflect.apply(n,r,o).then(i=>(i&&typeof i=="object"&&"error"in i&&i.error?(s.setStatus({code:Te}),zt(i.error,{mechanism:{handled:!1}})):s.setStatus({code:oa}),s.end(),i)).catch(i=>{throw s.setStatus({code:Te}),s.end(),zt(i,{mechanism:{handled:!1}}),i}).then(...o))}})}function py(e){const t=e.auth;if(!(!t||ds(e.auth))){for(const n of cy){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=Gc(r))}for(const n of uy){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=Gc(r,!0))}ls(e.auth)}}function hy(e){ds(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){const o=Reflect.apply(t,n,r),s=o.constructor;return gy(s),o}}),ls(e.prototype.from))}function my(e){ds(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){const o=zd,s=n,i=dy(s.method,s.headers);if(!o.includes(i)||!s?.url?.pathname||typeof s.url.pathname!="string")return Reflect.apply(t,n,r);const a=s.url.pathname.split("/"),c=a.length>0?a[a.length-1]:"",u=[];for(const[p,h]of s.url.searchParams.entries())u.push(fy(p,h));const d=Object.create(null);if(vt(s.body))for(const[p,h]of Object.entries(s.body))d[p]=h;const l=`${i==="select"?"":`${i}${d?"(...) ":""}`}${u.join(" ")} from(${c})`,f={"db.table":c,"db.schema":s.schema,"db.url":s.url.origin,"db.sdk":s.headers["X-Client-Info"],"db.system":"postgresql","db.operation":i,[re]:"auto.db.supabase",[Ce]:"db"};return u.length&&(f["db.query"]=u),Object.keys(d).length&&(f["db.body"]=d),us({name:l,attributes:f},p=>Reflect.apply(t,n,[]).then(h=>{if(p&&(h&&typeof h=="object"&&"status"in h&&mr(p,h.status||500),p.end()),h.error){const b=new Error(h.error.message);h.error.code&&(b.code=h.error.code),h.error.details&&(b.details=h.error.details);const v={};u.length&&(v.query=u),Object.keys(d).length&&(v.body=d),zt(b,{contexts:{supabase:v}})}const g={type:"supabase",category:`db.${i}`,message:l},_={};return u.length&&(_.query=u),Object.keys(d).length&&(_.body=d),Object.keys(_).length&&(g.data=_),st(g),h},h=>{throw p&&(mr(p,500),p.end()),h}).then(...r))}}),ls(e.prototype.then))}function gy(e){for(const t of zd)ds(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,o){const s=Reflect.apply(n,r,o),i=s.constructor;return M&&y.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),my(i),s}}),ls(e.prototype[t]))}const qd=e=>{if(!e){M&&y.warn("Supabase integration was not installed because no Supabase client was provided.");return}const t=e.constructor===Function?e:e.constructor;hy(t),py(e)},_y="Supabase",yy=e=>({setupOnce(){qd(e)},name:_y}),Sy=e=>yy(e.supabaseClient),by=10,Ey="ZodErrors";function vy(e){return St(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function wy(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function Ty(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function Iy(e){const t=new Set;for(const r of e.issues){const o=Ty(r.path);o.length>0&&t.add(o)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const o=e.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${Ln(n.join(", "),100)}`}function ky(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!vy(r.originalException)||r.originalException.issues.length===0)return n;try{const s=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(wy);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:s})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:Iy(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":s.slice(0,e)}}}catch(o){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:o instanceof Error?`${o.name}: ${o.message}
|
|
18
|
+
${o.stack}`:"unknown"}}}}}const Ry=(e={})=>{const t=e.limit??by;return{name:Ey,processEvent(n,r){return ky(t,e.saveZodIssuesAsAttachment,n,r)}}},Cy=Ry,xy=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{un(n,(r,o)=>{if(o==="event"){const s=Array.isArray(r)?r[1]:void 0;s&&(Ud(s),r[1]=s)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;Bd(r,n)})},processEvent(t){const n=My(t);if(n){const r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](s=>!s.some(i=>e.filterKeys.includes(i)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function My(e){const t=li(e);if(t)return t.filter(n=>!!n.filename).map(n=>n.module_metadata?Object.keys(n.module_metadata).filter(r=>r.startsWith(Vc)).map(r=>r.slice(Vc.length)):[])}const Vc="_sentryBundlerPluginAppKey:",Ay=100,Oy=10,Yr="flag.evaluation.";function Lr(e){const n=K().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function Fn(e,t,n=Ay){const r=K().getScopeData().contexts;r.flags||(r.flags={values:[]});const o=r.flags.values;Ny(o,e,t,n)}function Ny(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){M&&y.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const o=e.findIndex(s=>s.flag===t);o!==-1&&e.splice(o,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function $n(e,t,n=Oy){if(typeof t!="boolean")return;const r=Ie();if(!r)return;const o=q(r).data;if(`${Yr}${e}`in o){r.setAttribute(`${Yr}${e}`,t);return}Object.keys(o).filter(i=>i.startsWith(Yr)).length<n&&r.setAttribute(`${Yr}${e}`,t)}const Ly=()=>({name:"FeatureFlags",processEvent(e,t,n){return Lr(e)},addFeatureFlag(e,t){Fn(e,t),$n(e,t)}}),Py="thismessage:/";function Gd(e){return"isRelative"in e}function Vd(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?Py:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const o=new URL(e,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function Dy(e){if(Gd(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function sn(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Yd(e){return e.split(/[?#]/,1)[0]}function Fy(e,t,n,r,o="auto.http.browser"){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=Wt()&&t(i);if(e.endTimestamp&&a){const l=e.fetchData.__span;if(!l)return;const f=r[l];f&&(By(f,e),delete r[l]);return}const c=!!Ie(),u=a&&c?Xe(Hy(i,s,o)):new It;if(e.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(e.fetchData.url)){const l=e.args[0],f=e.args[1]||{},p=$y(l,f,Wt()&&c?u:void 0);p&&(e.args[1]=f,f.headers=p)}const d=P();if(d){const l={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};d.emit("beforeOutgoingRequestSpan",u,l)}return u}function $y(e,t,n){const r=ma({span:n}),o=r["sentry-trace"],s=r.baggage;if(!o)return;const i=t.headers||(Al(e)?e.headers:void 0);if(i)if(Uy(i)){const a=new Headers(i);if(a.get("sentry-trace")||a.set("sentry-trace",o),s){const c=a.get("baggage");c?Kr(c)||a.set("baggage",`${c},${s}`):a.set("baggage",s)}return a}else if(Array.isArray(i)){const a=[...i];i.find(u=>u[0]==="sentry-trace")||a.push(["sentry-trace",o]);const c=i.find(u=>u[0]==="baggage"&&Kr(u[1]));return s&&!c&&a.push(["baggage",s]),a}else{const a="sentry-trace"in i?i["sentry-trace"]:void 0,c="baggage"in i?i.baggage:void 0,u=c?Array.isArray(c)?[...c]:[c]:[],d=c&&(Array.isArray(c)?c.find(l=>Kr(l)):Kr(c));return s&&!d&&u.push(s),{...i,"sentry-trace":a??o,baggage:u.length>0?u.join(","):void 0}}else return{...r}}function By(e,t){if(t.response){mr(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:Te,message:"internal_error"});e.end()}function Kr(e){return e.split(",").some(t=>t.trim().startsWith(sa))}function Uy(e){return typeof Headers<"u"&&wt(e,Headers)}function Hy(e,t,n){const r=Vd(e);return{name:r?`${t} ${Dy(r)}`:t,attributes:Wy(e,r,t,n)}}function Wy(e,t,n,r){const o={url:e,type:"fetch","http.method":n,[re]:r,[Ce]:"http.client"};return t&&(Gd(t)||(o["http.url"]=t.href,o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function Kd(e,t={},n=K()){const{message:r,name:o,email:s,url:i,source:a,associatedEventId:c,tags:u}=e,d={contexts:{feedback:{contact_email:s,name:o,message:r,url:i,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},l=n?.getClient()||P();return l&&l.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}const jy="ConsoleLogs",Yc={[re]:"auto.console.logging"},zy=(e={})=>{const t=e.levels||Zi;return{name:jy,setup(n){const{enableLogs:r,_experiments:o,normalizeDepth:s=3,normalizeMaxBreadth:i=1e3}=n.getOptions();if(!(r??o?.enableLogs)){M&&y.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}ga(({args:c,level:u})=>{if(P()!==n||!t.includes(u))return;if(u==="assert"){if(!c[0]){const l=c.slice(1),f=l.length>0?`Assertion failed: ${Kc(l,s,i)}`:"Assertion failed";vi({level:"error",message:f,attributes:Yc})}return}const d=u==="log";vi({level:d?"info":u,message:Kc(c,s,i),severityNumber:d?10:void 0,attributes:Yc})})}}},qy=zy;function Kc(e,t,n){return"util"in G&&typeof G.util.format=="function"?G.util.format(...e):Gy(e,t,n)}function Gy(e,t,n){return e.map(r=>Nn(r)?String(r):JSON.stringify(Ge(r,t,n))).join(" ")}function Xd(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Bn=G;function Vy(){return"history"in Bn&&!!Bn.history}function Yy(){if(!("fetch"in Bn))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Ti(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Jd(){if(typeof EdgeRuntime=="string")return!0;if(!Yy())return!1;if(Ti(Bn.fetch))return!0;let e=!1;const t=Bn.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Ti(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){M&&y.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Ky(){return"ReportingObserver"in Bn}function ya(e,t){const n="fetch";Gt(n,e),Vt(n,()=>Zd(void 0,t))}function Xy(e){const t="fetch-body-resolved";Gt(t,e),Vt(t,()=>Zd(Zy))}function Zd(e,t=!1){t&&!Jd()||He(G,"fetch",function(n){return function(...r){const o=new Error,{method:s,url:i}=Qy(r),a={args:r,fetchData:{method:s,url:i},startTimestamp:Ee()*1e3,virtualError:o,headers:eS(r)};return e||Ke("fetch",{...a}),n.apply(G,r).then(async c=>(e?e(c):Ke("fetch",{...a,endTimestamp:Ee()*1e3,response:c}),c),c=>{if(Ke("fetch",{...a,endTimestamp:Ee()*1e3,error:c}),St(c)&&c.stack===void 0&&(c.stack=o.stack,je(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(a.fetchData.url);c.message=`${c.message} (${u.host})`}catch{}throw c})}})}async function Jy(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let s=!0;for(;s;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(i),a&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(i)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function Zy(e){let t;try{t=e.clone()}catch{return}Jy(t,()=>{Ke("fetch-body-resolved",{endTimestamp:Ee()*1e3,response:e})})}function Ii(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Xc(e){return typeof e=="string"?e:e?Ii(e,"url")?e.url:e.toString?e.toString():"":""}function Qy(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Xc(n),method:Ii(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Xc(t),method:Ii(t,"method")?String(t.method).toUpperCase():"GET"}}function eS(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Al(t))return new Headers(t.headers)}catch{}}function tS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qd={exports:{}},xe=Qd.exports={},ut,lt;function ki(){throw new Error("setTimeout has not been defined")}function Ri(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ut=setTimeout:ut=ki}catch{ut=ki}try{typeof clearTimeout=="function"?lt=clearTimeout:lt=Ri}catch{lt=Ri}})();function ef(e){if(ut===setTimeout)return setTimeout(e,0);if((ut===ki||!ut)&&setTimeout)return ut=setTimeout,setTimeout(e,0);try{return ut(e,0)}catch{try{return ut.call(null,e,0)}catch{return ut.call(this,e,0)}}}function nS(e){if(lt===clearTimeout)return clearTimeout(e);if((lt===Ri||!lt)&&clearTimeout)return lt=clearTimeout,clearTimeout(e);try{return lt(e)}catch{try{return lt.call(null,e)}catch{return lt.call(this,e)}}}var gt=[],Mn=!1,Qt,_o=-1;function rS(){!Mn||!Qt||(Mn=!1,Qt.length?gt=Qt.concat(gt):_o=-1,gt.length&&tf())}function tf(){if(!Mn){var e=ef(rS);Mn=!0;for(var t=gt.length;t;){for(Qt=gt,gt=[];++_o<t;)Qt&&Qt[_o].run();_o=-1,t=gt.length}Qt=null,Mn=!1,nS(e)}}xe.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];gt.push(new nf(e,t)),gt.length===1&&!Mn&&ef(tf)};function nf(e,t){this.fun=e,this.array=t}nf.prototype.run=function(){this.fun.apply(null,this.array)};xe.title="browser";xe.browser=!0;xe.env={};xe.argv=[];xe.version="";xe.versions={};function At(){}xe.on=At;xe.addListener=At;xe.once=At;xe.off=At;xe.removeListener=At;xe.removeAllListeners=At;xe.emit=At;xe.prependListener=At;xe.prependOnceListener=At;xe.listeners=function(e){return[]};xe.binding=function(e){throw new Error("process.binding is not supported")};xe.cwd=function(){return"/"};xe.chdir=function(e){throw new Error("process.chdir is not supported")};xe.umask=function(){return 0};var oS=Qd.exports;const Jc=tS(oS);function sS(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function iS(){return"npm"}function aS(){return!sS()&&Object.prototype.toString.call(typeof Jc<"u"?Jc:0)==="[object process]"}function Ci(){return typeof window<"u"&&(!aS()||cS())}function cS(){return G.process?.type==="renderer"}const et=G,fe=et.document,ar=et.navigator,rf="Report a Bug",uS="Cancel",lS="Send Bug Report",dS="Confirm",fS="Report a Bug",pS="your.email@example.org",hS="Email",mS="What's the bug? What did you expect?",gS="Description",_S="Your Name",yS="Name",SS="Thank you for your report!",bS="(required)",ES="Add a screenshot",vS="Remove screenshot",wS="widget",TS="api",IS=5e3,of=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=P();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&K().setTags(e.tags);const r=Kd({source:TS,url:fn(),...e},t);return new Promise((o,s)=>{const i=setTimeout(()=>s("Unable to determine if Feedback was correctly sent."),3e4),a=n.on("afterSendEvent",(c,u)=>{if(c.event_id===r)return clearTimeout(i),a(),u&&typeof u.statusCode=="number"&&u.statusCode>=200&&u.statusCode<300?o(r):u&&typeof u.statusCode=="number"&&u.statusCode===0?s("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker."):u&&typeof u.statusCode=="number"&&u.statusCode===403?s("Unable to send Feedback. This could be because this domain is not in your list of allowed domains."):s("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")})})},yo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function kS(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(ar.userAgent)||/Macintosh/i.test(ar.userAgent)&&ar.maxTouchPoints&&ar.maxTouchPoints>1||!isSecureContext)}function Xr(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function RS(e){const t=fe.createElement("style");return t.textContent=`
|
|
19
|
+
.widget__actor {
|
|
20
|
+
position: fixed;
|
|
21
|
+
z-index: var(--z-index);
|
|
22
|
+
margin: var(--page-margin);
|
|
23
|
+
inset: var(--actor-inset);
|
|
24
|
+
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 8px;
|
|
28
|
+
padding: 16px;
|
|
29
|
+
|
|
30
|
+
font-family: inherit;
|
|
31
|
+
font-size: var(--font-size);
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
line-height: 1.14em;
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
|
|
36
|
+
background: var(--actor-background, var(--background));
|
|
37
|
+
border-radius: var(--actor-border-radius, 1.7em/50%);
|
|
38
|
+
border: var(--actor-border, var(--border));
|
|
39
|
+
box-shadow: var(--actor-box-shadow, var(--box-shadow));
|
|
40
|
+
color: var(--actor-color, var(--foreground));
|
|
41
|
+
fill: var(--actor-color, var(--foreground));
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
opacity: 1;
|
|
44
|
+
transition: transform 0.2s ease-in-out;
|
|
45
|
+
transform: translate(0, 0) scale(1);
|
|
46
|
+
}
|
|
47
|
+
.widget__actor[aria-hidden="true"] {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
visibility: hidden;
|
|
51
|
+
transform: translate(0, 16px) scale(0.98);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.widget__actor:hover {
|
|
55
|
+
background: var(--actor-hover-background, var(--background));
|
|
56
|
+
filter: var(--interactive-filter);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.widget__actor svg {
|
|
60
|
+
width: 1.14em;
|
|
61
|
+
height: 1.14em;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@media (max-width: 600px) {
|
|
65
|
+
.widget__actor span {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`,e&&t.setAttribute("nonce",e),t}function Ye(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const Sn=20,CS="http://www.w3.org/2000/svg";function xS(){const e=a=>et.document.createElementNS(CS,a),t=Ye(e("svg"),{width:`${Sn}`,height:`${Sn}`,viewBox:`0 0 ${Sn} ${Sn}`,fill:"var(--actor-color, var(--foreground))"}),n=Ye(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Ye(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const o=e("defs"),s=Ye(e("clipPath"),{id:"clip0_57_80"}),i=Ye(e("rect"),{width:`${Sn}`,height:`${Sn}`,fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}function MS({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const o=fe.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||rf,o.appendChild(xS()),e){const i=fe.createElement("span");i.appendChild(fe.createTextNode(e)),o.appendChild(i)}const s=RS(r);return{el:o,appendToDom(){n.appendChild(s),n.appendChild(o)},removeFromDom(){o.remove(),s.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}const sf="rgba(88, 74, 192, 1)",AS={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:sf,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%)"},Zc={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:sf,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 Qc(e){return`
|
|
70
|
+
--foreground: ${e.foreground};
|
|
71
|
+
--background: ${e.background};
|
|
72
|
+
--accent-foreground: ${e.accentForeground};
|
|
73
|
+
--accent-background: ${e.accentBackground};
|
|
74
|
+
--success-color: ${e.successColor};
|
|
75
|
+
--error-color: ${e.errorColor};
|
|
76
|
+
--border: ${e.border};
|
|
77
|
+
--box-shadow: ${e.boxShadow};
|
|
78
|
+
--outline: ${e.outline};
|
|
79
|
+
--interactive-filter: ${e.interactiveFilter};
|
|
80
|
+
`}function OS({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const o=fe.createElement("style");return o.textContent=`
|
|
81
|
+
:host {
|
|
82
|
+
--font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
|
|
83
|
+
--font-size: 14px;
|
|
84
|
+
--z-index: 100000;
|
|
85
|
+
|
|
86
|
+
--page-margin: 16px;
|
|
87
|
+
--inset: auto 0 0 auto;
|
|
88
|
+
--actor-inset: var(--inset);
|
|
89
|
+
|
|
90
|
+
font-family: var(--font-family);
|
|
91
|
+
font-size: var(--font-size);
|
|
92
|
+
|
|
93
|
+
${e!=="system"?"color-scheme: only light;":""}
|
|
94
|
+
|
|
95
|
+
${Qc(e==="dark"?{...Zc,...t}:{...AS,...n})}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
${e==="system"?`
|
|
99
|
+
@media (prefers-color-scheme: dark) {
|
|
100
|
+
:host {
|
|
101
|
+
${Qc({...Zc,...t})}
|
|
102
|
+
}
|
|
103
|
+
}`:""}
|
|
104
|
+
}
|
|
105
|
+
`,r&&o.setAttribute("nonce",r),o}const af=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:o="sentry-feedback",autoInject:s=!0,showBranding:i=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:d=!0,enableScreenshot:l=!0,useSentryUser:f={email:"email",name:"username"},tags:p,styleNonce:h,scriptNonce:g,colorScheme:_="system",themeLight:b={},themeDark:v={},addScreenshotButtonLabel:C=ES,cancelButtonLabel:k=uS,confirmButtonLabel:S=dS,emailLabel:E=hS,emailPlaceholder:R=pS,formTitle:A=fS,isRequiredLabel:w=bS,messageLabel:x=gS,messagePlaceholder:B=mS,nameLabel:I=yS,namePlaceholder:O=_S,removeScreenshotButtonLabel:U=vS,submitButtonLabel:F=lS,successMessageText:L=SS,triggerLabel:N=rf,triggerAriaLabel:D="",onFormOpen:Y,onFormClose:J,onSubmitSuccess:m,onSubmitError:T,onFormSubmitted:H}={})=>{const z={id:o,autoInject:s,showBranding:i,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:d,enableScreenshot:l,useSentryUser:f,tags:p,styleNonce:h,scriptNonce:g,colorScheme:_,themeDark:v,themeLight:b,triggerLabel:N,triggerAriaLabel:D,cancelButtonLabel:k,submitButtonLabel:F,confirmButtonLabel:S,formTitle:A,emailLabel:E,emailPlaceholder:R,messageLabel:x,messagePlaceholder:B,nameLabel:I,namePlaceholder:O,successMessageText:L,isRequiredLabel:w,addScreenshotButtonLabel:C,removeScreenshotButtonLabel:U,onFormClose:J,onFormOpen:Y,onSubmitError:T,onSubmitSuccess:m,onFormSubmitted:H};let Z=null,ae=[];const me=be=>{if(!Z){const Pe=fe.createElement("div");Pe.id=String(be.id),fe.body.appendChild(Pe),Z=Pe.attachShadow({mode:"open"}),Z.appendChild(OS(be))}return Z},le=async be=>{const Pe=be.enableScreenshot&&kS();let it,ke;try{it=(t?t():await e("feedbackModalIntegration",g))(),bi(it)}catch{throw yo&&y.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const at=Pe?n?n():await e("feedbackScreenshotIntegration",g):void 0;at&&(ke=at(),bi(ke))}catch{yo&&y.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const Ae=it.createDialog({options:{...be,onFormClose:()=>{Ae?.close(),be.onFormClose?.()},onFormSubmitted:()=>{Ae?.close(),be.onFormSubmitted?.()}},screenshotIntegration:ke,sendFeedback:of,shadow:me(be)});return Ae},de=(be,Pe={})=>{const it=Xr(z,Pe),ke=typeof be=="string"?fe.querySelector(be):typeof be.addEventListener=="function"?be:null;if(!ke)throw yo&&y.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let Ae=null;const at=async()=>{Ae||(Ae=await le({...it,onFormSubmitted:()=>{Ae?.removeFromDom(),it.onFormSubmitted?.()}})),Ae.appendToDom(),Ae.open()};ke.addEventListener("click",at);const Kt=()=>{ae=ae.filter(yn=>yn!==Kt),Ae?.removeFromDom(),Ae=null,ke.removeEventListener("click",at)};return ae.push(Kt),Kt},Me=(be={})=>{const Pe=Xr(z,be),it=me(Pe),ke=MS({triggerLabel:Pe.triggerLabel,triggerAriaLabel:Pe.triggerAriaLabel,shadow:it,styleNonce:h});return de(ke.el,{...Pe,onFormOpen(){ke.hide()},onFormClose(){ke.show()},onFormSubmitted(){ke.show()}}),ke};return{name:"Feedback",setupOnce(){!Ci()||!z.autoInject||(fe.readyState==="loading"?fe.addEventListener("DOMContentLoaded",()=>Me().appendToDom()):Me().appendToDom())},attachTo:de,createWidget(be={}){const Pe=Me(Xr(z,be));return Pe.appendToDom(),Pe},async createForm(be={}){return le(Xr(z,be))},remove(){Z&&(Z.parentElement?.remove(),Z=null),ae.forEach(be=>be()),ae=[]}}};function NS(){return P()?.getIntegrationByName("Feedback")}var fs,he,cf,Zt,eu,uf,xi,gr={},Sa=[],LS=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ba=Array.isArray;function Dt(e,t){for(var n in t)e[n]=t[n];return e}function lf(e){var t=e.parentNode;t&&t.removeChild(e)}function ee(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?fs.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return So(e,i,r,o,null)}function So(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++cf,__i:-1,__u:0};return o==null&&he.vnode!=null&&he.vnode(s),s}function Pr(e){return e.children}function bo(e,t){this.props=e,this.context=t}function Un(e,t){if(t==null)return e.__?Un(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Un(e):null}function PS(e,t,n){var r,o=e.__v,s=o.__e,i=e.__P;if(i)return(r=Dt({},o)).__v=o.__v+1,he.vnode&&he.vnode(r),Ea(i,r,o,e.__n,i.ownerSVGElement!==void 0,32&o.__u?[s]:null,t,s??Un(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=s&&df(r),r}function df(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return df(e)}}function tu(e){(!e.__d&&(e.__d=!0)&&Zt.push(e)&&!Ho.__r++||eu!==he.debounceRendering)&&((eu=he.debounceRendering)||uf)(Ho)}function Ho(){var e,t,n,r=[],o=[];for(Zt.sort(xi);e=Zt.shift();)e.__d&&(n=Zt.length,t=PS(e,r,o)||t,n===0||Zt.length>n?(Mi(r,t,o),o.length=r.length=0,t=void 0,Zt.sort(xi)):t&&he.__c&&he.__c(t,Sa));t&&Mi(r,t,o),Ho.__r=0}function ff(e,t,n,r,o,s,i,a,c,u,d){var l,f,p,h,g,_=r&&r.__k||Sa,b=t.length;for(n.__d=c,DS(n,t,_),c=n.__d,l=0;l<b;l++)(p=n.__k[l])!=null&&typeof p!="boolean"&&typeof p!="function"&&(f=p.__i===-1?gr:_[p.__i]||gr,p.__i=l,Ea(e,p,f,o,s,i,a,c,u,d),h=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&va(f.ref,null,p),d.push(p.ref,p.__c||h,p)),g==null&&h!=null&&(g=h),65536&p.__u||f.__k===p.__k?c=pf(p,c,e):typeof p.type=="function"&&p.__d!==void 0?c=p.__d:h&&(c=h.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=g}function DS(e,t,n){var r,o,s,i,a,c=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?So(null,o,null,null,o):ba(o)?So(Pr,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?So(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=FS(o,n,i=r+l,d),o.__i=a,s=null,a!==-1&&(d--,(s=n[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&l--,typeof o.type!="function"&&(o.__u|=65536)):a!==i&&(a===i+1?l++:a>i?d>c-i?l+=a-i:l--:l=a<i&&a==i-1?a-i:0,a!==r+l&&(o.__u|=65536))):(s=n[r])&&s.key==null&&s.__e&&(s.__e==e.__d&&(e.__d=Un(s)),Ai(s,s,!1),n[r]=null,d--);if(d)for(r=0;r<u;r++)(s=n[r])!=null&&(131072&s.__u)==0&&(s.__e==e.__d&&(e.__d=Un(s)),Ai(s,s))}function pf(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=pf(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function FS(e,t,n,r){var o=e.key,s=e.type,i=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&s===c.type)return n;if(r>(c!=null&&(131072&c.__u)==0?1:0))for(;i>=0||a<t.length;){if(i>=0){if((c=t[i])&&(131072&c.__u)==0&&o==c.key&&s===c.type)return i;i--}if(a<t.length){if((c=t[a])&&(131072&c.__u)==0&&o==c.key&&s===c.type)return a;a++}}return-1}function nu(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||LS.test(t)?n:n+"px"}function Jr(e,t,n,r,o){var s;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||nu(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||nu(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")s=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,s?ou:ru,s)):e.removeEventListener(t,s?ou:ru,s);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function ru(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(he.event?he.event(e):e)}}function ou(e){if(this.l)return this.l[e.type+!0](he.event?he.event(e):e)}function Ea(e,t,n,r,o,s,i,a,c,u){var d,l,f,p,h,g,_,b,v,C,k,S,E,R,A,w=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=t.__e=n.__e]),(d=he.__b)&&d(t);e:if(typeof w=="function")try{if(b=t.props,v=(d=w.contextType)&&r[d.__c],C=d?v?v.props.value:d.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:("prototype"in w&&w.prototype.render?t.__c=l=new w(b,C):(t.__c=l=new bo(b,C),l.constructor=w,l.render=BS),v&&v.sub(l),l.props=b,l.state||(l.state={}),l.context=C,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),w.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Dt({},l.__s)),Dt(l.__s,w.getDerivedStateFromProps(b,l.__s))),p=l.props,h=l.state,l.__v=t,f)w.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(w.getDerivedStateFromProps==null&&b!==p&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(b,C),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(b,l.__s,C)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=b,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(x){x&&(x.__=t)}),k=0;k<l._sb.length;k++)l.__h.push(l._sb[k]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(b,l.__s,C),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(p,h,g)})}if(l.context=C,l.props=b,l.__P=e,l.__e=!1,S=he.__r,E=0,"prototype"in w&&w.prototype.render){for(l.state=l.__s,l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),R=0;R<l._sb.length;R++)l.__h.push(l._sb[R]);l._sb=[]}else do l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++E<25);l.state=l.__s,l.getChildContext!=null&&(r=Dt(Dt({},r),l.getChildContext())),f||l.getSnapshotBeforeUpdate==null||(g=l.getSnapshotBeforeUpdate(p,h)),ff(e,ba(A=d!=null&&d.type===Pr&&d.key==null?d.props.children:d)?A:[A],t,n,r,o,s,i,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),_&&(l.__E=l.__=null)}catch(x){t.__v=null,c||s!=null?(t.__e=a,t.__u|=c?160:32,s[s.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),he.__e(x,t,n)}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=$S(n.__e,t,n,r,o,s,i,c,u);(d=he.diffed)&&d(t)}function Mi(e,t,n){for(var r=0;r<n.length;r++)va(n[r],n[++r],n[++r]);he.__c&&he.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){he.__e(s,o.__v)}})}function $S(e,t,n,r,o,s,i,a,c){var u,d,l,f,p,h,g,_=n.props,b=t.props,v=t.type;if(v==="svg"&&(o=!0),s!=null){for(u=0;u<s.length;u++)if((p=s[u])&&"setAttribute"in p==!!v&&(v?p.localName===v:p.nodeType===3)){e=p,s[u]=null;break}}if(e==null){if(v===null)return document.createTextNode(b);e=o?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,b.is&&b),s=null,a=!1}if(v===null)_===b||a&&e.data===b||(e.data=b);else{if(s=s&&fs.call(e.childNodes),_=n.props||gr,!a&&s!=null)for(_={},u=0;u<e.attributes.length;u++)_[(p=e.attributes[u]).name]=p.value;for(u in _)p=_[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=p:u==="key"||u in b||Jr(e,u,null,p,o));for(u in b)p=b[u],u=="children"?f=p:u=="dangerouslySetInnerHTML"?d=p:u=="value"?h=p:u=="checked"?g=p:u==="key"||a&&typeof p!="function"||_[u]===p||Jr(e,u,p,_[u],o);if(d)a||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),ff(e,ba(f)?f:[f],t,n,r,o&&v!=="foreignObject",s,i,s?s[0]:n.__k&&Un(n,0),a,c),s!=null)for(u=s.length;u--;)s[u]!=null&&lf(s[u]);a||(u="value",h!==void 0&&(h!==e[u]||v==="progress"&&!h||v==="option"&&h!==_[u])&&Jr(e,u,h,_[u],!1),u="checked",g!==void 0&&g!==e[u]&&Jr(e,u,g,_[u],!1))}return e}function va(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){he.__e(r,n)}}function Ai(e,t,n){var r,o;if(he.unmount&&he.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||va(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){he.__e(s,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Ai(r[o],t,n||typeof e.type!="function");n||e.__e==null||lf(e.__e),e.__=e.__e=e.__d=void 0}function BS(e,t,n){return this.constructor(e,n)}function US(e,t,n){var r,o,s,i;he.__&&he.__(e,t),o=(r=!1)?null:t.__k,s=[],i=[],Ea(t,e=t.__k=ee(Pr,null,[e]),o||gr,gr,t.ownerSVGElement!==void 0,o?null:t.firstChild?fs.call(t.childNodes):null,s,o?o.__e:t.firstChild,r,i),e.__d=void 0,Mi(s,e,i)}fs=Sa.slice,he={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},cf=0,bo.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Dt({},this.state),typeof e=="function"&&(e=e(Dt({},n),this.props)),e&&Dt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),tu(this))},bo.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tu(this))},bo.prototype.render=Pr,Zt=[],uf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,xi=function(e,t){return e.__v.__b-t.__v.__b},Ho.__r=0;var Rt,pe,Ws,su,Hn=0,hf=[],Eo=[],ve=he,iu=ve.__b,au=ve.__r,cu=ve.diffed,uu=ve.__c,lu=ve.unmount,du=ve.__;function gn(e,t){ve.__h&&ve.__h(pe,e,Hn||t),Hn=0;var n=pe.__H||(pe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Eo}),n.__[e]}function en(e){return Hn=1,mf(_f,e)}function mf(e,t,n){var r=gn(Rt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):_f(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=pe,!pe.u)){var o=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return!!f.__c});if(d.every(function(f){return!f.__N}))return!s||s.call(this,a,c,u);var l=!1;return d.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!s||s.call(this,a,c,u))};pe.u=!0;var s=pe.shouldComponentUpdate,i=pe.componentWillUpdate;pe.componentWillUpdate=function(a,c,u){if(this.__e){var d=s;s=void 0,o(a,c,u),s=d}i&&i.call(this,a,c,u)},pe.shouldComponentUpdate=o}return r.__N||r.__}function HS(e,t){var n=gn(Rt++,3);!ve.__s&&wa(n.__H,t)&&(n.__=e,n.i=t,pe.__H.__h.push(n))}function gf(e,t){var n=gn(Rt++,4);!ve.__s&&wa(n.__H,t)&&(n.__=e,n.i=t,pe.__h.push(n))}function WS(e){return Hn=5,Dr(function(){return{current:e}},[])}function jS(e,t,n){Hn=6,gf(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function Dr(e,t){var n=gn(Rt++,7);return wa(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function An(e,t){return Hn=8,Dr(function(){return e},t)}function zS(e){var t=pe.context[e.__c],n=gn(Rt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(pe)),t.props.value):e.__}function qS(e,t){ve.useDebugValue&&ve.useDebugValue(t?t(e):e)}function GS(e){var t=gn(Rt++,10),n=en();return t.__=e,pe.componentDidCatch||(pe.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function VS(){var e=gn(Rt++,11);if(!e.__){for(var t=pe.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function YS(){for(var e;e=hf.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(vo),e.__H.__h.forEach(Oi),e.__H.__h=[]}catch(t){e.__H.__h=[],ve.__e(t,e.__v)}}ve.__b=function(e){pe=null,iu&&iu(e)},ve.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),du&&du(e,t)},ve.__r=function(e){au&&au(e),Rt=0;var t=(pe=e.__c).__H;t&&(Ws===pe?(t.__h=[],pe.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Eo,n.__N=n.i=void 0})):(t.__h.forEach(vo),t.__h.forEach(Oi),t.__h=[],Rt=0)),Ws=pe},ve.diffed=function(e){cu&&cu(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(hf.push(t)!==1&&su===ve.requestAnimationFrame||((su=ve.requestAnimationFrame)||KS)(YS)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Eo&&(n.__=n.__V),n.i=void 0,n.__V=Eo})),Ws=pe=null},ve.__c=function(e,t){t.some(function(n){try{n.__h.forEach(vo),n.__h=n.__h.filter(function(r){return!r.__||Oi(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],ve.__e(r,n.__v)}}),uu&&uu(e,t)},ve.unmount=function(e){lu&&lu(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{vo(r)}catch(o){t=o}}),n.__H=void 0,t&&ve.__e(t,n.__v))};var fu=typeof requestAnimationFrame=="function";function KS(e){var t,n=function(){clearTimeout(r),fu&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);fu&&(t=requestAnimationFrame(n))}function vo(e){var t=pe,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),pe=t}function Oi(e){var t=pe;e.__c=e.__(),pe=t}function wa(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function _f(e,t){return typeof t=="function"?t(e):t}const XS=Object.defineProperty({__proto__:null,useCallback:An,useContext:zS,useDebugValue:qS,useEffect:HS,useErrorBoundary:GS,useId:VS,useImperativeHandle:jS,useLayoutEffect:gf,useMemo:Dr,useReducer:mf,useRef:WS,useState:en},Symbol.toStringTag,{value:"Module"}),JS="http://www.w3.org/2000/svg";function ZS(){const e=r=>fe.createElementNS(JS,r),t=Ye(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Ye(e("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"});return t.appendChild(n),t}function QS({options:e}){const t=Dr(()=>({__html:ZS().outerHTML}),[]);return ee("h2",{class:"dialog__header"},ee("span",{class:"dialog__title"},e.formTitle),e.showBranding?ee("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function eb(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function js(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function tb({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail:a,showName:c,screenshotInput:u}){const{tags:d,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:f,cancelButtonLabel:p,emailLabel:h,emailPlaceholder:g,isEmailRequired:_,isNameRequired:b,messageLabel:v,messagePlaceholder:C,nameLabel:k,namePlaceholder:S,submitButtonLabel:E,isRequiredLabel:R}=e,[A,w]=en(!1),[x,B]=en(null),[I,O]=en(!1),U=u?.input,[F,L]=en(null),N=An(J=>{L(J),O(!1)},[]),D=An(J=>{const m=eb(J,{emailLabel:h,isEmailRequired:_,isNameRequired:b,messageLabel:v,nameLabel:k});return m.length>0?B(`Please enter in the following required fields: ${m.join(", ")}`):B(null),m.length===0},[h,_,b,v,k]),Y=An(async J=>{w(!0);try{if(J.preventDefault(),!(J.target instanceof HTMLFormElement))return;const m=new FormData(J.target),T=await(u&&I?u.value():void 0),H={name:js(m,"name"),email:js(m,"email"),message:js(m,"message"),attachments:T?[T]:void 0};if(!D(H))return;try{const z=await o({name:H.name,email:H.email,message:H.message,source:wS,tags:d},{attachments:H.attachments});s(H,z)}catch(z){yo&&y.error(z),B(z),i(z)}}finally{w(!1)}},[u&&I,s,i]);return ee("form",{class:"form",onSubmit:Y},U&&I?ee(U,{onError:N}):null,ee("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:A},ee("div",{class:"form__top"},x?ee("div",{class:"form__error-container"},x):null,c?ee("label",{for:"name",class:"form__label"},ee(zs,{label:k,isRequiredLabel:R,isRequired:b}),ee("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:S,required:b,type:"text"})):ee("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?ee("label",{for:"email",class:"form__label"},ee(zs,{label:h,isRequiredLabel:R,isRequired:_}),ee("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:g,required:_,type:"email"})):ee("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),ee("label",{for:"message",class:"form__label"},ee(zs,{label:v,isRequiredLabel:R,isRequired:!0}),ee("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:C,required:!0,rows:5})),U?ee("label",{for:"screenshot",class:"form__label"},ee("button",{class:"btn btn--default",disabled:A,type:"button",onClick:()=>{L(null),O(J=>!J)}},I?f:l),F?ee("div",{class:"form__error-container"},F.message):null):null),ee("div",{class:"btn-group"},ee("button",{class:"btn btn--primary",disabled:A,type:"submit"},E),ee("button",{class:"btn btn--default",disabled:A,type:"button",onClick:r},p))))}function zs({label:e,isRequired:t,isRequiredLabel:n}){return ee("span",{class:"form__label__text"},e,t&&ee("span",{class:"form__label__text--required"},n))}const Zr=16,pu=17,nb="http://www.w3.org/2000/svg";function rb(){const e=c=>et.document.createElementNS(nb,c),t=Ye(e("svg"),{width:`${Zr}`,height:`${pu}`,viewBox:`0 0 ${Zr} ${pu}`,fill:"inherit"}),n=Ye(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Ye(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=Ye(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const s=e("defs"),i=Ye(e("clipPath"),{id:"clip0_57_156"}),a=Ye(e("rect"),{width:`${Zr}`,height:`${Zr}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function ob({open:e,onFormSubmitted:t,...n}){const r=n.options,o=Dr(()=>({__html:rb().outerHTML}),[]),[s,i]=en(null),a=An(()=>{s&&(clearTimeout(s),i(null)),t()},[s]),c=An((u,d)=>{n.onSubmitSuccess(u,d),i(setTimeout(()=>{t(),i(null)},IS))},[t]);return ee(Pr,null,s?ee("div",{class:"success__position",onClick:a},ee("div",{class:"success__content"},r.successMessageText,ee("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):ee("dialog",{class:"dialog",onClick:r.onFormClose,open:e},ee("div",{class:"dialog__position"},ee("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},ee(QS,{options:r}),ee(tb,{...n,onSubmitSuccess:c})))))}const sb=`
|
|
106
|
+
.dialog {
|
|
107
|
+
position: fixed;
|
|
108
|
+
z-index: var(--z-index);
|
|
109
|
+
margin: 0;
|
|
110
|
+
inset: 0;
|
|
111
|
+
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
padding: 0;
|
|
116
|
+
height: 100vh;
|
|
117
|
+
width: 100vw;
|
|
118
|
+
|
|
119
|
+
color: var(--dialog-color, var(--foreground));
|
|
120
|
+
fill: var(--dialog-color, var(--foreground));
|
|
121
|
+
line-height: 1.75em;
|
|
122
|
+
|
|
123
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
124
|
+
border: none;
|
|
125
|
+
inset: 0;
|
|
126
|
+
opacity: 1;
|
|
127
|
+
transition: opacity 0.2s ease-in-out;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.dialog__position {
|
|
131
|
+
position: fixed;
|
|
132
|
+
z-index: var(--z-index);
|
|
133
|
+
inset: var(--dialog-inset);
|
|
134
|
+
padding: var(--page-margin);
|
|
135
|
+
display: flex;
|
|
136
|
+
max-height: calc(100vh - (2 * var(--page-margin)));
|
|
137
|
+
}
|
|
138
|
+
@media (max-width: 600px) {
|
|
139
|
+
.dialog__position {
|
|
140
|
+
inset: var(--page-margin);
|
|
141
|
+
padding: 0;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.dialog__position:has(.editor) {
|
|
146
|
+
inset: var(--page-margin);
|
|
147
|
+
padding: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.dialog:not([open]) {
|
|
151
|
+
opacity: 0;
|
|
152
|
+
pointer-events: none;
|
|
153
|
+
visibility: hidden;
|
|
154
|
+
}
|
|
155
|
+
.dialog:not([open]) .dialog__content {
|
|
156
|
+
transform: translate(0, -16px) scale(0.98);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.dialog__content {
|
|
160
|
+
display: flex;
|
|
161
|
+
flex-direction: column;
|
|
162
|
+
gap: 16px;
|
|
163
|
+
padding: var(--dialog-padding, 24px);
|
|
164
|
+
max-width: 100%;
|
|
165
|
+
width: 100%;
|
|
166
|
+
max-height: 100%;
|
|
167
|
+
overflow: auto;
|
|
168
|
+
|
|
169
|
+
background: var(--dialog-background, var(--background));
|
|
170
|
+
border-radius: var(--dialog-border-radius, 20px);
|
|
171
|
+
border: var(--dialog-border, var(--border));
|
|
172
|
+
box-shadow: var(--dialog-box-shadow, var(--box-shadow));
|
|
173
|
+
transform: translate(0, 0) scale(1);
|
|
174
|
+
transition: transform 0.2s ease-in-out;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
`,ib=`
|
|
178
|
+
.dialog__header {
|
|
179
|
+
display: flex;
|
|
180
|
+
gap: 4px;
|
|
181
|
+
justify-content: space-between;
|
|
182
|
+
font-weight: var(--dialog-header-weight, 600);
|
|
183
|
+
margin: 0;
|
|
184
|
+
}
|
|
185
|
+
.dialog__title {
|
|
186
|
+
align-self: center;
|
|
187
|
+
width: var(--form-width, 272px);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@media (max-width: 600px) {
|
|
191
|
+
.dialog__title {
|
|
192
|
+
width: auto;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.dialog__position:has(.editor) .dialog__title {
|
|
197
|
+
width: auto;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
.brand-link {
|
|
202
|
+
display: inline-flex;
|
|
203
|
+
}
|
|
204
|
+
.brand-link:focus-visible {
|
|
205
|
+
outline: var(--outline);
|
|
206
|
+
}
|
|
207
|
+
`,ab=`
|
|
208
|
+
.form {
|
|
209
|
+
display: flex;
|
|
210
|
+
overflow: auto;
|
|
211
|
+
flex-direction: row;
|
|
212
|
+
gap: 16px;
|
|
213
|
+
flex: 1 0;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.form fieldset {
|
|
217
|
+
border: none;
|
|
218
|
+
margin: 0;
|
|
219
|
+
padding: 0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.form__right {
|
|
223
|
+
flex: 0 0 auto;
|
|
224
|
+
display: flex;
|
|
225
|
+
overflow: auto;
|
|
226
|
+
flex-direction: column;
|
|
227
|
+
justify-content: space-between;
|
|
228
|
+
gap: 20px;
|
|
229
|
+
width: var(--form-width, 100%);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.dialog__position:has(.editor) .form__right {
|
|
233
|
+
width: var(--form-width, 272px);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.form__top {
|
|
237
|
+
display: flex;
|
|
238
|
+
flex-direction: column;
|
|
239
|
+
gap: 8px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.form__error-container {
|
|
243
|
+
color: var(--error-color);
|
|
244
|
+
fill: var(--error-color);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.form__label {
|
|
248
|
+
display: flex;
|
|
249
|
+
flex-direction: column;
|
|
250
|
+
gap: 4px;
|
|
251
|
+
margin: 0px;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.form__label__text {
|
|
255
|
+
display: flex;
|
|
256
|
+
gap: 4px;
|
|
257
|
+
align-items: center;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.form__label__text--required {
|
|
261
|
+
font-size: 0.85em;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.form__input {
|
|
265
|
+
font-family: inherit;
|
|
266
|
+
line-height: inherit;
|
|
267
|
+
background: transparent;
|
|
268
|
+
box-sizing: border-box;
|
|
269
|
+
border: var(--input-border, var(--border));
|
|
270
|
+
border-radius: var(--input-border-radius, 6px);
|
|
271
|
+
color: var(--input-color, inherit);
|
|
272
|
+
fill: var(--input-color, inherit);
|
|
273
|
+
font-size: var(--input-font-size, inherit);
|
|
274
|
+
font-weight: var(--input-font-weight, 500);
|
|
275
|
+
padding: 6px 12px;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.form__input::placeholder {
|
|
279
|
+
opacity: 0.65;
|
|
280
|
+
color: var(--input-placeholder-color, inherit);
|
|
281
|
+
filter: var(--interactive-filter);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.form__input:focus-visible {
|
|
285
|
+
outline: var(--input-focus-outline, var(--outline));
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.form__input--textarea {
|
|
289
|
+
font-family: inherit;
|
|
290
|
+
resize: vertical;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.error {
|
|
294
|
+
color: var(--error-color);
|
|
295
|
+
fill: var(--error-color);
|
|
296
|
+
}
|
|
297
|
+
`,cb=`
|
|
298
|
+
.btn-group {
|
|
299
|
+
display: grid;
|
|
300
|
+
gap: 8px;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.btn {
|
|
304
|
+
line-height: inherit;
|
|
305
|
+
border: var(--button-border, var(--border));
|
|
306
|
+
border-radius: var(--button-border-radius, 6px);
|
|
307
|
+
cursor: pointer;
|
|
308
|
+
font-family: inherit;
|
|
309
|
+
font-size: var(--button-font-size, inherit);
|
|
310
|
+
font-weight: var(--button-font-weight, 600);
|
|
311
|
+
padding: var(--button-padding, 6px 16px);
|
|
312
|
+
}
|
|
313
|
+
.btn[disabled] {
|
|
314
|
+
opacity: 0.6;
|
|
315
|
+
pointer-events: none;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.btn--primary {
|
|
319
|
+
color: var(--button-primary-color, var(--accent-foreground));
|
|
320
|
+
fill: var(--button-primary-color, var(--accent-foreground));
|
|
321
|
+
background: var(--button-primary-background, var(--accent-background));
|
|
322
|
+
border: var(--button-primary-border, var(--border));
|
|
323
|
+
border-radius: var(--button-primary-border-radius, 6px);
|
|
324
|
+
font-weight: var(--button-primary-font-weight, 500);
|
|
325
|
+
}
|
|
326
|
+
.btn--primary:hover {
|
|
327
|
+
color: var(--button-primary-hover-color, var(--accent-foreground));
|
|
328
|
+
fill: var(--button-primary-hover-color, var(--accent-foreground));
|
|
329
|
+
background: var(--button-primary-hover-background, var(--accent-background));
|
|
330
|
+
filter: var(--interactive-filter);
|
|
331
|
+
}
|
|
332
|
+
.btn--primary:focus-visible {
|
|
333
|
+
background: var(--button-primary-hover-background, var(--accent-background));
|
|
334
|
+
filter: var(--interactive-filter);
|
|
335
|
+
outline: var(--button-primary-focus-outline, var(--outline));
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.btn--default {
|
|
339
|
+
color: var(--button-color, var(--foreground));
|
|
340
|
+
fill: var(--button-color, var(--foreground));
|
|
341
|
+
background: var(--button-background, var(--background));
|
|
342
|
+
border: var(--button-border, var(--border));
|
|
343
|
+
border-radius: var(--button-border-radius, 6px);
|
|
344
|
+
font-weight: var(--button-font-weight, 500);
|
|
345
|
+
}
|
|
346
|
+
.btn--default:hover {
|
|
347
|
+
color: var(--button-color, var(--foreground));
|
|
348
|
+
fill: var(--button-color, var(--foreground));
|
|
349
|
+
background: var(--button-hover-background, var(--background));
|
|
350
|
+
filter: var(--interactive-filter);
|
|
351
|
+
}
|
|
352
|
+
.btn--default:focus-visible {
|
|
353
|
+
background: var(--button-hover-background, var(--background));
|
|
354
|
+
filter: var(--interactive-filter);
|
|
355
|
+
outline: var(--button-focus-outline, var(--outline));
|
|
356
|
+
}
|
|
357
|
+
`,ub=`
|
|
358
|
+
.success__position {
|
|
359
|
+
position: fixed;
|
|
360
|
+
inset: var(--dialog-inset);
|
|
361
|
+
padding: var(--page-margin);
|
|
362
|
+
z-index: var(--z-index);
|
|
363
|
+
}
|
|
364
|
+
.success__content {
|
|
365
|
+
background: var(--success-background, var(--background));
|
|
366
|
+
border: var(--success-border, var(--border));
|
|
367
|
+
border-radius: var(--success-border-radius, 1.7em/50%);
|
|
368
|
+
box-shadow: var(--success-box-shadow, var(--box-shadow));
|
|
369
|
+
font-weight: var(--success-font-weight, 600);
|
|
370
|
+
color: var(--success-color);
|
|
371
|
+
fill: var(--success-color);
|
|
372
|
+
padding: 12px 24px;
|
|
373
|
+
line-height: 1.75em;
|
|
374
|
+
|
|
375
|
+
display: grid;
|
|
376
|
+
align-items: center;
|
|
377
|
+
grid-auto-flow: column;
|
|
378
|
+
gap: 6px;
|
|
379
|
+
cursor: default;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.success__icon {
|
|
383
|
+
display: flex;
|
|
384
|
+
}
|
|
385
|
+
`;function lb(e){const t=fe.createElement("style");return t.textContent=`
|
|
386
|
+
:host {
|
|
387
|
+
--dialog-inset: var(--inset);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
${sb}
|
|
391
|
+
${ib}
|
|
392
|
+
${ab}
|
|
393
|
+
${cb}
|
|
394
|
+
${ub}
|
|
395
|
+
`,e&&t.setAttribute("nonce",e),t}function db(){const e=K().getUser(),t=Ne().getUser(),n=xr().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const fb=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=db(),a=fe.createElement("div"),c=lb(e.styleNonce);let u="";const d={get el(){return a},appendToDom(){!o.contains(c)&&!o.contains(a)&&(o.appendChild(c),o.appendChild(a))},removeFromDom(){a.remove(),c.remove(),fe.body.style.overflow=u},open(){f(!0),e.onFormOpen?.(),P()?.emit("openFeedbackWidget"),u=fe.body.style.overflow,fe.body.style.overflow="hidden"},close(){f(!1),fe.body.style.overflow=u}},l=t?.createInput({h:ee,hooks:XS,dialog:d,options:e}),f=p=>{US(ee(ob,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:s&&i?.[s.name]||"",defaultEmail:s&&i?.[s.email]||"",onFormClose:()=>{f(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(h,g)=>{f(!1),e.onSubmitSuccess?.(h,g)},onSubmitError:h=>{e.onSubmitError?.(h)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:p}),a)};return d}});function pb({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}function hb(e){const t=fe.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
|
|
396
|
+
.editor {
|
|
397
|
+
display: flex;
|
|
398
|
+
flex-grow: 1;
|
|
399
|
+
flex-direction: column;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.editor__image-container {
|
|
403
|
+
justify-items: center;
|
|
404
|
+
padding: 15px;
|
|
405
|
+
position: relative;
|
|
406
|
+
height: 100%;
|
|
407
|
+
border-radius: var(--menu-border-radius, 6px);
|
|
408
|
+
|
|
409
|
+
background-color: ${n};
|
|
410
|
+
background-image: repeating-linear-gradient(
|
|
411
|
+
-145deg,
|
|
412
|
+
transparent,
|
|
413
|
+
transparent 8px,
|
|
414
|
+
${n} 8px,
|
|
415
|
+
${n} 11px
|
|
416
|
+
),
|
|
417
|
+
repeating-linear-gradient(
|
|
418
|
+
-45deg,
|
|
419
|
+
transparent,
|
|
420
|
+
transparent 15px,
|
|
421
|
+
${r} 15px,
|
|
422
|
+
${r} 16px
|
|
423
|
+
);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.editor__canvas-container {
|
|
427
|
+
width: 100%;
|
|
428
|
+
height: 100%;
|
|
429
|
+
position: relative;
|
|
430
|
+
display: flex;
|
|
431
|
+
align-items: center;
|
|
432
|
+
justify-content: center;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.editor__canvas-container > * {
|
|
436
|
+
object-fit: contain;
|
|
437
|
+
position: absolute;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.editor__tool-container {
|
|
441
|
+
padding-top: 8px;
|
|
442
|
+
display: flex;
|
|
443
|
+
justify-content: center;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.editor__tool-bar {
|
|
447
|
+
display: flex;
|
|
448
|
+
gap: 8px;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.editor__tool {
|
|
452
|
+
display: flex;
|
|
453
|
+
padding: 8px 12px;
|
|
454
|
+
justify-content: center;
|
|
455
|
+
align-items: center;
|
|
456
|
+
border: var(--button-border, var(--border));
|
|
457
|
+
border-radius: var(--button-border-radius, 6px);
|
|
458
|
+
background: var(--button-background, var(--background));
|
|
459
|
+
color: var(--button-color, var(--foreground));
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.editor__tool--active {
|
|
463
|
+
background: var(--button-primary-background, var(--accent-background));
|
|
464
|
+
color: var(--button-primary-color, var(--accent-foreground));
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.editor__rect {
|
|
468
|
+
position: absolute;
|
|
469
|
+
z-index: 2;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.editor__rect button {
|
|
473
|
+
opacity: 0;
|
|
474
|
+
position: absolute;
|
|
475
|
+
top: -12px;
|
|
476
|
+
right: -12px;
|
|
477
|
+
cursor: pointer;
|
|
478
|
+
padding: 0;
|
|
479
|
+
z-index: 3;
|
|
480
|
+
border: none;
|
|
481
|
+
background: none;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.editor__rect:hover button {
|
|
485
|
+
opacity: 1;
|
|
486
|
+
}
|
|
487
|
+
`,e&&t.setAttribute("nonce",e),t}function mb({h:e}){return function({action:n,setAction:r}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},"Highlight"),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},"Hide")))}}function gb({hooks:e}){function t(){const[n,r]=e.useState(et.devicePixelRatio??1);return e.useEffect(()=>{const o=()=>{r(et.devicePixelRatio)},s=matchMedia(`(resolution: ${et.devicePixelRatio}dppx)`);return s.addEventListener("change",o),()=>{s.removeEventListener("change",o)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:o,onAfterScreenshot:s,onError:i}){const a=t();e.useEffect(()=>{(async()=>{r();const u=await ar.mediaDevices.getDisplayMedia({video:{width:et.innerWidth*a,height:et.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),d=fe.createElement("video");await new Promise((l,f)=>{d.srcObject=u,d.onloadedmetadata=()=>{o(d,a),u.getTracks().forEach(p=>p.stop()),l()},d.play().catch(f)}),s()})().catch(i)},[])}}function _b(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function Nt(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function qs(e,t){Nt(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function Gs(e,t,n){Nt(e,{alpha:!0},(r,o)=>{n.length&&(o.fillStyle="rgba(0, 0, 0, 0.25)",o.fillRect(0,0,r.width,r.height)),n.forEach(s=>{_b(s,o,t)})})}function yb({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=gb({hooks:t}),i=mb({h:e}),a=pb({h:e}),c={__html:hb(o.styleNonce).innerText},u=r.el.style,d=({screenshot:l})=>{const[f,p]=t.useState("highlight"),[h,g]=t.useState([]),_=t.useRef(null),b=t.useRef(null),v=t.useRef(null),C=t.useRef(null),[k,S]=t.useState(1),E=t.useMemo(()=>{const I=fe.getElementById(o.id);if(!I)return"white";const O=getComputedStyle(I);return O.getPropertyValue("--button-primary-background")||O.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const I=()=>{const O=_.current;O&&(Nt(l.canvas,{alpha:!1},U=>{const F=Math.min(O.clientWidth/U.width,O.clientHeight/U.height);S(F)}),(O.clientHeight===0||O.clientWidth===0)&&setTimeout(I,0))};return I(),et.addEventListener("resize",I),()=>{et.removeEventListener("resize",I)}},[l]);const R=t.useCallback((I,O)=>{Nt(I,{alpha:!0},(U,F)=>{F.scale(O,O),U.width=l.canvas.width,U.height=l.canvas.height})},[l]);t.useEffect(()=>{R(b.current,l.dpi),qs(b.current,l.canvas)},[l]),t.useEffect(()=>{R(v.current,l.dpi),Nt(v.current,{alpha:!0},(I,O)=>{O.clearRect(0,0,I.width,I.height)}),Gs(v.current,E,h)},[h,E]),t.useEffect(()=>{R(n,l.dpi),qs(n,l.canvas),Nt(fe.createElement("canvas"),{alpha:!0},(I,O)=>{O.scale(l.dpi,l.dpi),I.width=l.canvas.width,I.height=l.canvas.height,Gs(I,E,h),qs(n,I)})},[h,l,E]);const A=I=>{if(!f||!C.current)return;const O=C.current.getBoundingClientRect(),U={type:f,x:I.offsetX/k,y:I.offsetY/k},F=(D,Y)=>{const J=(Y.clientX-O.x)/k,m=(Y.clientY-O.y)/k;return{type:D.type,x:Math.min(D.x,J),y:Math.min(D.y,m),w:Math.abs(J-D.x),h:Math.abs(m-D.y)}},L=D=>{Nt(v.current,{alpha:!0},(Y,J)=>{J.clearRect(0,0,Y.width,Y.height)}),Gs(v.current,E,[...h,F(U,D)])},N=D=>{const Y=F(U,D);Y.w*k>=1&&Y.h*k>=1&&g(J=>[...J,Y]),fe.removeEventListener("mousemove",L),fe.removeEventListener("mouseup",N)};fe.addEventListener("mousemove",L),fe.addEventListener("mouseup",N)},w=t.useCallback(I=>O=>{O.preventDefault(),O.stopPropagation(),g(U=>{const F=[...U];return F.splice(I,1),F})},[]),x={width:`${l.canvas.width*k}px`,height:`${l.canvas.height*k}px`},B=I=>{I.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:_},e("canvas",{ref:b,id:"background",style:x}),e("canvas",{ref:v,id:"foreground",style:x}),e("div",{ref:C,onMouseDown:A,style:x},h.map((I,O)=>e("div",{key:O,class:"editor__rect",style:{top:`${I.y*k}px`,left:`${I.x*k}px`,width:`${I.w*k}px`,height:`${I.h*k}px`}},e("button",{"aria-label":"Remove",onClick:w(O),onMouseDown:B,onMouseUp:B,type:"button"},e(a,null))))))),e(i,{action:f,setAction:p}))};return function({onError:f}){const[p,h]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((g,_)=>{Nt(fe.createElement("canvas"),{alpha:!1},(b,v)=>{v.scale(_,_),b.width=g.videoWidth,b.height=g.videoHeight,v.drawImage(g,0,0,b.width,b.height),h({canvas:b,dpi:_})}),n.width=g.videoWidth,n.height=g.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(g=>{u.display="block",f(g)},[])}),p?e(d,{screenshot:p}):e("div",null)}}const Sb=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=fe.createElement("canvas");return{input:yb({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const s=await new Promise(i=>{o.toBlob(i,"image/png")});if(s)return{data:new Uint8Array(await s.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}),$=G;let Ni=0;function yf(){return Ni>0}function bb(){Ni++,setTimeout(()=>{Ni--})}function Wn(e,t={}){function n(o){return typeof o=="function"}if(!n(e))return e;try{const o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(na(e))return e}catch{return e}const r=function(...o){try{const s=o.map(i=>Wn(i,t));return e.apply(this,s)}catch(s){throw bb(),qe(i=>{i.addEventProcessor(a=>(t.mechanism&&(di(a,void 0),Ht(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),zt(s)}),s}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}Nl(r,e),je(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Ta(){const e=fn(),{referrer:t}=$.document||{},{userAgent:n}=$.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const Eb={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},hu=$;async function Sf(e,t){const n=Eb[e],r=hu.Sentry=hu.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;const s=vb(n),i=$.document.createElement("script");i.src=s,i.crossOrigin="anonymous",i.referrerPolicy="strict-origin",t&&i.setAttribute("nonce",t);const a=new Promise((l,f)=>{i.addEventListener("load",()=>l()),i.addEventListener("error",f)}),c=$.document.currentScript,u=$.document.body||$.document.head||c?.parentElement;if(u)u.appendChild(i);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const d=r[e];if(typeof d!="function")throw new Error(`Could not load integration: ${e}`);return d}function vb(e){const n=P()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${yt}/${e}.min.js`,n).toString()}const wb=af({lazyLoadIntegration:Sf}),mu=af({getModalIntegration:()=>fb,getScreenshotIntegration:()=>Sb});function Zn(e,t,n,r){vi({level:e,message:t,attributes:n,severityNumber:r})}function Tb(e,t){Zn("trace",e,t)}function Ib(e,t){Zn("debug",e,t)}function kb(e,t){Zn("info",e,t)}function Rb(e,t){Zn("warn",e,t)}function Cb(e,t){Zn("error",e,t)}function xb(e,t){Zn("fatal",e,t)}const Mb=Object.freeze(Object.defineProperty({__proto__:null,debug:Ib,error:Cb,fatal:xb,fmt:y_,info:kb,trace:Tb,warn:Rb},Symbol.toStringTag,{value:"Module"}));function ps(e,t){const n=Ia(e,t),r={type:Pb(t),value:Db(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Ab(e,t,n,r){const s=P()?.getOptions().normalizeDepth,i=Bb(t),a={__serialized__:sd(t,s)};if(i)return{exception:{values:[ps(e,i)]},extra:a};const c={exception:{values:[{type:ss(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Fb(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Ia(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Vs(e,t){return{exception:{values:[ps(e,t)]}}}function Ia(e,t){const n=t.stacktrace||t.stack||"",r=Nb(t),o=Lb(t);try{return e(n,r,o)}catch{}return[]}const Ob=/Minified React error #\d+;/i;function Nb(e){return e&&Ob.test(e.message)?1:0}function Lb(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function bf(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Pb(e){const t=e?.name;return!t&&bf(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Db(e){const t=e?.message;return bf(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Ef(e,t,n,r){const o=n?.syntheticException||void 0,s=ka(e,t,o,r);return Ht(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),kt(s)}function vf(e,t,n="info",r,o){const s=r?.syntheticException||void 0,i=Li(e,t,s,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),kt(i)}function ka(e,t,n,r,o){let s;if(xl(t)&&t.error)return Vs(e,t.error);if(uc(t)||zh(t)){const i=t;if("stack"in t)s=Vs(e,t);else{const a=i.name||(uc(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;s=Li(e,c,n,r),di(s,c)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return St(t)?Vs(e,t):vt(t)||ss(t)?(s=Ab(e,t,n,o),Ht(s,{synthetic:!0}),s):(s=Li(e,t,n,r),di(s,`${t}`),Ht(s,{synthetic:!0}),s)}function Li(e,t,n,r){const o={};if(r&&n){const s=Ia(e,n);s.length&&(o.exception={values:[{value:t,stacktrace:{frames:s}}]}),Ht(o,{synthetic:!0})}if(os(t)){const{__sentry_template_string__:s,__sentry_template_values__:i}=t;return o.logentry={message:s,params:i},o}return o.message=t,o}function Fb(e,{isUnhandledRejection:t}){const n=Jh(e),r=t?"promise rejection":"exception";return xl(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:ss(e)?`Event \`${$b(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function $b(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Bb(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}const Ub=5e3;class wf extends Kg{constructor(t){const n=Hb(t),r=$.SENTRY_SDK_SOURCE||iS();Ld(n,"browser",["browser"],r),super(n);const{sendDefaultPii:o,sendClientReports:s,enableLogs:i,_experiments:a}=this._options,c=i??a?.enableLogs;$.document&&(s||c)&&$.document.addEventListener("visibilitychange",()=>{$.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),c&&go(this))}),c&&(this.on("flush",()=>{go(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{go(this)},Ub)})),o&&(this.on("postprocessEvent",S_),this.on("beforeSendSession",b_))}eventFromException(t,n){return Ef(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return vf(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,o)}}function Hb(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:$.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const jn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,X=G,Wb=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Qn=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o??0),(s||o===void 0)&&(o=t.value,t.delta=s,t.rating=Wb(t.value,n),e(t)))}},jb=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Fr=(e=!0)=>{const t=X.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},er=()=>Fr()?.activationStart??0,tr=(e,t=-1)=>{const n=Fr();let r="navigate";return n&&(X.document?.prerendering||er()>0?r="prerender":X.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:jb(),navigationType:r}},Ys=new WeakMap;function Ra(e,t){return Ys.get(e)||Ys.set(e,new t),Ys.get(e)}class Wo{constructor(){Wo.prototype.__init.call(this),Wo.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const _n=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},hs=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let ur=-1;const zb=()=>X.document?.visibilityState==="hidden"&&!X.document?.prerendering?0:1/0,jo=e=>{X.document.visibilityState==="hidden"&&ur>-1&&(ur=e.type==="visibilitychange"?e.timeStamp:0,Gb())},qb=()=>{addEventListener("visibilitychange",jo,!0),addEventListener("prerenderingchange",jo,!0)},Gb=()=>{removeEventListener("visibilitychange",jo,!0),removeEventListener("prerenderingchange",jo,!0)},ms=()=>{if(X.document&&ur<0){const e=er();ur=(X.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??zb(),qb()}return{get firstHiddenTime(){return ur}}},$r=e=>{X.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Vb=[1800,3e3],Yb=(e,t={})=>{$r(()=>{const n=ms(),r=tr("FCP");let o;const i=_n("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-er(),0),r.entries.push(c),o(!0)))});i&&(o=Qn(e,r,Vb,t.reportAllChanges))})},Kb=[.1,.25],Xb=(e,t={})=>{Yb(hs(()=>{const n=tr("CLS",0);let r;const o=Ra(t,Wo),s=a=>{for(const c of a)o._processEntry(c);o._sessionValue>n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},i=_n("layout-shift",s);i&&(r=Qn(e,n,Kb,t.reportAllChanges),X.document?.addEventListener("visibilitychange",()=>{X.document?.visibilityState==="hidden"&&(s(i.takeRecords()),r(!0))}),X?.setTimeout?.(r))}))},gs=e=>{const t=n=>{(n.type==="pagehide"||X.document?.visibilityState==="hidden")&&e(n)};X.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Jb=[100,300],Zb=(e,t={})=>{$r(()=>{const n=ms(),r=tr("FID");let o;const s=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),o(!0))},i=c=>{c.forEach(s)},a=_n("first-input",i);o=Qn(e,r,Jb,t.reportAllChanges),a&&gs(hs(()=>{i(a.takeRecords()),a.disconnect()}))})};let Tf=0,Ks=1/0,Qr=0;const Qb=e=>{e.forEach(t=>{t.interactionId&&(Ks=Math.min(Ks,t.interactionId),Qr=Math.max(Qr,t.interactionId),Tf=Qr?(Qr-Ks)/7+1:0)})};let Pi;const If=()=>Pi?Tf:performance.interactionCount||0,eE=()=>{"interactionCount"in performance||Pi||(Pi=_n("event",Qb,{type:"event",buffered:!0,durationThreshold:0}))},Xs=10;let kf=0;const tE=()=>If()-kf;class zo{constructor(){zo.prototype.__init.call(this),zo.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){kf=If(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(tE()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Xs||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((o,s)=>s._latency-o._latency),this._longestInteractionList.length>Xs){const o=this._longestInteractionList.splice(Xs);for(const s of o)this._longestInteractionMap.delete(s.id)}this._onAfterProcessingINPCandidate?.(r)}}}const Rf=e=>{const t=X.requestIdleCallback||X.setTimeout;X.document?.visibilityState==="hidden"?e():(e=hs(e),t(e),gs(e))},nE=[200,500],rE=40,oE=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&$r(()=>{eE();const n=tr("INP");let r;const o=Ra(t,zo),s=a=>{Rf(()=>{for(const u of a)o._processEntry(u);const c=o._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,r())})},i=_n("event",s,{durationThreshold:t.durationThreshold??rE});r=Qn(e,n,nE,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),gs(()=>{s(i.takeRecords()),r(!0)}))})};class sE{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const iE=[2500,4e3],aE=(e,t={})=>{$r(()=>{const n=ms(),r=tr("LCP");let o;const s=Ra(t,sE),i=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)s._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-er(),0),r.entries=[u],o())},a=_n("largest-contentful-paint",i);if(a){o=Qn(e,r,iE,t.reportAllChanges);const c=hs(()=>{i(a.takeRecords()),a.disconnect(),o(!0)});for(const u of["keydown","click","visibilitychange"])X.document&&addEventListener(u,()=>Rf(c),{capture:!0,once:!0})}})},cE=[800,1800],Di=e=>{X.document?.prerendering?$r(()=>Di(e)):X.document?.readyState!=="complete"?addEventListener("load",()=>Di(e),!0):setTimeout(e)},uE=(e,t={})=>{const n=tr("TTFB"),r=Qn(e,n,cE,t.reportAllChanges);Di(()=>{const o=Fr();o&&(n.value=Math.max(o.responseStart-er(),0),n.entries=[o],r(!0))})},lr={},qo={};let Cf,xf,Mf,Af,Of;function Ca(e,t=!1){return Br("cls",e,dE,Cf,t)}function xa(e,t=!1){return Br("lcp",e,pE,Mf,t)}function Nf(e){return Br("fid",e,fE,xf)}function lE(e){return Br("ttfb",e,hE,Af)}function Lf(e){return Br("inp",e,mE,Of)}function dn(e,t){return Pf(e,t),qo[e]||(gE(e),qo[e]=!0),Df(e,t)}function nr(e,t){const n=lr[e];if(n?.length)for(const r of n)try{r(t)}catch(o){jn&&y.error(`Error while triggering instrumentation handler.
|
|
488
|
+
Type: ${e}
|
|
489
|
+
Name: ${Et(r)}
|
|
490
|
+
Error:`,o)}}function dE(){return Xb(e=>{nr("cls",{metric:e}),Cf=e},{reportAllChanges:!0})}function fE(){return Zb(e=>{nr("fid",{metric:e}),xf=e})}function pE(){return aE(e=>{nr("lcp",{metric:e}),Mf=e},{reportAllChanges:!0})}function hE(){return uE(e=>{nr("ttfb",{metric:e}),Af=e})}function mE(){return oE(e=>{nr("inp",{metric:e}),Of=e})}function Br(e,t,n,r,o=!1){Pf(e,t);let s;return qo[e]||(s=n(),qo[e]=!0),r&&t({metric:r}),Df(e,t,o?s:void 0)}function gE(e){const t={};e==="event"&&(t.durationThreshold=0),_n(e,n=>{nr(e,{entries:n})},t)}function Pf(e,t){lr[e]=lr[e]||[],lr[e].push(t)}function Df(e,t,n){return()=>{n&&n();const r=lr[e];if(!r)return;const o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function _E(e){return"duration"in e}function Js(e){return typeof e=="number"&&isFinite(e)}function Ct(e,t,n,{...r}){const o=q(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),ln(e,()=>{const s=Xe({startTime:t,...r});return s&&s.end(n),s})}function Ma(e){const t=P();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:s}=e,{release:i,environment:a,sendDefaultPii:c}=t.getOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),l=K(),f=l.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}const g={release:i,environment:a,user:p||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":X.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...o};return Xe({name:n,attributes:g,startTime:s,experimental:{standalone:!0}})}function _s(){return X.addEventListener&&X.performance}function Se(e){return e/1e3}function Ff(e){let t="unknown",n="unknown",r="";for(const o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function $f(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Bf(e,t){let n,r=!1;function o(a){!r&&n&&t(a,n),r=!0}gs(()=>{o("pagehide")});const s=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(o("navigation"),s?.(),i?.())}),i=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,i?.()})}function yE(e){let t=0,n;if(!$f("layout-shift"))return;const r=Ca(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);Bf(e,(o,s)=>{SE(t,n,s,o),r()})}function SE(e,t,n,r){jn&&y.log(`Sending CLS span (${e})`);const o=Se((Fe()||0)+(t?.startTime||0)),s=K().getScopeData().transactionName,i=t?Je(t.sources[0]?.node):"Layout shift",a={[re]:"auto.http.browser.cls",[Ce]:"ui.webvital.cls",[Jn]:t?.duration||0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,d)=>{a[`cls.source.${d+1}`]=Je(u.node)});const c=Ma({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("cls",{[Mr]:"",[Ar]:e}),c.end(o))}function bE(e){let t=0,n;if(!$f("largest-contentful-paint"))return;const r=xa(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);Bf(e,(o,s)=>{EE(t,n,s,o),r()})}function EE(e,t,n,r){jn&&y.log(`Sending LCP span (${e})`);const o=Se((Fe()||0)+(t?.startTime||0)),s=K().getScopeData().transactionName,i=t?Je(t.element):"Largest contentful paint",a={[re]:"auto.http.browser.lcp",[Ce]:"ui.webvital.lcp",[Jn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=Je(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const c=Ma({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[Mr]:"millisecond",[Ar]:e}),c.end(o))}const vE=2147483647;let gu=0,De={},ze,Go;function wE({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=_s();if(r&&Fe()){r.mark&&X.performance.mark("sentry-tracing-init");const o=xE(),s=t?bE(n):CE(),i=ME(),a=e?yE(n):RE();return()=>{o(),s?.(),i(),a?.()}}return()=>{}}function TE(){dn("longtask",({entries:e})=>{const t=Ie();if(!t)return;const{op:n,start_timestamp:r}=q(t);for(const o of e){const s=Se(Fe()+o.startTime),i=Se(o.duration);n==="navigation"&&r&&s<r||Ct(t,s,s+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[re]:"auto.ui.browser.metrics"}})}})}function IE(){new PerformanceObserver(t=>{const n=Ie();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const o=Se(Fe()+r.startTime),{start_timestamp:s,op:i}=q(n);if(i==="navigation"&&s&&o<s)continue;const a=Se(r.duration),c={[re]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:f,sourceFunctionName:p,sourceCharPosition:h}=u;c["browser.script.invoker"]=d,c["browser.script.invoker_type"]=l,f&&(c["code.filepath"]=f),p&&(c["code.function"]=p),h!==-1&&(c["browser.script.source_char_position"]=h),Ct(n,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function kE(){dn("event",({entries:e})=>{const t=Ie();if(t){for(const n of e)if(n.name==="click"){const r=Se(Fe()+n.startTime),o=Se(n.duration),s={name:Je(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[re]:"auto.ui.browser.metrics"}},i=Ol(n.target);i&&(s.attributes["ui.component_name"]=i),Ct(t,r,r+o,s)}}})}function RE(){return Ca(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(De.cls={value:e.value,unit:""},Go=t)},!0)}function CE(){return xa(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(De.lcp={value:e.value,unit:"millisecond"},ze=t)},!0)}function xE(){return Nf(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=Se(Fe()),r=Se(t.startTime);De.fid={value:e.value,unit:"millisecond"},De["mark.fid"]={value:n+r,unit:"second"}})}function ME(){return lE(({metric:e})=>{e.entries[e.entries.length-1]&&(De.ttfb={value:e.value,unit:"millisecond"})})}function AE(e,t){const n=_s(),r=Fe();if(!n?.getEntries||!r)return;const o=Se(r),s=n.getEntries(),{op:i,start_timestamp:a}=q(e);if(s.slice(gu).forEach(c=>{const u=Se(c.startTime),d=Se(Math.max(0,c.duration));if(!(i==="navigation"&&a&&o+u<a))switch(c.entryType){case"navigation":{LE(e,c,o);break}case"mark":case"paint":case"measure":{OE(e,c,u,d,o,t.ignorePerformanceApiSpans);const l=ms(),f=c.startTime<l.firstHiddenTime;c.name==="first-paint"&&f&&(De.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&f&&(De.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{FE(e,c,c.name,u,d,o,t.ignoreResourceSpans);break}}}),gu=Math.max(s.length-1,0),$E(e),i==="pageload"){UE(De);const c=De["mark.fid"];c&&De.fid&&(Ct(e,c.value,c.value+Se(De.fid.value),{name:"first input delay",op:"ui.action",attributes:{[re]:"auto.ui.browser.metrics"}}),delete De["mark.fid"]),t.recordClsOnPageloadSpan||delete De.cls,t.recordLcpOnPageloadSpan||delete De.lcp,Object.entries(De).forEach(([u,d])=>{ad(u,d.value,d.unit)}),e.setAttribute("performance.timeOrigin",o),e.setAttribute("performance.activationStart",er()),BE(e,t)}ze=void 0,Go=void 0,De={}}function OE(e,t,n,r,o,s){if(["mark","measure"].includes(t.entryType)&&nt(t.name,s))return;const i=Fr(!1),a=Se(i?i.requestStart:0),c=o+Math.max(n,a),u=o+n,d=u+r,l={[re]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c),NE(l,t),c<=d&&Ct(e,c,d,{name:t.name,op:t.entryType,attributes:l})}function NE(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,o]of Object.entries(n))if(o&&Nn(o))e[`sentry.browser.measure.detail.${r}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(o)}catch{}return}if(Nn(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function LE(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{eo(e,t,r,n)}),eo(e,t,"secureConnection",n,"TLS/SSL"),eo(e,t,"fetch",n,"cache"),eo(e,t,"domainLookup",n,"DNS"),DE(e,t,n)}function eo(e,t,n,r,o=n){const s=PE(n),i=t[s],a=t[`${n}Start`];!a||!i||Ct(e,r+Se(a),r+Se(i),{op:`browser.${o}`,name:t.name,attributes:{[re]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function PE(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function DE(e,t,n){const r=n+Se(t.requestStart),o=n+Se(t.responseEnd),s=n+Se(t.responseStart);t.responseEnd&&(Ct(e,r,o,{op:"browser.request",name:t.name,attributes:{[re]:"auto.ui.browser.metrics"}}),Ct(e,s,o,{op:"browser.response",name:t.name,attributes:{[re]:"auto.ui.browser.metrics"}}))}function FE(e,t,n,r,o,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(i?.includes(a))return;const c=sn(n),u={[re]:"auto.resource.browser.metrics"};Zs(u,t,"transferSize","http.response_transfer_size"),Zs(u,t,"encodedBodySize","http.response_content_length"),Zs(u,t,"decodedBodySize","http.decoded_response_content_length");const d=t.deliveryType;d!=null&&(u["http.response_delivery_type"]=d);const l=t.renderBlockingStatus;if(l&&(u["resource.render_blocking_status"]=l),c.protocol&&(u["url.scheme"]=c.protocol.split(":").pop()),c.host&&(u["server.address"]=c.host),u["url.same_origin"]=n.includes(X.location.origin),t.nextHopProtocol!=null){const{name:h,version:g}=Ff(t.nextHopProtocol);u["network.protocol.name"]=h,u["network.protocol.version"]=g}const f=s+r,p=f+o;Ct(e,f,p,{name:n.replace(X.location.origin,""),op:a,attributes:u})}function $E(e){const t=X.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Js(n.rtt)&&(De["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Js(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Js(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function BE(e,t){ze&&t.recordLcpOnPageloadSpan&&(ze.element&&e.setAttribute("lcp.element",Je(ze.element)),ze.id&&e.setAttribute("lcp.id",ze.id),ze.url&&e.setAttribute("lcp.url",ze.url.trim().slice(0,200)),ze.loadTime!=null&&e.setAttribute("lcp.loadTime",ze.loadTime),ze.renderTime!=null&&e.setAttribute("lcp.renderTime",ze.renderTime),e.setAttribute("lcp.size",ze.size)),Go?.sources&&t.recordClsOnPageloadSpan&&Go.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Je(n.node)))}function Zs(e,t,n,r){const o=t[n];o!=null&&o<vE&&(e[r]=o)}function UE(e){const t=Fr(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function HE(){return _s()&&Fe()?dn("element",WE):()=>{}}const WE=({entries:e})=>{const t=Ie(),n=t?Re(t):void 0,r=n?q(n).description:K().getScopeData().transactionName;e.forEach(o=>{const s=o;if(!s.identifier)return;const i=s.name,a=s.renderTime,c=s.loadTime,[u,d]=c?[Se(c),"load-time"]:a?[Se(a),"render-time"]:[Ee(),"entry-emission"],l=i==="image-paint"?Se(Math.max(0,(a??0)-(c??0))):0,f={[re]:"auto.ui.browser.elementtiming",[Ce]:"ui.elementtiming",[ye]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":r,"element.id":s.id,"element.type":s.element?.tagName?.toLowerCase()||"unknown","element.size":s.naturalWidth&&s.naturalHeight?`${s.naturalWidth}x${s.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":c,"element.url":s.url||void 0,"element.identifier":s.identifier,"element.paint_type":i};us({name:`element[${s.identifier}]`,attributes:f,startTime:u,onlyIfParent:!0},p=>{p.end(u+l)})})},jE=1e3;let _u,Fi,$i;function Uf(e){const t="dom";Gt(t,e),Vt(t,zE)}function zE(){if(!X.document)return;const e=Ke.bind(null,"dom"),t=yu(e,!0);X.document.addEventListener("click",t,!1),X.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const o=X[n]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(He(o,"addEventListener",function(s){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[i]=u[i]||{refCount:0};if(!d.handler){const l=yu(e);d.handler=l,s.call(this,i,l,c)}d.refCount++}catch{}return s.call(this,i,a,c)}}),He(o,"removeEventListener",function(s){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},d=u[i];d&&(d.refCount--,d.refCount<=0&&(s.call(this,i,d.handler,c),d.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,a,c)}}))})}function qE(e){if(e.type!==Fi)return!1;try{if(!e.target||e.target._sentryId!==$i)return!1}catch{}return!0}function GE(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function yu(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=VE(n);if(GE(n.type,r))return;je(n,"_sentryCaptured",!0),r&&!r._sentryId&&je(r,"_sentryId",We());const o=n.type==="keypress"?"input":n.type;qE(n)||(e({event:n,name:o,global:t}),Fi=n.type,$i=r?r._sentryId:void 0),clearTimeout(_u),_u=X.setTimeout(()=>{$i=void 0,Fi=void 0},jE)}}function VE(e){try{return e.target}catch{return null}}let to;function ys(e){const t="history";Gt(t,e),Vt(t,YE)}function YE(){if(X.addEventListener("popstate",()=>{const t=X.location.href,n=to;if(to=t,n===t)return;Ke("history",{from:n,to:t})}),!Vy())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=to,s=KE(String(r));if(to=s,o===s)return t.apply(this,n);Ke("history",{from:o,to:s})}return t.apply(this,n)}}He(X.history,"pushState",e),He(X.history,"replaceState",e)}function KE(e){try{return new URL(e,X.location.origin).toString()}catch{return e}}const wo={};function Aa(e){const t=wo[e];if(t)return t;let n=X[e];if(Ti(n))return wo[e]=n.bind(X);const r=X.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const s=o.contentWindow;s?.[e]&&(n=s[e]),r.head.removeChild(o)}catch(o){jn&&y.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(wo[e]=n.bind(X))}function Su(e){wo[e]=void 0}function Ur(...e){return Aa("setTimeout")(...e)}const _t="__sentry_xhr_v3__";function Oa(e){const t="xhr";Gt(t,e),Vt(t,XE)}function XE(){if(!X.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const o=new Error,s=Ee()*1e3,i=tt(r[0])?r[0].toUpperCase():void 0,a=JE(r[1]);if(!i||!a)return t.apply(n,r);n[_t]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[_t];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:Ee()*1e3,startTimestamp:s,xhr:n,virtualError:o};Ke("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return c(),u.apply(d,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){const[f,p]=l,h=d[_t];return h&&tt(f)&&tt(p)&&(h.request_headers[f.toLowerCase()]=p),u.apply(d,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const o=n[_t];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const s={startTimestamp:Ee()*1e3,xhr:n};return Ke("xhr",s),t.apply(n,r)}})}function JE(e){if(tt(e))return e;try{return e.toString()}catch{}}function Hf(e){return new URLSearchParams(e).toString()}function Vo(e,t=y){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Hf(e)];if(!e)return[void 0]}catch(n){return jn&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return jn&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Na(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}const Qs=[],To=new Map,ZE=60;function QE(){if(_s()&&Fe()){const t=ev();return()=>{t()}}return()=>{}}const bu={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 ev(){return Lf(tv)}const tv=({metric:e})=>{if(e.value==null)return;const t=Se(e.value);if(t>ZE)return;const n=e.entries.find(h=>h.duration===e.value&&bu[h.name]);if(!n)return;const{interactionId:r}=n,o=bu[n.name],s=Se(Fe()+n.startTime),i=Ie(),a=i?Re(i):void 0,u=(r!=null?To.get(r):void 0)||a,d=u?q(u).description:K().getScopeData().transactionName,l=Je(n.target),f={[re]:"auto.http.browser.inp",[Ce]:`ui.interaction.${o}`,[Jn]:n.duration},p=Ma({name:l,transaction:d,attributes:f,startTime:s});p&&(p.addEvent("inp",{[Mr]:"millisecond",[Ar]:e.value}),p.end(s+t))};function nv(){const e=({entries:t})=>{const n=Ie(),r=n&&Re(n);t.forEach(o=>{if(!_E(o)||!r)return;const s=o.interactionId;if(s!=null&&!To.has(s)){if(Qs.length>10){const i=Qs.shift();To.delete(i)}Qs.push(s),To.set(s,r)}})};dn("event",e),dn("first-input",e)}function La(e,t=Aa("fetch")){let n=0,r=0;function o(s){const i=s.body.length;n+=i,r++;const a={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Su("fetch"),Fo("No fetch implementation available");try{return t(e.url,a).then(c=>(n-=i,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Su("fetch"),n-=i,r--,Fo(c)}}return Md(e,o)}const rv=10,ov=20,sv=30,iv=40,av=50;function zn(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?pt:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const cv=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,uv=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,lv=/\((\S*)(?::(\d+))(?::(\d+))\)/,dv=e=>{const t=cv.exec(e);if(t){const[,r,o,s]=t;return zn(r,pt,+o,+s)}const n=uv.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const i=lv.exec(n[2]);i&&(n[2]=i[1],n[3]=i[2],n[4]=i[3])}const[o,s]=Gf(n[1]||pt,n[2]);return zn(s,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Wf=[sv,dv],fv=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,pv=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,hv=e=>{const t=fv.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=pv.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],o=t[1]||pt;return[o,r]=Gf(o,r),zn(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},jf=[av,hv],mv=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,gv=e=>{const t=mv.exec(e);return t?zn(t[2],t[1]||pt,+t[3],t[4]?+t[4]:void 0):void 0},_v=[iv,gv],yv=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Sv=e=>{const t=yv.exec(e);return t?zn(t[2],t[3]||pt,+t[1]):void 0},bv=[rv,Sv],Ev=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,vv=e=>{const t=Ev.exec(e);return t?zn(t[5],t[3]||t[4]||pt,+t[1],+t[2]):void 0},wv=[ov,vv],zf=[Wf,jf],qf=Il(...zf),Gf=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:pt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function Tv(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:mn(r)}},s=Iv(e);return Mt(o,[s])}function Iv(e){return[{type:"user_report"},e]}const te=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,no=1024,kv="Breadcrumbs",Rv=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:kv,setup(n){t.console&&ga(Mv(n)),t.dom&&Uf(xv(n,t.dom)),t.xhr&&Oa(Av(n)),t.fetch&&ya(Ov(n)),t.history&&ys(Nv(n)),t.sentry&&n.on("beforeSendEvent",Cv(n))}}},Vf=Rv;function Cv(e){return function(n){P()===e&&st({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Jt(n)},{event:n})}}function xv(e,t){return function(r){if(P()!==e)return;let o,s,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>no&&(te&&y.warn(`\`dom.maxStringLength\` cannot exceed ${no}, but a value of ${a} was configured. Sentry will use ${no} instead.`),a=no),typeof i=="string"&&(i=[i]);try{const u=r.event,d=Lv(u)?u.target:u;o=Je(d,{keyAttrs:i,maxStringLength:a}),s=Ol(d)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${r.name}`,message:o};s&&(c.data={"ui.component_name":s}),st(c,{event:r.event,name:r.name,global:r.global})}}function Mv(e){return function(n){if(P()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:_a(n.level),message:Ao(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Ao(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;st(r,{input:n.args,level:n.level})}}function Av(e){return function(n){if(P()!==e)return;const{startTimestamp:r,endTimestamp:o}=n,s=n.xhr[_t];if(!r||!o||!s)return;const{method:i,url:a,status_code:c,body:u}=s,d={method:i,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o},f={category:"xhr",data:d,type:"http",level:Xd(c)};e.emit("beforeOutgoingRequestBreadcrumb",f,l),st(f,l)}}function Ov(e){return function(n){if(P()!==e)return;const{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const s=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o},a={category:"fetch",data:s,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),st(a,i)}else{const s=n.response,i={...n.fetchData,status_code:s?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,s?.status;const a={input:n.args,response:s,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:i,type:"http",level:Xd(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),st(c,a)}}}function Nv(e){return function(n){if(P()!==e)return;let r=n.from,o=n.to;const s=sn($.location.href);let i=r?sn(r):void 0;const a=sn(o);i?.path||(i=s),s.protocol===a.protocol&&s.host===a.host&&(o=a.relative),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),st({category:"navigation",data:{from:r,to:o}})}}function Lv(e){return!!e&&!!e.target}const Pv=["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"],Dv="BrowserApiErrors",Fv=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Dv,setupOnce(){t.setTimeout&&He($,"setTimeout",Eu),t.setInterval&&He($,"setInterval",Eu),t.requestAnimationFrame&&He($,"requestAnimationFrame",$v),t.XMLHttpRequest&&"XMLHttpRequest"in $&&He(XMLHttpRequest.prototype,"send",Bv);const n=t.eventTarget;n&&(Array.isArray(n)?n:Pv).forEach(o=>Uv(o,t))}}},Yf=Fv;function Eu(e){return function(...t){const n=t[0];return t[0]=Wn(n,{mechanism:{data:{function:Et(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function $v(e){return function(t){return e.apply(this,[Wn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Et(e)},handled:!1,type:"instrument"}})])}}function Bv(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&He(n,o,function(s){const i={mechanism:{data:{function:o,handler:Et(s)},handled:!1,type:"instrument"}},a=na(s);return a&&(i.mechanism.data.handler=Et(a)),Wn(s,i)})}),e.apply(this,t)}}function Uv(e,t){const r=$[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(He(r,"addEventListener",function(o){return function(s,i,a){try{Hv(i)&&(i.handleEvent=Wn(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Et(i),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&Wv(this,s,i),o.apply(this,[s,Wn(i,{mechanism:{data:{function:"addEventListener",handler:Et(i),target:e},handled:!1,type:"instrument"}}),a])}}),He(r,"removeEventListener",function(o){return function(s,i,a){try{const c=i.__sentry_wrapped__;c&&o.call(this,s,c,a)}catch{}return o.call(this,s,i,a)}}))}function Hv(e){return typeof e.handleEvent=="function"}function Wv(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const Kf=()=>({name:"BrowserSession",setupOnce(){if(typeof $.document>"u"){te&&y.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}yi({ignoreDuration:!0}),Si(),ys(({from:e,to:t})=>{e!==void 0&&e!==t&&(yi({ignoreDuration:!0}),Si())})}}),jv="GlobalHandlers",zv=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:jv,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(qv(n),vu("onerror")),t.onunhandledrejection&&(Gv(n),vu("onunhandledrejection"))}}},Xf=zv;function qv(e){kl(t=>{const{stackParser:n,attachStacktrace:r}=Jf();if(P()!==e||yf())return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=Kv(ka(n,c||o,void 0,r,!1),s,i,a);u.level="error",Nr(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Gv(e){Rl(t=>{const{stackParser:n,attachStacktrace:r}=Jf();if(P()!==e||yf())return;const o=Vv(t),s=Nn(o)?Yv(o):ka(n,o,void 0,r,!0);s.level="error",Nr(s,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Vv(e){if(Nn(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function Yv(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Kv(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=r,d=n,l=tt(t)&&t.length>0?t:fn();return c.length===0&&c.push({colno:u,filename:l,function:pt,in_app:!0,lineno:d}),e}function vu(e){te&&y.log(`Global Handler attached: ${e}`)}function Jf(){return P()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Zf=()=>({name:"HttpContext",preprocessEvent(e){if(!$.navigator&&!$.location&&!$.document)return;const t=Ta(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),Xv="cause",Jv=5,Zv="LinkedErrors",Qv=(e={})=>{const t=e.limit||Jv,n=e.key||Xv;return{name:Zv,preprocessEvent(r,o,s){const i=s.getOptions();P_(ps,i.stackParser,n,t,r,o)}}},Qf=Qv;function e0(){return t0()?(te&&qt(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function t0(){if(typeof $.window>"u")return!1;const e=$;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=fn(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!($===$.top&&r.some(s=>n.startsWith(`${s}://`)))}function ep(e){return[Fd(),Pd(),Yf(),Vf(),Xf(),Qf(),Hd(),Zf(),Kf()]}function n0(e={}){const t=!e.skipBrowserExtensionCheck&&e0(),n={...e,enabled:t?!1:e.enabled,stackParser:Uh(e.stackParser||qf),integrations:zg({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?ep():e.defaultIntegrations}),transport:e.transport||La};return i_(wf,n)}function r0(){}function o0(e){e()}function Bi(e={}){const t=$.document,n=t?.head||t?.body;if(!n){te&&y.error("[showReportDialog] Global document not defined");return}const r=K(),s=P()?.getDsn();if(!s){te&&y.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||pd()},a=$.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=Wg(s,i);const{onLoad:c,onClose:u}=i;if(c&&(a.onload=c),u){const d=l=>{if(l.data==="__sentry_reportdialog_closed__")try{u()}finally{$.removeEventListener("message",d)}};$.addEventListener("message",d)}n.appendChild(a)}const s0=G,i0="ReportingObserver",wu=new WeakMap,a0=(e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(wu.has(P()))for(const o of r)qe(s=>{s.setExtra("url",o.url);const i=`ReportingObserver [${o.type}]`;let a="No details available";if(o.body){const c={};for(const u in o.body)c[u]=o.body[u];if(s.setExtra("body",c),o.type==="crash"){const u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}Bo(`${i}: ${a}`)})}return{name:i0,setupOnce(){if(!Ky())return;new s0.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){wu.set(r,!0)}}},c0=a0,u0="HttpClient",l0=(e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:u0,setup(n){S0(n,t),b0(n,t)}}},d0=l0;function f0(e,t,n,r,o){if(np(e,n.status,n.url)){const s=E0(t,r);let i,a,c,u;op()&&([i,c]=Tu("Cookie",s),[a,u]=Tu("Set-Cookie",n));const d=rp({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:c,responseCookies:u,error:o});Nr(d)}}function Tu(e,t){const n=m0(t.headers);let r;try{const o=n[e]||n[e.toLowerCase()]||void 0;o&&(r=tp(o))}catch{}return[n,r]}function p0(e,t,n,r,o){if(np(e,t.status,t.responseURL)){let s,i,a;if(op()){try{const u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;u&&(i=tp(u))}catch{}try{a=g0(t)}catch{}s=r}const c=rp({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:a,responseCookies:i,error:o});Nr(c)}}function h0(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function tp(e){return e.split("; ").reduce((t,n)=>{const[r,o]=n.split("=");return r&&o&&(t[r]=o),t},{})}function m0(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function g0(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
491
|
+
`).reduce((n,r)=>{const[o,s]=r.split(": ");return o&&s&&(n[o]=s),n},{}):{}}function _0(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function y0(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function S0(e,t){Jd()&&ya(n=>{if(P()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&f0(t,a,r,c,s||i)},!1)}function b0(e,t){"XMLHttpRequest"in G&&Oa(n=>{if(P()!==e)return;const{error:r,virtualError:o}=n,s=n.xhr,i=s[_t];if(!i)return;const{method:a,request_headers:c}=i;try{p0(t,s,a,c,r||o)}catch(u){te&&y.warn("Error while extracting response event form XHR response",u)}})}function np(e,t,n){return y0(e.failedRequestStatusCodes,t)&&_0(e.failedRequestTargets,n)&&!Od(n,P())}function rp(e){const t=P(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,o=`HTTP Client Error with status code: ${e.status}`,s={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:h0(e.responseHeaders)}}};return Ht(s,{type:"http.client",handled:!1}),s}function E0(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function op(){const e=P();return e?!!e.getOptions().sendDefaultPii:!1}const ei=G,v0=7,w0="ContextLines",T0=(e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:v0;return{name:w0,processEvent(n){return k0(n,t)}}},I0=T0;function k0(e,t){const n=ei.document,r=ei.location&&Yd(ei.location.href);if(!n||!r)return e;const o=e.exception?.values;if(!o?.length)return e;const s=n.documentElement.innerHTML;if(!s)return e;const i=["<!DOCTYPE html>","<html>",...s.split(`
|
|
492
|
+
`),"</html>"];return o.forEach(a=>{const c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>R0(u,i,r,t)))}),e}function R0(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Qh(t,e,r),e}const C0="GraphQLClient",x0=e=>({name:C0,setup(t){M0(t,e),A0(t,e)}});function M0(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const s=q(n).data||{};if(!(s[Ce]==="http.client"))return;const c=s[mm]||s["http.url"],u=s[hm]||s["http.method"];if(!tt(c)||!tt(u))return;const{endpoints:d}=t,l=nt(c,d),f=ip(r);if(l&&f){const p=ap(f);if(p){const h=sp(p);n.updateName(`${u} ${c} (${h})`),n.setAttribute("graphql.document",f)}}})}function A0(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:o,type:s,data:i}=n;if(s==="http"&&(o==="fetch"||o==="xhr")){const d=i?.url,{endpoints:l}=t,f=nt(d,l),p=ip(r);if(f&&i&&p){const h=ap(p);if(!i.graphql&&h){const g=sp(h);i["graphql.document"]=h.query,i["graphql.operation"]=g}}}})}function sp(e){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=O0(t);return r?`${o} ${r}`:`${o}`}function ip(e){const t="xhr"in e;let n;if(t){const r=e.xhr[_t];n=r&&Vo(r.body)[0]}else{const r=Na(e.input);n=Vo(r)[0]}return n}function O0(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const o=e.match(n);return o?{operationType:o[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function ap(e){let t;try{const n=JSON.parse(e);!!n.query&&(t=n)}finally{return t}}const N0=x0,_e=G,Pa="sentryReplaySession",L0="replay_event",Da="Unable to send Replay",P0=3e5,D0=9e5,F0=5e3,$0=5500,B0=6e4,U0=5e3,H0=3,Iu=15e4,ro=5e3,W0=3e3,j0=300,Fa=2e7,z0=4999,q0=15e3,ku=36e5;var G0=Object.defineProperty,V0=(e,t,n)=>t in e?G0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ru=(e,t,n)=>V0(e,typeof t!="symbol"?t+"":t,n),Le=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Le||{});function Y0(e){return e.nodeType===e.ELEMENT_NODE}function dr(e){return e?.host?.shadowRoot===e}function fr(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function K0(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function X0(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Yo(e){try{const t=e.rules||e.cssRules;return t?K0(Array.from(t,cp).join("")):null}catch{return null}}function J0(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,o=r[n],s=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}function cp(e){let t;if(Q0(e))try{t=Yo(e.styleSheet)||X0(e)}catch{}else if(ew(e)){let n=e.cssText;const r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=J0(e)),r&&(n=Z0(n)),r||o)return n}return t||e.cssText}function Z0(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Q0(e){return"styleSheet"in e}function ew(e){return"selectorText"in e}let up=class{constructor(){Ru(this,"idNodeMap",new Map),Ru(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-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 n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function tw(){return new up}function Ss({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function _r({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function qn(e){return e.toLowerCase()}function Ui(e){return e.toUpperCase()}const Cu="__rrweb_original__";function nw(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const s=t.getImageData,i=Cu in s?s[Cu]:s;if(new Uint32Array(i.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function $a(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?qn(t):null}function Ko(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function lp(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const xu={};function dp(e){const t=xu[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return xu[e]=r.bind(window)}function Hi(...e){return dp("setTimeout")(...e)}function fp(...e){return dp("clearTimeout")(...e)}function pp(e){try{return e.contentDocument}catch{}}let rw=1;const ow=new RegExp("[^a-z0-9-_:]"),yr=-2;function Ba(){return rw++}function sw(e){if(e instanceof HTMLFormElement)return"form";const t=qn(e.tagName);return ow.test(t)?"div":t}function iw(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let bn,Mu;const aw=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,cw=/^(?:[a-z+]+:)?\/\//i,uw=/^www\..*/i,lw=/^(data:)([^,]*),(.*)/i;function Xo(e,t){return(e||"").replace(aw,(n,r,o,s,i,a)=>{const c=o||i||a,u=r||s||"";if(!c)return n;if(cw.test(c)||uw.test(c))return`url(${u}${c}${u})`;if(lw.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${iw(t)+c}${u})`;const d=t.split("/"),l=c.split("/");d.pop();for(const f of l)f!=="."&&(f===".."?d.pop():d.push(f));return`url(${u}${d.join("/")}${u})`})}const dw=/^[^ \t\n\r\u000c]+/,fw=/^[, \t\n\r\u000c]+/;function pw(e,t){if(t.trim()==="")return t;let n=0;function r(s){let i;const a=s.exec(t.substring(n));return a?(i=a[0],n+=i.length,i):""}const o=[];for(;r(fw),!(n>=t.length);){let s=r(dw);if(s.slice(-1)===",")s=Tn(e,s.substring(0,s.length-1)),o.push(s);else{let i="";s=Tn(e,s);let a=!1;for(;;){const c=t.charAt(n);if(c===""){o.push((s+i).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,o.push((s+i).trim());break}else c==="("&&(a=!0);i+=c,n+=1}}}return o.join(", ")}const Au=new WeakMap;function Tn(e,t){return!t||t.trim()===""?t:bs(e,t)}function hw(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function bs(e,t){let n=Au.get(e);if(n||(n=e.createElement("a"),Au.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function hp(e,t,n,r,o,s){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Tn(e,r):n==="srcset"?pw(e,r):n==="style"?Xo(r,bs(e)):t==="object"&&n==="data"?Tn(e,r):typeof s=="function"?s(n,r,o):r)}function mp(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function gp(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){const s=e.classList[o];if(t.test(s))return!0}if(n)return e.matches(n)}catch{}return!1}function mw(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function tn(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:tn(e.parentNode,t,n,r+1)}function In(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(mw(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Gn(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(i.tagName==="INPUT"){const u=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(s){if(c=tn(i,In(r,o)),c<0)return!0;a=tn(i,In(t,n),c>=0?c:1/0)}else{if(a=tn(i,In(t,n)),a<0)return!1;c=tn(i,In(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!s}catch{}return!!s}function gw(e,t,n){const r=e.contentWindow;if(!r)return;let o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const a=Hi(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{fp(a),o=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return Hi(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function _w(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;const s=Hi(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{fp(s),r=!0,t()})}function yw(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:g,maskInputFn:_,dataURLOptions:b={},inlineImages:v,recordCanvas:C,keepIframeSrcFn:k,newlyAddedElement:S=!1}=t,E=Sw(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Le.Document,childNodes:[],compatMode:e.compatMode}:{type:Le.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Le.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:E};case e.ELEMENT_NODE:return Ew(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:h,maskInputFn:_,dataURLOptions:b,inlineImages:v,recordCanvas:C,keepIframeSrcFn:k,newlyAddedElement:S,rootId:E,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f});case e.TEXT_NODE:return bw(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,maskTextFn:g,maskInputOptions:h,maskInputFn:_,rootId:E});case e.CDATA_SECTION_NODE:return{type:Le.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:Le.Comment,textContent:e.textContent||"",rootId:E};default:return!1}}function Sw(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function bw(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const p=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,g=l==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=Yo(e.parentNode.sheet))}catch(b){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${b}`,e)}f=Xo(f,bs(t.doc))}h&&(f="SCRIPT_PLACEHOLDER");const _=Gn(e,r,s,o,i,n);if(!p&&!h&&!g&&f&&_&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),g&&f&&(c.textarea||_)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),l==="OPTION"&&f){const b=Ss({type:null,tagName:l,maskInputOptions:c});f=_r({isMasked:Gn(e,r,s,o,i,b),element:e,value:f,maskInputFn:u})}return{type:Le.Text,textContent:f||"",isStyle:p,rootId:d}}function Ew(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:g,maskTextClass:_,unmaskTextClass:b,maskTextSelector:v,unmaskTextSelector:C}=t,k=gp(e,r,o,s),S=sw(e);let E={};const R=e.attributes.length;for(let w=0;w<R;w++){const x=e.attributes[w];x.name&&!mp(S,x.name,x.value)&&(E[x.name]=hp(n,S,qn(x.name),x.value,e,c))}if(S==="link"&&i){const w=Array.from(n.styleSheets).find(B=>B.href===e.href);let x=null;w&&(x=Yo(w)),x&&(E.rel=null,E.href=null,E.crossorigin=null,E._cssText=Xo(x,w.href))}if(S==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const w=Yo(e.sheet);w&&(E._cssText=Xo(w,bs(n)))}if(S==="input"||S==="textarea"||S==="select"||S==="option"){const w=e,x=$a(w),B=Ko(w,Ui(S),x),I=w.checked;if(x!=="submit"&&x!=="button"&&B){const O=Gn(w,_,v,b,C,Ss({type:x,tagName:Ui(S),maskInputOptions:a}));E.value=_r({isMasked:O,element:w,value:B,maskInputFn:u})}I&&(E.checked=I)}if(S==="option"&&(e.selected&&!a.select?E.selected=!0:delete E.selected),S==="canvas"&&f){if(e.__context==="2d")nw(e)||(E.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const w=e.toDataURL(d.type,d.quality),x=n.createElement("canvas");x.width=e.width,x.height=e.height;const B=x.toDataURL(d.type,d.quality);w!==B&&(E.rr_dataURL=w)}}if(S==="img"&&l){bn||(bn=n.createElement("canvas"),Mu=bn.getContext("2d"));const w=e,x=w.currentSrc||w.getAttribute("src")||"<unknown-src>",B=w.crossOrigin,I=()=>{w.removeEventListener("load",I);try{bn.width=w.naturalWidth,bn.height=w.naturalHeight,Mu.drawImage(w,0,0),E.rr_dataURL=bn.toDataURL(d.type,d.quality)}catch(O){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?I():w.addEventListener("load",I);return}else console.warn(`Cannot inline img src=${x}! Error: ${O}`)}w.crossOrigin==="anonymous"&&(B?E.crossOrigin=B:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?I():w.addEventListener("load",I)}if((S==="audio"||S==="video")&&(E.rr_mediaState=e.paused?"paused":"played",E.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(E.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(E.rr_scrollTop=e.scrollTop)),k){const{width:w,height:x}=e.getBoundingClientRect();E={class:E.class,rr_width:`${w}px`,rr_height:`${x}px`}}S==="iframe"&&!p(E.src)&&(!k&&!pp(e)&&(E.rr_src=E.src),delete E.src);let A;try{customElements.get(S)&&(A=!0)}catch{}return{type:Le.Element,tagName:S,attributes:E,childNodes:[],isSVG:hw(e)||void 0,needBlock:k,rootId:g,isCustom:A}}function ge(e){return e==null?"":e.toLowerCase()}function vw(e,t){if(t.comment&&e.type===Le.Comment)return!0;if(e.type===Le.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&lp(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ge(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ge(e.attributes.name)==="application-name"||ge(e.attributes.rel)==="icon"||ge(e.attributes.rel)==="apple-touch-icon"||ge(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ge(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ge(e.attributes.property).match(/^(og|twitter|fb):/)||ge(e.attributes.name).match(/^(og|twitter):/)||ge(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ge(e.attributes.name)==="robots"||ge(e.attributes.name)==="googlebot"||ge(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ge(e.attributes.name)==="author"||ge(e.attributes.name)==="generator"||ge(e.attributes.name)==="framework"||ge(e.attributes.name)==="publisher"||ge(e.attributes.name)==="progid"||ge(e.attributes.property).match(/^article:/)||ge(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ge(e.attributes.name)==="google-site-verification"||ge(e.attributes.name)==="yandex-verification"||ge(e.attributes.name)==="csrf-token"||ge(e.attributes.name)==="p:domain_verify"||ge(e.attributes.name)==="verify-v1"||ge(e.attributes.name)==="verification"||ge(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function kn(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:g,maskTextFn:_,maskInputFn:b,slimDOMOptions:v,dataURLOptions:C={},inlineImages:k=!1,recordCanvas:S=!1,onSerialize:E,onIframeLoad:R,iframeLoadTimeout:A=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:B=()=>!1,newlyAddedElement:I=!1}=t;let{preserveWhiteSpace:O=!0}=t;const U=yw(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:b,dataURLOptions:C,inlineImages:k,recordCanvas:S,keepIframeSrcFn:B,newlyAddedElement:I});if(!U)return console.warn(e,"not serialized"),null;let F;r.hasNode(e)?F=r.getId(e):vw(U,v)||!O&&U.type===Le.Text&&!U.isStyle&&!U.textContent.replace(/^\s+|\s+$/gm,"").length?F=yr:F=Ba();const L=Object.assign(U,{id:F});if(r.add(e,L),F===yr)return null;E&&E(e);let N=!f;if(L.type===Le.Element){N=N&&!L.needBlock,delete L.needBlock;const D=e.shadowRoot;D&&fr(D)&&(L.isShadowHost=!0)}if((L.type===Le.Document||L.type===Le.Element)&&N){v.headWhitespace&&L.type===Le.Element&&L.tagName==="head"&&(O=!1);const D={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:b,slimDOMOptions:v,dataURLOptions:C,inlineImages:k,recordCanvas:S,preserveWhiteSpace:O,onSerialize:E,onIframeLoad:R,iframeLoadTimeout:A,onStylesheetLoad:w,stylesheetLoadTimeout:x,keepIframeSrcFn:B};for(const Y of Array.from(e.childNodes)){const J=kn(Y,D);J&&L.childNodes.push(J)}if(Y0(e)&&e.shadowRoot)for(const Y of Array.from(e.shadowRoot.childNodes)){const J=kn(Y,D);J&&(fr(e.shadowRoot)&&(J.isShadow=!0),L.childNodes.push(J))}}return e.parentNode&&dr(e.parentNode)&&fr(e.parentNode)&&(L.isShadow=!0),L.type===Le.Element&&L.tagName==="iframe"&&!gp(e,o,s,i)&&gw(e,()=>{const D=pp(e);if(D&&R){const Y=kn(D,{doc:D,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:b,slimDOMOptions:v,dataURLOptions:C,inlineImages:k,recordCanvas:S,preserveWhiteSpace:O,onSerialize:E,onIframeLoad:R,iframeLoadTimeout:A,onStylesheetLoad:w,stylesheetLoadTimeout:x,keepIframeSrcFn:B});Y&&R(e,Y)}},A),L.type===Le.Element&&L.tagName==="link"&&typeof L.attributes.rel=="string"&&(L.attributes.rel==="stylesheet"||L.attributes.rel==="preload"&&typeof L.attributes.href=="string"&&lp(L.attributes.href)==="css")&&_w(e,()=>{if(w){const D=kn(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:b,slimDOMOptions:v,dataURLOptions:C,inlineImages:k,recordCanvas:S,preserveWhiteSpace:O,onSerialize:E,onIframeLoad:R,iframeLoadTimeout:A,onStylesheetLoad:w,stylesheetLoadTimeout:x,keepIframeSrcFn:B});D&&w(e,D)}},x),L}function ww(e,t){const{mirror:n=new up,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:g,maskTextFn:_,maskInputFn:b,slimDOM:v=!1,dataURLOptions:C,preserveWhiteSpace:k,onSerialize:S,onIframeLoad:E,iframeLoadTimeout:R,onStylesheetLoad:A,stylesheetLoadTimeout:w,keepIframeSrcFn:x=()=>!1}=t||{};return kn(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:b,slimDOMOptions:v===!0||v==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:C,inlineImages:f,recordCanvas:p,preserveWhiteSpace:k,onSerialize:S,onIframeLoad:E,iframeLoadTimeout:R,onStylesheetLoad:A,stylesheetLoadTimeout:w,keepIframeSrcFn:x,newlyAddedElement:!1})}function Ue(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const En=`Please stop import mirror directly. Instead of that,\r
|
|
493
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
494
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Ou={map:{},getId(){return console.error(En),-1},getNode(){return console.error(En),null},removeNodeFromMap(){console.error(En)},has(){return console.error(En),!1},reset(){console.error(En)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Ou=new Proxy(Ou,{get(e,t,n){return t==="map"&&console.error(En),Reflect.get(e,t,n)}}));function Sr(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();!o&&n.leading===!1&&(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(Mw(r),r=null),o=i,e.apply(c,s)):!r&&n.trailing!==!1&&(r=Es(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},a))}}function _p(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){Es(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>_p(e,t,s||{},!0)}function Ua(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}let Jo=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Jo=()=>new Date().getTime());function yp(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function Sp(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function bp(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ep(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ve(e,t,n,r,o){if(!e)return!1;const s=Ep(e);if(!s)return!1;const i=In(t,n);if(!o){const u=r&&s.matches(r);return i(s)&&!u}const a=tn(s,i);let c=-1;return a<0?!1:(r&&(c=tn(s,In(null,r))),a>-1&&c<0?!0:a<c)}function Tw(e,t){return t.getId(e)!==-1}function ti(e,t){return t.getId(e)===yr}function vp(e,t){if(dr(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?vp(e.parentNode,t):!0:!0}function Wi(e){return!!e.changedTouches}function Iw(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function wp(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Tp(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function ji(e){return!!e?.shadowRoot}class kw{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Ip(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Rw(e){let t=e,n;for(;n=Ip(t);)t=n;return t}function Cw(e){const t=e.ownerDocument;if(!t)return!1;const n=Rw(e);return t.contains(n)}function kp(e){const t=e.ownerDocument;return t?t.contains(e)||Cw(e):!1}const Nu={};function Ha(e){const t=Nu[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return Nu[e]=r.bind(window)}function xw(...e){return Ha("requestAnimationFrame")(...e)}function Es(...e){return Ha("setTimeout")(...e)}function Mw(...e){return Ha("clearTimeout")(...e)}var Q=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Q||{}),V=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(V||{}),Be=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Be||{}),mt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(mt||{}),vn=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(vn||{});function Wa(e){try{return e.contentDocument}catch{}}function Aw(e){try{return e.contentWindow}catch{}}function Lu(e){return"__ln"in e}class Ow{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Lu(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Lu(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Pu=(e,t)=>`${e}@${t}`;class Nw{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new Ow,o=c=>{let u=c,d=yr;for(;d===yr;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},s=c=>{if(!c.parentNode||!kp(c))return;const u=dr(c.parentNode)?this.mirror.getId(Ip(c)):this.mirror.getId(c.parentNode),d=o(c);if(u===-1||d===-1)return r.addNode(c);const l=kn(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{wp(f,this.mirror)&&!Ve(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),Tp(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),ji(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{Ve(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,p),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)}});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)Du(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||s(c);for(const c of this.addedSet)!Fu(this.droppedSet,c)&&!Du(this.removes,c,this.mirror)||Fu(this.movedSet,c)?s(c):this.droppedSet.add(c);let i=null;for(;r.length;){let c=null;if(i){const u=this.mirror.getId(i.value.parentNode),d=o(i.value);u!==-1&&d!==-1&&(c=i)}if(!c){let u=r.tail;for(;u;){const d=u;if(u=u.previous,d){const l=this.mirror.getId(d.value.parentNode);if(o(d.value)===-1)continue;if(l!==-1){c=d;break}else{const p=d.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.parentNode.host;if(this.mirror.getId(h)!==-1){c=d;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}i=c.previous,r.removeNode(c.value),s(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const d=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!ti(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Ve(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Gn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Ep(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){const i=$a(n),a=n.tagName;o=Ko(n,a,i);const c=Ss({maskInputOptions:this.maskInputOptions,tagName:a,type:i}),u=Gn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=_r({isMasked:u,element:n,value:o,maskInputFn:this.maskInputFn})}if(Ve(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!Wa(n))r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!mp(n.tagName,r)&&(s.attributes[r]=hp(this.doc,qn(n.tagName),qn(r),o,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const i=this.unattachedDoc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==i.style.getPropertyValue(a)||u!==i.style.getPropertyPriority(a)?u===""?s.styleDiff[a]=c:s.styleDiff[a]=[c,u]:s._unchangedStyles[a]=[c,u]}for(const a of Array.from(i.style))n.style.getPropertyValue(a)===""&&(s.styleDiff[a]=!1)}break}case"childList":{if(Ve(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=dr(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ve(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||ti(n,this.mirror)||!Tw(n,this.mirror)||(this.addedSet.has(n)?(zi(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||vp(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Pu(r,o)]?zi(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:dr(t.target)&&fr(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(ti(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Pu(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ve(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),ji(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function zi(e,t){e.delete(t),t.childNodes.forEach(n=>zi(e,n))}function Du(e,t,n){return e.length===0?!1:Lw(e,t,n)}function Lw(e,t,n){let r=t.parentNode;for(;r;){const o=n.getId(r);if(e.some(s=>s.id===o))return!0;r=r.parentNode}return!1}function Fu(e,t){return e.size===0?!1:Rp(e,t)}function Rp(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Rp(e,n):!1}let pr;function Pw(e){pr=e}function Dw(){pr=void 0}const se=e=>pr?(...n)=>{try{return e(...n)}catch(r){if(pr&&pr(r)===!0)return()=>{};throw r}}:e,Rn=[];function Hr(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Cp(e,t){const n=new Nw;Rn.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const s=new r(se(i=>{e.onMutation&&e.onMutation(i)===!1||n.processMutations.bind(n)(i)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Fw({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let i=[],a;const c=Sr(se(l=>{const f=Date.now()-a;e(i.map(p=>(p.timeOffset-=f,p)),l),i=[],a=null}),s),u=se(Sr(se(l=>{const f=Hr(l),{clientX:p,clientY:h}=Wi(l)?l.changedTouches[0]:l;a||(a=Jo()),i.push({x:p,y:h,id:r.getId(f),timeOffset:Jo()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?V.Drag:l instanceof MouseEvent?V.MouseMove:V.TouchMove)}),o,{trailing:!1})),d=[Ue("mousemove",u,n),Ue("touchmove",u,n),Ue("drag",u,n)];return se(()=>{d.forEach(l=>l())})}function $w({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,c=[];let u=null;const d=l=>f=>{const p=Hr(f);if(Ve(p,r,o,s,!0))return;let h=null,g=l;if("pointerType"in f){switch(f.pointerType){case"mouse":h=mt.Mouse;break;case"touch":h=mt.Touch;break;case"pen":h=mt.Pen;break}h===mt.Touch?Be[l]===Be.MouseDown?g="TouchStart":Be[l]===Be.MouseUp&&(g="TouchEnd"):mt.Pen}else Wi(f)&&(h=mt.Touch);h!==null?(u=h,(g.startsWith("Touch")&&h===mt.Touch||g.startsWith("Mouse")&&h===mt.Mouse)&&(h=null)):Be[l]===Be.Click&&(h=u,u=null);const _=Wi(f)?f.changedTouches[0]:f;if(!_)return;const b=n.getId(p),{clientX:v,clientY:C}=_;se(e)({type:Be[g],id:b,x:v,y:C,...h!==null&&{pointerType:h}})};return Object.keys(Be).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let f=qn(l);const p=d(l);if(window.PointerEvent)switch(Be[l]){case Be.MouseDown:case Be.MouseUp:f=f.replace("mouse","pointer");break;case Be.TouchStart:case Be.TouchEnd:return}c.push(Ue(f,p,t))}),se(()=>{c.forEach(l=>l())})}function xp({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){const a=se(Sr(se(c=>{const u=Hr(c);if(!u||Ve(u,r,o,s,!0))return;const d=n.getId(u);if(u===t&&t.defaultView){const l=yp(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return Ue("scroll",a,t)}function Bw({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=se(Sr(se(()=>{const s=Sp(),i=bp();(n!==s||r!==i)&&(e({width:Number(i),height:Number(s)}),n=s,r=i)}),200));return Ue("resize",o,t)}const Uw=["INPUT","TEXTAREA","SELECT"],$u=new WeakMap;function Hw({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:f,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:g}){function _(R){let A=Hr(R);const w=R.isTrusted,x=A&&Ui(A.tagName);if(x==="OPTION"&&(A=A.parentElement),!A||!x||Uw.indexOf(x)<0||Ve(A,r,o,s,!0))return;const B=A;if(B.classList.contains(i)||a&&B.matches(a))return;const I=$a(A);let O=Ko(B,x,I),U=!1;const F=Ss({maskInputOptions:c,tagName:x,type:I}),L=Gn(A,f,h,p,g,F);(I==="radio"||I==="checkbox")&&(U=A.checked),O=_r({isMasked:L,element:A,value:O,maskInputFn:u}),b(A,l?{text:O,isChecked:U,userTriggered:w}:{text:O,isChecked:U});const N=A.name;I==="radio"&&N&&U&&t.querySelectorAll(`input[type="radio"][name="${N}"]`).forEach(D=>{if(D!==A){const Y=_r({isMasked:L,element:D,value:Ko(D,x,I),maskInputFn:u});b(D,l?{text:Y,isChecked:!U,userTriggered:!1}:{text:Y,isChecked:!U})}})}function b(R,A){const w=$u.get(R);if(!w||w.text!==A.text||w.isChecked!==A.isChecked){$u.set(R,A);const x=n.getId(R);se(e)({...A,id:x})}}const C=(d.input==="last"?["change"]:["input","change"]).map(R=>Ue(R,se(_),t)),k=t.defaultView;if(!k)return()=>{C.forEach(R=>R())};const S=k.Object.getOwnPropertyDescriptor(k.HTMLInputElement.prototype,"value"),E=[[k.HTMLInputElement.prototype,"value"],[k.HTMLInputElement.prototype,"checked"],[k.HTMLSelectElement.prototype,"value"],[k.HTMLTextAreaElement.prototype,"value"],[k.HTMLSelectElement.prototype,"selectedIndex"],[k.HTMLOptionElement.prototype,"selected"]];return S&&S.set&&C.push(...E.map(R=>_p(R[0],R[1],{set(){se(_)({target:this,isTrusted:!1})}},!1,k))),se(()=>{C.forEach(R=>R())})}function Zo(e){const t=[];function n(r,o){if(oo("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||oo("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||oo("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||oo("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else if(r.parentStyleSheet){const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(e,t)}function Lt(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Ww({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:se((d,l,f)=>{const[p,h]=f,{id:g,styleId:_}=Lt(l,t,n.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,adds:[{rule:p,index:h}]}),d.apply(l,f)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:se((d,l,f)=>{const[p]=f,{id:h,styleId:g}=Lt(l,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,removes:[{index:p}]}),d.apply(l,f)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:se((d,l,f)=>{const[p]=f,{id:h,styleId:g}=Lt(l,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replace:p}),d.apply(l,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:se((d,l,f)=>{const[p]=f,{id:h,styleId:g}=Lt(l,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replaceSync:p}),d.apply(l,f)})}));const c={};so("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(so("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),so("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),so("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:se((f,p,h)=>{const[g,_]=h,{id:b,styleId:v}=Lt(p.parentStyleSheet,t,n.styleMirror);return(b&&b!==-1||v&&v!==-1)&&e({id:b,styleId:v,adds:[{rule:g,index:[...Zo(p),_||0]}]}),f.apply(p,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:se((f,p,h)=>{const[g]=h,{id:_,styleId:b}=Lt(p.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||b&&b!==-1)&&e({id:_,styleId:b,removes:[{index:[...Zo(p),g]}]}),f.apply(p,h)})})}),se(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function Mp({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const o=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(i){const a=s.set?.call(this,i);if(r!==null&&r!==-1)try{t.adoptStyleSheets(i,r)}catch{}return a}}),se(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function jw({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:se((a,c,u)=>{const[d,l,f]=u;if(n.has(d))return s.apply(c,[d,l,f]);const{id:p,styleId:h}=Lt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:d,value:l,priority:f},index:Zo(c.parentRule)}),a.apply(c,u)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:se((a,c,u)=>{const[d]=u;if(n.has(d))return i.apply(c,[d]);const{id:l,styleId:f}=Lt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||f&&f!==-1)&&e({id:l,styleId:f,remove:{property:d},index:Zo(c.parentRule)}),a.apply(c,u)})}),se(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}function zw({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=se(u=>Sr(se(d=>{const l=Hr(d);if(!l||Ve(l,t,n,r,!0))return;const{currentTime:f,volume:p,muted:h,playbackRate:g}=l;e({type:u,id:o.getId(l),currentTime:f,volume:p,muted:h,playbackRate:g})}),s.media||500)),c=[Ue("play",a(vn.Play),i),Ue("pause",a(vn.Pause),i),Ue("seeked",a(vn.Seeked),i),Ue("volumechange",a(vn.VolumeChange),i),Ue("ratechange",a(vn.RateChange),i)];return se(()=>{c.forEach(u=>u())})}function qw({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(c,u,d){const l=new s(c,u,d);return o.set(l,{family:c,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const i=Ua(t.fonts,"add",function(a){return function(c){return Es(se(()=>{const u=o.get(c);u&&(e(u),o.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=s}),r.push(i),se(()=>{r.forEach(a=>a())})}function Gw(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=se(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let f=0;f<l;f++){const p=u.getRangeAt(f),{startContainer:h,startOffset:g,endContainer:_,endOffset:b}=p;Ve(h,r,o,s,!0)||Ve(_,r,o,s,!0)||d.push({start:n.getId(h),startOffset:g,end:n.getId(_),endOffset:b})}i({ranges:d})});return c(),Ue("selectionchange",c)}function Vw({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Ua(n.customElements,"define",function(o){return function(s,i,a){try{t({define:{name:s}})}catch{}return o.apply(this,[s,i,a])}})}function Yw(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Cp(e,e.doc));const o=Fw(e),s=$w(e),i=xp(e),a=Bw(e,{win:n}),c=Hw(e),u=zw(e);let d=()=>{},l=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(d=Ww(e,{win:n}),l=Mp(e,e.doc),f=jw(e,{win:n}),e.collectFonts&&(p=qw(e)));const h=Gw(e),g=Vw(e),_=[];for(const b of e.plugins)_.push(b.observer(b.callback,n,b.options));return se(()=>{Rn.forEach(b=>b.reset()),r?.disconnect(),o(),s(),i(),a(),c(),u(),d(),l(),f(),p(),h(),g(),_.forEach(b=>b())})}function oo(e){return typeof window[e]<"u"}function so(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class qi{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){const s=r||this.getIdToRemoteIdMap(t),i=o||this.getRemoteIdToIdMap(t);let a=s.get(n);return a||(a=this.generateIdFn(),s.set(n,a),i.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,o))}getRemoteId(t,n,r){const o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=o.get(n);return s||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class Kw{constructor(){this.crossOriginIframeMirror=new qi(Ba),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Xw{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new qi(Ba),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new qi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=Wa(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const o=this.crossOriginIframeMap.get(t.source);if(!o)return;const s=this.transformCrossOriginEvent(o,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case Q.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:Q.IncrementalSnapshot,data:{source:V.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Q.Meta:case Q.Load:case Q.DomContentLoaded:return!1;case Q.Plugin:return n;case Q.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case Q.IncrementalSnapshot:switch(n.data.source){case V.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(r.node,o)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case V.Drag:case V.TouchMove:case V.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case V.ViewportResize:return!1;case V.MediaInteraction:case V.MouseInteraction:case V.Scroll:case V.CanvasMutation:case V.Input:return this.replaceIds(n.data,t,["id"]),n;case V.StyleSheetRule:case V.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case V.Font:return n;case V.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case V.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,o){for(const s of o)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Le.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Jw{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Zw{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!fr(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=Cp({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(xp({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Es(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Mp({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Wa(t),r=Aw(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Ua(t.prototype,"attachShadow",function(o){return function(s){const i=o.call(this,s);return this.shadowRoot&&kp(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var Bu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qw=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var io=0;io<Bu.length;io++)Qw[Bu.charCodeAt(io)]=io;class Uu{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class eT{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new kw,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},o=[];for(const s of t){let i;this.styleMirror.has(s)?i=this.styleMirror.getId(s):(i=this.styleMirror.add(s),o.push({styleId:i,rules:Array.from(s.rules||CSSRule,(a,c)=>({rule:cp(a),index:c}))})),r.styleIds.push(i)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class tT{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,xw(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let we,Qo;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Qe=tw();function bt(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:g,maskInputOptions:_,slimDOMOptions:b,maskAttributeFn:v,maskInputFn:C,maskTextFn:k,maxCanvasSize:S=null,packFn:E,sampling:R={},dataURLOptions:A={},mousemoveWait:w,recordDOM:x=!0,recordCanvas:B=!1,recordCrossOriginIframes:I=!1,recordAfter:O=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:U=!1,collectFonts:F=!1,inlineImages:L=!1,plugins:N,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:J,onMutation:m,getCanvasManager:T}=e;Pw(J);const H=I?window.parent===window:!0;let z=!1;if(!H)try{window.parent.document&&(z=!1)}catch{z=!0}if(H&&!t)throw new Error("emit function is required");if(!H&&!z)return()=>{};w!==void 0&&R.mousemove===void 0&&(R.mousemove=w),Qe.reset();const Z=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:_!==void 0?_:{},ae=b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:b==="all",headMetaDescKeywords:b==="all"}:b||{};Iw();let me,le=0;const de=ie=>{for(const Ze of N||[])Ze.eventProcessor&&(ie=Ze.eventProcessor(ie));return E&&!z&&(ie=E(ie)),ie};we=(ie,Ze)=>{const oe=ie;if(oe.timestamp=Jo(),Rn[0]?.isFrozen()&&oe.type!==Q.FullSnapshot&&!(oe.type===Q.IncrementalSnapshot&&oe.data.source===V.Mutation)&&Rn.forEach($e=>$e.unfreeze()),H)t?.(de(oe),Ze);else if(z){const $e={type:"rrweb",event:de(oe),origin:window.location.origin,isCheckout:Ze};window.parent.postMessage($e,"*")}if(oe.type===Q.FullSnapshot)me=oe,le=0;else if(oe.type===Q.IncrementalSnapshot){if(oe.data.source===V.Mutation&&oe.data.isAttachIframe)return;le++;const $e=r&&le>=r,ue=n&&me&&oe.timestamp-me.timestamp>n;($e||ue)&&Ms(!0)}};const Me=ie=>{we({type:Q.IncrementalSnapshot,data:{source:V.Mutation,...ie}})},be=ie=>we({type:Q.IncrementalSnapshot,data:{source:V.Scroll,...ie}}),Pe=ie=>we({type:Q.IncrementalSnapshot,data:{source:V.CanvasMutation,...ie}}),it=ie=>we({type:Q.IncrementalSnapshot,data:{source:V.AdoptedStyleSheet,...ie}}),ke=new eT({mutationCb:Me,adoptedStyleSheetCb:it}),Ae=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Kw:new Xw({mirror:Qe,mutationCb:Me,stylesheetManager:ke,recordCrossOriginIframes:I,wrappedEmit:we});for(const ie of N||[])ie.getMirror&&ie.getMirror({nodeMirror:Qe,crossOriginIframeMirror:Ae.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ae.crossOriginIframeStyleMirror});const at=new tT,Kt=rT(T,{mirror:Qe,win:window,mutationCb:ie=>we({type:Q.IncrementalSnapshot,data:{source:V.CanvasMutation,...ie}}),recordCanvas:B,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:S,sampling:R.canvas,dataURLOptions:A,errorHandler:J}),yn=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Jw:new Zw({mutationCb:Me,scrollCb:be,bypassOptions:{onMutation:m,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:Z,dataURLOptions:A,maskAttributeFn:v,maskTextFn:k,maskInputFn:C,recordCanvas:B,inlineImages:L,sampling:R,slimDOMOptions:ae,iframeManager:Ae,stylesheetManager:ke,canvasManager:Kt,keepIframeSrcFn:D,processedNodeManager:at},mirror:Qe}),Ms=(ie=!1)=>{if(!x)return;we({type:Q.Meta,data:{href:window.location.href,width:bp(),height:Sp()}},ie),ke.reset(),yn.init(),Rn.forEach(oe=>oe.lock());const Ze=ww(document,{mirror:Qe,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:Z,maskAttributeFn:v,maskInputFn:C,maskTextFn:k,slimDOM:ae,dataURLOptions:A,recordCanvas:B,inlineImages:L,onSerialize:oe=>{wp(oe,Qe)&&Ae.addIframe(oe),Tp(oe,Qe)&&ke.trackLinkElement(oe),ji(oe)&&yn.addShadowRoot(oe.shadowRoot,document)},onIframeLoad:(oe,$e)=>{Ae.attachIframe(oe,$e),oe.contentWindow&&Kt.addWindow(oe.contentWindow),yn.observeAttachShadow(oe)},onStylesheetLoad:(oe,$e)=>{ke.attachLinkElement(oe,$e)},keepIframeSrcFn:D});if(!Ze)return console.warn("Failed to snapshot the document");we({type:Q.FullSnapshot,data:{node:Ze,initialOffset:yp(window)}}),Rn.forEach(oe=>oe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ke.adoptStyleSheets(document.adoptedStyleSheets,Qe.getId(document))};Qo=Ms;try{const ie=[],Ze=$e=>se(Yw)({onMutation:m,mutationCb:Me,mousemoveCb:(ue,As)=>we({type:Q.IncrementalSnapshot,data:{source:As,positions:ue}}),mouseInteractionCb:ue=>we({type:Q.IncrementalSnapshot,data:{source:V.MouseInteraction,...ue}}),scrollCb:be,viewportResizeCb:ue=>we({type:Q.IncrementalSnapshot,data:{source:V.ViewportResize,...ue}}),inputCb:ue=>we({type:Q.IncrementalSnapshot,data:{source:V.Input,...ue}}),mediaInteractionCb:ue=>we({type:Q.IncrementalSnapshot,data:{source:V.MediaInteraction,...ue}}),styleSheetRuleCb:ue=>we({type:Q.IncrementalSnapshot,data:{source:V.StyleSheetRule,...ue}}),styleDeclarationCb:ue=>we({type:Q.IncrementalSnapshot,data:{source:V.StyleDeclaration,...ue}}),canvasMutationCb:Pe,fontCb:ue=>we({type:Q.IncrementalSnapshot,data:{source:V.Font,...ue}}),selectionCb:ue=>{we({type:Q.IncrementalSnapshot,data:{source:V.Selection,...ue}})},customElementCb:ue=>{we({type:Q.IncrementalSnapshot,data:{source:V.CustomElement,...ue}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:Z,inlineStylesheet:h,sampling:R,recordDOM:x,recordCanvas:B,inlineImages:L,userTriggeredOnInput:U,collectFonts:F,doc:$e,maskAttributeFn:v,maskInputFn:C,maskTextFn:k,keepIframeSrcFn:D,blockSelector:s,unblockSelector:i,slimDOMOptions:ae,dataURLOptions:A,mirror:Qe,iframeManager:Ae,stylesheetManager:ke,shadowDomManager:yn,processedNodeManager:at,canvasManager:Kt,ignoreCSSAttributes:Y,plugins:N?.filter(ue=>ue.observer)?.map(ue=>({observer:ue.observer,options:ue.options,callback:As=>we({type:Q.Plugin,data:{plugin:ue.name,payload:As}})}))||[]},{});Ae.addLoadListener($e=>{try{ie.push(Ze($e.contentDocument))}catch(ue){console.warn(ue)}});const oe=()=>{Ms(),ie.push(Ze(document))};return document.readyState==="interactive"||document.readyState==="complete"?oe():(ie.push(Ue("DOMContentLoaded",()=>{we({type:Q.DomContentLoaded,data:{}}),O==="DOMContentLoaded"&&oe()})),ie.push(Ue("load",()=>{we({type:Q.Load,data:{}}),O==="load"&&oe()},window))),()=>{ie.forEach($e=>$e()),at.destroy(),Qo=void 0,Dw()}}catch(ie){console.warn(ie)}}function nT(e){if(!Qo)throw new Error("please take full snapshot after start recording");Qo(e)}bt.mirror=Qe;bt.takeFullSnapshot=nT;function rT(e,t){try{return e?e(t):new Uu}catch{return console.warn("Unable to initialize CanvasManager"),new Uu}}var Hu;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Hu||(Hu={}));const oT=3,sT=5;function ja(e){return e>9999999999?e:e*1e3}function ni(e){return e>9999999999?e/1e3:e}function Wr(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Q.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ge(t,10,1e3)}}),t.category==="console")))}const iT="button,a";function Ap(e){return e.closest(iT)||e}function Op(e){const t=Np(e);return!t||!(t instanceof Element)?t:Ap(t)}function Np(e){return aT(e)?e.target:e}function aT(e){return typeof e=="object"&&!!e&&"target"in e}let Pt;function cT(e){return Pt||(Pt=[],uT()),Pt.push(e),()=>{const t=Pt?Pt.indexOf(e):-1;t>-1&&Pt.splice(t,1)}}function uT(){He(_e,"open",function(e){return function(...t){if(Pt)try{Pt.forEach(n=>n())}catch{}return e.apply(_e,t)}})}const lT=new Set([V.Mutation,V.StyleSheetRule,V.StyleDeclaration,V.AdoptedStyleSheet,V.CanvasMutation,V.Selection,V.MediaInteraction]);function dT(e,t,n){e.handleClick(t,n)}class fT{constructor(t,n,r=Wr){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=cT(()=>{this._lastMutation=Wu()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(hT(n,this._ignoreSelector)||!mT(t))return;const r={timestamp:ni(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=ni(t)}registerScroll(t=Date.now()){this._lastScroll=ni(t)}registerClick(t){const n=Ap(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=Wu();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,s=!r&&!o,{clickCount:i,clickBreadcrumb:a}=t;if(s){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:_e.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,d);return}if(i>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:_e.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Ur(()=>this._checkClicks(),1e3)}}const pT=["A","BUTTON","INPUT"];function hT(e,t){return!!(!pT.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function mT(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Wu(){return Date.now()/1e3}function gT(e,t){try{if(!_T(t))return;const{source:n}=t.data;if(lT.has(n)&&e.registerMutation(t.timestamp),n===V.Scroll&&e.registerScroll(t.timestamp),yT(t)){const{type:r,id:o}=t.data,s=bt.mirror.getNode(o);s instanceof HTMLElement&&r===Be.Click&&e.registerClick(s)}}catch{}}function _T(e){return e.type===oT}function yT(e){return e.data.source===V.MouseInteraction}function dt(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var za=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(za||{});const ST=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function bT(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(ST.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const ET=e=>t=>{if(!e.isEnabled())return;const n=vT(t);if(!n)return;const r=t.name==="click",o=r?t.event:void 0;r&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&dT(e.clickDetector,n,Op(t.event)),Wr(e,n)};function Lp(e,t){const n=bt.mirror.getId(e),r=n&&bt.mirror.getNode(n),o=r&&bt.mirror.getMeta(r),s=o&&TT(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(i=>i.type===za.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:bT(s.attributes)}}:{}}}function vT(e){const{target:t,message:n}=wT(e);return dt({category:`ui.${e.name}`,...Lp(t,n)})}function wT(e){const t=e.name==="click";let n,r=null;try{r=t?Op(e.event):Np(e.event),n=Je(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function TT(e){return e.type===za.Element}function IT(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=kT(t);n&&Wr(e,n)}function kT(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||RT(i)||!s)return null;const a=t||r||o,c=s.length===1;if(!a&&c)return null;const u=Je(i,{maxStringLength:200})||"<unknown>",d=Lp(i,u);return dt({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}function RT(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const CT={resource:NT,paint:AT,navigation:OT};function ao(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function xT(e){return e.map(MT).filter(Boolean)}function MT(e){const t=CT[e.entryType];return t?t(e):null}function Vn(e){return((Fe()||_e.performance.timeOrigin)+e)/1e3}function AT(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=Vn(o);return{type:n,name:r,start:s,end:s+t,data:void 0}}function OT(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:f,startTime:p,transferSize:h,type:g}=e;return o===0?null:{type:`${t}.${g}`,start:Vn(p),end:Vn(s),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:l,domComplete:s,redirectCount:f}}}function NT(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Vn(s),end:Vn(o),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function LT(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return vs(e,"largest-contentful-paint",n)}function PT(e){return e.sources!==void 0}function DT(e){const t=[],n=[];for(const r of e.entries)if(PT(r)){const o=[];for(const s of r.sources)if(s.node){n.push(s.node);const i=bt.mirror.getId(s.node);i&&o.push(i)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return vs(e,"cumulative-layout-shift",n,t)}function FT(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return vs(e,"first-input-delay",n)}function $T(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return vs(e,"interaction-to-next-paint",n)}function vs(e,t,n,r){const o=e.value,s=e.rating,i=Vn(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(a=>bt.mirror.getId(a)):void 0,attributions:r}}}function BT(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(o=>{r.push(dn(o,n))}),r.push(xa(ao(LT,e)),Ca(ao(DT,e)),Nf(ao(FT,e)),Lf(ao($T,e))),()=>{r.forEach(o=>o())}}const W=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,UT='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]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(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,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(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},_=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},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=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:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(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,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}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 s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),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=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+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(U,C,0),R=U;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[s[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=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(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;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[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=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),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(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[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-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),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(s),32768),this.s.z=n.length-s+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.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(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 B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function HT(){const e=new Blob([UT]);return URL.createObjectURL(e)}const ju=["log","warn","error"],Io="[Replay] ";function ri(e,t="info"){st({category:"console",data:{logger:"replay"},level:t,message:`${Io}${e}`},{level:t})}function WT(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return W?(ju.forEach(r=>{n[r]=(...o)=>{y[r](Io,...o),t&&ri(o.join(""),_a(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),y.error(Io,r),e?zt(r):t&&ri(r,"error")},n.infoTick=(...r)=>{y.log(Io,...r),t&&setTimeout(()=>ri(r[0]),0)}):ju.forEach(r=>{n[r]=()=>{}}),n}const j=WT();class qa extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Fa}.`)}}class Pp{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Fa)throw new qa;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?ja(t):null}}class jT{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){W&&j.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((o,s)=>{const i=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",i),!c.success){W&&j.error("Error in compression worker: ",c.response),s(new Error("Error in compression worker"));return}o(c.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class zT{constructor(t){this._worker=new jT(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=ja(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Fa?Promise.reject(new qa):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{W&&j.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");return this._earliestTimestamp=null,this._totalSize=0,t}}class qT{constructor(t){this._fallback=new Pp,this._compression=new zT(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}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}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){W&&j.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,o=[];for(const s of t)o.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(s){W&&j.exception(s,"Failed to add events when switching buffers.")}}}function GT({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=VT(t);if(n)return n}return W&&j.log("Using simple buffer"),new Pp}function VT(e){try{const t=e||YT();if(!t)return;W&&j.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new qT(n)}catch(t){W&&j.exception(t,"Failed to create compression worker")}}function YT(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?HT():""}function Ga(){try{return"sessionStorage"in _e&&!!_e.sessionStorage}catch{return!1}}function KT(e){XT(),e.session=void 0}function XT(){if(Ga())try{_e.sessionStorage.removeItem(Pa)}catch{}}function Dp(e){return e===void 0?!1:Math.random()<e}function Va(e){if(Ga())try{_e.sessionStorage.setItem(Pa,JSON.stringify(e))}catch{}}function Fp(e){const t=Date.now(),n=e.id||We(),r=e.started||t,o=e.lastActivity||t,s=e.segmentId||0,i=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:o,segmentId:s,sampled:i,previousSessionId:a}}function JT(e,t){return Dp(e)?"session":t?"buffer":!1}function zu({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=JT(e,t),s=Fp({sampled:o,previousSessionId:r});return n&&Va(s),s}function ZT(){if(!Ga())return null;try{const e=_e.sessionStorage.getItem(Pa);if(!e)return null;const t=JSON.parse(e);return W&&j.infoTick("Loading existing session"),Fp(t)}catch{return null}}function Gi(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function $p(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Gi(e.started,t,r)||Gi(e.lastActivity,n,r)}function Bp(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!$p(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function oi({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&ZT();return o?Bp(o,{sessionIdleExpire:e,maxReplayDuration:t})?(W&&j.infoTick("Session in sessionStorage is expired, creating new one..."),zu(r,{previousSessionId:o.id})):o:(W&&j.infoTick("Creating new session"),zu(r,{previousSessionId:n}))}function QT(e){return e.type===Q.Custom}function Ya(e,t,n){return Hp(e,t)?(Up(e,t,n),!0):!1}function eI(e,t,n){return Hp(e,t)?Up(e,t,n):Promise.resolve(null)}async function Up(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o=e.recordingMode==="buffer";try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=e.getOptions(),i=tI(t,s.beforeAddRecordingEvent);return i?await r.addEvent(i):void 0}catch(s){const i=s&&s instanceof qa,a=i?"addEventSizeExceeded":"addEvent";if(i&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(s),await e.stop({reason:a});const c=P();c&&c.recordDroppedEvent("internal_sdk_error","replay")}}function Hp(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=ja(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(W&&j.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function tI(e,t){try{if(typeof t=="function"&&QT(e))return t(e)}catch(n){return W&&j.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Ka(e){return!e.type}function Vi(e){return e.type==="transaction"}function nI(e){return e.type==="replay_event"}function qu(e){return e.type==="feedback"}function rI(e){return(t,n)=>{if(!e.isEnabled()||!Ka(t)&&!Vi(t))return;const r=n?.statusCode;if(!(!r||r<200||r>=300)){if(Vi(t)){oI(e,t);return}sI(e,t)}}}function oI(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function sI(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||Ur(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function iI(e){return t=>{!e.isEnabled()||!Ka(t)||aI(e,t)}}function aI(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(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 r=dt({category:"replay.hydrate-error",data:{url:fn()}});Wr(e,r)}}function cI(e){const t=P();t&&t.on("beforeAddBreadcrumb",n=>uI(e,n))}function uI(e,t){if(!e.isEnabled()||!Wp(t))return;const n=lI(t);n&&Wr(e,n)}function lI(e){return!Wp(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?dI(e):dt(e)}function dI(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return dt(e);let n=!1;const r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>ro?(n=!0,`${o.slice(0,ro)}…`):o;if(typeof o=="object")try{const s=Ge(o,7);return JSON.stringify(s).length>ro?(n=!0,`${JSON.stringify(s,null,2).slice(0,ro)}…`):s}catch{}return o});return dt({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Wp(e){return!!e.category}function fI(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function jp(){const e=K().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ie();if(t){const n=ot(t);delete n.replay_id}}function pI(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Q.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function hI(e,t){return e.recordingMode!=="buffer"||t.message===Da||!t.exception||t.type?!1:Dp(e.getOptions().errorSampleRate)}function mI(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:nI(t)?(delete t.breadcrumbs,t):!Ka(t)&&!Vi(t)&&!qu(t)?t:e.checkAndHandleExpiredSession()?qu(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),pI(e,t),t):fI(t,n)&&!e.getOptions()._experiments.captureExceptions?(W&&j.log("Ignoring error from rrweb internals",t),null):((hI(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(jp(),t),{id:"Replay"})}function ws(e,t){return t.map(({type:n,start:r,end:o,name:s,data:i})=>{const a=e.throttledAddEvent({type:Q.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:o,data:i}}});return typeof a=="string"?Promise.resolve(null):a})}function gI(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function _I(e){return t=>{if(!e.isEnabled())return;const n=gI(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(ws(e,[n]),!1)))}}function yI(e,t){return W&&e.getOptions()._experiments.traceInternals?!1:Od(t,P())}function zp(e,t){e.isEnabled()&&t!==null&&(yI(e,t.name)||e.addUpdate(()=>(ws(e,[t]),!0)))}function Ts(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=Hf(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function qp(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function es(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Gp(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:s,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:s,statusCode:i,request:a,response:c}}}function br(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Ft(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=SI(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function Yi(e,t){return Object.entries(e).reduce((n,[r,o])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=o),n},{})}function SI(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Iu,n=bI(e);if(t){const r=e.slice(0,Iu);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function bI(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function ts(e,t){const n=EI(e);return nt(n,t)}function EI(e,t=_e.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(_e.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function vI(e,t,n){try{const r=await TI(e,t,n),o=Gp("resource.fetch",r);zp(n.replay,o)}catch(r){W&&j.exception(r,"Failed to capture fetch breadcrumb")}}function wI(e,t){const{input:n,response:r}=t,o=n?Na(n):void 0,s=Ts(o),i=r?qp(r.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}async function TI(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:d}=e.data,l=ts(i,n.networkDetailAllowUrls)&&!ts(i,n.networkDetailDenyUrls),f=l?II(n,t.input,u):br(u),p=await kI(l,n,t.response,d);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:f,response:p}}function II({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?xI(n,t):{};if(!e)return Ft(o,r,void 0);const s=Na(n),[i,a]=Vo(s,j),c=Ft(o,r,i);return a?es(c,a):c}async function kI(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return br(o);const s=r?Vp(r.headers,n):{};if(!r||!t&&o!==void 0)return Ft(s,o,void 0);const[i,a]=await CI(r),c=RI(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?es(c,a):c}function RI(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&n===void 0?Ts(e):n;return r?t?Ft(o,s,e):Ft(o,s,void 0):br(s)}catch(s){return W&&j.exception(s,"Failed to serialize response body"),Ft(o,n,void 0)}}async function CI(e){const t=MI(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await AI(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(W&&j.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(W&&j.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function Vp(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function xI(e,t){return e.length===1&&typeof e[0]!="string"?Gu(e[0],t):e.length===2?Gu(e[1],t):{}}function Gu(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Vp(n,t):Array.isArray(n)?{}:Yi(n,t):{}}function MI(e){try{return e.clone()}catch(t){W&&j.exception(t,"Failed to clone response body")}}function AI(e){return new Promise((t,n)=>{const r=Ur(()=>n(new Error("Timeout while trying to read response body")),500);OI(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function OI(e){return await e.text()}async function NI(e,t,n){try{const r=PI(e,t,n),o=Gp("resource.xhr",r);zp(n.replay,o)}catch(r){W&&j.exception(r,"Failed to capture xhr breadcrumb")}}function LI(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=Ts(r),s=n.getResponseHeader("content-length")?qp(n.getResponseHeader("content-length")):BI(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}function PI(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:u,status_code:d=0,request_body_size:l,response_body_size:f}=e.data;if(!c)return null;if(!a||!ts(c,n.networkDetailAllowUrls)||ts(c,n.networkDetailDenyUrls)){const E=br(l),R=br(f);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:d,request:E,response:R}}const p=a[_t],h=p?Yi(p.request_headers,n.networkRequestHeaders):{},g=Yi(DI(a),n.networkResponseHeaders),[_,b]=n.networkCaptureBodies?Vo(i,j):[void 0],[v,C]=n.networkCaptureBodies?FI(a):[void 0],k=Ft(h,l,_),S=Ft(g,f,v);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:d,request:b?es(k,b):k,response:C?es(S,C):S}}function DI(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
495
|
+
`).reduce((n,r)=>{const[o,s]=r.split(": ");return s&&(n[o.toLowerCase()]=s),n},{}):{}}function FI(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return $I(e.response,e.responseType)}catch(n){t.push(n)}return W&&j.warn("Failed to get xhr response body",...t),[void 0]}function $I(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return W&&j.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return W&&j.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function BI(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Ts(n)}catch{return}}function UI(e){const t=P();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(c,u)=>HI(a,c,u))}catch{}}function HI(e,t,n){if(t.data)try{WI(t)&&zI(n)&&(LI(t,n),NI(t,n,e)),jI(t)&&qI(n)&&(wI(t,n),vI(t,n,e))}catch(r){W&&j.exception(r,"Error when enriching network breadcrumb")}}function WI(e){return e.category==="xhr"}function jI(e){return e.category==="fetch"}function zI(e){return e?.xhr}function qI(e){return e?.response}function GI(e,{autoFlushOnFeedback:t}){const n=P();Uf(ET(e)),ys(_I(e)),cI(e),UI(e);const r=mI(e);md(r),n&&(n.on("beforeSendEvent",iI(e)),n.on("afterSendEvent",rI(e)),n.on("createDsc",o=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(o.replay_id=s)}),n.on("spanStart",o=>{e.lastActiveSpan=o}),n.on("spanEnd",o=>{e.lastActiveSpan=o}),n.on("beforeSendFeedback",async(o,s)=>{const i=e.getSessionId();s?.includeReplay&&e.isEnabled()&&i&&o.contexts?.feedback&&(o.contexts.feedback.source==="api"&&t&&await e.flush(),o.contexts.feedback.replay_id=i)}),t&&n.on("openFeedbackWidget",async()=>{await e.flush()}))}async function VI(e){try{return Promise.all(ws(e,[YI(_e.performance.memory)]))}catch{return[]}}function YI(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function KI(e,t,n){return v_(e,t,{...n,setTimeoutImpl:Ur})}const co=G.navigator;function XI(){return/iPhone|iPad|iPod/i.test(co?.userAgent??"")||/Macintosh/i.test(co?.userAgent??"")&&co?.maxTouchPoints&&co?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function JI(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){W&&j.warn("Received replay event after session expired.");return}const o=r||!t;t=!0,e.clickDetector&&gT(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!Ya(e,n,o))return!0;if(!o)return!1;const s=e.session;if(QI(e,o),e.recordingMode==="buffer"&&s&&e.eventBuffer){const i=e.eventBuffer.getEarliestTimestamp();i&&(W&&j.log(`Updating session start time to earliest event in buffer to ${new Date(i)}`),s.started=i,e.getOptions().stickySession&&Va(s))}return s?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function ZI(e){const t=e.getOptions();return{type:Q.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function QI(e,t){!t||!e.session||e.session.segmentId!==0||Ya(e,ZI(e),!1)}function e1(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function t1(e,t,n,r){return Mt(id(e,ca(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function n1({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
496
|
+
`;if(typeof e=="string")n=`${r}${e}`;else{const s=new TextEncoder().encode(r);n=new Uint8Array(s.length+e.length),n.set(s),n.set(e,s.length)}return n}async function r1({client:e,scope:t,replayId:n,event:r}){const o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,s={event_id:n,integrations:o};e.emit("preprocessEvent",r,s);const i=await fd(e.getOptions(),r,s,t,e,Ne());if(!i)return null;e.emit("postprocessEvent",i,s),i.platform=i.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u}=a?.sdk||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},i}async function o1({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=n1({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:d}=r,l=P(),f=K(),p=l?.getTransport(),h=l?.getDsn();if(!l||!p||!h||!s.sampled)return kt({});const g={type:L0,replay_start_timestamp:d/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},_=await r1({scope:f,client:l,replayId:t,event:g});if(!_)return l.recordDroppedEvent("event_processor","replay"),W&&j.log("An event processor returned `null`, will not send event."),kt({});delete _.sdkProcessingMetadata;const b=t1(_,i,h,l.getOptions().tunnel);let v;try{v=await p.send(b)}catch(k){const S=new Error(Da);try{S.cause=k}catch{}throw S}if(typeof v.statusCode=="number"&&(v.statusCode<200||v.statusCode>=300))throw new Yp(v.statusCode);const C=xd({},v);if(Cd(C,"replay"))throw new Xa(C);return v}class Yp extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Xa extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Kp(e,t={count:0,interval:U0}){const{recordingData:n,onError:r}=e;if(n.length)try{return await o1(e),!0}catch(o){if(o instanceof Yp||o instanceof Xa)throw o;if(fa("Replays",{_retryCount:t.count}),r&&r(o),t.count>=H0){const s=new Error(`${Da} - max retries exceeded`);try{s.cause=o}catch{}throw s}return t.interval*=++t.count,new Promise((s,i)=>{Ur(async()=>{try{await Kp(e,t),s(!0)}catch(a){i(a)}},t.interval)})}}const Xp="__THROTTLED",s1="__SKIPPED";function i1(e,t,n){const r=new Map,o=a=>{const c=a-n;r.forEach((u,d)=>{d<c&&r.delete(d)})},s=()=>[...r.values()].reduce((a,c)=>a+c,0);let i=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(o(c),s()>=t){const d=i;return i=!0,d?s1:Xp}i=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class a1{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:P0,sessionIdleExpire:D0},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=KI(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=i1((i,a)=>eI(this,i,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),s=r?{threshold:Math.min(W0,r),timeout:r,scrollTimeout:j0,ignoreSelector:o?o.join(","):""}:void 0;if(s&&(this.clickDetector=new fT(this,s)),W){const i=t._experiments;j.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}this._handleVisibilityChange=()=>{_e.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const i=dt({category:"ui.blur"});this._doChangeToBackgroundTasks(i)},this._handleWindowFocus=()=>{const i=dt({category:"ui.focus"});this._doChangeToForegroundTasks(i)},this._handleKeyboardEvent=i=>{IT(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){W&&j.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){W&&j.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",W&&j.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){W&&j.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){W&&j.log("Buffering is in progress, call `flush()` to save the replay");return}W&&j.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=oi({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled){W&&j.log("Buffering is in progress, call `flush()` to save the replay");return}W&&j.infoTick("Starting replay in buffer mode");const t=oi({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=bt({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:B0}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:JI(this),...XI(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{W&&j.log(`Stopping Replay${n?` triggered by ${n}`:""}`),jp(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,KT(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),W&&j.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),W&&j.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();W&&j.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Gi(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${_e.location.pathname}${_e.location.hash}${_e.location.search}`,n=`${_e.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===Xp){const o=dt({category:"replay.throttled"});this.addUpdate(()=>!Ya(this,{type:sT,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Ie(),n=t&&Re(t),o=(n&&q(n).data||{})[ye];if(!(!n||!o||!["route","custom"].includes(o)))return q(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=GT({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=oi({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return Bp(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{_e.document.addEventListener("visibilitychange",this._handleVisibilityChange),_e.addEventListener("blur",this._handleWindowBlur),_e.addEventListener("focus",this._handleWindowFocus),_e.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(GI(this,{autoFlushOnFeedback:this._options._experiments.autoFlushOnFeedback}),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=BT(this)}_removeListeners(){try{_e.document.removeEventListener("visibilitychange",this._handleVisibilityChange),_e.removeEventListener("blur",this._handleWindowBlur),_e.removeEventListener("focus",this._handleWindowFocus),_e.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||$p(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){W&&j.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:Q.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=xT(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(ws(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_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};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){W&&j.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await VI(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await Kp({replayId:t,recordingData:s,segmentId:o,eventContext:r,session:this.session,timestamp:n,onError:i=>this.handleException(i)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=P();if(r){const o=n instanceof Xa?"ratelimit_backoff":"send_error";r.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){W&&j.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();const s=o<this._options.minReplayDuration,i=o>this._options.maxReplayDuration+5e3;if(s||i){W&&j.log(`Session duration (${Math.floor(o/1e3)}s) is too ${s?"short":"long"}, not sending replay.`),s&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&W&&j.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Va(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=e1(a.target),u=n.join(",");return c?.matches(u)}))return!1;const r=t.length,o=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=o&&r>o;if(r>s||i){const a=dt({category:"replay.mutations",data:{count:r,limit:i}});this._createCustomBreadcrumb(a)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function ir(e,t){return[...e,...t].join(",")}function c1({mask:e,unmask:t,block:n,unblock:r,ignore:o}){const s=["base","iframe[srcdoc]:not([src])"],i=ir(e,[".sentry-mask","[data-sentry-mask]"]),a=ir(t,[]);return{maskTextSelector:i,unmaskTextSelector:a,blockSelector:ir(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:ir(r,[]),ignoreSelector:ir(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function u1({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){return!r||o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?s:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s}const Vu='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',l1=["content-length","content-type","accept"];let Yu=!1;const d1=e=>new f1(e);class f1{constructor({flushMinDelay:t=F0,flushMaxDelay:n=$0,minReplayDuration:r=z0,maxReplayDuration:o=ku,stickySession:s=!0,useCompression:i=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:_=[],networkDetailDenyUrls:b=[],networkCaptureBodies:v=!0,networkRequestHeaders:C=[],networkResponseHeaders:k=[],mask:S=[],maskAttributes:E=["title","placeholder","aria-label"],unmask:R=[],block:A=[],unblock:w=[],ignore:x=[],maskFn:B,beforeAddRecordingEvent:I,beforeErrorSampling:O,onError:U}={}){this.name="Replay";const F=c1({mask:S,unmask:R,block:A,unblock:w,ignore:x});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:B,maskInputFn:B,maskAttributeFn:(L,N,D)=>u1({maskAttributes:E,maskAllText:u,privacyOptions:F,key:L,value:N,el:D}),...F,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:L=>{try{L.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,q0),maxReplayDuration:Math.min(o,ku),stickySession:s,useCompression:i,workerUrl:a,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:g,networkDetailAllowUrls:_,networkDetailDenyUrls:b,networkCaptureBodies:v,networkRequestHeaders:Ku(C),networkResponseHeaders:Ku(k),beforeAddRecordingEvent:I,beforeErrorSampling:O,onError:U,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Vu}`:Vu),this._isInitialized&&Ci())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Yu}set _isInitialized(t){Yu=t}afterAllSetup(t){!Ci()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay?.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=p1(this._initialOptions,t);this._replay=new a1({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function p1(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=cn(n.replaysSessionSampleRate),s=cn(n.replaysOnErrorSampleRate);return o==null&&s==null&&qt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),s!=null&&(r.errorSampleRate=s),r}function Ku(e){return[...l1,...e.map(t=>t.toLowerCase())]}function h1(){return P()?.getIntegrationByName("Replay")}var m1=Object.defineProperty,g1=(e,t,n)=>t in e?m1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xu=(e,t,n)=>g1(e,typeof t!="symbol"?t+"":t,n);class _1{constructor(){Xu(this,"idNodeMap",new Map),Xu(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-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 n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function y1(){return new _1}function S1(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ki(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ki(e.parentNode,t,n,r+1)}function Ju(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(S1(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const wn=`Please stop import mirror directly. Instead of that,\r
|
|
497
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
498
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Zu={map:{},getId(){return console.error(wn),-1},getNode(){return console.error(wn),null},removeNodeFromMap(){console.error(wn)},has(){return console.error(wn),!1},reset(){console.error(wn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Zu=new Proxy(Zu,{get(e,t,n){return t==="map"&&console.error(wn),Reflect.get(e,t,n)}}));function Ja(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){Zp(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>Ja(e,t,s||{},!0)}function Za(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function b1(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Is(e,t,n,r,o){if(!e)return!1;const s=b1(e);if(!s)return!1;const i=Ju(t,n),a=Ki(s,i);let c=-1;return a<0?!1:(r&&(c=Ki(s,Ju(null,r))),a>-1&&c<0?!0:a<c)}const Qu={};function Jp(e){const t=Qu[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return Qu[e]=r.bind(window)}function Xt(...e){return Jp("requestAnimationFrame")(...e)}function Zp(...e){return Jp("setTimeout")(...e)}var Yn=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Yn||{});let ko;function E1(e){ko=e}const si=e=>ko?(...n)=>{try{return e(...n)}catch(r){if(ko&&ko(r)===!0)return()=>{};throw r}}:e;var Cn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var uo=0;uo<Cn.length;uo++)v1[Cn.charCodeAt(uo)]=uo;var w1=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=Cn[t[n]>>2],o+=Cn[(t[n]&3)<<4|t[n+1]>>4],o+=Cn[(t[n+1]&15)<<2|t[n+2]>>6],o+=Cn[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const el=new Map;function T1(e,t){let n=el.get(e);return n||(n=new Map,el.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const Qp=(e,t,n)=>{if(!e||!(th(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=T1(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function Ro(e,t,n){if(e instanceof Array)return e.map(r=>Ro(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=w1(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ro(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Ro(e.data,t,n),e.width,e.height]};if(th(e,t)||typeof e=="object"){const r=e.constructor.name,o=Qp(e,t,n);return{rr_type:r,index:o}}}}return e}const eh=(e,t,n)=>e.map(r=>Ro(r,t,n)),th=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function I1(e,t,n,r,o){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=Za(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...d){return Is(this.canvas,n,r,o,!0)||Zp(()=>{const l=eh(d,t,this);e(this.canvas,{type:Yn["2D"],property:a,args:l})},0),u.apply(this,d)}});s.push(c)}catch{const c=Ja(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:Yn["2D"],property:a,args:[u],setter:!0})}});s.push(c)}return()=>{s.forEach(a=>a())}}function k1(e){return e==="experimental-webgl"?"webgl":e}function tl(e,t,n,r,o){const s=[];try{const i=Za(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Is(this,t,n,r,!0)){const d=k1(c);if("__context"in this||(this.__context=d),o&&["webgl","webgl2"].includes(d))if(u[0]&&typeof u[0]=="object"){const l=u[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});s.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(i=>i())}}function nl(e,t,n,r,o,s,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const d of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;const l=Za(e,d,function(f){return function(...p){const h=f.apply(this,p);if(Qp(h,a,this),"tagName"in this.canvas&&!Is(this.canvas,r,o,s,!0)){const g=eh(p,a,this),_={type:t,property:d,args:g};n(this.canvas,_)}return h}});c.push(l)}catch{const l=Ja(e,d,{set(f){n(this.canvas,{type:t,property:d,args:[f],setter:!0})}});c.push(l)}return c}function R1(e,t,n,r,o,s){const i=[];return i.push(...nl(t.WebGLRenderingContext.prototype,Yn.WebGL,e,n,r,o,s,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...nl(t.WebGL2RenderingContext.prototype,Yn.WebGL2,e,n,r,o,s,t)),()=>{i.forEach(a=>a())}}const C1='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 x1(){const e=new Blob([C1]);return URL.createObjectURL(e)}class M1{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=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(l,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(f)};const{sampling:n="all",win:r,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:a,recordCanvas:c,dataURLOptions:u,errorHandler:d}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,d&&E1(d),(c&&typeof n=="number"||t.enableManualSnapshot)&&(this.worker=this.initFPSWorker()),this.addWindow(r),!t.enableManualSnapshot&&si(()=>{c&&n==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),c&&typeof n=="number"&&this.initCanvasFPSObserver(n,o,s,i,a,{dataURLOptions:u})})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:s,recordCanvas:i,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}si(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(t,r,o,s),i&&typeof n=="number"){const c=tl(t,r,o,s,!0);this.restoreHandlers.push(()=>{c()})}})(),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(x1());return t.onmessage=n=>{const r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;const{base64:s,type:i,width:a,height:c}=r;this.mutationCb({id:o,type:Yn["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:i}]},0,0,a,c]}]})},t}initCanvasFPSObserver(t,n,r,o,s,i){const a=this.takeSnapshot(!1,t,n,r,o,s,i.dataURLOptions);this.restoreHandlers.push(()=>{cancelAnimationFrame(a)})}initCanvasMutationObserver(t,n,r,o){const s=tl(t,n,r,o,!1),i=I1(this.processMutation.bind(this),t,n,r,o),a=R1(this.processMutation.bind(this),t,n,r,o,this.mirror);this.restoreHandlers.push(()=>{s(),i(),a()})}snapshot(t){const{options:n}=this,r=this.takeSnapshot(!0,n.sampling==="all"?2:n.sampling||2,n.blockClass,n.blockSelector,n.unblockSelector,n.maxCanvasSize,n.dataURLOptions,t);this.restoreHandlers.push(()=>{cancelAnimationFrame(r)})}takeSnapshot(t,n,r,o,s,i,a,c){const u=1e3/n;let d;const l=p=>{if(p)return[p];const h=[],g=_=>{_.querySelectorAll("canvas").forEach(b=>{Is(b,r,o,s)||h.push(b)})};for(const _ of this.windows){const b=_.deref();let v;try{v=b&&b.document}catch{}v&&g(v)}for(const _ of this.shadowDoms){const b=_.deref();b&&g(b)}return h},f=p=>{if(this.windows.length){if(this.lastSnapshotTime&&p-this.lastSnapshotTime<u){d=Xt(f);return}this.lastSnapshotTime=p,l(c).forEach(h=>{if(!this.mirror.hasNode(h))return;const g=this.mirror.getId(h);if(!this.snapshotInProgressMap.get(g)&&!(!h.width||!h.height)){if(this.snapshotInProgressMap.set(g,!0),!t&&["webgl","webgl2"].includes(h.__context)){const _=h.getContext(h.__context);_?.getContextAttributes()?.preserveDrawingBuffer===!1&&_.clear(_.COLOR_BUFFER_BIT)}createImageBitmap(h).then(_=>{this.worker?.postMessage({id:g,bitmap:_,width:h.width,height:h.height,dataURLOptions:a,maxCanvasSize:i},[_])}).catch(_=>{si(()=>{throw _})()})}}),t||(d=Xt(f))}};return d=Xt(f),d}startPendingCanvasMutationFlusher(){Xt(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Xt(t)};Xt(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Xt(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(i=>{const{type:a,...c}=i;return c}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}y1();var rl;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(rl||(rl={}));const ol={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}}},A1="ReplayCanvas",lo=1280,O1=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,lo):lo,n?Math.min(n,lo):lo]};let o;const s=new Promise(i=>o=i);return{name:A1,getOptions(){const{quality:i,enableManualSnapshot:a,maxCanvasSize:c}=r;return{enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:u=>{const d=new M1({...u,enableManualSnapshot:a,maxCanvasSize:c,errorHandler:l=>{try{typeof l=="object"&&(l.__rrweb__=!0)}catch{}}});return o(d),d},...ol[i]||ol.medium}},async snapshot(i){(await s).snapshot(i)}}},N1=O1;function ct(e=0){return((Fe()||performance.timeOrigin)+e)/1e3}function L1(e){const t=[];if(e.nextHopProtocol!=null){const{name:n,version:r}=Ff(e.nextHopProtocol);t.push(["network.protocol.version",r],["network.protocol.name",n])}return Fe()?[...t,["http.request.redirect_start",ct(e.redirectStart)],["http.request.fetch_start",ct(e.fetchStart)],["http.request.domain_lookup_start",ct(e.domainLookupStart)],["http.request.domain_lookup_end",ct(e.domainLookupEnd)],["http.request.connect_start",ct(e.connectStart)],["http.request.secure_connection_start",ct(e.secureConnectionStart)],["http.request.connection_end",ct(e.connectEnd)],["http.request.request_start",ct(e.requestStart)],["http.request.response_start",ct(e.responseStart)],["http.request.response_end",ct(e.responseEnd)]]:t}const sl=new WeakMap,ii=new Map,Qa={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function nh(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:a,onRequestSpanStart:c}={...Qa,...t},u=typeof s=="function"?s:f=>!0,d=f=>D1(f,a),l={};n&&(e.addEventProcessor(f=>(f.type==="transaction"&&f.spans&&f.spans.forEach(p=>{if(p.op==="http.client"){const h=ii.get(p.span_id);h&&(p.timestamp=h/1e3,ii.delete(p.span_id))}}),f)),o&&Xy(f=>{if(f.response){const p=sl.get(f.response);p&&f.endTimestamp&&ii.set(p,f.endTimestamp)}}),ya(f=>{const p=Fy(f,u,d,l);if(f.response&&f.fetchData.__span&&sl.set(f.response,f.fetchData.__span),p){const h=rh(f.fetchData.url),g=h?sn(h).host:void 0;p.setAttributes({"http.url":h,"server.address":g}),i&&il(p),c?.(p,{headers:f.headers})}})),r&&Oa(f=>{const p=F1(f,u,d,l);if(p){i&&il(p);let h;try{h=new Headers(f.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(p,{headers:h})}})}function P1(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function il(e){const{url:t}=q(e).data;if(!t||typeof t!="string")return;const n=dn("resource",({entries:r})=>{r.forEach(o=>{P1(o)&&o.name.endsWith(t)&&(L1(o).forEach(i=>e.setAttribute(...i)),setTimeout(n))})})}function D1(e,t){const n=fn();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}const s=r.origin===o;return t?nt(r.toString(),t)||s&&nt(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?nt(e,t):r}}function F1(e,t,n,r){const o=e.xhr,s=o?.[_t];if(!o||o.__sentry_own_request__||!s)return;const{url:i,method:a}=s,c=Wt()&&t(i);if(e.endTimestamp&&c){const g=o.__sentry_xhr_span_id__;if(!g)return;const _=r[g];_&&s.status_code!==void 0&&(mr(_,s.status_code),_.end(),delete r[g]);return}const u=rh(i),d=sn(u||i),l=Yd(i),f=!!Ie(),p=c&&f?Xe({name:`${a} ${l}`,attributes:{url:i,type:"xhr","http.method":a,"http.url":u,"server.address":d?.host,[re]:"auto.http.browser",[Ce]:"http.client",...d?.search&&{"http.query":d?.search},...d?.hash&&{"http.fragment":d?.hash}}}):new It;o.__sentry_xhr_span_id__=p.spanContext().spanId,r[o.__sentry_xhr_span_id__]=p,n(i)&&$1(o,Wt()&&f?p:void 0);const h=P();return h&&h.emit("beforeOutgoingRequestSpan",p,e),p}function $1(e,t){const{"sentry-trace":n,baggage:r}=ma({span:t});n&&B1(e,n,r)}function B1(e,t,n){const r=e.__sentry_xhr_v3__?.request_headers;if(!r?.["sentry-trace"])try{if(e.setRequestHeader("sentry-trace",t),n){const o=r?.baggage;(!o||!U1(o))&&e.setRequestHeader("baggage",n)}}catch{}}function U1(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function rh(e){try{return new URL(e,$.location.origin).href}catch{return}}function H1(){$.document?$.document.addEventListener("visibilitychange",()=>{const e=Ie();if(!e)return;const t=Re(e);if($.document.hidden&&t){const n="cancelled",{op:r,status:o}=q(t);te&&y.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o||t.setStatus({code:Te,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):te&&y.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const W1=3600,oh="sentry_previous_trace",j1="sentry.previous_trace";function z1(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let o=r?V1():void 0;e.on("spanStart",i=>{if(Re(i)!==i)return;const a=K().getPropagationContext();o=q1(o,i,a),r&&G1(o)});let s=!0;n&&e.on("beforeSampling",i=>{if(!o)return;const a=K(),c=a.getPropagationContext();if(s&&c.parentSpanId){s=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(o.sampleRate),sampled:String(Xi(o.spanContext))},sampleRand:o.sampleRand}),i.parentSampled=Xi(o.spanContext),i.parentSampleRate=o.sampleRate,i.spanAttributes={...i.spanAttributes,[$l]:o.sampleRate}})}function q1(e,t,n){const r=q(t);function o(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[is])}catch{return 0}}const s={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return s;const i=e.spanContext;return i.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=W1&&(te&&y.log(`Adding previous_trace ${i} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:i,attributes:{[gm]:"previous_trace"}}),t.setAttribute(j1,`${i.traceId}-${i.spanId}-${Xi(i)?1:0}`)),s)}function G1(e){try{$.sessionStorage.setItem(oh,JSON.stringify(e))}catch(t){te&&y.warn("Could not store previous trace in sessionStorage",t)}}function V1(){try{const e=$.sessionStorage?.getItem(oh);return JSON.parse(e)}catch{return}}function Xi(e){return e.traceFlags===1}const Y1="BrowserTracing",K1={...ho,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...Qa},rr=(e={})=>{const t={name:void 0,source:void 0},n=$.document,{enableInp:r,enableElementTiming:o,enableLongTask:s,enableLongAnimationFrame:i,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:d,idleTimeout:l,finalTimeout:f,childSpanTimeout:p,markBackgroundSpan:h,traceFetch:g,traceXHR:_,trackFetchStreamPerformance:b,shouldCreateSpanForRequest:v,enableHTTPTimings:C,ignoreResourceSpans:k,ignorePerformanceApiSpans:S,instrumentPageLoad:E,instrumentNavigation:R,detectRedirects:A,linkPreviousTrace:w,consistentTraceSampling:x,onRequestSpanStart:B}={...K1,...e};let I,O;function U(F,L,N=!0){const D=L.op==="pageload",Y=d?d(L):L,J=Y.attributes||{};if(L.name!==Y.name&&(J[ye]="custom",Y.attributes=J),!N){const H=pn();Xe({...Y,startTime:H}).end(H);return}t.name=Y.name,t.source=J[ye];const m=ld(Y,{idleTimeout:l,finalTimeout:f,childSpanTimeout:p,disableAutoFinish:D,beforeSpanEnd:H=>{I?.(),AE(H,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:k,ignorePerformanceApiSpans:S}),cl(F,void 0);const z=K(),Z=z.getPropagationContext();z.setPropagationContext({...Z,traceId:m.spanContext().traceId,sampled:hn(m),dsc:ot(H)})}});cl(F,m);function T(){n&&["interactive","complete"].includes(n.readyState)&&F.emit("idleSpanEnableAutoFinish",m)}D&&n&&(n.addEventListener("readystatechange",()=>{T()}),T())}return{name:Y1,setup(F){if(Ql(),I=wE({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:F}),r&&QE(),o&&HE(),i&&G.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?IE():s&&TE(),a&&kE(),A&&n){const N=()=>{O=Ee()};addEventListener("click",N,{capture:!0}),addEventListener("keydown",N,{capture:!0,passive:!0})}function L(){const N=Er(F);N&&!q(N).timestamp&&(te&&y.log(`[Tracing] Finishing current active span with op: ${q(N).op}`),N.setAttribute(Oo,"cancelled"),N.end())}F.on("startNavigationSpan",(N,D)=>{if(P()!==F)return;if(D?.isRedirect){te&&y.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),U(F,{op:"navigation.redirect",...N},!1);return}L(),Ne().setPropagationContext({traceId:Tt(),sampleRand:Math.random()});const Y=K();Y.setPropagationContext({traceId:Tt(),sampleRand:Math.random()}),Y.setSDKProcessingMetadata({normalizedRequest:void 0}),U(F,{op:"navigation",...N})}),F.on("startPageLoadSpan",(N,D={})=>{if(P()!==F)return;L();const Y=D.sentryTrace||al("sentry-trace"),J=D.baggage||al("baggage"),m=ql(Y,J),T=K();T.setPropagationContext(m),T.setSDKProcessingMetadata({normalizedRequest:Ta()}),U(F,{op:"pageload",...N})})},afterAllSetup(F){let L=fn();if(w!=="off"&&z1(F,{linkPreviousTrace:w,consistentTraceSampling:x}),$.location){if(E){const N=Fe();or(F,{name:$.location.pathname,startTime:N?N/1e3:void 0,attributes:{[ye]:"url",[re]:"auto.pageload.browser"}})}R&&ys(({to:N,from:D})=>{if(D===void 0&&L?.indexOf(N)!==-1){L=void 0;return}L=void 0;const Y=Vd(N),J=Er(F),m=J&&A&&J1(J,O);sr(F,{name:Y?.pathname||$.location.pathname,attributes:{[ye]:"url",[re]:"auto.navigation.browser"}},{url:N,isRedirect:m})})}h&&H1(),a&&X1(F,l,f,p,t),r&&nv(),nh(F,{traceFetch:g,traceXHR:_,trackFetchStreamPerformance:b,tracePropagationTargets:F.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:v,enableHTTPTimings:C,onRequestSpanStart:B})}}};function or(e,t,n){e.emit("startPageLoadSpan",t,n),K().setTransactionName(t.name);const r=Er(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function sr(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});const s=K();return s.setTransactionName(t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...Ta(),url:r}}),Er(e)}function al(e){return $.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function X1(e,t,n,r,o){const s=$.document;let i;const a=()=>{const c="ui.action.click",u=Er(e);if(u){const d=q(u).op;if(["navigation","pageload"].includes(d)){te&&y.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(Oo,"interactionInterrupted"),i.end(),i=void 0),!o.name){te&&y.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=ld({name:o.name,op:c,attributes:{[ye]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};s&&addEventListener("click",a,{capture:!0})}const sh="_sentry_idleSpan";function Er(e){return e[sh]}function cl(e,t){je(e,sh,t)}const ul=.3;function J1(e,t){const n=q(e),r=pn(),o=n.start_timestamp;return!(r-o>ul||t&&r-t<=ul)}function Kn(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Z1(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Kn(n);return o=>r.then(s=>o(s.transaction(t,"readwrite").objectStore(t)))}function ec(e){return Kn(e.getAllKeys())}function Q1(e,t,n){return e(r=>ec(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),Kn(r.transaction)}))}function ek(e,t,n){return e(r=>ec(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),Kn(r.transaction)}))}function tk(e){return e(t=>ec(t).then(n=>{const r=n[0];if(r!=null)return Kn(t.get(r)).then(o=>(t.delete(r),Kn(t.transaction).then(()=>o)))}))}function nk(e){let t;function n(){return t==null&&(t=Z1(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const o=await Po(r);await Q1(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const o=await Po(r);await ek(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await tk(n());if(r)return zm(r)}catch{}}}}function rk(e){return t=>{const n=e({...t,createStore:nk});return $.addEventListener("online",async r=>{await n.flush()}),n}}function ok(e=La){return rk(f_(e))}const ll=1e6,Co=String(0),sk="main",ns=$.navigator;let ih="",ah="",ch="",Ji=ns?.userAgent||"",uh="";const ik=ns?.language||ns?.languages?.[0]||"";function ak(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const dl=ns?.userAgentData;ak(dl)&&dl.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(ih=e.platform||"",ch=e.architecture||"",uh=e.model||"",ah=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];Ji=`${t.brand} ${t.version}`}}).catch(e=>{});function ck(e){return!("thread_metadata"in e)}function uk(e){return ck(e)?fk(e):e}function lk(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&te&&y.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function dk(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const o=lk(r),s=uk(n),i=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Ee()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:Ee()*1e3;return{event_id:e,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||as,runtime:{name:"javascript",version:$.navigator.userAgent},os:{name:ih,version:ah,build_number:Ji},device:{locale:ik,model:uh,manufacturer:Ji,architecture:ch,is_emulator:!1},debug_meta:{images:mk(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||We(),trace_id:o,active_thread_id:Co,relative_start_ns:"0",relative_end_ns:((a-i)*1e6).toFixed(0)}]}}function lh(e){return q(e).op==="pageload"}function fk(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Co]:{name:sk}}},o=e.samples[0];if(!o)return r;const s=o.timestamp,i=Fe(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:i||0,c=a-(i||a);return e.samples.forEach((u,d)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[d]={elapsed_since_start_ns:((u.timestamp+c-s)*ll).toFixed(0),stack_id:t,thread_id:Co};return}let l=e.stacks[u.stackId];const f=[];for(;l;){f.push(l.frameId);const h=e.frames[l.frameId];h&&r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:h.name,abs_path:typeof h.resourceId=="number"?e.resources[h.resourceId]:void 0,lineno:h.line,colno:h.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}const p={elapsed_since_start_ns:((u.timestamp+c-s)*ll).toFixed(0),stack_id:n,thread_id:Co};r.stacks[n]=f,r.samples[d]=p,n++}),r}function pk(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function hk(e){const t=[];return un(e,(n,r)=>{if(r==="transaction")for(let o=1;o<n.length;o++)n[o]?.contexts?.profile?.profile_id&&t.push(n[o])}),t}function mk(e){const r=P()?.getOptions()?.stackParser;return r?bg(r,e):[]}function gk(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(te&&y.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(te&&y.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function _k(e){return e.samples.length<2?(te&&y.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(te&&y.log("[Profiling] Discarding profile because it contains no frames"),!1)}let dh=!1;const fh=3e4;function yk(e){return typeof e=="function"}function Sk(){const e=$.Profiler;if(!yk(e)){te&&y.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(fh/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{te&&(y.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),y.log("[Profiling] Disabling profiling for current user session.")),dh=!0}}function fl(e){if(dh)return te&&y.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return te&&y.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const n=P()?.getOptions();if(!n)return te&&y.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return gk(r)?r?(r===!0?!0:Math.random()<r)?!0:(te&&y.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(te&&y.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(te&&y.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function bk(e,t,n,r){return _k(n)?dk(e,t,n,r):null}const nn=new Map;function Ek(){return nn.size}function vk(e){const t=nn.get(e);return t&&nn.delete(e),t}function wk(e,t){if(nn.set(e,t),nn.size>30){const n=nn.keys().next().value;nn.delete(n)}}function pl(e){let t;lh(e)&&(t=Ee()*1e3);const n=Sk();if(!n)return;te&&y.log(`[Profiling] started profiling span: ${q(e).description}`);const r=We();K().setContext("profile",{profile_id:r,start_timestamp:t});async function o(){if(e&&n)return n.stop().then(c=>{if(s&&($.clearTimeout(s),s=void 0),te&&y.log(`[Profiling] stopped profiling of span: ${q(e).description}`),!c){te&&y.log(`[Profiling] profiler returned null profile for: ${q(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}wk(r,c)}).catch(c=>{te&&y.log("[Profiling] error while stopping profiler:",c)})}let s=$.setTimeout(()=>{te&&y.log("[Profiling] max profile duration elapsed, stopping profiling for:",q(e).description),o()},fh);const i=e.end.bind(e);function a(){return e?(o().then(()=>{i()},()=>{i()}),e):i()}e.end=a}const Tk="BrowserProfiling",Ik=()=>({name:Tk,setup(e){const t=Ie(),n=t&&Re(t);n&&lh(n)&&fl(n)&&pl(n),e.on("spanStart",r=>{r===Re(r)&&fl(r)&&pl(r)}),e.on("beforeEnvelope",r=>{if(!Ek())return;const o=hk(r);if(!o.length)return;const s=[];for(const i of o){const a=i?.contexts,c=a?.profile?.profile_id,u=a?.profile?.start_timestamp;if(typeof c!="string"){te&&y.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!c){te&&y.log("[Profiling] cannot find profile for a span without a profile context");continue}a?.profile&&delete a.profile;const d=vk(c);if(!d){te&&y.log(`[Profiling] Could not retrieve profile for span: ${c}`);continue}const l=bk(c,u,d,i);l&&s.push(l)}pk(r,s)})}}),kk=Ik,Rk="SpotlightBrowser",Ck=(e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:Rk,setup:()=>{te&&y.log("Using Sidecar URL",t)},processEvent:n=>Ak(n)?null:n,afterAllSetup:n=>{xk(n,t)}}};function xk(e,t){const n=Aa("fetch");let r=0;e.on("beforeEnvelope",o=>{if(r>3){y.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:Po(o),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(s=>{s.status>=200&&s.status<400&&(r=0)},s=>{r++,y.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",s)})})}const Mk=Ck;function Ak(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}const Ok=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Lr(e)}});function Nk(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Fn(e,t.value),$n(e,t.value)}}}const Lk=()=>({name:"OpenFeature",processEvent(e,t,n){return Lr(e)}});class Pk{after(t,n){Fn(n.flagKey,n.value),$n(n.flagKey,n.value)}error(t,n,r){Fn(t.flagKey,t.defaultValue),$n(t.flagKey,t.defaultValue)}}const Dk=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;He(t,"isEnabled",Fk)},processEvent(t,n,r){return Lr(t)}});function Fk(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(Fn(n,r),$n(n,r)):te&&y.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const $k=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{Fn(n.gate.name,n.gate.value),$n(n.gate.name,n.gate.value)})},processEvent(t,n,r){return Lr(t)}});async function Bk(){const e=P();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";try{await fetch("https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7",{body:"{}",method:"POST",mode:"cors",credentials:"omit"})}catch{return"sentry-unreachable"}}const Uk="WebWorker",Hk=({worker:e})=>({name:Uk,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>hl(t))},addWorker:t=>hl(t)});function hl(e){e.addEventListener("message",t=>{jk(t.data)&&(t.stopImmediatePropagation(),te&&y.log("Sentry debugId web worker message received",t.data),$._sentryDebugIds={...t.data._sentryDebugIds,...$._sentryDebugIds})})}function Wk({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0})}function jk(e){return vt(e)&&e._sentryMessage===!0&&"_sentryDebugIds"in e&&(vt(e._sentryDebugIds)||e._sentryDebugIds===void 0)}function zk(e){const t={...e};return Ld(t,"react"),fa("react",{version:Oe.version}),n0(t)}function qk(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function Gk(e,t){const n=new WeakSet;function r(o,s){if(!n.has(o)){if(o.cause)return n.add(o),r(o.cause,s);o.cause=s}}r(e,t)}function tc(e,{componentStack:t},n){if(qk(Oe.version)&&St(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,Gk(e,r)}return qe(r=>(r.setContext("react",{componentStack:t}),zt(e,n)))}function Vk(e){return(t,n)=>{const r=tc(t,n);e&&e(t,n,r)}}const ph="ui.react.render",Yk="ui.react.update",hh="ui.react.mount";var ai={exports:{}},ce={};var ml;function Kk(){if(ml)return ce;ml=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,l=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function C(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case c:case u:case r:case s:case o:case l:return S;default:switch(S=S&&S.$$typeof,S){case a:case d:case h:case p:case i:return S;default:return E}}case n:return E}}}function k(S){return C(S)===u}return ce.AsyncMode=c,ce.ConcurrentMode=u,ce.ContextConsumer=a,ce.ContextProvider=i,ce.Element=t,ce.ForwardRef=d,ce.Fragment=r,ce.Lazy=h,ce.Memo=p,ce.Portal=n,ce.Profiler=s,ce.StrictMode=o,ce.Suspense=l,ce.isAsyncMode=function(S){return k(S)||C(S)===c},ce.isConcurrentMode=k,ce.isContextConsumer=function(S){return C(S)===a},ce.isContextProvider=function(S){return C(S)===i},ce.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ce.isForwardRef=function(S){return C(S)===d},ce.isFragment=function(S){return C(S)===r},ce.isLazy=function(S){return C(S)===h},ce.isMemo=function(S){return C(S)===p},ce.isPortal=function(S){return C(S)===n},ce.isProfiler=function(S){return C(S)===s},ce.isStrictMode=function(S){return C(S)===o},ce.isSuspense=function(S){return C(S)===l},ce.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===u||S===s||S===o||S===l||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===h||S.$$typeof===p||S.$$typeof===i||S.$$typeof===a||S.$$typeof===d||S.$$typeof===_||S.$$typeof===b||S.$$typeof===v||S.$$typeof===g)},ce.typeOf=C,ce}var gl;function Xk(){return gl||(gl=1,ai.exports=Kk()),ai.exports}var ci,_l;function Jk(){if(_l)return ci;_l=1;var e=Xk(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[e.ForwardRef]=r,s[e.Memo]=o;function i(h){return e.isMemo(h)?o:s[h.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,l=Object.getPrototypeOf,f=Object.prototype;function p(h,g,_){if(typeof g!="string"){if(f){var b=l(g);b&&b!==f&&p(h,b,_)}var v=c(g);u&&(v=v.concat(u(g)));for(var C=i(h),k=i(g),S=0;S<v.length;++S){var E=v[S];if(!n[E]&&!(_&&_[E])&&!(k&&k[E])&&!(C&&C[E])){var R=d(g,E);try{a(h,E,R)}catch{}}}}return h}return ci=p,ci}var Zk=Jk();const mh=vl(Zk),Qk=Object.freeze(Object.defineProperty({__proto__:null,default:mh},Symbol.toStringTag,{value:"Module"})),ks=mh||Qk,eR="unknown";class nc extends Oe.Component{constructor(t){super(t);const{name:n,disabled:r=!1}=this.props;r||(this._mountSpan=Xe({name:`<${n}>`,onlyIfParent:!0,op:hh,attributes:{[re]:"auto.ui.react.profiler","ui.component_name":n}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:t,includeUpdates:n=!0}){if(n&&this._mountSpan&&t!==this.props.updateProps){const r=Object.keys(t).filter(o=>t[o]!==this.props.updateProps[o]);if(r.length>0){const o=Ee();this._updateSpan=ln(this._mountSpan,()=>Xe({name:`<${this.props.name}>`,onlyIfParent:!0,op:Yk,startTime:o,attributes:{[re]:"auto.ui.react.profiler","ui.component_name":this.props.name,"ui.react.changed_props":r}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const t=Ee(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const o=q(this._mountSpan).timestamp;ln(this._mountSpan,()=>{const s=Xe({onlyIfParent:!0,name:`<${n}>`,op:ph,startTime:o,attributes:{[re]:"auto.ui.react.profiler","ui.component_name":n}});s&&s.end(t)})}}render(){return this.props.children}}Object.assign(nc,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function tR(e,t){const n=t?.name||e.displayName||e.name||eR,r=o=>Oe.createElement(nc,{...t,name:n,updateProps:o},Oe.createElement(e,{...o}));return r.displayName=`profiler(${n})`,ks(r,e),r}function nR(e,t={disabled:!1,hasRenderSpan:!0}){const[n]=Oe.useState(()=>{if(!t?.disabled)return Xe({name:`<${e}>`,onlyIfParent:!0,op:hh,attributes:{[re]:"auto.ui.react.profiler","ui.component_name":e}})});Oe.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){const r=q(n).timestamp,o=Ee(),s=Xe({name:`<${e}>`,onlyIfParent:!0,op:ph,startTime:r,attributes:{[re]:"auto.ui.react.profiler","ui.component_name":e}});s&&s.end(o)}}),[])}const jr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rR="unknown",ui={componentStack:null,error:null,eventId:null};class gh extends Oe.Component{constructor(t){super(t),this.state=ui,this._openFallbackReportDialog=!0;const n=P();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&Bi({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,{beforeCapture:o,onError:s,showDialog:i,dialogOptions:a}=this.props;qe(c=>{o&&o(c,t,r);const u=this.props.handled!=null?this.props.handled:!!this.props.fallback,d=tc(t,n,{mechanism:{handled:u}});s&&s(t,r,d),i&&(this._lastEventId=d,this._openFallbackReportDialog&&Bi({...a,eventId:d})),this.setState({error:t,componentStack:r,eventId:d})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:o}=this.props;o&&(this.state===ui?o(null,null,null):o(t,n,r)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:t}=this.props,{error:n,componentStack:r,eventId:o}=this.state;t&&t(n,r,o),this.setState(ui)}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.componentStack===null)return typeof n=="function"?n():n;const o=typeof t=="function"?Oe.createElement(t,{error:r.error,componentStack:r.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:r.eventId}):t;return Oe.isValidElement(o)?o:(t&&jr&&y.warn("fallback did not produce a valid ReactElement"),null)}}function oR(e,t){const n=e.displayName||e.name||rR,r=o=>Oe.createElement(gh,{...t},Oe.createElement(e,{...o}));return r.displayName=`errorBoundary(${n})`,ks(r,e),r}const sR="redux.action",iR="info",aR={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function cR(e){const t={...aR,...e};return n=>(r,o)=>{t.attachReduxState&&xr().addEventProcessor((a,c)=>{try{a.type===void 0&&a.contexts.state.state.type==="redux"&&(c.attachments=[...c.attachments||[],{filename:"redux_state.json",data:JSON.stringify(a.contexts.state.state.value)}])}catch{}return a});function s(a){return(c,u)=>{const d=a(c,u),l=K(),f=t.actionTransformer(u);typeof f<"u"&&f!==null&&st({category:sR,data:f,type:iR});const p=t.stateTransformer(d);if(typeof p<"u"&&p!==null){const b=P()?.getOptions()?.normalizeDepth||3,v={state:{type:"redux",value:p}};je(v,"__sentry_override_normalization_depth__",3+b),l.setContext("state",v)}else l.setContext("state",null);const{configureScopeWithState:h}=t;return typeof h=="function"&&h(l,d),d}}const i=n(s(r),o);return i.replaceReducer=new Proxy(i.replaceReducer,{apply:function(a,c,u){a.apply(c,[s(u[0])])}}),i}}function uR(e){const t=rr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),s&&$.location&&yl(r,$.location,o,(c,u="url")=>{or(a,{name:c,attributes:{[Ce]:"pageload",[re]:"auto.pageload.react.reactrouter_v3",[ye]:u}})}),i&&n.listen&&n.listen(c=>{(c.action==="PUSH"||c.action==="POP")&&yl(r,c,o,(u,d="url")=>{sr(a,{name:u,attributes:{[Ce]:"navigation",[re]:"auto.navigation.react.reactrouter_v3",[ye]:d}})})})}}}function yl(e,t,n,r){let o=t.pathname;n({location:t,routes:e},(s,i,a)=>{if(s||!a)return r(o);const c=lR(a.routes||[]);return c.length===0||c==="/*"?r(o):(o=c,r(o,"route"))})}function lR(e){if(!Array.isArray(e)||e.length===0)return"";const t=e.filter(r=>!!r.path);let n=-1;for(let r=t.length-1;r>=0;r--)if(t[r].path?.startsWith("/")){n=r;break}return t.slice(n).reduce((r,{path:o})=>{const s=r==="/"||r===""?o:`/${o}`;return`${r}${s}`},"")}function dR(e,t={}){const n=e,r=rr({...t,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:o=!0,instrumentNavigation:s=!0}=t;return{...r,afterAllSetup(i){r.afterAllSetup(i);const a=$.location;if(o&&a){const c=n.matchRoutes(a.pathname,n.options.parseSearch(a.search),{preload:!1,throwOnError:!1}),u=c[c.length-1];or(i,{name:u?u.routeId:a.pathname,attributes:{[Ce]:"pageload",[re]:"auto.pageload.react.tanstack_router",[ye]:u?"route":"url",...Sl(u)}})}s&&n.subscribe("onBeforeNavigate",c=>{if(c.toLocation.state===c.fromLocation?.state)return;const u=n.matchRoutes(c.toLocation.pathname,c.toLocation.search,{preload:!1,throwOnError:!1}),d=u[u.length-1],l=$.location,f=sr(i,{name:d?d.routeId:l.pathname,attributes:{[Ce]:"navigation",[re]:"auto.navigation.react.tanstack_router",[ye]:d?"route":"url"}}),p=n.subscribe("onResolved",h=>{if(p(),f){const g=n.matchRoutes(h.toLocation.pathname,h.toLocation.search,{preload:!1,throwOnError:!1}),_=g[g.length-1];_&&(f.updateName(_.routeId),f.setAttribute(ye,"route"),f.setAttributes(Sl(_)))}})})}}}function Sl(e){if(!e)return{};const t={};return Object.entries(e.params).forEach(([n,r])=>{t[`url.path.params.${n}`]=r,t[`url.path.parameter.${n}`]=r,t[`params.${n}`]=r}),t}function fR(e){const t=rr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),_h(a,s,i,n,"reactrouter_v4",r,o)}}}function pR(e){const t=rr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),_h(a,s,i,n,"reactrouter_v5",r,o)}}}function _h(e,t,n,r,o,s=[],i){function a(){if(r.location)return r.location.pathname;if($.location)return $.location.pathname}function c(u){if(s.length===0||!i)return[u,"url"];const d=yh(s,u,i);for(const l of d)if(l.match.isExact)return[l.match.path,"route"];return[u,"url"]}if(t){const u=a();if(u){const[d,l]=c(u);or(e,{name:d,attributes:{[Ce]:"pageload",[re]:`auto.pageload.react.${o}`,[ye]:l}})}}n&&r.listen&&r.listen((u,d)=>{if(d&&(d==="PUSH"||d==="POP")){const[l,f]=c(u.pathname);sr(e,{name:l,attributes:{[Ce]:"navigation",[re]:`auto.navigation.react.${o}`,[ye]:f}})}})}function yh(e,t,n,r=[]){return e.some(o=>{const s=o.path?n(t,o):r.length?r[r.length-1].match:hR(t);return s&&(r.push({route:o,match:s}),o.routes&&yh(o.routes,t,n,r)),!!s}),r}function hR(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function mR(e){const t=e.displayName||e.name,n=r=>{if(r?.computedMatch?.isExact){const o=r.computedMatch.path,s=gR();K().setTransactionName(o),s&&(s.updateName(o),s.setAttribute(ye,"route"))}return Oe.createElement(e,{...r})};return n.displayName=`sentryRoute(${t})`,ks(n,e),n}function gR(){const e=Ie(),t=e&&Re(e);if(!t)return;const n=q(t).op;return n==="navigation"||n==="pageload"?t:void 0}let $t,Bt,Ut,xo,ht,xn=!1;const Sh=new WeakSet,ft=new Set;function bh(e,t){return!$t||!Bt||!Ut||!ht?(jr&&y.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`),e):function(n,r){Rs(n);const o=e(n,r),s=r?.basename,i=xs();return o.state.historyAction==="POP"&&i&&Cs(i,o.state.location,n,void 0,s,Array.from(ft)),o.subscribe(a=>{(a.historyAction==="PUSH"||a.historyAction==="POP")&&(a.navigation.state!=="idle"?requestAnimationFrame(()=>{vr({location:a.location,routes:n,navigationType:a.historyAction,version:t,basename:s,allRoutes:Array.from(ft)})}):vr({location:a.location,routes:n,navigationType:a.historyAction,version:t,basename:s,allRoutes:Array.from(ft)}))}),o}}function Eh(e,t){return!$t||!Bt||!Ut||!ht?(jr&&y.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createMemoryRouter\` function because of one or more missing parameters.`),e):function(n,r){Rs(n);const o=e(n,r),s=r?.basename,i=xs();let a;const c=r?.initialEntries,u=r?.initialIndex,d=c&&c.length===1,l=u!==void 0&&c&&c[u];a=d?c[0]:l?c[u]:void 0;const f=a?typeof a=="string"?{pathname:a}:a:o.state.location;return o.state.historyAction==="POP"&&i&&Cs(i,f,n,void 0,s,Array.from(ft)),o.subscribe(p=>{const h=p.location;(p.historyAction==="PUSH"||p.historyAction==="POP")&&vr({location:h,routes:n,navigationType:p.historyAction,version:t,basename:s,allRoutes:Array.from(ft)})}),o}}function vh(e,t){const n=rr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:o,useNavigationType:s,createRoutesFromChildren:i,matchRoutes:a,stripBasename:c,instrumentPageLoad:u=!0,instrumentNavigation:d=!0}=e;return{...n,setup(l){n.setup(l),$t=r,Bt=o,Ut=s,ht=a,xo=i,xn=c||!1},afterAllSetup(l){n.afterAllSetup(l);const f=$.location?.pathname;u&&f&&or(l,{name:f,attributes:{[ye]:"url",[Ce]:"pageload",[re]:`auto.pageload.react.reactrouter_v${t}`}}),d&&Sh.add(l)}}}function wh(e,t){if(!$t||!Bt||!Ut||!ht)return jr&&y.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),e;const n=r=>{const o=Oe.useRef(!0),{routes:s,locationArg:i}=r,a=e(s,i),c=Bt(),u=Ut(),d=typeof i=="string"||i?.pathname?i:c;return $t(()=>{const l=typeof d=="string"?{pathname:d}:d;o.current?(Rs(s),Cs(xs(),l,s,void 0,void 0,Array.from(ft)),o.current=!1):vr({location:l,routes:s,navigationType:u,version:t,allRoutes:Array.from(ft)})},[u,d]),a};return(r,o)=>Oe.createElement(n,{routes:r,locationArg:o})}function vr(e){const{location:t,routes:n,navigationType:r,version:o,matches:s,basename:i,allRoutes:a}=e,c=Array.isArray(s)?s:ht(n,t,i),u=P();if(!(!u||!Sh.has(u))&&(r==="PUSH"||r==="POP")&&c){let d,l="url";const f=Ih(t,a||n);f&&(d=wr(rc(a||n,t)),l="route"),(!f||!d)&&([d,l]=Rh(n,t,c,i));const p=Ie();p&&q(p).op==="navigation"?(p?.updateName(d),p?.setAttribute(ye,l)):sr(u,{name:d,attributes:{[ye]:l,[Ce]:"navigation",[re]:`auto.navigation.react.reactrouter_v${o}`}})}}function rs(e,t){if(!t||t==="/"||!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?e:e.slice(n)||"/"}function _R(e,t,n){const r=e||xn?rs(t,n):t;return[r[r.length-1]==="/"||r.slice(-2)==="/*"?r.slice(0,-1):r,"route"]}function Th(e){return e.endsWith("*")}function bl(e,t){return Th(e)&&!!t.route.children?.length||!1}function yR(e){return!!(!e.children&&e.element&&e.path?.endsWith("/*"))}function Ih(e,t){const n=ht(t,e);if(n){for(const r of n)if(yR(r.route)&&bR(r))return!0}return!1}function Rs(e){e.forEach(t=>{kh(t).forEach(r=>{ft.add(r)})})}function kh(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(n=>{kh(n,t).forEach(o=>{t.add(o)})})),t}function SR(e){return ER(e.route.path||"")}function bR(e){return e.params["*"]||""}function ER(e){return e[e.length-1]==="*"?e.slice(0,-1):e}function On(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function wr(e){return e[0]==="/"?e:`/${e}`}function rc(e,t){const n=ht(e,t);if(!n||n.length===0)return"";for(const r of n)if(r.route.path&&r.route.path!=="*"){const o=SR(r),s=rs(t.pathname,wr(r.pathnameBase));return t.pathname===s?On(s):On(On(o||"")+wr(rc(e.filter(i=>i!==r.route),{pathname:s})))}return""}function Rh(e,t,n,r=""){if(!e||e.length===0)return[xn?rs(t.pathname,r):t.pathname,"url"];let o="";if(n)for(const i of n){const a=i.route;if(a){if(a.index)return _R(o,i.pathname,r);const c=a.path;if(c&&!bl(c,i)){const u=c[0]==="/"||o[o.length-1]==="/"?c:`/${c}`;if(o=On(o)+wr(u),On(t.pathname)===On(r+i.pathname))return El(o)!==El(i.pathname)&&!Th(o)?[(xn?"":r)+u,"route"]:(bl(o,i)&&(o=o.slice(0,-1)),[(xn?"":r)+o,"route"])}}}return[xn?rs(t.pathname,r):t.pathname||"/","url"]}function Cs(e,t,n,r,o,s){const i=Array.isArray(r)?r:ht(s||n,t,o);if(i){let a,c="url";const u=Ih(t,s||n);u&&(a=wr(rc(s||n,t)),c="route"),(!u||!a)&&([a,c]=Rh(n,t,i,o)),K().setTransactionName(a||"/"),e&&(e.updateName(a),e.setAttribute(ye,c))}}function Ch(e,t){if(!$t||!Bt||!Ut||!xo||!ht)return jr&&y.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
|
|
499
|
+
useEffect: ${$t}. useLocation: ${Bt}. useNavigationType: ${Ut}.
|
|
500
|
+
createRoutesFromChildren: ${xo}. matchRoutes: ${ht}.`),e;const n=r=>{const o=Oe.useRef(!0),s=Bt(),i=Ut();return $t(()=>{const a=xo(r.children);o.current?(Rs(a),Cs(xs(),s,a,void 0,void 0,Array.from(ft)),o.current=!1):vr({location:s,routes:a,navigationType:i,version:t,allRoutes:Array.from(ft)})},[s,i]),Oe.createElement(e,{...r})};return ks(n,e),n}function xs(){const e=Ie(),t=e?Re(e):void 0;if(!t)return;const n=q(t).op;return n==="navigation"||n==="pageload"?t:void 0}function El(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function vR(e){return vh(e,"6")}function wR(e){return wh(e,"6")}function TR(e){return bh(e,"6")}function IR(e){return Eh(e,"6")}function kR(e){return Ch(e,"6")}function RR(e){return vh(e,"7")}function CR(e){return Ch(e,"7")}function xR(e){return bh(e,"7")}function MR(e){return Eh(e,"7")}function AR(e){return wh(e,"7")}const DR=Object.freeze(Object.defineProperty({__proto__:null,BrowserClient:wf,ErrorBoundary:gh,OpenFeatureIntegrationHook:Pk,Profiler:nc,SDK_VERSION:yt,SEMANTIC_ATTRIBUTE_SENTRY_OP:Ce,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:re,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:is,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:ye,Scope:rt,WINDOW:$,addBreadcrumb:st,addEventProcessor:md,addIntegration:bi,breadcrumbsIntegration:Vf,browserApiErrorsIntegration:Yf,browserProfilingIntegration:kk,browserSessionIntegration:Kf,browserTracingIntegration:rr,buildLaunchDarklyFlagUsedHandler:Nk,captureConsoleIntegration:W_,captureEvent:Nr,captureException:zt,captureFeedback:Kd,captureMessage:Bo,captureReactException:tc,captureSession:Si,chromeStackLineParser:Wf,close:Fg,consoleLoggingIntegration:qy,contextLinesIntegration:I0,continueTrace:sg,createReduxEnhancer:cR,createTransport:Md,createUserFeedbackEnvelope:Tv,dedupeIntegration:Hd,defaultRequestInstrumentationOptions:Qa,defaultStackLineParsers:zf,defaultStackParser:qf,diagnoseSdkConnectivity:Bk,endSession:pa,eventFiltersIntegration:Dd,eventFromException:Ef,eventFromMessage:vf,exceptionFromError:ps,extraErrorDataIntegration:J_,featureFlagsIntegration:Ly,feedbackAsyncIntegration:wb,feedbackIntegration:mu,feedbackSyncIntegration:mu,flush:Dg,forceLoad:r0,functionToStringIntegration:Pd,geckoStackLineParser:jf,getActiveSpan:Ie,getClient:P,getCurrentScope:K,getDefaultIntegrations:ep,getFeedback:NS,getGlobalScope:xr,getIsolationScope:Ne,getReplay:h1,getRootSpan:Re,getSpanDescendants:cr,getSpanStatusFromHttpCode:Bl,getTraceData:ma,globalHandlersIntegration:Xf,graphqlClientIntegration:N0,httpClientIntegration:d0,httpContextIntegration:Zf,inboundFiltersIntegration:Fd,init:zk,instrumentOutgoingRequests:nh,instrumentSupabaseClient:qd,isEnabled:hd,isInitialized:$g,lastEventId:pd,launchDarklyIntegration:Ok,lazyLoadIntegration:Sf,linkedErrorsIntegration:Qf,logger:Mb,makeBrowserOfflineTransport:ok,makeFetchTransport:La,makeMultiplexedTransport:m_,moduleMetadataIntegration:$_,onLoad:o0,openFeatureIntegration:Lk,opera10StackLineParser:bv,opera11StackLineParser:wv,parameterize:Nd,reactErrorHandler:Vk,reactRouterV3BrowserTracingIntegration:uR,reactRouterV4BrowserTracingIntegration:fR,reactRouterV5BrowserTracingIntegration:pR,reactRouterV6BrowserTracingIntegration:vR,reactRouterV7BrowserTracingIntegration:RR,registerSpanErrorInstrumentation:Ql,registerWebWorker:Wk,replayCanvasIntegration:N1,replayIntegration:d1,reportingObserverIntegration:c0,rewriteFramesIntegration:iy,sendFeedback:of,setContext:fa,setCurrentClient:Id,setExtra:Og,setExtras:Ag,setHttpStatus:mr,setMeasurement:ad,setTag:Lg,setTags:Ng,setUser:Pg,showReportDialog:Bi,spanToBaggageHeader:Pm,spanToJSON:q,spanToTraceHeader:Kl,spotlightBrowserIntegration:Mk,startBrowserTracingNavigationSpan:sr,startBrowserTracingPageLoadSpan:or,startInactiveSpan:Xe,startNewTrace:ag,startSession:yi,startSpan:us,startSpanManual:og,statsigIntegration:$k,supabaseIntegration:Sy,suppressTracing:ig,tanstackRouterBrowserTracingIntegration:dR,thirdPartyErrorFilterIntegration:xy,unleashIntegration:Dk,updateSpanName:xm,useProfiler:nR,webWorkerIntegration:Hk,winjsStackLineParser:_v,withActiveSpan:ln,withErrorBoundary:oR,withIsolationScope:pm,withProfiler:tR,withScope:qe,withSentryReactRouterV6Routing:kR,withSentryReactRouterV7Routing:CR,withSentryRouting:mR,wrapCreateBrowserRouterV6:TR,wrapCreateBrowserRouterV7:xR,wrapCreateMemoryRouterV6:IR,wrapCreateMemoryRouterV7:MR,wrapUseRoutesV6:wR,wrapUseRoutesV7:AR,zodErrorsIntegration:Cy},Symbol.toStringTag,{value:"Module"}));export{LR as R,DR as S,Oe as a,Nh as b,Sc as c,NR as d,OR as e,Re as f,vl as g,mh as h,zt as i,zk as j,rr as k,d1 as l,Lg as m,Nr as n,Jc as p,Oh as r,q as s,tR as w};
|