andoncloud-sdk 1.4.70 → 1.4.71
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/andoncloud-sdk.js +24 -24
- package/dist/andoncloud-sdk.js.map +1 -1
- package/dist/assets/info-icon.svg +2 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/andoncloud-sdk.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var t=require("react"),e=require("react-i18next"),n=require("react-router-dom"),r=require("@mui/material/CssBaseline"),i=require("@mui/material/GlobalStyles"),s=require("@mui/material/styles"),a=require("mobx-react-lite"),o=require("prop-types"),c=require("mobx"),l=require("i18next"),u=require("@mui/icons-material/HelpOutline"),d=require("@mui/material"),p=require("./assets/loader.svg"),h=require("@mui/material/Dialog"),f=require("@mui/material/DialogContent"),m=require("@mui/lab"),_=require("@mui/material/Box"),
|
|
1
|
+
var t=require("react"),e=require("react-i18next"),n=require("react-router-dom"),r=require("@mui/material/CssBaseline"),i=require("@mui/material/GlobalStyles"),s=require("@mui/material/styles"),a=require("mobx-react-lite"),o=require("prop-types"),c=require("mobx"),l=require("i18next"),u=require("@mui/icons-material/HelpOutline"),d=require("@mui/material"),p=require("./assets/loader.svg"),h=require("@mui/material/Dialog"),f=require("@mui/material/DialogContent"),m=require("@mui/lab"),_=require("./assets/info-icon.svg"),g=require("@mui/material/Box"),y=require("@mui/material/Card"),v=require("@mui/material/CardContent"),b=require("@mui/material/Container"),S=require("@mui/icons-material"),E=require("@mui/icons-material/AccessTime"),w=require("@mui/icons-material/Menu"),k=require("@mui/material/AppBar"),T=require("@mui/material/Button"),x=require("@mui/material/IconButton"),C=require("@mui/material/Menu"),R=require("@mui/material/MenuItem"),D=require("@mui/material/Toolbar"),I=require("@mui/material/Typography"),N=require("./assets/logo.svg"),O=require("react-is");function A(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function U(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,e}var P=/*#__PURE__*/U(t),B=/*#__PURE__*/A(t),M=/*#__PURE__*/A(r),L=/*#__PURE__*/A(i),z=/*#__PURE__*/A(l),H=/*#__PURE__*/A(u),G=/*#__PURE__*/A(p),Y=/*#__PURE__*/A(h),j=/*#__PURE__*/A(f),F=/*#__PURE__*/A(_),$=/*#__PURE__*/A(g),V=/*#__PURE__*/A(y),q=/*#__PURE__*/A(v),Z=/*#__PURE__*/A(b),W=/*#__PURE__*/A(E),K=/*#__PURE__*/A(w),J=/*#__PURE__*/A(k),X=/*#__PURE__*/A(T),Q=/*#__PURE__*/A(x),tt=/*#__PURE__*/A(C),et=/*#__PURE__*/A(R),nt=/*#__PURE__*/A(D),rt=/*#__PURE__*/A(I),it=/*#__PURE__*/A(N),st=/*#__PURE__*/A(O);let at,ot,ct,lt={data:""},ut=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||lt,dt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,pt=/\/\*[^]*?\*\/| +/g,ht=/\n+/g,ft=(t,e)=>{let n="",r="",i="";for(let s in t){let a=t[s];"@"==s[0]?"i"==s[1]?n=s+" "+a+";":r+="f"==s[1]?ft(a,s):s+"{"+ft(a,"k"==s[1]?"":e)+"}":"object"==typeof a?r+=ft(a,e?e.replace(/([^,])+/g,t=>s.replace(/(^:.*)|([^,])+/g,e=>/&/.test(e)?e.replace(/&/g,t):t?t+" "+e:e)):s):null!=a&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=ft.p?ft.p(s,a):s+":"+a+";")}return n+(e&&i?e+"{"+i+"}":i)+r},mt={},_t=t=>{if("object"==typeof t){let e="";for(let n in t)e+=n+_t(t[n]);return e}return t},gt=(t,e,n,r,i)=>{let s=_t(t),a=mt[s]||(mt[s]=(t=>{let e=0,n=11;for(;e<t.length;)n=101*n+t.charCodeAt(e++)>>>0;return"go"+n})(s));if(!mt[a]){let e=s!==t?t:(t=>{let e,n,r=[{}];for(;e=dt.exec(t.replace(pt,""));)e[4]?r.shift():e[3]?(n=e[3].replace(ht," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][e[1]]=e[2].replace(ht," ").trim();return r[0]})(t);mt[a]=ft(i?{["@keyframes "+a]:e}:e,n?"":"."+a)}let o=n&&mt.g?mt.g:null;return n&&(mt.g=mt[a]),((t,e,n,r)=>{r?e.data=e.data.replace(r,t):-1===e.data.indexOf(t)&&(e.data=n?t+e.data:e.data+t)})(mt[a],e,r,o),a},yt=(t,e,n)=>t.reduce((t,r,i)=>{let s=e[i];if(s&&s.call){let t=s(n),e=t&&t.props&&t.props.className||/^go/.test(t)&&t;s=e?"."+e:t&&"object"==typeof t?t.props?"":ft(t,""):!1===t?"":t}return t+r+(null==s?"":s)},"");function vt(t){let e=this||{},n=t.call?t(e.p):t;return gt(n.unshift?n.raw?yt(n,[].slice.call(arguments,1),e.p):n.reduce((t,n)=>Object.assign(t,n&&n.call?n(e.p):n),{}):n,ut(e.target),e.g,e.o,e.k)}vt.bind({g:1});let bt=vt.bind({k:1});function St(t,e){let n=this||{};return function(){let r=arguments;function i(s,a){let o=Object.assign({},s),c=o.className||i.className;n.p=Object.assign({theme:ot&&ot()},o),n.o=/ *go\d+/.test(c),o.className=vt.apply(n,r)+(c?" "+c:""),e&&(o.ref=a);let l=t;return t[0]&&(l=o.as||t,delete o.as),ct&&l[0]&&ct(o),at(l,o)}return e?e(i):i}}var Et=(t,e)=>(t=>"function"==typeof t)(t)?t(e):t,wt=(()=>{let t=0;return()=>(++t).toString()})(),kt=(()=>{let t;return()=>{if(void 0===t&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),Tt=new Map,xt=t=>{if(Tt.has(t))return;let e=setTimeout(()=>{Tt.delete(t),It({type:4,toastId:t})},1e3);Tt.set(t,e)},Ct=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,20)};case 1:return e.toast.id&&(t=>{let e=Tt.get(t);e&&clearTimeout(e)})(e.toast.id),{...t,toasts:t.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t)};case 2:let{toast:n}=e;return t.toasts.find(t=>t.id===n.id)?Ct(t,{type:1,toast:n}):Ct(t,{type:0,toast:n});case 3:let{toastId:r}=e;return r?xt(r):t.toasts.forEach(t=>{xt(t.id)}),{...t,toasts:t.toasts.map(t=>t.id===r||void 0===r?{...t,visible:!1}:t)};case 4:return void 0===e.toastId?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(t=>t.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let i=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(t=>({...t,pauseDuration:t.pauseDuration+i}))}}},Rt=[],Dt={toasts:[],pausedAt:void 0},It=t=>{Dt=Ct(Dt,t),Rt.forEach(t=>{t(Dt)})},Nt={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Ot=t=>(e,n)=>{let r=((t,e="blank",n)=>({createdAt:Date.now(),visible:!0,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...n,id:(null==n?void 0:n.id)||wt()}))(e,t,n);return It({type:2,toast:r}),r.id},At=(t,e)=>Ot("blank")(t,e);At.error=Ot("error"),At.success=Ot("success"),At.loading=Ot("loading"),At.custom=Ot("custom"),At.dismiss=t=>{It({type:3,toastId:t})},At.remove=t=>It({type:4,toastId:t}),At.promise=(t,e,n)=>{let r=At.loading(e.loading,{...n,...null==n?void 0:n.loading});return t.then(t=>(At.success(Et(e.success,t),{id:r,...n,...null==n?void 0:n.success}),t)).catch(t=>{At.error(Et(e.error,t),{id:r,...n,...null==n?void 0:n.error})}),t};var Ut,Pt=(t,e)=>{It({type:1,toast:{id:t,height:e}})},Bt=()=>{It({type:5,time:Date.now()})},Mt=bt`
|
|
2
2
|
from {
|
|
3
3
|
transform: scale(0) rotate(45deg);
|
|
4
4
|
opacity: 0;
|
|
@@ -6,7 +6,7 @@ from {
|
|
|
6
6
|
to {
|
|
7
7
|
transform: scale(1) rotate(45deg);
|
|
8
8
|
opacity: 1;
|
|
9
|
-
}`,
|
|
9
|
+
}`,Lt=bt`
|
|
10
10
|
from {
|
|
11
11
|
transform: scale(0);
|
|
12
12
|
opacity: 0;
|
|
@@ -14,7 +14,7 @@ from {
|
|
|
14
14
|
to {
|
|
15
15
|
transform: scale(1);
|
|
16
16
|
opacity: 1;
|
|
17
|
-
}`,
|
|
17
|
+
}`,zt=bt`
|
|
18
18
|
from {
|
|
19
19
|
transform: scale(0) rotate(90deg);
|
|
20
20
|
opacity: 0;
|
|
@@ -22,7 +22,7 @@ from {
|
|
|
22
22
|
to {
|
|
23
23
|
transform: scale(1) rotate(90deg);
|
|
24
24
|
opacity: 1;
|
|
25
|
-
}`,
|
|
25
|
+
}`,Ht=St("div")`
|
|
26
26
|
width: 20px;
|
|
27
27
|
opacity: 0;
|
|
28
28
|
height: 20px;
|
|
@@ -31,14 +31,14 @@ to {
|
|
|
31
31
|
position: relative;
|
|
32
32
|
transform: rotate(45deg);
|
|
33
33
|
|
|
34
|
-
animation: ${
|
|
34
|
+
animation: ${Mt} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
35
35
|
forwards;
|
|
36
36
|
animation-delay: 100ms;
|
|
37
37
|
|
|
38
38
|
&:after,
|
|
39
39
|
&:before {
|
|
40
40
|
content: '';
|
|
41
|
-
animation: ${
|
|
41
|
+
animation: ${Lt} 0.15s ease-out forwards;
|
|
42
42
|
animation-delay: 150ms;
|
|
43
43
|
position: absolute;
|
|
44
44
|
border-radius: 3px;
|
|
@@ -51,18 +51,18 @@ to {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
&:before {
|
|
54
|
-
animation: ${
|
|
54
|
+
animation: ${zt} 0.15s ease-out forwards;
|
|
55
55
|
animation-delay: 180ms;
|
|
56
56
|
transform: rotate(90deg);
|
|
57
57
|
}
|
|
58
|
-
`,
|
|
58
|
+
`,Gt=bt`
|
|
59
59
|
from {
|
|
60
60
|
transform: rotate(0deg);
|
|
61
61
|
}
|
|
62
62
|
to {
|
|
63
63
|
transform: rotate(360deg);
|
|
64
64
|
}
|
|
65
|
-
`,
|
|
65
|
+
`,Yt=St("div")`
|
|
66
66
|
width: 12px;
|
|
67
67
|
height: 12px;
|
|
68
68
|
box-sizing: border-box;
|
|
@@ -70,8 +70,8 @@ to {
|
|
|
70
70
|
border-radius: 100%;
|
|
71
71
|
border-color: ${t=>t.secondary||"#e0e0e0"};
|
|
72
72
|
border-right-color: ${t=>t.primary||"#616161"};
|
|
73
|
-
animation: ${
|
|
74
|
-
`,
|
|
73
|
+
animation: ${Gt} 1s linear infinite;
|
|
74
|
+
`,jt=bt`
|
|
75
75
|
from {
|
|
76
76
|
transform: scale(0) rotate(45deg);
|
|
77
77
|
opacity: 0;
|
|
@@ -79,7 +79,7 @@ from {
|
|
|
79
79
|
to {
|
|
80
80
|
transform: scale(1) rotate(45deg);
|
|
81
81
|
opacity: 1;
|
|
82
|
-
}`,
|
|
82
|
+
}`,Ft=bt`
|
|
83
83
|
0% {
|
|
84
84
|
height: 0;
|
|
85
85
|
width: 0;
|
|
@@ -93,7 +93,7 @@ to {
|
|
|
93
93
|
100% {
|
|
94
94
|
opacity: 1;
|
|
95
95
|
height: 10px;
|
|
96
|
-
}
|
|
96
|
+
}`,$t=St("div")`
|
|
97
97
|
width: 20px;
|
|
98
98
|
opacity: 0;
|
|
99
99
|
height: 20px;
|
|
@@ -102,13 +102,13 @@ to {
|
|
|
102
102
|
position: relative;
|
|
103
103
|
transform: rotate(45deg);
|
|
104
104
|
|
|
105
|
-
animation: ${
|
|
105
|
+
animation: ${jt} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
106
106
|
forwards;
|
|
107
107
|
animation-delay: 100ms;
|
|
108
108
|
&:after {
|
|
109
109
|
content: '';
|
|
110
110
|
box-sizing: border-box;
|
|
111
|
-
animation: ${
|
|
111
|
+
animation: ${Ft} 0.2s ease-out forwards;
|
|
112
112
|
opacity: 0;
|
|
113
113
|
animation-delay: 200ms;
|
|
114
114
|
position: absolute;
|
|
@@ -120,16 +120,16 @@ to {
|
|
|
120
120
|
height: 10px;
|
|
121
121
|
width: 6px;
|
|
122
122
|
}
|
|
123
|
-
`,
|
|
123
|
+
`,Vt=St("div")`
|
|
124
124
|
position: absolute;
|
|
125
|
-
|
|
125
|
+
`,qt=St("div")`
|
|
126
126
|
position: relative;
|
|
127
127
|
display: flex;
|
|
128
128
|
justify-content: center;
|
|
129
129
|
align-items: center;
|
|
130
130
|
min-width: 20px;
|
|
131
131
|
min-height: 20px;
|
|
132
|
-
`,
|
|
132
|
+
`,Zt=bt`
|
|
133
133
|
from {
|
|
134
134
|
transform: scale(0.6);
|
|
135
135
|
opacity: 0.4;
|
|
@@ -137,14 +137,14 @@ from {
|
|
|
137
137
|
to {
|
|
138
138
|
transform: scale(1);
|
|
139
139
|
opacity: 1;
|
|
140
|
-
}`,
|
|
140
|
+
}`,Wt=St("div")`
|
|
141
141
|
position: relative;
|
|
142
142
|
transform: scale(0.6);
|
|
143
143
|
opacity: 0.4;
|
|
144
144
|
min-width: 20px;
|
|
145
|
-
animation: ${
|
|
145
|
+
animation: ${Zt} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
146
146
|
forwards;
|
|
147
|
-
`,
|
|
147
|
+
`,Kt=({toast:t})=>{let{icon:e,type:n,iconTheme:r}=t;return void 0!==e?"string"==typeof e?P.createElement(Wt,null,e):e:"blank"===n?null:P.createElement(qt,null,P.createElement(Yt,{...r}),"loading"!==n&&P.createElement(Vt,null,P.createElement("error"===n?Ht:$t,{...r})))},Jt=t=>`\n0% {transform: translate3d(0,${-200*t}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,Xt=t=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*t}%,-1px) scale(.6); opacity:0;}\n`,Qt=St("div")`
|
|
148
148
|
display: flex;
|
|
149
149
|
align-items: center;
|
|
150
150
|
background: #fff;
|
|
@@ -156,17 +156,17 @@ to {
|
|
|
156
156
|
pointer-events: auto;
|
|
157
157
|
padding: 8px 10px;
|
|
158
158
|
border-radius: 8px;
|
|
159
|
-
`,
|
|
159
|
+
`,te=St("div")`
|
|
160
160
|
display: flex;
|
|
161
161
|
justify-content: center;
|
|
162
162
|
margin: 4px 10px;
|
|
163
163
|
color: inherit;
|
|
164
164
|
flex: 1 1 auto;
|
|
165
165
|
white-space: pre-line;
|
|
166
|
-
`,
|
|
166
|
+
`,ee=P.memo(({toast:t,position:e,style:n,children:r})=>{let i=t.height?((t,e)=>{let n=t.includes("top")?1:-1,[r,i]=kt()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[Jt(n),Xt(n)];return{animation:e?`${bt(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${bt(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(t.position||e||"top-center",t.visible):{opacity:0},s=P.createElement(Kt,{toast:t}),a=P.createElement(te,{...t.ariaProps},Et(t.message,t));return P.createElement(Qt,{className:t.className,style:{...i,...n,...t.style}},"function"==typeof r?r({icon:s,message:a}):P.createElement(P.Fragment,null,s,a))});Ut=P.createElement,ft.p=void 0,at=Ut,ot=void 0,ct=void 0;var ne=({id:t,className:e,style:n,onHeightUpdate:r,children:i})=>{let s=P.useCallback(e=>{if(e){let n=()=>{let n=e.getBoundingClientRect().height;r(t,n)};n(),new MutationObserver(n).observe(e,{subtree:!0,childList:!0,characterData:!0})}},[t,r]);return P.createElement("div",{ref:s,className:e,style:n},i)},re=vt`
|
|
167
167
|
z-index: 9999;
|
|
168
168
|
> * {
|
|
169
169
|
pointer-events: auto;
|
|
170
170
|
}
|
|
171
|
-
`,ne=({reverseOrder:e,position:n="top-center",toastOptions:r,gutter:i,children:s,containerStyle:a,containerClassName:o})=>{let{toasts:c,handlers:l}=(e=>{let{toasts:n,pausedAt:r}=((e={})=>{let[n,r]=t.useState(xt);t.useEffect(()=>(Ct.push(r),()=>{let t=Ct.indexOf(r);t>-1&&Ct.splice(t,1)}),[n]);let i=n.toasts.map(t=>{var n,r;return{...e,...e[t.type],...t,duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==e?void 0:e.duration)||Dt[t.type],style:{...e.style,...null==(r=e[t.type])?void 0:r.style,...t.style}}});return{...n,toasts:i}})(e);t.useEffect(()=>{if(r)return;let t=Date.now(),e=n.map(e=>{if(e.duration===1/0)return;let n=(e.duration||0)+e.pauseDuration-(t-e.createdAt);if(!(n<0))return setTimeout(()=>Nt.dismiss(e.id),n);e.visible&&Nt.dismiss(e.id)});return()=>{e.forEach(t=>t&&clearTimeout(t))}},[n,r]);let i=t.useCallback(()=>{r&&Rt({type:6,time:Date.now()})},[r]),s=t.useCallback((t,e)=>{let{reverseOrder:r=!1,gutter:i=8,defaultPosition:s}=e||{},a=n.filter(e=>(e.position||s)===(t.position||s)&&e.height),o=a.findIndex(e=>e.id===t.id),c=a.filter((t,e)=>e<o&&t.visible).length;return a.filter(t=>t.visible).slice(...r?[c+1]:[0,c]).reduce((t,e)=>t+(e.height||0)+i,0)},[n]);return{toasts:n,handlers:{updateHeight:At,startPause:Ut,endPause:i,calculateOffset:s}}})(r);return U.createElement("div",{style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},c.map(t=>{let r=t.position||n,a=((t,e)=>{let n=t.includes("top"),r=n?{top:0}:{bottom:0},i=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Et()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${e*(n?1:-1)}px)`,...r,...i}})(r,l.calculateOffset(t,{reverseOrder:e,gutter:i,defaultPosition:n}));return U.createElement(te,{id:t.id,key:t.id,onHeightUpdate:l.updateHeight,className:t.visible?ee:"",style:a},"custom"===t.type?bt(t.message,t):s?s(t):U.createElement(Qt,{toast:t,position:r}))}))},re=Nt;const ie=Object.prototype.toString;function se(t){switch(ie.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return _e(t,Error)}}function ae(t,e){return ie.call(t)===`[object ${e}]`}function oe(t){return ae(t,"ErrorEvent")}function ce(t){return ae(t,"DOMError")}function le(t){return ae(t,"String")}function ue(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function de(t){return ae(t,"Object")}function pe(t){return"undefined"!=typeof Event&&_e(t,Event)}function he(t){return ae(t,"RegExp")}function fe(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function me(t){return"number"==typeof t&&t!=t}function _e(t,e){try{return t instanceof e}catch(t){return!1}}function ge(t,e,n,r,i,s){if(!(i.exception&&i.exception.values&&s&&_e(s.originalException,Error)))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=ye(t,e,r,s.originalException,n,i.exception.values,a,0))}function ye(t,e,n,r,i,s,a,o){if(s.length>=n+1)return s;let c=[...s];if(_e(r[i],Error)){ve(a,o);const s=t(e,r[i]),l=c.length;be(s,i,l,o),c=ye(t,e,n,r[i],i,[s,...c],s,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,s)=>{if(_e(r,Error)){ve(a,o);const l=t(e,r),u=c.length;be(l,`errors[${s}]`,u,o),c=ye(t,e,n,r,i,[l,...c],l,u)}}),c}function ve(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,is_exception_group:!0,exception_id:e}}function be(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function Se(t){return t&&t.Math==Math?t:void 0}const Ee="object"==typeof globalThis&&Se(globalThis)||"object"==typeof window&&Se(window)||"object"==typeof self&&Se(self)||"object"==typeof global&&Se(global)||function(){return this}()||{};function we(){return Ee}function ke(t,e,n){const r=n||Ee,i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=e())}const Te=we(),Ce=80;function xe(t,e={}){try{let n=t;const r=5,i=[];let s=0,a=0;const o=" > ",c=o.length;let l;const u=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||Ce;for(;n&&s++<r&&(l=Re(n,u),!("html"===l||s>1&&a+i.length*c+l.length>=d));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(o)}catch(t){return"<unknown>"}}function Re(t,e){const n=t,r=[];let i,s,a,o,c;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const l=e&&e.length?e.filter(t=>n.getAttribute(t)).map(t=>[t,n.getAttribute(t)]):null;if(l&&l.length)l.forEach(t=>{r.push(`[${t[0]}="${t[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&le(i))for(s=i.split(/\s+/),c=0;c<s.length;c++)r.push(`.${s[c]}`);const u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)a=u[c],o=n.getAttribute(a),o&&r.push(`[${a}="${o}"]`);return r.join("")}const De=["debug","info","warn","error","log","assert","trace"];function Ie(t){if(!("console"in Ee))return t();const e=Ee.console,n={};De.forEach(t=>{const r=e[t]&&e[t].__sentry_original__;t in e&&r&&(n[t]=e[t],e[t]=r)});try{return t()}finally{Object.keys(n).forEach(t=>{e[t]=n[t]})}}function Ne(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?De.forEach(n=>{e[n]=(...e)=>{t&&Ie(()=>{Ee.console[n](`Sentry Logger [${n}]:`,...e)})}}):De.forEach(t=>{e[t]=()=>{}}),e}let Oe;Oe="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?ke("logger",Ne):Ne();const Ae=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ue(t,e=!1){const{host:n,path:r,pass:i,port:s,projectId:a,protocol:o,publicKey:c}=t;return`${o}://${c}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${a}`}function Pe(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Be(t){const e="string"==typeof t?function(t){const e=Ae.exec(t);if(!e)return void console.error(`Invalid Sentry Dsn: ${t}`);const[n,r,i="",s,a="",o]=e.slice(1);let c="",l=o;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const t=l.match(/^\d+/);t&&(l=t[0])}return Pe({host:s,pass:i,path:c,projectId:l,port:a,protocol:n,publicKey:r})}(t):Pe(t);if(e&&function(t){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return!0;const{port:e,projectId:n,protocol:r}=t;return!(["protocol","publicKey","host","projectId"].find(e=>!t[e]&&(Oe.error(`Invalid Sentry Dsn: ${e} missing`),!0))||(n.match(/^\d+$/)?function(t){return"http"===t||"https"===t}(r)?e&&isNaN(parseInt(e,10))&&(Oe.error(`Invalid Sentry Dsn: Invalid port ${e}`),1):(Oe.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(Oe.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(e))return e}class Me extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}function Le(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function ze(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function He(t,e=[],n=!1){return e.some(e=>function(t,e,n=!1){return!!le(t)&&(he(e)?e.test(t):!!le(e)&&(n?t===e:t.includes(e)))}(t,e,n))}function Ge(t,e,n){if(!(e in t))return;const r=t[e],i=n(r);if("function"==typeof i)try{je(i,r)}catch(t){}t[e]=i}function Ye(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}function je(t,e){t.prototype=e.prototype=e.prototype||{},Ye(t,"__sentry_original__",e)}function Fe(t){return t.__sentry_original__}function $e(t){if(se(t))return{message:t.message,name:t.name,stack:t.stack,...qe(t)};if(pe(t)){const e={type:t.type,target:Ve(t.target),currentTarget:Ve(t.currentTarget),...qe(t)};return"undefined"!=typeof CustomEvent&&_e(t,CustomEvent)&&(e.detail=t.detail),e}return t}function Ve(t){try{return"undefined"!=typeof Element&&_e(t,Element)?xe(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}}function qe(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function Ze(t){return We(t,new Map)}function We(t,e){if(de(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=We(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach(t=>{r.push(We(t,e))}),r}return t}const Ke=/\(error: (.*)\)/;function Je(...t){const e=t.sort((t,e)=>t[0]-e[0]).map(t=>t[1]);return(t,n=0)=>{const r=[],i=t.split("\n");for(let t=n;t<i.length;t++){const n=i[t];if(n.length>1024)continue;const s=Ke.test(n)?n.replace(Ke,"$1"):n;if(!s.match(/\S*Error: /)){for(const t of e){const e=t(s);if(e){r.push(e);break}}if(r.length>=50)break}}return function(t){if(!t.length)return[];const e=t.slice(0,50),n=e[e.length-1].function;n&&/sentryWrapped/.test(n)&&e.pop(),e.reverse();const r=e[e.length-1].function;return r&&/captureMessage|captureException/.test(r)&&e.pop(),e.map(t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||"?"}))}(r)}}const Xe="<anonymous>";function Qe(t){try{return t&&"function"==typeof t&&t.name||Xe}catch(t){return Xe}}const tn=we();function en(){if(!("fetch"in tn))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function nn(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}const rn=we(),sn=we(),an="__sentry_xhr_v2__",on={},cn={};function ln(t,e){on[t]=on[t]||[],on[t].push(e),function(t){if(!cn[t])switch(cn[t]=!0,t){case"console":"console"in sn&&De.forEach(function(t){t in sn.console&&Ge(sn.console,t,function(e){return function(...n){un("console",{args:n,level:t}),e&&e.apply(sn.console,n)}})});break;case"dom":!function(){if(!("document"in sn))return;const t=un.bind(null,"dom"),e=gn(t,!0);sn.document.addEventListener("click",e,!1),sn.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(e=>{const n=sn[e]&&sn[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Ge(n,"addEventListener",function(e){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,s=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=s[n]=s[n]||{refCount:0};if(!a.handler){const r=gn(t);a.handler=r,e.call(this,n,r,i)}a.refCount++}catch(t){}return e.call(this,n,r,i)}}),Ge(n,"removeEventListener",function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},s=i[e];s&&(s.refCount--,s.refCount<=0&&(t.call(this,e,s.handler,r),s.handler=void 0,delete i[e]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in sn))return;const t=XMLHttpRequest.prototype;Ge(t,"open",function(t){return function(...e){const n=e[1],r=this[an]={method:le(e[0])?e[0].toUpperCase():e[0],url:e[1],request_headers:{}};le(n)&&"POST"===r.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const t=this[an];if(t&&4===this.readyState){try{t.status_code=this.status}catch(t){}un("xhr",{args:e,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?Ge(this,"onreadystatechange",function(t){return function(...e){return i(),t.apply(this,e)}}):this.addEventListener("readystatechange",i),Ge(this,"setRequestHeader",function(t){return function(...e){const[n,r]=e,i=this[an];return i&&(i.request_headers[n.toLowerCase()]=r),t.apply(this,e)}}),t.apply(this,e)}}),Ge(t,"send",function(t){return function(...e){const n=this[an];return n&&void 0!==e[0]&&(n.body=e[0]),un("xhr",{args:e,startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}})}();break;case"fetch":(function(){if(!en())return!1;if(nn(tn.fetch))return!0;let t=!1;const e=tn.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=nn(n.contentWindow.fetch)),e.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t})()&&Ge(sn,"fetch",function(t){return function(...e){const{method:n,url:r}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:pn(e),method:dn(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:pn(e),method:dn(e,"method")?String(e.method).toUpperCase():"GET"}}(e),i={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return un("fetch",{...i}),t.apply(sn,e).then(t=>(un("fetch",{...i,endTimestamp:Date.now(),response:t}),t),t=>{throw un("fetch",{...i,endTimestamp:Date.now(),error:t}),t})}});break;case"history":!function(){if(!function(){const t=rn.chrome;return!(t&&t.app&&t.app.runtime||!("history"in rn)||!rn.history.pushState||!rn.history.replaceState)}())return;const t=sn.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=hn,e=String(n);hn=e,un("history",{from:t,to:e})}return t.apply(this,e)}}sn.onpopstate=function(...e){const n=sn.location.href,r=hn;if(hn=n,un("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},Ge(sn.history,"pushState",e),Ge(sn.history,"replaceState",e)}();break;case"error":yn=sn.onerror,sn.onerror=function(t,e,n,r,i){return un("error",{column:r,error:i,line:n,msg:t,url:e}),!(!yn||yn.__SENTRY_LOADER__)&&yn.apply(this,arguments)},sn.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":vn=sn.onunhandledrejection,sn.onunhandledrejection=function(t){return un("unhandledrejection",t),!(vn&&!vn.__SENTRY_LOADER__)||vn.apply(this,arguments)},sn.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("unknown instrumentation type:",t)}}(t)}function un(t,e){if(t&&on[t])for(const n of on[t]||[])try{n(e)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${Qe(n)}\nError:`,e)}}function dn(t,e){return!!t&&"object"==typeof t&&!!t[e]}function pn(t){return"string"==typeof t?t:t?dn(t,"url")?t.url:t.toString?t.toString():"":""}let hn;const fn=1e3;let mn,_n;function gn(t,e=!1){return n=>{if(!n||_n===n)return;if(function(t){if("keypress"!==t.type)return!1;try{const e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(t){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===mn||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(t){}return!1}(_n,n))&&(t({event:n,name:r,global:e}),_n=n),clearTimeout(mn),mn=sn.setTimeout(()=>{mn=void 0},fn)}}let yn=null,vn=null;function bn(){const t=Ee.crypto||Ee.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const e=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(15&e())>>t/4).toString(16))}function Sn(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function En(t){const{message:e,event_id:n}=t;if(e)return e;const r=Sn(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function wn(t,e,n){const r=t.exception=t.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type=n||"Error")}function kn(t,e){const n=Sn(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r&&r.data,...e.data};n.mechanism.data=t}}function Tn(t){if(t&&t.__sentry_captured__)return!0;try{Ye(t,"__sentry_captured__",!0)}catch(t){}return!1}function Cn(t){return Array.isArray(t)?t:[t]}function xn(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function Rn(t,e){return t.require(e)}function Dn(t){let e;try{e=Rn(module,t)}catch(t){}try{const{cwd:n}=Rn(module,"process");e=Rn(module,`${n()}/node_modules/${t}`)}catch(t){}return e}function In(t,e=100,n=Infinity){try{return On("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function Nn(t,e=3,n=102400){const r=In(t,e);return i=JSON.stringify(r),~-encodeURI(i).split(/%..|./).length>n?Nn(t,e-1,n):r;var i}function On(t,e,n=Infinity,r=Infinity,i=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[s,a]=i;if(null==e||["number","boolean","string"].includes(typeof e)&&!me(e))return e;const o=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(de(n=e)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof e&&e!=e)return"[NaN]";if("function"==typeof e)return`[Function: ${Qe(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var n}(t,e);if(!o.startsWith("[object "))return o;if(e.__sentry_skip_normalization__)return e;const c="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===c)return o.replace("object ","");if(s(e))return"[Circular ~]";const l=e;if(l&&"function"==typeof l.toJSON)try{return On("",l.toJSON(),c-1,r,i)}catch(t){}const u=Array.isArray(e)?[]:{};let d=0;const p=$e(e);for(const t in p)if(Object.prototype.hasOwnProperty.call(p,t)){if(d>=r){u[t]="[MaxProperties ~]";break}u[t]=On(t,p[t],c-1,r,i),d++}return a(e),u}var An;function Un(t){return new Bn(e=>{e(t)})}function Pn(t){return new Bn((e,n)=>{n(t)})}!function(t){t[t.PENDING=0]="PENDING",t[t.RESOLVED=1]="RESOLVED",t[t.REJECTED=2]="REJECTED"}(An||(An={}));class Bn{__init(){this._state=An.PENDING}__init2(){this._handlers=[]}constructor(t){Bn.prototype.__init.call(this),Bn.prototype.__init2.call(this),Bn.prototype.__init3.call(this),Bn.prototype.__init4.call(this),Bn.prototype.__init5.call(this),Bn.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new Bn((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this._executeHandlers()})}catch(t){return this.then(t=>t,t)}finally(t){return new Bn((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}__init3(){this._resolve=t=>{this._setResult(An.RESOLVED,t)}}__init4(){this._reject=t=>{this._setResult(An.REJECTED,t)}}__init5(){this._setResult=(t,e)=>{this._state===An.PENDING&&(fe(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===An.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(t=>{t[0]||(this._state===An.RESOLVED&&t[1](this._value),this._state===An.REJECTED&&t[2](this._value),t[0]=!0)})}}}function Mn(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function Ln(t){return t.split(/[\?#]/,1)[0]}function zn(t){return t.split(/\\?\//).filter(t=>t.length>0&&","!==t).length}const Hn=["fatal","error","warning","log","info","debug"],Gn=we(),Yn={nowSeconds:()=>Date.now()/1e3},jn=xn()?function(){try{return Rn(module,"perf_hooks").performance}catch(t){return}}():function(){const{performance:t}=Gn;if(t&&t.now)return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),Fn=void 0===jn?Yn:{nowSeconds:()=>(jn.timeOrigin+jn.now())/1e3},$n=Yn.nowSeconds.bind(Yn),Vn=Fn.nowSeconds.bind(Fn),qn=(()=>{const{performance:t}=Gn;if(!t||!t.now)return;const e=36e5,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,s=i<e,a=t.timing&&t.timing.navigationStart,o="number"==typeof a?Math.abs(a+n-r):e;return s||o<e?i<=o?t.timeOrigin:a:r})(),Zn="baggage",Wn="sentry-",Kn=/^sentry-/,Jn=8192;function Xn(t){if(t)return function(t){if(0!==Object.keys(t).length)return Object.entries(t).reduce((t,[e,n],r)=>{const i=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,s=0===r?i:`${t},${i}`;return s.length>Jn?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`Not adding key: ${e} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}(Object.entries(t).reduce((t,[e,n])=>(n&&(t[`${Wn}${e}`]=n),t),{}))}function Qn(t){return t.split(",").map(t=>t.split("=").map(t=>decodeURIComponent(t.trim()))).reduce((t,[e,n])=>(t[e]=n,t),{})}const tr=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function er(t=bn(),e=bn().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function nr(t,e=[]){return[t,e]}function rr(t,e){const[n,r]=t;return[n,[...r,e]]}function ir(t,e){const n=t[1];for(const t of n)if(e(t,t[0].type))return!0;return!1}function sr(t,e){return(e||new TextEncoder).encode(t)}function ar(t,e){const[n,r]=t;let i=JSON.stringify(n);function s(t){"string"==typeof i?i="string"==typeof t?i+t:[sr(i,e),t]:i.push("string"==typeof t?sr(t,e):t)}for(const t of r){const[e,n]=t;if(s(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(In(n))}s(t)}}return"string"==typeof i?i:function(t){const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(i)}function or(t,e){const n="string"==typeof t.data?sr(t.data,e):t.data;return[Ze({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const cr={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function lr(t){return cr[t]}function ur(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function dr(t,e,n,r){const i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&{dsn:Ue(r)},...i&&{trace:Ze({...i})}}}const pr=6e4,hr="production";function fr(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Vn(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:bn()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}class mr{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=yr()}static clone(t){const e=new mr;return t&&(e._breadcrumbs=[...t._breadcrumbs],e._tags={...t._tags},e._extra={...t._extra},e._contexts={...t._contexts},e._user=t._user,e._level=t._level,e._span=t._span,e._session=t._session,e._transactionName=t._transactionName,e._fingerprint=t._fingerprint,e._eventProcessors=[...t._eventProcessors],e._requestSession=t._requestSession,e._attachments=[...t._attachments],e._sdkProcessingMetadata={...t._sdkProcessingMetadata},e._propagationContext={...t._propagationContext}),e}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&fr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},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,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof mr?e:this}return t instanceof mr?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession),t._propagationContext&&(this._propagationContext=t._propagationContext)):de(t)&&(this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=yr(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:$n(),...t};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,e={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};const e=this._span.transaction;if(e){t.sdkProcessingMetadata={dynamicSamplingContext:e.getDynamicSamplingContext(),...t.sdkProcessingMetadata};const n=e.name;n&&(t.tags={transaction:n,...t.tags})}}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},this._notifyEventProcessors([..._r(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}_notifyEventProcessors(t,e,n,r=0){return new Bn((i,s)=>{const a=t[r];if(null===e||"function"!=typeof a)i(e);else{const o=a({...e},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===o&&Oe.log(`Event processor "${a.id}" dropped event`),fe(o)?o.then(e=>this._notifyEventProcessors(t,e,n,r+1).then(i)).then(null,s):this._notifyEventProcessors(t,o,n,r+1).then(i).then(null,s)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?Cn(t.fingerprint):[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function _r(){return ke("globalEventProcessors",()=>[])}function gr(t){_r().push(t)}function yr(){return{traceId:bn(),spanId:bn().substring(16),sampled:!1}}const vr=4,br=100;class Sr{constructor(t,e=new mr,n=vr){this._version=n,this._stack=[{scope:e}],t&&this.bindClient(t)}isOlderThan(t){return this._version<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=mr.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1||!this.getStack().pop())}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,e){const n=this._lastEventId=e&&e.event_id?e.event_id:bn(),r=new Error("Sentry syntheticException");return this._withClient((i,s)=>{i.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},s)}),n}captureMessage(t,e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:bn(),i=new Error(t);return this._withClient((s,a)=>{s.captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:r},a)}),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:bn();return t.type||(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(t,{...e,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=br}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const a={timestamp:$n(),...t},o=i?Ie(()=>i(a,e)):a;null!==o&&(r.emit&&r.emit("beforeAddBreadcrumb",o,e),n.addBreadcrumb(o,s))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=wr(this);try{t(this)}finally{wr(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);return"undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||n||console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&function(t,e){let n={};"ok"===t.status&&(n={status:"exited"}),fr(t,n)}(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:i=hr}=n&&n.getOptions()||{},{userAgent:s}=Ee.navigator||{},a=function(t){const e=Vn(),n={sid:bn(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return Ze({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&fr(n,t),n}({release:r,environment:i,user:e.getUser(),...s&&{userAgent:s},...t}),o=e.getSession&&e.getSession();return o&&"ok"===o.status&&fr(o,{status:"exited"}),this.endSession(),e.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_withClient(t){const{scope:e,client:n}=this.getStackTop();n&&t(n,e)}_callExtensionMethod(t,...e){const n=Er().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Er(){return Ee.__SENTRY__=Ee.__SENTRY__||{extensions:{},hub:void 0},Ee}function wr(t){const e=Er(),n=Tr(e);return Cr(e,t),n}function kr(){const t=Er();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return function(t=Er()){var e;return(e=t)&&e.__SENTRY__&&e.__SENTRY__.hub&&!Tr(t).isOlderThan(vr)||Cr(t,new Sr),Tr(t)}(t)}function Tr(t){return ke("hub",()=>new Sr,t)}function Cr(t,e){return!!t&&((t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0)}function xr(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=kr().getClient(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Rr(t){return(t||kr()).getScope().getTransaction()}let Dr=!1;function Ir(){const t=Rr();if(t){const e="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}Ir.tag="sentry_tracingErrorCallback";class Nr{__init(){this.spans=[]}constructor(t=1e3){Nr.prototype.__init.call(this),this._maxlen=t}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class Or{__init2(){this.traceId=bn()}__init3(){this.spanId=bn().substring(16)}__init4(){this.startTimestamp=Vn()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(t){if(Or.prototype.__init2.call(this),Or.prototype.__init3.call(this),Or.prototype.__init4.call(this),Or.prototype.__init5.call(this),Or.prototype.__init6.call(this),Or.prototype.__init7.call(this),!t)return this;t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp),t.instrumenter&&(this.instrumenter=t.instrumenter)}startChild(t){const e=new Or({...t,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e),e.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&e.transaction){const n=`[Tracing] Starting '${t&&t.op||"< unknown op >"}' span on transaction '${e.transaction.name||"< unknown name >"}' (${e.transaction.spanId}).`;e.transaction.metadata.spanMetadata[e.spanId]={logMessage:n},Oe.log(n)}return e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setStatus(t){return this.status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t)),this.setData("http.response.status_code",t);const e=function(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(t);return"unknown_error"!==e&&this.setStatus(e),this}isSuccess(){return"ok"===this.status}finish(t){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:t}=this.transaction.metadata.spanMetadata[this.spanId];t&&Oe.log(t.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof t?t:Vn()}toTraceparent(){return er(this.traceId,this.spanId,this.sampled)}toContext(){return Ze({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(t){return this.data=t.data||{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=t.spanId||this.spanId,this.startTimestamp=t.startTimestamp||this.startTimestamp,this.status=t.status,this.tags=t.tags||{},this.traceId=t.traceId||this.traceId,this}getTraceContext(){return Ze({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return Ze({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}function Ar(t,e,n){const r=e.getOptions(),{publicKey:i}=e.getDsn()||{},{segment:s}=n&&n.getUser()||{},a=Ze({environment:r.environment||hr,release:r.release,user_segment:s,public_key:i,trace_id:t});return e.emit&&e.emit("createDsc",a),a}class Ur extends Or{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(t,e){super(t),Ur.prototype.__init.call(this),Ur.prototype.__init2.call(this),Ur.prototype.__init3.call(this),this._hub=e||kr(),this._name=t.name||"",this.metadata={source:"custom",...t.metadata,spanMetadata:{}},this._trimEnd=t.trimEnd,this.transaction=this;const n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}setName(t,e="custom"){this._name=t,this.metadata.source=e}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Nr(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e,n=""){this._measurements[t]={value:e,unit:n}}setMetadata(t){this.metadata={...this.metadata,...t}}finish(t){if(void 0!==this.endTimestamp)return;this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(t);const e=this._hub.getClient();if(e&&e.emit&&e.emit("finishTransaction",this),!0!==this.sampled)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(e&&e.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter(t=>t!==this&&t.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((t,e)=>t.endTimestamp&&e.endTimestamp?t.endTimestamp>e.endTimestamp?t:e:t).endTimestamp);const r=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...r,dynamicSamplingContext:this.getDynamicSamplingContext()},...r.source&&{transaction_info:{source:r.source}}};return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(i)}toContext(){return Ze({...super.toContext(),name:this.name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this.name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const t=this._hub||kr(),e=t.getClient();if(!e)return{};const n=t.getScope(),r=Ar(this.traceId,e,n),i=this.metadata.sampleRate;void 0!==i&&(r.sample_rate=`${i}`);const s=this.metadata.source;return s&&"url"!==s&&(r.transaction=this.name),void 0!==this.sampled&&(r.sampled=String(this.sampled)),r}setHub(t){this._hub=t}}const Pr={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Br=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Mr extends Nr{constructor(t,e,n,r){super(r),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=n}add(t){t.spanId!==this.transactionSpanId&&(t.finish=e=>{t.endTimestamp="number"==typeof e?e:Vn(),this._popActivity(t.spanId)},void 0===t.endTimestamp&&this._pushActivity(t.spanId)),super.add(t)}}class Lr extends Ur{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=Br[4]}constructor(t,e,n=Pr.idleTimeout,r=Pr.finalTimeout,i=Pr.heartbeatInterval,s=!1){super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=s,Lr.prototype.__init.call(this),Lr.prototype.__init2.call(this),Lr.prototype.__init3.call(this),Lr.prototype.__init4.call(this),Lr.prototype.__init5.call(this),Lr.prototype.__init6.call(this),s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),e.configureScope(t=>t.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Br[3],this.finish())},this._finalTimeout)}finish(t=Vn()){if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setTag("finishReason",this._finishReason),this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op);for(const e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(e=>{if(e.spanId===this.spanId)return!0;e.endTimestamp||(e.endTimestamp=t,e.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));const n=e.startTimestamp<t;return n||("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(e,void 0,2)),n}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Tracing] flushing IdleTransaction")}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Tracing] No active IdleTransaction");if(this._onScope){const t=this._idleHub.getScope();t.getTransaction()===this&&t.setSpan(void 0)}return super.finish(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){this.spanRecorder||(this.spanRecorder=new Mr(t=>{this._finished||this._pushActivity(t)},t=>{this._finished||this._popActivity(t)},this.spanId,t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("Starting heartbeat"),this._pingHeartbeat()),this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:e}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===e,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Br[5],this.finish(t)))}setFinishReason(t){this._finishReason=t}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=Br[1],this.finish(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`[Tracing] popActivity ${t}`),delete this.activities[t],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const t=Vn();this._idleTimeoutCanceledPermanently?(this._finishReason=Br[5],this.finish(t)):this._restartIdleTimeout(t+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Br[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function zr(){const t=this.getScope().getSpan();return t?{"sentry-trace":t.toTraceparent()}:{}}function Hr(t,e,n){if(!xr(e))return t.sampled=!1,t;if(void 0!==t.sampled)return t.setMetadata({sampleRate:Number(t.sampled)}),t;let r;return"function"==typeof e.tracesSampler?(r=e.tracesSampler(n),t.setMetadata({sampleRate:Number(r)})):void 0!==n.parentSampled?r=n.parentSampled:void 0!==e.tracesSampleRate?(r=e.tracesSampleRate,t.setMetadata({sampleRate:Number(r)})):(r=1,t.setMetadata({sampleRate:r})),(me(i=r)||"number"!=typeof i&&"boolean"!=typeof i?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),0):!(i<0||i>1)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${i}.`),0))?r?(t.sampled=Math.random()<r,t.sampled?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),t)):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t);var i}function Gr(t,e){const n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||"sentry",s=t.instrumenter||"sentry";i!==s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${i}\` instrumenter.\nThe transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),t.sampled=!1);let a=new Ur(t,this);return a=Hr(a,r,{parentSampled:t.parentSampled,transactionContext:t,...e}),a.sampled&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function Yr(t,e,n,r,i,s,a){const o=t.getClient(),c=o&&o.getOptions()||{};let l=new Lr(e,t,n,r,a,i);return l=Hr(l,c,{parentSampled:e.parentSampled,transactionContext:e,...s}),l.sampled&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),o&&o.emit&&o.emit("startTransaction",l),l}function jr(){const t=Er();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=Gr),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=zr),Dr||(Dr=!0,ln("error",Ir),ln("unhandledrejection",Ir)))}function Fr(t,e){return kr().captureException(t,{captureContext:e})}function $r(t){kr().withScope(t)}function Vr(t){return`${t.protocol?`${t.protocol}:`:""}//${t.host}${t.port?`:${t.port}`:""}${t.path?`/${t.path}`:""}/api/`}const qr=[];function Zr(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;e.forEach(t=>{t.isDefaultInstance=!0}),r=Array.isArray(n)?[...e,...n]:"function"==typeof n?Cn(n(e)):e;const i=function(t){const e={};return t.forEach(t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)}),Object.keys(e).map(t=>e[t])}(r),s=function(t,e){for(let e=0;e<t.length;e++)if(1==("Debug"===t[e].name))return e;return-1}(i);if(-1!==s){const[t]=i.splice(s,1);i.push(t)}return i}function Wr(t,e){e[t.name]=t,-1===qr.indexOf(t.name)&&(t.setupOnce(gr,kr),qr.push(t.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`Integration installed: ${t.name}`))}function Kr(t,e,n,r){const{normalizeDepth:i=3,normalizeMaxBreadth:s=1e3}=t,a={...e,event_id:e.event_id||n.event_id||bn(),timestamp:e.timestamp||$n()},o=n.integrations||t.integrations.map(t=>t.name);!function(t,e){const{environment:n,release:r,dist:i,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:hr),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==i&&(t.dist=i),t.message&&(t.message=Le(t.message,s));const a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=Le(a.value,s));const o=t.request;o&&o.url&&(o.url=Le(o.url,s))}(a,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(a,o),void 0===e.type&&function(t,e){const n=Ee._sentryDebugIds;if(!n)return;let r;const i=Jr.get(e);i?r=i:(r=new Map,Jr.set(e,r));const s=Object.keys(n).reduce((t,i)=>{let s;const a=r.get(i);a?s=a:(s=e(i),r.set(i,s));for(let e=s.length-1;e>=0;e--){const r=s[e];if(r.filename){t[r.filename]=n[i];break}}return t},{});try{t.exception.values.forEach(t=>{t.stacktrace.frames.forEach(t=>{t.filename&&(t.debug_id=s[t.filename])})})}catch(t){}}(a,t.stackParser);let c=r;n.captureContext&&(c=mr.clone(c).update(n.captureContext));let l=Un(a);if(c){if(c.getAttachments){const t=[...n.attachments||[],...c.getAttachments()];t.length&&(n.attachments=t)}l=c.applyToEvent(a,n)}return l.then(t=>(t&&function(t){const e={};try{t.exception.values.forEach(t=>{t.stacktrace.frames.forEach(t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)})})}catch(t){}if(0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach(t=>{n.push({type:"sourcemap",code_file:t,debug_id:e[t]})})}(t),"number"==typeof i&&i>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>({...t,...t.data&&{data:In(t.data,e,n)}}))},...t.user&&{user:In(t.user,e,n)},...t.contexts&&{contexts:In(t.contexts,e,n)},...t.extra&&{extra:In(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=In(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(t=>(t.data&&(t.data=In(t.data,e,n)),t))),r}(t,i,s):t))}const Jr=new WeakMap,Xr="Not capturing exception because it's already been captured.";class Qr{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(t){if(Qr.prototype.__init.call(this),Qr.prototype.__init2.call(this),Qr.prototype.__init3.call(this),Qr.prototype.__init4.call(this),Qr.prototype.__init5.call(this),this._options=t,t.dsn?this._dsn=Be(t.dsn):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("No DSN provided, client will not do anything."),this._dsn){const e=function(t,e={}){const n="string"!=typeof e&&e._metadata?e._metadata.sdk:void 0;return("string"==typeof e?e:e.tunnel)||`${function(t){return`${Vr(t)}${t.projectId}/envelope/`}(t)}?${function(t,e){return n={sentry_key:t.publicKey,sentry_version:"7",...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`).join("&");var n}(t,n)}`}(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){if(Tn(t))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(Xr));let r=e&&e.event_id;return this._process(this.eventFromException(t,e).then(t=>this._captureEvent(t,e,n)).then(t=>{r=t})),r}captureMessage(t,e,n,r){let i=n&&n.event_id;const s=ue(t)?this.eventFromMessage(String(t),e,n):this.eventFromException(t,n);return this._process(s.then(t=>this._captureEvent(t,n,r)).then(t=>{i=t})),i}captureEvent(t,e,n){if(e&&e.originalException&&Tn(e.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(Xr));let r=e&&e.event_id;return this._process(this._captureEvent(t,e,n).then(t=>{r=t})),r}captureSession(t){this._isEnabled()?"string"!=typeof t.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),fr(t,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;return e?this._isClientDoneProcessing(t).then(n=>e.flush(t).then(t=>n&&t)):Un(!0)}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,t))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(t){const e={};return t.forEach(t=>{t&&Wr(t,e)}),e}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){Wr(t,this._integrations)}sendEvent(t,e={}){if(this._dsn){let n=function(t,e,n,r){const i=ur(n),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const a=dr(t,i,r,e);return delete t.sdkProcessingMetadata,nr(a,[[{type:s},t]])}(t,this._dsn,this._options._metadata,this._options.tunnel);for(const t of e.attachments||[])n=rr(n,or(t,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then(e=>this.emit("afterSendEvent",t,e),null)}}sendSession(t){if(this._dsn){const e=function(t,e,n,r){const i=ur(n);return nr({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:Ue(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){const n=`${t}:${e}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}on(t,e){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(e)}emit(t,...e){this._hooks[t]&&this._hooks[t].forEach(t=>t(...e))}_updateSessionFromEvent(t,e){let n=!1,r=!1;const i=e.exception&&e.exception.values;if(i){r=!0;for(const t of i){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const s="ok"===t.status;(s&&0===t.errors||s&&n)&&(fr(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Bn(e=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(t,e,n){const r=this.getOptions(),i=Object.keys(this._integrations);return!e.integrations&&i.length>0&&(e.integrations=i),Kr(r,t,e,n).then(t=>{if(null===t)return t;const{propagationContext:e}=t.sdkProcessingMetadata||{};if((!t.contexts||!t.contexts.trace)&&e){const{traceId:r,spanId:i,parentSpanId:s,dsc:a}=e;t.contexts={trace:{trace_id:r,span_id:i,parent_span_id:s},...t.contexts};const o=a||Ar(r,this,n);t.sdkProcessingMetadata={dynamicSamplingContext:o,...t.sdkProcessingMetadata}}return t})}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then(t=>t.event_id,t=>{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e=t;"log"===e.logLevel?Oe.log(e.message):Oe.warn(e)}})}_processEvent(t,e,n){const r=this.getOptions(),{sampleRate:i}=r;if(!this._isEnabled())return Pn(new Me("SDK not enabled, will not capture event.","log"));const s=ei(t),a=ti(t),o=t.type||"error",c=`before send for type \`${o}\``;if(a&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),Pn(new Me(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l="replay_event"===o?"replay":o;return this._prepareEvent(t,e,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,t),new Me("An event processor returned `null`, will not send event.","log");if(e.data&&!0===e.data.__sentry__)return n;const i=function(t,e,n){const{beforeSend:r,beforeSendTransaction:i}=t;return ti(e)&&r?r(e,n):ei(e)&&i?i(e,n):e}(r,n,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(fe(t))return t.then(t=>{if(!de(t)&&null!==t)throw new Me(n);return t},t=>{throw new Me(`${e} rejected with ${t}`)});if(!de(t)&&null!==t)throw new Me(n);return t}(i,c)}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",l,t),new Me(`${c} returned \`null\`, will not send event.`,"log");const i=n&&n.getSession();!s&&i&&this._updateSessionFromEvent(i,r);const a=r.transaction_info;if(s&&a&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...a,source:t}}return this.sendEvent(r,e),r}).then(null,t=>{if(t instanceof Me)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new Me(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}_process(t){this._numProcessing++,t.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_sendEnvelope(t){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",t),this._transport.send(t).then(null,t=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("Error while sending event:",t)});("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(e=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t[e]}})}}function ti(t){return void 0===t.type}function ei(t){return"transaction"===t.type}const ni=30;function ri(t,e,n=function(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return Pn(new Me("Not adding Promise because buffer limit was reached."));const i=r();return-1===e.indexOf(i)&&e.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(t){return new Bn((n,r)=>{let i=e.length;if(!i)return n(!0);const s=setTimeout(()=>{t&&t>0&&n(!1)},t);e.forEach(t=>{Un(t).then(()=>{--i||(clearTimeout(s),n(!0))},r)})})}}}(t.bufferSize||ni)){let r={};function i(i){const s=[];if(ir(i,(e,n)=>{const i=lr(n);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(r,i)){const r=ii(e,n);t.recordDroppedEvent("ratelimit_backoff",i,r)}else s.push(e)}),0===s.length)return Un();const a=nr(i[0],s),o=e=>{ir(a,(n,r)=>{const i=ii(n,r);t.recordDroppedEvent(e,lr(r),i)})};return n.add(()=>e({body:ar(a,t.textEncoder)}).then(t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=function(t,{statusCode:e,headers:n},r=Date.now()){const i={...t},s=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(s)for(const t of s.trim().split(",")){const[e,n]=t.split(":",2),s=parseInt(e,10),a=1e3*(isNaN(s)?60:s);if(n)for(const t of n.split(";"))i[t]=r+a;else i.all=r+a}else a?i.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?pr:r-e}(a,r):429===e&&(i.all=r+6e4);return i}(r,t),t),t=>{throw o("network_error"),t})).then(t=>t,t=>{if(t instanceof Me)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("Skipped sending event because buffer is full."),o("queue_overflow"),Un();throw t})}return i.__sentry__baseTransport__=!0,{send:i,flush:t=>n.drain(t)}}function ii(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}const si="7.58.0";let ai;class oi{constructor(){oi.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=oi.id}setupOnce(){ai=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=Fe(this)||this;return ai.apply(e,t)}}catch(t){}}}oi.__initStatic();const ci=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],li=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/];class ui{static __initStatic(){this.id="InboundFilters"}__init(){this.name=ui.id}constructor(t={}){this._options=t,ui.prototype.__init.call(this)}setupOnce(t,e){const n=t=>{const n=e();if(n){const e=n.getIntegration(ui);if(e){const r=n.getClient(),i=r?r.getOptions():{},s=function(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:ci],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:li],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(e._options,i);return function(t,e){return e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${En(t)}`),!0):function(t,e){return!(t.type||!e||!e.length)&&function(t){if(t.message)return[t.message];if(t.exception){const{values:e}=t.exception;try{const{type:t="",value:n=""}=e&&e[e.length-1]||{};return[`${n}`,`${t}: ${n}`]}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error(`Cannot extract message for event ${En(t)}`),[]}}return[]}(t).some(t=>He(t,e))}(t,e.ignoreErrors)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${En(t)}`),!0):function(t,e){if("transaction"!==t.type||!e||!e.length)return!1;const n=t.transaction;return!!n&&He(n,e)}(t,e.ignoreTransactions)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${En(t)}`),!0):function(t,e){if(!e||!e.length)return!1;const n=di(t);return!!n&&He(n,e)}(t,e.denyUrls)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${En(t)}.\nUrl: ${di(t)}`),!0):!function(t,e){if(!e||!e.length)return!0;const n=di(t);return!n||He(n,e)}(t,e.allowUrls)&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${En(t)}.\nUrl: ${di(t)}`),!0)}(t,s)?null:t}}return t};n.id=this.name,t(n)}}function di(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(e):null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error(`Cannot extract url for event ${En(t)}`),null}}ui.__initStatic();const pi=Ee;let hi=0;function fi(){return hi>0}function mi(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(Fe(t))return t}catch(e){return t}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map(t=>mi(t,e));return t.apply(this,i)}catch(t){throw hi++,setTimeout(()=>{hi--}),$r(n=>{n.addEventProcessor(t=>(e.mechanism&&(wn(t,void 0,void 0),kn(t,e.mechanism)),t.extra={...t.extra,arguments:r},t)),Fr(t)}),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])}catch(t){}je(r,t),Ye(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>t.name})}catch(t){}return r}function _i(t,e){const n=yi(t,e),r={type:e&&e.name,value:bi(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function gi(t,e){return{exception:{values:[_i(t,e)]}}}function yi(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(vi.test(t.message))return 1}return 0}(e);try{return t(n,r)}catch(t){}return[]}const vi=/Minified React error #\d+;/i;function bi(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function Si(t,e,n,r,i){let s;if(oe(e)&&e.error)return gi(t,e.error);if(ce(e)||ae(e,"DOMException")){const i=e;if("stack"in e)s=gi(t,e);else{const e=i.name||(ce(i)?"DOMError":"DOMException"),a=i.message?`${e}: ${i.message}`:e;s=Ei(t,a,n,r),wn(s,a)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return se(e)?gi(t,e):de(e)||pe(e)?(s=function(t,e,n,r){const i=kr().getClient(),s=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:pe(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:wi(e,{isUnhandledRejection:r})}]},extra:{__serialized__:Nn(e,s)}};if(n){const e=yi(t,n);e.length&&(a.exception.values[0].stacktrace={frames:e})}return a}(t,e,n,i),kn(s,{synthetic:!0}),s):(s=Ei(t,e,n,r),wn(s,`${e}`,void 0),kn(s,{synthetic:!0}),s)}function Ei(t,e,n,r){const i={message:e};if(r&&n){const r=yi(t,n);r.length&&(i.exception={values:[{value:e,stacktrace:{frames:r}}]})}return i}function wi(t,{isUnhandledRejection:e}){const n=function(t,e=40){const n=Object.keys($e(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Le(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:Le(r,e)}return""}(t),r=e?"promise rejection":"exception";return oe(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:pe(t)?`Event \`${function(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(t){}}(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}const ki="Breadcrumbs";class Ti{static __initStatic(){this.id=ki}__init(){this.name=Ti.id}constructor(t){Ti.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){var t;this.options.console&&ln("console",Ci),this.options.dom&&ln("dom",(t=this.options.dom,function(e){let n,r="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>1024&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=1024),"string"==typeof r&&(r=[r]);try{const t=e.event;n=function(t){return!!t&&!!t.target}(t)?xe(t.target,{keyAttrs:r,maxStringLength:i}):xe(t,{keyAttrs:r,maxStringLength:i})}catch(t){n="<unknown>"}0!==n.length&&kr().addBreadcrumb({category:`ui.${e.name}`,message:n},{event:e.event,name:e.name,global:e.global})})),this.options.xhr&&ln("xhr",xi),this.options.fetch&&ln("fetch",Ri),this.options.history&&ln("history",Di)}addSentryBreadcrumb(t){this.options.sentry&&kr().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:En(t)},{event:t})}}function Ci(t){for(let e=0;e<t.args.length;e++)if("ref=Ref<"===t.args[e]){t.args[e+1]="viewRef";break}const e={category:"console",data:{arguments:t.args,logger:"console"},level:(n=t.level,"warn"===n?"warning":Hn.includes(n)?n:"log"),message:ze(t.args," ")};var n;if("assert"===t.level){if(!1!==t.args[0])return;e.message=`Assertion failed: ${ze(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1)}kr().addBreadcrumb(e,{input:t.args,level:t.level})}function xi(t){const{startTimestamp:e,endTimestamp:n}=t,r=t.xhr[an];if(!e||!n||!r)return;const{method:i,url:s,status_code:a,body:o}=r,c={method:i,url:s,status_code:a},l={xhr:t.xhr,input:o,startTimestamp:e,endTimestamp:n};kr().addBreadcrumb({category:"xhr",data:c,type:"http"},l)}function Ri(t){const{startTimestamp:e,endTimestamp:n}=t;if(n&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const r=t.fetchData,i={data:t.error,input:t.args,startTimestamp:e,endTimestamp:n};kr().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},i)}else{const r={...t.fetchData,status_code:t.response&&t.response.status},i={input:t.args,response:t.response,startTimestamp:e,endTimestamp:n};kr().addBreadcrumb({category:"fetch",data:r,type:"http"},i)}}function Di(t){let e=t.from,n=t.to;const r=Mn(pi.location.href);let i=Mn(e);const s=Mn(n);i.path||(i=r),r.protocol===s.protocol&&r.host===s.host&&(n=s.relative),r.protocol===i.protocol&&r.host===i.host&&(e=i.relative),kr().addBreadcrumb({category:"navigation",data:{from:e,to:n}})}Ti.__initStatic();class Ii extends Qr{constructor(t){const e=pi.SENTRY_SDK_SOURCE||"npm";t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${e}:@sentry/browser`,version:si}],version:si},super(t),t.sendClientReports&&pi.document&&pi.document.addEventListener("visibilitychange",()=>{"hidden"===pi.document.visibilityState&&this._flushOutcomes()})}eventFromException(t,e){return function(t,e,n,r){const i=Si(t,e,n&&n.syntheticException||void 0,r);return kn(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Un(i)}(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return function(t,e,n="info",r,i){const s=Ei(t,e,r&&r.syntheticException||void 0,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),Un(s)}(this._options.stackParser,t,e,n,this._options.attachStacktrace)}sendEvent(t,e){const n=this.getIntegrationById(ki);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(t),super.sendEvent(t,e)}captureUserFeedback(t){if(!this._isEnabled())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("SDK not enabled, will not capture user feedback."));const e=function(t,{metadata:e,tunnel:n,dsn:r}){const i={event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:Ue(r)}},s=function(t){return[{type:"user_report"},t]}(t);return nr(i,[s])}(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){const t=this._clearOutcomes();if(0===t.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("Sending outcomes:",t);const e=(n=t,nr((r=this._options.tunnel&&Ue(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:$n(),discarded_events:n}]]));var n,r;this._sendEnvelope(e)}}let Ni;function Oi(t,e=function(){if(Ni)return Ni;if(nn(pi.fetch))return Ni=pi.fetch.bind(pi);const t=pi.document;let e=pi.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return Ni=e.bind(pi)}()){let n=0,r=0;return ri(t,function(i){const s=i.body.length;n+=s,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,a).then(t=>(n-=s,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}}))}catch(t){return Ni=void 0,n-=s,r--,Pn(t)}})}function Ai(t){return ri(t,function(e){return new Bn((n,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(const e in t.headers)Object.prototype.hasOwnProperty.call(t.headers,e)&&i.setRequestHeader(e,t.headers[e]);i.send(e.body)})})}const Ui="?";function Pi(t,e,n,r){const i={filename:t,function:e,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const Bi=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Mi=/\((\S*)(?::(\d+))(?::(\d+))\)/,Li=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,zi=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Hi=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Gi=Je([30,t=>{const e=Bi.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=Mi.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=Yi(e[1]||Ui,e[2]);return Pi(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,t=>{const e=Li.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=zi.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||Ui;return[n,t]=Yi(n,t),Pi(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,t=>{const e=Hi.exec(t);return e?Pi(e[2],e[1]||Ui,+e[3],e[4]?+e[4]:void 0):void 0}]),Yi=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:Ui,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};class ji{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=ji.id}__init2(){this._installFunc={onerror:Fi,onunhandledrejection:$i}}constructor(t){ji.prototype.__init.call(this),ji.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){Error.stackTraceLimit=50;const t=this._options;for(const e in t){const n=this._installFunc[e];n&&t[e]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`Global Handler attached: ${e}`),n(),this._installFunc[e]=void 0)}}}function Fi(){ln("error",t=>{const[e,n,r]=Zi();if(!e.getIntegration(ji))return;const{msg:i,url:s,line:a,column:o,error:c}=t;if(fi()||c&&c.__sentry_own_request__)return;const l=void 0===c&&le(i)?function(t,e,n,r){let i=oe(t)?t.message:t,s="Error";const a=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);return a&&(s=a[1],i=a[2]),Vi({exception:{values:[{type:s,value:i}]}},e,n,r)}(i,s,a,o):Vi(Si(n,c||i,void 0,r,!1),s,a,o);l.level="error",qi(e,c,l,"onerror")})}function $i(){ln("unhandledrejection",t=>{const[e,n,r]=Zi();if(!e.getIntegration(ji))return;let i=t;try{"reason"in t?i=t.reason:"detail"in t&&"reason"in t.detail&&(i=t.detail.reason)}catch(t){}if(fi()||i&&i.__sentry_own_request__)return!0;const s=ue(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Si(n,i,void 0,r,!0);s.level="error",qi(e,i,s,"onunhandledrejection")})}function Vi(t,e,n,r){const i=t.exception=t.exception||{},s=i.values=i.values||[],a=s[0]=s[0]||{},o=a.stacktrace=a.stacktrace||{},c=o.frames=o.frames||[],l=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=le(e)&&e.length>0?e:function(){try{return Te.document.location.href}catch(t){return""}}();return 0===c.length&&c.push({colno:l,filename:d,function:"?",in_app:!0,lineno:u}),t}function qi(t,e,n,r){kn(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function Zi(){const t=kr(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}ji.__initStatic();const Wi=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Ki{static __initStatic(){this.id="TryCatch"}__init(){this.name=Ki.id}constructor(t){Ki.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){this._options.setTimeout&&Ge(pi,"setTimeout",Ji),this._options.setInterval&&Ge(pi,"setInterval",Ji),this._options.requestAnimationFrame&&Ge(pi,"requestAnimationFrame",Xi),this._options.XMLHttpRequest&&"XMLHttpRequest"in pi&&Ge(XMLHttpRequest.prototype,"send",Qi);const t=this._options.eventTarget;t&&(Array.isArray(t)?t:Wi).forEach(ts)}}function Ji(t){return function(...e){return e[0]=mi(e[0],{mechanism:{data:{function:Qe(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function Xi(t){return function(e){return t.apply(this,[mi(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Qe(t)},handled:!0,type:"instrument"}})])}}function Qi(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&Ge(n,t,function(e){const n={mechanism:{data:{function:t,handler:Qe(e)},handled:!0,type:"instrument"}},r=Fe(e);return r&&(n.mechanism.data.handler=Qe(r)),mi(e,n)})}),t.apply(this,e)}}function ts(t){const e=pi[t]&&pi[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(Ge(e,"addEventListener",function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=mi(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Qe(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.apply(this,[n,mi(r,{mechanism:{data:{function:"addEventListener",handler:Qe(r),target:t},handled:!0,type:"instrument"}}),i])}}),Ge(e,"removeEventListener",function(t){return function(e,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,i,r)}}))}Ki.__initStatic();class es{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=es.id}constructor(t={}){es.prototype.__init.call(this),this._key=t.key||"cause",this._limit=t.limit||5}setupOnce(t,e){t((t,n)=>{const r=e(),i=r.getClient(),s=r.getIntegration(es);return i&&s?(ge(_i,i.getOptions().stackParser,s._key,s._limit,t,n),t):t})}}es.__initStatic();class ns{constructor(){ns.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=ns.id}setupOnce(){gr(t=>{if(kr().getIntegration(ns)){if(!pi.navigator&&!pi.location&&!pi.document)return t;const e=t.request&&t.request.url||pi.location&&pi.location.href,{referrer:n}=pi.document||{},{userAgent:r}=pi.navigator||{},i={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},s={...t.request,...e&&{url:e},headers:i};return{...t,request:s}}return t})}}ns.__initStatic();class rs{constructor(){rs.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=rs.id}setupOnce(t,e){const n=t=>{if(t.type)return t;const n=e().getIntegration(rs);if(n){try{if(function(t,e){return!(!e||!function(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!ss(t,e)||!is(t,e))}(t,e)&&!function(t,e){const n=as(e),r=as(t);return!!(n&&r&&n.type===r.type&&n.value===r.value&&ss(t,e)&&is(t,e))}(t,e))}(t,n._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){return n._previousEvent=t}return n._previousEvent=t}return t};n.id=this.name,t(n)}}function is(t,e){let n=os(t),r=os(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let t=0;t<r.length;t++){const e=r[t],i=n[t];if(e.filename!==i.filename||e.lineno!==i.lineno||e.colno!==i.colno||e.function!==i.function)return!1}return!0}function ss(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(t){return!1}}function as(t){return t.exception&&t.exception.values&&t.exception.values[0]}function os(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(t){return}}rs.__initStatic();const cs=[new ui,new oi,new Ki,new Ti,new ji,new es,new rs,new ns];function ls(t={},e=kr()){if(!pi.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("Global document not defined in showReportDialog call"));const{client:n,scope:r}=e.getStackTop(),i=t.dsn||n&&n.getDsn();if(!i)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("DSN not configured for showReportDialog call"));r&&(t.user={...r.getUser(),...t.user}),t.eventId||(t.eventId=e.lastEventId());const s=pi.document.createElement("script");s.async=!0,s.crossOrigin="anonymous",s.src=function(t,e){const n=Be(t);if(!n)return"";const r=`${Vr(n)}embed/error-page/`;let i=`dsn=${Ue(n)}`;for(const t in e)if("dsn"!==t)if("user"===t){const t=e.user;if(!t)continue;t.name&&(i+=`&name=${encodeURIComponent(t.name)}`),t.email&&(i+=`&email=${encodeURIComponent(t.email)}`)}else i+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`;return`${r}?${i}`}(i,t),t.onLoad&&(s.onload=t.onLoad);const a=pi.document.head||pi.document.body;a?a.appendChild(s):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("Not injecting report dialog. No injection point found in HTML")}function us(t){t.startSession({ignoreDuration:!0}),t.captureSession()}const ds=Ee,ps="sentryReplaySession",hs="Unable to send Replay",fs=15e4,ms=5e3,_s=2e7;var gs;function ys(t){const e=null==t?void 0:t.host;return Boolean(e&&e.shadowRoot&&e.shadowRoot===t)}function vs({maskInputOptions:t,tagName:e,type:n}){"option"===e.toLowerCase()&&(e="select");const r="string"==typeof n?n.toLowerCase():void 0;return t[e.toLowerCase()]||r&&t[r]||"password"===r||"input"===e&&!n&&t.text}function bs({input:t,maskInputSelector:e,unmaskInputSelector:n,maskInputOptions:r,tagName:i,type:s,value:a,maskInputFn:o}){let c=a||"";return n&&t.matches(n)||(t.hasAttribute("data-rr-is-password")&&(s="password"),(vs({maskInputOptions:r,tagName:i,type:s})||e&&t.matches(e))&&(c=o?o(c):"*".repeat(c.length))),c}!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(gs||(gs={}));const Ss="__rrweb_original__";function Es(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?e.toLowerCase():null}function ws(t,e,n){return"string"==typeof n&&n.toLowerCase(),"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}let ks=1;const Ts=new RegExp("[^a-z0-9-_:]"),Cs=-2;function xs(t){return t?t.replace(/[\S]/g,"*"):""}function Rs(t){try{const e=t.rules||t.cssRules;return e?Array.from(e).map(Ds).join(""):null}catch(t){return null}}function Ds(t){let e=t.cssText;if(function(t){return"styleSheet"in t}(t))try{e=Rs(t.styleSheet)||e}catch(t){}return Is(e)}function Is(t){return t.indexOf(":")>-1?t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2"):t}let Ns,Os;const As=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Us=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Ps=/^(data:)([^,]*),(.*)/i;function Bs(t,e){return(t||"").replace(As,(t,n,r,i,s,a)=>{const o=r||s||a,c=n||i||"";if(!o)return t;if(!Us.test(o))return`url(${c}${o}${c})`;if(Ps.test(o))return`url(${c}${o}${c})`;if("/"===o[0])return`url(${c}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+o}${c})`;const l=e.split("/"),u=o.split("/");l.pop();for(const t of u)"."!==t&&(".."===t?l.pop():l.push(t));return`url(${c}${l.join("/")}${c})`})}const Ms=/^[^ \t\n\r\u000c]+/,Ls=/^[, \t\n\r\u000c]+/;function zs(t,e){if(!e||""===e.trim())return e;const n=t.createElement("a");return n.href=e,n.href}function Hs(){const t=document.createElement("a");return t.href="",t.href}function Gs(t,e,n,r,i,s,a,o){if(!i)return i;const c=r.toLowerCase(),l=n.toLowerCase();return"src"===c||"href"===c||"xlink:href"===c&&"#"!==i[0]?zs(t,i):"background"!==c||"table"!==l&&"td"!==l&&"th"!==l?"srcset"===c?function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r,i=t.exec(e.substring(n));return i?(r=i[0],n+=r.length,r):""}let i=[];for(;r(Ls),!(n>=e.length);){let s=r(Ms);if(","===s.slice(-1))s=zs(t,s.substring(0,s.length-1)),i.push(s);else{let r="";s=zs(t,s);let a=!1;for(;;){let t=e.charAt(n);if(""===t){i.push((s+r).trim());break}if(a)")"===t&&(a=!1);else{if(","===t){n+=1,i.push((s+r).trim());break}"("===t&&(a=!0)}r+=t,n+=1}}}return i.join(", ")}(t,i):"style"===c?Bs(i,Hs()):"object"===l&&"data"===c?zs(t,i):s&&function(t,e,n,r){return(!r||!t.matches(r))&&(["placeholder","title","aria-label"].indexOf(e)>-1||"input"===n&&"value"===e&&t.hasAttribute("type")&&["submit","button"].indexOf(t.getAttribute("type").toLowerCase())>-1)}(e,c,l,a)?o?o(i):xs(i):i:zs(t,i)}function Ys(t,e,n,r,i){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return Ys(t.parentNode,e,n,r,i);if(r&&(t.matches(r)||t.closest(r)))return!1;if(i)return!0;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=0;n<t.classList.length;n++)if(e.test(t.classList[n]))return!0;return!(!n||!t.matches(n))||Ys(t.parentNode,e,n,r,i)}function js(t){return null==t?"":t.toLowerCase()}function Fs(t,e){const{doc:n,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u=!1,inlineStylesheet:d=!0,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:m={},maskTextFn:_,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:E,onIframeLoad:w,iframeLoadTimeout:k=5e3,keepIframeSrcFn:T=(()=>!1)}=e;let{preserveWhiteSpace:C=!0}=e;const x=function(t,e){var n;const{doc:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:u,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:f={},maskTextFn:m,maskInputFn:_,dataURLOptions:g={},inlineImages:y,recordCanvas:v,keepIframeSrcFn:b}=e;let S;if(r.__sn){const t=r.__sn.id;S=1===t?void 0:t}switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:gs.Document,childNodes:[],compatMode:t.compatMode,rootId:S}:{type:gs.Document,childNodes:[],rootId:S};case t.DOCUMENT_TYPE_NODE:return{type:gs.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:S};case t.ELEMENT_NODE:const e=function(t,e,n,r){if(r&&t.matches(r))return!1;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=0;n<t.classList.length;n++)if(e.test(t.classList[n]))return!0;return!!n&&t.matches(n)}(t,i,s,a),k=function(t){if(t instanceof HTMLFormElement)return"form";const e=t.tagName.toLowerCase().trim();return Ts.test(e)?"div":e}(t);let T={};for(const{name:e,value:n}of Array.from(t.attributes))$s(k,e)||(T[e]=Gs(r,t,k,e,n,h,l,m));if("link"===k&&u){const e=Array.from(r.styleSheets).find(e=>e.href===t.href);let n=null;e&&(n=Rs(e)),n&&(delete T.rel,delete T.href,T._cssText=Bs(n,e.href))}if("style"===k&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=Rs(t.sheet);e&&(T._cssText=Bs(e,Hs()))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const e=t,n=Es(e),r=ws(e,k.toUpperCase(),n),i=t.checked;"submit"!==n&&"button"!==n&&r&&(T.value=bs({input:e,type:n,tagName:k,value:r,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:f,maskInputFn:_})),i&&(T.checked=i)}if("option"===k&&(t.selected&&!f.select?T.selected=!0:delete T.selected),"canvas"===k&&v)if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n<t.width;n+=50)for(let r=0;r<t.height;r+=50){const i=e.getImageData;if(new Uint32Array((Ss in i?i[Ss]:i).call(e,n,r,Math.min(50,t.width-n),Math.min(50,t.height-r)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(T.rr_dataURL=t.toDataURL(g.type,g.quality));else if(!("__context"in t)){const e=t.toDataURL(g.type,g.quality),n=document.createElement("canvas");n.width=t.width,n.height=t.height,e!==n.toDataURL(g.type,g.quality)&&(T.rr_dataURL=e)}if("img"===k&&y){Ns||(Ns=r.createElement("canvas"),Os=Ns.getContext("2d"));const e=t,n=e.crossOrigin;e.crossOrigin="anonymous";const i=()=>{try{Ns.width=e.naturalWidth,Ns.height=e.naturalHeight,Os.drawImage(e,0,0),T.rr_dataURL=Ns.toDataURL(g.type,g.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}n?T.crossOrigin=n:delete T.crossOrigin};e.complete&&0!==e.naturalWidth?i():e.onload=i}if("audio"!==k&&"video"!==k||(T.rr_mediaState=t.paused?"paused":"played",T.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(T.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(T.rr_scrollTop=t.scrollTop),e){const{width:e,height:n}=t.getBoundingClientRect();T={class:T.class,rr_width:`${e}px`,rr_height:`${n}px`}}return"iframe"!==k||b(T.src)||(t.contentDocument||(T.rr_src=T.src),delete T.src),{type:gs.Element,tagName:k,attributes:T,childNodes:[],isSVG:(w=t,Boolean("svg"===w.tagName||w.ownerSVGElement)||void 0),needBlock:e,rootId:S};case t.TEXT_NODE:const C=t.parentNode&&t.parentNode.tagName;let x=t.textContent;const R="STYLE"===C||void 0,D="SCRIPT"===C||void 0;if(R&&x){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(x=(E=t.parentNode.sheet).cssRules?Array.from(E.cssRules).map(t=>t.cssText?Is(t.cssText):"").join(""):"")}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}x=Bs(x,Hs())}return D&&(x="SCRIPT_PLACEHOLDER"),"TEXTAREA"===C&&x?x="":"OPTION"===C&&x?x=bs({input:t.parentNode,type:null,tagName:C,value:x,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:f,maskInputFn:_}):!R&&!D&&Ys(t,o,c,l,h)&&x&&(x=m?m(x):xs(x)),{type:gs.Text,textContent:x||"",isStyle:R,rootId:S};case t.CDATA_SECTION_NODE:return{type:gs.CDATA,textContent:"",rootId:S};case t.COMMENT_NODE:return{type:gs.Comment,textContent:t.textContent||"",rootId:S};default:return!1}var E,w}(t,{doc:n,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:m,maskTextFn:_,maskInputFn:g,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:T});if(!x)return console.warn(t,"not serialized"),null;let R;R="__sn"in t?t.__sn.id:!function(t,e){if(e.comment&&t.type===gs.Comment)return!0;if(t.type===gs.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(js(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===js(t.attributes.name)||"icon"===js(t.attributes.rel)||"apple-touch-icon"===js(t.attributes.rel)||"shortcut icon"===js(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&js(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(js(t.attributes.property).match(/^(og|twitter|fb):/)||js(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===js(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===js(t.attributes.name)||"googlebot"===js(t.attributes.name)||"bingbot"===js(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===js(t.attributes.name)||"generator"===js(t.attributes.name)||"framework"===js(t.attributes.name)||"publisher"===js(t.attributes.name)||"progid"===js(t.attributes.name)||js(t.attributes.property).match(/^article:/)||js(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===js(t.attributes.name)||"yandex-verification"===js(t.attributes.name)||"csrf-token"===js(t.attributes.name)||"p:domain_verify"===js(t.attributes.name)||"verify-v1"===js(t.attributes.name)||"verification"===js(t.attributes.name)||"shopify-checkout-api-token"===js(t.attributes.name)))return!0}}return!1}(x,y)&&(C||x.type!==gs.Text||x.isStyle||x.textContent.replace(/^\s+|\s+$/gm,"").length)?ks++:Cs;const D=Object.assign(x,{id:R});if(t.__sn=D,R===Cs)return null;r[R]=t,E&&E(t);let I=!u;if(D.type===gs.Element&&(I=I&&!D.needBlock,delete D.needBlock,t.shadowRoot&&(D.isShadowHost=!0)),(D.type===gs.Document||D.type===gs.Element)&&I){y.headWhitespace&&x.type===gs.Element&&"head"===x.tagName&&(C=!1);const e={doc:n,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:m,maskTextFn:_,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:C,onSerialize:E,onIframeLoad:w,iframeLoadTimeout:k,keepIframeSrcFn:T};for(const n of Array.from(t.childNodes)){const t=Fs(n,e);t&&D.childNodes.push(t)}if(function(t){return t.nodeType===t.ELEMENT_NODE}(t)&&t.shadowRoot)for(const n of Array.from(t.shadowRoot.childNodes)){const t=Fs(n,e);t&&(t.isShadow=!0,D.childNodes.push(t))}}return t.parentNode&&ys(t.parentNode)&&(D.isShadow=!0),D.type===gs.Element&&"iframe"===D.tagName&&function(t,e,n){const r=t.contentWindow;if(!r)return;let i,s=!1;try{i=r.document.readyState}catch(t){return}if("complete"!==i){const r=setTimeout(()=>{s||(e(),s=!0)},n);return void t.addEventListener("load",()=>{clearTimeout(r),s=!0,e()})}const a="about:blank";r.location.href===a&&t.src!==a&&""!==t.src?t.addEventListener("load",e):setTimeout(e,0)}(t,()=>{const e=t.contentDocument;if(e&&w){const n=Fs(e,{doc:e,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:m,maskTextFn:_,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:C,onSerialize:E,onIframeLoad:w,iframeLoadTimeout:k,keepIframeSrcFn:T});n&&w(t,n)}},k),D}function $s(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}var Vs,qs,Zs,Ws,Ks,Js;function Xs(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}!function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin"}(Vs||(Vs={})),function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration"}(qs||(qs={})),function(t){t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel"}(Zs||(Zs={})),function(t){t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2"}(Ws||(Ws={})),function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange"}(Ks||(Ks={})),function(t){t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back"}(Js||(Js={}));const Qs="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let ta={map:{},getId:()=>(console.error(Qs),-1),getNode:()=>(console.error(Qs),null),removeNodeFromMap(){console.error(Qs)},has:()=>(console.error(Qs),!1),reset(){console.error(Qs)}};function ea(t,e,n={}){let r=null,i=0;return function(s){let a=Date.now();i||!1!==n.leading||(i=a);let o=e-(a-i),c=this,l=arguments;o<=0||o>e?(r&&(clearTimeout(r),r=null),i=a,t.apply(c,l)):r||!1===n.trailing||(r=setTimeout(()=>{i=!1===n.leading?0:Date.now(),r=null,t.apply(c,l)},o))}}function na(t,e,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(t){setTimeout(()=>{n.set.call(this,t)},0),s&&s.set&&s.set.call(this,t)}}),()=>na(t,e,s||{},!0)}function ra(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(t){return()=>{}}}function ia(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function sa(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function aa(t,e,n,r){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){let i=!1;const s=r&&t.matches(r);return"string"==typeof e?i=void 0!==t.closest?!s&&null!==t.closest("."+e):!s&&t.classList.contains(e):!s&&t.classList.forEach(t=>{e.test(t)&&(i=!0)}),!i&&n&&(i=t.matches(n)),!s&&i||aa(t.parentNode,e,n,r)}return aa(t.parentNode,e,n,r)}function oa(t){return"__sn"in t&&t.__sn.id===Cs}function ca(t,e){if(ys(t))return!1;const n=e.getId(t);return!e.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||ca(t.parentNode,e))}function la(t){return Boolean(t.changedTouches)}function ua(t){return"__sn"in t&&t.__sn.type===gs.Element&&"iframe"===t.__sn.tagName}function da(t){return Boolean(null==t?void 0:t.shadowRoot)}function pa(t){return"__ln"in t}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ta=new Proxy(ta,{get:(t,e,n)=>("map"===e&&console.error(Qs),Reflect.get(t,e,n))}));class ha{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let n=0;n<t;n++)e=(null==e?void 0:e.next)||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&pa(t.previousSibling)){const n=t.previousSibling.__ln.next;e.next=n,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,n&&(n.previous=e)}else if(t.nextSibling&&pa(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;e.previous=n,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,n&&(n.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;this.length++}removeNode(t){const e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next&&(e.next.previous=e.previous)):(this.head=e.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const fa=(t,e)=>`${t}@${e}`;function ma(t){return"__sn"in t}class _a{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],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=[],e=new ha,n=t=>{let e=t,n=Cs;for(;n===Cs;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},r=r=>{var i,s,a,o,c;const l=r.getRootNode?null===(i=r.getRootNode())||void 0===i?void 0:i.host:null;let u=l;for(;null===(a=null===(s=null==u?void 0:u.getRootNode)||void 0===s?void 0:s.call(u))||void 0===a?void 0:a.host;)u=(null===(c=null===(o=null==u?void 0:u.getRootNode)||void 0===o?void 0:o.call(u))||void 0===c?void 0:c.host)||null;const d=!(this.doc.contains(r)||u&&this.doc.contains(u));if(!r.parentNode||d)return;const p=ys(r.parentNode)?this.mirror.getId(l):this.mirror.getId(r.parentNode),h=n(r);if(-1===p||-1===h)return e.addNode(r);let f=Fs(r,{doc:this.doc,map:this.mirror.map,blockClass:this.blockClass,blockSelector:this.blockSelector,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskAllText:this.maskAllText,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{ua(t)&&this.iframeManager.addIframe(t),da(r)&&this.shadowDomManager.addShadowRoot(r.shadowRoot,document)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)}});f&&t.push({parentId:p,nextId:h,node:f})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)ya(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)||r(t);for(const t of this.addedSet)va(this.droppedSet,t)||ya(this.removes,t,this.mirror)?va(this.movedSet,t)?r(t):this.droppedSet.add(t):r(t);let i=null;for(;e.length;){let t=null;if(i){const e=this.mirror.getId(i.value.parentNode),r=n(i.value);-1!==e&&-1!==r&&(t=i)}if(!t)for(let r=e.length-1;r>=0;r--){const i=e.get(r);if(i){const e=this.mirror.getId(i.value.parentNode),r=n(i.value);if(-1!==e&&-1!==r){t=i;break}}}if(!t){for(;e.head;)e.removeNode(e.head.value);break}i=t.previous,e.removeNode(t.value),r(t.value)}const s={texts:this.texts.map(t=>({id:this.mirror.getId(t.node),value:t.value})).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>({id:this.mirror.getId(t.node),attributes:t.attributes})).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:t};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=t=>{if(!oa(t.target))switch(t.type){case"characterData":{const e=t.target.textContent;aa(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||e===t.oldValue||this.texts.push({value:Ys(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const e=t.target;let n=e.getAttribute(t.attributeName);if("value"===t.attributeName&&(n=bs({input:e,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:e.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),aa(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||n===t.oldValue)return;let r=this.attributes.find(e=>e.node===t.target);if(r||(r={node:t.target,attributes:{}},this.attributes.push(r)),"type"===t.attributeName&&"INPUT"===e.tagName&&"password"===(t.oldValue||"").toLowerCase()&&e.setAttribute("data-rr-is-password","true"),"style"===t.attributeName){const n=this.doc.createElement("span");t.oldValue&&n.setAttribute("style",t.oldValue),null==r.attributes.style&&(r.attributes.style={});try{const t=r.attributes.style;for(const r of Array.from(e.style)){const i=e.style.getPropertyValue(r),s=e.style.getPropertyPriority(r);i===n.style.getPropertyValue(r)&&s===n.style.getPropertyPriority(r)||(t[r]=""===s?i:[i,s])}for(const r of Array.from(n.style))""===e.style.getPropertyValue(r)&&(t[r]=!1)}catch(t){console.warn("[rrweb] Error when parsing update to style attribute:",t)}}else{const e=t.target;r.attributes[t.attributeName]=Gs(this.doc,e,e.tagName,t.attributeName,n,this.maskAllText,this.unmaskTextSelector,this.maskTextFn)}break}case"childList":t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{const n=this.mirror.getId(e),r=ys(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);aa(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||oa(e)||(this.addedSet.has(e)?(ga(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||ca(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[fa(n,r)]?ga(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!!ys(t.target)||void 0})),this.mapRemoves.push(e))})}},this.genAdds=(t,e)=>{if(!e||!aa(e,this.blockClass,this.blockSelector,this.unblockSelector)){if(ma(t)){if(oa(t))return;this.movedSet.add(t);let n=null;e&&ma(e)&&(n=e.__sn.id),n&&(this.movedMap[fa(t.__sn.id,n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);aa(t,this.blockClass,this.blockSelector,this.unblockSelector)||t.childNodes.forEach(t=>this.genAdds(t))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskTextClass","maskTextSelector","unmaskTextSelector","maskInputSelector","unmaskInputSelector","inlineStylesheet","maskAllText","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].forEach(e=>{this[e]=t[e]})}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 ga(t,e){t.delete(e),e.childNodes.forEach(e=>ga(t,e))}function ya(t,e,n){const{parentNode:r}=e;if(!r)return!1;const i=n.getId(r);return!!t.some(t=>t.id===i)||ya(t,r,n)}function va(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||va(t,n))}const ba=t=>(...e)=>{try{return t(...e)}catch(t){try{t.__rrweb__=!0}catch(t){}throw t}},Sa=[];function Ea(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function wa(t,e){var n,r;const i=new _a;Sa.push(i),i.init(t);let s=window.MutationObserver||window.__rrMutationObserver;const a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(s=window[a]);const o=new s(ba(e=>{t.onMutation&&!1===t.onMutation(e)||i.processMutations(e)}));return o.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function ka({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){const o=ea(a=>{const o=Ea(a);if(!o||aa(o,r,i,s))return;const c=n.getId(o);if(o===e){const n=e.scrollingElement||e.documentElement;ba(t)({id:c,x:n.scrollLeft,y:n.scrollTop})}else ba(t)({id:c,x:o.scrollLeft,y:o.scrollTop})},a.scroll||100);return Xs("scroll",ba(o),e)}function Ta(t,e){const n=Object.assign({},t);return e||delete n.userTriggered,n}const Ca=["INPUT","TEXTAREA","SELECT"],xa=new WeakMap;function Ra(t){return function(t,e){if(Ia("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Ia("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Ia("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Ia("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else{const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function Da(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:a,inputCb:o,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:d,fontCb:p}=t;t.mutationCb=(...t)=>{e.mutation&&e.mutation(...t),n(...t)},t.mousemoveCb=(...t)=>{e.mousemove&&e.mousemove(...t),r(...t)},t.mouseInteractionCb=(...t)=>{e.mouseInteraction&&e.mouseInteraction(...t),i(...t)},t.scrollCb=(...t)=>{e.scroll&&e.scroll(...t),s(...t)},t.viewportResizeCb=(...t)=>{e.viewportResize&&e.viewportResize(...t),a(...t)},t.inputCb=(...t)=>{e.input&&e.input(...t),o(...t)},t.mediaInteractionCb=(...t)=>{e.mediaInteaction&&e.mediaInteaction(...t),c(...t)},t.styleSheetRuleCb=(...t)=>{e.styleSheetRule&&e.styleSheetRule(...t),l(...t)},t.styleDeclarationCb=(...t)=>{e.styleDeclaration&&e.styleDeclaration(...t),u(...t)},t.canvasMutationCb=(...t)=>{e.canvasMutation&&e.canvasMutation(...t),d(...t)},t.fontCb=(...t)=>{e.font&&e.font(...t),p(...t)}}(t,e);const r=wa(t,t.doc),i=function({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(!1===e.mousemove)return()=>{};const i="number"==typeof e.mousemove?e.mousemove:50;let s,a=[];const o=ea(e=>{const n=Date.now()-s;ba(t)(a.map(t=>(t.timeOffset-=n,t)),e),a=[],s=null},"number"==typeof e.mousemoveCallback?e.mousemoveCallback:500),c=ea(t=>{const e=Ea(t),{clientX:n,clientY:i}=la(t)?t.changedTouches[0]:t;s||(s=Date.now()),a.push({x:n,y:i,id:r.getId(e),timeOffset:Date.now()-s}),o("undefined"!=typeof DragEvent&&t instanceof DragEvent?qs.Drag:t instanceof MouseEvent?qs.MouseMove:qs.TouchMove)},i,{trailing:!1}),l=[Xs("mousemove",ba(c),n),Xs("touchmove",ba(c),n),Xs("drag",ba(c),n)];return ba(()=>{l.forEach(t=>t())})}(t),s=function({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){if(!1===a.mouseInteraction)return()=>{};const o=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,c=[];return Object.keys(Zs).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==o[t]).forEach(a=>{const o=a.toLowerCase(),l=ba((e=>a=>{const o=Ea(a);if(aa(o,r,i,s))return;const c=la(a)?a.changedTouches[0]:a;if(!c)return;const l=n.getId(o),{clientX:u,clientY:d}=c;ba(t)({type:Zs[e],id:l,x:u,y:d})})(a));c.push(Xs(o,l,e))}),ba(()=>{c.forEach(t=>t())})}(t),a=ka(t),o=function({viewportResizeCb:t}){let e=-1,n=-1;const r=ea(()=>{const r=ia(),i=sa();e===r&&n===i||(ba(t)({width:Number(i),height:Number(r)}),e=r,n=i)},200);return Xs("resize",ba(r),window)}(t),c=function({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:a,ignoreSelector:o,maskInputSelector:c,unmaskInputSelector:l,maskInputOptions:u,maskInputFn:d,sampling:p,userTriggeredOnInput:h}){function f(t){let n=Ea(t);const p=n&&n.tagName,f=t.isTrusted;if("OPTION"===p&&(n=n.parentElement),!n||!p||Ca.indexOf(p)<0||aa(n,r,i,s))return;const _=n,g=Es(_);if(_.classList.contains(a)||o&&_.matches(o))return;let y=ws(_,p,g),v=!1;"radio"!==g&&"checkbox"!==g||(v=n.checked),function({tagName:t,type:e,maskInputOptions:n,maskInputSelector:r}){return r||vs({maskInputOptions:n,tagName:t,type:e})}({maskInputOptions:u,maskInputSelector:c,tagName:p,type:g})&&(y=bs({input:_,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:p,type:g,value:y,maskInputFn:d})),m(n,ba(Ta)({text:y,isChecked:v,userTriggered:f},h));const b=n.name;"radio"===g&&b&&v&&e.querySelectorAll(`input[type="radio"][name="${b}"]`).forEach(t=>{if(t!==n){const e=bs({input:t,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:p,type:g,value:ws(t,p,g),maskInputFn:d});m(t,ba(Ta)({text:e,isChecked:!v,userTriggered:!1},h))}})}function m(e,r){const i=xa.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){xa.set(e,r);const i=n.getId(e);t(Object.assign(Object.assign({},r),{id:i}))}}const _=("last"===p.input?["change"]:["input","change"]).map(t=>Xs(t,ba(f),e)),g=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),y=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return g&&g.set&&_.push(...y.map(t=>na(t[0],t[1],{set(){ba(f)({target:this})}}))),ba(()=>{_.forEach(t=>t())})}(t),l=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:i,sampling:s}){const a=a=>ea(ba(s=>{const o=Ea(s);if(!o||aa(o,e,n,r))return;const{currentTime:c,volume:l,muted:u}=o;t({type:a,id:i.getId(o),currentTime:c,volume:l,muted:u})}),s.media||500),o=[Xs("play",a(0)),Xs("pause",a(1)),Xs("seeked",a(2)),Xs("volumechange",a(3))];return ba(()=>{o.forEach(t=>t())})}(t),u=function({styleSheetRuleCb:t,mirror:e},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:ba((n,r,i)=>{const[s,a]=i,o=e.getId(r.ownerNode);return-1!==o&&t({id:o,adds:[{rule:s,index:a}]}),n.apply(r,i)})});const i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ba((n,r,i)=>{const[s]=i,a=e.getId(r.ownerNode);return-1!==a&&t({id:a,removes:[{index:s}]}),n.apply(r,i)})});const s={};Na("CSSGroupingRule")?s.CSSGroupingRule=n.CSSGroupingRule:(Na("CSSMediaRule")&&(s.CSSMediaRule=n.CSSMediaRule),Na("CSSConditionRule")&&(s.CSSConditionRule=n.CSSConditionRule),Na("CSSSupportsRule")&&(s.CSSSupportsRule=n.CSSSupportsRule));const a={};return Object.entries(s).forEach(([n,r])=>{a[n]={insertRule:r.prototype.insertRule,deleteRule:r.prototype.deleteRule},r.prototype.insertRule=new Proxy(a[n].insertRule,{apply:ba((n,r,i)=>{const[s,a]=i,o=e.getId(r.parentStyleSheet.ownerNode);return-1!==o&&t({id:o,adds:[{rule:s,index:[...Ra(r),a||0]}]}),n.apply(r,i)})}),r.prototype.deleteRule=new Proxy(a[n].deleteRule,{apply:ba((n,r,i)=>{const[s]=i,a=e.getId(r.parentStyleSheet.ownerNode);return-1!==a&&t({id:a,removes:[{index:[...Ra(r),s]}]}),n.apply(r,i)})})}),ba(()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=i,Object.entries(s).forEach(([t,e])=>{e.prototype.insertRule=a[t].insertRule,e.prototype.deleteRule=a[t].deleteRule})})}(t,{win:n}),d=function({styleDeclarationCb:t,mirror:e},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(r,{apply:ba((n,r,i)=>{var s,a;const[o,c,l]=i,u=e.getId(null===(a=null===(s=r.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==u&&t({id:u,set:{property:o,value:c,priority:l},index:Ra(r.parentRule)}),n.apply(r,i)})});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:ba((n,r,i)=>{var s,a;const[o]=i,c=e.getId(null===(a=null===(s=r.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==c&&t({id:c,remove:{property:o},index:Ra(r.parentRule)}),n.apply(r,i)})}),ba(()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=i})}(t,{win:n}),p=t.collectFonts?function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(t,e,n){const r=new s(t,e,n);return i.set(r,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};const a=ra(e.fonts,"add",function(e){return function(n){return setTimeout(()=>{const e=i.get(n);e&&(t(e),i.delete(n))},0),e.apply(this,[n])}});return r.push(()=>{n.FontFace=s}),r.push(a),ba(()=>{r.forEach(t=>t())})}(t):()=>{},h=[];for(const e of t.plugins)h.push(e.observer(e.callback,n,e.options));return ba(()=>{Sa.forEach(t=>t.reset()),r.disconnect(),i(),s(),a(),o(),c(),l();try{u(),d()}catch(t){}p(),h.forEach(t=>t())})}function Ia(t){return void 0!==window[t]}function Na(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Oa{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){var n;this.mutationCb({adds:[{parentId:t.__sn.id,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,t)}}class Aa{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const e=this;this.restorePatches.push(ra(HTMLElement.prototype,"attachShadow",function(t){return function(){const n=t.apply(this,arguments);return this.shadowRoot&&e.addShadowRoot(this.shadowRoot,this.ownerDocument),n}}))}addShadowRoot(t,e){wa(Object.assign(Object.assign({},this.bypassOptions),{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),ka(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}observeAttachShadow(t){if(t.contentWindow){const e=this;this.restorePatches.push(ra(t.contentWindow.HTMLElement.prototype,"attachShadow",function(n){return function(){const r=n.apply(this,arguments);return this.shadowRoot&&e.addShadowRoot(this.shadowRoot,t.contentDocument),r}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var Ua="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pa="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ba=0;Ba<64;Ba++)Pa[Ua.charCodeAt(Ba)]=Ba;const Ma=new Map,La=(t,e,n)=>{if(!t||!Ga(t,e)&&"object"!=typeof t)return;const r=function(t,e){let n=Ma.get(t);return n||(n=new Map,Ma.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}(n,t.constructor.name);let i=r.indexOf(t);return-1===i&&(i=r.length,r.push(t)),i};function za(t,e,n){if(t instanceof Array)return t.map(t=>za(t,e,n));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const e=t.constructor.name,n=function(t){var e,n=new Uint8Array(t),r=n.length,i="";for(e=0;e<r;e+=3)i+=Ua[n[e]>>2],i+=Ua[(3&n[e])<<4|n[e+1]>>4],i+=Ua[(15&n[e+1])<<2|n[e+2]>>6],i+=Ua[63&n[e+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(t);return{rr_type:e,base64:n}}if(t instanceof DataView)return{rr_type:t.constructor.name,args:[za(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const e=t.constructor.name,{src:n}=t;return{rr_type:e,src:n}}return t instanceof ImageData?{rr_type:t.constructor.name,args:[za(t.data,e,n),t.width,t.height]}:Ga(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:La(t,e,n)}:t}const Ha=(t,e,n)=>[...t].map(t=>za(t,e,n)),Ga=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(n.find(n=>t instanceof e[n]))};function Ya(t,e,n,r,i,s,a,o){const c=[],l=Object.getOwnPropertyNames(t);for(const u of l)try{if("function"!=typeof t[u])continue;const l=ra(t,u,function(c){return function(...l){const d=c.apply(this,l);if(La(d,o,t),!aa(this.canvas,r,s,i)){a.getId(this.canvas);const r=Ha([...l],o,t);n(this.canvas,{type:e,property:u,args:r})}return d}});c.push(l)}catch(r){const i=na(t,u,{set(t){n(this.canvas,{type:e,property:u,args:[t],setter:!0})}});c.push(i)}return c}class ja{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(t,e){!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)},this.mutationCb=t.mutationCb,this.mirror=t.mirror,!0===t.recordCanvas&&this.initCanvasMutationObserver(t.win,t.blockClass,t.blockSelector,t.unblockSelector)}initCanvasMutationObserver(t,e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=function(t,e,n,r){const i=[];try{const s=ra(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(i,...s){return aa(this,e,n,r)||"__context"in this||(this.__context=i),t.apply(this,[i,...s])}});i.push(s)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(t=>t())}}(t,e,r,n),s=function(t,e,n,r,i,s){const a=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const s of o)try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[s])continue;const o=ra(e.CanvasRenderingContext2D.prototype,s,function(e){return function(...a){return aa(this.canvas,n,i,r)||setTimeout(()=>{const e=[...a];if("drawImage"===s&&e[0]&&e[0]instanceof HTMLCanvasElement){const t=e[0],n=t.getContext("2d");let r=null==n?void 0:n.getImageData(0,0,t.width,t.height);e[0]=JSON.stringify(null==r?void 0:r.data)}t(this.canvas,{type:Ws["2D"],property:s,args:e})},0),e.apply(this,a)}});a.push(o)}catch(n){const r=na(e.CanvasRenderingContext2D.prototype,s,{set(e){t(this.canvas,{type:Ws["2D"],property:s,args:[e],setter:!0})}});a.push(r)}return()=>{a.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,n),a=function(t,e,n,r,i,s){const a=[];return a.push(...Ya(e.WebGLRenderingContext.prototype,Ws.WebGL,t,n,r,i,s,e)),void 0!==e.WebGL2RenderingContext&&a.push(...Ya(e.WebGL2RenderingContext.prototype,Ws.WebGL2,t,n,r,i,s,e)),()=>{a.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,n,this.mirror);this.resetObservers=()=>{i(),s(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{const n=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||-1===e)return;const r=n.map(t=>{const e=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(t,["type"]);return e}),{type:i}=n[0];this.mutationCb({id:e,type:i,commands:r}),this.pendingCanvasMutations.delete(t)}}function Fa(t){return Object.assign(Object.assign({},t),{timestamp:Date.now()})}let $a,Va;const qa={map:{},getId:t=>t&&t.__sn?t.__sn.id:-1,getNode(t){return this.map[t]||null},removeNodeFromMap(t){delete this.map[t.__sn&&t.__sn.id],t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))},has(t){return this.map.hasOwnProperty(t)},reset(){this.map={}}};function Za(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:c=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,maskInputSelector:d=null,unmaskTextSelector:p=null,unmaskInputSelector:h=null,inlineStylesheet:f=!0,maskAllText:m=!1,maskAllInputs:_,maskInputOptions:g,slimDOMOptions:y,maskInputFn:v,maskTextFn:b,hooks:S,packFn:E,sampling:w={},mousemoveWait:k,recordCanvas:T=!1,userTriggeredOnInput:C=!1,collectFonts:x=!1,inlineImages:R=!1,plugins:D,keepIframeSrcFn:I=(()=>!1),onMutation:N}=t;if(!e)throw new Error("emit function is required");void 0!==k&&void 0===w.mousemove&&(w.mousemove=k);const O=!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!==g?g:{},A=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let U;!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(t){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let P=0;$a=(t,i)=>{var s;if(!(null===(s=Sa[0])||void 0===s?void 0:s.isFrozen())||t.type===Vs.FullSnapshot||t.type===Vs.IncrementalSnapshot&&t.data.source===qs.Mutation||Sa.forEach(t=>t.unfreeze()),e((t=>{for(const e of D||[])e.eventProcessor&&(t=e.eventProcessor(t));return E&&(t=E(t)),t})(t),i),t.type===Vs.FullSnapshot)U=t,P=0;else if(t.type===Vs.IncrementalSnapshot){if(t.data.source===qs.Mutation&&t.data.isAttachIframe)return;P++,(r&&P>=r||n&&t.timestamp-U.timestamp>n)&&Va(!0)}};const B=t=>{$a(Fa({type:Vs.IncrementalSnapshot,data:Object.assign({source:qs.Mutation},t)}))},M=t=>$a(Fa({type:Vs.IncrementalSnapshot,data:Object.assign({source:qs.Scroll},t)})),L=t=>$a(Fa({type:Vs.IncrementalSnapshot,data:Object.assign({source:qs.CanvasMutation},t)})),z=new Oa({mutationCb:B}),H=new ja({recordCanvas:T,mutationCb:L,win:window,blockClass:i,blockSelector:s,unblockSelector:a,mirror:qa}),G=new Aa({mutationCb:B,scrollCb:M,bypassOptions:{onMutation:N,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:f,maskAllText:m,maskInputOptions:O,maskTextFn:b,maskInputFn:v,recordCanvas:T,inlineImages:R,sampling:w,slimDOMOptions:A,iframeManager:z,canvasManager:H},mirror:qa});Va=(t=!1)=>{var e,n,r,o;$a(Fa({type:Vs.Meta,data:{href:window.location.href,width:sa(),height:ia()}}),t),Sa.forEach(t=>t.lock());const[c,_]=function(t,e){const{blockClass:n="rr-block",blockSelector:r=null,unblockSelector:i=null,maskTextClass:s="rr-mask",maskTextSelector:a=null,unmaskTextSelector:o=null,inlineStylesheet:c=!0,inlineImages:l=!1,recordCanvas:u=!1,maskInputSelector:d=null,unmaskInputSelector:p=null,maskAllText:h=!1,maskAllInputs:f=!1,maskTextFn:m,maskInputFn:_,slimDOM:g=!1,dataURLOptions:y,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:E,keepIframeSrcFn:w=(()=>!1)}=e||{},k={};return[Fs(t,{doc:t,map:k,blockClass:n,blockSelector:r,unblockSelector:i,maskTextClass:s,maskTextSelector:a,unmaskTextSelector:o,skipChild:!1,inlineStylesheet:c,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:!0===f?{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}:!1===f?{}:f,maskTextFn:m,maskInputFn:_,slimDOMOptions:!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===g,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===g?{}:g,dataURLOptions:y,inlineImages:l,recordCanvas:u,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:E,keepIframeSrcFn:w}),k]}(document,{blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:f,maskAllText:m,maskAllInputs:O,maskTextFn:b,slimDOM:A,recordCanvas:T,inlineImages:R,onSerialize:t=>{ua(t)&&z.addIframe(t),da(t)&&G.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{z.attachIframe(t,e),G.observeAttachShadow(t)},keepIframeSrcFn:I});if(!c)return console.warn("Failed to snapshot the document");qa.map=_,$a(Fa({type:Vs.FullSnapshot,data:{node:c,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(o=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),Sa.forEach(t=>t.unlock())};try{const t=[];t.push(Xs("DOMContentLoaded",()=>{$a(Fa({type:Vs.DomContentLoaded,data:{}}))}));const e=t=>{var e;return ba(Da)({onMutation:N,mutationCb:B,mousemoveCb:(t,e)=>$a(Fa({type:Vs.IncrementalSnapshot,data:{source:e,positions:t}})),mouseInteractionCb:t=>$a(Fa({type:Vs.IncrementalSnapshot,data:Object.assign({source:qs.MouseInteraction},t)})),scrollCb:M,viewportResizeCb:t=>$a(Fa({type:Vs.IncrementalSnapshot,data:Object.assign({source:qs.ViewportResize},t)})),inputCb:t=>$a(Fa({type:Vs.IncrementalSnapshot,data:Object.assign({source:qs.Input},t)})),mediaInteractionCb:t=>$a(Fa({type:Vs.IncrementalSnapshot,data:Object.assign({source:qs.MediaInteraction},t)})),styleSheetRuleCb:t=>$a(Fa({type:Vs.IncrementalSnapshot,data:Object.assign({source:qs.StyleSheetRule},t)})),styleDeclarationCb:t=>$a(Fa({type:Vs.IncrementalSnapshot,data:Object.assign({source:qs.StyleDeclaration},t)})),canvasMutationCb:L,fontCb:t=>$a(Fa({type:Vs.IncrementalSnapshot,data:Object.assign({source:qs.Font},t)})),blockClass:i,ignoreClass:o,ignoreSelector:c,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,maskInputOptions:O,inlineStylesheet:f,sampling:w,recordCanvas:T,inlineImages:R,userTriggeredOnInput:C,collectFonts:x,doc:t,maskAllText:m,maskInputFn:v,maskTextFn:b,blockSelector:s,unblockSelector:a,slimDOMOptions:A,mirror:qa,iframeManager:z,shadowDomManager:G,canvasManager:H,plugins:(null===(e=null==D?void 0:D.filter(t=>t.observer))||void 0===e?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>$a(Fa({type:Vs.Plugin,data:{plugin:t.name,payload:e}}))})))||[]},S)};z.addLoadListener(n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}});const n=()=>{Va(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():t.push(Xs("load",()=>{$a(Fa({type:Vs.Load,data:{}})),n()},window)),()=>{t.forEach(t=>t())}}catch(t){console.warn(t)}}function Wa(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:Vs.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:In(e,10,1e3)}}),"console"===e.category)))}function Ka(t){const e=Ja(t);return e&&e instanceof Element&&e.closest("button,a")||e}function Ja(t){return function(t){return"object"==typeof t&&!!t&&"target"in t}(t)?t.target:t}let Xa;Za.addCustomEvent=(t,e)=>{if(!$a)throw new Error("please add custom event after start recording");$a(Fa({type:Vs.Custom,data:{tag:t,payload:e}}))},Za.freezePage=()=>{Sa.forEach(t=>t.freeze())},Za.takeFullSnapshot=t=>{if(!Va)throw new Error("please take full snapshot after start recording");Va(t)},Za.mirror=qa;class Qa{__init(){this._lastMutation=0}__init2(){this._lastScroll=0}__init3(){this._clicks=[]}constructor(t,e,n=Wa){Qa.prototype.__init.call(this),Qa.prototype.__init2.call(this),Qa.prototype.__init3.call(this),this._timeout=e.timeout/1e3,this._threshold=e.threshold/1e3,this._scollTimeout=e.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=e.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const t=()=>{this._lastScroll=eo()},e=(i=()=>{this._lastMutation=eo()},Xa||(Xa=[],Ge(ds,"open",function(t){return function(...e){if(Xa)try{Xa.forEach(t=>t())}catch(t){}return t.apply(ds,e)}})),Xa.push(i),()=>{const t=Xa?Xa.indexOf(i):-1;t>-1&&Xa.splice(t,1)}),n=t=>{if(!t.target)return;const e=Ka(t);e&&this._handleMultiClick(e)},r=new MutationObserver(()=>{this._lastMutation=eo()});var i;r.observe(ds.document.documentElement,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),ds.addEventListener("scroll",t,{passive:!0}),ds.addEventListener("click",n,{passive:!0}),this._teardown=()=>{ds.removeEventListener("scroll",t),ds.removeEventListener("click",n),e(),r.disconnect(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,e){!function(t,e){return!to.includes(t.tagName)||"INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||"")||!("A"!==t.tagName||!(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target")))||!(!e||!t.matches(e))}(e,this._ignoreSelector)&&function(t){return!(!t.data||"number"!=typeof t.data.nodeId||!t.timestamp)}(t)&&(this._clicks.push({timestamp:t.timestamp,clickBreadcrumb:t,clickCount:0,node:e}),1===this._clicks.length&&this._scheduleCheckClicks())}_handleMultiClick(t){this._getClicks(t).forEach(t=>{t.clickCount++})}_getClicks(t){return this._clicks.filter(e=>e.node===t)}_checkClicks(){const t=[],e=eo();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=e&&t.push(n)});for(const e of t){this._generateBreadcrumbs(e);const t=this._clicks.indexOf(e);-1!==t&&this._clicks.splice(t,1)}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const e=this._replay,n=!(t.scrollAfter&&t.scrollAfter<=this._scollTimeout||t.mutationAfter&&t.mutationAfter<=this._threshold),{clickCount:r,clickBreadcrumb:i}=t;if(n){const n=1e3*Math.min(t.mutationAfter||this._timeout,this._timeout),s=n<1e3*this._timeout?"mutation":"timeout",a={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:ds.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:s,clickCount:r||1}};this._addBreadcrumbEvent(e,a)}else if(r>1){const t={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:ds.location.href,route:e.getCurrentRoute(),clickCount:r,metric:!0}};this._addBreadcrumbEvent(e,t)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}const to=["A","BUTTON","INPUT"];function eo(){return Date.now()/1e3}function no(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var ro;!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(ro||(ro={}));const io=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled"]);function so(t){const e={};for(const n in t)if(io.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}function ao(t,e){const n=t&&"__sn"in t&&t.__sn.type===ro.Element?t.__sn:null;return{message:e,data:n?{nodeId:n.id,node:{id:n.id,tagName:n.tagName,textContent:t?Array.from(t.childNodes).map(t=>"__sn"in t&&t.__sn.type===ro.Text&&t.__sn.textContent).filter(Boolean).map(t=>t.trim()).join(""):"",attributes:so(n.attributes)}}:{}}}const oo=["name","type","startTime","transferSize","duration"];function co(t){return function(e){return oo.every(n=>t[n]===e[n])}}function lo(t){return t>9999999999?t:1e3*t}class uo extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class po{__init(){this._totalSize=0}constructor(){po.prototype.__init.call(this),this.events=[]}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const e=JSON.stringify(t).length;if(this._totalSize+=e,this._totalSize>_s)throw new uo;this.events.push(t)}finish(){return new Promise(t=>{const e=this.events;this.clear(),t(JSON.stringify(e))})}clear(){this.events=[],this._totalSize=0}getEarliestTimestamp(){const t=this.events.map(t=>t.timestamp).sort()[0];return t?lo(t):null}}class ho{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((t,e)=>{this._worker.addEventListener("message",({data:n})=>{n.success?t():e()},{once:!0}),this._worker.addEventListener("error",t=>{e(t)},{once:!0})})),this._ensureReadyPromise}destroy(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,e){const n=this._getAndIncrementId();return new Promise((r,i)=>{const s=({data:e})=>{const a=e;if(a.method===t&&a.id===n){if(this._worker.removeEventListener("message",s),!a.success)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("[Replay]",a.response),void i(new Error("Error in compression worker"));r(a.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:t,arg:e})})}_getAndIncrementId(){return this._id++}}class fo{__init(){this._totalSize=0}constructor(t){fo.prototype.__init.call(this),this._worker=new ho(t),this._earliestTimestamp=null}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const e=lo(t.timestamp);(!this._earliestTimestamp||e<this._earliestTimestamp)&&(this._earliestTimestamp=e);const n=JSON.stringify(t);return this._totalSize+=n.length,this._totalSize>_s?Promise.reject(new uo):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this._worker.postMessage("clear")}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 mo{constructor(t){this._fallback=new po,this._compression=new fo(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}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){return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Replay] Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t}=this._fallback,e=[];for(const n of t)e.push(this._compression.addEvent(n));this._used=this._compression;try{await Promise.all(e)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("[Replay] Failed to add events when switching buffers.",t)}}}function _o(){return"sessionStorage"in ds&&!!ds.sessionStorage}function go(t,e,n=+new Date){return null===t||void 0===e||e<0||0!==e&&t+e<=n}function yo(t,e,n=+new Date){return go(t.started,e.maxSessionLife,n)||go(t.lastActivity,e.sessionIdleExpire,n)}function vo(t){return void 0!==t&&Math.random()<t}function bo(t){if(_o())try{ds.sessionStorage.setItem(ps,JSON.stringify(t))}catch(t){}}function So(t){const e=Date.now();return{id:t.id||bn(),started:t.started||e,lastActivity:t.lastActivity||e,segmentId:t.segmentId||0,sampled:t.sampled,shouldRefresh:!0}}function Eo({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1}){const r=function(t,e){return vo(t)?"session":!!e&&"buffer"}(t,e),i=So({sampled:r});return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`[Replay] Creating new session: ${i.id}`),n&&bo(i),i}function wo({timeouts:t,currentSession:e,stickySession:n,sessionSampleRate:r,allowBuffering:i}){const s=e||n&&function(){if(!_o())return null;try{const t=ds.sessionStorage.getItem(ps);return t?So(JSON.parse(t)):null}catch(t){return null}}();if(s){if(!yo(s,t)||i&&s.shouldRefresh)return{type:"saved",session:s};if(!s.shouldRefresh)return{type:"new",session:So({sampled:!1})};("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Replay] Session has expired")}return{type:"new",session:Eo({stickySession:n,sessionSampleRate:r,allowBuffering:i})}}async function ko(t,e,n){if(!t.eventBuffer)return null;if(t.isPaused())return null;if(lo(e.timestamp)+t.timeouts.sessionIdlePause<Date.now())return null;try{n&&t.eventBuffer.clear();const r=t.getOptions(),i="function"==typeof r.beforeAddRecordingEvent&&function(t){return t.type===Vs.Custom}(e)?r.beforeAddRecordingEvent(e):e;if(!i)return;return await t.eventBuffer.addEvent(i)}catch(e){const n=e&&e instanceof uo?"addEventSizeExceeded":"addEvent";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error(e),await t.stop(n);const r=kr().getClient();r&&r.recordDroppedEvent("internal_sdk_error","replay")}}function To(t){return!t.type}function Co(t){return"transaction"===t.type}function xo(t){const e=function(){const t=kr().getClient();if(!t)return!1;const e=t.getTransport();return e&&e.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!To(n)&&!Co(n))return;const i=r&&r.statusCode;e&&(!i||i<200||i>=300)||(Co(n)&&n.contexts&&n.contexts.trace&&n.contexts.trace.trace_id?t.getContext().traceIds.add(n.contexts.trace.trace_id):To(n)&&(n.event_id&&t.getContext().errorIds.add(n.event_id),"buffer"===t.recordingMode&&n.tags&&n.tags.replayId&&setTimeout(()=>{t.sendBufferedReplayOrFlush()})))}}function Ro(t,e){return e.map(({type:e,start:n,end:r,name:i,data:s})=>{const a=t.throttledAddEvent({type:Vs.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:i,startTimestamp:n,endTimestamp:r,data:s}}});return"string"==typeof a?Promise.resolve(null):a})}function Do(t,e){t.isEnabled()&&null!==e&&(function(t,e){return("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||!t.getOptions()._experiments.traceInternals)&&function(t){const e=kr().getClient(),n=e&&e.getDsn();return!!n&&t.includes(n.host)}(e)}(t,e.name)||t.addUpdate(()=>(Ro(t,[e]),!0)))}const Io=10,No=11,Oo=12,Ao=13,Uo=14,Po=15,Bo=20,Mo=21,Lo=22,zo=23,Ho=["true","false","null"];function Go(t,e,n){const r=t[t.length-1],i=e[n];if(!/\s/.test(i))if('"'!==i||Yo(e,n))switch(i){case"{":!function(t,e){e&&e!==Ao?(e===Mo&&t.push(Io),e===Bo&&t.push(Io)):t.push(Io)}(t,r);break;case"[":!function(t,e){e?e===Ao?(t.push(Bo),t.push(Mo)):(e===Mo&&(t.push(Bo),t.push(Mo)),e===Bo&&(t.push(Bo),t.push(Mo))):(t.push(Bo),t.push(Mo))}(t,r);break;case":":!function(t,e){e===No&&(t.pop(),t.push(Ao))}(t,r);break;case",":!function(t,e){if(e!==Ao)return e===Po?(t.pop(),void t.pop()):void(e!==Mo&&e===zo&&t.pop());t.pop()}(t,r);break;case"}":!function(t,e){e===Io&&t.pop(),e===Ao&&(t.pop(),t.pop()),e===Po&&(t.pop(),t.pop(),t.pop()),t[t.length-1]===Ao&&t.push(Po),t[t.length-1]===Mo&&t.push(zo)}(t,r);break;case"]":!function(t,e){e===Bo&&t.pop(),e===Mo&&(t.pop(),t.pop()),e===zo&&(t.pop(),t.pop(),t.pop()),t[t.length-1]===Ao&&t.push(Po),t[t.length-1]===Mo&&t.push(zo)}(t,r)}else!function(t,e){e===Uo?(t.pop(),t.push(Po)):e===Lo?(t.pop(),t.push(zo)):e!==Ao?e!==Mo?e!==Io?e===Oo&&(t.pop(),t.push(No)):t.push(Oo):t.push(Lo):t.push(Uo)}(t,r)}function Yo(t,e){return"\\"===t[e-1]&&!Yo(t,e-1)}function jo(t){return function(t,e){if(!e.length)return t;let n=t;const r=e.length-1;n=function(t,e){switch(e){case Io:return`${t}"~~":"~~"`;case No:return`${t}:"~~"`;case Oo:return`${t}~~":"~~"`;case Ao:return function(t){const e=t.lastIndexOf(":"),n=t.slice(e+1);return Ho.includes(n.trim())?`${t},"~~":"~~"`:`${t.slice(0,e+1)}"~~"`}(t);case Uo:return`${t}~~"`;case Po:return`${t},"~~":"~~"`;case Bo:return`${t}"~~"`;case Mo:return function(t){const e=function(t){for(let e=t.length-1;e>=0;e--){const n=t[e];if(","===n||"["===n)return e}return-1}(t);if(e>-1){const n=t.slice(e+1);return Ho.includes(n.trim())?`${t},"~~"`:`${t.slice(0,e+1)}"~~"`}return t}(t);case Lo:return`${t}~~"`;case zo:return`${t},"~~"`}return t}(n,e[r]);for(let t=r;t>=0;t--)switch(e[t]){case Io:n=`${n}}`;break;case Bo:n=`${n}]`}return n}(t,function(t){const e=[];for(let n=0;n<t.length;n++)Go(e,t,n);return e}(t))}function Fo(t,e){if(t)try{if("string"==typeof t)return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=Jo(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch(t){}}function $o(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function Vo(t){return"string"==typeof t?t:t instanceof URLSearchParams?t.toString():t instanceof FormData?Jo(t):void 0}function qo(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:a,request:o,response:c}=e;return{type:t,start:n/1e3,end:r/1e3,name:i,data:Ze({method:s,statusCode:a,request:o,response:c})}}function Zo(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Wo(t,e,n){if(!e&&0===Object.keys(t).length)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:i,warnings:s}=function(t){if(!t||"string"!=typeof t)return{body:t,warnings:[]};const e=t.length>fs;if(function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(t))try{const n=e?jo(t.slice(0,fs)):t;return{body:JSON.parse(n),warnings:e?["JSON_TRUNCATED"]:[]}}catch(n){return{body:e?`${t.slice(0,fs)}…`:t,warnings:e?["INVALID_JSON","TEXT_TRUNCATED"]:["INVALID_JSON"]}}return{body:e?`${t.slice(0,fs)}…`:t,warnings:e?["TEXT_TRUNCATED"]:[]}}(n);return r.body=i,s.length>0&&(r._meta={warnings:s}),r}function Ko(t,e){return Object.keys(t).reduce((n,r)=>{const i=r.toLowerCase();return e.includes(i)&&t[r]&&(n[i]=t[r]),n},{})}function Jo(t){return new URLSearchParams(t).toString()}function Xo(t,e){const n=function(t,e=ds.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(ds.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;return!t.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}(t);return He(n,e)}function Qo(t=[]){if(2===t.length&&"object"==typeof t[1])return t[1].body}function tc(t,e){const n={};return e.forEach(e=>{t.get(e)&&(n[e]=t.get(e))}),n}function ec(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?tc(n,e):Array.isArray(n)?{}:Ko(n,e):{}}let nc=null;function rc(t){return!(!t||!t.on)}function ic(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}const sc={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:a,encodedBodySize:o,responseStatus:c,transferSize:l}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${e}.${n}`,start:oc(s),end:oc(i),name:r,data:{size:l,statusCode:c,decodedBodySize:a,encodedBodySize:o}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:i}=t,s=oc(i);return{type:n,name:r,start:s,end:s+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:a,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:f,type:m}=t;return 0===i?null:{type:`${e}.${m}`,start:oc(h),end:oc(s),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:a,duration:i,domInteractive:l,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:s,redirectCount:p}}},"largest-contentful-paint":function(t){const{entryType:e,startTime:n,size:r}=t;let i=0;if(ds.performance){const t=ds.performance.getEntriesByType("navigation")[0];i=t&&t.activationStart||0}const s=Math.max(n-i,0),a=oc(i)+s/1e3;return{type:e,name:e,start:a,end:a,data:{value:s,size:r,nodeId:Za.mirror.getId(t.element)}}}};function ac(t){return void 0===sc[t.entryType]?null:sc[t.entryType](t)}function oc(t){return((qn||ds.performance.timeOrigin)+t)/1e3}function cc(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("[Replay] Received replay event after session expired."));const i=r||!e;e=!0,t.addUpdate(()=>{if("buffer"===t.recordingMode&&i&&t.setInitialState(),ko(t,n,i),!i)return!1;if(function(t,e){if(!e||!t.session||0!==t.session.segmentId)return Promise.resolve(null);ko(t,function(t){const e=t.getOptions();return{type:Vs.Custom,timestamp:Date.now(),data:{tag:"options",payload:{sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:!!t.eventBuffer&&"worker"===t.eventBuffer.type,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}(t),!1)}(t,i),t.session&&t.session.previousSessionId)return!0;if("buffer"===t.recordingMode&&t.session&&t.eventBuffer){const e=t.eventBuffer.getEarliestTimestamp();e&&(t.session.started=e,t.getOptions().stickySession&&bo(t.session))}return"session"===t.recordingMode&&t.flush(),!0})}}class lc extends Error{constructor(t){super(`Transport returned status code ${t}`)}}async function uc(t,e={count:0,interval:5e3}){const{recordingData:n,options:r}=t;var i;if(n.length)try{return await async function({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:i,session:s}){const a=function({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if("string"==typeof t)n=`${r}${t}`;else{const e=(new TextEncoder).encode(r);n=new Uint8Array(e.length+t.length),n.set(e),n.set(t,e.length)}return n}({recordingData:t,headers:{segment_id:n}}),{urls:o,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=kr(),p=d.getClient(),h=d.getScope(),f=p&&p.getTransport(),m=p&&p.getDsn();if(!(p&&f&&m&&s.sampled))return;const _={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,urls:o,replay_id:e,segment_id:n,replay_type:s.sampled},g=await async function({client:t,scope:e,replayId:n,event:r}){const i="object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations),s=await Kr(t.getOptions(),r,{event_id:n,integrations:i},e);if(!s)return null;s.platform=s.platform||"javascript";const a=t.getSdkMetadata&&t.getSdkMetadata(),{name:o,version:c}=a&&a.sdk||{};return s.sdk={...s.sdk,name:o||"sentry.javascript.unknown",version:c||"0.0.0"},s}({scope:h,client:p,replayId:e,event:_});if(!g)return p.recordDroppedEvent("event_processor","replay",_),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("An event processor returned `null`, will not send event."));delete g.sdkProcessingMetadata;const y=function(t,e,n,r){return nr(dr(t,ur(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"==typeof e?(new TextEncoder).encode(e).length:e.length},e]])}(g,a,m,p.getOptions().tunnel);let v;try{v=await f.send(y)}catch(t){const e=new Error(hs);try{e.cause=t}catch(t){}throw e}if(!v)return v;if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new lc(v.statusCode);return v}(t),!0}catch(n){if(n instanceof lc)throw n;if(i={_retryCount:e.count},kr().setContext("Replays",i),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r._experiments&&r._experiments.captureExceptions&&Fr(n),e.count>=3){const t=new Error(`${hs} - max retries exceeded`);try{t.cause=n}catch(t){}throw t}return e.interval*=++e.count,new Promise((n,r)=>{setTimeout(async()=>{try{await uc(t,e),n(!0)}catch(t){r(t)}},e.interval)})}}const dc="__THROTTLED";class pc{__init(){this.eventBuffer=null}__init2(){this.performanceEvents=[]}__init3(){this.recordingMode="session"}__init4(){this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5,maxSessionLife:36e5}}__init5(){this._performanceObserver=null}__init6(){this._flushLock=null}__init7(){this._lastActivity=Date.now()}__init8(){this._isEnabled=!1}__init9(){this._isPaused=!1}__init10(){this._hasInitializedCoreListeners=!1}__init11(){this._stopRecording=null}__init12(){this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""}}constructor({options:t,recordingOptions:e}){pc.prototype.__init.call(this),pc.prototype.__init2.call(this),pc.prototype.__init3.call(this),pc.prototype.__init4.call(this),pc.prototype.__init5.call(this),pc.prototype.__init6.call(this),pc.prototype.__init7.call(this),pc.prototype.__init8.call(this),pc.prototype.__init9.call(this),pc.prototype.__init10.call(this),pc.prototype.__init11.call(this),pc.prototype.__init12.call(this),pc.prototype.__init13.call(this),pc.prototype.__init14.call(this),pc.prototype.__init15.call(this),pc.prototype.__init16.call(this),pc.prototype.__init17.call(this),pc.prototype.__init18.call(this),this._recordingOptions=e,this._options=t,this._debouncedFlush=function(t,e,n){let r,i,s;const a=n&&n.maxWait?Math.max(n.maxWait,e):0;function o(){return c(),r=t(),r}function c(){void 0!==i&&clearTimeout(i),void 0!==s&&clearTimeout(s),i=s=void 0}function l(){return i&&clearTimeout(i),i=setTimeout(o,e),a&&void 0===s&&(s=setTimeout(o,a)),r}return l.cancel=c,l.flush=function(){return void 0!==i||void 0!==s?o():r},l}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(t,e,n){const r=new Map;let i=!1;return(...e)=>{const n=Math.floor(Date.now()/1e3);if((t=>{const e=t-5;r.forEach((t,n)=>{n<e&&r.delete(n)})})(n),[...r.values()].reduce((t,e)=>t+e,0)>=300){const t=i;return i=!0,t?"__SKIPPED":dc}i=!1;const s=r.get(n)||0;return r.set(n,s+1),t(...e)}}((t,e)=>ko(this,t,e));const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;i&&(this.clickDetector=new Qa(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}getOptions(){return this._options}initializeSampling(){const{errorSampleRate:t,sessionSampleRate:e}=this._options;t<=0&&e<=0||this._loadAndCheckSession()&&(this.session?(this.session.sampled&&"session"!==this.session.sampled&&(this.recordingMode="buffer"),this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");const t=this.session&&this.session.id,{session:e}=wo({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:1,allowBuffering:!1});e.previousSessionId=t,this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");const t=this.session&&this.session.id,{session:e}=wo({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:0,allowBuffering:!0});e.previousSessionId=t,this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{this._stopRecording=Za({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:cc(this),onMutation:this._onMutationHandler})}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(t){if(this._isEnabled)try{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e="[Replay] Stopping Replay"+(t?` triggered by ${t}`:"");(this.getOptions()._experiments.traceInternals?console.warn:Oe.log)(e)}this._isEnabled=!1,this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),"session"===this.recordingMode&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,function(){if(_o())try{ds.sessionStorage.removeItem(ps)}catch(t){}}(),this.session=void 0}catch(t){this._handleException(t)}}pause(){this._isPaused=!0,this.stopRecording()}resume(){this._loadAndCheckSession()&&(this._isPaused=!1,this.startRecording())}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const e=Date.now();await this.flushImmediate();const n=this.stopRecording();t&&n&&(this.recordingMode="session",this.session&&(this.session.shouldRefresh=!1,this._updateUserActivity(e),this._updateSessionActivity(e),this.session.started=e,this._maybeSaveSession()),this.startRecording())}addUpdate(t){const e=t();"buffer"!==this.recordingMode&&!0!==e&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._loadAndCheckSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){const t=this.getSessionId();if(this._lastActivity&&go(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled)this.pause();else if(this._loadAndCheckSession())return t===this.getSessionId()||(this._triggerFullSnapshot(),!1)}setInitialState(){const t=`${ds.location.origin}${ds.location.pathname}${ds.location.hash}${ds.location.search}`;this.performanceEvents=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(t,e){const n=this._throttledAddEvent(t,e);if(n===dc){const t=no({category:"replay.throttled"});this.addUpdate(()=>{ko(this,{type:Vs.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:!0}})})}return n}getCurrentRoute(){const t=this.lastTransaction||kr().getScope().getTransaction();if(t&&["route","custom"].includes(t.metadata.source))return t.name}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:t}){if(t&&window.Worker)try{const t=function(){const t=new Blob(['/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\nfunction t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=new Uint8Array([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]),a=new Uint8Array([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]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),n=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);t(s);const r=new Array(60);t(r);const o=new Array(512);t(o);const l=new Array(256);t(l);const h=new Array(29);t(h);const d=new Array(30);function _(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let f,c,u;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const m=t=>t<256?o[t]:o[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},g=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,b(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},p=(t,e,a)=>{g(t,a[2*e],a[2*e+1])},k=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},v=(t,e,a)=>{const i=new Array(16);let n,s,r=0;for(n=1;n<=15;n++)r=r+a[n-1]<<1,i[n]=r;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=k(i[e]++,e))}},y=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[a]},A=(t,e,a)=>{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n<t.heap_len&&z(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!z(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i},E=(t,i,n)=>{let s,r,o,_,f=0;if(0!==t.sym_next)do{s=255&t.pending_buf[t.sym_buf+f++],s+=(255&t.pending_buf[t.sym_buf+f++])<<8,r=t.pending_buf[t.sym_buf+f++],0===s?p(t,r,i):(o=l[r],p(t,o+256+1,i),_=e[o],0!==_&&(r-=h[o],g(t,r,_)),s--,o=m(s),p(t,o,n),_=a[o],0!==_&&(s-=d[o],g(t,s,_)))}while(f<t.sym_next);p(t,256,i)},R=(t,e)=>{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let r,o,l,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<s;r++)0!==a[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=h<2?++h:0,a[2*l]=1,t.depth[l]=0,t.opt_len--,n&&(t.static_len-=i[2*l+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)A(t,a,r);l=s;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=o,a[2*l]=a[2*r]+a[2*o],t.depth[l]=(t.depth[r]>=t.depth[o]?t.depth[r]:t.depth[o])+1,a[2*r+1]=a[2*o+1]=l,t.heap[1]=l++,A(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,d,_,f,c,u,w=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)d=t.heap[h],f=a[2*a[2*d+1]+1]+1,f>l&&(f=l,w++),a[2*d+1]=f,d>i||(t.bl_count[f]++,c=0,d>=o&&(c=r[d-o]),u=a[2*d],t.opt_len+=u*(f+c),s&&(t.static_len+=u*(n[2*d+1]+c)));if(0!==w){do{for(f=l-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,w-=2}while(w>0);for(f=l;0!==f;f--)for(d=t.bl_count[f];0!==d;)_=t.heap[--h],_>i||(a[2*_+1]!==f&&(t.opt_len+=(f-a[2*_+1])*a[2*_],a[2*_+1]=f),d--)}})(t,e),v(a,h,t.bl_count)},Z=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o<l&&n===r||(o<h?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4))},U=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o<l&&n===r)){if(o<h)do{p(t,n,t.bl_tree)}while(0!=--o);else 0!==n?(n!==s&&(p(t,n,t.bl_tree),o--),p(t,16,t.bl_tree),g(t,o-3,2)):o<=10?(p(t,17,t.bl_tree),g(t,o-3,3)):(p(t,18,t.bl_tree),g(t,o-11,7));o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4)}};let S=!1;const D=(t,e,a,i)=>{g(t,0+(i?1:0),3),x(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var T=(t,e,a,i)=>{let o,l,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),h=(t=>{let e;for(Z(t,t.dyn_ltree,t.l_desc.max_code),Z(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*n[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,l=t.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==e?D(t,e,a,i):4===t.strategy||l===o?(g(t,2+(i?1:0),3),E(t,s,r)):(g(t,4+(i?1:0),3),((t,e,a,i)=>{let s;for(g(t,e-257,5),g(t,a-1,5),g(t,i-4,4),s=0;s<i;s++)g(t,t.bl_tree[2*n[s]+1],3);U(t,t.dyn_ltree,e-1),U(t,t.dyn_dtree,a-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),E(t,t.dyn_ltree,t.dyn_dtree)),y(t),i&&x(t)},O={_tr_init:t=>{S||((()=>{let t,n,w,m,b;const g=new Array(16);for(w=0,m=0;m<28;m++)for(h[m]=w,t=0;t<1<<e[m];t++)l[w++]=m;for(l[w-1]=m,b=0,m=0;m<16;m++)for(d[m]=b,t=0;t<1<<a[m];t++)o[b++]=m;for(b>>=7;m<30;m++)for(d[m]=b<<7,t=0;t<1<<a[m]-7;t++)o[256+b++]=m;for(n=0;n<=15;n++)g[n]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,g[8]++;for(;t<=255;)s[2*t+1]=9,t++,g[9]++;for(;t<=279;)s[2*t+1]=7,t++,g[7]++;for(;t<=287;)s[2*t+1]=8,t++,g[8]++;for(v(s,287,g),t=0;t<30;t++)r[2*t+1]=5,r[2*t]=k(t,5);f=new _(s,e,257,286,15),c=new _(r,a,0,30,15),u=new _(new Array(0),i,0,19,7)})(),S=!0),t.l_desc=new w(t.dyn_ltree,f),t.d_desc=new w(t.dyn_dtree,c),t.bl_desc=new w(t.bl_tree,u),t.bi_buf=0,t.bi_valid=0,y(t)},_tr_stored_block:D,_tr_flush_block:T,_tr_tally:(t,e,a)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(l[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{g(t,2,3),p(t,256,s),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var F=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const L=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,i)=>{const n=L,s=i+a;t^=-1;for(let a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return-1^t},I={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:C,_tr_stored_block:H,_tr_flush_block:M,_tr_tally:j,_tr_align:K}=O,{Z_NO_FLUSH:P,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:G,Z_FINISH:X,Z_BLOCK:W,Z_OK:q,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:V,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:tt,Z_FILTERED:et,Z_HUFFMAN_ONLY:at,Z_RLE:it,Z_FIXED:nt,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:rt,Z_DEFLATED:ot}=B,lt=(t,e)=>(t.msg=I[e],e),ht=t=>2*t-(t>4?9:0),dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},_t=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let ft=(t,e,a)=>(e<<t.hash_shift^a)&t.hash_mask;const ct=t=>{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ut=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ct(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},mt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},bt=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=F(t.adler,e,n,a):2===t.state.wrap&&(t.adler=N(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},gt=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+258;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&s<f);if(i=258-(f-s),s=f-258,i>r){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead},pt=t=>{const e=t.w_size;let a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),_t(t),i+=e),0===t.strm.avail_in)break;if(a=bt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=ft(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_out<n)break;if(n=t.strm.avail_out-n,i=t.strstart-t.block_start,a>i+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a<s&&(0===a&&e!==X||e===P||a!==i+t.strm.avail_in))break;r=e===X&&a===i+t.strm.avail_in?1:0,H(t,0,0,r),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,ct(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(bt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),r?4:e!==P&&e!==X&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(n=t.window_size-t.strstart,t.strm.avail_in>n&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(bt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water<t.strstart&&(t.high_water=t.strstart),n=t.bi_valid+42>>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===X)&&e!==P&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===X&&0===t.strm.avail_in&&a===i?1:0,H(t,t.block_start,a,r),t.block_start+=a,ct(t.strm)),r?3:1)},vt=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a)),t.match_length>=3)if(i=j(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else i=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2},yt=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a),t.match_length<=5&&(t.strategy===et||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=j(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ut(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=j(t,0,t.window[t.strstart-1]),i&&ut(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=j(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const zt=[new xt(0,0,0,0,kt),new xt(4,4,8,4,vt),new xt(4,5,16,8,vt),new xt(4,6,32,32,vt),new xt(4,4,16,16,yt),new xt(8,16,32,32,yt),new xt(8,16,128,128,yt),new xt(8,32,128,256,yt),new xt(32,128,258,1024,yt),new xt(32,258,258,4096,yt)];function At(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),dt(this.dyn_ltree),dt(this.dyn_dtree),dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),dt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Et(t))return lt(t,Q);t.total_in=t.total_out=0,t.data_type=rt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,C(e),q},Zt=t=>{const e=Rt(t);var a;return e===q&&((a=t.state).window_size=2*a.w_size,dt(a.head),a.max_lazy_match=zt[a.level].max_lazy,a.good_match=zt[a.level].good_length,a.nice_match=zt[a.level].nice_length,a.max_chain_length=zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ut=(t,e,a,i,n,s)=>{if(!t)return Q;let r=1;if(e===tt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ot||i<8||i>15||e<0||e>9||s<0||s>nt||8===i&&1!==r)return lt(t,Q);8===i&&(i=9);const o=new At;return t.state=o,o.strm=t,o.status=42,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=s,o.method=a,Zt(t)};var St={deflateInit:(t,e)=>Ut(t,e,ot,15,8,st),deflateInit2:Ut,deflateReset:Zt,deflateResetKeep:Rt,deflateSetHeader:(t,e)=>Et(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,q),deflate:(t,e)=>{if(Et(t)||e>W||e<0)return t?lt(t,Q):Q;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==X)return lt(t,0===t.avail_out?$:Q);const i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(ct(t),0===t.avail_out)return a.last_flush=-1,q}else if(0===t.avail_in&&ht(e)<=ht(i)&&e!==X)return lt(t,$);if(666===a.status&&0!==t.avail_in)return lt(t,$);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,i=-1;if(i=a.strategy>=at||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=i<<6,0!==a.strstart&&(e|=32),e+=31-e%31,mt(a,e),0!==a.strstart&&(mt(a,t.adler>>>16),mt(a,65535&t.adler)),t.adler=1,a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(57===a.status)if(t.adler=0,wt(a,31),wt(a,139),wt(a,8),a.gzhead)wt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),wt(a,255&a.gzhead.time),wt(a,a.gzhead.time>>8&255),wt(a,a.gzhead.time>>16&255),wt(a,a.gzhead.time>>24&255),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(wt(a,255&a.gzhead.extra.length),wt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=N(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,3),a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q;if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,ct(t),0!==a.pending)return a.last_flush=-1,q;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(ct(t),0!==a.pending))return a.last_flush=-1,q;wt(a,255&t.adler),wt(a,t.adler>>8&255),t.adler=0}if(a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(0!==t.avail_in||0!==a.lookahead||e!==P&&666!==a.status){let i=0===a.level?kt(a,e):a.strategy===at?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(pt(t),0===t.lookahead)){if(e===P)return 1;break}if(t.match_length=0,a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=258){if(pt(t),t.lookahead<=258&&e===P)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+258;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&n<s);t.match_length=258-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=j(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):zt[a.level].func(a,e);if(3!==i&&4!==i||(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),q;if(2===i&&(e===Y?K(a):e!==W&&(H(a,0,0,!1),e===G&&(dt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),ct(t),0===t.avail_out))return a.last_flush=-1,q}return e!==X?q:a.wrap<=0?J:(2===a.wrap?(wt(a,255&t.adler),wt(a,t.adler>>8&255),wt(a,t.adler>>16&255),wt(a,t.adler>>24&255),wt(a,255&t.total_in),wt(a,t.total_in>>8&255),wt(a,t.total_in>>16&255),wt(a,t.total_in>>24&255)):(mt(a,t.adler>>>16),mt(a,65535&t.adler)),ct(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?q:J)},deflateEnd:t=>{if(Et(t))return Q;const e=t.state.status;return t.state=null,113===e?lt(t,V):q},deflateSetDictionary:(t,e)=>{let a=e.length;if(Et(t))return Q;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return Q;if(1===n&&(t.adler=F(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(dt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,pt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=ft(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,pt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,q},deflateInfo:"pako deflate (from Nodeca project)"};const Dt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Dt(a,e)&&(t[e]=a[e])}}return t},Ot=t=>{let e=0;for(let a=0,i=t.length;a<i;a++)e+=t[a].length;const a=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];a.set(n,i),i+=n.length}return a};let Ft=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Ft=!1}const Lt=new Uint8Array(256);for(let t=0;t<256;t++)Lt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Lt[254]=Lt[254]=1;var Nt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n<r;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),s=0,n=0;s<o;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},It=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i<a;){let e=t[i++];if(e<128){s[n++]=e;continue}let r=Lt[e];if(r>4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i<a;)e=e<<6|63&t[i++],r--;r>1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Ft)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i<e;i++)a+=String.fromCharCode(t[i]);return a})(s,n)},Bt=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Lt[t[a]]>e?a:e};var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Mt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Kt,Z_FINISH:Pt,Z_OK:Yt,Z_STREAM_END:Gt,Z_DEFAULT_COMPRESSION:Xt,Z_DEFAULT_STRATEGY:Wt,Z_DEFLATED:qt}=B;function Jt(t){this.options=Tt({level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=St.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Yt)throw new Error(I[a]);if(e.header&&St.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Nt(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=St.deflateSetDictionary(this.strm,t),a!==Yt)throw new Error(I[a]);this._dict_set=!0}}function Qt(t,e){const a=new Jt(e);if(a.push(t,!0),a.err)throw a.msg||I[a.err];return a.result}Jt.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Pt:Mt,"string"==typeof t?a.input=Nt(t):"[object ArrayBuffer]"===Ht.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===jt||s===Kt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=St.deflate(a,s),n===Gt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=St.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Yt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Yt&&(this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Vt={Deflate:Jt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:B};var $t=function(t,e){let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=u[f&m];e:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=16209;break t}k=65535&g,p&=15,p&&(c<p&&(f+=z[a++]<<c,c+=8),k+=f&(1<<p)-1,f>>>=p,c-=p),c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=w[f&b];a:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=16209;break t}if(v=65535&g,p&=15,c<p&&(f+=z[a++]<<c,c+=8,c<p&&(f+=z[a++]<<c,c+=8)),v+=f&(1<<p)-1,v>o){t.msg="invalid distance too far back",E.mode=16209;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=16209;break t}if(y=0,x=_,0===d){if(y+=l-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}else if(d<p){if(y+=l+d-p,p-=d,p<k){k-=p;do{A[n++]=_[y++]}while(--p);if(y=0,d<k){p=d,k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}}else if(y+=d-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}for(;k>2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a<i&&n<r);k=c>>3,a-=k,c-=k<<3,f&=(1<<c)-1,t.next_in=a,t.next_out=n,t.avail_in=a<i?i-a+5:5-(a-i),t.avail_out=n<r?r-n+257:257-(n-r),E.hold=f,E.bits=c};const te=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ee=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ae=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ie=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,a,i,n,s,r,o)=>{const l=o.bits;let h,d,_,f,c,u,w=0,m=0,b=0,g=0,p=0,k=0,v=0,y=0,x=0,z=0,A=null;const E=new Uint16Array(16),R=new Uint16Array(16);let Z,U,S,D=null;for(w=0;w<=15;w++)E[w]=0;for(m=0;m<i;m++)E[e[a+m]]++;for(p=l,g=15;g>=1&&0===E[g];g--);if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b<g&&0===E[b];b++);for(p<b&&(p=b),y=1,w=1;w<=15;w++)if(y<<=1,y-=E[w],y<0)return-1;if(y>0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<15;w++)R[w+1]=R[w]+E[w];for(m=0;m<i;m++)0!==e[a+m]&&(r[R[e[a+m]]++]=m);if(0===t?(A=D=r,u=20):1===t?(A=te,D=ee,u=257):(A=ae,D=ie,u=0),z=0,m=0,w=b,c=s,k=p,v=0,_=-1,x=1<<p,f=x-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1<u?(U=0,S=r[m]):r[m]>=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<<w-v,d=1<<k,b=d;do{d-=h,n[c+(z>>v)+d]=Z<<24|U<<16|S|0}while(0!==d);for(h=1<<w-1;z&h;)h>>=1;if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]]}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<<k;k+v<g&&(y-=E[k+v],!(y<=0));)k++,y<<=1;if(x+=1<<k,1===t&&x>852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0};const{Z_FINISH:se,Z_BLOCK:re,Z_TREES:oe,Z_OK:le,Z_STREAM_END:he,Z_NEED_DICT:de,Z_STREAM_ERROR:_e,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce,Z_BUF_ERROR:ue,Z_DEFLATED:we}=B,me=16209,be=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ge(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const pe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},ke=t=>{if(pe(t))return _e;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,le},ve=t=>{if(pe(t))return _e;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ke(t)},ye=(t,e)=>{let a;if(pe(t))return _e;const i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_e:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,ve(t))},xe=(t,e)=>{if(!t)return _e;const a=new ge;t.state=a,a.strm=t,a.window=null,a.mode=16180;const i=ye(t,e);return i!==le&&(t.state=null),i};let ze,Ae,Ee=!0;const Re=t=>{if(Ee){ze=new Int32Array(512),Ae=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ze,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Ae,0,t.work,{bits:5}),Ee=!1}t.lencode=ze,t.lenbits=9,t.distcode=Ae,t.distbits=5},Ze=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0};var Ue={inflateReset:ve,inflateReset2:ye,inflateResetKeep:ke,inflateInit:t=>xe(t,15),inflateInit2:xe,inflate:(t,e)=>{let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pe(t)||!t.output||!t.input&&0!==t.avail_in)return _e;a=t.state,16191===a.mode&&(a.mode=16192),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=le;t:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=me;break}if((15&h)!==we){t.msg="unknown compression method",a.mode=me;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=me;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:16191,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==we){t.msg="unknown compression method",a.mode=me;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=me;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=N(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=me;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}t.adler=a.check=be(h),h=0,d=0,a.mode=16190;case 16190:if(0===a.havedict)return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,de;t.adler=a.check=1,a.mode=16191;case 16191:if(e===re||e===oe)break t;case 16192:if(a.last){h>>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}switch(a.last=1&h,h>>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Re(a),a.mode=16199,e===oe){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=me}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=me;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===oe)break t;case 16194:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=me;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=ne(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=me;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=me;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===g){for(R=m+3;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=m+7;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=me;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===me)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=me;break}if(a.lenbits=9,E={bits:a.lenbits},x=ne(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=me;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=ne(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=me;break}if(a.mode=16199,e===oe)break t;case 16199:a.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,$t(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,k=b,v=g;z=a.lencode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=16191;break}if(64&b){t.msg="invalid literal/length code",a.mode=me;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<<a.distbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(0==(240&b)){for(p=m,k=b,v=g;z=a.distcode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=me;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=me;break}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=me;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=16200);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,r-f):F(a.check,n,f,r-f)),f=l,4&a.wrap&&(a.flags?h:be(h))!==a.check){t.msg="incorrect data check",a.mode=me;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=me;break}h=0,d=0}a.mode=16208;case 16208:x=he;break t;case me:x=fe;break t;case 16210:return ce;default:return _e}return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<me&&(a.mode<16206||e!==se))&&Ze(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,t.next_out-f):F(a.check,n,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(16191===a.mode?128:0)+(16199===a.mode||16194===a.mode?256:0),(0===_&&0===f||e===se)&&x===le&&(x=ue),x},inflateEnd:t=>{if(pe(t))return _e;let e=t.state;return e.window&&(e.window=null),t.state=null,le},inflateGetHeader:(t,e)=>{if(pe(t))return _e;const a=t.state;return 0==(2&a.wrap)?_e:(a.head=e,e.done=!1,le)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return pe(t)?_e:(i=t.state,0!==i.wrap&&16190!==i.mode?_e:16190===i.mode&&(n=1,n=F(n,e,a,0),n!==i.check)?fe:(s=Ze(t,e,a,a),s?(i.mode=16210,ce):(i.havedict=1,le)))},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Te,Z_FINISH:Oe,Z_OK:Fe,Z_STREAM_END:Le,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Be,Z_MEM_ERROR:Ce}=B;function He(t){this.options=Tt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Ue.inflateInit2(this.strm,e.windowBits);if(a!==Fe)throw new Error(I[a]);if(this.header=new Se,Ue.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):"[object ArrayBuffer]"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Ue.inflateSetDictionary(this.strm,e.dictionary),a!==Fe)))throw new Error(I[a])}He.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Oe:Te,"[object ArrayBuffer]"===De.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Ue.inflate(a,r),s===Ne&&n&&(s=Ue.inflateSetDictionary(a,n),s===Fe?s=Ue.inflate(a,r):s===Be&&(s=Ne));a.avail_in>0&&s===Le&&a.state.wrap>0&&0!==t[a.next_in];)Ue.inflateReset(a),s=Ue.inflate(a,r);switch(s){case Ie:case Be:case Ne:case Ce:return this.onEnd(s),this.ended=!0,!1}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===Le))if("string"===this.options.to){let t=Bt(a.output,a.next_out),e=a.next_out-t,n=It(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==Fe||0!==o){if(s===Le)return s=Ue.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Fe&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const{Deflate:Me,deflate:je,deflateRaw:Ke,gzip:Pe}=Vt;var Ye=Me,Ge=je,Xe=B;const We=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const e=this._hasEvents?",":"";this.deflate.push(e+t,Xe.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push("]",Xe.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new Ye,this.deflate.push("[",Xe.Z_NO_FLUSH)}},qe={clear:()=>{We.clear()},addEvent:t=>We.addEvent(t),finish:()=>We.finish(),compress:t=>function(t){return Ge(t)}(t)};addEventListener("message",(function(t){const e=t.data.method,a=t.data.id,i=t.data.arg;if(e in qe&&"function"==typeof qe[e])try{const t=qe[e](i);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(t)}();("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Replay] Using compression worker");const e=new Worker(t);return new mo(e)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Replay] Failed to create compression worker")}return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Replay] Using simple buffer"),new po}({useCompression:this._options.useCompression}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this.startRecording()}_handleException(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("[Replay]",t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._options._experiments&&this._options._experiments.captureExceptions&&Fr(t)}_loadAndCheckSession(){const{type:t,session:e}=wo({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:this._options.errorSampleRate>0||"buffer"===this.recordingMode});"new"===t&&this.setInitialState();const n=this.getSessionId();return e.id!==n&&(e.previousSessionId=n),this.session=e,!!this.session.sampled||(this.stop("session unsampled"),!1)}_addListeners(){try{ds.document.addEventListener("visibilitychange",this._handleVisibilityChange),ds.addEventListener("blur",this._handleWindowBlur),ds.addEventListener("focus",this._handleWindowFocus),ds.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(t){const e=kr().getScope(),n=kr().getClient();e&&e.addScopeListener((t=>e=>{if(!t.isEnabled())return;const n=function(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();return nc!==e&&e?(nc=e,!e.category||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?function(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||0===e.length)return no(t);let n=!1;const r=e.map(t=>{if(!t)return t;if("string"==typeof t)return t.length>ms?(n=!0,`${t.slice(0,ms)}…`):t;if("object"==typeof t)try{const e=In(t,7),r=JSON.stringify(e);if(r.length>ms){const t=jo(r.slice(0,ms)),e=JSON.parse(t);return n=!0,e}return e}catch(t){}return t});return no({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e):no(e)):null}(e);n&&Wa(t,n)})(t)),ln("dom",(t=>e=>{if(!t.isEnabled())return;const n=function(t){const{target:e,message:n}=function(t){const e="click"===t.name;let n,r=null;try{r=e?Ka(t.event):Ja(t.event),n=xe(r,{maxStringLength:200})||"<unknown>"}catch(t){n="<unknown>"}return{target:r,message:n}}(t);return no({category:`ui.${t.name}`,...ao(e,n)})}(e);if(!n)return;const r="click"===e.name,i=r&&e.event;var s,a,o;r&&t.clickDetector&&i&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&(s=t.clickDetector,a=n,o=Ka(e.event),s.handleClick(a,o)),Wa(t,n)})(t)),ln("history",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(Ro(t,[n]),!1)))}}(t)),function(t){const e=kr().getClient();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:s,networkRequestHeaders:a,networkResponseHeaders:o}=t.getOptions(),c={replay:t,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:s,networkRequestHeaders:a,networkResponseHeaders:o};e&&e.on?e.on("beforeAddBreadcrumb",(t,e)=>function(t,e,n){if(e.data)try{(function(t){return"xhr"===t.category})(e)&&function(t){return t&&t.xhr}(n)&&(function(t,e,n){const{xhr:r,input:i}=e,s=Fo(i,n.textEncoder),a=r.getResponseHeader("content-length")?$o(r.getResponseHeader("content-length")):Fo(r.response,n.textEncoder);void 0!==s&&(t.data.request_body_size=s),void 0!==a&&(t.data.response_body_size=a)}(e,n,t),async function(t,e,n){try{const r=function(t,e,n){const{startTimestamp:r,endTimestamp:i,input:s,xhr:a}=e,{url:o,method:c,status_code:l=0,request_body_size:u,response_body_size:d}=t.data;if(!o)return null;if(!Xo(o,n.networkDetailAllowUrls)||Xo(o,n.networkDetailDenyUrls))return{startTimestamp:r,endTimestamp:i,url:o,method:c,statusCode:l,request:Zo(u),response:Zo(d)};const p=a[an],h=p?Ko(p.request_headers,n.networkRequestHeaders):{},f=Ko(function(t){const e=t.getAllResponseHeaders();return e?e.split("\r\n").reduce((t,e)=>{const[n,r]=e.split(": ");return t[n.toLowerCase()]=r,t},{}):{}}(a),n.networkResponseHeaders);return{startTimestamp:r,endTimestamp:i,url:o,method:c,statusCode:l,request:Wo(h,u,n.networkCaptureBodies?Vo(s):void 0),response:Wo(f,d,n.networkCaptureBodies?e.xhr.responseText:void 0)}}(t,e,n),i=qo("resource.xhr",r);Do(n.replay,i)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("[Replay] Failed to capture fetch breadcrumb",t)}}(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return t&&t.response}(n)&&(function(t,e,n){const{input:r,response:i}=e,s=Fo(Qo(r),n.textEncoder),a=i?$o(i.headers.get("content-length")):void 0;void 0!==s&&(t.data.request_body_size=s),void 0!==a&&(t.data.response_body_size=a)}(e,n,t),async function(t,e,n){try{const r=await async function(t,e,n){const{startTimestamp:r,endTimestamp:i}=e,{url:s,method:a,status_code:o=0,request_body_size:c,response_body_size:l}=t.data,u=Xo(s,n.networkDetailAllowUrls)&&!Xo(s,n.networkDetailDenyUrls),d=u?function({networkCaptureBodies:t,networkRequestHeaders:e},n,r){var i,s;return Wo((s=e,1===(i=n).length&&"string"!=typeof i[0]?ec(i[0],s):2===i.length?ec(i[1],s):{}),r,t?Vo(Qo(n)):void 0)}(n,e.input,c):Zo(c),p=await async function(t,{networkCaptureBodies:e,textEncoder:n,networkResponseHeaders:r},i,s){if(!t&&void 0!==s)return Zo(s);const a=tc(i.headers,r);if(!e&&void 0!==s)return Wo(a,s,void 0);try{const r=i.clone(),o=await async function(t){try{return await t.text()}catch(t){return}}(r),c=o&&o.length&&void 0===s?Fo(o,n):s;return t?Wo(a,c,e?o:void 0):Zo(c)}catch(t){return Wo(a,s,void 0)}}(u,n,e.response,l);return{startTimestamp:r,endTimestamp:i,url:s,method:a,statusCode:o,request:d,response:p}}(t,e,n),i=qo("resource.fetch",r);Do(n.replay,i)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("[Replay] Failed to capture fetch breadcrumb",t)}}(e,n,t))}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("Error when enriching network breadcrumb")}}(c,t,e)):(ln("fetch",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,fetchData:r,response:i}=t;if(!n)return null;const{method:s,url:a}=r;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:a,data:{method:s,statusCode:i?i.status:void 0}}}(e);Do(t,n)}}(t)),ln("xhr",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,xhr:r}=t,i=r[an];if(!e||!n||!i)return null;const{method:s,url:a,status_code:o}=i;return void 0===a?null:{type:"resource.xhr",name:a,start:e/1e3,end:n/1e3,data:{method:s,statusCode:o}}}(e);Do(t,n)}}(t)))}catch(t){}}(t),gr(function(t,e=!1){const n=e?xo(t):void 0;return(e,r)=>{if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!To(e)&&!Co(e))return e;if(function(t,e){return!(t.type||!t.exception||!t.exception.values||!t.exception.values.length)&&(!(!e.originalException||!e.originalException.__rrweb__)||t.exception.values.some(t=>!!(t.stacktrace&&t.stacktrace.frames&&t.stacktrace.frames.length)&&t.stacktrace.frames.some(t=>t.filename&&t.filename.includes("/rrweb/src/"))))}(e,r)&&!t.getOptions()._experiments.captureExceptions)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Replay] Ignoring error from rrweb internals",e),null;const i=function(t,e){return"buffer"===t.recordingMode&&e.message!==hs&&!(!e.exception||e.type)&&vo(t.getOptions().errorSampleRate)}(t,e);return(i||"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),n&&n(e,{statusCode:200}),e}}(t,!rc(n))),rc(n)&&(n.on("afterSendEvent",xo(t)),n.on("createDsc",e=>{const n=t.getSessionId();n&&t.isEnabled()&&"session"===t.recordingMode&&(e.replay_id=n)}),n.on("startTransaction",e=>{t.lastTransaction=e}),n.on("finishTransaction",e=>{t.lastTransaction=e}))}(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}"PerformanceObserver"in ds&&(this._performanceObserver=function(t){const e=new PerformanceObserver(e=>{const n=function(t,e){const[n,r,i]=t.reduce((t,e)=>("navigation"===e.entryType?t[0].push(e):"largest-contentful-paint"===e.entryType?t[1].push(e):t[2].push(e),t),[[],[],[]]),s=[],a=[];let o=r.length?r[r.length-1]:void 0;return e.forEach(t=>{if("largest-contentful-paint"!==t.entryType)if("navigation"!==t.entryType)s.push(t);else{const e=t;t.duration>0&&!n.find(co(e))&&!a.find(co(e))&&a.push(e)}else(!o||o.startTime<t.startTime)&&(o=t)}),[...o?[o]:[],...n,...i,...s,...a].sort((t,e)=>t.startTime-e.startTime)}(t.performanceEvents,e.getEntries());t.performanceEvents=n});return["element","event","first-input","largest-contentful-paint","layout-shift","longtask","navigation","paint","resource"].forEach(t=>{try{e.observe({type:t,buffered:!0})}catch(t){}}),e}(this))}_removeListeners(){try{ds.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ds.removeEventListener("blur",this._handleWindowBlur),ds.removeEventListener("focus",this._handleWindowFocus),ds.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceObserver&&(this._performanceObserver.disconnect(),this._performanceObserver=null)}catch(t){this._handleException(t)}}__init13(){this._handleVisibilityChange=()=>{"visible"===ds.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init14(){this._handleWindowBlur=()=>{const t=no({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init15(){this._handleWindowFocus=()=>{const t=no({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init16(){this._handleKeyboardEvent=t=>{!function(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=function(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:a}=t;if(!a||function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}(a)||!s)return null;if(!(e||r||i)&&1===s.length)return null;const o=xe(a,{maxStringLength:200})||"<unknown>";return no({category:"ui.keyDown",message:o,data:{...ao(a,o).data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s}})}(e);n&&Wa(t,n)}(this,t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;const e=yo(this.session,this.timeouts);t&&!e&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){this.session&&(this.checkAndHandleExpiredSession()?t&&this._createCustomBreadcrumb(t):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Replay] Document has become active, but session has expired"))}_triggerFullSnapshot(t=!0){try{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Replay] Taking full rrweb snapshot"),Za.takeFullSnapshot(t)}catch(t){this._handleException(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:Vs.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=[...this.performanceEvents];return this.performanceEvents=[],Promise.all(Ro(this,function(t){return t.map(ac).filter(Boolean)}(t)))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:e}=this;if(!t||!e)return;if(t.segmentId)return;const n=e.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){if(this.session&&this.eventBuffer){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await async function(t){try{return Promise.all(Ro(t,[ic(ds.performance.memory)]))}catch(t){return[]}}(this),this.eventBuffer))try{this._updateInitialTimestampFromEventBuffer();const t=await this.eventBuffer.finish(),e=this.session.id,n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await uc({replayId:e,recordingData:t,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:Date.now()})}catch(t){this._handleException(t),this.stop("sendReplay");const e=kr().getClient();e&&e.recordDroppedEvent("send_error","replay")}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("[Replay] No session or eventBuffer found to flush.")}__init17(){this._flush=async({force:t=!1}={})=>{if(this._isEnabled||t)if(this.checkAndHandleExpiredSession())if(this.session){if(this._debouncedFlush.cancel(),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=null);try{await this._flushLock}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error(t)}finally{this._debouncedFlush()}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("[Replay] No session found to flush.");else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("[Replay] Attempting to finish replay event after session expired.")}}_maybeSaveSession(){this.session&&this._options.stickySession&&bo(this.session)}__init18(){this._onMutationHandler=t=>{const e=t.length,n=this._options.mutationLimit,r=n&&e>n;if(e>this._options.mutationBreadcrumbLimit||r){const t=no({category:"replay.mutations",data:{count:e,limit:r}});this._createCustomBreadcrumb(t)}return!r||(this.stop("mutationLimit"),!1)}}}function hc(t,e,n,r){const i=[...t,..."string"==typeof r?r.split(","):[],...e];return void 0!==n&&("string"==typeof n&&i.push(`.${n}`),console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")),i.join(",")}function fc({mask:t,unmask:e,block:n,unblock:r,ignore:i,blockClass:s,blockSelector:a,maskTextClass:o,maskTextSelector:c,ignoreClass:l}){const u=hc(t,[".sentry-mask","[data-sentry-mask]"],o,c),d=hc(e,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:u,unmaskTextSelector:d,maskInputSelector:u,unmaskInputSelector:d,blockSelector:hc(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],s,a),unblockSelector:hc(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:hc(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return s instanceof RegExp&&(p.blockClass=s),o instanceof RegExp&&(p.maskTextClass=o),p}function mc(){return"undefined"!=typeof window&&(!xn()||"undefined"!=typeof process&&"renderer"===process.type)}const _c='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',gc=["content-length","content-type","accept"];let yc=!1;class vc{static __initStatic(){this.id="Replay"}__init(){this.name=vc.id}constructor({flushMinDelay:t=5e3,flushMaxDelay:e=5500,stickySession:n=!0,useCompression:r=!0,_experiments:i={},sessionSampleRate:s,errorSampleRate:a,maskAllText:o=!0,maskAllInputs:c=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:u=750,mutationLimit:d=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:h=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:m=[],networkCaptureBodies:_=!0,networkRequestHeaders:g=[],networkResponseHeaders:y=[],mask:v=[],unmask:b=[],block:S=[],unblock:E=[],ignore:w=[],maskFn:k,beforeAddRecordingEvent:T,blockClass:C,blockSelector:x,maskInputOptions:R,maskTextClass:D,maskTextSelector:I,ignoreClass:N}={}){if(vc.prototype.__init.call(this),this._recordingOptions={maskAllInputs:c,maskAllText:o,maskInputOptions:{...R||{},password:!0},maskTextFn:k,maskInputFn:k,...fc({mask:v,unmask:b,block:S,unblock:E,ignore:w,blockClass:C,blockSelector:x,maskTextClass:D,maskTextSelector:I,ignoreClass:N}),slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0},this._initialOptions={flushMinDelay:t,flushMaxDelay:e,stickySession:n,sessionSampleRate:s,errorSampleRate:a,useCompression:r,blockAllMedia:l,maskAllInputs:c,maskAllText:o,mutationBreadcrumbLimit:u,mutationLimit:d,slowClickTimeout:p,slowClickIgnoreSelectors:h,networkDetailAllowUrls:f,networkDetailDenyUrls:m,networkCaptureBodies:_,networkRequestHeaders:bc(g),networkResponseHeaders:bc(y),beforeAddRecordingEvent:T,_experiments:i},"number"==typeof s&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${s} })`),this._initialOptions.sessionSampleRate=s),"number"==typeof a&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${a} })`),this._initialOptions.errorSampleRate=a),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${_c}`:_c),this._isInitialized&&mc())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return yc}set _isInitialized(t){yc=t}setupOnce(){mc()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop():Promise.resolve()}flush(t){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&this._replay.initializeSampling()}_setup(){const t=function(t){const e=kr().getClient(),n=e&&e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Ze(t)};return n?(null==t.sessionSampleRate&&null==t.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set."),"number"==typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate),"number"==typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(console.warn("SDK client is not available."),r)}(this._initialOptions);this._replay=new pc({options:t,recordingOptions:this._recordingOptions})}}function bc(t){return[...gc,...t.map(t=>t.toLowerCase())]}function Sc(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],s=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=s(n)):"call"!==i&&"optionalCall"!==i||(n=s((...t)=>n.call(e,...t)),e=void 0)}return n}function Ec(t){const e=Sc([t,"call",t=>t(),"access",t=>t.getClient,"call",t=>t(),"optionalAccess",t=>t.getOptions,"call",t=>t()]);return"sentry"!==(Sc([e,"optionalAccess",t=>t.instrumenter])||"sentry")}vc.__initStatic();class wc{static __initStatic(){this.id="Express"}__init(){this.name=wc.id}constructor(t={}){wc.prototype.__init.call(this),this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat("use")}setupOnce(t,e){this._router?Ec(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("Express Integration is skipped because of instrumenter configuration."):(function(t,e=[]){e.forEach(e=>function(t,e){const n=t[e];return t[e]=function(...t){return n.call(this,...function(t,e){return t.map(t=>"function"==typeof t?kc(t,e):Array.isArray(t)?t.map(t=>"function"==typeof t?kc(t,e):t):t)}(t,e))},t}(t,e))}(this._router,this._methods),function(t){const e="settings"in t;e&&void 0===t._router&&t.lazyrouter&&t.lazyrouter();const n=e?t._router:t;if(!n)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.debug("Routing instrumentation is currently only supported in Express 4."));const r=Object.getPrototypeOf(n),i=r.process_params;r.process_params=function(t,e,n,r,s){n._reconstructedRoute||(n._reconstructedRoute="");const{layerRoutePath:a,isRegex:o,isArray:c,numExtraSegments:l}=function(t){const e=Sc([t,"access",t=>t.route,"optionalAccess",t=>t.path]),n=he(e),r=Array.isArray(e);if(!e)return{isRegex:n,isArray:r,numExtraSegments:0};const i=r?Math.max(e.reduce((t,e)=>t+zn(e.toString()),0)-zn(t.path||""),0):0,s=function(t,e){return t?e.map(t=>t.toString()).join(","):e&&e.toString()}(r,e);return{layerRoutePath:s,isRegex:n,isArray:r,numExtraSegments:i}}(t);(a||o||c)&&(n._hasParameters=!0);const u=(a||t.path||"").split("/").filter(t=>t.length>0&&(o||c||!t.includes("*"))).join("/");if(u&&u.length>0&&(n._reconstructedRoute+=`/${u}${o?"/":""}`),zn(n.originalUrl||"")+l===zn(n._reconstructedRoute)){n._hasParameters||n._reconstructedRoute!==n.originalUrl&&(n._reconstructedRoute=n.originalUrl?Ln(n.originalUrl):n.originalUrl);const t=r.__sentry_transaction;t&&"custom"!==t.metadata.source&&t.setName(...function(t,e={}){const n=t.method&&t.method.toUpperCase();let r="",i="url";e.customRoute||t.route?(r=e.customRoute||`${t.baseUrl||""}${t.route&&t.route.path}`,i="route"):(t.originalUrl||t.url)&&(r=Ln(t.originalUrl||t.url||""));let s="";return e.method&&n&&(s+=n),e.method&&e.path&&(s+=" "),e.path&&r&&(s+=r),[s,i]}(n,{path:!0,method:!0,customRoute:n._reconstructedRoute||"/"}))}return i.call(this,t,e,n,r,s)}}(this._router)):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("ExpressIntegration is missing an Express instance")}}function kc(t,e){const n=t.length;switch(n){case 2:return function(n,r){const i=r.__sentry_transaction;if(i){const n=i.startChild({description:t.name,op:`middleware.express.${e}`});r.once("finish",()=>{n.finish()})}return t.call(this,n,r)};case 3:return function(n,r,i){const s=Sc([r.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})]);t.call(this,n,r,function(...t){Sc([s,"optionalAccess",t=>t.finish,"call",t=>t()]),i.call(this,...t)})};case 4:return function(n,r,i,s){const a=Sc([i.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})]);t.call(this,n,r,i,function(...t){Sc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),s.call(this,...t)})};default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}wc.__initStatic();class Tc{static __initStatic(){this.id="Postgres"}__init(){this.name=Tc.id}constructor(t={}){Tc.prototype.__init.call(this),this._usePgNative=!!t.usePgNative}loadDependency(){return this._module=this._module||Dn("pg")}setupOnce(t,e){if(Ec(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("Postgres Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();if(!n)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("Postgres Integration was unable to require `pg` package."));if(this._usePgNative&&!Sc([n,"access",t=>t.native,"optionalAccess",t=>t.Client]))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("Postgres Integration was unable to access 'pg-native' bindings."));const{Client:r}=this._usePgNative?n.native:n;Ge(r.prototype,"query",function(t){return function(n,r,i){const s=Sc([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=Sc([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.text,op:"db",data:{"db.system":"postgresql"}})]);if("function"==typeof i)return t.call(this,n,r,function(t,e){Sc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e)});if("function"==typeof r)return t.call(this,n,function(t,e){Sc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),r(t,e)});const o=void 0!==r?t.call(this,n,r):t.call(this,n);return fe(o)?o.then(t=>(Sc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),t)):(Sc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),o)}})}}Tc.__initStatic();class Cc{constructor(){Cc.prototype.__init.call(this)}static __initStatic(){this.id="Mysql"}__init(){this.name=Cc.id}loadDependency(){return this._module=this._module||Dn("mysql/lib/Connection.js")}setupOnce(t,e){if(Ec(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("Mysql Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?Ge(n,"createQuery",function(t){return function(n,r,i){const s=Sc([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=Sc([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.sql,op:"db",data:{"db.system":"mysql"}})]);return"function"==typeof i?t.call(this,n,r,function(t,e,n){Sc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e,n)}):"function"==typeof r?t.call(this,n,function(t,e,n){Sc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),r(t,e,n)}):t.call(this,n,r,i)}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("Mysql Integration was unable to require `mysql` package.")}}Cc.__initStatic();const xc=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],Rc={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]};class Dc{static __initStatic(){this.id="Mongo"}__init(){this.name=Dc.id}constructor(t={}){Dc.prototype.__init.call(this),this._operations=Array.isArray(t.operations)?t.operations:xc,this._describeOperations=!("describeOperations"in t)||t.describeOperations,this._useMongoose=!!t.useMongoose}loadDependency(){return this._module=this._module||Dn(this._useMongoose?"mongoose":"mongodb")}setupOnce(t,e){if(Ec(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("Mongo Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?this._instrumentOperations(n.Collection,this._operations,e):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error(`Mongo Integration was unable to require \`${this._useMongoose?"mongoose":"mongodb"}\` package.`)}_instrumentOperations(t,e,n){e.forEach(e=>this._patchOperation(t,e,n))}_patchOperation(t,e,n){if(!(e in t.prototype))return;const r=this._getSpanContextFromOperationArguments.bind(this);Ge(t.prototype,e,function(t){return function(...i){const s=i[i.length-1],a=Sc([n().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]);if("function"!=typeof s||"mapReduce"===e&&2===i.length){const n=Sc([a,"optionalAccess",t=>t.startChild,"call",t=>t(r(this,e,i))]),s=t.call(this,...i);if(fe(s))return s.then(t=>(Sc([n,"optionalAccess",t=>t.finish,"call",t=>t()]),t));if((o=s)&&"object"==typeof o&&o.once&&"function"==typeof o.once){const t=s;try{t.once("close",()=>{Sc([n,"optionalAccess",t=>t.finish,"call",t=>t()])})}catch(t){Sc([n,"optionalAccess",t=>t.finish,"call",t=>t()])}return t}return Sc([n,"optionalAccess",t=>t.finish,"call",t=>t()]),s}var o;const c=Sc([a,"optionalAccess",t=>t.startChild,"call",t=>t(r(this,e,i.slice(0,-1)))]);return t.call(this,...i.slice(0,-1),function(t,e){Sc([c,"optionalAccess",t=>t.finish,"call",t=>t()]),s(t,e)})}})}_getSpanContextFromOperationArguments(t,e,n){const r={collectionName:t.collectionName,dbName:t.dbName,namespace:t.namespace,"db.system":"mongodb"},i={op:"db",description:e,data:r},s=Rc[e],a=Array.isArray(this._describeOperations)?this._describeOperations.includes(e):this._describeOperations;if(!s||!a)return i;try{if("mapReduce"===e){const[t,e]=n;r[s[0]]="string"==typeof t?t:t.name||"<anonymous>",r[s[1]]="string"==typeof e?e:e.name||"<anonymous>"}else for(let t=0;t<s.length;t++)r[s[t]]=JSON.stringify(n[t])}catch(t){}return i}}Dc.__initStatic();class Ic{static __initStatic(){this.id="Prisma"}__init(){this.name=Ic.id}constructor(t={}){var e;Ic.prototype.__init.call(this),(e=t.client)&&e.$use&&!t.client._sentryInstrumented?(Ye(t.client,"_sentryInstrumented",!0),t.client.$use((t,e)=>{if(Ec(kr))return e(t);const n=t.action,r=t.model;return function(t,e,n=(()=>{})){const r={...t};void 0!==r.name&&void 0===r.description&&(r.description=r.name);const i=kr(),s=i.getScope(),a=s.getSpan(),o=function(){if(xr())return a?a.startChild(r):i.startTransaction(r)}();function c(){o&&o.finish(),i.getScope().setSpan(a)}let l;s.setSpan(o);try{l=e(o)}catch(t){throw o&&o.setStatus("internal_error"),n(t),c(),t}return fe(l)?Promise.resolve(l).then(()=>{c()},t=>{o&&o.setStatus("internal_error"),n(t),c()}):c(),l}({name:r?`${r} ${n}`:n,op:"db.sql.prisma",data:{"db.system":"prisma"}},()=>e(t))})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(t.client)}`)}setupOnce(){}}Ic.__initStatic();class Nc{constructor(){Nc.prototype.__init.call(this)}static __initStatic(){this.id="GraphQL"}__init(){this.name=Nc.id}loadDependency(){return this._module=this._module||Dn("graphql/execution/execute.js")}setupOnce(t,e){if(Ec(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("GraphQL Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?Ge(n,"execute",function(t){return function(...n){const r=e().getScope(),i=Sc([r,"optionalAccess",t=>t.getSpan,"call",t=>t()]),s=Sc([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:"execute",op:"graphql.execute"})]);Sc([r,"optionalAccess",t=>t.setSpan,"call",t=>t(s)]);const a=t.call(this,...n);return fe(a)?a.then(t=>(Sc([s,"optionalAccess",t=>t.finish,"call",t=>t()]),Sc([r,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),t)):(Sc([s,"optionalAccess",t=>t.finish,"call",t=>t()]),Sc([r,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),a)}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("GraphQL Integration was unable to require graphql/execution package.")}}Nc.__initStatic();class Oc{static __initStatic(){this.id="Apollo"}__init(){this.name=Oc.id}constructor(t={useNestjs:!1}){Oc.prototype.__init.call(this),this._useNest=!!t.useNestjs}loadDependency(){return this._module=this._useNest?this._module||Dn("@nestjs/graphql"):this._module||Dn("apollo-server-core"),this._module}setupOnce(t,e){if(Ec(e))("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("Apollo Integration is skipped because of instrumenter configuration.");else if(this._useNest){const t=this.loadDependency();if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("Apollo-NestJS Integration was unable to require @nestjs/graphql package."));Ge(t.GraphQLFactory.prototype,"mergeWithSchema",function(t){return function(...n){return Ge(this.resolversExplorerService,"explore",function(t){return function(){return Ac(Cn(t.call(this)),e)}}),t.call(this,...n)}})}else{const t=this.loadDependency();if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.error("Apollo Integration was unable to require apollo-server-core package."));Ge(t.ApolloServerBase.prototype,"constructSchema",function(t){return function(){if(!this.config.resolvers)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this.config.schema?(Oe.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead."),Oe.warn()):this.config.modules&&Oe.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),Oe.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),t.call(this);const n=Cn(this.config.resolvers);return this.config.resolvers=Ac(n,e),t.call(this)}})}}}function Ac(t,e){return t.map(t=>(Object.keys(t).forEach(n=>{Object.keys(t[n]).forEach(r=>{"function"==typeof t[n][r]&&function(t,e,n,r){Ge(t[e],n,function(t){return function(...i){const s=Sc([r().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=Sc([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:`${e}.${n}`,op:"graphql.resolve"})]),o=t.call(this,...i);return fe(o)?o.then(t=>(Sc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),t)):(Sc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),o)}})}(t,n,r,e)})}),t))}Oc.__initStatic();const Uc=Ee,Pc=(t,e,n)=>{let r,i;return s=>{e.value>=0&&(s||n)&&(i=e.value-(r||0),(i||void 0===r)&&(r=e.value,e.delta=i,t(e)))}},Bc=()=>Uc.__WEB_VITALS_POLYFILL__?Uc.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=Uc.performance.timing,e=Uc.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"};for(const e in t)"navigationStart"!==e&&"toJSON"!==e&&(n[e]=Math.max(t[e]-t.navigationStart,0));return n})()):Uc.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Mc=()=>{const t=Bc();return t&&t.activationStart||0},Lc=(t,e)=>{const n=Bc();let r="navigate";return n&&(r=Uc.document.prerendering||Mc()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},zc=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(t=>{e(t.getEntries())});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},Hc=(t,e)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==Uc.document.visibilityState||(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)};let Gc=-1;const Yc=()=>(Gc<0&&(Gc="hidden"!==Uc.document.visibilityState||Uc.document.prerendering?Infinity:0,Hc(({timeStamp:t})=>{Gc=t},!0)),{get firstHiddenTime(){return Gc}}),jc={};function Fc(t){return"number"==typeof t&&isFinite(t)}function $c(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}function Vc(t){return t/1e3}function qc(){return Uc&&Uc.addEventListener&&Uc.performance}let Zc,Wc,Kc=0,Jc={};function Xc(t,e,n,r,i,s){const a=s?e[s]:e[`${n}End`],o=e[`${n}Start`];o&&a&&$c(t,{op:"browser",description:i||n,startTimestamp:r+Vc(o),endTimestamp:r+Vc(a)})}const Qc=["localhost",/^\/(?!\/)/],tl={traceFetch:!0,traceXHR:!0,tracingOrigins:Qc,tracePropagationTargets:Qc,_experiments:{}};function el(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:s,_experiments:a}={traceFetch:tl.traceFetch,traceXHR:tl.traceXHR,...t},o="function"==typeof s?s:t=>!0,c=t=>function(t,e){return He(t,e||Qc)}(t,r||i),l={};e&&ln("fetch",t=>{const e=function(t,e,n,r){if(!xr()||!t.fetchData)return;const i=e(t.fetchData.url);if(t.endTimestamp&&i){const e=t.fetchData.__span;if(!e)return;const n=r[e];if(n){if(t.response){n.setHttpStatus(t.response.status);const e=t.response&&t.response.headers&&t.response.headers.get("content-length"),r=parseInt(e);r>0&&n.setData("http.response_content_length",r)}else t.error&&n.setStatus("internal_error");n.finish(),delete r[e]}return}const s=kr(),a=s.getScope(),o=s.getClient(),c=a.getSpan(),{method:l,url:u}=t.fetchData,d=i&&c?c.startChild({data:{url:u,type:"fetch","http.method":l},description:`${l} ${u}`,op:"http.client"}):void 0;if(d&&(t.fetchData.__span=d.spanId,r[d.spanId]=d),n(t.fetchData.url)&&o){const e=t.args[0];t.args[1]=t.args[1]||{};const n=t.args[1];n.headers=function(t,e,n,r){const i=n.getSpan(),s=i&&i.transaction,{traceId:a,sampled:o,dsc:c}=n.getPropagationContext(),l=i?i.toTraceparent():er(a,void 0,o),u=Xn(s?s.getDynamicSamplingContext():c||Ar(a,e,n)),d="undefined"!=typeof Request&&_e(t,Request)?t.headers:r.headers;if(d){if("undefined"!=typeof Headers&&_e(d,Headers)){const t=new Headers(d);return t.append("sentry-trace",l),u&&t.append(Zn,u),t}if(Array.isArray(d)){const t=[...d,["sentry-trace",l]];return u&&t.push([Zn,u]),t}{const t="baggage"in d?d.baggage:void 0,e=[];return Array.isArray(t)?e.push(...t):t&&e.push(t),u&&e.push(u),{...d,"sentry-trace":l,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":l,baggage:u}}(e,o,a,n)}return d}(t,o,c,l);Sc([a,"optionalAccess",t=>t.enableHTTPTimings])&&e&&nl(e)}),n&&ln("xhr",t=>{const e=function(t,e,n,r){const i=t.xhr,s=i&&i[an];if(!xr()||i&&i.__sentry_own_request__||!i||!s)return;const a=e(s.url);if(t.endTimestamp&&a){const t=i.__sentry_xhr_span_id__;if(!t)return;const e=r[t];return void(e&&(e.setHttpStatus(s.status_code),e.finish(),delete r[t]))}const o=kr(),c=o.getScope(),l=c.getSpan(),u=a&&l?l.startChild({data:{...s.data,type:"xhr","http.method":s.method,url:s.url},description:`${s.method} ${s.url}`,op:"http.client"}):void 0;if(u&&(i.__sentry_xhr_span_id__=u.spanId,r[i.__sentry_xhr_span_id__]=u),i.setRequestHeader&&n(s.url))if(u){const t=u&&u.transaction,e=Xn(t&&t.getDynamicSamplingContext());rl(i,u.toTraceparent(),e)}else{const t=o.getClient(),{traceId:e,sampled:n,dsc:r}=c.getPropagationContext();rl(i,er(e,void 0,n),Xn(r||(t?Ar(e,t,c):void 0)))}return u}(t,o,c,l);Sc([a,"optionalAccess",t=>t.enableHTTPTimings])&&e&&nl(e)})}function nl(t){const e=t.data.url,n=new PerformanceObserver(r=>{r.getEntries().forEach(r=>{"fetch"!==r.initiatorType&&"xmlhttprequest"!==r.initiatorType||!r.name.endsWith(e)||(function(t){const e=t.nextHopProtocol.split("/")[1]||"none",n=[];return e&&n.push(["network.protocol.version",e]),qn?[...n,["http.request.connect_start",(qn+t.connectStart)/1e3],["http.request.request_start",(qn+t.requestStart)/1e3],["http.request.response_start",(qn+t.responseStart)/1e3]]:n}(r).forEach(e=>t.setData(...e)),n.disconnect())})});n.observe({entryTypes:["resource"]})}function rl(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(Zn,n)}catch(t){}}const il={...Pr,markBackgroundTransactions:!0,routingInstrumentation:function(t,e=!0,n=!0){if(!Uc||!Uc.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("Could not initialize routing instrumentation due to invalid location"));let r,i=Uc.location.href;e&&(r=t({name:Uc.location.pathname,startTimestamp:qn?qn/1e3:void 0,op:"pageload",metadata:{source:"url"}})),n&&ln("history",({to:e,from:n})=>{void 0===n&&i&&-1!==i.indexOf(e)?i=void 0:n!==e&&(i=void 0,r&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`[Tracing] Finishing current transaction with op: ${r.op}`),r.finish()),r=t({name:Uc.location.pathname,op:"navigation",metadata:{source:"url"}}))})},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,...tl};class sl{__init(){this.name="BrowserTracing"}__init2(){this._hasSetTracePropagationTargets=!1}constructor(t){sl.prototype.__init.call(this),sl.prototype.__init2.call(this),jr(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!(!t||!t.tracePropagationTargets&&!t.tracingOrigins)),this.options={...il,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=function(){const t=qc();if(t&&qn){t.mark&&Uc.performance.mark("sentry-tracing-init"),(t=>{const e=Yc(),n=Lc("FID");let r;const i=t=>{t.startTime<e.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),r(!0))},s=t=>{t.forEach(i)},a=zc("first-input",s);r=Pc(t=>{const e=t.entries.pop();if(!e)return;const n=Vc(qn),r=Vc(e.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Measurements] Adding FID"),Jc.fid={value:t.value,unit:"millisecond"},Jc["mark.fid"]={value:n+r,unit:"second"}},n),a&&Hc(()=>{s(a.takeRecords()),a.disconnect()},!0)})();const e=(t=>{const e=Lc("CLS",0);let n,r=0,i=[];const s=t=>{t.forEach(t=>{t.hadRecentInput||(r&&0!==i.length&&t.startTime-i[i.length-1].startTime<1e3&&t.startTime-i[0].startTime<5e3?(r+=t.value,i.push(t)):(r=t.value,i=[t]),r>e.value&&(e.value=r,e.entries=i,n&&n()))})},a=zc("layout-shift",s);if(a){n=Pc(t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Measurements] Adding CLS"),Jc.cls={value:t.value,unit:""},Wc=e)},e);const t=()=>{s(a.takeRecords()),n(!0)};return Hc(t),t}})(),n=(t=>{const e=Yc(),n=Lc("LCP");let r;const i=t=>{const i=t[t.length-1];if(i){const t=Math.max(i.startTime-Mc(),0);t<e.firstHiddenTime&&(n.value=t,n.entries=[i],r())}},s=zc("largest-contentful-paint",i);if(s){r=Pc(t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Measurements] Adding LCP"),Jc.lcp={value:t.value,unit:"millisecond"},Zc=e)},n);const t=()=>{jc[n.id]||(i(s.takeRecords()),s.disconnect(),jc[n.id]=!0,r(!0))};return["keydown","click"].forEach(e=>{addEventListener(e,t,{once:!0,capture:!0})}),Hc(t,!0),t}})();return()=>{e&&e(),n&&n()}}return()=>{}}(),this.options.enableLongTask&&zc("longtask",t=>{for(const e of t){const t=Rr();if(!t)return;const n=Vc(qn+e.startTime),r=Vc(e.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:n,endTimestamp:n+r})}}),this.options._experiments.enableInteractions&&zc("event",t=>{for(const e of t){const t=Rr();if(!t)return;if("click"===e.name){const n=Vc(qn+e.startTime),r=Vc(e.duration);t.startChild({description:xe(e.target),op:`ui.interaction.${e.name}`,startTimestamp:n,endTimestamp:n+r})}}},{durationThreshold:0})}setupOnce(t,e){this._getCurrentHub=e;const n=e().getClient(),r=n&&n.getOptions(),{routingInstrumentation:i,startTransactionOnLocationChange:s,startTransactionOnPageLoad:a,markBackgroundTransactions:o,traceFetch:c,traceXHR:l,shouldCreateSpanForRequest:u,_experiments:d}=this.options,p=r&&r.tracePropagationTargets,h=p||this.options.tracePropagationTargets;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&p&&Oe.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),i(t=>{const n=this._createRouteTransaction(t);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,t,e),n},a,s),o&&(Uc&&Uc.document?Uc.document.addEventListener("visibilitychange",()=>{const t=Rr();if(Uc.document.hidden&&t){const e="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("[Tracing] Could not set up background tab detection due to lack of global document")),d.enableInteractions&&this._registerInteractionListener(),el({traceFetch:c,traceXHR:l,tracePropagationTargets:h,shouldCreateSpanForRequest:u,_experiments:{enableHTTPTimings:d.enableHTTPTimings}})}_createRouteTransaction(t){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`));const e=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:r,finalTimeout:i,heartbeatInterval:s}=this.options,a="pageload"===t.op,o=a?al("sentry-trace"):"",c=a?al("baggage"):"",{traceparentData:l,dynamicSamplingContext:u,propagationContext:d}=function(t,e){const n=function(t){if(!t)return;const e=t.match(tr);if(!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(t),r=function(t){if(!le(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce((t,e)=>({...t,...Qn(e)}),{});else{if(!t)return;e=Qn(t)}const n=Object.entries(e).reduce((t,[e,n])=>(e.match(Kn)&&(t[e.slice(Wn.length)]=n),t),{});return Object.keys(n).length>0?n:void 0}(e),{traceId:i,parentSpanId:s,parentSampled:a}=n||{},o={traceId:i||bn(),spanId:bn().substring(16),sampled:void 0!==a&&a};return s&&(o.parentSpanId=s),r&&(o.dsc=r),{traceparentData:n,dynamicSamplingContext:r,propagationContext:o}}(o,c),p={...t,...l,metadata:{...t.metadata,dynamicSamplingContext:l&&!u?{}:u},trimEnd:!0},h="function"==typeof n?n(p):p,f=void 0===h?{...p,sampled:!1}:h;f.metadata=f.name!==p.name?{...f.metadata,source:"custom"}:f.metadata,this._latestRouteName=f.name,this._latestRouteSource=f.metadata&&f.metadata.source,!1===f.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`[Tracing] Will not send ${f.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`[Tracing] Starting ${f.op} transaction on scope`);const{location:m}=Uc,_=Yr(e,f,r,i,!0,{location:m},s);return e.getScope().setPropagationContext(a&&l?d:{traceId:_.traceId,spanId:_.spanId,parentSpanId:_.parentSpanId,sampled:!!_.sampled}),_.registerBeforeFinishCallback(t=>{this._collectWebVitals(),function(t){const e=qc();if(!e||!Uc.performance.getEntries||!qn)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Tracing] Adding & adjusting spans using Performance API");const n=Vc(qn),r=e.getEntries();let i,s;if(r.slice(Kc).forEach(e=>{const r=Vc(e.startTime),a=Vc(e.duration);if(!("navigation"===t.op&&n+r<t.startTimestamp))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Xc(t,e,r,n)}),Xc(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),Xc(t,e,"fetch",n,"cache","domainLookupStart"),Xc(t,e,"domainLookup",n,"DNS"),function(t,e,n){$c(t,{op:"browser",description:"request",startTimestamp:n+Vc(e.requestStart),endTimestamp:n+Vc(e.responseEnd)}),$c(t,{op:"browser",description:"response",startTimestamp:n+Vc(e.responseStart),endTimestamp:n+Vc(e.responseEnd)})}(t,e,n)}(t,e,n),i=n+Vc(e.responseStart),s=n+Vc(e.requestStart);break;case"mark":case"paint":case"measure":{!function(t,e,n,r,i){const s=i+n;$c(t,{description:e.name,endTimestamp:s+r,op:e.entryType,startTimestamp:s})}(t,e,r,a,n);const i=Yc(),s=e.startTime<i.firstHiddenTime;"first-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Measurements] Adding FP"),Jc.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Measurements] Adding FCP"),Jc.fcp={value:e.startTime,unit:"millisecond"});break}case"resource":{const i=e.name.replace(Uc.location.origin,"");!function(t,e,n,r,i,s){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return;const a={};"transferSize"in e&&(a["http.response_transfer_size"]=e.transferSize),"encodedBodySize"in e&&(a["http.response_content_length"]=e.encodedBodySize),"decodedBodySize"in e&&(a["http.decoded_response_content_length"]=e.decodedBodySize),"renderBlockingStatus"in e&&(a["resource.render_blocking_status"]=e.renderBlockingStatus);const o=s+r;$c(t,{description:n,endTimestamp:o+i,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",startTimestamp:o,data:a})}(t,e,i,r,a,n);break}}}),Kc=Math.max(r.length-1,0),function(t){const e=Uc.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),Fc(n.rtt)&&(Jc["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Fc(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),Fc(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}(t),"pageload"===t.op){"number"==typeof i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Measurements] Adding TTFB"),Jc.ttfb={value:1e3*(i-t.startTimestamp),unit:"millisecond"},"number"==typeof s&&s<=i&&(Jc["ttfb.requestTime"]={value:1e3*(i-s),unit:"millisecond"})),["fcp","fp","lcp"].forEach(e=>{if(!Jc[e]||n>=t.startTimestamp)return;const r=Jc[e].value,i=n+Vc(r),s=Math.abs(1e3*(i-t.startTimestamp));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log(`[Measurements] Normalized ${e} from ${r} to ${s} (${s-r})`),Jc[e].value=s});const e=Jc["mark.fid"];e&&Jc.fid&&($c(t,{description:"first input delay",endTimestamp:e.value+Vc(Jc.fid.value),op:"ui.action",startTimestamp:e.value}),delete Jc["mark.fid"]),"fcp"in Jc||delete Jc.cls,Object.keys(Jc).forEach(e=>{t.setMeasurement(e,Jc[e].value,Jc[e].unit)}),function(t){Zc&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Measurements] Adding LCP Data"),Zc.element&&t.setTag("lcp.element",xe(Zc.element)),Zc.id&&t.setTag("lcp.id",Zc.id),Zc.url&&t.setTag("lcp.url",Zc.url.trim().slice(0,200)),t.setTag("lcp.size",Zc.size)),Wc&&Wc.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.log("[Measurements] Adding CLS Data"),Wc.sources.forEach((e,n)=>t.setTag(`cls.source.${n+1}`,xe(e.node))))}(t)}Zc=void 0,Wc=void 0,Jc={}}(t)}),_}_registerInteractionListener(){let t;const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:r}=this.options,i="ui.action.click",s=Rr();if(s&&s.op&&["navigation","pageload"].includes(s.op))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`[Tracing] Did not create ${i} transaction because a pageload or navigation transaction is in progress.`));if(t&&(t.setFinishReason("interactionInterrupted"),t.finish(),t=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`[Tracing] Did not create ${i} transaction because _getCurrentHub is invalid.`));if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`));const a=this._getCurrentHub(),{location:o}=Uc;t=Yr(a,{name:this._latestRouteName,op:i,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}},e,n,!0,{location:o},r)};["click"].forEach(t=>{addEventListener(t,e,{once:!1,capture:!0})})}}function al(t){const e=Te.document&&Te.document.querySelector?Te.document.querySelector(`meta[name=${t}]`):null;return e?e.getAttribute("content"):void 0}var ol={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},cl={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ll={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ul={};function dl(t){return rt.default.isMemo(t)?ll:ul[t.$$typeof]||ol}ul[rt.default.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ul[rt.default.Memo]=ll;var pl=Object.defineProperty,hl=Object.getOwnPropertyNames,fl=Object.getOwnPropertySymbols,ml=Object.getOwnPropertyDescriptor,_l=Object.getPrototypeOf,gl=Object.prototype,yl=function t(e,n,r){if("string"!=typeof n){if(gl){var i=_l(n);i&&i!==gl&&t(e,i,r)}var s=hl(n);fl&&(s=s.concat(fl(n)));for(var a=dl(e),o=dl(n),c=0;c<s.length;++c){var l=s[c];if(!(cl[l]||r&&r[l]||o&&o[l]||a&&a[l])){var u=ml(n,l);try{pl(e,l,u)}catch(t){}}}}return e};const vl="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/profiler.tsx";class bl extends U.Component{__init(){this._mountSpan=void 0}__init2(){this._updateSpan=void 0}static __initStatic(){this.defaultProps={disabled:!1,includeRender:!0,includeUpdates:!0}}constructor(t){super(t),bl.prototype.__init.call(this),bl.prototype.__init2.call(this);const{name:e,disabled:n=!1}=this.props;if(n)return;const r=function(t=kr()){if(t){const e=t.getScope();if(e)return e.getTransaction()}}();r&&(this._mountSpan=r.startChild({description:`<${e}>`,op:"ui.react.mount"}))}componentDidMount(){this._mountSpan&&this._mountSpan.finish()}shouldComponentUpdate({updateProps:t,includeUpdates:e=!0}){if(e&&this._mountSpan&&t!==this.props.updateProps){const e=Object.keys(t).filter(e=>t[e]!==this.props.updateProps[e]);if(e.length>0){const t=Vn();this._updateSpan=this._mountSpan.startChild({data:{changedProps:e},description:`<${this.props.name}>`,op:"ui.react.update",startTimestamp:t})}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.finish(),this._updateSpan=void 0)}componentWillUnmount(){const{name:t,includeRender:e=!0}=this.props;this._mountSpan&&e&&this._mountSpan.startChild({description:`<${t}>`,endTimestamp:Vn(),op:"ui.react.render",startTimestamp:this._mountSpan.endTimestamp})}render(){return this.props.children}}bl.__initStatic();const Sl={componentStack:null,error:null,eventId:null};class El extends U.Component{__init(){this.state=Sl}__init2(){this._openFallbackReportDialog=!0}constructor(t){super(t),El.prototype.__init.call(this),El.prototype.__init2.call(this),El.prototype.__init3.call(this);const e=kr().getClient();e&&e.on&&t.showDialog&&(this._openFallbackReportDialog=!1,e.on("afterSendEvent",e=>{e.type||e.event_id!==this._lastEventId||ls({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:e}){const{beforeCapture:n,onError:r,showDialog:i,dialogOptions:s}=this.props;$r(a=>{if(function(t){const e=U.version.match(/^([^.]+)/);return null!==e&&parseInt(e[0])>=17}()&&se(t)){const n=new Error(t.message);n.name=`React ErrorBoundary ${n.name}`,n.stack=e,function(t,e){const n=new WeakMap;!function t(e,r){if(!n.has(e))return e.cause?(n.set(e,!0),t(e.cause,r)):void(e.cause=r)}(t,e)}(t,n)}n&&n(a,t,e);const o=Fr(t,{contexts:{react:{componentStack:e}}});r&&r(t,e,o),i&&(this._lastEventId=o,this._openFallbackReportDialog&&ls({...s,eventId:o})),this.setState({error:t,componentStack:e,eventId:o})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:e,eventId:n}=this.state,{onUnmount:r}=this.props;r&&r(t,e,n)}__init3(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:e,componentStack:n,eventId:r}=this.state;t&&t(e,n,r),this.setState(Sl)}}render(){const{fallback:t,children:e}=this.props,n=this.state;if(n.error){let e;return e="function"==typeof t?t({error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):t,U.isValidElement(e)?e:(t&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("fallback did not produce a valid ReactElement"),null)}return"function"==typeof e?e():e}}let wl,kl,Tl,Cl,xl,Rl,Dl,Il;const Nl={"routing.instrumentation":"react-router-v6"};function Ol(t,e,n){if(!t||0===t.length)return[e.pathname,"url"];let r="";if(n)for(let t=0;t<n.length;t++){const i=n[t],s=i.route;if(s){if(s.index)return[i.pathname,"route"];const t=s.path;if(t){const n="/"===t[0]||"/"===r[r.length-1]?t:`/${t}`;if(r+=n,i.pathname===e.pathname)return zn(r)!==zn(i.pathname)&&"/*"!==r.slice(-2)?[n,"route"]:[r,"route"]}}}return[e.pathname,"url"]}function Al(){return Al=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Al.apply(this,arguments)}var Ul,Pl=(Ul=/*#__PURE__*/Object.defineProperty({default:function(t){console.warn("[react-gtm]",t)}},"__esModule",{value:!0}))&&Ul.__esModule?Ul:{default:Ul},Bl=function(t){return t&&t.__esModule?t:{default:t}}({tags:function(t){var e=t.id,n=t.events,r=t.dataLayer,i=t.dataLayerName,s=">m_auth="+t.auth,a=">m_preview="+t.preview;return e||(0,Pl.default)("GTM Id is required"),{iframe:'\n <iframe src="https://www.googletagmanager.com/ns.html?id='+e+s+a+'>m_cookies_win=x"\n height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>',script:"\n (function(w,d,s,l,i){w[l]=w[l]||[];\n w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', "+JSON.stringify(n).slice(1,-1)+"});\n var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';\n j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'"+s+a+">m_cookies_win=x';\n f.parentNode.insertBefore(j,f);\n })(window,document,'script','"+i+"','"+e+"');",dataLayerVar:this.dataLayer(r,i)}},dataLayer:function(t,e){return"\n window."+e+" = window."+e+" || [];\n window."+e+".push("+JSON.stringify(t)+")"}}),Ml=function(t){return t&&t.__esModule?t:{default:t}}({dataScript:function(t){var e=document.createElement("script");return e.innerHTML=t,e},gtm:function(t){var e=Bl.default.tags(t);return{noScript:function(){var t=document.createElement("noscript");return t.innerHTML=e.iframe,t},script:function(){var t=document.createElement("script");return t.innerHTML=e.script,t},dataScript:this.dataScript(e.dataLayerVar)}},initialize:function(t){var e=t.events,n=t.dataLayer,r=t.dataLayerName,i=t.auth,s=t.preview,a=this.gtm({id:t.gtmId,events:void 0===e?{}:e,dataLayer:n||void 0,dataLayerName:void 0===r?"dataLayer":r,auth:void 0===i?"":i,preview:void 0===s?"":s});n&&document.head.appendChild(a.dataScript),document.head.insertBefore(a.script(),document.head.childNodes[0]),document.body.insertBefore(a.noScript(),document.body.childNodes[0])},dataLayer:function(t){var e=t.dataLayer,n=t.dataLayerName,r=void 0===n?"dataLayer":n;if(window[r])return window[r].push(e);var i=Bl.default.dataLayer(e,r),s=this.dataScript(i);document.head.insertBefore(s,document.head.childNodes[0])}}),Ll=Ml.default;const zl={BrowserTracing:sl,Apollo:Oc,Express:wc,GraphQL:Nc,Mongo:Dc,Mysql:Cc,Postgres:Tc,Prisma:Ic};function Hl(t){return Hl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hl(t)}("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&(jr(),xn()&&function(){const t=Er();if(!t.__SENTRY__)return;const e={mongodb:()=>new(Rn(module,"./node/integrations/mongo").Mongo),mongoose:()=>new(Rn(module,"./node/integrations/mongo").Mongo),mysql:()=>new(Rn(module,"./node/integrations/mysql").Mysql),pg:()=>new(Rn(module,"./node/integrations/postgres").Postgres)},n=Object.keys(e).filter(t=>!!Dn(t)).map(t=>{try{return e[t]()}catch(t){return}}).filter(t=>t);n.length>0&&(t.__SENTRY__.integrations=[...t.__SENTRY__.integrations||[],...n])}());var Gl=[],Yl=Gl.forEach,jl=Gl.slice,Fl=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,$l={name:"cookie",lookup:function(t){var e;if(t.lookupCookie&&"undefined"!=typeof document){var n=function(t){for(var e="".concat(t,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(e))return i.substring(e.length,i.length)}return null}(t.lookupCookie);n&&(e=n)}return e},cacheUserLanguage:function(t,e){e.lookupCookie&&"undefined"!=typeof document&&function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*n*1e3)),r&&(i.domain=r),document.cookie=function(t,e,n){var r=n||{};r.path=r.path||"/";var i=encodeURIComponent(e),s="".concat(t,"=").concat(i);if(r.maxAge>0){var a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(a))}if(r.domain){if(!Fl.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(r.domain)}if(r.path){if(!Fl.test(r.path))throw new TypeError("option path is invalid");s+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s}(t,encodeURIComponent(e),i)}(e.lookupCookie,t,e.cookieMinutes,e.cookieDomain,e.cookieOptions)}},Vl={name:"querystring",lookup:function(t){var e;if("undefined"!=typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),i=0;i<r.length;i++){var s=r[i].indexOf("=");s>0&&r[i].substring(0,s)===t.lookupQuerystring&&(e=r[i].substring(s+1))}}return e}},ql=null,Zl=function(){if(null!==ql)return ql;try{ql="undefined"!==window&&null!==window.localStorage;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch(t){ql=!1}return ql},Wl={name:"localStorage",lookup:function(t){var e;if(t.lookupLocalStorage&&Zl()){var n=window.localStorage.getItem(t.lookupLocalStorage);n&&(e=n)}return e},cacheUserLanguage:function(t,e){e.lookupLocalStorage&&Zl()&&window.localStorage.setItem(e.lookupLocalStorage,t)}},Kl=null,Jl=function(){if(null!==Kl)return Kl;try{Kl="undefined"!==window&&null!==window.sessionStorage;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch(t){Kl=!1}return Kl},Xl={name:"sessionStorage",lookup:function(t){var e;if(t.lookupSessionStorage&&Jl()){var n=window.sessionStorage.getItem(t.lookupSessionStorage);n&&(e=n)}return e},cacheUserLanguage:function(t,e){e.lookupSessionStorage&&Jl()&&window.sessionStorage.setItem(e.lookupSessionStorage,t)}},Ql={name:"navigator",lookup:function(t){var e=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)e.push(navigator.languages[n]);navigator.userLanguage&&e.push(navigator.userLanguage),navigator.language&&e.push(navigator.language)}return e.length>0?e:void 0}},tu={name:"htmlTag",lookup:function(t){var e,n=t.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(e=n.getAttribute("lang")),e}},eu={name:"path",lookup:function(t){var e;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof t.lookupFromPathIndex){if("string"!=typeof n[t.lookupFromPathIndex])return;e=n[t.lookupFromPathIndex].replace("/","")}else e=n[0].replace("/","")}return e}},nu={name:"subdomain",lookup:function(t){var e="number"==typeof t.lookupFromSubdomainIndex?t.lookupFromSubdomainIndex+1:1,n="undefined"!=typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[e]}},ru=/*#__PURE__*/function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}var e,n;return e=t,n=[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=function(t){return Yl.call(jl.call(arguments,1),function(e){if(e)for(var n in e)void 0===t[n]&&(t[n]=e[n])}),t}(e,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(t){return t.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector($l),this.addDetector(Vl),this.addDetector(Wl),this.addDetector(Xl),this.addDetector(Ql),this.addDetector(tu),this.addDetector(eu),this.addDetector(nu)}},{key:"addDetector",value:function(t){this.detectors[t.name]=t}},{key:"detect",value:function(t){var e=this;t||(t=this.options.order);var n=[];return t.forEach(function(t){if(e.detectors[t]){var r=e.detectors[t].lookup(e.options);r&&"string"==typeof r&&(r=[r]),r&&(n=n.concat(r))}}),n=n.map(function(t){return e.options.convertDetectedLanguage(t)}),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(t,e){var n=this;e||(e=this.options.caches),e&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||e.forEach(function(e){n.detectors[e]&&n.detectors[e].cacheUserLanguage(t,n.options)}))}}],n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==Hl(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Hl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Hl(i)?i:String(i)),r)}var i}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function iu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}ru.type="languageDetector",L.default.use(ru).use(e.initReactI18next).init({resources:{en:{translation:{release:"Release",forbiddenErrorMessage:"You are not authorized to perform this operation",somethingWentWrongMessage:"Oops... something went wrong",changeLanguageText:"Change language to Polish",headerLoginButton:"Sign in",headerLogoutButton:"Sign out",loginCardTitle:"Sign in",loginFormText:"Fill both fields in order to log in to the system",loginCardCancelButton:"Cancel",loginCardSubmitButton:"Sign in",loginCardUsernameHint:"Username",loginCardPasswordHint:"Password",networkErrorHeader:"Connection issue detected",networkErrorButtonText:"Reload the page",newVersionAvailable:"New version available, the application will refresh in few seconds..."}},pl:{translation:{release:"Wydanie",forbiddenErrorMessage:"Nie masz uprawnień do wykonania tej operacji",somethingWentWrongMessage:"Ups... coś poszło nie tak",changeLanguageText:"Zmiana języka na Angielski",headerLoginButton:"Zaloguj się",headerLogoutButton:"Wyloguj",loginCardTitle:"Logowanie",loginFormText:"Wypełnij oba pola w celu zalogowania do systemu",loginCardCancelButton:"Anuluj",loginCardSubmitButton:"Zaloguj",loginCardUsernameHint:"Użytkownik",loginCardPasswordHint:"Hasło",networkErrorHeader:"Błąd połączenia",networkErrorButtonText:"Odśwież stronę",newVersionAvailable:"Dostępna jest nowa wersja, za kilka sekund nastąpi odświeżenie aplikacji..."}}},interpolation:{escapeValue:!1},react:{bindI18nStore:"added"},returnNull:!1});var su,au=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=iu({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+s}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var s=n[i].split("="),a=s.slice(1).join("=");try{var o=decodeURIComponent(s[0]);if(r[o]=e.read(a,o),t===o)break}catch(t){}}return t?r[t]:r}},remove:function(t,e){r(t,"",iu({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,iu({},this.attributes,e))},withConverter:function(e){return t(iu({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),ou=/*#__PURE__*/function(){function t(){}return t.recognizeRootDomain=function(){if(!this.rootDomain){var t=window.location.hostname;if(0===window.location.port.length){var e,n,r=t.split(".");e=r[0],n=r.slice(1),this.subdomain=e,this.rootDomain=n.join(".")}else this.rootDomain=t}return this.rootDomain},t.get=function(t){var e=this.recognizeRootDomain();return au.get(t,{domain:e})},t.set=function(t,e){var n=this.recognizeRootDomain();return au.set(t,e,{domain:n})},t.remove=function(t){var e=this.recognizeRootDomain();return au.remove(t,{domain:e})},t}(),cu=function(t,e){void 0===e&&(e={});try{var n=function(){var n=hu.requestHeaders();return null!==n&&(e.headers=Object.assign({},n,e.headers)),Promise.resolve(fetch(t,e).catch(function(t){Fr(t),hu.setNetworkError({title:L.default.t("somethingWentWrongMessage"),details:t.message})})).then(function(t){var e=function(){if(t){var e=function(){if(401!==t.status)return Promise.resolve(t.clone().text()).then(function(e){switch(t.status){case 403:re.error(L.default.t("forbiddenErrorMessage"));break;case 500:re.error(/*#__PURE__*/P.default.createElement(P.default.Fragment,null,/*#__PURE__*/P.default.createElement(d.Typography,{mr:e?2:0},L.default.t("somethingWentWrongMessage}")),e&&/*#__PURE__*/P.default.createElement(d.Tooltip,{title:e,arrow:!0},/*#__PURE__*/P.default.createElement(z.default,null))))}});hu.removeSession(),hu.removeCurrentUser(),hu.setNotAuthorizedLoginStatus()}();if(e&&e.then)return e.then(function(){})}}();return e&&e.then?e.then(function(){return t}):t})},r=function(){if(hu.isLoggedIn()&&!e.refresh){var t=hu.session,n=t.createdAt,r=t.expiresIn,i=function(){if(n+r-5<Math.round(+new Date/1e3)){var t=hu.refreshTokenPromise?Promise.resolve(hu.refreshTokenPromise).then(function(){}):Promise.resolve(hu.refresh()).then(function(){});if(t&&t.then)return t.then(function(){})}}();if(i&&i.then)return i.then(function(){})}}();return Promise.resolve(r&&r.then?r.then(n):n())}catch(t){return Promise.reject(t)}},lu=new(/*#__PURE__*/function(){function t(){this.currentUser=null,c.makeObservable(this,{setCurrentUser:c.action,removeCurrentUser:c.action,currentUser:c.observable.deep,getCurrentUserJS:c.computed})}var e,n,r=t.prototype;return r.setCurrentUser=function(t){this.currentUser=t},r.removeCurrentUser=function(){this.currentUser=null},e=t,(n=[{key:"getCurrentUserJS",get:function(){return c.toJS(this.currentUser)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key))?i:String(i),r)}var i}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()),uu=function(){this.user={},this.accessToken=null,this.refreshToken=null,this.tokenType=null,this.createdAt=null,this.expiresIn=null},du=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.setAuthConfig=function(t){var e=t.clientId,n=t.redirectUri;this.baseUrl=t.baseUrl,this.clientId=e,this.redirectUri=n},e.authorize=function(t){try{var e,n=this,r=new FormData,i=t.scope,s=t.refresh,a=t.code,o=t.username,c=t.password;return r.append("client_id",n.clientId),i&&r.append("scope",i),s?(r.append("grant_type","refresh_token"),r.append("refresh_token",s),r.append("redirect_uri",n.redirectUri)):a?(r.append("grant_type","authorization_code"),r.append("code",a),r.append("redirect_uri",n.redirectUri)):(r.append("grant_type","password"),r.append("username",o),r.append("password",c)),Promise.resolve(cu(n.baseUrl+"/v2/oauth2/token",{method:"POST",body:r,refresh:!!s}).then(function(t){try{var r,i;return Promise.resolve(function(){if(t){var a=function(t){if(r)return t;function a(){e.accessToken=i.access_token,e.refreshToken=i.refresh_token,e.tokenType=i.token_type,e.createdAt=i.created_at,e.expiresIn=i.expires_in}e=new uu;var o=function(){if(!s)return Promise.resolve(n.getUserData(i)).then(function(t){e.user=t})}();return o&&o.then?o.then(a):a()},o=function(e,n){try{var s=Promise.resolve(t.json()).then(function(e){i=e,t.ok&&200===t.status||(re.error(i.error_description),r=1)})}catch(t){return n()}return s&&s.then?s.then(void 0,n):s}(0,function(){re.error(L.default.t("somethingWentWrongMessage")),r=1});return o&&o.then?o.then(a):a(o)}}())}catch(t){return Promise.reject(t)}}).catch(function(t){re.error(t.message)})).then(function(){return e})}catch(t){return Promise.reject(t)}},e.getUserData=function(t){try{var e={method:"GET"};return t&&(e.headers={Authorization:t.token_type+" "+t.access_token}),Promise.resolve(cu(this.baseUrl+"/v2/me",e)).then(function(t){var e,n=function(){if(null!=t&&t.ok)return Promise.resolve(t.json()).then(function(t){var n=t.user;return e=1,{id:n.id,companyId:n.company_id,roleId:n.role_id,username:n.username,email:n.email,name:n.name}})}();return n&&n.then?n.then(function(t){return e?t:null}):e?n:null})}catch(t){return Promise.reject(t)}},e.signOut=function(t){try{var e=new FormData;return e.append("client_id",this.clientId),e.append("token",t),Promise.resolve(cu(this.baseUrl+"/v2/oauth2/revoke",{method:"POST",body:e})).then(function(){})}catch(t){return Promise.reject(t)}},t}(),pu=/*#__PURE__*/function(){function t(){this.loading=!1,this.loginStatus={status:"unknown"},this.refreshTokenPromise=null,this.api=new du,this.networkError=null,c.makeObservable(this,{loading:c.observable,setLoading:c.action,loginStatus:c.observable.deep,setConnectedLoginStatus:c.action,setNotAuthorizedLoginStatus:c.action})}var e=t.prototype;return e.setLoading=function(t){this.loading=t},e.setConnectedLoginStatus=function(){this.loginStatus={status:"connected",authResponse:{user:this.session.user,accessToken:this.session.accessToken,refreshToken:this.session.refreshToken,tokenType:this.session.tokenType,createdAt:this.session.createdAt,expiresIn:this.session.expiresIn}}},e.setNotAuthorizedLoginStatus=function(){this.loginStatus={status:"not_authorized"}},e.setAuthConfig=function(t){this.api.setAuthConfig(t)},e.setNetworkError=function(t){this.networkError=t},e.isLoggedIn=function(){return Boolean(this.session)},e.requestHeaders=function(){var t={"Accept-Language":L.default.language};if(this.isLoggedIn()){var e=this.session;return Al({},t,{Authorization:e.tokenType+" "+e.accessToken})}return t},e.authorize=function(t,e){void 0===e&&(e=!0);try{var n=this;return n.setLoading(!0),Promise.resolve(n.api.authorize(t)).then(function(t){return n.setLoading(!1),t?(e&&(n.session=t,n.storeSession(),n.setCurrentUser(t.user),n.setConnectedLoginStatus()),t):null})}catch(t){return Promise.reject(t)}},e.refresh=function(){try{var t=this;return t.session&&(t.refreshTokenPromise=t.api.authorize({refresh:t.session.refreshToken}),t.refreshTokenPromise.then(function(e){e?(t.session=Al({},t.session,e,{user:t.session.user}),t.storeSession(),t.setConnectedLoginStatus(),t.refreshTokenPromise=null):(t.removeSession(),t.removeCurrentUser(),t.setNotAuthorizedLoginStatus(),t.refreshTokenPromise=null)})),Promise.resolve(t.refreshTokenPromise)}catch(t){return Promise.reject(t)}},e.recover=function(){try{var t=this;return t.session?Promise.resolve():Promise.resolve(t.restoreSession()).then(function(){var e=function(){if(t.session)return Promise.resolve(t.api.getUserData()).then(function(e){t.setCurrentUser(e),t.setConnectedLoginStatus()});t.setNotAuthorizedLoginStatus()}();if(e&&e.then)return e.then(function(){})})}catch(t){return Promise.reject(t)}},e.logout=function(){try{var t=this,e=function(){if(t.session)return Promise.resolve(t.api.signOut(t.session.accessToken)).then(function(){t.removeSession(),t.removeCurrentUser(),t.setNotAuthorizedLoginStatus()})}();return Promise.resolve(e&&e.then?e.then(function(){}):void 0)}catch(t){return Promise.reject(t)}},e.storeSession=function(){try{var t=this,e={};e["access-token"]=t.session.accessToken,e["refresh-token"]=t.session.refreshToken,e["token-type"]=t.session.tokenType,e["created-at"]=t.session.createdAt,e["expires-in"]=t.session.expiresIn;var n=JSON.stringify(e);return ou.set("authHeaders",n),Promise.resolve()}catch(t){return Promise.reject(t)}},e.restoreSession=function(){try{var t=this,e=ou.get("authHeaders");if(!e||"null"===e)return Promise.resolve();var n=JSON.parse(e),r=new uu;return r.accessToken=n["access-token"],r.refreshToken=n["refresh-token"],r.tokenType=n["token-type"],r.createdAt=n["created-at"],r.expiresIn=n["expires-in"],t.session=r,Promise.resolve(t.api.getUserData()).then(function(e){e&&(t.session.user=e)})}catch(t){return Promise.reject(t)}},e.removeSession=function(){ou.remove("authHeaders"),this.session=null},e.setCurrentUser=function(t){lu.setCurrentUser(t)},e.removeCurrentUser=function(){lu.removeCurrentUser()},t}(),hu=new pu,fu=function(){var e=t.useState(hu.loginStatus),n=e[0],r=e[1];return t.useEffect(function(){return c.reaction(function(){return c.toJS(hu.loginStatus)},function(){r(hu.loginStatus)})},[]),n},mu=P.default.createContext({showModal:null,hideModal:null,isOpenedModal:!1}),_u=function(e){var n=e.children,r=t.useState({}),i=r[0],s=r[1],a=t.useCallback(function(t,e){s(function(e){var n;return Al({},e,((n={})[t]=Al({},e[t],{isOpen:!1}),n))}),e&&e()},[s]),o=t.useCallback(function(t,e,n){s(function(r){var i;return Al({},r,((i={})[t]={isOpen:!0,component:e,data:n},i))})},[s]),c=t.useMemo(function(){return{showModal:o,hideModal:a,isOpenedModal:Object.values(i).some(function(t){return t.isOpen})}},[a,o,i]);/*#__PURE__*/return P.default.createElement(mu.Provider,{value:c},n,Object.keys(i).map(function(t){var e=i[t],n=e.isOpen;return n&&/*#__PURE__*/P.default.createElement(e.component,Al({onClose:function(){return a(t)},key:t,isOpen:n},e.data))}))},gu=(su=0,function(){return""+ ++su});function yu(e,n,r){var i=t.useMemo(gu,[]),s=t.useContext(mu);return[t.useCallback(function(t){return s.showModal(i,e,t instanceof Event?n:Al({},n,t))},[n,s.showModal]),t.useCallback(function(){return s.hideModal(i,r)},[s.hideModal,r,i])]}yu.ModalContext=mu,yu.ModalProvider=_u;var vu={root:{height:"100vh",paddingTop:"70px",mixBlendMode:"color",background:"#1E1E1E"},overlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1,background:"repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1) 12px, transparent 12px, transparent 24px);"}},bu=function(t){var n=t.error,r=e.useTranslation().t;/*#__PURE__*/return P.default.createElement(d.Container,{maxWidth:!1,disableGutters:!0,sx:vu.root},/*#__PURE__*/P.default.createElement(d.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"650px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/P.default.createElement(d.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/P.default.createElement(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/P.default.createElement(d.Typography,{variant:"h4",sx:{display:"flex",alignItems:"center",marginBottom:"40px",color:"rgba(255, 255, 255, 0.6)"}},r("somethingWentWrongMessage"),/*#__PURE__*/P.default.createElement(d.Tooltip,{title:n.toString(),arrow:!0},/*#__PURE__*/P.default.createElement(z.default,{sx:{marginLeft:"1em",fontSize:"inherit"}}))),/*#__PURE__*/P.default.createElement(d.Button,{onClick:function(){return window.location.reload()}},r("networkErrorButtonText"))))),/*#__PURE__*/P.default.createElement(d.Box,{sx:vu.overlay}))};bu.propTypes={error:o.PropTypes.any,componentStack:o.PropTypes.any},bu.defaultProps={};var Su=t.createContext(),Eu=function(t){/*#__PURE__*/return P.default.createElement(Su.Provider,{value:t.config},t.children)},wu=function(){return t.useContext(Su)},ku=t.createContext(),Tu=function(t){/*#__PURE__*/return P.default.createElement(ku.Provider,{value:t.info},t.children)},Cu={sessionStore:hu},xu=t.createContext(Cu),Ru=a.observer(function(t){/*#__PURE__*/return P.default.createElement(xu.Provider,{value:Cu},t.children)}),Du=new(/*#__PURE__*/function(){function t(){this.appReady=!1,this.gtmReady=!1,this.sentryReady=!1,c.makeAutoObservable(this)}var e=t.prototype;return e.setAppReady=function(){this.appReady=!0},e.setGtmReady=function(){this.gtmReady=!0},e.setSentryReady=function(){this.sentryReady=!0},t}()),Iu=s.createTheme({components:{MuiCssBaseline:{styleOverrides:'\n body {\n font-family: "Inter", "system-ui";\n }\n @supports (font-variation-settings: normal) {\n body { font-family: "Inter var", "system-ui"; }\n }\n '}},palette:{background:"#1E1E1E",primary:{light:"#156bd1",main:"#155ed1",dark:"#1551d1",contrastText:"rgba(255,255,255,0.85)"},secondary:{light:"#656565",main:"#595959",dark:"#4d4d4d",contrastText:"rgba(255,255,255,0.85)"}},typography:{fontFamily:"'Inter', system-ui",fontWeightLight:"400",fontWeightRegular:"500",fontWeightMedium:"600",button:{textTransform:"none"}}}),Nu=s.createTheme(Iu,{components:{MuiBackdrop:{styleOverrides:{root:{marginTop:70}}},MuiButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiLoadingButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiCardHeader:{styleOverrides:{root:{color:"rgba(255,255,255,0.85)",background:"linear-gradient(180deg, #4A4A4A 0%, #3F3F3F 100%)"},subheader:{marginTop:"0.5em",color:"rgba(255,255,255,0.5)"}}},MuiPaper:{styleOverrides:{rounded:{borderRadius:"20px"}}},MuiCard:{styleOverrides:{root:{borderRadius:"4px",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)"}}},MuiCardContent:{styleOverrides:{root:{background:"rgba(45, 45, 45, 1)","&:last-child":{paddingBottom:16}}}},MuiDialogTitle:{styleOverrides:{root:{textAlign:"center",color:"white",background:"linear-gradient(#4a4a4a 0%, #3e3e3e 100%)"}}},MuiDialogContent:{styleOverrides:{root:{minWidth:550,padding:"16px 24px",background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)"}}},MuiDialogContentText:{styleOverrides:{root:{textAlign:"center",color:"white"}}},MuiMenu:{styleOverrides:{paper:{background:"#2d2d2d"}}},MuiMenuItem:{styleOverrides:{root:{color:"white"}}},MuiFormControl:{styleOverrides:{root:{alignItems:"center"}}},MuiOutlinedInput:{styleOverrides:{root:{color:"white","&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"rgba(255,255,255,0.35)"}},notchedOutline:{borderColor:"rgba(255,255,255,0.25)"},input:{padding:"13px 16px",background:"transparent",color:"white",borderColor:"white"}}}}}),Ou=function(t){/*#__PURE__*/return P.default.createElement(d.Box,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100vh"},/*#__PURE__*/P.default.createElement("img",{"data-testid":t["data-testid"],alt:"loader",width:t.width,src:H.default}))},Au=function(t){var n=t.error,r=e.useTranslation().t;/*#__PURE__*/return P.default.createElement(d.Container,{maxWidth:!1,disableGutters:!0,sx:vu.root},/*#__PURE__*/P.default.createElement(d.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"600px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/P.default.createElement(d.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/P.default.createElement(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/P.default.createElement("h1",{style:{textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},r("networkErrorHeader")),/*#__PURE__*/P.default.createElement("p",{style:{display:"inline-flex",textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},/*#__PURE__*/P.default.createElement(d.Typography,{mr:2},n.title),/*#__PURE__*/P.default.createElement(d.Tooltip,{title:n.details,arrow:!0},/*#__PURE__*/P.default.createElement(z.default,null))),/*#__PURE__*/P.default.createElement(d.Button,{onClick:function(){return window.location.reload()}},r("networkErrorButtonText"))))),/*#__PURE__*/P.default.createElement(d.Box,{sx:vu.overlay}))},Uu=function(){var e=new URLSearchParams(n.useLocation().search),r=e.get("next");return t.useEffect(function(){var t=e.get("code");t&&hu.authorize({code:t})},[e]),hu.isLoggedIn()?/*#__PURE__*/P.default.createElement(n.Navigate,{to:r}):null};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var Pu=function(t){var e={exports:{}};return function(t,e){var n;t.exports=(n={attachTo:function(t,e){if(void 0!==t.scannerDetectionData)throw new Error("onScan.js is already initialized for DOM element "+t);return e=this._mergeOptions({onScan:function(t,e){},onScanError:function(t){},onKeyProcess:function(t,e){},onKeyDetect:function(t,e){},onPaste:function(t,e){},keyCodeMapper:function(t){return n.decodeKeyEvent(t)},onScanButtonLongPress:function(){},scanButtonKeyCode:!1,scanButtonLongPressTime:500,timeBeforeScanTest:100,avgTimeByChar:30,minLength:6,suffixKeyCodes:[9,13],prefixKeyCodes:[],ignoreIfFocusOn:!1,stopPropagation:!1,preventDefault:!1,captureEvents:!1,reactToKeydown:!0,reactToPaste:!1,singleScanQty:1},e),t.scannerDetectionData={options:e,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},!0===e.reactToPaste&&t.addEventListener("paste",this._handlePaste,e.captureEvents),!1!==e.scanButtonKeyCode&&t.addEventListener("keyup",this._handleKeyUp,e.captureEvents),!0!==e.reactToKeydown&&!1===e.scanButtonKeyCode||t.addEventListener("keydown",this._handleKeyDown,e.captureEvents),this},detachFrom:function(t){t.scannerDetectionData.options.reactToPaste&&t.removeEventListener("paste",this._handlePaste),!1!==t.scannerDetectionData.options.scanButtonKeyCode&&t.removeEventListener("keyup",this._handleKeyUp),t.removeEventListener("keydown",this._handleKeyDown),t.scannerDetectionData=void 0},getOptions:function(t){return t.scannerDetectionData.options},setOptions:function(t,e){switch(t.scannerDetectionData.options.reactToPaste){case!0:!1===e.reactToPaste&&t.removeEventListener("paste",this._handlePaste);break;case!1:!0===e.reactToPaste&&t.addEventListener("paste",this._handlePaste)}return!1===t.scannerDetectionData.options.scanButtonKeyCode?!1!==e.scanButtonKeyCode&&t.addEventListener("keyup",this._handleKeyUp):!1===e.scanButtonKeyCode&&t.removeEventListener("keyup",this._handleKeyUp),t.scannerDetectionData.options=this._mergeOptions(t.scannerDetectionData.options,e),this._reinitialize(t),this},decodeKeyEvent:function(t){var e=this._getNormalizedKeyNum(t);switch(!0){case e>=48&&e<=90:case e>=106&&e<=111:if(void 0!==t.key&&""!==t.key)return t.key;var n=String.fromCharCode(e);switch(t.shiftKey){case!1:n=n.toLowerCase();break;case!0:n=n.toUpperCase()}return n;case e>=96&&e<=105:return e-96+0}return""},simulate:function(t,e){return this._reinitialize(t),Array.isArray(e)?e.forEach(function(t){var e={};"object"!=typeof t&&"function"!=typeof t||null===t?e.keyCode=parseInt(t):e=t;var n=new KeyboardEvent("keydown",e);document.dispatchEvent(n)}):this._validateScanCode(t,e),this},_reinitialize:function(t){var e=t.scannerDetectionData.vars;e.firstCharTime=0,e.lastCharTime=0,e.accumulatedString=""},_isFocusOnIgnoredElement:function(t){var e=t.scannerDetectionData.options.ignoreIfFocusOn;if(!e)return!1;var n=document.activeElement;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if(!0===n.matches(e[r]))return!0}else if(n.matches(e))return!0;return!1},_validateScanCode:function(t,e){var r,i=t.scannerDetectionData,s=i.options,a=i.options.singleScanQty,o=i.vars.firstCharTime,c=i.vars.lastCharTime,l={};switch(!0){case e.length<s.minLength:l={message:"Receieved code is shorter then minimal length"};break;case c-o>e.length*s.avgTimeByChar:l={message:"Receieved code was not entered in time"};break;default:return s.onScan.call(t,e,a),r=new CustomEvent("scan",{detail:{scanCode:e,qty:a}}),t.dispatchEvent(r),n._reinitialize(t),!0}return l.scanCode=e,l.scanDuration=c-o,l.avgTimeByChar=s.avgTimeByChar,l.minLength=s.minLength,s.onScanError.call(t,l),r=new CustomEvent("scanError",{detail:l}),t.dispatchEvent(r),n._reinitialize(t),!1},_mergeOptions:function(t,e){var n,r={};for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},_getNormalizedKeyNum:function(t){return t.which||t.keyCode},_handleKeyDown:function(t){var e=n._getNormalizedKeyNum(t),r=this.scannerDetectionData.options,i=this.scannerDetectionData.vars,s=!1;if(!1!==r.onKeyDetect.call(this,e,t)&&!n._isFocusOnIgnoredElement(this))if(!1===r.scanButtonKeyCode||e!=r.scanButtonKeyCode){switch(!0){case i.firstCharTime&&-1!==r.suffixKeyCodes.indexOf(e):t.preventDefault(),t.stopImmediatePropagation(),s=!0;break;case!i.firstCharTime&&-1!==r.prefixKeyCodes.indexOf(e):t.preventDefault(),t.stopImmediatePropagation(),s=!1;break;default:var a=r.keyCodeMapper.call(this,t);if(null===a)return;i.accumulatedString+=a,r.preventDefault&&t.preventDefault(),r.stopPropagation&&t.stopImmediatePropagation(),s=!1}i.firstCharTime||(i.firstCharTime=Date.now()),i.lastCharTime=Date.now(),i.testTimer&&clearTimeout(i.testTimer),s?(n._validateScanCode(this,i.accumulatedString),i.testTimer=!1):i.testTimer=setTimeout(n._validateScanCode,r.timeBeforeScanTest,this,i.accumulatedString),r.onKeyProcess.call(this,a,t)}else i.longPressed||(i.longPressTimer=setTimeout(r.onScanButtonLongPress,r.scanButtonLongPressTime,this),i.longPressed=!0)},_handlePaste:function(t){var e=this.scannerDetectionData.options,r=this.scannerDetectionData.vars,i=(event.clipboardData||window.clipboardData).getData("text");n._isFocusOnIgnoredElement(this)||(t.preventDefault(),e.stopPropagation&&t.stopImmediatePropagation(),e.onPaste.call(this,i,event),r.firstCharTime=0,r.lastCharTime=0,n._validateScanCode(this,i))},_handleKeyUp:function(t){n._isFocusOnIgnoredElement(this)||n._getNormalizedKeyNum(t)==this.scannerDetectionData.options.scanButtonKeyCode&&(clearTimeout(this.scannerDetectionData.vars.longPressTimer),this.scannerDetectionData.vars.longPressed=!1)},isScanInProgressFor:function(t){return t.scannerDetectionData.vars.firstCharTime>0},isAttachedTo:function(t){return void 0!==t.scannerDetectionData}},n)}(e),e.exports}(),Bu=function(r){var i=r.scope,s=r.redirectPath,a=r.onSuccess,o=r.onFailure,c=r.onCancel,l=r.storeSession,u=r.title,p=r["data-testid"],h=t.useState(""),f=h[0],_=h[1],g=t.useState(""),y=g[0],v=g[1],b=t.useContext(ku),S=b.releaseVersion,E=b.releasePageLink,w=n.useNavigate(),k=e.useTranslation().t,T=function(t){try{return Promise.resolve(hu.authorize(Al({scope:i},t),l)).then(function(t){t?(a&&"function"==typeof a&&a(t),v(""),w(s)):o&&"function"==typeof o&&o()})}catch(t){return Promise.reject(t)}};t.useEffect(function(){return Pu.attachTo(document,{suffixKeyCodes:[13],onScan:function(t){_(""),v(""),T({username:"code",password:t})}}),function(){Pu.detachFrom(document)}},[]);var C=function(t){try{return t.preventDefault(),T({username:f,password:y}),Promise.resolve()}catch(t){return Promise.reject(t)}};/*#__PURE__*/return P.default.createElement("form",{onSubmit:C,"data-testid":p||"ac-sdk-login-form"},/*#__PURE__*/P.default.createElement(d.Box,{m:"0 80px"},/*#__PURE__*/P.default.createElement(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,m:"100px 0"},/*#__PURE__*/P.default.createElement(Gu,null),S&&/*#__PURE__*/P.default.createElement(d.Link,{href:E,target:"_blank",fontSize:"14px",sx:{textDecoration:"none","&:hover":{cursor:"pointer",opacity:.8}}},"🛈 ",k("release")," ",S)),/*#__PURE__*/P.default.createElement(d.Box,{m:"0 0 30px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/P.default.createElement(d.Typography,{align:"center",color:"inherit"},u)),/*#__PURE__*/P.default.createElement(d.Box,{m:"0",display:"grid",sx:{gridGap:"18px"},gridTemplateColumns:"1fr"},/*#__PURE__*/P.default.createElement(d.FormControl,{fullWidth:!0},/*#__PURE__*/P.default.createElement(d.TextField,{autoFocus:!0,fullWidth:!0,variant:"outlined",placeholder:k("loginCardUsernameHint"),onChange:function(t){_(t.target.value)},value:f,id:"login-input",inputProps:{"data-testid":"ac-sdk-login-form-username-input"}})),/*#__PURE__*/P.default.createElement(d.FormControl,{fullWidth:!0},/*#__PURE__*/P.default.createElement(d.TextField,{fullWidth:!0,variant:"outlined",placeholder:k("loginCardPasswordHint"),onChange:function(t){v(t.target.value)},value:y,type:"password",id:"password-input",inputProps:{"data-testid":"ac-sdk-login-form-password-input"}})),/*#__PURE__*/P.default.createElement(m.LoadingButton,{id:"login-button",type:"submit",size:"large",color:"primary",onClick:C,loading:hu.loading,"data-testid":"ac-sdk-login-form-submit-button"},k("loginCardSubmitButton")),/*#__PURE__*/P.default.createElement(d.Button,{id:"cancel-button",type:"button",size:"large",color:"secondary",onClick:function(t){c&&"function"==typeof c?c():w("/")},"data-testid":"ac-sdk-login-form-cancel-button"},k("loginCardCancelButton"))),/*#__PURE__*/P.default.createElement(d.Box,{m:"30px 0 40px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/P.default.createElement(d.Typography,{align:"center",color:"inherit"},"or scan")),/*#__PURE__*/P.default.createElement(d.Box,{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",alignItems:"center",justifyItems:"center",marginBottom:"30px"},/*#__PURE__*/P.default.createElement(d.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/P.default.createElement(Lu,null)),/*#__PURE__*/P.default.createElement(zu,null),/*#__PURE__*/P.default.createElement(d.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/P.default.createElement(Hu,null)))))};Bu.propTypes={scope:o.PropTypes.string,redirectPath:o.PropTypes.string,onSuccess:o.PropTypes.func,onFailure:o.PropTypes.func,onCancel:o.PropTypes.func,storeSession:o.PropTypes.bool},Bu.defaultProps={redirectPath:"/",storeSession:!0};var Mu=a.observer(Bu),Lu=function(){/*#__PURE__*/return P.default.createElement("svg",{width:"51",height:"53",viewBox:"0 0 51 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/P.default.createElement("path",{d:"M8.66868 45.6365C8.66868 42.8453 6.99822 41.1535 4.7397 41.1535C2.47266 41.1535 0.806463 42.8453 0.806463 45.6365C0.806463 48.4234 2.47266 50.1194 4.7397 50.1194C5.3022 50.1194 5.82635 50.0172 6.2951 49.8169L7.04084 50.7842H8.38743L7.21129 49.2501C8.1147 48.4873 8.66868 47.243 8.66868 45.6365ZM4.29652 47.1706L5.53658 48.7984C5.28942 48.8794 5.02095 48.9177 4.7397 48.9177C3.23544 48.9177 2.1147 47.7629 2.1147 45.6365C2.1147 43.5101 3.23544 42.3552 4.7397 42.3552C6.2397 42.3552 7.3647 43.5101 7.3647 45.6365C7.3647 46.8297 7.01101 47.7203 6.43146 48.2657L5.59197 47.1706H4.29652ZM10.3104 50.0001H11.6271V46.6976H13.4169C13.4467 46.6976 13.4723 46.6976 13.5021 46.6976L15.2749 50.0001H16.7749L14.8402 46.4675C15.9098 46.0711 16.4425 45.1805 16.4425 44.0086C16.4425 42.4021 15.4453 41.2728 13.4212 41.2728H10.3104V50.0001ZM11.6271 45.564V42.4021H13.2805C14.5803 42.4021 15.1172 43.02 15.1172 44.0086C15.1172 44.993 14.5803 45.564 13.2976 45.564H11.6271ZM28.4691 44.1109C28.1708 42.2444 26.7092 41.1535 24.864 41.1535C22.6055 41.1535 20.9393 42.8453 20.9393 45.6365C20.9393 48.4277 22.5969 50.1194 24.864 50.1194C26.7816 50.1194 28.1836 48.9177 28.4691 47.1919L27.1396 47.1876C26.9137 48.3041 25.9762 48.9177 24.8725 48.9177C23.3768 48.9177 22.2475 47.7714 22.2475 45.6365C22.2475 43.5186 23.3725 42.3552 24.8768 42.3552C25.989 42.3552 26.9222 42.9817 27.1396 44.1109H28.4691ZM32.6996 50.1322C34.5447 50.1322 35.7507 48.7814 35.7507 46.7572C35.7507 44.7203 34.5447 43.3694 32.6996 43.3694C30.8544 43.3694 29.6484 44.7203 29.6484 46.7572C29.6484 48.7814 30.8544 50.1322 32.6996 50.1322ZM32.7038 49.0626C31.4979 49.0626 30.9354 48.0101 30.9354 46.753C30.9354 45.5001 31.4979 44.4348 32.7038 44.4348C33.9013 44.4348 34.4638 45.5001 34.4638 46.753C34.4638 48.0101 33.9013 49.0626 32.7038 49.0626ZM39.6232 50.128C40.8164 50.128 41.2852 49.3993 41.5153 48.9817H41.6218V50.0001H42.8661V41.2728H41.592V44.5157H41.5153C41.2852 44.1109 40.8505 43.3694 39.6317 43.3694C38.0508 43.3694 36.8874 44.618 36.8874 46.7402C36.8874 48.8581 38.0337 50.128 39.6232 50.128ZM39.9045 49.0413C38.7667 49.0413 38.1744 48.0399 38.1744 46.7274C38.1744 45.4277 38.7539 44.4518 39.9045 44.4518C41.0167 44.4518 41.6133 45.3595 41.6133 46.7274C41.6133 48.1038 41.0039 49.0413 39.9045 49.0413ZM47.5057 50.1322C48.9332 50.1322 49.9432 49.4291 50.233 48.3638L49.027 48.1464C48.7969 48.7643 48.2429 49.0797 47.5185 49.0797C46.4276 49.0797 45.6946 48.3723 45.6605 47.1109H50.3139V46.6592C50.3139 44.2942 48.8991 43.3694 47.4162 43.3694C45.5923 43.3694 44.3906 44.7586 44.3906 46.77C44.3906 48.8027 45.5753 50.1322 47.5057 50.1322ZM45.6648 46.1564C45.7159 45.2274 46.3892 44.422 47.4247 44.422C48.4134 44.422 49.0611 45.155 49.0653 46.1564H45.6648Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("g",{clipPath:"url(#clip0_2183_35009)"},/*#__PURE__*/P.default.createElement("path",{d:"M22.3002 3.27948H14.25V11.3318H22.3002V3.27948ZM20.6609 9.66275H15.9186V4.91923H20.6609V9.66275Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M19.1081 6.47128H17.4688V8.11102H19.1081V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M14.2773 24.7206H22.3275V16.7122H14.2773V24.7206ZM15.9166 18.3373H20.6589V23.0809H15.9166V18.3373Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M35.7147 17.5176H34.0754V23.081H32.4653V21.8366H30.826V23.0591H28.8281V24.6988H35.7147V17.5176Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M19.1081 19.8893H17.4688V21.529H19.1081V19.8893Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M35.7142 3.27948H27.6641V11.3318H35.7142V3.27948ZM34.0749 9.66275H29.318V4.91923H34.0603L34.0749 9.66275Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M32.5221 6.47128H30.8828V8.11102H32.5221V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M22.3014 13.184H17.5664V14.8237H22.3014V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M15.9167 13.184H14.2773V14.8237H15.9167V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M30.041 13.184H23.9375V14.8237H30.041V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M35.7121 15.8778V13.1766H31.6797V14.8237H34.0728V15.8778H35.7121Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M25.819 6.56622H24.1797V11.3024H25.819V6.56622Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M25.819 3.27948H24.1797V4.91922H25.819V3.27948Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M25.82 21.4338H27.0348V19.7941H25.82V16.7122H24.1953V24.7645H27.1958V23.0809H25.8346L25.82 21.4338Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M29.1874 19.5598H30.8267V18.3373H32.1587V16.7122H27.8555V18.352H29.1874V19.5598Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M33.2539 6.42268e-05V1.6398H37.3668V5.73182H39.0061V-0.00726318L33.2539 6.42268e-05Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M12.6408 1.63985H16.7391V0.00012207H11.0234V5.73188H12.6627L12.6408 1.63985Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M37.3678 26.3603H33.2695V28.0001H39.0071V22.261H37.3678V26.3603Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M12.6408 22.261H11.0234V28.0001H16.761V26.3603H12.6627L12.6408 22.261Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/P.default.createElement("defs",null,/*#__PURE__*/P.default.createElement("clipPath",{id:"clip0_2183_35009"},/*#__PURE__*/P.default.createElement("rect",{width:"28",height:"28",fill:"white",transform:"translate(11 0.00012207)"}))))},zu=function(){/*#__PURE__*/return P.default.createElement("svg",{width:"52",height:"49",viewBox:"0 0 52 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/P.default.createElement("path",{d:"M1.42951 46.0001H4.77468C6.80309 46.0001 7.71928 44.9902 7.71928 43.6521C7.71928 42.3013 6.77326 41.5385 5.9082 41.4916V41.4064C6.70934 41.2018 7.37837 40.6564 7.37837 39.5655C7.37837 38.2743 6.48349 37.2728 4.62553 37.2728H1.42951V46.0001ZM2.74627 44.8709V42.0754H4.69371C5.75053 42.0754 6.41104 42.7572 6.41104 43.5882C6.41104 44.3211 5.91246 44.8709 4.64684 44.8709H2.74627ZM2.74627 41.0484V38.3936H4.54457C5.5886 38.3936 6.08718 38.9433 6.08718 39.6677C6.08718 40.5115 5.39684 41.0484 4.51048 41.0484H2.74627ZM11.0836 46.145C12.166 46.145 12.7754 45.5953 13.0183 45.1052H13.0694V46.0001H14.3137V41.6535C14.3137 39.7487 12.8137 39.3694 11.774 39.3694C10.5893 39.3694 9.4984 39.8467 9.07227 41.0399L10.2697 41.3126C10.4572 40.8481 10.9345 40.4007 11.791 40.4007C12.6135 40.4007 13.0353 40.8311 13.0353 41.5726V41.6024C13.0353 42.0669 12.5581 42.0584 11.3819 42.1947C10.1419 42.3396 8.87198 42.6635 8.87198 44.1507C8.87198 45.4376 9.83931 46.145 11.0836 46.145ZM11.3606 45.1223C10.6404 45.1223 10.1206 44.7984 10.1206 44.1677C10.1206 43.4859 10.7257 43.243 11.4629 43.145C11.8762 43.0896 12.8564 42.9788 13.0396 42.7956V43.6393C13.0396 44.4149 12.4217 45.1223 11.3606 45.1223ZM16.0108 46.0001H17.285V42.003C17.285 41.1464 17.9455 40.5285 18.8489 40.5285C19.1131 40.5285 19.4114 40.5754 19.5137 40.6052V39.3865C19.3858 39.3694 19.1344 39.3567 18.9725 39.3567C18.2054 39.3567 17.5492 39.7913 17.3105 40.4944H17.2424V39.4547H16.0108V46.0001ZM26.5492 46.1322C28.0961 46.1322 29.0975 45.2032 29.2381 43.9291H27.998C27.8361 44.6365 27.2864 45.0541 26.5577 45.0541C25.4796 45.0541 24.785 44.155 24.785 42.7274C24.785 41.3254 25.4924 40.4433 26.5577 40.4433C27.3674 40.4433 27.8617 40.9547 27.998 41.5683H29.2381C29.1017 40.2473 28.0236 39.3694 26.5364 39.3694C24.6912 39.3694 23.498 40.7586 23.498 42.7572C23.498 44.7302 24.6486 46.1322 26.5492 46.1322ZM33.3578 46.1322C35.2029 46.1322 36.4089 44.7814 36.4089 42.7572C36.4089 40.7203 35.2029 39.3694 33.3578 39.3694C31.5126 39.3694 30.3066 40.7203 30.3066 42.7572C30.3066 44.7814 31.5126 46.1322 33.3578 46.1322ZM33.362 45.0626C32.1561 45.0626 31.5936 44.0101 31.5936 42.753C31.5936 41.5001 32.1561 40.4348 33.362 40.4348C34.5595 40.4348 35.122 41.5001 35.122 42.753C35.122 44.0101 34.5595 45.0626 33.362 45.0626ZM40.2814 46.128C41.4746 46.128 41.9434 45.3993 42.1735 44.9817H42.28V46.0001H43.5243V37.2728H42.2502V40.5157H42.1735C41.9434 40.1109 41.5087 39.3694 40.29 39.3694C38.709 39.3694 37.5456 40.618 37.5456 42.7402C37.5456 44.8581 38.6919 46.128 40.2814 46.128ZM40.5627 45.0413C39.4249 45.0413 38.8326 44.0399 38.8326 42.7274C38.8326 41.4277 39.4121 40.4518 40.5627 40.4518C41.6749 40.4518 42.2715 41.3595 42.2715 42.7274C42.2715 44.1038 41.6621 45.0413 40.5627 45.0413ZM48.1639 46.1322C49.5914 46.1322 50.6014 45.4291 50.8912 44.3638L49.6852 44.1464C49.4551 44.7643 48.9011 45.0797 48.1767 45.0797C47.0858 45.0797 46.3528 44.3723 46.3187 43.1109H50.9721V42.6592C50.9721 40.2942 49.5574 39.3694 48.0744 39.3694C46.2505 39.3694 45.0488 40.7586 45.0488 42.77C45.0488 44.8027 46.2335 46.1322 48.1639 46.1322ZM46.323 42.1564C46.3741 41.2274 47.0474 40.422 48.0829 40.422C49.0716 40.422 49.7193 41.155 49.7235 42.1564H46.323Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("g",{clipPath:"url(#clip0_2183_35008)"},/*#__PURE__*/P.default.createElement("path",{d:"M47 9.00012H7V10.0001H47V9.00012Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M43 0.00012207H42V7.00012H43V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M43 12.0001H42V19.0001H43V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M41 12.0001H39V19.0001H41V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M41 0.00012207H39V7.00012H41V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M38 0.00012207H35V7.00012H38V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M38 12.0001H35V19.0001H38V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M33 12.0001H31V19.0001H33V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M33 0.00012207H31V7.00012H33V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M30 0.00012207H28V7.00012H30V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M30 12.0001H28V19.0001H30V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M27 0.00012207H26V7.00012H27V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M27 12.0001H26V19.0001H27V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M25 0.00012207H24V7.00012H25V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M25 12.0001H24V19.0001H25V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M23 0.00012207H20V7.00012H23V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M23 12.0001H20V19.0001H23V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M18 0.00012207H16V7.00012H18V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M18 12.0001H16V19.0001H18V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M15 12.0001H14V19.0001H15V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M15 0.00012207H14V7.00012H15V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M13 0.00012207H10V7.00012H13V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("path",{d:"M13 12.0001H10V19.0001H13V12.0001Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/P.default.createElement("defs",null,/*#__PURE__*/P.default.createElement("clipPath",{id:"clip0_2183_35008"},/*#__PURE__*/P.default.createElement("rect",{width:"40",height:"20",fill:"white",transform:"translate(7 0.00012207)"}))))},Hu=function(){/*#__PURE__*/return P.default.createElement("svg",{width:"58",height:"49",viewBox:"0 0 58 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/P.default.createElement("path",{d:"M1.27131 46.0001H2.58807V42.6976H4.37784C4.40767 42.6976 4.43324 42.6976 4.46307 42.6976L6.2358 46.0001H7.7358L5.80114 42.4675C6.87074 42.0711 7.40341 41.1805 7.40341 40.0086C7.40341 38.4021 6.40625 37.2728 4.3821 37.2728H1.27131V46.0001ZM2.58807 41.564V38.4021H4.24148C5.54119 38.4021 6.07812 39.02 6.07812 40.0086C6.07812 40.993 5.54119 41.564 4.25852 41.564H2.58807ZM10.3224 37.2728H9.00568V46.0001H10.3224V37.2728ZM12.2401 46.0001H13.5568V42.1947H17.2642V41.0655H13.5568V38.4064H17.652V37.2728H12.2401V46.0001ZM22.0966 46.0001C24.7557 46.0001 26.294 44.351 26.294 41.6237C26.294 38.9092 24.7557 37.2728 22.1861 37.2728H19.2713V46.0001H22.0966ZM20.5881 44.8496V38.4234H22.1051C24.0142 38.4234 24.9986 39.5655 24.9986 41.6237C24.9986 43.6905 24.0142 44.8496 22.0241 44.8496H20.5881ZM38.3558 40.1109C38.0575 38.2444 36.5959 37.1535 34.7507 37.1535C32.4922 37.1535 30.826 38.8453 30.826 41.6365C30.826 44.4277 32.4837 46.1194 34.7507 46.1194C36.6683 46.1194 38.0703 44.9177 38.3558 43.1919L37.0263 43.1876C36.8004 44.3041 35.8629 44.9177 34.7592 44.9177C33.2635 44.9177 32.1342 43.7714 32.1342 41.6365C32.1342 39.5186 33.2592 38.3552 34.7635 38.3552C35.8757 38.3552 36.8089 38.9817 37.0263 40.1109H38.3558ZM41.734 46.145C42.8164 46.145 43.4258 45.5953 43.6687 45.1052H43.7198V46.0001H44.9641V41.6535C44.9641 39.7487 43.4641 39.3694 42.4244 39.3694C41.2397 39.3694 40.1488 39.8467 39.7227 41.0399L40.9201 41.3126C41.1076 40.8481 41.5849 40.4007 42.4414 40.4007C43.2638 40.4007 43.6857 40.8311 43.6857 41.5726V41.6024C43.6857 42.0669 43.2085 42.0584 42.0323 42.1947C40.7923 42.3396 39.5224 42.6635 39.5224 44.1507C39.5224 45.4376 40.4897 46.145 41.734 46.145ZM42.011 45.1223C41.2908 45.1223 40.771 44.7984 40.771 44.1677C40.771 43.4859 41.3761 43.243 42.1133 43.145C42.5266 43.0896 43.5067 42.9788 43.69 42.7956V43.6393C43.69 44.4149 43.0721 45.1223 42.011 45.1223ZM46.6612 46.0001H47.9354V42.003C47.9354 41.1464 48.5959 40.5285 49.4993 40.5285C49.7635 40.5285 50.0618 40.5754 50.1641 40.6052V39.3865C50.0362 39.3694 49.7848 39.3567 49.6229 39.3567C48.8558 39.3567 48.1996 39.7913 47.9609 40.4944H47.8928V39.4547H46.6612V46.0001ZM53.4826 46.128C54.6758 46.128 55.1445 45.3993 55.3746 44.9817H55.4812V46.0001H56.7255V37.2728H55.4513V40.5157H55.3746C55.1445 40.1109 54.7099 39.3694 53.4911 39.3694C51.9102 39.3694 50.7468 40.618 50.7468 42.7402C50.7468 44.8581 51.8931 46.128 53.4826 46.128ZM53.7638 45.0413C52.6261 45.0413 52.0337 44.0399 52.0337 42.7274C52.0337 41.4277 52.6133 40.4518 53.7638 40.4518C54.8761 40.4518 55.4727 41.3595 55.4727 42.7274C55.4727 44.1038 54.8633 45.0413 53.7638 45.0413Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/P.default.createElement("g",{clipPath:"url(#clip0_2183_35036)"},/*#__PURE__*/P.default.createElement("path",{d:"M19.5998 19.9927H38.3927C40.7673 19.9927 41.9924 18.8037 41.9924 16.5215V3.47133C41.9924 1.1892 40.7673 0.00012207 38.3927 0.00012207H19.5998C17.2251 0.00012207 16 1.17443 16 3.47133V16.5215C16 18.8037 17.2251 19.9927 19.5998 19.9927ZM19.7283 17.8953C19.5129 17.9222 19.294 17.9003 19.0886 17.8313C18.8832 17.7623 18.6969 17.648 18.544 17.4973C18.3911 17.3466 18.2759 17.1635 18.2072 16.9623C18.1385 16.761 18.1181 16.547 18.1478 16.3369V3.64857C18.1197 3.43872 18.1411 3.22539 18.2104 3.02486C18.2796 2.82432 18.3949 2.6419 18.5474 2.49154C18.6999 2.34118 18.8856 2.22684 19.0903 2.15729C19.295 2.08774 19.5132 2.06481 19.7283 2.09024H38.2641C38.4792 2.06481 38.6975 2.08774 38.9022 2.15729C39.1068 2.22684 39.2925 2.34118 39.445 2.49154C39.5975 2.6419 39.7128 2.82432 39.7821 3.02486C39.8513 3.22539 39.8728 3.43872 39.8447 3.64857V16.3369C39.8728 16.5468 39.8513 16.7601 39.7821 16.9606C39.7128 17.1612 39.5975 17.3436 39.445 17.494C39.2925 17.6443 39.1068 17.7586 38.9022 17.8282C38.6975 17.8977 38.4792 17.9207 38.2641 17.8953H19.7283ZM24.5759 9.93366C24.9027 9.92527 25.2245 9.85291 25.5221 9.72085C25.8197 9.58879 26.0872 9.39974 26.3086 9.16488C26.5301 8.93003 26.701 8.65415 26.8112 8.3536C26.9215 8.05305 26.9689 7.73395 26.9505 7.41519C26.9123 6.96482 26.7407 6.53505 26.4565 6.1784C26.1723 5.82175 25.7879 5.55367 25.3502 5.40689C24.9125 5.26012 24.4405 5.24101 23.9919 5.3519C23.5433 5.46279 23.1375 5.69889 22.8241 6.03133C22.5106 6.36378 22.3031 6.77819 22.2269 7.22393C22.1506 7.66967 22.2089 8.12746 22.3947 8.54135C22.5805 8.95524 22.8858 9.3073 23.2731 9.55456C23.6605 9.80182 24.1132 9.93355 24.5759 9.93366ZM31.6091 6.54371H37.3112C37.4038 6.54577 37.4958 6.52936 37.5817 6.49548C37.6676 6.46159 37.7455 6.41095 37.8106 6.34665C37.8757 6.28235 37.9268 6.20575 37.9605 6.12153C37.9943 6.03731 38.0101 5.94725 38.007 5.85686C38.008 5.76802 37.9907 5.67989 37.9559 5.5978C37.9211 5.51571 37.8697 5.44134 37.8047 5.37922C37.7396 5.31709 37.6624 5.2685 37.5776 5.23634C37.4927 5.20419 37.4021 5.18914 37.3112 5.19214H31.6469C31.556 5.18914 31.4654 5.20419 31.3806 5.23634C31.2958 5.2685 31.2185 5.31709 31.1535 5.37922C31.0885 5.44134 31.037 5.51571 31.0022 5.5978C30.9674 5.67989 30.9501 5.76802 30.9511 5.85686C30.948 5.94725 30.9638 6.03731 30.9976 6.12153C31.0313 6.20575 31.0824 6.28235 31.1475 6.34665C31.2126 6.41095 31.2905 6.46159 31.3764 6.49548C31.4623 6.52936 31.5543 6.54577 31.6469 6.54371H31.6091ZM31.6091 10.6796H37.3112C37.4957 10.6796 37.6727 10.608 37.8032 10.4806C37.9337 10.3532 38.007 10.1803 38.007 10.0001C38.007 9.81992 37.9337 9.64709 37.8032 9.51967C37.6727 9.39224 37.4957 9.32065 37.3112 9.32065H31.6469C31.4624 9.32065 31.2854 9.39224 31.1549 9.51967C31.0245 9.64709 30.9511 9.81992 30.9511 10.0001C30.9511 10.1803 31.0245 10.3532 31.1549 10.4806C31.2854 10.608 31.4624 10.6796 31.6469 10.6796H31.6091ZM20.4392 14.8081H28.7126C28.796 14.8129 28.8794 14.7998 28.9571 14.7699C29.0347 14.74 29.1048 14.6939 29.1624 14.6349C29.22 14.5758 29.2637 14.5052 29.2905 14.428C29.3173 14.3508 29.3265 14.2688 29.3176 14.1877C29.3176 13.1907 27.8051 10.6501 24.5759 10.6501C21.3467 10.6501 19.8494 13.1907 19.8494 14.1877C19.8394 14.2678 19.8473 14.3489 19.8728 14.4256C19.8983 14.5023 19.9406 14.5726 19.9967 14.6317C20.0529 14.6908 20.1216 14.7372 20.198 14.7677C20.2745 14.7981 20.3567 14.8119 20.4392 14.8081ZM31.6091 14.8081H37.3112C37.4021 14.8111 37.4927 14.7961 37.5776 14.7639C37.6624 14.7318 37.7396 14.6832 37.8047 14.621C37.8697 14.5589 37.9211 14.4846 37.9559 14.4025C37.9907 14.3204 38.008 14.2322 38.007 14.1434C38.009 14.0529 37.9925 13.963 37.9584 13.8789C37.9243 13.7947 37.8734 13.718 37.8086 13.6534C37.7438 13.5887 37.6664 13.5373 37.581 13.5023C37.4956 13.4672 37.4039 13.4492 37.3112 13.4492H31.6469C31.5542 13.4492 31.4625 13.4672 31.3771 13.5023C31.2917 13.5373 31.2143 13.5887 31.1495 13.6534C31.0847 13.718 31.0338 13.7947 30.9997 13.8789C30.9656 13.963 30.9491 14.0529 30.9511 14.1434C30.9501 14.2322 30.9674 14.3204 31.0022 14.4025C31.037 14.4846 31.0885 14.5589 31.1535 14.621C31.2185 14.6832 31.2958 14.7318 31.3806 14.7639C31.4654 14.7961 31.556 14.8111 31.6469 14.8081H31.6091Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/P.default.createElement("defs",null,/*#__PURE__*/P.default.createElement("clipPath",{id:"clip0_2183_35036"},/*#__PURE__*/P.default.createElement("rect",{width:"26",height:"20",fill:"white",transform:"translate(16 0.00012207)"}))))},Gu=function(){/*#__PURE__*/return P.default.createElement("svg",{width:"98",height:"50",viewBox:"0 0 98 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/P.default.createElement("g",{opacity:"0.25"},/*#__PURE__*/P.default.createElement("path",{d:"M66.8428 0.85791C66.2106 2.00303 65.7681 3.21177 65.3888 4.48413C64.883 4.54775 64.4405 4.61136 63.998 4.67498C63.5555 4.80222 63.0497 4.92945 62.6072 5.05669C61.8486 4.0388 61.0267 3.08453 60.0784 2.19388C59.4463 2.51197 58.8141 2.83006 58.1819 3.27539C58.3716 4.54774 58.6876 5.8201 59.1302 7.09246C58.7509 7.41055 58.4348 7.72864 58.1187 8.11034C57.8026 8.49205 57.4865 8.81014 57.2336 9.25547C56.0325 8.87376 54.7681 8.55567 53.5038 8.42843C53.1245 9.06461 52.8716 9.76441 52.6187 10.4006C53.5038 11.3549 54.5153 12.1819 55.59 12.8817C55.3371 13.8359 55.2107 14.7902 55.2739 15.7445C54.0727 16.1262 52.8716 16.6351 51.7969 17.2713C51.8601 17.9711 51.9865 18.7345 52.2394 19.4343C53.5038 19.6888 54.8313 19.7524 56.0957 19.6888C56.2854 20.1341 56.475 20.5794 56.7279 20.9611C56.9808 21.4065 57.2336 21.7882 57.4865 22.1699C56.7279 23.1878 56.0957 24.3329 55.5267 25.478C56.0325 25.987 56.5382 26.4959 57.1072 26.9412C58.2451 26.3687 59.383 25.6689 60.3945 24.8418C60.7738 25.0963 61.2164 25.3508 61.6589 25.5416C62.1014 25.7325 62.544 25.9233 62.9865 26.0506C62.9865 27.3229 63.1129 28.5953 63.3658 29.8676C64.0612 29.9949 64.8198 30.1221 65.5152 30.1221C66.1474 28.977 66.5899 27.7683 66.9692 26.4959C67.475 26.4323 67.9175 26.3687 68.36 26.305C68.8026 26.1778 69.3083 26.0506 69.7508 25.9233C70.5094 26.9412 71.3313 27.8955 72.2796 28.7861C72.9117 28.4681 73.5439 28.15 74.1761 27.7046C73.9864 26.4323 73.6704 25.1599 73.2278 23.8876C73.6071 23.5695 73.9232 23.2514 74.2393 22.8697C74.5554 22.488 74.8715 22.1699 75.1244 21.7246C76.3255 22.1063 77.5899 22.4244 78.8543 22.5516C79.2336 21.9154 79.4864 21.2156 79.7393 20.5794C78.8542 19.6252 77.8428 18.7981 76.7681 18.0983C77.0209 17.1441 77.1474 16.1898 77.0841 15.2355C78.2853 14.8538 79.4864 14.3449 80.5611 13.7087C80.4979 13.0089 80.3715 12.2455 80.1186 11.5457C78.8543 11.2912 77.5267 11.2276 76.2623 11.2912C76.0727 10.8459 75.883 10.4006 75.6301 10.0189C75.3773 9.57355 75.1244 9.19185 74.8715 8.81014C75.6301 7.79225 76.2623 6.64713 76.8313 5.50201C76.3255 4.99307 75.8198 4.48413 75.2508 4.0388C74.1129 4.61136 72.975 5.31116 71.9635 6.13819C71.5842 5.88372 71.1416 5.62925 70.6991 5.4384C70.2566 5.24754 69.8141 5.05669 69.3715 4.92945C69.3715 3.6571 69.2451 2.38474 68.9922 1.11238C68.2336 0.985147 67.5382 0.85791 66.8428 0.85791ZM68.929 9.25547C72.3428 10.8459 73.7968 14.8538 72.2796 18.2256C71.3945 20.1977 69.6244 21.5973 67.5382 22.0427C66.1474 22.2971 64.6934 22.1699 63.429 21.5973C60.0152 20.0069 58.5612 15.999 60.0784 12.6272C60.9635 10.6551 62.7336 9.25546 64.8198 8.81014C66.2106 8.49205 67.6646 8.6829 68.929 9.25547Z",fill:"white"}),/*#__PURE__*/P.default.createElement("path",{d:"M6.03298 22.8689L5.02149 29.2307H0.722656L5.4008 1.55695H11.0904L15.7054 29.2307H11.3433L10.395 22.8689H6.03298ZM8.1824 7.85511L6.66517 18.7974H9.76286L8.1824 7.85511Z",fill:"white"}),/*#__PURE__*/P.default.createElement("path",{d:"M23.861 1.49487L29.361 20.0713V1.49487H33.5334V29.1686H29.1081L23.4185 11.4193V29.1686H19.2461V1.49487H23.861Z",fill:"white"}),/*#__PURE__*/P.default.createElement("path",{d:"M50.2261 22.5524C50.2261 24.3337 49.5307 25.9878 48.3295 27.1965C47.1284 28.4688 45.4847 29.1686 43.7146 29.1686H37.2031V1.49487H43.7146C45.4847 1.49487 47.1284 2.19467 48.3295 3.46703C49.5939 4.67577 50.2261 6.39345 50.2261 8.11113V22.5524ZM41.3123 25.0971H43.7778C44.41 25.0971 45.0422 24.8426 45.4215 24.3973C45.864 23.952 46.1169 23.3158 46.1169 22.6796V8.17475C46.1169 7.53857 45.864 6.90239 45.4215 6.45707C44.979 6.01174 44.41 5.75727 43.7778 5.75727H41.3123V25.0971Z",fill:"white"}),/*#__PURE__*/P.default.createElement("path",{d:"M4.83183 49.0815C2.55598 49.0815 0.722656 47.2366 0.722656 45.01C0.722656 45.01 0.722656 45.01 0.722656 44.9464V35.5309C0.722656 33.2407 2.49276 31.3958 4.76862 31.3322C7.04447 31.2685 8.8778 33.1135 8.94101 35.4037C8.94101 35.4673 8.94101 35.4673 8.94101 35.5309V37.5031H6.28585V35.4673C6.28585 34.6403 5.59045 33.9405 4.76862 33.9405C4.38931 33.9405 4.01 34.0677 3.69391 34.3858C3.44104 34.6403 3.25138 35.022 3.25138 35.4673V44.9464C3.25138 45.7734 3.88356 46.4096 4.7054 46.4096C5.08471 46.4096 5.46402 46.2824 5.78011 45.9643C6.0962 45.7098 6.22263 45.3281 6.22263 44.8828V42.5289H8.94101V44.9464C8.94101 47.2366 7.10769 49.0815 4.83183 49.0815Z",fill:"white"}),/*#__PURE__*/P.default.createElement("path",{d:"M30.1227 48.8867H23.1055V31.6463H25.6974V46.342H30.1859L30.1227 48.8867Z",fill:"white"}),/*#__PURE__*/P.default.createElement("path",{d:"M48.0115 31.4559C50.2874 31.4559 52.1207 33.3009 52.1207 35.5911V45.0065C52.1207 47.2968 50.2874 49.1417 48.0115 49.1417C46.9368 49.1417 45.8621 48.6964 45.1035 47.933C44.3449 47.1696 43.9023 46.088 43.9023 45.0065V35.5911C43.9023 33.3009 45.7357 31.4559 48.0115 31.4559ZM49.4023 35.5275C49.4023 34.7004 48.7701 34.0643 47.9483 34.0643C47.569 34.0643 47.1897 34.1915 46.8736 34.5096C46.5575 34.7641 46.4311 35.1458 46.4311 35.5911V45.0065C46.4311 45.3883 46.5575 45.77 46.8736 46.0244C47.1265 46.2789 47.5058 46.4698 47.9483 46.4698C48.7701 46.4698 49.4023 45.8336 49.4023 45.0065V35.5275Z",fill:"white"}),/*#__PURE__*/P.default.createElement("path",{d:"M70.4451 49.0776C68.2325 49.0776 66.3992 47.2963 66.3359 45.0061V31.6463H68.8647V45.0061C68.8647 45.3878 68.9911 45.7695 69.3072 46.0876C69.5601 46.342 69.9394 46.5329 70.3819 46.5329C71.2037 46.5329 71.8359 45.8967 71.8359 45.0697V31.7099H74.5543V45.0697C74.5543 46.1512 74.1118 47.2327 73.3531 47.9961C72.5945 48.6959 71.583 49.1412 70.4451 49.0776Z",fill:"white"}),/*#__PURE__*/P.default.createElement("path",{d:"M97.0021 44.7516C97.0021 45.8331 96.5595 46.9146 95.8009 47.678C95.0423 48.4414 94.0308 48.8867 92.9561 48.8867H88.9102V31.6463H92.9561C94.0308 31.6463 95.1055 32.0916 95.8009 32.855C96.5595 33.6185 97.0021 34.7 97.0021 35.7815V44.7516ZM91.5021 46.342H93.0826C93.4619 46.342 93.8412 46.2148 94.094 45.8967C94.3469 45.6422 94.5366 45.2605 94.5366 44.8152V35.7815C94.5366 35.3998 94.4101 35.018 94.094 34.7C93.8412 34.4455 93.4619 34.2546 93.0826 34.2546H91.5021V46.342Z",fill:"white"}),/*#__PURE__*/P.default.createElement("path",{d:"M87.2555 1.49487L92.7555 20.0713V1.49487H96.9279V29.1686H92.5027L86.813 11.4193V29.1686H82.6406V1.49487H87.2555Z",fill:"white"})))},Yu=function(t){var n=t.open,r=t.subtitle,i=t.scope,s=t.redirectPath,a=t.onSuccess,o=t.onFailure,c=t.onCancel,l=t.storeSession,u=t["data-testid"],d=e.useTranslation();/*#__PURE__*/return P.default.createElement(G.default,{open:n,onClose:c,disableEscapeKeyDown:!0,"data-testid":u||"ac-sdk-login-modal"},/*#__PURE__*/P.default.createElement(Y.default,null,/*#__PURE__*/P.default.createElement(Mu,{title:void 0!==r?r:(0,d.t)("loginFormText"),scope:i,redirectPath:s,onSuccess:a,onFailure:o,onCancel:c,storeSession:l})))};Yu.propTypes={title:o.PropTypes.string,subtitle:o.PropTypes.string,scope:o.PropTypes.string,redirectPath:o.PropTypes.string,onSuccess:o.PropTypes.func,onFailure:o.PropTypes.func,onCancel:o.PropTypes.func,storeSession:o.PropTypes.bool},Yu.defaultProps={redirectPath:"/",storeSession:!1};var ju=a.observer(Yu),Fu=function(e){var n=e.isOpen,r=e.title,i=e.subtitle,s=e.scope,a=e.redirectPath,o=e.onSuccess,c=e.onFailure,l=e.onCancel,u=e.storeSession,d=void 0===u||u,p=t.useState(n),h=p[0],f=p[1];return t.useEffect(function(){f(n)},[n]),/*#__PURE__*/P.default.createElement(ju,{open:h,title:r,subtitle:i,scope:s,redirectPath:a,onSuccess:function(t){o&&"function"==typeof o&&o(t),f(!1)},onFailure:c,onCancel:function(){l&&"function"==typeof l&&l(),f(!1)},storeSession:d})},$u=function(t,e){void 0===e&&(e={});var n=wu(),r=n.loginUrl,i=n.clientId,s=n.grantType,a=n.redirectUri,o=n.redirectPath,c=yu(Fu,Al({scope:t},e))[0],l=encodeURIComponent(a+"?next="+(e.redirectPath||o));return"password"===s?function(){c({key:(new Date).getTime()})}:function(){window.location.assign(r+"?response_type=code&client_id="+i+"&redirect_uri="+l+"&scope="+t)}},Vu=Object.getOwnPropertySymbols,qu=Object.prototype.hasOwnProperty,Zu=Object.prototype.propertyIsEnumerable,Wu=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,r,i=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),s=1;s<arguments.length;s++){for(var a in n=Object(arguments[s]))qu.call(n,a)&&(i[a]=n[a]);if(Vu){r=Vu(n);for(var o=0;o<r.length;o++)Zu.call(n,r[o])&&(i[r[o]]=n[r[o]])}}return i};const Ku=({url:t,allowFullScreen:e,position:n,display:r,height:i,width:s,overflow:a,styles:o,onLoad:c,onMouseOver:l,onMouseOut:u,scrolling:d,id:p,frameBorder:h,ariaHidden:f,sandbox:m,allow:_,className:g,title:y,ariaLabel:v,ariaLabelledby:b,name:S,target:E,loading:w,importance:k,referrerpolicy:T,allowpaymentrequest:C,src:x,key:R})=>{const D=Wu({src:x||t,target:E||null,style:{position:n||null,display:r||"initial",overflow:a||null},scrolling:d||null,allowpaymentrequest:C||null,importance:k||null,sandbox:m&&[...m].join(" ")||null,loading:w||null,styles:o||null,name:S||null,className:g||null,allowFullScreen:"allowFullScreen",referrerpolicy:T||null,title:y||null,allow:_||null,id:p||null,"aria-labelledby":b||null,"aria-hidden":f||null,"aria-label":v||null,width:s||null,height:i||null,onLoad:c||null,onMouseOver:l||null,onMouseOut:u||null,key:R||"iframe"});let I=Object.create(null);for(let t of Object.keys(D))null!=D[t]&&(I[t]=D[t]);for(let t of Object.keys(I.style))null==I.style[t]&&delete I.style[t];if(I.styles)for(let t of Object.keys(I.styles))I.styles.hasOwnProperty(t)&&(I.style[t]=I.styles[t]),Object.keys(I.styles).pop()==t&&delete I.styles;if(e)if("allow"in I){const t=I.allow.replace("fullscreen","");I.allow=`fullscreen ${t.trim()}`.trim()}else I.allow="fullscreen";return h>=0&&(I.style.hasOwnProperty("border")||(I.style.border=h)),P.default.createElement("iframe",Object.assign({},I))};var Ju=function(t){/*#__PURE__*/return P.default.createElement(Ku,{src:t.src,width:"100%",frameBorder:"0",styles:{display:"block",height:"calc(100vh - 70px)"}})},Xu=function(r){var i=r.position,s=r.scrolled,a=r.showAcLogo,o=r.leadingText,c=r.title,l=r.titleStyles,u=r.navProps,d=r.userProps,p=r.menuProps,h=r.sidebarEnabled,f=r.sidebarOpen,m=r.onSidebarToggle,_=r.styles,g=r["data-testid"],y=wu().baseUrl,v=e.useTranslation().t,S=Al({items:[]},u).items,E=Al({show:!0,showCompanyLogo:!1},d),w=E.show,k=E.showCompanyLogo,T=Al({items:[],buttonColor:"white",dropdownStyles:{},styles:{}},p),C=T.items,x=T.buttonColor,R=T.dropdownStyles,D=T.styles,I=t.useState(new Date),N=I[0],O=I[1],A=t.useState(null),U=A[0],B=A[1],M=function(t){var e=t.titleStyles,n=t.menuStyles,r=t.menuDropdownStyles;return{root:Al({padding:"10px 0",color:"rgba(255,255,255,0.85)",background:"transparent",zIndex:1201},t.styles),title:Al({flexGrow:1},e),nav:{marginRight:"10px"},user:{},userInfo:{marginLeft:"0.5em",color:"rgba(255,255,255,0.5)"},button:{height:"50px",marginRight:"10px",fontSize:"16px",fontWeight:600,backgroundColor:"rgba(79, 79, 79, 1)",boxShadow:"0px 2px 5px rgba(0, 0, 0, 0.28)",borderRadius:"4px","&:hover":{backgroundColor:"rgba(79, 79, 79, 1)",filter:"brightness(1.1)"}},loginButton:{padding:"6px 18px"},logoutButton:{paddingRight:"18px"},menu:Al({marginTop:"70px",backgroundColor:"rgba(0,0,0,0.5)"},n,{"& .MuiPaper-root":Al({minWidth:"20%",backgroundColor:"#2d2d2d",color:"white"},r)})}}({styles:_,titleStyles:l,menuStyles:D,menuDropdownStyles:R}),L=n.useNavigate();t.useEffect(function(){var t=setInterval(function(){O(new Date)},1e3);return function(){return clearInterval(t)}});var z,H,G=function(){B(null)},Y=function(t){t.url?L(t.url):t.action&&"function"==typeof t.action&&t.action(),G()};/*#__PURE__*/return P.default.createElement(W.default,{position:i,elevation:0,sx:Al({},M.root,"static"===i?{marginTop:"-70px"}:{},s||f?{background:"#1E1E1E"}:{}),"data-testid":g||"ac-sdk-header"},/*#__PURE__*/P.default.createElement(tt.default,{variant:"dense"},h&&/*#__PURE__*/P.default.createElement(J.default,{size:"large",sx:Al({color:"rgba(255,255,255,0.85)",borderRight:"1px solid rgba(255,255,255,0.5)"},f&&{color:"rgba(255,255,255,0.5)",borderTop:"1px solid rgba(255,255,255,0.5)",borderRightColor:"transparent"},{"> svg":{transform:"rotate(180deg)"}}),onClick:m},/*#__PURE__*/P.default.createElement(b.ViewSidebarRounded,null)),a&&/*#__PURE__*/P.default.createElement(n.Link,{to:"/"},/*#__PURE__*/P.default.createElement("img",{src:nt.default,alt:"AndonCloud",style:{display:"block",marginLeft:"-4px"}})),o&&/*#__PURE__*/P.default.createElement(et.default,{variant:"subtitle1"},o),/*#__PURE__*/P.default.createElement(et.default,{variant:"subtitle1",align:"center",style:{flexGrow:1},sx:M.title},c),S&&/*#__PURE__*/P.default.createElement(j.default,{display:"flex",sx:M.nav},S.map(function(t){/*#__PURE__*/return P.default.createElement(K.default,{key:t.label,onClick:function(){return Y(t)},endIcon:t.icon,sx:M.button},t.label)})),w&&/*#__PURE__*/P.default.createElement(j.default,{display:"flex",sx:M.user},lu.getCurrentUserJS?/*#__PURE__*/P.default.createElement(K.default,{id:"logout-button",onClick:function(){try{return Promise.resolve(hu.logout()).then(function(){L("/")})}catch(t){return Promise.reject(t)}},sx:Al({},M.button,M.logoutButton),"data-testid":"ac-sdk-header-logout-button"},v("headerLogoutButton"),k&&(H=function(){var t="",e=lu.getCurrentUserJS;return null===e?t:y+"/"+(t=e.company.logo_url)}(),/*#__PURE__*/P.default.createElement("img",{src:H,alt:""})),/*#__PURE__*/P.default.createElement(j.default,{display:"inline-block",sx:M.userInfo},(z=lu.currentUser)&&"("+z.name+")")):/*#__PURE__*/P.default.createElement(K.default,{id:"login-button",onClick:function(){return L("/login")},sx:Al({},M.button,M.loginButton),"data-testid":"ac-sdk-header-login-button"},v("headerLoginButton"))),/*#__PURE__*/P.default.createElement(q.default,null),/*#__PURE__*/P.default.createElement(et.default,{variant:"body1",align:"center",style:{width:"5rem",padding:"0 5px"}},N.toLocaleTimeString()),C&&/*#__PURE__*/P.default.createElement(j.default,null,/*#__PURE__*/P.default.createElement(J.default,{onClick:function(t){B(t.currentTarget)}},/*#__PURE__*/P.default.createElement(Z.default,{style:x?{color:x}:{}})),/*#__PURE__*/P.default.createElement(X.default,{id:"menu-appbar",marginThreshold:0,anchorEl:U,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(U),onClose:G,sx:M.menu},C.map(function(t){/*#__PURE__*/return P.default.createElement(Q.default,{key:t.label,onClick:function(){return Y(t)}},t.label)})))))};Xu.propTypes={position:o.PropTypes.string,scrolled:o.PropTypes.bool,showAcLogo:o.PropTypes.bool,leadingText:o.PropTypes.string,title:o.PropTypes.string,titleStyles:o.PropTypes.any,navProps:o.PropTypes.shape({items:o.PropTypes.any}),userProps:o.PropTypes.shape({show:o.PropTypes.bool,showCompanyLogo:o.PropTypes.bool}),menuProps:o.PropTypes.shape({items:o.PropTypes.any,buttonColor:o.PropTypes.string,dropdownStyles:o.PropTypes.any,styles:o.PropTypes.any}),styles:o.PropTypes.any},Xu.defaultProps={navProps:{},userProps:{},menuProps:{},styles:{}};var Qu=a.observer(Xu),td=function(e){var r=e.open,i=e.items,s=e.width,a=e.styles,o=e.listStyles,c=e.itemStyles,l=e.subitemStyles,u=t.useState([]),p=u[0],h=u[1],f=function(t){var e=t.styles,n=t.listStyles,r=t.itemStyles,i=t.subitemStyles;return{root:Al({flexShrink:0,"& .MuiDrawer-paper":{width:e.width+"px",boxSizing:"border-box",marginTop:"70px",color:"rgba(255,255,255,0.85)",background:"rgba(0,0,0,0.25)"}},e),list:Al({height:"90%",overflowY:"scroll"},n),item:Al({},r),itemIcon:{color:"rgba(255,255,255,0.85)"},subitem:Al({},i),subitemText:{"& > span":{fontSize:"95%"}},subitemButton:{paddingLeft:4}}}({styles:Al({},a,{width:s}),listStyles:o,itemStyles:c,subitemStyles:l}),m=n.useNavigate(),_=function(t,e,n,r){t?t():e&&(e.startsWith("/")?m(e):m("?external="+e))};/*#__PURE__*/return P.default.createElement(d.Drawer,{sx:f.root,variant:"persistent",anchor:"left",open:r},/*#__PURE__*/P.default.createElement(d.List,{sx:f.list},i.map(function(t,e){var n=t.action,r=t.url,i=t.icon,s=t.label,a=t.items;/*#__PURE__*/return P.default.createElement(P.default.Fragment,{key:s},/*#__PURE__*/P.default.createElement(d.ListItem,{sx:f.item,disablePadding:!0},/*#__PURE__*/P.default.createElement(d.ListItemButton,{onClick:function(){null!=a&&a.length?h(function(t){return t[e]=!t[e],Al({},t)}):_(n,r)}},i&&/*#__PURE__*/P.default.createElement(d.ListItemIcon,{sx:f.itemIcon},i),/*#__PURE__*/P.default.createElement(d.ListItemText,{primary:s,sx:f.itemText}),a&&/*#__PURE__*/P.default.createElement(p[e]?b.ExpandLess:b.ExpandMore,null))),a&&/*#__PURE__*/P.default.createElement(d.Collapse,{in:p[e],timeout:"auto",unmountOnExit:!0},function(t){/*#__PURE__*/return P.default.createElement(d.List,{component:"div",disablePadding:!0},t.map(function(t){var e=t.action,n=t.url,r=t.icon,i=t.label;/*#__PURE__*/return P.default.createElement(d.ListItem,{key:i,sx:f.subitem,disablePadding:!0},/*#__PURE__*/P.default.createElement(d.ListItemButton,{sx:f.subitemButton,onClick:function(){return _(e,n)}},r&&/*#__PURE__*/P.default.createElement(d.ListItemIcon,{sx:f.itemIcon},r),/*#__PURE__*/P.default.createElement(d.ListItemText,{primary:i,sx:f.subitemText})))}))}(a)))})))};td.propTypes={open:o.PropTypes.bool,items:o.PropTypes.any,width:o.PropTypes.number,styles:o.PropTypes.any,listStyles:o.PropTypes.any,itemStyles:o.PropTypes.any,subitemStyles:o.PropTypes.any},td.defaultProps={styles:{},listStyles:{},itemStyles:{},subitemStyles:{}};var ed=d.styled("main",{shouldForwardProp:function(t){return!["open","sidebarWidth"].includes(t)}})(function(t){var e=t.theme,n=t.open,r=t.sidebarWidth;return Al({flexGrow:1,transition:e.transitions.create("margin",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),marginLeft:0},n&&{transition:e.transitions.create("margin",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),marginLeft:r+"px"})}),nd=function(e){var r=e.children,i=e.headerProps,s=e.sidebarMenuProps,a=e.styles,o=e["data-testid"],c=n.useSearchParams()[0],l=t.useState(),u=l[0],p=l[1],h=t.useState(s.open),f=h[0],m=h[1],_=d.useScrollTrigger({disableHysteresis:!0,target:u,threshold:0}),g=c.get("external"),y=s.width||240;/*#__PURE__*/return P.default.createElement(V.default,{ref:function(t){t&&p(t)},maxWidth:!1,disableGutters:!0,sx:Al({},vu.root,a),"data-testid":o||"ac-sdk-container"},/*#__PURE__*/P.default.createElement(Qu,Al({scrolled:_,showAcLogo:!0,sidebarEnabled:s.enabled,sidebarOpen:f,onSidebarToggle:function(){return m(function(t){return!t})}},i)),s.enabled&&/*#__PURE__*/P.default.createElement(td,{open:f,items:s.items,width:y}),/*#__PURE__*/P.default.createElement(ed,{open:f,sidebarWidth:y},g?/*#__PURE__*/P.default.createElement(Ju,{src:g}):r),/*#__PURE__*/P.default.createElement(d.Box,{sx:vu.overlay}))};nd.propTypes={children:o.PropTypes.any,headerProps:o.PropTypes.shape({position:o.PropTypes.string,showAcLogo:o.PropTypes.bool,leadingText:o.PropTypes.string.isRequired,title:o.PropTypes.string,navProps:o.PropTypes.shape({items:o.PropTypes.any}),userProps:o.PropTypes.shape({show:o.PropTypes.bool,showCompanyLogo:o.PropTypes.bool}),menuProps:o.PropTypes.shape({items:o.PropTypes.any,buttonColor:o.PropTypes.string,dropdownStyles:o.PropTypes.any,styles:o.PropTypes.any}),styles:o.PropTypes.any}),sidebarMenuProps:o.PropTypes.shape({enabled:o.PropTypes.bool,open:o.PropTypes.bool,items:o.PropTypes.any,width:o.PropTypes.number}),styles:o.PropTypes.any},nd.defaultProps={headerProps:{},sidebarMenuProps:{}};var rd=function(t){var n=t.redirectPath,r=e.useTranslation(),i=r.i18n,s=r.t;/*#__PURE__*/return P.default.createElement(nd,{headerProps:{position:"static",leadingText:"AndonCloud Software",userProps:{show:!1},menuProps:{items:[{label:s("changeLanguageText"),action:function(){i.changeLanguage("pl"===i.language?"en":"pl")}}],buttonColor:"white"}}},/*#__PURE__*/P.default.createElement(j.default,{display:"flex",height:"100%",alignItems:"center",justifyContent:"center"},/*#__PURE__*/P.default.createElement(F.default,{sx:{borderRadius:"20px"}},/*#__PURE__*/P.default.createElement($.default,null,/*#__PURE__*/P.default.createElement(Mu,{title:s("loginFormText"),redirectPath:n})))))};rd.propTypes={redirectPath:o.PropTypes.string},rd.defaultProps={redirectPath:"/"};var id=a.observer(rd),sd=function(){var t=wu(),e=t.grantType,r=t.redirectPath,i=$u("read write"),s=n.useNavigate();return"password"===e?/*#__PURE__*/P.default.createElement(id,{redirectPath:r}):(s("/"),i(),null)},ad=function(t){if(!(kl&&Tl&&Cl&&xl&&Rl&&Dl))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.\n useEffect: ${kl}. useLocation: ${Tl}. useNavigationType: ${Cl}.\n createRoutesFromChildren: ${xl}. matchRoutes: ${Rl}. customStartTransaction: ${Dl}.`),t;let e=!0;const n=n=>{const r=Tl(),i=Cl();return kl(()=>{const t=xl(n.children);e?(function(t,e,n,r){const i=Array.isArray(n)?n:Rl(e,t,void 0);wl&&i&&wl.setName(...Ol(e,t,i))}(r,t),e=!1):function(t,e,n,r,i){const s=Array.isArray(r)?r:Rl(e,t,void 0);if(Il&&("PUSH"===n||"POP"===n)&&s){wl&&wl.finish();const[n,r]=Ol(e,t,s);wl=Dl({name:n,op:"navigation",tags:Nl,metadata:{source:r}})}}(r,t,i)},[r,i]),U.createElement(t,{...n,__self:this,__source:{fileName:"/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouterv6.tsx",lineNumber:205}})};return yl(n,t),n}(n.Routes),od=function(t){/*#__PURE__*/return P.default.createElement(n.BrowserRouter,null,/*#__PURE__*/P.default.createElement(ad,null,t.children,/*#__PURE__*/P.default.createElement(n.Route,{exact:!0,path:"/login",element:/*#__PURE__*/P.default.createElement(sd,null)}),/*#__PURE__*/P.default.createElement(n.Route,{path:"/oauth2/redirect",element:/*#__PURE__*/P.default.createElement(Uu,null)})))},cd=a.observer(function(r){var i=r.children,a=r.baseUrl,o=r.authProps,c=r.gtmProps,l=r.i18nProps,u=r.sentryProps,d=r.metaProps,p=r.muiTheme,h=fu().status,f=Al({enabled:!0,redirectPath:"/"},o),m=f.enabled;return hu.setAuthConfig({baseUrl:a,clientId:f.clientId,redirectUri:f.redirectUri}),t.useEffect(function(){!Du.gtmReady&&null!=c&&c.gtmId&&(Ll.initialize(c),Du.setGtmReady())},[c]),t.useEffect(function(){var e,r,i,s,a,o;!Du.sentryReady&&u&&((e=Al({tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,integrations:[new zl.BrowserTracing({routingInstrumentation:(r=t.useEffect,i=n.useLocation,s=n.useNavigationType,a=n.createRoutesFromChildren,o=n.matchRoutes,(t,e=!0,n=!0)=>{const c=pi&&pi.location&&pi.location.pathname;e&&c&&(wl=t({name:c,op:"pageload",tags:Nl,metadata:{source:"url"}})),kl=r,Tl=i,Cl=s,Rl=o,xl=a,Dl=t,Il=n})}),new vc]},u))._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:si}],version:si},function(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=cs),void 0===t.release&&("string"==typeof __SENTRY_RELEASE__&&(t.release=__SENTRY_RELEASE__),pi.SENTRY_RELEASE&&pi.SENTRY_RELEASE.id&&(t.release=pi.SENTRY_RELEASE.id)),void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0);const e={...t,stackParser:(n=t.stackParser||Gi,Array.isArray(n)?Je(...n):n),integrations:Zr(t),transport:t.transport||(en()?Oi:Ai)};var n;!function(t,e){!0===e.debug&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Oe.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));const n=kr();n.getScope().update(e.initialScope);const r=new t(e);n.bindClient(r)}(Ii,e),t.autoSessionTracking&&function(){if(void 0===pi.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Oe.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));const t=kr();t.captureSession&&(us(t),ln("history",({from:t,to:e})=>{void 0!==t&&t!==e&&us(kr())}))}()}(e),Du.setSentryReady())},[u]),t.useEffect(function(){m?function(){try{var t=function(){if(m)return Promise.resolve(hu.recover()).then(function(){})}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(t){return Promise.reject(t)}}():Du.setAppReady()},[m]),t.useEffect(function(){var t=null==l?void 0:l.locales;if(t)for(var e="translation",n=0,r=Object.entries(t);n<r.length;n++){var i=r[n];L.default.addResources(i[0],e,i[1][e])}},[null==l?void 0:l.locales]),t.useEffect(function(){m&&"unknown"!==h&&Du.setAppReady()},[m,h]),/*#__PURE__*/P.default.createElement(s.ThemeProvider,{theme:s.createTheme(p)},/*#__PURE__*/P.default.createElement(B.default,null),/*#__PURE__*/P.default.createElement(M.default,{styles:{"::-webkit-scrollbar":{width:"6px"},"::-webkit-scrollbar-track":{backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{borderRadius:"3px",backgroundColor:"rgba(255, 255, 255, 0.25)"}}}),/*#__PURE__*/P.default.createElement(El,{fallback:function(t){/*#__PURE__*/return P.default.createElement(bu,t)}},/*#__PURE__*/P.default.createElement(ne,null),/*#__PURE__*/P.default.createElement(Eu,{config:Al({baseUrl:a},o)},/*#__PURE__*/P.default.createElement(Ru,null,/*#__PURE__*/P.default.createElement(e.I18nextProvider,{i18n:L.default},/*#__PURE__*/P.default.createElement(Tu,{info:d},hu.networkError?/*#__PURE__*/P.default.createElement(Au,{error:hu.networkError}):Du.appReady?/*#__PURE__*/P.default.createElement(od,null,/*#__PURE__*/P.default.createElement(n.Route,{path:"*",element:/*#__PURE__*/P.default.createElement(_u,null,i)})):/*#__PURE__*/P.default.createElement(Ou,{"data-testid":"ac-sdk-app-loading",width:"500px"})))))))});cd.propTypes={children:o.PropTypes.any.isRequired,baseUrl:o.PropTypes.string.isRequired,authProps:o.PropTypes.shape({enabled:o.PropTypes.bool,loginUrl:o.PropTypes.string,redirectUri:o.PropTypes.string,redirectPath:o.PropTypes.string,clientId:o.PropTypes.string.isRequired,grantType:o.PropTypes.string}),gtmProps:o.PropTypes.any,i18nProps:o.PropTypes.shape({locales:o.PropTypes.any}),sentryProps:o.PropTypes.any,metaProps:o.PropTypes.shape({releaseVersion:o.PropTypes.string,releasePageLink:o.PropTypes.string}),muiTheme:o.PropTypes.any},cd.defaultProps={authProps:{},gtmProps:{},i18nProps:{},sentryProps:{},metaProps:{},muiTheme:Nu};var ld=function(t,e){const n=t.displayName||t.name||"unknown",r=e=>U.createElement(bl,{name:n,updateProps:e,__self:this,__source:{fileName:vl,lineNumber:146}},U.createElement(t,{...e,__self:this,__source:{fileName:vl,lineNumber:147}}));return r.displayName=`profiler(${n})`,yl(r,t),r}(cd),ud=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function dd(t,e,n,r){navigator.serviceWorker.register(t).then(function(t){var i=null;r&&setInterval(function(){fetch("/manifest.json").then(function(e){try{return Promise.resolve(e.json()).then(function(e){var r=e.version;n!==r&&(i=r,t.update())})}catch(t){return Promise.reject(t)}}).catch(function(){})},3e4),t.onupdatefound=function(){var n=t.installing;null!=n&&(n.onstatechange=function(){"installed"===n.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),e&&e.onUpdate&&(r?e.onUpdate(t,i):e.onUpdate(t))):(console.log("Content is cached for offline use."),e&&e.onSuccess&&e.onSuccess(t)))})}}).catch(function(t){console.error("Error during service worker registration:",t)})}exports.App=ld,exports.Container=nd,exports.captureException=Fr,exports.fetch=cu,exports.getLocale=function(){return L.default.language},exports.logout=function(){return hu.logout()},exports.notify=re,exports.registerServiceWorker=function(t){var e=t.version,n=function(t){var e=t.waiting;e&&(e.addEventListener("statechange",function(t){"activated"===t.target.state&&window.location.reload()}),e.postMessage({type:"SKIP_WAITING"}))},r=function(){return re(L.default.t("newVersionAvailable"),{duration:5e3,position:"bottom-left",style:{color:"rgba(255,255,255,0.85)",background:"#3F3F3F",border:"1px solid #FFE72F"}})};!function(t){var e=t.publicUrl,n=t.mode,r=t.autoUpdate,i=t.version,s=t.registrationConfig;if(globalThis.version=i,"production"===n&&"serviceWorker"in navigator){if(new URL(e,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",function(){var t=e+"/service-worker.js";ud?(function(t,e){fetch(t,{headers:{"Service-Worker":"script"}}).then(function(n){var r=n.headers.get("content-type");404===n.status||null!=r&&-1===r.indexOf("javascript")?navigator.serviceWorker.ready.then(function(t){t.unregister().then(function(){window.location.reload()})}):dd(t,e)}).catch(function(){console.log("No internet connection found. App is running in offline mode.")})}(t,s),navigator.serviceWorker.ready.then(function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):dd(t,s,i,r)})}}(Al({},t,{registrationConfig:Al({},(null==t?void 0:t.registrationConfig)||{},{onUpdate:function(i,s){var a,o;null!=(a=t.registrationConfig)&&a.onUpdate&&(null==(o=t.registrationConfig)||o.onUpdate(i)),s&&e!==s?(r(),setTimeout(function(){n(i)},5e3)):(r(),n(i))}})}))},exports.setLocale=function(t){return L.default.changeLanguage(t)},exports.useLogin=$u,exports.useLoginStatus=fu,exports.useStore=function(){return t.useContext(xu)};
|
|
171
|
+
`,ie=({reverseOrder:e,position:n="top-center",toastOptions:r,gutter:i,children:s,containerStyle:a,containerClassName:o})=>{let{toasts:c,handlers:l}=(e=>{let{toasts:n,pausedAt:r}=((e={})=>{let[n,r]=t.useState(Dt);t.useEffect(()=>(Rt.push(r),()=>{let t=Rt.indexOf(r);t>-1&&Rt.splice(t,1)}),[n]);let i=n.toasts.map(t=>{var n,r;return{...e,...e[t.type],...t,duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==e?void 0:e.duration)||Nt[t.type],style:{...e.style,...null==(r=e[t.type])?void 0:r.style,...t.style}}});return{...n,toasts:i}})(e);t.useEffect(()=>{if(r)return;let t=Date.now(),e=n.map(e=>{if(e.duration===1/0)return;let n=(e.duration||0)+e.pauseDuration-(t-e.createdAt);if(!(n<0))return setTimeout(()=>At.dismiss(e.id),n);e.visible&&At.dismiss(e.id)});return()=>{e.forEach(t=>t&&clearTimeout(t))}},[n,r]);let i=t.useCallback(()=>{r&&It({type:6,time:Date.now()})},[r]),s=t.useCallback((t,e)=>{let{reverseOrder:r=!1,gutter:i=8,defaultPosition:s}=e||{},a=n.filter(e=>(e.position||s)===(t.position||s)&&e.height),o=a.findIndex(e=>e.id===t.id),c=a.filter((t,e)=>e<o&&t.visible).length;return a.filter(t=>t.visible).slice(...r?[c+1]:[0,c]).reduce((t,e)=>t+(e.height||0)+i,0)},[n]);return{toasts:n,handlers:{updateHeight:Pt,startPause:Bt,endPause:i,calculateOffset:s}}})(r);return P.createElement("div",{style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},c.map(t=>{let r=t.position||n,a=((t,e)=>{let n=t.includes("top"),r=n?{top:0}:{bottom:0},i=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:kt()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${e*(n?1:-1)}px)`,...r,...i}})(r,l.calculateOffset(t,{reverseOrder:e,gutter:i,defaultPosition:n}));return P.createElement(ne,{id:t.id,key:t.id,onHeightUpdate:l.updateHeight,className:t.visible?re:"",style:a},"custom"===t.type?Et(t.message,t):s?s(t):P.createElement(ee,{toast:t,position:r}))}))},se=At;const ae=Object.prototype.toString;function oe(t){switch(ae.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ye(t,Error)}}function ce(t,e){return ae.call(t)===`[object ${e}]`}function le(t){return ce(t,"ErrorEvent")}function ue(t){return ce(t,"DOMError")}function de(t){return ce(t,"String")}function pe(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function he(t){return ce(t,"Object")}function fe(t){return"undefined"!=typeof Event&&ye(t,Event)}function me(t){return ce(t,"RegExp")}function _e(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function ge(t){return"number"==typeof t&&t!=t}function ye(t,e){try{return t instanceof e}catch(t){return!1}}function ve(t,e,n,r,i,s){if(!(i.exception&&i.exception.values&&s&&ye(s.originalException,Error)))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=be(t,e,r,s.originalException,n,i.exception.values,a,0))}function be(t,e,n,r,i,s,a,o){if(s.length>=n+1)return s;let c=[...s];if(ye(r[i],Error)){Se(a,o);const s=t(e,r[i]),l=c.length;Ee(s,i,l,o),c=be(t,e,n,r[i],i,[s,...c],s,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,s)=>{if(ye(r,Error)){Se(a,o);const l=t(e,r),u=c.length;Ee(l,`errors[${s}]`,u,o),c=be(t,e,n,r,i,[l,...c],l,u)}}),c}function Se(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,is_exception_group:!0,exception_id:e}}function Ee(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function we(t){return t&&t.Math==Math?t:void 0}const ke="object"==typeof globalThis&&we(globalThis)||"object"==typeof window&&we(window)||"object"==typeof self&&we(self)||"object"==typeof global&&we(global)||function(){return this}()||{};function Te(){return ke}function xe(t,e,n){const r=n||ke,i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=e())}const Ce=Te(),Re=80;function De(t,e={}){try{let n=t;const r=5,i=[];let s=0,a=0;const o=" > ",c=o.length;let l;const u=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||Re;for(;n&&s++<r&&(l=Ie(n,u),!("html"===l||s>1&&a+i.length*c+l.length>=d));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(o)}catch(t){return"<unknown>"}}function Ie(t,e){const n=t,r=[];let i,s,a,o,c;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const l=e&&e.length?e.filter(t=>n.getAttribute(t)).map(t=>[t,n.getAttribute(t)]):null;if(l&&l.length)l.forEach(t=>{r.push(`[${t[0]}="${t[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&de(i))for(s=i.split(/\s+/),c=0;c<s.length;c++)r.push(`.${s[c]}`);const u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)a=u[c],o=n.getAttribute(a),o&&r.push(`[${a}="${o}"]`);return r.join("")}const Ne=["debug","info","warn","error","log","assert","trace"];function Oe(t){if(!("console"in ke))return t();const e=ke.console,n={};Ne.forEach(t=>{const r=e[t]&&e[t].__sentry_original__;t in e&&r&&(n[t]=e[t],e[t]=r)});try{return t()}finally{Object.keys(n).forEach(t=>{e[t]=n[t]})}}function Ae(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Ne.forEach(n=>{e[n]=(...e)=>{t&&Oe(()=>{ke.console[n](`Sentry Logger [${n}]:`,...e)})}}):Ne.forEach(t=>{e[t]=()=>{}}),e}let Ue;Ue="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?xe("logger",Ae):Ae();const Pe=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Be(t,e=!1){const{host:n,path:r,pass:i,port:s,projectId:a,protocol:o,publicKey:c}=t;return`${o}://${c}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${a}`}function Me(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Le(t){const e="string"==typeof t?function(t){const e=Pe.exec(t);if(!e)return void console.error(`Invalid Sentry Dsn: ${t}`);const[n,r,i="",s,a="",o]=e.slice(1);let c="",l=o;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const t=l.match(/^\d+/);t&&(l=t[0])}return Me({host:s,pass:i,path:c,projectId:l,port:a,protocol:n,publicKey:r})}(t):Me(t);if(e&&function(t){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return!0;const{port:e,projectId:n,protocol:r}=t;return!(["protocol","publicKey","host","projectId"].find(e=>!t[e]&&(Ue.error(`Invalid Sentry Dsn: ${e} missing`),!0))||(n.match(/^\d+$/)?function(t){return"http"===t||"https"===t}(r)?e&&isNaN(parseInt(e,10))&&(Ue.error(`Invalid Sentry Dsn: Invalid port ${e}`),1):(Ue.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(Ue.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(e))return e}class ze extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}function He(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function Ge(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function Ye(t,e=[],n=!1){return e.some(e=>function(t,e,n=!1){return!!de(t)&&(me(e)?e.test(t):!!de(e)&&(n?t===e:t.includes(e)))}(t,e,n))}function je(t,e,n){if(!(e in t))return;const r=t[e],i=n(r);if("function"==typeof i)try{$e(i,r)}catch(t){}t[e]=i}function Fe(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}function $e(t,e){t.prototype=e.prototype=e.prototype||{},Fe(t,"__sentry_original__",e)}function Ve(t){return t.__sentry_original__}function qe(t){if(oe(t))return{message:t.message,name:t.name,stack:t.stack,...We(t)};if(fe(t)){const e={type:t.type,target:Ze(t.target),currentTarget:Ze(t.currentTarget),...We(t)};return"undefined"!=typeof CustomEvent&&ye(t,CustomEvent)&&(e.detail=t.detail),e}return t}function Ze(t){try{return"undefined"!=typeof Element&&ye(t,Element)?De(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}}function We(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function Ke(t){return Je(t,new Map)}function Je(t,e){if(he(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=Je(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach(t=>{r.push(Je(t,e))}),r}return t}const Xe=/\(error: (.*)\)/;function Qe(...t){const e=t.sort((t,e)=>t[0]-e[0]).map(t=>t[1]);return(t,n=0)=>{const r=[],i=t.split("\n");for(let t=n;t<i.length;t++){const n=i[t];if(n.length>1024)continue;const s=Xe.test(n)?n.replace(Xe,"$1"):n;if(!s.match(/\S*Error: /)){for(const t of e){const e=t(s);if(e){r.push(e);break}}if(r.length>=50)break}}return function(t){if(!t.length)return[];const e=t.slice(0,50),n=e[e.length-1].function;n&&/sentryWrapped/.test(n)&&e.pop(),e.reverse();const r=e[e.length-1].function;return r&&/captureMessage|captureException/.test(r)&&e.pop(),e.map(t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||"?"}))}(r)}}const tn="<anonymous>";function en(t){try{return t&&"function"==typeof t&&t.name||tn}catch(t){return tn}}const nn=Te();function rn(){if(!("fetch"in nn))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function sn(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}const an=Te(),on=Te(),cn="__sentry_xhr_v2__",ln={},un={};function dn(t,e){ln[t]=ln[t]||[],ln[t].push(e),function(t){if(!un[t])switch(un[t]=!0,t){case"console":"console"in on&&Ne.forEach(function(t){t in on.console&&je(on.console,t,function(e){return function(...n){pn("console",{args:n,level:t}),e&&e.apply(on.console,n)}})});break;case"dom":!function(){if(!("document"in on))return;const t=pn.bind(null,"dom"),e=vn(t,!0);on.document.addEventListener("click",e,!1),on.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(e=>{const n=on[e]&&on[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(je(n,"addEventListener",function(e){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,s=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=s[n]=s[n]||{refCount:0};if(!a.handler){const r=vn(t);a.handler=r,e.call(this,n,r,i)}a.refCount++}catch(t){}return e.call(this,n,r,i)}}),je(n,"removeEventListener",function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},s=i[e];s&&(s.refCount--,s.refCount<=0&&(t.call(this,e,s.handler,r),s.handler=void 0,delete i[e]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in on))return;const t=XMLHttpRequest.prototype;je(t,"open",function(t){return function(...e){const n=e[1],r=this[cn]={method:de(e[0])?e[0].toUpperCase():e[0],url:e[1],request_headers:{}};de(n)&&"POST"===r.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const t=this[cn];if(t&&4===this.readyState){try{t.status_code=this.status}catch(t){}pn("xhr",{args:e,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?je(this,"onreadystatechange",function(t){return function(...e){return i(),t.apply(this,e)}}):this.addEventListener("readystatechange",i),je(this,"setRequestHeader",function(t){return function(...e){const[n,r]=e,i=this[cn];return i&&(i.request_headers[n.toLowerCase()]=r),t.apply(this,e)}}),t.apply(this,e)}}),je(t,"send",function(t){return function(...e){const n=this[cn];return n&&void 0!==e[0]&&(n.body=e[0]),pn("xhr",{args:e,startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}})}();break;case"fetch":(function(){if(!rn())return!1;if(sn(nn.fetch))return!0;let t=!1;const e=nn.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=sn(n.contentWindow.fetch)),e.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t})()&&je(on,"fetch",function(t){return function(...e){const{method:n,url:r}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:fn(e),method:hn(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:fn(e),method:hn(e,"method")?String(e.method).toUpperCase():"GET"}}(e),i={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return pn("fetch",{...i}),t.apply(on,e).then(t=>(pn("fetch",{...i,endTimestamp:Date.now(),response:t}),t),t=>{throw pn("fetch",{...i,endTimestamp:Date.now(),error:t}),t})}});break;case"history":!function(){if(!function(){const t=an.chrome;return!(t&&t.app&&t.app.runtime||!("history"in an)||!an.history.pushState||!an.history.replaceState)}())return;const t=on.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=mn,e=String(n);mn=e,pn("history",{from:t,to:e})}return t.apply(this,e)}}on.onpopstate=function(...e){const n=on.location.href,r=mn;if(mn=n,pn("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},je(on.history,"pushState",e),je(on.history,"replaceState",e)}();break;case"error":bn=on.onerror,on.onerror=function(t,e,n,r,i){return pn("error",{column:r,error:i,line:n,msg:t,url:e}),!(!bn||bn.__SENTRY_LOADER__)&&bn.apply(this,arguments)},on.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":Sn=on.onunhandledrejection,on.onunhandledrejection=function(t){return pn("unhandledrejection",t),!(Sn&&!Sn.__SENTRY_LOADER__)||Sn.apply(this,arguments)},on.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("unknown instrumentation type:",t)}}(t)}function pn(t,e){if(t&&ln[t])for(const n of ln[t]||[])try{n(e)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${en(n)}\nError:`,e)}}function hn(t,e){return!!t&&"object"==typeof t&&!!t[e]}function fn(t){return"string"==typeof t?t:t?hn(t,"url")?t.url:t.toString?t.toString():"":""}let mn;const _n=1e3;let gn,yn;function vn(t,e=!1){return n=>{if(!n||yn===n)return;if(function(t){if("keypress"!==t.type)return!1;try{const e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(t){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===gn||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(t){}return!1}(yn,n))&&(t({event:n,name:r,global:e}),yn=n),clearTimeout(gn),gn=on.setTimeout(()=>{gn=void 0},_n)}}let bn=null,Sn=null;function En(){const t=ke.crypto||ke.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const e=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(15&e())>>t/4).toString(16))}function wn(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function kn(t){const{message:e,event_id:n}=t;if(e)return e;const r=wn(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Tn(t,e,n){const r=t.exception=t.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type=n||"Error")}function xn(t,e){const n=wn(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r&&r.data,...e.data};n.mechanism.data=t}}function Cn(t){if(t&&t.__sentry_captured__)return!0;try{Fe(t,"__sentry_captured__",!0)}catch(t){}return!1}function Rn(t){return Array.isArray(t)?t:[t]}function Dn(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function In(t,e){return t.require(e)}function Nn(t){let e;try{e=In(module,t)}catch(t){}try{const{cwd:n}=In(module,"process");e=In(module,`${n()}/node_modules/${t}`)}catch(t){}return e}function On(t,e=100,n=Infinity){try{return Un("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function An(t,e=3,n=102400){const r=On(t,e);return i=JSON.stringify(r),~-encodeURI(i).split(/%..|./).length>n?An(t,e-1,n):r;var i}function Un(t,e,n=Infinity,r=Infinity,i=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[s,a]=i;if(null==e||["number","boolean","string"].includes(typeof e)&&!ge(e))return e;const o=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(he(n=e)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof e&&e!=e)return"[NaN]";if("function"==typeof e)return`[Function: ${en(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var n}(t,e);if(!o.startsWith("[object "))return o;if(e.__sentry_skip_normalization__)return e;const c="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===c)return o.replace("object ","");if(s(e))return"[Circular ~]";const l=e;if(l&&"function"==typeof l.toJSON)try{return Un("",l.toJSON(),c-1,r,i)}catch(t){}const u=Array.isArray(e)?[]:{};let d=0;const p=qe(e);for(const t in p)if(Object.prototype.hasOwnProperty.call(p,t)){if(d>=r){u[t]="[MaxProperties ~]";break}u[t]=Un(t,p[t],c-1,r,i),d++}return a(e),u}var Pn;function Bn(t){return new Ln(e=>{e(t)})}function Mn(t){return new Ln((e,n)=>{n(t)})}!function(t){t[t.PENDING=0]="PENDING",t[t.RESOLVED=1]="RESOLVED",t[t.REJECTED=2]="REJECTED"}(Pn||(Pn={}));class Ln{__init(){this._state=Pn.PENDING}__init2(){this._handlers=[]}constructor(t){Ln.prototype.__init.call(this),Ln.prototype.__init2.call(this),Ln.prototype.__init3.call(this),Ln.prototype.__init4.call(this),Ln.prototype.__init5.call(this),Ln.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new Ln((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this._executeHandlers()})}catch(t){return this.then(t=>t,t)}finally(t){return new Ln((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}__init3(){this._resolve=t=>{this._setResult(Pn.RESOLVED,t)}}__init4(){this._reject=t=>{this._setResult(Pn.REJECTED,t)}}__init5(){this._setResult=(t,e)=>{this._state===Pn.PENDING&&(_e(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===Pn.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(t=>{t[0]||(this._state===Pn.RESOLVED&&t[1](this._value),this._state===Pn.REJECTED&&t[2](this._value),t[0]=!0)})}}}function zn(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function Hn(t){return t.split(/[\?#]/,1)[0]}function Gn(t){return t.split(/\\?\//).filter(t=>t.length>0&&","!==t).length}const Yn=["fatal","error","warning","log","info","debug"],jn=Te(),Fn={nowSeconds:()=>Date.now()/1e3},$n=Dn()?function(){try{return In(module,"perf_hooks").performance}catch(t){return}}():function(){const{performance:t}=jn;if(t&&t.now)return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),Vn=void 0===$n?Fn:{nowSeconds:()=>($n.timeOrigin+$n.now())/1e3},qn=Fn.nowSeconds.bind(Fn),Zn=Vn.nowSeconds.bind(Vn),Wn=(()=>{const{performance:t}=jn;if(!t||!t.now)return;const e=36e5,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,s=i<e,a=t.timing&&t.timing.navigationStart,o="number"==typeof a?Math.abs(a+n-r):e;return s||o<e?i<=o?t.timeOrigin:a:r})(),Kn="baggage",Jn="sentry-",Xn=/^sentry-/,Qn=8192;function tr(t){if(t)return function(t){if(0!==Object.keys(t).length)return Object.entries(t).reduce((t,[e,n],r)=>{const i=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,s=0===r?i:`${t},${i}`;return s.length>Qn?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`Not adding key: ${e} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}(Object.entries(t).reduce((t,[e,n])=>(n&&(t[`${Jn}${e}`]=n),t),{}))}function er(t){return t.split(",").map(t=>t.split("=").map(t=>decodeURIComponent(t.trim()))).reduce((t,[e,n])=>(t[e]=n,t),{})}const nr=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function rr(t=En(),e=En().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function ir(t,e=[]){return[t,e]}function sr(t,e){const[n,r]=t;return[n,[...r,e]]}function ar(t,e){const n=t[1];for(const t of n)if(e(t,t[0].type))return!0;return!1}function or(t,e){return(e||new TextEncoder).encode(t)}function cr(t,e){const[n,r]=t;let i=JSON.stringify(n);function s(t){"string"==typeof i?i="string"==typeof t?i+t:[or(i,e),t]:i.push("string"==typeof t?or(t,e):t)}for(const t of r){const[e,n]=t;if(s(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(On(n))}s(t)}}return"string"==typeof i?i:function(t){const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(i)}function lr(t,e){const n="string"==typeof t.data?or(t.data,e):t.data;return[Ke({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const ur={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function dr(t){return ur[t]}function pr(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function hr(t,e,n,r){const i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&{dsn:Be(r)},...i&&{trace:Ke({...i})}}}const fr=6e4,mr="production";function _r(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Zn(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:En()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}class gr{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=br()}static clone(t){const e=new gr;return t&&(e._breadcrumbs=[...t._breadcrumbs],e._tags={...t._tags},e._extra={...t._extra},e._contexts={...t._contexts},e._user=t._user,e._level=t._level,e._span=t._span,e._session=t._session,e._transactionName=t._transactionName,e._fingerprint=t._fingerprint,e._eventProcessors=[...t._eventProcessors],e._requestSession=t._requestSession,e._attachments=[...t._attachments],e._sdkProcessingMetadata={...t._sdkProcessingMetadata},e._propagationContext={...t._propagationContext}),e}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&_r(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},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,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof gr?e:this}return t instanceof gr?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession),t._propagationContext&&(this._propagationContext=t._propagationContext)):he(t)&&(this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=br(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:qn(),...t};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,e={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};const e=this._span.transaction;if(e){t.sdkProcessingMetadata={dynamicSamplingContext:e.getDynamicSamplingContext(),...t.sdkProcessingMetadata};const n=e.name;n&&(t.tags={transaction:n,...t.tags})}}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},this._notifyEventProcessors([...yr(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}_notifyEventProcessors(t,e,n,r=0){return new Ln((i,s)=>{const a=t[r];if(null===e||"function"!=typeof a)i(e);else{const o=a({...e},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===o&&Ue.log(`Event processor "${a.id}" dropped event`),_e(o)?o.then(e=>this._notifyEventProcessors(t,e,n,r+1).then(i)).then(null,s):this._notifyEventProcessors(t,o,n,r+1).then(i).then(null,s)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?Rn(t.fingerprint):[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function yr(){return xe("globalEventProcessors",()=>[])}function vr(t){yr().push(t)}function br(){return{traceId:En(),spanId:En().substring(16),sampled:!1}}const Sr=4,Er=100;class wr{constructor(t,e=new gr,n=Sr){this._version=n,this._stack=[{scope:e}],t&&this.bindClient(t)}isOlderThan(t){return this._version<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=gr.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1||!this.getStack().pop())}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,e){const n=this._lastEventId=e&&e.event_id?e.event_id:En(),r=new Error("Sentry syntheticException");return this._withClient((i,s)=>{i.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},s)}),n}captureMessage(t,e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:En(),i=new Error(t);return this._withClient((s,a)=>{s.captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:r},a)}),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:En();return t.type||(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(t,{...e,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=Er}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const a={timestamp:qn(),...t},o=i?Oe(()=>i(a,e)):a;null!==o&&(r.emit&&r.emit("beforeAddBreadcrumb",o,e),n.addBreadcrumb(o,s))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=Tr(this);try{t(this)}finally{Tr(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);return"undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||n||console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&function(t,e){let n={};"ok"===t.status&&(n={status:"exited"}),_r(t,n)}(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:i=mr}=n&&n.getOptions()||{},{userAgent:s}=ke.navigator||{},a=function(t){const e=Zn(),n={sid:En(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return Ke({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&_r(n,t),n}({release:r,environment:i,user:e.getUser(),...s&&{userAgent:s},...t}),o=e.getSession&&e.getSession();return o&&"ok"===o.status&&_r(o,{status:"exited"}),this.endSession(),e.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_withClient(t){const{scope:e,client:n}=this.getStackTop();n&&t(n,e)}_callExtensionMethod(t,...e){const n=kr().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function kr(){return ke.__SENTRY__=ke.__SENTRY__||{extensions:{},hub:void 0},ke}function Tr(t){const e=kr(),n=Cr(e);return Rr(e,t),n}function xr(){const t=kr();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return function(t=kr()){var e;return(e=t)&&e.__SENTRY__&&e.__SENTRY__.hub&&!Cr(t).isOlderThan(Sr)||Rr(t,new wr),Cr(t)}(t)}function Cr(t){return xe("hub",()=>new wr,t)}function Rr(t,e){return!!t&&((t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0)}function Dr(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=xr().getClient(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Ir(t){return(t||xr()).getScope().getTransaction()}let Nr=!1;function Or(){const t=Ir();if(t){const e="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}Or.tag="sentry_tracingErrorCallback";class Ar{__init(){this.spans=[]}constructor(t=1e3){Ar.prototype.__init.call(this),this._maxlen=t}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class Ur{__init2(){this.traceId=En()}__init3(){this.spanId=En().substring(16)}__init4(){this.startTimestamp=Zn()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(t){if(Ur.prototype.__init2.call(this),Ur.prototype.__init3.call(this),Ur.prototype.__init4.call(this),Ur.prototype.__init5.call(this),Ur.prototype.__init6.call(this),Ur.prototype.__init7.call(this),!t)return this;t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp),t.instrumenter&&(this.instrumenter=t.instrumenter)}startChild(t){const e=new Ur({...t,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e),e.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&e.transaction){const n=`[Tracing] Starting '${t&&t.op||"< unknown op >"}' span on transaction '${e.transaction.name||"< unknown name >"}' (${e.transaction.spanId}).`;e.transaction.metadata.spanMetadata[e.spanId]={logMessage:n},Ue.log(n)}return e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setStatus(t){return this.status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t)),this.setData("http.response.status_code",t);const e=function(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(t);return"unknown_error"!==e&&this.setStatus(e),this}isSuccess(){return"ok"===this.status}finish(t){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:t}=this.transaction.metadata.spanMetadata[this.spanId];t&&Ue.log(t.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof t?t:Zn()}toTraceparent(){return rr(this.traceId,this.spanId,this.sampled)}toContext(){return Ke({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(t){return this.data=t.data||{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=t.spanId||this.spanId,this.startTimestamp=t.startTimestamp||this.startTimestamp,this.status=t.status,this.tags=t.tags||{},this.traceId=t.traceId||this.traceId,this}getTraceContext(){return Ke({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return Ke({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}function Pr(t,e,n){const r=e.getOptions(),{publicKey:i}=e.getDsn()||{},{segment:s}=n&&n.getUser()||{},a=Ke({environment:r.environment||mr,release:r.release,user_segment:s,public_key:i,trace_id:t});return e.emit&&e.emit("createDsc",a),a}class Br extends Ur{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(t,e){super(t),Br.prototype.__init.call(this),Br.prototype.__init2.call(this),Br.prototype.__init3.call(this),this._hub=e||xr(),this._name=t.name||"",this.metadata={source:"custom",...t.metadata,spanMetadata:{}},this._trimEnd=t.trimEnd,this.transaction=this;const n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}setName(t,e="custom"){this._name=t,this.metadata.source=e}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Ar(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e,n=""){this._measurements[t]={value:e,unit:n}}setMetadata(t){this.metadata={...this.metadata,...t}}finish(t){if(void 0!==this.endTimestamp)return;this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(t);const e=this._hub.getClient();if(e&&e.emit&&e.emit("finishTransaction",this),!0!==this.sampled)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(e&&e.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter(t=>t!==this&&t.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((t,e)=>t.endTimestamp&&e.endTimestamp?t.endTimestamp>e.endTimestamp?t:e:t).endTimestamp);const r=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...r,dynamicSamplingContext:this.getDynamicSamplingContext()},...r.source&&{transaction_info:{source:r.source}}};return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(i)}toContext(){return Ke({...super.toContext(),name:this.name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this.name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const t=this._hub||xr(),e=t.getClient();if(!e)return{};const n=t.getScope(),r=Pr(this.traceId,e,n),i=this.metadata.sampleRate;void 0!==i&&(r.sample_rate=`${i}`);const s=this.metadata.source;return s&&"url"!==s&&(r.transaction=this.name),void 0!==this.sampled&&(r.sampled=String(this.sampled)),r}setHub(t){this._hub=t}}const Mr={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Lr=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class zr extends Ar{constructor(t,e,n,r){super(r),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=n}add(t){t.spanId!==this.transactionSpanId&&(t.finish=e=>{t.endTimestamp="number"==typeof e?e:Zn(),this._popActivity(t.spanId)},void 0===t.endTimestamp&&this._pushActivity(t.spanId)),super.add(t)}}class Hr extends Br{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=Lr[4]}constructor(t,e,n=Mr.idleTimeout,r=Mr.finalTimeout,i=Mr.heartbeatInterval,s=!1){super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=s,Hr.prototype.__init.call(this),Hr.prototype.__init2.call(this),Hr.prototype.__init3.call(this),Hr.prototype.__init4.call(this),Hr.prototype.__init5.call(this),Hr.prototype.__init6.call(this),s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),e.configureScope(t=>t.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Lr[3],this.finish())},this._finalTimeout)}finish(t=Zn()){if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setTag("finishReason",this._finishReason),this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op);for(const e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(e=>{if(e.spanId===this.spanId)return!0;e.endTimestamp||(e.endTimestamp=t,e.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));const n=e.startTimestamp<t;return n||("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(e,void 0,2)),n}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Tracing] flushing IdleTransaction")}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Tracing] No active IdleTransaction");if(this._onScope){const t=this._idleHub.getScope();t.getTransaction()===this&&t.setSpan(void 0)}return super.finish(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){this.spanRecorder||(this.spanRecorder=new zr(t=>{this._finished||this._pushActivity(t)},t=>{this._finished||this._popActivity(t)},this.spanId,t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("Starting heartbeat"),this._pingHeartbeat()),this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:e}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===e,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Lr[5],this.finish(t)))}setFinishReason(t){this._finishReason=t}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=Lr[1],this.finish(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`[Tracing] popActivity ${t}`),delete this.activities[t],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const t=Zn();this._idleTimeoutCanceledPermanently?(this._finishReason=Lr[5],this.finish(t)):this._restartIdleTimeout(t+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Lr[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function Gr(){const t=this.getScope().getSpan();return t?{"sentry-trace":t.toTraceparent()}:{}}function Yr(t,e,n){if(!Dr(e))return t.sampled=!1,t;if(void 0!==t.sampled)return t.setMetadata({sampleRate:Number(t.sampled)}),t;let r;return"function"==typeof e.tracesSampler?(r=e.tracesSampler(n),t.setMetadata({sampleRate:Number(r)})):void 0!==n.parentSampled?r=n.parentSampled:void 0!==e.tracesSampleRate?(r=e.tracesSampleRate,t.setMetadata({sampleRate:Number(r)})):(r=1,t.setMetadata({sampleRate:r})),(ge(i=r)||"number"!=typeof i&&"boolean"!=typeof i?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),0):!(i<0||i>1)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${i}.`),0))?r?(t.sampled=Math.random()<r,t.sampled?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),t)):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t);var i}function jr(t,e){const n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||"sentry",s=t.instrumenter||"sentry";i!==s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${i}\` instrumenter.\nThe transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),t.sampled=!1);let a=new Br(t,this);return a=Yr(a,r,{parentSampled:t.parentSampled,transactionContext:t,...e}),a.sampled&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function Fr(t,e,n,r,i,s,a){const o=t.getClient(),c=o&&o.getOptions()||{};let l=new Hr(e,t,n,r,a,i);return l=Yr(l,c,{parentSampled:e.parentSampled,transactionContext:e,...s}),l.sampled&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),o&&o.emit&&o.emit("startTransaction",l),l}function $r(){const t=kr();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=jr),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=Gr),Nr||(Nr=!0,dn("error",Or),dn("unhandledrejection",Or)))}function Vr(t,e){return xr().captureException(t,{captureContext:e})}function qr(t){xr().withScope(t)}function Zr(t){return`${t.protocol?`${t.protocol}:`:""}//${t.host}${t.port?`:${t.port}`:""}${t.path?`/${t.path}`:""}/api/`}const Wr=[];function Kr(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;e.forEach(t=>{t.isDefaultInstance=!0}),r=Array.isArray(n)?[...e,...n]:"function"==typeof n?Rn(n(e)):e;const i=function(t){const e={};return t.forEach(t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)}),Object.keys(e).map(t=>e[t])}(r),s=function(t,e){for(let e=0;e<t.length;e++)if(1==("Debug"===t[e].name))return e;return-1}(i);if(-1!==s){const[t]=i.splice(s,1);i.push(t)}return i}function Jr(t,e){e[t.name]=t,-1===Wr.indexOf(t.name)&&(t.setupOnce(vr,xr),Wr.push(t.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`Integration installed: ${t.name}`))}function Xr(t,e,n,r){const{normalizeDepth:i=3,normalizeMaxBreadth:s=1e3}=t,a={...e,event_id:e.event_id||n.event_id||En(),timestamp:e.timestamp||qn()},o=n.integrations||t.integrations.map(t=>t.name);!function(t,e){const{environment:n,release:r,dist:i,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:mr),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==i&&(t.dist=i),t.message&&(t.message=He(t.message,s));const a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=He(a.value,s));const o=t.request;o&&o.url&&(o.url=He(o.url,s))}(a,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(a,o),void 0===e.type&&function(t,e){const n=ke._sentryDebugIds;if(!n)return;let r;const i=Qr.get(e);i?r=i:(r=new Map,Qr.set(e,r));const s=Object.keys(n).reduce((t,i)=>{let s;const a=r.get(i);a?s=a:(s=e(i),r.set(i,s));for(let e=s.length-1;e>=0;e--){const r=s[e];if(r.filename){t[r.filename]=n[i];break}}return t},{});try{t.exception.values.forEach(t=>{t.stacktrace.frames.forEach(t=>{t.filename&&(t.debug_id=s[t.filename])})})}catch(t){}}(a,t.stackParser);let c=r;n.captureContext&&(c=gr.clone(c).update(n.captureContext));let l=Bn(a);if(c){if(c.getAttachments){const t=[...n.attachments||[],...c.getAttachments()];t.length&&(n.attachments=t)}l=c.applyToEvent(a,n)}return l.then(t=>(t&&function(t){const e={};try{t.exception.values.forEach(t=>{t.stacktrace.frames.forEach(t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)})})}catch(t){}if(0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach(t=>{n.push({type:"sourcemap",code_file:t,debug_id:e[t]})})}(t),"number"==typeof i&&i>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>({...t,...t.data&&{data:On(t.data,e,n)}}))},...t.user&&{user:On(t.user,e,n)},...t.contexts&&{contexts:On(t.contexts,e,n)},...t.extra&&{extra:On(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=On(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(t=>(t.data&&(t.data=On(t.data,e,n)),t))),r}(t,i,s):t))}const Qr=new WeakMap,ti="Not capturing exception because it's already been captured.";class ei{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(t){if(ei.prototype.__init.call(this),ei.prototype.__init2.call(this),ei.prototype.__init3.call(this),ei.prototype.__init4.call(this),ei.prototype.__init5.call(this),this._options=t,t.dsn?this._dsn=Le(t.dsn):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("No DSN provided, client will not do anything."),this._dsn){const e=function(t,e={}){const n="string"!=typeof e&&e._metadata?e._metadata.sdk:void 0;return("string"==typeof e?e:e.tunnel)||`${function(t){return`${Zr(t)}${t.projectId}/envelope/`}(t)}?${function(t,e){return n={sentry_key:t.publicKey,sentry_version:"7",...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`).join("&");var n}(t,n)}`}(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){if(Cn(t))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(ti));let r=e&&e.event_id;return this._process(this.eventFromException(t,e).then(t=>this._captureEvent(t,e,n)).then(t=>{r=t})),r}captureMessage(t,e,n,r){let i=n&&n.event_id;const s=pe(t)?this.eventFromMessage(String(t),e,n):this.eventFromException(t,n);return this._process(s.then(t=>this._captureEvent(t,n,r)).then(t=>{i=t})),i}captureEvent(t,e,n){if(e&&e.originalException&&Cn(e.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(ti));let r=e&&e.event_id;return this._process(this._captureEvent(t,e,n).then(t=>{r=t})),r}captureSession(t){this._isEnabled()?"string"!=typeof t.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),_r(t,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;return e?this._isClientDoneProcessing(t).then(n=>e.flush(t).then(t=>n&&t)):Bn(!0)}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,t))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(t){const e={};return t.forEach(t=>{t&&Jr(t,e)}),e}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){Jr(t,this._integrations)}sendEvent(t,e={}){if(this._dsn){let n=function(t,e,n,r){const i=pr(n),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const a=hr(t,i,r,e);return delete t.sdkProcessingMetadata,ir(a,[[{type:s},t]])}(t,this._dsn,this._options._metadata,this._options.tunnel);for(const t of e.attachments||[])n=sr(n,lr(t,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then(e=>this.emit("afterSendEvent",t,e),null)}}sendSession(t){if(this._dsn){const e=function(t,e,n,r){const i=pr(n);return ir({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:Be(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){const n=`${t}:${e}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}on(t,e){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(e)}emit(t,...e){this._hooks[t]&&this._hooks[t].forEach(t=>t(...e))}_updateSessionFromEvent(t,e){let n=!1,r=!1;const i=e.exception&&e.exception.values;if(i){r=!0;for(const t of i){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const s="ok"===t.status;(s&&0===t.errors||s&&n)&&(_r(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ln(e=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(t,e,n){const r=this.getOptions(),i=Object.keys(this._integrations);return!e.integrations&&i.length>0&&(e.integrations=i),Xr(r,t,e,n).then(t=>{if(null===t)return t;const{propagationContext:e}=t.sdkProcessingMetadata||{};if((!t.contexts||!t.contexts.trace)&&e){const{traceId:r,spanId:i,parentSpanId:s,dsc:a}=e;t.contexts={trace:{trace_id:r,span_id:i,parent_span_id:s},...t.contexts};const o=a||Pr(r,this,n);t.sdkProcessingMetadata={dynamicSamplingContext:o,...t.sdkProcessingMetadata}}return t})}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then(t=>t.event_id,t=>{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e=t;"log"===e.logLevel?Ue.log(e.message):Ue.warn(e)}})}_processEvent(t,e,n){const r=this.getOptions(),{sampleRate:i}=r;if(!this._isEnabled())return Mn(new ze("SDK not enabled, will not capture event.","log"));const s=ri(t),a=ni(t),o=t.type||"error",c=`before send for type \`${o}\``;if(a&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),Mn(new ze(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l="replay_event"===o?"replay":o;return this._prepareEvent(t,e,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,t),new ze("An event processor returned `null`, will not send event.","log");if(e.data&&!0===e.data.__sentry__)return n;const i=function(t,e,n){const{beforeSend:r,beforeSendTransaction:i}=t;return ni(e)&&r?r(e,n):ri(e)&&i?i(e,n):e}(r,n,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(_e(t))return t.then(t=>{if(!he(t)&&null!==t)throw new ze(n);return t},t=>{throw new ze(`${e} rejected with ${t}`)});if(!he(t)&&null!==t)throw new ze(n);return t}(i,c)}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",l,t),new ze(`${c} returned \`null\`, will not send event.`,"log");const i=n&&n.getSession();!s&&i&&this._updateSessionFromEvent(i,r);const a=r.transaction_info;if(s&&a&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...a,source:t}}return this.sendEvent(r,e),r}).then(null,t=>{if(t instanceof ze)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new ze(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}_process(t){this._numProcessing++,t.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_sendEnvelope(t){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",t),this._transport.send(t).then(null,t=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("Error while sending event:",t)});("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(e=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t[e]}})}}function ni(t){return void 0===t.type}function ri(t){return"transaction"===t.type}const ii=30;function si(t,e,n=function(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return Mn(new ze("Not adding Promise because buffer limit was reached."));const i=r();return-1===e.indexOf(i)&&e.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(t){return new Ln((n,r)=>{let i=e.length;if(!i)return n(!0);const s=setTimeout(()=>{t&&t>0&&n(!1)},t);e.forEach(t=>{Bn(t).then(()=>{--i||(clearTimeout(s),n(!0))},r)})})}}}(t.bufferSize||ii)){let r={};function i(i){const s=[];if(ar(i,(e,n)=>{const i=dr(n);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(r,i)){const r=ai(e,n);t.recordDroppedEvent("ratelimit_backoff",i,r)}else s.push(e)}),0===s.length)return Bn();const a=ir(i[0],s),o=e=>{ar(a,(n,r)=>{const i=ai(n,r);t.recordDroppedEvent(e,dr(r),i)})};return n.add(()=>e({body:cr(a,t.textEncoder)}).then(t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=function(t,{statusCode:e,headers:n},r=Date.now()){const i={...t},s=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(s)for(const t of s.trim().split(",")){const[e,n]=t.split(":",2),s=parseInt(e,10),a=1e3*(isNaN(s)?60:s);if(n)for(const t of n.split(";"))i[t]=r+a;else i.all=r+a}else a?i.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?fr:r-e}(a,r):429===e&&(i.all=r+6e4);return i}(r,t),t),t=>{throw o("network_error"),t})).then(t=>t,t=>{if(t instanceof ze)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("Skipped sending event because buffer is full."),o("queue_overflow"),Bn();throw t})}return i.__sentry__baseTransport__=!0,{send:i,flush:t=>n.drain(t)}}function ai(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}const oi="7.58.0";let ci;class li{constructor(){li.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=li.id}setupOnce(){ci=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=Ve(this)||this;return ci.apply(e,t)}}catch(t){}}}li.__initStatic();const ui=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],di=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/];class pi{static __initStatic(){this.id="InboundFilters"}__init(){this.name=pi.id}constructor(t={}){this._options=t,pi.prototype.__init.call(this)}setupOnce(t,e){const n=t=>{const n=e();if(n){const e=n.getIntegration(pi);if(e){const r=n.getClient(),i=r?r.getOptions():{},s=function(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:ui],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:di],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(e._options,i);return function(t,e){return e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${kn(t)}`),!0):function(t,e){return!(t.type||!e||!e.length)&&function(t){if(t.message)return[t.message];if(t.exception){const{values:e}=t.exception;try{const{type:t="",value:n=""}=e&&e[e.length-1]||{};return[`${n}`,`${t}: ${n}`]}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error(`Cannot extract message for event ${kn(t)}`),[]}}return[]}(t).some(t=>Ye(t,e))}(t,e.ignoreErrors)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${kn(t)}`),!0):function(t,e){if("transaction"!==t.type||!e||!e.length)return!1;const n=t.transaction;return!!n&&Ye(n,e)}(t,e.ignoreTransactions)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${kn(t)}`),!0):function(t,e){if(!e||!e.length)return!1;const n=hi(t);return!!n&&Ye(n,e)}(t,e.denyUrls)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${kn(t)}.\nUrl: ${hi(t)}`),!0):!function(t,e){if(!e||!e.length)return!0;const n=hi(t);return!n||Ye(n,e)}(t,e.allowUrls)&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${kn(t)}.\nUrl: ${hi(t)}`),!0)}(t,s)?null:t}}return t};n.id=this.name,t(n)}}function hi(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(e):null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error(`Cannot extract url for event ${kn(t)}`),null}}pi.__initStatic();const fi=ke;let mi=0;function _i(){return mi>0}function gi(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(Ve(t))return t}catch(e){return t}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map(t=>gi(t,e));return t.apply(this,i)}catch(t){throw mi++,setTimeout(()=>{mi--}),qr(n=>{n.addEventProcessor(t=>(e.mechanism&&(Tn(t,void 0,void 0),xn(t,e.mechanism)),t.extra={...t.extra,arguments:r},t)),Vr(t)}),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])}catch(t){}$e(r,t),Fe(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>t.name})}catch(t){}return r}function yi(t,e){const n=bi(t,e),r={type:e&&e.name,value:Ei(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function vi(t,e){return{exception:{values:[yi(t,e)]}}}function bi(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(Si.test(t.message))return 1}return 0}(e);try{return t(n,r)}catch(t){}return[]}const Si=/Minified React error #\d+;/i;function Ei(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function wi(t,e,n,r,i){let s;if(le(e)&&e.error)return vi(t,e.error);if(ue(e)||ce(e,"DOMException")){const i=e;if("stack"in e)s=vi(t,e);else{const e=i.name||(ue(i)?"DOMError":"DOMException"),a=i.message?`${e}: ${i.message}`:e;s=ki(t,a,n,r),Tn(s,a)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return oe(e)?vi(t,e):he(e)||fe(e)?(s=function(t,e,n,r){const i=xr().getClient(),s=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:fe(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Ti(e,{isUnhandledRejection:r})}]},extra:{__serialized__:An(e,s)}};if(n){const e=bi(t,n);e.length&&(a.exception.values[0].stacktrace={frames:e})}return a}(t,e,n,i),xn(s,{synthetic:!0}),s):(s=ki(t,e,n,r),Tn(s,`${e}`,void 0),xn(s,{synthetic:!0}),s)}function ki(t,e,n,r){const i={message:e};if(r&&n){const r=bi(t,n);r.length&&(i.exception={values:[{value:e,stacktrace:{frames:r}}]})}return i}function Ti(t,{isUnhandledRejection:e}){const n=function(t,e=40){const n=Object.keys(qe(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return He(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:He(r,e)}return""}(t),r=e?"promise rejection":"exception";return le(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:fe(t)?`Event \`${function(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(t){}}(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}const xi="Breadcrumbs";class Ci{static __initStatic(){this.id=xi}__init(){this.name=Ci.id}constructor(t){Ci.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){var t;this.options.console&&dn("console",Ri),this.options.dom&&dn("dom",(t=this.options.dom,function(e){let n,r="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>1024&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=1024),"string"==typeof r&&(r=[r]);try{const t=e.event;n=function(t){return!!t&&!!t.target}(t)?De(t.target,{keyAttrs:r,maxStringLength:i}):De(t,{keyAttrs:r,maxStringLength:i})}catch(t){n="<unknown>"}0!==n.length&&xr().addBreadcrumb({category:`ui.${e.name}`,message:n},{event:e.event,name:e.name,global:e.global})})),this.options.xhr&&dn("xhr",Di),this.options.fetch&&dn("fetch",Ii),this.options.history&&dn("history",Ni)}addSentryBreadcrumb(t){this.options.sentry&&xr().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:kn(t)},{event:t})}}function Ri(t){for(let e=0;e<t.args.length;e++)if("ref=Ref<"===t.args[e]){t.args[e+1]="viewRef";break}const e={category:"console",data:{arguments:t.args,logger:"console"},level:(n=t.level,"warn"===n?"warning":Yn.includes(n)?n:"log"),message:Ge(t.args," ")};var n;if("assert"===t.level){if(!1!==t.args[0])return;e.message=`Assertion failed: ${Ge(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1)}xr().addBreadcrumb(e,{input:t.args,level:t.level})}function Di(t){const{startTimestamp:e,endTimestamp:n}=t,r=t.xhr[cn];if(!e||!n||!r)return;const{method:i,url:s,status_code:a,body:o}=r,c={method:i,url:s,status_code:a},l={xhr:t.xhr,input:o,startTimestamp:e,endTimestamp:n};xr().addBreadcrumb({category:"xhr",data:c,type:"http"},l)}function Ii(t){const{startTimestamp:e,endTimestamp:n}=t;if(n&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const r=t.fetchData,i={data:t.error,input:t.args,startTimestamp:e,endTimestamp:n};xr().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},i)}else{const r={...t.fetchData,status_code:t.response&&t.response.status},i={input:t.args,response:t.response,startTimestamp:e,endTimestamp:n};xr().addBreadcrumb({category:"fetch",data:r,type:"http"},i)}}function Ni(t){let e=t.from,n=t.to;const r=zn(fi.location.href);let i=zn(e);const s=zn(n);i.path||(i=r),r.protocol===s.protocol&&r.host===s.host&&(n=s.relative),r.protocol===i.protocol&&r.host===i.host&&(e=i.relative),xr().addBreadcrumb({category:"navigation",data:{from:e,to:n}})}Ci.__initStatic();class Oi extends ei{constructor(t){const e=fi.SENTRY_SDK_SOURCE||"npm";t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${e}:@sentry/browser`,version:oi}],version:oi},super(t),t.sendClientReports&&fi.document&&fi.document.addEventListener("visibilitychange",()=>{"hidden"===fi.document.visibilityState&&this._flushOutcomes()})}eventFromException(t,e){return function(t,e,n,r){const i=wi(t,e,n&&n.syntheticException||void 0,r);return xn(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Bn(i)}(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return function(t,e,n="info",r,i){const s=ki(t,e,r&&r.syntheticException||void 0,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),Bn(s)}(this._options.stackParser,t,e,n,this._options.attachStacktrace)}sendEvent(t,e){const n=this.getIntegrationById(xi);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(t),super.sendEvent(t,e)}captureUserFeedback(t){if(!this._isEnabled())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("SDK not enabled, will not capture user feedback."));const e=function(t,{metadata:e,tunnel:n,dsn:r}){const i={event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:Be(r)}},s=function(t){return[{type:"user_report"},t]}(t);return ir(i,[s])}(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){const t=this._clearOutcomes();if(0===t.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("Sending outcomes:",t);const e=(n=t,ir((r=this._options.tunnel&&Be(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:qn(),discarded_events:n}]]));var n,r;this._sendEnvelope(e)}}let Ai;function Ui(t,e=function(){if(Ai)return Ai;if(sn(fi.fetch))return Ai=fi.fetch.bind(fi);const t=fi.document;let e=fi.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return Ai=e.bind(fi)}()){let n=0,r=0;return si(t,function(i){const s=i.body.length;n+=s,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,a).then(t=>(n-=s,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}}))}catch(t){return Ai=void 0,n-=s,r--,Mn(t)}})}function Pi(t){return si(t,function(e){return new Ln((n,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(const e in t.headers)Object.prototype.hasOwnProperty.call(t.headers,e)&&i.setRequestHeader(e,t.headers[e]);i.send(e.body)})})}const Bi="?";function Mi(t,e,n,r){const i={filename:t,function:e,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const Li=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zi=/\((\S*)(?::(\d+))(?::(\d+))\)/,Hi=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Gi=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Yi=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ji=Qe([30,t=>{const e=Li.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=zi.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=Fi(e[1]||Bi,e[2]);return Mi(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,t=>{const e=Hi.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=Gi.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||Bi;return[n,t]=Fi(n,t),Mi(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,t=>{const e=Yi.exec(t);return e?Mi(e[2],e[1]||Bi,+e[3],e[4]?+e[4]:void 0):void 0}]),Fi=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:Bi,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};class $i{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=$i.id}__init2(){this._installFunc={onerror:Vi,onunhandledrejection:qi}}constructor(t){$i.prototype.__init.call(this),$i.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){Error.stackTraceLimit=50;const t=this._options;for(const e in t){const n=this._installFunc[e];n&&t[e]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`Global Handler attached: ${e}`),n(),this._installFunc[e]=void 0)}}}function Vi(){dn("error",t=>{const[e,n,r]=Ki();if(!e.getIntegration($i))return;const{msg:i,url:s,line:a,column:o,error:c}=t;if(_i()||c&&c.__sentry_own_request__)return;const l=void 0===c&&de(i)?function(t,e,n,r){let i=le(t)?t.message:t,s="Error";const a=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);return a&&(s=a[1],i=a[2]),Zi({exception:{values:[{type:s,value:i}]}},e,n,r)}(i,s,a,o):Zi(wi(n,c||i,void 0,r,!1),s,a,o);l.level="error",Wi(e,c,l,"onerror")})}function qi(){dn("unhandledrejection",t=>{const[e,n,r]=Ki();if(!e.getIntegration($i))return;let i=t;try{"reason"in t?i=t.reason:"detail"in t&&"reason"in t.detail&&(i=t.detail.reason)}catch(t){}if(_i()||i&&i.__sentry_own_request__)return!0;const s=pe(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:wi(n,i,void 0,r,!0);s.level="error",Wi(e,i,s,"onunhandledrejection")})}function Zi(t,e,n,r){const i=t.exception=t.exception||{},s=i.values=i.values||[],a=s[0]=s[0]||{},o=a.stacktrace=a.stacktrace||{},c=o.frames=o.frames||[],l=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=de(e)&&e.length>0?e:function(){try{return Ce.document.location.href}catch(t){return""}}();return 0===c.length&&c.push({colno:l,filename:d,function:"?",in_app:!0,lineno:u}),t}function Wi(t,e,n,r){xn(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function Ki(){const t=xr(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}$i.__initStatic();const Ji=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Xi{static __initStatic(){this.id="TryCatch"}__init(){this.name=Xi.id}constructor(t){Xi.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){this._options.setTimeout&&je(fi,"setTimeout",Qi),this._options.setInterval&&je(fi,"setInterval",Qi),this._options.requestAnimationFrame&&je(fi,"requestAnimationFrame",ts),this._options.XMLHttpRequest&&"XMLHttpRequest"in fi&&je(XMLHttpRequest.prototype,"send",es);const t=this._options.eventTarget;t&&(Array.isArray(t)?t:Ji).forEach(ns)}}function Qi(t){return function(...e){return e[0]=gi(e[0],{mechanism:{data:{function:en(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function ts(t){return function(e){return t.apply(this,[gi(e,{mechanism:{data:{function:"requestAnimationFrame",handler:en(t)},handled:!0,type:"instrument"}})])}}function es(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&je(n,t,function(e){const n={mechanism:{data:{function:t,handler:en(e)},handled:!0,type:"instrument"}},r=Ve(e);return r&&(n.mechanism.data.handler=en(r)),gi(e,n)})}),t.apply(this,e)}}function ns(t){const e=fi[t]&&fi[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(je(e,"addEventListener",function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=gi(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:en(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.apply(this,[n,gi(r,{mechanism:{data:{function:"addEventListener",handler:en(r),target:t},handled:!0,type:"instrument"}}),i])}}),je(e,"removeEventListener",function(t){return function(e,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,i,r)}}))}Xi.__initStatic();class rs{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=rs.id}constructor(t={}){rs.prototype.__init.call(this),this._key=t.key||"cause",this._limit=t.limit||5}setupOnce(t,e){t((t,n)=>{const r=e(),i=r.getClient(),s=r.getIntegration(rs);return i&&s?(ve(yi,i.getOptions().stackParser,s._key,s._limit,t,n),t):t})}}rs.__initStatic();class is{constructor(){is.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=is.id}setupOnce(){vr(t=>{if(xr().getIntegration(is)){if(!fi.navigator&&!fi.location&&!fi.document)return t;const e=t.request&&t.request.url||fi.location&&fi.location.href,{referrer:n}=fi.document||{},{userAgent:r}=fi.navigator||{},i={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},s={...t.request,...e&&{url:e},headers:i};return{...t,request:s}}return t})}}is.__initStatic();class ss{constructor(){ss.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=ss.id}setupOnce(t,e){const n=t=>{if(t.type)return t;const n=e().getIntegration(ss);if(n){try{if(function(t,e){return!(!e||!function(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!os(t,e)||!as(t,e))}(t,e)&&!function(t,e){const n=cs(e),r=cs(t);return!!(n&&r&&n.type===r.type&&n.value===r.value&&os(t,e)&&as(t,e))}(t,e))}(t,n._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){return n._previousEvent=t}return n._previousEvent=t}return t};n.id=this.name,t(n)}}function as(t,e){let n=ls(t),r=ls(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let t=0;t<r.length;t++){const e=r[t],i=n[t];if(e.filename!==i.filename||e.lineno!==i.lineno||e.colno!==i.colno||e.function!==i.function)return!1}return!0}function os(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(t){return!1}}function cs(t){return t.exception&&t.exception.values&&t.exception.values[0]}function ls(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(t){return}}ss.__initStatic();const us=[new pi,new li,new Xi,new Ci,new $i,new rs,new ss,new is];function ds(t={},e=xr()){if(!fi.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("Global document not defined in showReportDialog call"));const{client:n,scope:r}=e.getStackTop(),i=t.dsn||n&&n.getDsn();if(!i)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("DSN not configured for showReportDialog call"));r&&(t.user={...r.getUser(),...t.user}),t.eventId||(t.eventId=e.lastEventId());const s=fi.document.createElement("script");s.async=!0,s.crossOrigin="anonymous",s.src=function(t,e){const n=Le(t);if(!n)return"";const r=`${Zr(n)}embed/error-page/`;let i=`dsn=${Be(n)}`;for(const t in e)if("dsn"!==t)if("user"===t){const t=e.user;if(!t)continue;t.name&&(i+=`&name=${encodeURIComponent(t.name)}`),t.email&&(i+=`&email=${encodeURIComponent(t.email)}`)}else i+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`;return`${r}?${i}`}(i,t),t.onLoad&&(s.onload=t.onLoad);const a=fi.document.head||fi.document.body;a?a.appendChild(s):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("Not injecting report dialog. No injection point found in HTML")}function ps(t){t.startSession({ignoreDuration:!0}),t.captureSession()}const hs=ke,fs="sentryReplaySession",ms="Unable to send Replay",_s=15e4,gs=5e3,ys=2e7;var vs;function bs(t){const e=null==t?void 0:t.host;return Boolean(e&&e.shadowRoot&&e.shadowRoot===t)}function Ss({maskInputOptions:t,tagName:e,type:n}){"option"===e.toLowerCase()&&(e="select");const r="string"==typeof n?n.toLowerCase():void 0;return t[e.toLowerCase()]||r&&t[r]||"password"===r||"input"===e&&!n&&t.text}function Es({input:t,maskInputSelector:e,unmaskInputSelector:n,maskInputOptions:r,tagName:i,type:s,value:a,maskInputFn:o}){let c=a||"";return n&&t.matches(n)||(t.hasAttribute("data-rr-is-password")&&(s="password"),(Ss({maskInputOptions:r,tagName:i,type:s})||e&&t.matches(e))&&(c=o?o(c):"*".repeat(c.length))),c}!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(vs||(vs={}));const ws="__rrweb_original__";function ks(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?e.toLowerCase():null}function Ts(t,e,n){return"string"==typeof n&&n.toLowerCase(),"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}let xs=1;const Cs=new RegExp("[^a-z0-9-_:]"),Rs=-2;function Ds(t){return t?t.replace(/[\S]/g,"*"):""}function Is(t){try{const e=t.rules||t.cssRules;return e?Array.from(e).map(Ns).join(""):null}catch(t){return null}}function Ns(t){let e=t.cssText;if(function(t){return"styleSheet"in t}(t))try{e=Is(t.styleSheet)||e}catch(t){}return Os(e)}function Os(t){return t.indexOf(":")>-1?t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2"):t}let As,Us;const Ps=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Bs=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Ms=/^(data:)([^,]*),(.*)/i;function Ls(t,e){return(t||"").replace(Ps,(t,n,r,i,s,a)=>{const o=r||s||a,c=n||i||"";if(!o)return t;if(!Bs.test(o))return`url(${c}${o}${c})`;if(Ms.test(o))return`url(${c}${o}${c})`;if("/"===o[0])return`url(${c}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+o}${c})`;const l=e.split("/"),u=o.split("/");l.pop();for(const t of u)"."!==t&&(".."===t?l.pop():l.push(t));return`url(${c}${l.join("/")}${c})`})}const zs=/^[^ \t\n\r\u000c]+/,Hs=/^[, \t\n\r\u000c]+/;function Gs(t,e){if(!e||""===e.trim())return e;const n=t.createElement("a");return n.href=e,n.href}function Ys(){const t=document.createElement("a");return t.href="",t.href}function js(t,e,n,r,i,s,a,o){if(!i)return i;const c=r.toLowerCase(),l=n.toLowerCase();return"src"===c||"href"===c||"xlink:href"===c&&"#"!==i[0]?Gs(t,i):"background"!==c||"table"!==l&&"td"!==l&&"th"!==l?"srcset"===c?function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r,i=t.exec(e.substring(n));return i?(r=i[0],n+=r.length,r):""}let i=[];for(;r(Hs),!(n>=e.length);){let s=r(zs);if(","===s.slice(-1))s=Gs(t,s.substring(0,s.length-1)),i.push(s);else{let r="";s=Gs(t,s);let a=!1;for(;;){let t=e.charAt(n);if(""===t){i.push((s+r).trim());break}if(a)")"===t&&(a=!1);else{if(","===t){n+=1,i.push((s+r).trim());break}"("===t&&(a=!0)}r+=t,n+=1}}}return i.join(", ")}(t,i):"style"===c?Ls(i,Ys()):"object"===l&&"data"===c?Gs(t,i):s&&function(t,e,n,r){return(!r||!t.matches(r))&&(["placeholder","title","aria-label"].indexOf(e)>-1||"input"===n&&"value"===e&&t.hasAttribute("type")&&["submit","button"].indexOf(t.getAttribute("type").toLowerCase())>-1)}(e,c,l,a)?o?o(i):Ds(i):i:Gs(t,i)}function Fs(t,e,n,r,i){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return Fs(t.parentNode,e,n,r,i);if(r&&(t.matches(r)||t.closest(r)))return!1;if(i)return!0;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=0;n<t.classList.length;n++)if(e.test(t.classList[n]))return!0;return!(!n||!t.matches(n))||Fs(t.parentNode,e,n,r,i)}function $s(t){return null==t?"":t.toLowerCase()}function Vs(t,e){const{doc:n,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u=!1,inlineStylesheet:d=!0,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:m={},maskTextFn:_,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:E,onIframeLoad:w,iframeLoadTimeout:k=5e3,keepIframeSrcFn:T=(()=>!1)}=e;let{preserveWhiteSpace:x=!0}=e;const C=function(t,e){var n;const{doc:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:u,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:f={},maskTextFn:m,maskInputFn:_,dataURLOptions:g={},inlineImages:y,recordCanvas:v,keepIframeSrcFn:b}=e;let S;if(r.__sn){const t=r.__sn.id;S=1===t?void 0:t}switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:vs.Document,childNodes:[],compatMode:t.compatMode,rootId:S}:{type:vs.Document,childNodes:[],rootId:S};case t.DOCUMENT_TYPE_NODE:return{type:vs.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:S};case t.ELEMENT_NODE:const e=function(t,e,n,r){if(r&&t.matches(r))return!1;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=0;n<t.classList.length;n++)if(e.test(t.classList[n]))return!0;return!!n&&t.matches(n)}(t,i,s,a),k=function(t){if(t instanceof HTMLFormElement)return"form";const e=t.tagName.toLowerCase().trim();return Cs.test(e)?"div":e}(t);let T={};for(const{name:e,value:n}of Array.from(t.attributes))qs(k,e)||(T[e]=js(r,t,k,e,n,h,l,m));if("link"===k&&u){const e=Array.from(r.styleSheets).find(e=>e.href===t.href);let n=null;e&&(n=Is(e)),n&&(delete T.rel,delete T.href,T._cssText=Ls(n,e.href))}if("style"===k&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=Is(t.sheet);e&&(T._cssText=Ls(e,Ys()))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const e=t,n=ks(e),r=Ts(e,k.toUpperCase(),n),i=t.checked;"submit"!==n&&"button"!==n&&r&&(T.value=Es({input:e,type:n,tagName:k,value:r,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:f,maskInputFn:_})),i&&(T.checked=i)}if("option"===k&&(t.selected&&!f.select?T.selected=!0:delete T.selected),"canvas"===k&&v)if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n<t.width;n+=50)for(let r=0;r<t.height;r+=50){const i=e.getImageData;if(new Uint32Array((ws in i?i[ws]:i).call(e,n,r,Math.min(50,t.width-n),Math.min(50,t.height-r)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(T.rr_dataURL=t.toDataURL(g.type,g.quality));else if(!("__context"in t)){const e=t.toDataURL(g.type,g.quality),n=document.createElement("canvas");n.width=t.width,n.height=t.height,e!==n.toDataURL(g.type,g.quality)&&(T.rr_dataURL=e)}if("img"===k&&y){As||(As=r.createElement("canvas"),Us=As.getContext("2d"));const e=t,n=e.crossOrigin;e.crossOrigin="anonymous";const i=()=>{try{As.width=e.naturalWidth,As.height=e.naturalHeight,Us.drawImage(e,0,0),T.rr_dataURL=As.toDataURL(g.type,g.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}n?T.crossOrigin=n:delete T.crossOrigin};e.complete&&0!==e.naturalWidth?i():e.onload=i}if("audio"!==k&&"video"!==k||(T.rr_mediaState=t.paused?"paused":"played",T.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(T.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(T.rr_scrollTop=t.scrollTop),e){const{width:e,height:n}=t.getBoundingClientRect();T={class:T.class,rr_width:`${e}px`,rr_height:`${n}px`}}return"iframe"!==k||b(T.src)||(t.contentDocument||(T.rr_src=T.src),delete T.src),{type:vs.Element,tagName:k,attributes:T,childNodes:[],isSVG:(w=t,Boolean("svg"===w.tagName||w.ownerSVGElement)||void 0),needBlock:e,rootId:S};case t.TEXT_NODE:const x=t.parentNode&&t.parentNode.tagName;let C=t.textContent;const R="STYLE"===x||void 0,D="SCRIPT"===x||void 0;if(R&&C){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(C=(E=t.parentNode.sheet).cssRules?Array.from(E.cssRules).map(t=>t.cssText?Os(t.cssText):"").join(""):"")}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}C=Ls(C,Ys())}return D&&(C="SCRIPT_PLACEHOLDER"),"TEXTAREA"===x&&C?C="":"OPTION"===x&&C?C=Es({input:t.parentNode,type:null,tagName:x,value:C,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:f,maskInputFn:_}):!R&&!D&&Fs(t,o,c,l,h)&&C&&(C=m?m(C):Ds(C)),{type:vs.Text,textContent:C||"",isStyle:R,rootId:S};case t.CDATA_SECTION_NODE:return{type:vs.CDATA,textContent:"",rootId:S};case t.COMMENT_NODE:return{type:vs.Comment,textContent:t.textContent||"",rootId:S};default:return!1}var E,w}(t,{doc:n,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:m,maskTextFn:_,maskInputFn:g,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:T});if(!C)return console.warn(t,"not serialized"),null;let R;R="__sn"in t?t.__sn.id:!function(t,e){if(e.comment&&t.type===vs.Comment)return!0;if(t.type===vs.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&($s(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===$s(t.attributes.name)||"icon"===$s(t.attributes.rel)||"apple-touch-icon"===$s(t.attributes.rel)||"shortcut icon"===$s(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&$s(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&($s(t.attributes.property).match(/^(og|twitter|fb):/)||$s(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===$s(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===$s(t.attributes.name)||"googlebot"===$s(t.attributes.name)||"bingbot"===$s(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===$s(t.attributes.name)||"generator"===$s(t.attributes.name)||"framework"===$s(t.attributes.name)||"publisher"===$s(t.attributes.name)||"progid"===$s(t.attributes.name)||$s(t.attributes.property).match(/^article:/)||$s(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===$s(t.attributes.name)||"yandex-verification"===$s(t.attributes.name)||"csrf-token"===$s(t.attributes.name)||"p:domain_verify"===$s(t.attributes.name)||"verify-v1"===$s(t.attributes.name)||"verification"===$s(t.attributes.name)||"shopify-checkout-api-token"===$s(t.attributes.name)))return!0}}return!1}(C,y)&&(x||C.type!==vs.Text||C.isStyle||C.textContent.replace(/^\s+|\s+$/gm,"").length)?xs++:Rs;const D=Object.assign(C,{id:R});if(t.__sn=D,R===Rs)return null;r[R]=t,E&&E(t);let I=!u;if(D.type===vs.Element&&(I=I&&!D.needBlock,delete D.needBlock,t.shadowRoot&&(D.isShadowHost=!0)),(D.type===vs.Document||D.type===vs.Element)&&I){y.headWhitespace&&C.type===vs.Element&&"head"===C.tagName&&(x=!1);const e={doc:n,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:m,maskTextFn:_,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:x,onSerialize:E,onIframeLoad:w,iframeLoadTimeout:k,keepIframeSrcFn:T};for(const n of Array.from(t.childNodes)){const t=Vs(n,e);t&&D.childNodes.push(t)}if(function(t){return t.nodeType===t.ELEMENT_NODE}(t)&&t.shadowRoot)for(const n of Array.from(t.shadowRoot.childNodes)){const t=Vs(n,e);t&&(t.isShadow=!0,D.childNodes.push(t))}}return t.parentNode&&bs(t.parentNode)&&(D.isShadow=!0),D.type===vs.Element&&"iframe"===D.tagName&&function(t,e,n){const r=t.contentWindow;if(!r)return;let i,s=!1;try{i=r.document.readyState}catch(t){return}if("complete"!==i){const r=setTimeout(()=>{s||(e(),s=!0)},n);return void t.addEventListener("load",()=>{clearTimeout(r),s=!0,e()})}const a="about:blank";r.location.href===a&&t.src!==a&&""!==t.src?t.addEventListener("load",e):setTimeout(e,0)}(t,()=>{const e=t.contentDocument;if(e&&w){const n=Vs(e,{doc:e,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:m,maskTextFn:_,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:x,onSerialize:E,onIframeLoad:w,iframeLoadTimeout:k,keepIframeSrcFn:T});n&&w(t,n)}},k),D}function qs(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}var Zs,Ws,Ks,Js,Xs,Qs;function ta(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}!function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin"}(Zs||(Zs={})),function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration"}(Ws||(Ws={})),function(t){t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel"}(Ks||(Ks={})),function(t){t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2"}(Js||(Js={})),function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange"}(Xs||(Xs={})),function(t){t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back"}(Qs||(Qs={}));const ea="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let na={map:{},getId:()=>(console.error(ea),-1),getNode:()=>(console.error(ea),null),removeNodeFromMap(){console.error(ea)},has:()=>(console.error(ea),!1),reset(){console.error(ea)}};function ra(t,e,n={}){let r=null,i=0;return function(s){let a=Date.now();i||!1!==n.leading||(i=a);let o=e-(a-i),c=this,l=arguments;o<=0||o>e?(r&&(clearTimeout(r),r=null),i=a,t.apply(c,l)):r||!1===n.trailing||(r=setTimeout(()=>{i=!1===n.leading?0:Date.now(),r=null,t.apply(c,l)},o))}}function ia(t,e,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(t){setTimeout(()=>{n.set.call(this,t)},0),s&&s.set&&s.set.call(this,t)}}),()=>ia(t,e,s||{},!0)}function sa(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(t){return()=>{}}}function aa(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function oa(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ca(t,e,n,r){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){let i=!1;const s=r&&t.matches(r);return"string"==typeof e?i=void 0!==t.closest?!s&&null!==t.closest("."+e):!s&&t.classList.contains(e):!s&&t.classList.forEach(t=>{e.test(t)&&(i=!0)}),!i&&n&&(i=t.matches(n)),!s&&i||ca(t.parentNode,e,n,r)}return ca(t.parentNode,e,n,r)}function la(t){return"__sn"in t&&t.__sn.id===Rs}function ua(t,e){if(bs(t))return!1;const n=e.getId(t);return!e.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||ua(t.parentNode,e))}function da(t){return Boolean(t.changedTouches)}function pa(t){return"__sn"in t&&t.__sn.type===vs.Element&&"iframe"===t.__sn.tagName}function ha(t){return Boolean(null==t?void 0:t.shadowRoot)}function fa(t){return"__ln"in t}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(na=new Proxy(na,{get:(t,e,n)=>("map"===e&&console.error(ea),Reflect.get(t,e,n))}));class ma{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let n=0;n<t;n++)e=(null==e?void 0:e.next)||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&fa(t.previousSibling)){const n=t.previousSibling.__ln.next;e.next=n,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,n&&(n.previous=e)}else if(t.nextSibling&&fa(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;e.previous=n,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,n&&(n.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;this.length++}removeNode(t){const e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next&&(e.next.previous=e.previous)):(this.head=e.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const _a=(t,e)=>`${t}@${e}`;function ga(t){return"__sn"in t}class ya{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],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=[],e=new ma,n=t=>{let e=t,n=Rs;for(;n===Rs;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},r=r=>{var i,s,a,o,c;const l=r.getRootNode?null===(i=r.getRootNode())||void 0===i?void 0:i.host:null;let u=l;for(;null===(a=null===(s=null==u?void 0:u.getRootNode)||void 0===s?void 0:s.call(u))||void 0===a?void 0:a.host;)u=(null===(c=null===(o=null==u?void 0:u.getRootNode)||void 0===o?void 0:o.call(u))||void 0===c?void 0:c.host)||null;const d=!(this.doc.contains(r)||u&&this.doc.contains(u));if(!r.parentNode||d)return;const p=bs(r.parentNode)?this.mirror.getId(l):this.mirror.getId(r.parentNode),h=n(r);if(-1===p||-1===h)return e.addNode(r);let f=Vs(r,{doc:this.doc,map:this.mirror.map,blockClass:this.blockClass,blockSelector:this.blockSelector,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskAllText:this.maskAllText,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{pa(t)&&this.iframeManager.addIframe(t),ha(r)&&this.shadowDomManager.addShadowRoot(r.shadowRoot,document)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)}});f&&t.push({parentId:p,nextId:h,node:f})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)ba(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)||r(t);for(const t of this.addedSet)Sa(this.droppedSet,t)||ba(this.removes,t,this.mirror)?Sa(this.movedSet,t)?r(t):this.droppedSet.add(t):r(t);let i=null;for(;e.length;){let t=null;if(i){const e=this.mirror.getId(i.value.parentNode),r=n(i.value);-1!==e&&-1!==r&&(t=i)}if(!t)for(let r=e.length-1;r>=0;r--){const i=e.get(r);if(i){const e=this.mirror.getId(i.value.parentNode),r=n(i.value);if(-1!==e&&-1!==r){t=i;break}}}if(!t){for(;e.head;)e.removeNode(e.head.value);break}i=t.previous,e.removeNode(t.value),r(t.value)}const s={texts:this.texts.map(t=>({id:this.mirror.getId(t.node),value:t.value})).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>({id:this.mirror.getId(t.node),attributes:t.attributes})).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:t};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=t=>{if(!la(t.target))switch(t.type){case"characterData":{const e=t.target.textContent;ca(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||e===t.oldValue||this.texts.push({value:Fs(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const e=t.target;let n=e.getAttribute(t.attributeName);if("value"===t.attributeName&&(n=Es({input:e,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:e.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),ca(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||n===t.oldValue)return;let r=this.attributes.find(e=>e.node===t.target);if(r||(r={node:t.target,attributes:{}},this.attributes.push(r)),"type"===t.attributeName&&"INPUT"===e.tagName&&"password"===(t.oldValue||"").toLowerCase()&&e.setAttribute("data-rr-is-password","true"),"style"===t.attributeName){const n=this.doc.createElement("span");t.oldValue&&n.setAttribute("style",t.oldValue),null==r.attributes.style&&(r.attributes.style={});try{const t=r.attributes.style;for(const r of Array.from(e.style)){const i=e.style.getPropertyValue(r),s=e.style.getPropertyPriority(r);i===n.style.getPropertyValue(r)&&s===n.style.getPropertyPriority(r)||(t[r]=""===s?i:[i,s])}for(const r of Array.from(n.style))""===e.style.getPropertyValue(r)&&(t[r]=!1)}catch(t){console.warn("[rrweb] Error when parsing update to style attribute:",t)}}else{const e=t.target;r.attributes[t.attributeName]=js(this.doc,e,e.tagName,t.attributeName,n,this.maskAllText,this.unmaskTextSelector,this.maskTextFn)}break}case"childList":t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{const n=this.mirror.getId(e),r=bs(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ca(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||la(e)||(this.addedSet.has(e)?(va(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||ua(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[_a(n,r)]?va(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!!bs(t.target)||void 0})),this.mapRemoves.push(e))})}},this.genAdds=(t,e)=>{if(!e||!ca(e,this.blockClass,this.blockSelector,this.unblockSelector)){if(ga(t)){if(la(t))return;this.movedSet.add(t);let n=null;e&&ga(e)&&(n=e.__sn.id),n&&(this.movedMap[_a(t.__sn.id,n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ca(t,this.blockClass,this.blockSelector,this.unblockSelector)||t.childNodes.forEach(t=>this.genAdds(t))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskTextClass","maskTextSelector","unmaskTextSelector","maskInputSelector","unmaskInputSelector","inlineStylesheet","maskAllText","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].forEach(e=>{this[e]=t[e]})}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 va(t,e){t.delete(e),e.childNodes.forEach(e=>va(t,e))}function ba(t,e,n){const{parentNode:r}=e;if(!r)return!1;const i=n.getId(r);return!!t.some(t=>t.id===i)||ba(t,r,n)}function Sa(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||Sa(t,n))}const Ea=t=>(...e)=>{try{return t(...e)}catch(t){try{t.__rrweb__=!0}catch(t){}throw t}},wa=[];function ka(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function Ta(t,e){var n,r;const i=new ya;wa.push(i),i.init(t);let s=window.MutationObserver||window.__rrMutationObserver;const a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(s=window[a]);const o=new s(Ea(e=>{t.onMutation&&!1===t.onMutation(e)||i.processMutations(e)}));return o.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function xa({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){const o=ra(a=>{const o=ka(a);if(!o||ca(o,r,i,s))return;const c=n.getId(o);if(o===e){const n=e.scrollingElement||e.documentElement;Ea(t)({id:c,x:n.scrollLeft,y:n.scrollTop})}else Ea(t)({id:c,x:o.scrollLeft,y:o.scrollTop})},a.scroll||100);return ta("scroll",Ea(o),e)}function Ca(t,e){const n=Object.assign({},t);return e||delete n.userTriggered,n}const Ra=["INPUT","TEXTAREA","SELECT"],Da=new WeakMap;function Ia(t){return function(t,e){if(Oa("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Oa("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Oa("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Oa("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else{const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function Na(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:a,inputCb:o,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:d,fontCb:p}=t;t.mutationCb=(...t)=>{e.mutation&&e.mutation(...t),n(...t)},t.mousemoveCb=(...t)=>{e.mousemove&&e.mousemove(...t),r(...t)},t.mouseInteractionCb=(...t)=>{e.mouseInteraction&&e.mouseInteraction(...t),i(...t)},t.scrollCb=(...t)=>{e.scroll&&e.scroll(...t),s(...t)},t.viewportResizeCb=(...t)=>{e.viewportResize&&e.viewportResize(...t),a(...t)},t.inputCb=(...t)=>{e.input&&e.input(...t),o(...t)},t.mediaInteractionCb=(...t)=>{e.mediaInteaction&&e.mediaInteaction(...t),c(...t)},t.styleSheetRuleCb=(...t)=>{e.styleSheetRule&&e.styleSheetRule(...t),l(...t)},t.styleDeclarationCb=(...t)=>{e.styleDeclaration&&e.styleDeclaration(...t),u(...t)},t.canvasMutationCb=(...t)=>{e.canvasMutation&&e.canvasMutation(...t),d(...t)},t.fontCb=(...t)=>{e.font&&e.font(...t),p(...t)}}(t,e);const r=Ta(t,t.doc),i=function({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(!1===e.mousemove)return()=>{};const i="number"==typeof e.mousemove?e.mousemove:50;let s,a=[];const o=ra(e=>{const n=Date.now()-s;Ea(t)(a.map(t=>(t.timeOffset-=n,t)),e),a=[],s=null},"number"==typeof e.mousemoveCallback?e.mousemoveCallback:500),c=ra(t=>{const e=ka(t),{clientX:n,clientY:i}=da(t)?t.changedTouches[0]:t;s||(s=Date.now()),a.push({x:n,y:i,id:r.getId(e),timeOffset:Date.now()-s}),o("undefined"!=typeof DragEvent&&t instanceof DragEvent?Ws.Drag:t instanceof MouseEvent?Ws.MouseMove:Ws.TouchMove)},i,{trailing:!1}),l=[ta("mousemove",Ea(c),n),ta("touchmove",Ea(c),n),ta("drag",Ea(c),n)];return Ea(()=>{l.forEach(t=>t())})}(t),s=function({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){if(!1===a.mouseInteraction)return()=>{};const o=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,c=[];return Object.keys(Ks).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==o[t]).forEach(a=>{const o=a.toLowerCase(),l=Ea((e=>a=>{const o=ka(a);if(ca(o,r,i,s))return;const c=da(a)?a.changedTouches[0]:a;if(!c)return;const l=n.getId(o),{clientX:u,clientY:d}=c;Ea(t)({type:Ks[e],id:l,x:u,y:d})})(a));c.push(ta(o,l,e))}),Ea(()=>{c.forEach(t=>t())})}(t),a=xa(t),o=function({viewportResizeCb:t}){let e=-1,n=-1;const r=ra(()=>{const r=aa(),i=oa();e===r&&n===i||(Ea(t)({width:Number(i),height:Number(r)}),e=r,n=i)},200);return ta("resize",Ea(r),window)}(t),c=function({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:a,ignoreSelector:o,maskInputSelector:c,unmaskInputSelector:l,maskInputOptions:u,maskInputFn:d,sampling:p,userTriggeredOnInput:h}){function f(t){let n=ka(t);const p=n&&n.tagName,f=t.isTrusted;if("OPTION"===p&&(n=n.parentElement),!n||!p||Ra.indexOf(p)<0||ca(n,r,i,s))return;const _=n,g=ks(_);if(_.classList.contains(a)||o&&_.matches(o))return;let y=Ts(_,p,g),v=!1;"radio"!==g&&"checkbox"!==g||(v=n.checked),function({tagName:t,type:e,maskInputOptions:n,maskInputSelector:r}){return r||Ss({maskInputOptions:n,tagName:t,type:e})}({maskInputOptions:u,maskInputSelector:c,tagName:p,type:g})&&(y=Es({input:_,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:p,type:g,value:y,maskInputFn:d})),m(n,Ea(Ca)({text:y,isChecked:v,userTriggered:f},h));const b=n.name;"radio"===g&&b&&v&&e.querySelectorAll(`input[type="radio"][name="${b}"]`).forEach(t=>{if(t!==n){const e=Es({input:t,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:p,type:g,value:Ts(t,p,g),maskInputFn:d});m(t,Ea(Ca)({text:e,isChecked:!v,userTriggered:!1},h))}})}function m(e,r){const i=Da.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){Da.set(e,r);const i=n.getId(e);t(Object.assign(Object.assign({},r),{id:i}))}}const _=("last"===p.input?["change"]:["input","change"]).map(t=>ta(t,Ea(f),e)),g=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),y=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return g&&g.set&&_.push(...y.map(t=>ia(t[0],t[1],{set(){Ea(f)({target:this})}}))),Ea(()=>{_.forEach(t=>t())})}(t),l=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:i,sampling:s}){const a=a=>ra(Ea(s=>{const o=ka(s);if(!o||ca(o,e,n,r))return;const{currentTime:c,volume:l,muted:u}=o;t({type:a,id:i.getId(o),currentTime:c,volume:l,muted:u})}),s.media||500),o=[ta("play",a(0)),ta("pause",a(1)),ta("seeked",a(2)),ta("volumechange",a(3))];return Ea(()=>{o.forEach(t=>t())})}(t),u=function({styleSheetRuleCb:t,mirror:e},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:Ea((n,r,i)=>{const[s,a]=i,o=e.getId(r.ownerNode);return-1!==o&&t({id:o,adds:[{rule:s,index:a}]}),n.apply(r,i)})});const i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Ea((n,r,i)=>{const[s]=i,a=e.getId(r.ownerNode);return-1!==a&&t({id:a,removes:[{index:s}]}),n.apply(r,i)})});const s={};Aa("CSSGroupingRule")?s.CSSGroupingRule=n.CSSGroupingRule:(Aa("CSSMediaRule")&&(s.CSSMediaRule=n.CSSMediaRule),Aa("CSSConditionRule")&&(s.CSSConditionRule=n.CSSConditionRule),Aa("CSSSupportsRule")&&(s.CSSSupportsRule=n.CSSSupportsRule));const a={};return Object.entries(s).forEach(([n,r])=>{a[n]={insertRule:r.prototype.insertRule,deleteRule:r.prototype.deleteRule},r.prototype.insertRule=new Proxy(a[n].insertRule,{apply:Ea((n,r,i)=>{const[s,a]=i,o=e.getId(r.parentStyleSheet.ownerNode);return-1!==o&&t({id:o,adds:[{rule:s,index:[...Ia(r),a||0]}]}),n.apply(r,i)})}),r.prototype.deleteRule=new Proxy(a[n].deleteRule,{apply:Ea((n,r,i)=>{const[s]=i,a=e.getId(r.parentStyleSheet.ownerNode);return-1!==a&&t({id:a,removes:[{index:[...Ia(r),s]}]}),n.apply(r,i)})})}),Ea(()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=i,Object.entries(s).forEach(([t,e])=>{e.prototype.insertRule=a[t].insertRule,e.prototype.deleteRule=a[t].deleteRule})})}(t,{win:n}),d=function({styleDeclarationCb:t,mirror:e},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(r,{apply:Ea((n,r,i)=>{var s,a;const[o,c,l]=i,u=e.getId(null===(a=null===(s=r.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==u&&t({id:u,set:{property:o,value:c,priority:l},index:Ia(r.parentRule)}),n.apply(r,i)})});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:Ea((n,r,i)=>{var s,a;const[o]=i,c=e.getId(null===(a=null===(s=r.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==c&&t({id:c,remove:{property:o},index:Ia(r.parentRule)}),n.apply(r,i)})}),Ea(()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=i})}(t,{win:n}),p=t.collectFonts?function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(t,e,n){const r=new s(t,e,n);return i.set(r,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};const a=sa(e.fonts,"add",function(e){return function(n){return setTimeout(()=>{const e=i.get(n);e&&(t(e),i.delete(n))},0),e.apply(this,[n])}});return r.push(()=>{n.FontFace=s}),r.push(a),Ea(()=>{r.forEach(t=>t())})}(t):()=>{},h=[];for(const e of t.plugins)h.push(e.observer(e.callback,n,e.options));return Ea(()=>{wa.forEach(t=>t.reset()),r.disconnect(),i(),s(),a(),o(),c(),l();try{u(),d()}catch(t){}p(),h.forEach(t=>t())})}function Oa(t){return void 0!==window[t]}function Aa(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Ua{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){var n;this.mutationCb({adds:[{parentId:t.__sn.id,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,t)}}class Pa{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const e=this;this.restorePatches.push(sa(HTMLElement.prototype,"attachShadow",function(t){return function(){const n=t.apply(this,arguments);return this.shadowRoot&&e.addShadowRoot(this.shadowRoot,this.ownerDocument),n}}))}addShadowRoot(t,e){Ta(Object.assign(Object.assign({},this.bypassOptions),{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),xa(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}observeAttachShadow(t){if(t.contentWindow){const e=this;this.restorePatches.push(sa(t.contentWindow.HTMLElement.prototype,"attachShadow",function(n){return function(){const r=n.apply(this,arguments);return this.shadowRoot&&e.addShadowRoot(this.shadowRoot,t.contentDocument),r}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var Ba="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ma="undefined"==typeof Uint8Array?[]:new Uint8Array(256),La=0;La<64;La++)Ma[Ba.charCodeAt(La)]=La;const za=new Map,Ha=(t,e,n)=>{if(!t||!ja(t,e)&&"object"!=typeof t)return;const r=function(t,e){let n=za.get(t);return n||(n=new Map,za.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}(n,t.constructor.name);let i=r.indexOf(t);return-1===i&&(i=r.length,r.push(t)),i};function Ga(t,e,n){if(t instanceof Array)return t.map(t=>Ga(t,e,n));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const e=t.constructor.name,n=function(t){var e,n=new Uint8Array(t),r=n.length,i="";for(e=0;e<r;e+=3)i+=Ba[n[e]>>2],i+=Ba[(3&n[e])<<4|n[e+1]>>4],i+=Ba[(15&n[e+1])<<2|n[e+2]>>6],i+=Ba[63&n[e+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(t);return{rr_type:e,base64:n}}if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Ga(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const e=t.constructor.name,{src:n}=t;return{rr_type:e,src:n}}return t instanceof ImageData?{rr_type:t.constructor.name,args:[Ga(t.data,e,n),t.width,t.height]}:ja(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Ha(t,e,n)}:t}const Ya=(t,e,n)=>[...t].map(t=>Ga(t,e,n)),ja=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(n.find(n=>t instanceof e[n]))};function Fa(t,e,n,r,i,s,a,o){const c=[],l=Object.getOwnPropertyNames(t);for(const u of l)try{if("function"!=typeof t[u])continue;const l=sa(t,u,function(c){return function(...l){const d=c.apply(this,l);if(Ha(d,o,t),!ca(this.canvas,r,s,i)){a.getId(this.canvas);const r=Ya([...l],o,t);n(this.canvas,{type:e,property:u,args:r})}return d}});c.push(l)}catch(r){const i=ia(t,u,{set(t){n(this.canvas,{type:e,property:u,args:[t],setter:!0})}});c.push(i)}return c}class $a{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(t,e){!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)},this.mutationCb=t.mutationCb,this.mirror=t.mirror,!0===t.recordCanvas&&this.initCanvasMutationObserver(t.win,t.blockClass,t.blockSelector,t.unblockSelector)}initCanvasMutationObserver(t,e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=function(t,e,n,r){const i=[];try{const s=sa(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(i,...s){return ca(this,e,n,r)||"__context"in this||(this.__context=i),t.apply(this,[i,...s])}});i.push(s)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(t=>t())}}(t,e,r,n),s=function(t,e,n,r,i,s){const a=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const s of o)try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[s])continue;const o=sa(e.CanvasRenderingContext2D.prototype,s,function(e){return function(...a){return ca(this.canvas,n,i,r)||setTimeout(()=>{const e=[...a];if("drawImage"===s&&e[0]&&e[0]instanceof HTMLCanvasElement){const t=e[0],n=t.getContext("2d");let r=null==n?void 0:n.getImageData(0,0,t.width,t.height);e[0]=JSON.stringify(null==r?void 0:r.data)}t(this.canvas,{type:Js["2D"],property:s,args:e})},0),e.apply(this,a)}});a.push(o)}catch(n){const r=ia(e.CanvasRenderingContext2D.prototype,s,{set(e){t(this.canvas,{type:Js["2D"],property:s,args:[e],setter:!0})}});a.push(r)}return()=>{a.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,n),a=function(t,e,n,r,i,s){const a=[];return a.push(...Fa(e.WebGLRenderingContext.prototype,Js.WebGL,t,n,r,i,s,e)),void 0!==e.WebGL2RenderingContext&&a.push(...Fa(e.WebGL2RenderingContext.prototype,Js.WebGL2,t,n,r,i,s,e)),()=>{a.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,n,this.mirror);this.resetObservers=()=>{i(),s(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{const n=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||-1===e)return;const r=n.map(t=>{const e=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(t,["type"]);return e}),{type:i}=n[0];this.mutationCb({id:e,type:i,commands:r}),this.pendingCanvasMutations.delete(t)}}function Va(t){return Object.assign(Object.assign({},t),{timestamp:Date.now()})}let qa,Za;const Wa={map:{},getId:t=>t&&t.__sn?t.__sn.id:-1,getNode(t){return this.map[t]||null},removeNodeFromMap(t){delete this.map[t.__sn&&t.__sn.id],t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))},has(t){return this.map.hasOwnProperty(t)},reset(){this.map={}}};function Ka(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:c=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,maskInputSelector:d=null,unmaskTextSelector:p=null,unmaskInputSelector:h=null,inlineStylesheet:f=!0,maskAllText:m=!1,maskAllInputs:_,maskInputOptions:g,slimDOMOptions:y,maskInputFn:v,maskTextFn:b,hooks:S,packFn:E,sampling:w={},mousemoveWait:k,recordCanvas:T=!1,userTriggeredOnInput:x=!1,collectFonts:C=!1,inlineImages:R=!1,plugins:D,keepIframeSrcFn:I=(()=>!1),onMutation:N}=t;if(!e)throw new Error("emit function is required");void 0!==k&&void 0===w.mousemove&&(w.mousemove=k);const O=!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!==g?g:{},A=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let U;!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(t){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let P=0;qa=(t,i)=>{var s;if(!(null===(s=wa[0])||void 0===s?void 0:s.isFrozen())||t.type===Zs.FullSnapshot||t.type===Zs.IncrementalSnapshot&&t.data.source===Ws.Mutation||wa.forEach(t=>t.unfreeze()),e((t=>{for(const e of D||[])e.eventProcessor&&(t=e.eventProcessor(t));return E&&(t=E(t)),t})(t),i),t.type===Zs.FullSnapshot)U=t,P=0;else if(t.type===Zs.IncrementalSnapshot){if(t.data.source===Ws.Mutation&&t.data.isAttachIframe)return;P++,(r&&P>=r||n&&t.timestamp-U.timestamp>n)&&Za(!0)}};const B=t=>{qa(Va({type:Zs.IncrementalSnapshot,data:Object.assign({source:Ws.Mutation},t)}))},M=t=>qa(Va({type:Zs.IncrementalSnapshot,data:Object.assign({source:Ws.Scroll},t)})),L=t=>qa(Va({type:Zs.IncrementalSnapshot,data:Object.assign({source:Ws.CanvasMutation},t)})),z=new Ua({mutationCb:B}),H=new $a({recordCanvas:T,mutationCb:L,win:window,blockClass:i,blockSelector:s,unblockSelector:a,mirror:Wa}),G=new Pa({mutationCb:B,scrollCb:M,bypassOptions:{onMutation:N,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:f,maskAllText:m,maskInputOptions:O,maskTextFn:b,maskInputFn:v,recordCanvas:T,inlineImages:R,sampling:w,slimDOMOptions:A,iframeManager:z,canvasManager:H},mirror:Wa});Za=(t=!1)=>{var e,n,r,o;qa(Va({type:Zs.Meta,data:{href:window.location.href,width:oa(),height:aa()}}),t),wa.forEach(t=>t.lock());const[c,_]=function(t,e){const{blockClass:n="rr-block",blockSelector:r=null,unblockSelector:i=null,maskTextClass:s="rr-mask",maskTextSelector:a=null,unmaskTextSelector:o=null,inlineStylesheet:c=!0,inlineImages:l=!1,recordCanvas:u=!1,maskInputSelector:d=null,unmaskInputSelector:p=null,maskAllText:h=!1,maskAllInputs:f=!1,maskTextFn:m,maskInputFn:_,slimDOM:g=!1,dataURLOptions:y,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:E,keepIframeSrcFn:w=(()=>!1)}=e||{},k={};return[Vs(t,{doc:t,map:k,blockClass:n,blockSelector:r,unblockSelector:i,maskTextClass:s,maskTextSelector:a,unmaskTextSelector:o,skipChild:!1,inlineStylesheet:c,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:!0===f?{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}:!1===f?{}:f,maskTextFn:m,maskInputFn:_,slimDOMOptions:!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===g,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===g?{}:g,dataURLOptions:y,inlineImages:l,recordCanvas:u,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:E,keepIframeSrcFn:w}),k]}(document,{blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:f,maskAllText:m,maskAllInputs:O,maskTextFn:b,slimDOM:A,recordCanvas:T,inlineImages:R,onSerialize:t=>{pa(t)&&z.addIframe(t),ha(t)&&G.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{z.attachIframe(t,e),G.observeAttachShadow(t)},keepIframeSrcFn:I});if(!c)return console.warn("Failed to snapshot the document");Wa.map=_,qa(Va({type:Zs.FullSnapshot,data:{node:c,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(o=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),wa.forEach(t=>t.unlock())};try{const t=[];t.push(ta("DOMContentLoaded",()=>{qa(Va({type:Zs.DomContentLoaded,data:{}}))}));const e=t=>{var e;return Ea(Na)({onMutation:N,mutationCb:B,mousemoveCb:(t,e)=>qa(Va({type:Zs.IncrementalSnapshot,data:{source:e,positions:t}})),mouseInteractionCb:t=>qa(Va({type:Zs.IncrementalSnapshot,data:Object.assign({source:Ws.MouseInteraction},t)})),scrollCb:M,viewportResizeCb:t=>qa(Va({type:Zs.IncrementalSnapshot,data:Object.assign({source:Ws.ViewportResize},t)})),inputCb:t=>qa(Va({type:Zs.IncrementalSnapshot,data:Object.assign({source:Ws.Input},t)})),mediaInteractionCb:t=>qa(Va({type:Zs.IncrementalSnapshot,data:Object.assign({source:Ws.MediaInteraction},t)})),styleSheetRuleCb:t=>qa(Va({type:Zs.IncrementalSnapshot,data:Object.assign({source:Ws.StyleSheetRule},t)})),styleDeclarationCb:t=>qa(Va({type:Zs.IncrementalSnapshot,data:Object.assign({source:Ws.StyleDeclaration},t)})),canvasMutationCb:L,fontCb:t=>qa(Va({type:Zs.IncrementalSnapshot,data:Object.assign({source:Ws.Font},t)})),blockClass:i,ignoreClass:o,ignoreSelector:c,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,maskInputOptions:O,inlineStylesheet:f,sampling:w,recordCanvas:T,inlineImages:R,userTriggeredOnInput:x,collectFonts:C,doc:t,maskAllText:m,maskInputFn:v,maskTextFn:b,blockSelector:s,unblockSelector:a,slimDOMOptions:A,mirror:Wa,iframeManager:z,shadowDomManager:G,canvasManager:H,plugins:(null===(e=null==D?void 0:D.filter(t=>t.observer))||void 0===e?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>qa(Va({type:Zs.Plugin,data:{plugin:t.name,payload:e}}))})))||[]},S)};z.addLoadListener(n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}});const n=()=>{Za(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():t.push(ta("load",()=>{qa(Va({type:Zs.Load,data:{}})),n()},window)),()=>{t.forEach(t=>t())}}catch(t){console.warn(t)}}function Ja(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:Zs.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:On(e,10,1e3)}}),"console"===e.category)))}function Xa(t){const e=Qa(t);return e&&e instanceof Element&&e.closest("button,a")||e}function Qa(t){return function(t){return"object"==typeof t&&!!t&&"target"in t}(t)?t.target:t}let to;Ka.addCustomEvent=(t,e)=>{if(!qa)throw new Error("please add custom event after start recording");qa(Va({type:Zs.Custom,data:{tag:t,payload:e}}))},Ka.freezePage=()=>{wa.forEach(t=>t.freeze())},Ka.takeFullSnapshot=t=>{if(!Za)throw new Error("please take full snapshot after start recording");Za(t)},Ka.mirror=Wa;class eo{__init(){this._lastMutation=0}__init2(){this._lastScroll=0}__init3(){this._clicks=[]}constructor(t,e,n=Ja){eo.prototype.__init.call(this),eo.prototype.__init2.call(this),eo.prototype.__init3.call(this),this._timeout=e.timeout/1e3,this._threshold=e.threshold/1e3,this._scollTimeout=e.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=e.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const t=()=>{this._lastScroll=ro()},e=(i=()=>{this._lastMutation=ro()},to||(to=[],je(hs,"open",function(t){return function(...e){if(to)try{to.forEach(t=>t())}catch(t){}return t.apply(hs,e)}})),to.push(i),()=>{const t=to?to.indexOf(i):-1;t>-1&&to.splice(t,1)}),n=t=>{if(!t.target)return;const e=Xa(t);e&&this._handleMultiClick(e)},r=new MutationObserver(()=>{this._lastMutation=ro()});var i;r.observe(hs.document.documentElement,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),hs.addEventListener("scroll",t,{passive:!0}),hs.addEventListener("click",n,{passive:!0}),this._teardown=()=>{hs.removeEventListener("scroll",t),hs.removeEventListener("click",n),e(),r.disconnect(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,e){!function(t,e){return!no.includes(t.tagName)||"INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||"")||!("A"!==t.tagName||!(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target")))||!(!e||!t.matches(e))}(e,this._ignoreSelector)&&function(t){return!(!t.data||"number"!=typeof t.data.nodeId||!t.timestamp)}(t)&&(this._clicks.push({timestamp:t.timestamp,clickBreadcrumb:t,clickCount:0,node:e}),1===this._clicks.length&&this._scheduleCheckClicks())}_handleMultiClick(t){this._getClicks(t).forEach(t=>{t.clickCount++})}_getClicks(t){return this._clicks.filter(e=>e.node===t)}_checkClicks(){const t=[],e=ro();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=e&&t.push(n)});for(const e of t){this._generateBreadcrumbs(e);const t=this._clicks.indexOf(e);-1!==t&&this._clicks.splice(t,1)}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const e=this._replay,n=!(t.scrollAfter&&t.scrollAfter<=this._scollTimeout||t.mutationAfter&&t.mutationAfter<=this._threshold),{clickCount:r,clickBreadcrumb:i}=t;if(n){const n=1e3*Math.min(t.mutationAfter||this._timeout,this._timeout),s=n<1e3*this._timeout?"mutation":"timeout",a={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:hs.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:s,clickCount:r||1}};this._addBreadcrumbEvent(e,a)}else if(r>1){const t={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:hs.location.href,route:e.getCurrentRoute(),clickCount:r,metric:!0}};this._addBreadcrumbEvent(e,t)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}const no=["A","BUTTON","INPUT"];function ro(){return Date.now()/1e3}function io(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var so;!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(so||(so={}));const ao=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled"]);function oo(t){const e={};for(const n in t)if(ao.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}function co(t,e){const n=t&&"__sn"in t&&t.__sn.type===so.Element?t.__sn:null;return{message:e,data:n?{nodeId:n.id,node:{id:n.id,tagName:n.tagName,textContent:t?Array.from(t.childNodes).map(t=>"__sn"in t&&t.__sn.type===so.Text&&t.__sn.textContent).filter(Boolean).map(t=>t.trim()).join(""):"",attributes:oo(n.attributes)}}:{}}}const lo=["name","type","startTime","transferSize","duration"];function uo(t){return function(e){return lo.every(n=>t[n]===e[n])}}function po(t){return t>9999999999?t:1e3*t}class ho extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class fo{__init(){this._totalSize=0}constructor(){fo.prototype.__init.call(this),this.events=[]}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const e=JSON.stringify(t).length;if(this._totalSize+=e,this._totalSize>ys)throw new ho;this.events.push(t)}finish(){return new Promise(t=>{const e=this.events;this.clear(),t(JSON.stringify(e))})}clear(){this.events=[],this._totalSize=0}getEarliestTimestamp(){const t=this.events.map(t=>t.timestamp).sort()[0];return t?po(t):null}}class mo{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((t,e)=>{this._worker.addEventListener("message",({data:n})=>{n.success?t():e()},{once:!0}),this._worker.addEventListener("error",t=>{e(t)},{once:!0})})),this._ensureReadyPromise}destroy(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,e){const n=this._getAndIncrementId();return new Promise((r,i)=>{const s=({data:e})=>{const a=e;if(a.method===t&&a.id===n){if(this._worker.removeEventListener("message",s),!a.success)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("[Replay]",a.response),void i(new Error("Error in compression worker"));r(a.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:t,arg:e})})}_getAndIncrementId(){return this._id++}}class _o{__init(){this._totalSize=0}constructor(t){_o.prototype.__init.call(this),this._worker=new mo(t),this._earliestTimestamp=null}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const e=po(t.timestamp);(!this._earliestTimestamp||e<this._earliestTimestamp)&&(this._earliestTimestamp=e);const n=JSON.stringify(t);return this._totalSize+=n.length,this._totalSize>ys?Promise.reject(new ho):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this._worker.postMessage("clear")}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 go{constructor(t){this._fallback=new fo,this._compression=new _o(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}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){return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Replay] Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t}=this._fallback,e=[];for(const n of t)e.push(this._compression.addEvent(n));this._used=this._compression;try{await Promise.all(e)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("[Replay] Failed to add events when switching buffers.",t)}}}function yo(){return"sessionStorage"in hs&&!!hs.sessionStorage}function vo(t,e,n=+new Date){return null===t||void 0===e||e<0||0!==e&&t+e<=n}function bo(t,e,n=+new Date){return vo(t.started,e.maxSessionLife,n)||vo(t.lastActivity,e.sessionIdleExpire,n)}function So(t){return void 0!==t&&Math.random()<t}function Eo(t){if(yo())try{hs.sessionStorage.setItem(fs,JSON.stringify(t))}catch(t){}}function wo(t){const e=Date.now();return{id:t.id||En(),started:t.started||e,lastActivity:t.lastActivity||e,segmentId:t.segmentId||0,sampled:t.sampled,shouldRefresh:!0}}function ko({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1}){const r=function(t,e){return So(t)?"session":!!e&&"buffer"}(t,e),i=wo({sampled:r});return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`[Replay] Creating new session: ${i.id}`),n&&Eo(i),i}function To({timeouts:t,currentSession:e,stickySession:n,sessionSampleRate:r,allowBuffering:i}){const s=e||n&&function(){if(!yo())return null;try{const t=hs.sessionStorage.getItem(fs);return t?wo(JSON.parse(t)):null}catch(t){return null}}();if(s){if(!bo(s,t)||i&&s.shouldRefresh)return{type:"saved",session:s};if(!s.shouldRefresh)return{type:"new",session:wo({sampled:!1})};("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Replay] Session has expired")}return{type:"new",session:ko({stickySession:n,sessionSampleRate:r,allowBuffering:i})}}async function xo(t,e,n){if(!t.eventBuffer)return null;if(t.isPaused())return null;if(po(e.timestamp)+t.timeouts.sessionIdlePause<Date.now())return null;try{n&&t.eventBuffer.clear();const r=t.getOptions(),i="function"==typeof r.beforeAddRecordingEvent&&function(t){return t.type===Zs.Custom}(e)?r.beforeAddRecordingEvent(e):e;if(!i)return;return await t.eventBuffer.addEvent(i)}catch(e){const n=e&&e instanceof ho?"addEventSizeExceeded":"addEvent";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error(e),await t.stop(n);const r=xr().getClient();r&&r.recordDroppedEvent("internal_sdk_error","replay")}}function Co(t){return!t.type}function Ro(t){return"transaction"===t.type}function Do(t){const e=function(){const t=xr().getClient();if(!t)return!1;const e=t.getTransport();return e&&e.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!Co(n)&&!Ro(n))return;const i=r&&r.statusCode;e&&(!i||i<200||i>=300)||(Ro(n)&&n.contexts&&n.contexts.trace&&n.contexts.trace.trace_id?t.getContext().traceIds.add(n.contexts.trace.trace_id):Co(n)&&(n.event_id&&t.getContext().errorIds.add(n.event_id),"buffer"===t.recordingMode&&n.tags&&n.tags.replayId&&setTimeout(()=>{t.sendBufferedReplayOrFlush()})))}}function Io(t,e){return e.map(({type:e,start:n,end:r,name:i,data:s})=>{const a=t.throttledAddEvent({type:Zs.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:i,startTimestamp:n,endTimestamp:r,data:s}}});return"string"==typeof a?Promise.resolve(null):a})}function No(t,e){t.isEnabled()&&null!==e&&(function(t,e){return("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||!t.getOptions()._experiments.traceInternals)&&function(t){const e=xr().getClient(),n=e&&e.getDsn();return!!n&&t.includes(n.host)}(e)}(t,e.name)||t.addUpdate(()=>(Io(t,[e]),!0)))}const Oo=10,Ao=11,Uo=12,Po=13,Bo=14,Mo=15,Lo=20,zo=21,Ho=22,Go=23,Yo=["true","false","null"];function jo(t,e,n){const r=t[t.length-1],i=e[n];if(!/\s/.test(i))if('"'!==i||Fo(e,n))switch(i){case"{":!function(t,e){e&&e!==Po?(e===zo&&t.push(Oo),e===Lo&&t.push(Oo)):t.push(Oo)}(t,r);break;case"[":!function(t,e){e?e===Po?(t.push(Lo),t.push(zo)):(e===zo&&(t.push(Lo),t.push(zo)),e===Lo&&(t.push(Lo),t.push(zo))):(t.push(Lo),t.push(zo))}(t,r);break;case":":!function(t,e){e===Ao&&(t.pop(),t.push(Po))}(t,r);break;case",":!function(t,e){if(e!==Po)return e===Mo?(t.pop(),void t.pop()):void(e!==zo&&e===Go&&t.pop());t.pop()}(t,r);break;case"}":!function(t,e){e===Oo&&t.pop(),e===Po&&(t.pop(),t.pop()),e===Mo&&(t.pop(),t.pop(),t.pop()),t[t.length-1]===Po&&t.push(Mo),t[t.length-1]===zo&&t.push(Go)}(t,r);break;case"]":!function(t,e){e===Lo&&t.pop(),e===zo&&(t.pop(),t.pop()),e===Go&&(t.pop(),t.pop(),t.pop()),t[t.length-1]===Po&&t.push(Mo),t[t.length-1]===zo&&t.push(Go)}(t,r)}else!function(t,e){e===Bo?(t.pop(),t.push(Mo)):e===Ho?(t.pop(),t.push(Go)):e!==Po?e!==zo?e!==Oo?e===Uo&&(t.pop(),t.push(Ao)):t.push(Uo):t.push(Ho):t.push(Bo)}(t,r)}function Fo(t,e){return"\\"===t[e-1]&&!Fo(t,e-1)}function $o(t){return function(t,e){if(!e.length)return t;let n=t;const r=e.length-1;n=function(t,e){switch(e){case Oo:return`${t}"~~":"~~"`;case Ao:return`${t}:"~~"`;case Uo:return`${t}~~":"~~"`;case Po:return function(t){const e=t.lastIndexOf(":"),n=t.slice(e+1);return Yo.includes(n.trim())?`${t},"~~":"~~"`:`${t.slice(0,e+1)}"~~"`}(t);case Bo:return`${t}~~"`;case Mo:return`${t},"~~":"~~"`;case Lo:return`${t}"~~"`;case zo:return function(t){const e=function(t){for(let e=t.length-1;e>=0;e--){const n=t[e];if(","===n||"["===n)return e}return-1}(t);if(e>-1){const n=t.slice(e+1);return Yo.includes(n.trim())?`${t},"~~"`:`${t.slice(0,e+1)}"~~"`}return t}(t);case Ho:return`${t}~~"`;case Go:return`${t},"~~"`}return t}(n,e[r]);for(let t=r;t>=0;t--)switch(e[t]){case Oo:n=`${n}}`;break;case Lo:n=`${n}]`}return n}(t,function(t){const e=[];for(let n=0;n<t.length;n++)jo(e,t,n);return e}(t))}function Vo(t,e){if(t)try{if("string"==typeof t)return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=Qo(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch(t){}}function qo(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function Zo(t){return"string"==typeof t?t:t instanceof URLSearchParams?t.toString():t instanceof FormData?Qo(t):void 0}function Wo(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:a,request:o,response:c}=e;return{type:t,start:n/1e3,end:r/1e3,name:i,data:Ke({method:s,statusCode:a,request:o,response:c})}}function Ko(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Jo(t,e,n){if(!e&&0===Object.keys(t).length)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:i,warnings:s}=function(t){if(!t||"string"!=typeof t)return{body:t,warnings:[]};const e=t.length>_s;if(function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(t))try{const n=e?$o(t.slice(0,_s)):t;return{body:JSON.parse(n),warnings:e?["JSON_TRUNCATED"]:[]}}catch(n){return{body:e?`${t.slice(0,_s)}…`:t,warnings:e?["INVALID_JSON","TEXT_TRUNCATED"]:["INVALID_JSON"]}}return{body:e?`${t.slice(0,_s)}…`:t,warnings:e?["TEXT_TRUNCATED"]:[]}}(n);return r.body=i,s.length>0&&(r._meta={warnings:s}),r}function Xo(t,e){return Object.keys(t).reduce((n,r)=>{const i=r.toLowerCase();return e.includes(i)&&t[r]&&(n[i]=t[r]),n},{})}function Qo(t){return new URLSearchParams(t).toString()}function tc(t,e){const n=function(t,e=hs.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(hs.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;return!t.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}(t);return Ye(n,e)}function ec(t=[]){if(2===t.length&&"object"==typeof t[1])return t[1].body}function nc(t,e){const n={};return e.forEach(e=>{t.get(e)&&(n[e]=t.get(e))}),n}function rc(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?nc(n,e):Array.isArray(n)?{}:Xo(n,e):{}}let ic=null;function sc(t){return!(!t||!t.on)}function ac(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}const oc={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:a,encodedBodySize:o,responseStatus:c,transferSize:l}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${e}.${n}`,start:lc(s),end:lc(i),name:r,data:{size:l,statusCode:c,decodedBodySize:a,encodedBodySize:o}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:i}=t,s=lc(i);return{type:n,name:r,start:s,end:s+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:a,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:f,type:m}=t;return 0===i?null:{type:`${e}.${m}`,start:lc(h),end:lc(s),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:a,duration:i,domInteractive:l,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:s,redirectCount:p}}},"largest-contentful-paint":function(t){const{entryType:e,startTime:n,size:r}=t;let i=0;if(hs.performance){const t=hs.performance.getEntriesByType("navigation")[0];i=t&&t.activationStart||0}const s=Math.max(n-i,0),a=lc(i)+s/1e3;return{type:e,name:e,start:a,end:a,data:{value:s,size:r,nodeId:Ka.mirror.getId(t.element)}}}};function cc(t){return void 0===oc[t.entryType]?null:oc[t.entryType](t)}function lc(t){return((Wn||hs.performance.timeOrigin)+t)/1e3}function uc(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("[Replay] Received replay event after session expired."));const i=r||!e;e=!0,t.addUpdate(()=>{if("buffer"===t.recordingMode&&i&&t.setInitialState(),xo(t,n,i),!i)return!1;if(function(t,e){if(!e||!t.session||0!==t.session.segmentId)return Promise.resolve(null);xo(t,function(t){const e=t.getOptions();return{type:Zs.Custom,timestamp:Date.now(),data:{tag:"options",payload:{sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:!!t.eventBuffer&&"worker"===t.eventBuffer.type,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}(t),!1)}(t,i),t.session&&t.session.previousSessionId)return!0;if("buffer"===t.recordingMode&&t.session&&t.eventBuffer){const e=t.eventBuffer.getEarliestTimestamp();e&&(t.session.started=e,t.getOptions().stickySession&&Eo(t.session))}return"session"===t.recordingMode&&t.flush(),!0})}}class dc extends Error{constructor(t){super(`Transport returned status code ${t}`)}}async function pc(t,e={count:0,interval:5e3}){const{recordingData:n,options:r}=t;var i;if(n.length)try{return await async function({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:i,session:s}){const a=function({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if("string"==typeof t)n=`${r}${t}`;else{const e=(new TextEncoder).encode(r);n=new Uint8Array(e.length+t.length),n.set(e),n.set(t,e.length)}return n}({recordingData:t,headers:{segment_id:n}}),{urls:o,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=xr(),p=d.getClient(),h=d.getScope(),f=p&&p.getTransport(),m=p&&p.getDsn();if(!(p&&f&&m&&s.sampled))return;const _={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,urls:o,replay_id:e,segment_id:n,replay_type:s.sampled},g=await async function({client:t,scope:e,replayId:n,event:r}){const i="object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations),s=await Xr(t.getOptions(),r,{event_id:n,integrations:i},e);if(!s)return null;s.platform=s.platform||"javascript";const a=t.getSdkMetadata&&t.getSdkMetadata(),{name:o,version:c}=a&&a.sdk||{};return s.sdk={...s.sdk,name:o||"sentry.javascript.unknown",version:c||"0.0.0"},s}({scope:h,client:p,replayId:e,event:_});if(!g)return p.recordDroppedEvent("event_processor","replay",_),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("An event processor returned `null`, will not send event."));delete g.sdkProcessingMetadata;const y=function(t,e,n,r){return ir(hr(t,pr(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"==typeof e?(new TextEncoder).encode(e).length:e.length},e]])}(g,a,m,p.getOptions().tunnel);let v;try{v=await f.send(y)}catch(t){const e=new Error(ms);try{e.cause=t}catch(t){}throw e}if(!v)return v;if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new dc(v.statusCode);return v}(t),!0}catch(n){if(n instanceof dc)throw n;if(i={_retryCount:e.count},xr().setContext("Replays",i),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r._experiments&&r._experiments.captureExceptions&&Vr(n),e.count>=3){const t=new Error(`${ms} - max retries exceeded`);try{t.cause=n}catch(t){}throw t}return e.interval*=++e.count,new Promise((n,r)=>{setTimeout(async()=>{try{await pc(t,e),n(!0)}catch(t){r(t)}},e.interval)})}}const hc="__THROTTLED";class fc{__init(){this.eventBuffer=null}__init2(){this.performanceEvents=[]}__init3(){this.recordingMode="session"}__init4(){this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5,maxSessionLife:36e5}}__init5(){this._performanceObserver=null}__init6(){this._flushLock=null}__init7(){this._lastActivity=Date.now()}__init8(){this._isEnabled=!1}__init9(){this._isPaused=!1}__init10(){this._hasInitializedCoreListeners=!1}__init11(){this._stopRecording=null}__init12(){this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""}}constructor({options:t,recordingOptions:e}){fc.prototype.__init.call(this),fc.prototype.__init2.call(this),fc.prototype.__init3.call(this),fc.prototype.__init4.call(this),fc.prototype.__init5.call(this),fc.prototype.__init6.call(this),fc.prototype.__init7.call(this),fc.prototype.__init8.call(this),fc.prototype.__init9.call(this),fc.prototype.__init10.call(this),fc.prototype.__init11.call(this),fc.prototype.__init12.call(this),fc.prototype.__init13.call(this),fc.prototype.__init14.call(this),fc.prototype.__init15.call(this),fc.prototype.__init16.call(this),fc.prototype.__init17.call(this),fc.prototype.__init18.call(this),this._recordingOptions=e,this._options=t,this._debouncedFlush=function(t,e,n){let r,i,s;const a=n&&n.maxWait?Math.max(n.maxWait,e):0;function o(){return c(),r=t(),r}function c(){void 0!==i&&clearTimeout(i),void 0!==s&&clearTimeout(s),i=s=void 0}function l(){return i&&clearTimeout(i),i=setTimeout(o,e),a&&void 0===s&&(s=setTimeout(o,a)),r}return l.cancel=c,l.flush=function(){return void 0!==i||void 0!==s?o():r},l}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(t,e,n){const r=new Map;let i=!1;return(...e)=>{const n=Math.floor(Date.now()/1e3);if((t=>{const e=t-5;r.forEach((t,n)=>{n<e&&r.delete(n)})})(n),[...r.values()].reduce((t,e)=>t+e,0)>=300){const t=i;return i=!0,t?"__SKIPPED":hc}i=!1;const s=r.get(n)||0;return r.set(n,s+1),t(...e)}}((t,e)=>xo(this,t,e));const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;i&&(this.clickDetector=new eo(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}getOptions(){return this._options}initializeSampling(){const{errorSampleRate:t,sessionSampleRate:e}=this._options;t<=0&&e<=0||this._loadAndCheckSession()&&(this.session?(this.session.sampled&&"session"!==this.session.sampled&&(this.recordingMode="buffer"),this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");const t=this.session&&this.session.id,{session:e}=To({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:1,allowBuffering:!1});e.previousSessionId=t,this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");const t=this.session&&this.session.id,{session:e}=To({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:0,allowBuffering:!0});e.previousSessionId=t,this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{this._stopRecording=Ka({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:uc(this),onMutation:this._onMutationHandler})}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(t){if(this._isEnabled)try{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e="[Replay] Stopping Replay"+(t?` triggered by ${t}`:"");(this.getOptions()._experiments.traceInternals?console.warn:Ue.log)(e)}this._isEnabled=!1,this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),"session"===this.recordingMode&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,function(){if(yo())try{hs.sessionStorage.removeItem(fs)}catch(t){}}(),this.session=void 0}catch(t){this._handleException(t)}}pause(){this._isPaused=!0,this.stopRecording()}resume(){this._loadAndCheckSession()&&(this._isPaused=!1,this.startRecording())}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const e=Date.now();await this.flushImmediate();const n=this.stopRecording();t&&n&&(this.recordingMode="session",this.session&&(this.session.shouldRefresh=!1,this._updateUserActivity(e),this._updateSessionActivity(e),this.session.started=e,this._maybeSaveSession()),this.startRecording())}addUpdate(t){const e=t();"buffer"!==this.recordingMode&&!0!==e&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._loadAndCheckSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){const t=this.getSessionId();if(this._lastActivity&&vo(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled)this.pause();else if(this._loadAndCheckSession())return t===this.getSessionId()||(this._triggerFullSnapshot(),!1)}setInitialState(){const t=`${hs.location.origin}${hs.location.pathname}${hs.location.hash}${hs.location.search}`;this.performanceEvents=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(t,e){const n=this._throttledAddEvent(t,e);if(n===hc){const t=io({category:"replay.throttled"});this.addUpdate(()=>{xo(this,{type:Zs.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:!0}})})}return n}getCurrentRoute(){const t=this.lastTransaction||xr().getScope().getTransaction();if(t&&["route","custom"].includes(t.metadata.source))return t.name}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:t}){if(t&&window.Worker)try{const t=function(){const t=new Blob(['/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\nfunction t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=new Uint8Array([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]),a=new Uint8Array([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]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),n=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);t(s);const r=new Array(60);t(r);const o=new Array(512);t(o);const l=new Array(256);t(l);const h=new Array(29);t(h);const d=new Array(30);function _(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let f,c,u;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const m=t=>t<256?o[t]:o[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},g=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,b(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},p=(t,e,a)=>{g(t,a[2*e],a[2*e+1])},k=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},v=(t,e,a)=>{const i=new Array(16);let n,s,r=0;for(n=1;n<=15;n++)r=r+a[n-1]<<1,i[n]=r;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=k(i[e]++,e))}},y=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[a]},A=(t,e,a)=>{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n<t.heap_len&&z(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!z(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i},E=(t,i,n)=>{let s,r,o,_,f=0;if(0!==t.sym_next)do{s=255&t.pending_buf[t.sym_buf+f++],s+=(255&t.pending_buf[t.sym_buf+f++])<<8,r=t.pending_buf[t.sym_buf+f++],0===s?p(t,r,i):(o=l[r],p(t,o+256+1,i),_=e[o],0!==_&&(r-=h[o],g(t,r,_)),s--,o=m(s),p(t,o,n),_=a[o],0!==_&&(s-=d[o],g(t,s,_)))}while(f<t.sym_next);p(t,256,i)},R=(t,e)=>{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let r,o,l,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<s;r++)0!==a[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=h<2?++h:0,a[2*l]=1,t.depth[l]=0,t.opt_len--,n&&(t.static_len-=i[2*l+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)A(t,a,r);l=s;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=o,a[2*l]=a[2*r]+a[2*o],t.depth[l]=(t.depth[r]>=t.depth[o]?t.depth[r]:t.depth[o])+1,a[2*r+1]=a[2*o+1]=l,t.heap[1]=l++,A(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,d,_,f,c,u,w=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)d=t.heap[h],f=a[2*a[2*d+1]+1]+1,f>l&&(f=l,w++),a[2*d+1]=f,d>i||(t.bl_count[f]++,c=0,d>=o&&(c=r[d-o]),u=a[2*d],t.opt_len+=u*(f+c),s&&(t.static_len+=u*(n[2*d+1]+c)));if(0!==w){do{for(f=l-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,w-=2}while(w>0);for(f=l;0!==f;f--)for(d=t.bl_count[f];0!==d;)_=t.heap[--h],_>i||(a[2*_+1]!==f&&(t.opt_len+=(f-a[2*_+1])*a[2*_],a[2*_+1]=f),d--)}})(t,e),v(a,h,t.bl_count)},Z=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o<l&&n===r||(o<h?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4))},U=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o<l&&n===r)){if(o<h)do{p(t,n,t.bl_tree)}while(0!=--o);else 0!==n?(n!==s&&(p(t,n,t.bl_tree),o--),p(t,16,t.bl_tree),g(t,o-3,2)):o<=10?(p(t,17,t.bl_tree),g(t,o-3,3)):(p(t,18,t.bl_tree),g(t,o-11,7));o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4)}};let S=!1;const D=(t,e,a,i)=>{g(t,0+(i?1:0),3),x(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var T=(t,e,a,i)=>{let o,l,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),h=(t=>{let e;for(Z(t,t.dyn_ltree,t.l_desc.max_code),Z(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*n[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,l=t.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==e?D(t,e,a,i):4===t.strategy||l===o?(g(t,2+(i?1:0),3),E(t,s,r)):(g(t,4+(i?1:0),3),((t,e,a,i)=>{let s;for(g(t,e-257,5),g(t,a-1,5),g(t,i-4,4),s=0;s<i;s++)g(t,t.bl_tree[2*n[s]+1],3);U(t,t.dyn_ltree,e-1),U(t,t.dyn_dtree,a-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),E(t,t.dyn_ltree,t.dyn_dtree)),y(t),i&&x(t)},O={_tr_init:t=>{S||((()=>{let t,n,w,m,b;const g=new Array(16);for(w=0,m=0;m<28;m++)for(h[m]=w,t=0;t<1<<e[m];t++)l[w++]=m;for(l[w-1]=m,b=0,m=0;m<16;m++)for(d[m]=b,t=0;t<1<<a[m];t++)o[b++]=m;for(b>>=7;m<30;m++)for(d[m]=b<<7,t=0;t<1<<a[m]-7;t++)o[256+b++]=m;for(n=0;n<=15;n++)g[n]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,g[8]++;for(;t<=255;)s[2*t+1]=9,t++,g[9]++;for(;t<=279;)s[2*t+1]=7,t++,g[7]++;for(;t<=287;)s[2*t+1]=8,t++,g[8]++;for(v(s,287,g),t=0;t<30;t++)r[2*t+1]=5,r[2*t]=k(t,5);f=new _(s,e,257,286,15),c=new _(r,a,0,30,15),u=new _(new Array(0),i,0,19,7)})(),S=!0),t.l_desc=new w(t.dyn_ltree,f),t.d_desc=new w(t.dyn_dtree,c),t.bl_desc=new w(t.bl_tree,u),t.bi_buf=0,t.bi_valid=0,y(t)},_tr_stored_block:D,_tr_flush_block:T,_tr_tally:(t,e,a)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(l[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{g(t,2,3),p(t,256,s),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var F=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const L=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,i)=>{const n=L,s=i+a;t^=-1;for(let a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return-1^t},I={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:C,_tr_stored_block:H,_tr_flush_block:M,_tr_tally:j,_tr_align:K}=O,{Z_NO_FLUSH:P,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:G,Z_FINISH:X,Z_BLOCK:W,Z_OK:q,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:V,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:tt,Z_FILTERED:et,Z_HUFFMAN_ONLY:at,Z_RLE:it,Z_FIXED:nt,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:rt,Z_DEFLATED:ot}=B,lt=(t,e)=>(t.msg=I[e],e),ht=t=>2*t-(t>4?9:0),dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},_t=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let ft=(t,e,a)=>(e<<t.hash_shift^a)&t.hash_mask;const ct=t=>{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ut=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ct(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},mt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},bt=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=F(t.adler,e,n,a):2===t.state.wrap&&(t.adler=N(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},gt=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+258;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&s<f);if(i=258-(f-s),s=f-258,i>r){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead},pt=t=>{const e=t.w_size;let a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),_t(t),i+=e),0===t.strm.avail_in)break;if(a=bt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=ft(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_out<n)break;if(n=t.strm.avail_out-n,i=t.strstart-t.block_start,a>i+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a<s&&(0===a&&e!==X||e===P||a!==i+t.strm.avail_in))break;r=e===X&&a===i+t.strm.avail_in?1:0,H(t,0,0,r),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,ct(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(bt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),r?4:e!==P&&e!==X&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(n=t.window_size-t.strstart,t.strm.avail_in>n&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(bt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water<t.strstart&&(t.high_water=t.strstart),n=t.bi_valid+42>>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===X)&&e!==P&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===X&&0===t.strm.avail_in&&a===i?1:0,H(t,t.block_start,a,r),t.block_start+=a,ct(t.strm)),r?3:1)},vt=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a)),t.match_length>=3)if(i=j(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else i=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2},yt=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a),t.match_length<=5&&(t.strategy===et||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=j(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ut(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=j(t,0,t.window[t.strstart-1]),i&&ut(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=j(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const zt=[new xt(0,0,0,0,kt),new xt(4,4,8,4,vt),new xt(4,5,16,8,vt),new xt(4,6,32,32,vt),new xt(4,4,16,16,yt),new xt(8,16,32,32,yt),new xt(8,16,128,128,yt),new xt(8,32,128,256,yt),new xt(32,128,258,1024,yt),new xt(32,258,258,4096,yt)];function At(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),dt(this.dyn_ltree),dt(this.dyn_dtree),dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),dt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Et(t))return lt(t,Q);t.total_in=t.total_out=0,t.data_type=rt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,C(e),q},Zt=t=>{const e=Rt(t);var a;return e===q&&((a=t.state).window_size=2*a.w_size,dt(a.head),a.max_lazy_match=zt[a.level].max_lazy,a.good_match=zt[a.level].good_length,a.nice_match=zt[a.level].nice_length,a.max_chain_length=zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ut=(t,e,a,i,n,s)=>{if(!t)return Q;let r=1;if(e===tt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ot||i<8||i>15||e<0||e>9||s<0||s>nt||8===i&&1!==r)return lt(t,Q);8===i&&(i=9);const o=new At;return t.state=o,o.strm=t,o.status=42,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=s,o.method=a,Zt(t)};var St={deflateInit:(t,e)=>Ut(t,e,ot,15,8,st),deflateInit2:Ut,deflateReset:Zt,deflateResetKeep:Rt,deflateSetHeader:(t,e)=>Et(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,q),deflate:(t,e)=>{if(Et(t)||e>W||e<0)return t?lt(t,Q):Q;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==X)return lt(t,0===t.avail_out?$:Q);const i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(ct(t),0===t.avail_out)return a.last_flush=-1,q}else if(0===t.avail_in&&ht(e)<=ht(i)&&e!==X)return lt(t,$);if(666===a.status&&0!==t.avail_in)return lt(t,$);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,i=-1;if(i=a.strategy>=at||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=i<<6,0!==a.strstart&&(e|=32),e+=31-e%31,mt(a,e),0!==a.strstart&&(mt(a,t.adler>>>16),mt(a,65535&t.adler)),t.adler=1,a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(57===a.status)if(t.adler=0,wt(a,31),wt(a,139),wt(a,8),a.gzhead)wt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),wt(a,255&a.gzhead.time),wt(a,a.gzhead.time>>8&255),wt(a,a.gzhead.time>>16&255),wt(a,a.gzhead.time>>24&255),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(wt(a,255&a.gzhead.extra.length),wt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=N(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,3),a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q;if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,ct(t),0!==a.pending)return a.last_flush=-1,q;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(ct(t),0!==a.pending))return a.last_flush=-1,q;wt(a,255&t.adler),wt(a,t.adler>>8&255),t.adler=0}if(a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(0!==t.avail_in||0!==a.lookahead||e!==P&&666!==a.status){let i=0===a.level?kt(a,e):a.strategy===at?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(pt(t),0===t.lookahead)){if(e===P)return 1;break}if(t.match_length=0,a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=258){if(pt(t),t.lookahead<=258&&e===P)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+258;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&n<s);t.match_length=258-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=j(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):zt[a.level].func(a,e);if(3!==i&&4!==i||(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),q;if(2===i&&(e===Y?K(a):e!==W&&(H(a,0,0,!1),e===G&&(dt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),ct(t),0===t.avail_out))return a.last_flush=-1,q}return e!==X?q:a.wrap<=0?J:(2===a.wrap?(wt(a,255&t.adler),wt(a,t.adler>>8&255),wt(a,t.adler>>16&255),wt(a,t.adler>>24&255),wt(a,255&t.total_in),wt(a,t.total_in>>8&255),wt(a,t.total_in>>16&255),wt(a,t.total_in>>24&255)):(mt(a,t.adler>>>16),mt(a,65535&t.adler)),ct(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?q:J)},deflateEnd:t=>{if(Et(t))return Q;const e=t.state.status;return t.state=null,113===e?lt(t,V):q},deflateSetDictionary:(t,e)=>{let a=e.length;if(Et(t))return Q;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return Q;if(1===n&&(t.adler=F(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(dt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,pt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=ft(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,pt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,q},deflateInfo:"pako deflate (from Nodeca project)"};const Dt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Dt(a,e)&&(t[e]=a[e])}}return t},Ot=t=>{let e=0;for(let a=0,i=t.length;a<i;a++)e+=t[a].length;const a=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];a.set(n,i),i+=n.length}return a};let Ft=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Ft=!1}const Lt=new Uint8Array(256);for(let t=0;t<256;t++)Lt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Lt[254]=Lt[254]=1;var Nt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n<r;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),s=0,n=0;s<o;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},It=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i<a;){let e=t[i++];if(e<128){s[n++]=e;continue}let r=Lt[e];if(r>4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i<a;)e=e<<6|63&t[i++],r--;r>1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Ft)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i<e;i++)a+=String.fromCharCode(t[i]);return a})(s,n)},Bt=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Lt[t[a]]>e?a:e};var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Mt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Kt,Z_FINISH:Pt,Z_OK:Yt,Z_STREAM_END:Gt,Z_DEFAULT_COMPRESSION:Xt,Z_DEFAULT_STRATEGY:Wt,Z_DEFLATED:qt}=B;function Jt(t){this.options=Tt({level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=St.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Yt)throw new Error(I[a]);if(e.header&&St.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Nt(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=St.deflateSetDictionary(this.strm,t),a!==Yt)throw new Error(I[a]);this._dict_set=!0}}function Qt(t,e){const a=new Jt(e);if(a.push(t,!0),a.err)throw a.msg||I[a.err];return a.result}Jt.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Pt:Mt,"string"==typeof t?a.input=Nt(t):"[object ArrayBuffer]"===Ht.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===jt||s===Kt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=St.deflate(a,s),n===Gt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=St.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Yt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Yt&&(this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Vt={Deflate:Jt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:B};var $t=function(t,e){let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=u[f&m];e:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=16209;break t}k=65535&g,p&=15,p&&(c<p&&(f+=z[a++]<<c,c+=8),k+=f&(1<<p)-1,f>>>=p,c-=p),c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=w[f&b];a:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=16209;break t}if(v=65535&g,p&=15,c<p&&(f+=z[a++]<<c,c+=8,c<p&&(f+=z[a++]<<c,c+=8)),v+=f&(1<<p)-1,v>o){t.msg="invalid distance too far back",E.mode=16209;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=16209;break t}if(y=0,x=_,0===d){if(y+=l-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}else if(d<p){if(y+=l+d-p,p-=d,p<k){k-=p;do{A[n++]=_[y++]}while(--p);if(y=0,d<k){p=d,k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}}else if(y+=d-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}for(;k>2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a<i&&n<r);k=c>>3,a-=k,c-=k<<3,f&=(1<<c)-1,t.next_in=a,t.next_out=n,t.avail_in=a<i?i-a+5:5-(a-i),t.avail_out=n<r?r-n+257:257-(n-r),E.hold=f,E.bits=c};const te=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ee=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ae=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ie=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,a,i,n,s,r,o)=>{const l=o.bits;let h,d,_,f,c,u,w=0,m=0,b=0,g=0,p=0,k=0,v=0,y=0,x=0,z=0,A=null;const E=new Uint16Array(16),R=new Uint16Array(16);let Z,U,S,D=null;for(w=0;w<=15;w++)E[w]=0;for(m=0;m<i;m++)E[e[a+m]]++;for(p=l,g=15;g>=1&&0===E[g];g--);if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b<g&&0===E[b];b++);for(p<b&&(p=b),y=1,w=1;w<=15;w++)if(y<<=1,y-=E[w],y<0)return-1;if(y>0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<15;w++)R[w+1]=R[w]+E[w];for(m=0;m<i;m++)0!==e[a+m]&&(r[R[e[a+m]]++]=m);if(0===t?(A=D=r,u=20):1===t?(A=te,D=ee,u=257):(A=ae,D=ie,u=0),z=0,m=0,w=b,c=s,k=p,v=0,_=-1,x=1<<p,f=x-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1<u?(U=0,S=r[m]):r[m]>=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<<w-v,d=1<<k,b=d;do{d-=h,n[c+(z>>v)+d]=Z<<24|U<<16|S|0}while(0!==d);for(h=1<<w-1;z&h;)h>>=1;if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]]}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<<k;k+v<g&&(y-=E[k+v],!(y<=0));)k++,y<<=1;if(x+=1<<k,1===t&&x>852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0};const{Z_FINISH:se,Z_BLOCK:re,Z_TREES:oe,Z_OK:le,Z_STREAM_END:he,Z_NEED_DICT:de,Z_STREAM_ERROR:_e,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce,Z_BUF_ERROR:ue,Z_DEFLATED:we}=B,me=16209,be=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ge(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const pe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},ke=t=>{if(pe(t))return _e;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,le},ve=t=>{if(pe(t))return _e;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ke(t)},ye=(t,e)=>{let a;if(pe(t))return _e;const i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_e:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,ve(t))},xe=(t,e)=>{if(!t)return _e;const a=new ge;t.state=a,a.strm=t,a.window=null,a.mode=16180;const i=ye(t,e);return i!==le&&(t.state=null),i};let ze,Ae,Ee=!0;const Re=t=>{if(Ee){ze=new Int32Array(512),Ae=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ze,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Ae,0,t.work,{bits:5}),Ee=!1}t.lencode=ze,t.lenbits=9,t.distcode=Ae,t.distbits=5},Ze=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0};var Ue={inflateReset:ve,inflateReset2:ye,inflateResetKeep:ke,inflateInit:t=>xe(t,15),inflateInit2:xe,inflate:(t,e)=>{let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pe(t)||!t.output||!t.input&&0!==t.avail_in)return _e;a=t.state,16191===a.mode&&(a.mode=16192),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=le;t:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=me;break}if((15&h)!==we){t.msg="unknown compression method",a.mode=me;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=me;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:16191,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==we){t.msg="unknown compression method",a.mode=me;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=me;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=N(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=me;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}t.adler=a.check=be(h),h=0,d=0,a.mode=16190;case 16190:if(0===a.havedict)return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,de;t.adler=a.check=1,a.mode=16191;case 16191:if(e===re||e===oe)break t;case 16192:if(a.last){h>>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}switch(a.last=1&h,h>>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Re(a),a.mode=16199,e===oe){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=me}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=me;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===oe)break t;case 16194:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=me;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=ne(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=me;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=me;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===g){for(R=m+3;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=m+7;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=me;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===me)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=me;break}if(a.lenbits=9,E={bits:a.lenbits},x=ne(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=me;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=ne(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=me;break}if(a.mode=16199,e===oe)break t;case 16199:a.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,$t(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,k=b,v=g;z=a.lencode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=16191;break}if(64&b){t.msg="invalid literal/length code",a.mode=me;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<<a.distbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(0==(240&b)){for(p=m,k=b,v=g;z=a.distcode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=me;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=me;break}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=me;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=16200);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,r-f):F(a.check,n,f,r-f)),f=l,4&a.wrap&&(a.flags?h:be(h))!==a.check){t.msg="incorrect data check",a.mode=me;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=me;break}h=0,d=0}a.mode=16208;case 16208:x=he;break t;case me:x=fe;break t;case 16210:return ce;default:return _e}return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<me&&(a.mode<16206||e!==se))&&Ze(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,t.next_out-f):F(a.check,n,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(16191===a.mode?128:0)+(16199===a.mode||16194===a.mode?256:0),(0===_&&0===f||e===se)&&x===le&&(x=ue),x},inflateEnd:t=>{if(pe(t))return _e;let e=t.state;return e.window&&(e.window=null),t.state=null,le},inflateGetHeader:(t,e)=>{if(pe(t))return _e;const a=t.state;return 0==(2&a.wrap)?_e:(a.head=e,e.done=!1,le)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return pe(t)?_e:(i=t.state,0!==i.wrap&&16190!==i.mode?_e:16190===i.mode&&(n=1,n=F(n,e,a,0),n!==i.check)?fe:(s=Ze(t,e,a,a),s?(i.mode=16210,ce):(i.havedict=1,le)))},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Te,Z_FINISH:Oe,Z_OK:Fe,Z_STREAM_END:Le,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Be,Z_MEM_ERROR:Ce}=B;function He(t){this.options=Tt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Ue.inflateInit2(this.strm,e.windowBits);if(a!==Fe)throw new Error(I[a]);if(this.header=new Se,Ue.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):"[object ArrayBuffer]"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Ue.inflateSetDictionary(this.strm,e.dictionary),a!==Fe)))throw new Error(I[a])}He.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Oe:Te,"[object ArrayBuffer]"===De.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Ue.inflate(a,r),s===Ne&&n&&(s=Ue.inflateSetDictionary(a,n),s===Fe?s=Ue.inflate(a,r):s===Be&&(s=Ne));a.avail_in>0&&s===Le&&a.state.wrap>0&&0!==t[a.next_in];)Ue.inflateReset(a),s=Ue.inflate(a,r);switch(s){case Ie:case Be:case Ne:case Ce:return this.onEnd(s),this.ended=!0,!1}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===Le))if("string"===this.options.to){let t=Bt(a.output,a.next_out),e=a.next_out-t,n=It(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==Fe||0!==o){if(s===Le)return s=Ue.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Fe&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const{Deflate:Me,deflate:je,deflateRaw:Ke,gzip:Pe}=Vt;var Ye=Me,Ge=je,Xe=B;const We=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const e=this._hasEvents?",":"";this.deflate.push(e+t,Xe.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push("]",Xe.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new Ye,this.deflate.push("[",Xe.Z_NO_FLUSH)}},qe={clear:()=>{We.clear()},addEvent:t=>We.addEvent(t),finish:()=>We.finish(),compress:t=>function(t){return Ge(t)}(t)};addEventListener("message",(function(t){const e=t.data.method,a=t.data.id,i=t.data.arg;if(e in qe&&"function"==typeof qe[e])try{const t=qe[e](i);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(t)}();("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Replay] Using compression worker");const e=new Worker(t);return new go(e)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Replay] Failed to create compression worker")}return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Replay] Using simple buffer"),new fo}({useCompression:this._options.useCompression}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this.startRecording()}_handleException(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("[Replay]",t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._options._experiments&&this._options._experiments.captureExceptions&&Vr(t)}_loadAndCheckSession(){const{type:t,session:e}=To({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:this._options.errorSampleRate>0||"buffer"===this.recordingMode});"new"===t&&this.setInitialState();const n=this.getSessionId();return e.id!==n&&(e.previousSessionId=n),this.session=e,!!this.session.sampled||(this.stop("session unsampled"),!1)}_addListeners(){try{hs.document.addEventListener("visibilitychange",this._handleVisibilityChange),hs.addEventListener("blur",this._handleWindowBlur),hs.addEventListener("focus",this._handleWindowFocus),hs.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(t){const e=xr().getScope(),n=xr().getClient();e&&e.addScopeListener((t=>e=>{if(!t.isEnabled())return;const n=function(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();return ic!==e&&e?(ic=e,!e.category||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?function(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||0===e.length)return io(t);let n=!1;const r=e.map(t=>{if(!t)return t;if("string"==typeof t)return t.length>gs?(n=!0,`${t.slice(0,gs)}…`):t;if("object"==typeof t)try{const e=On(t,7),r=JSON.stringify(e);if(r.length>gs){const t=$o(r.slice(0,gs)),e=JSON.parse(t);return n=!0,e}return e}catch(t){}return t});return io({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e):io(e)):null}(e);n&&Ja(t,n)})(t)),dn("dom",(t=>e=>{if(!t.isEnabled())return;const n=function(t){const{target:e,message:n}=function(t){const e="click"===t.name;let n,r=null;try{r=e?Xa(t.event):Qa(t.event),n=De(r,{maxStringLength:200})||"<unknown>"}catch(t){n="<unknown>"}return{target:r,message:n}}(t);return io({category:`ui.${t.name}`,...co(e,n)})}(e);if(!n)return;const r="click"===e.name,i=r&&e.event;var s,a,o;r&&t.clickDetector&&i&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&(s=t.clickDetector,a=n,o=Xa(e.event),s.handleClick(a,o)),Ja(t,n)})(t)),dn("history",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(Io(t,[n]),!1)))}}(t)),function(t){const e=xr().getClient();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:s,networkRequestHeaders:a,networkResponseHeaders:o}=t.getOptions(),c={replay:t,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:s,networkRequestHeaders:a,networkResponseHeaders:o};e&&e.on?e.on("beforeAddBreadcrumb",(t,e)=>function(t,e,n){if(e.data)try{(function(t){return"xhr"===t.category})(e)&&function(t){return t&&t.xhr}(n)&&(function(t,e,n){const{xhr:r,input:i}=e,s=Vo(i,n.textEncoder),a=r.getResponseHeader("content-length")?qo(r.getResponseHeader("content-length")):Vo(r.response,n.textEncoder);void 0!==s&&(t.data.request_body_size=s),void 0!==a&&(t.data.response_body_size=a)}(e,n,t),async function(t,e,n){try{const r=function(t,e,n){const{startTimestamp:r,endTimestamp:i,input:s,xhr:a}=e,{url:o,method:c,status_code:l=0,request_body_size:u,response_body_size:d}=t.data;if(!o)return null;if(!tc(o,n.networkDetailAllowUrls)||tc(o,n.networkDetailDenyUrls))return{startTimestamp:r,endTimestamp:i,url:o,method:c,statusCode:l,request:Ko(u),response:Ko(d)};const p=a[cn],h=p?Xo(p.request_headers,n.networkRequestHeaders):{},f=Xo(function(t){const e=t.getAllResponseHeaders();return e?e.split("\r\n").reduce((t,e)=>{const[n,r]=e.split(": ");return t[n.toLowerCase()]=r,t},{}):{}}(a),n.networkResponseHeaders);return{startTimestamp:r,endTimestamp:i,url:o,method:c,statusCode:l,request:Jo(h,u,n.networkCaptureBodies?Zo(s):void 0),response:Jo(f,d,n.networkCaptureBodies?e.xhr.responseText:void 0)}}(t,e,n),i=Wo("resource.xhr",r);No(n.replay,i)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("[Replay] Failed to capture fetch breadcrumb",t)}}(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return t&&t.response}(n)&&(function(t,e,n){const{input:r,response:i}=e,s=Vo(ec(r),n.textEncoder),a=i?qo(i.headers.get("content-length")):void 0;void 0!==s&&(t.data.request_body_size=s),void 0!==a&&(t.data.response_body_size=a)}(e,n,t),async function(t,e,n){try{const r=await async function(t,e,n){const{startTimestamp:r,endTimestamp:i}=e,{url:s,method:a,status_code:o=0,request_body_size:c,response_body_size:l}=t.data,u=tc(s,n.networkDetailAllowUrls)&&!tc(s,n.networkDetailDenyUrls),d=u?function({networkCaptureBodies:t,networkRequestHeaders:e},n,r){var i,s;return Jo((s=e,1===(i=n).length&&"string"!=typeof i[0]?rc(i[0],s):2===i.length?rc(i[1],s):{}),r,t?Zo(ec(n)):void 0)}(n,e.input,c):Ko(c),p=await async function(t,{networkCaptureBodies:e,textEncoder:n,networkResponseHeaders:r},i,s){if(!t&&void 0!==s)return Ko(s);const a=nc(i.headers,r);if(!e&&void 0!==s)return Jo(a,s,void 0);try{const r=i.clone(),o=await async function(t){try{return await t.text()}catch(t){return}}(r),c=o&&o.length&&void 0===s?Vo(o,n):s;return t?Jo(a,c,e?o:void 0):Ko(c)}catch(t){return Jo(a,s,void 0)}}(u,n,e.response,l);return{startTimestamp:r,endTimestamp:i,url:s,method:a,statusCode:o,request:d,response:p}}(t,e,n),i=Wo("resource.fetch",r);No(n.replay,i)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("[Replay] Failed to capture fetch breadcrumb",t)}}(e,n,t))}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("Error when enriching network breadcrumb")}}(c,t,e)):(dn("fetch",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,fetchData:r,response:i}=t;if(!n)return null;const{method:s,url:a}=r;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:a,data:{method:s,statusCode:i?i.status:void 0}}}(e);No(t,n)}}(t)),dn("xhr",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,xhr:r}=t,i=r[cn];if(!e||!n||!i)return null;const{method:s,url:a,status_code:o}=i;return void 0===a?null:{type:"resource.xhr",name:a,start:e/1e3,end:n/1e3,data:{method:s,statusCode:o}}}(e);No(t,n)}}(t)))}catch(t){}}(t),vr(function(t,e=!1){const n=e?Do(t):void 0;return(e,r)=>{if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!Co(e)&&!Ro(e))return e;if(function(t,e){return!(t.type||!t.exception||!t.exception.values||!t.exception.values.length)&&(!(!e.originalException||!e.originalException.__rrweb__)||t.exception.values.some(t=>!!(t.stacktrace&&t.stacktrace.frames&&t.stacktrace.frames.length)&&t.stacktrace.frames.some(t=>t.filename&&t.filename.includes("/rrweb/src/"))))}(e,r)&&!t.getOptions()._experiments.captureExceptions)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Replay] Ignoring error from rrweb internals",e),null;const i=function(t,e){return"buffer"===t.recordingMode&&e.message!==ms&&!(!e.exception||e.type)&&So(t.getOptions().errorSampleRate)}(t,e);return(i||"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),n&&n(e,{statusCode:200}),e}}(t,!sc(n))),sc(n)&&(n.on("afterSendEvent",Do(t)),n.on("createDsc",e=>{const n=t.getSessionId();n&&t.isEnabled()&&"session"===t.recordingMode&&(e.replay_id=n)}),n.on("startTransaction",e=>{t.lastTransaction=e}),n.on("finishTransaction",e=>{t.lastTransaction=e}))}(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}"PerformanceObserver"in hs&&(this._performanceObserver=function(t){const e=new PerformanceObserver(e=>{const n=function(t,e){const[n,r,i]=t.reduce((t,e)=>("navigation"===e.entryType?t[0].push(e):"largest-contentful-paint"===e.entryType?t[1].push(e):t[2].push(e),t),[[],[],[]]),s=[],a=[];let o=r.length?r[r.length-1]:void 0;return e.forEach(t=>{if("largest-contentful-paint"!==t.entryType)if("navigation"!==t.entryType)s.push(t);else{const e=t;t.duration>0&&!n.find(uo(e))&&!a.find(uo(e))&&a.push(e)}else(!o||o.startTime<t.startTime)&&(o=t)}),[...o?[o]:[],...n,...i,...s,...a].sort((t,e)=>t.startTime-e.startTime)}(t.performanceEvents,e.getEntries());t.performanceEvents=n});return["element","event","first-input","largest-contentful-paint","layout-shift","longtask","navigation","paint","resource"].forEach(t=>{try{e.observe({type:t,buffered:!0})}catch(t){}}),e}(this))}_removeListeners(){try{hs.document.removeEventListener("visibilitychange",this._handleVisibilityChange),hs.removeEventListener("blur",this._handleWindowBlur),hs.removeEventListener("focus",this._handleWindowFocus),hs.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceObserver&&(this._performanceObserver.disconnect(),this._performanceObserver=null)}catch(t){this._handleException(t)}}__init13(){this._handleVisibilityChange=()=>{"visible"===hs.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init14(){this._handleWindowBlur=()=>{const t=io({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init15(){this._handleWindowFocus=()=>{const t=io({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init16(){this._handleKeyboardEvent=t=>{!function(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=function(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:a}=t;if(!a||function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}(a)||!s)return null;if(!(e||r||i)&&1===s.length)return null;const o=De(a,{maxStringLength:200})||"<unknown>";return io({category:"ui.keyDown",message:o,data:{...co(a,o).data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s}})}(e);n&&Ja(t,n)}(this,t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;const e=bo(this.session,this.timeouts);t&&!e&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){this.session&&(this.checkAndHandleExpiredSession()?t&&this._createCustomBreadcrumb(t):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Replay] Document has become active, but session has expired"))}_triggerFullSnapshot(t=!0){try{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Replay] Taking full rrweb snapshot"),Ka.takeFullSnapshot(t)}catch(t){this._handleException(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:Zs.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=[...this.performanceEvents];return this.performanceEvents=[],Promise.all(Io(this,function(t){return t.map(cc).filter(Boolean)}(t)))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:e}=this;if(!t||!e)return;if(t.segmentId)return;const n=e.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){if(this.session&&this.eventBuffer){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await async function(t){try{return Promise.all(Io(t,[ac(hs.performance.memory)]))}catch(t){return[]}}(this),this.eventBuffer))try{this._updateInitialTimestampFromEventBuffer();const t=await this.eventBuffer.finish(),e=this.session.id,n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await pc({replayId:e,recordingData:t,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:Date.now()})}catch(t){this._handleException(t),this.stop("sendReplay");const e=xr().getClient();e&&e.recordDroppedEvent("send_error","replay")}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("[Replay] No session or eventBuffer found to flush.")}__init17(){this._flush=async({force:t=!1}={})=>{if(this._isEnabled||t)if(this.checkAndHandleExpiredSession())if(this.session){if(this._debouncedFlush.cancel(),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=null);try{await this._flushLock}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error(t)}finally{this._debouncedFlush()}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("[Replay] No session found to flush.");else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("[Replay] Attempting to finish replay event after session expired.")}}_maybeSaveSession(){this.session&&this._options.stickySession&&Eo(this.session)}__init18(){this._onMutationHandler=t=>{const e=t.length,n=this._options.mutationLimit,r=n&&e>n;if(e>this._options.mutationBreadcrumbLimit||r){const t=io({category:"replay.mutations",data:{count:e,limit:r}});this._createCustomBreadcrumb(t)}return!r||(this.stop("mutationLimit"),!1)}}}function mc(t,e,n,r){const i=[...t,..."string"==typeof r?r.split(","):[],...e];return void 0!==n&&("string"==typeof n&&i.push(`.${n}`),console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")),i.join(",")}function _c({mask:t,unmask:e,block:n,unblock:r,ignore:i,blockClass:s,blockSelector:a,maskTextClass:o,maskTextSelector:c,ignoreClass:l}){const u=mc(t,[".sentry-mask","[data-sentry-mask]"],o,c),d=mc(e,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:u,unmaskTextSelector:d,maskInputSelector:u,unmaskInputSelector:d,blockSelector:mc(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],s,a),unblockSelector:mc(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:mc(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return s instanceof RegExp&&(p.blockClass=s),o instanceof RegExp&&(p.maskTextClass=o),p}function gc(){return"undefined"!=typeof window&&(!Dn()||"undefined"!=typeof process&&"renderer"===process.type)}const yc='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',vc=["content-length","content-type","accept"];let bc=!1;class Sc{static __initStatic(){this.id="Replay"}__init(){this.name=Sc.id}constructor({flushMinDelay:t=5e3,flushMaxDelay:e=5500,stickySession:n=!0,useCompression:r=!0,_experiments:i={},sessionSampleRate:s,errorSampleRate:a,maskAllText:o=!0,maskAllInputs:c=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:u=750,mutationLimit:d=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:h=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:m=[],networkCaptureBodies:_=!0,networkRequestHeaders:g=[],networkResponseHeaders:y=[],mask:v=[],unmask:b=[],block:S=[],unblock:E=[],ignore:w=[],maskFn:k,beforeAddRecordingEvent:T,blockClass:x,blockSelector:C,maskInputOptions:R,maskTextClass:D,maskTextSelector:I,ignoreClass:N}={}){if(Sc.prototype.__init.call(this),this._recordingOptions={maskAllInputs:c,maskAllText:o,maskInputOptions:{...R||{},password:!0},maskTextFn:k,maskInputFn:k,..._c({mask:v,unmask:b,block:S,unblock:E,ignore:w,blockClass:x,blockSelector:C,maskTextClass:D,maskTextSelector:I,ignoreClass:N}),slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0},this._initialOptions={flushMinDelay:t,flushMaxDelay:e,stickySession:n,sessionSampleRate:s,errorSampleRate:a,useCompression:r,blockAllMedia:l,maskAllInputs:c,maskAllText:o,mutationBreadcrumbLimit:u,mutationLimit:d,slowClickTimeout:p,slowClickIgnoreSelectors:h,networkDetailAllowUrls:f,networkDetailDenyUrls:m,networkCaptureBodies:_,networkRequestHeaders:Ec(g),networkResponseHeaders:Ec(y),beforeAddRecordingEvent:T,_experiments:i},"number"==typeof s&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${s} })`),this._initialOptions.sessionSampleRate=s),"number"==typeof a&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${a} })`),this._initialOptions.errorSampleRate=a),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${yc}`:yc),this._isInitialized&&gc())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return bc}set _isInitialized(t){bc=t}setupOnce(){gc()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop():Promise.resolve()}flush(t){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&this._replay.initializeSampling()}_setup(){const t=function(t){const e=xr().getClient(),n=e&&e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Ke(t)};return n?(null==t.sessionSampleRate&&null==t.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set."),"number"==typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate),"number"==typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(console.warn("SDK client is not available."),r)}(this._initialOptions);this._replay=new fc({options:t,recordingOptions:this._recordingOptions})}}function Ec(t){return[...vc,...t.map(t=>t.toLowerCase())]}function wc(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],s=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=s(n)):"call"!==i&&"optionalCall"!==i||(n=s((...t)=>n.call(e,...t)),e=void 0)}return n}function kc(t){const e=wc([t,"call",t=>t(),"access",t=>t.getClient,"call",t=>t(),"optionalAccess",t=>t.getOptions,"call",t=>t()]);return"sentry"!==(wc([e,"optionalAccess",t=>t.instrumenter])||"sentry")}Sc.__initStatic();class Tc{static __initStatic(){this.id="Express"}__init(){this.name=Tc.id}constructor(t={}){Tc.prototype.__init.call(this),this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat("use")}setupOnce(t,e){this._router?kc(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("Express Integration is skipped because of instrumenter configuration."):(function(t,e=[]){e.forEach(e=>function(t,e){const n=t[e];return t[e]=function(...t){return n.call(this,...function(t,e){return t.map(t=>"function"==typeof t?xc(t,e):Array.isArray(t)?t.map(t=>"function"==typeof t?xc(t,e):t):t)}(t,e))},t}(t,e))}(this._router,this._methods),function(t){const e="settings"in t;e&&void 0===t._router&&t.lazyrouter&&t.lazyrouter();const n=e?t._router:t;if(!n)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.debug("Routing instrumentation is currently only supported in Express 4."));const r=Object.getPrototypeOf(n),i=r.process_params;r.process_params=function(t,e,n,r,s){n._reconstructedRoute||(n._reconstructedRoute="");const{layerRoutePath:a,isRegex:o,isArray:c,numExtraSegments:l}=function(t){const e=wc([t,"access",t=>t.route,"optionalAccess",t=>t.path]),n=me(e),r=Array.isArray(e);if(!e)return{isRegex:n,isArray:r,numExtraSegments:0};const i=r?Math.max(e.reduce((t,e)=>t+Gn(e.toString()),0)-Gn(t.path||""),0):0,s=function(t,e){return t?e.map(t=>t.toString()).join(","):e&&e.toString()}(r,e);return{layerRoutePath:s,isRegex:n,isArray:r,numExtraSegments:i}}(t);(a||o||c)&&(n._hasParameters=!0);const u=(a||t.path||"").split("/").filter(t=>t.length>0&&(o||c||!t.includes("*"))).join("/");if(u&&u.length>0&&(n._reconstructedRoute+=`/${u}${o?"/":""}`),Gn(n.originalUrl||"")+l===Gn(n._reconstructedRoute)){n._hasParameters||n._reconstructedRoute!==n.originalUrl&&(n._reconstructedRoute=n.originalUrl?Hn(n.originalUrl):n.originalUrl);const t=r.__sentry_transaction;t&&"custom"!==t.metadata.source&&t.setName(...function(t,e={}){const n=t.method&&t.method.toUpperCase();let r="",i="url";e.customRoute||t.route?(r=e.customRoute||`${t.baseUrl||""}${t.route&&t.route.path}`,i="route"):(t.originalUrl||t.url)&&(r=Hn(t.originalUrl||t.url||""));let s="";return e.method&&n&&(s+=n),e.method&&e.path&&(s+=" "),e.path&&r&&(s+=r),[s,i]}(n,{path:!0,method:!0,customRoute:n._reconstructedRoute||"/"}))}return i.call(this,t,e,n,r,s)}}(this._router)):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("ExpressIntegration is missing an Express instance")}}function xc(t,e){const n=t.length;switch(n){case 2:return function(n,r){const i=r.__sentry_transaction;if(i){const n=i.startChild({description:t.name,op:`middleware.express.${e}`});r.once("finish",()=>{n.finish()})}return t.call(this,n,r)};case 3:return function(n,r,i){const s=wc([r.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})]);t.call(this,n,r,function(...t){wc([s,"optionalAccess",t=>t.finish,"call",t=>t()]),i.call(this,...t)})};case 4:return function(n,r,i,s){const a=wc([i.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})]);t.call(this,n,r,i,function(...t){wc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),s.call(this,...t)})};default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}Tc.__initStatic();class Cc{static __initStatic(){this.id="Postgres"}__init(){this.name=Cc.id}constructor(t={}){Cc.prototype.__init.call(this),this._usePgNative=!!t.usePgNative}loadDependency(){return this._module=this._module||Nn("pg")}setupOnce(t,e){if(kc(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("Postgres Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();if(!n)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("Postgres Integration was unable to require `pg` package."));if(this._usePgNative&&!wc([n,"access",t=>t.native,"optionalAccess",t=>t.Client]))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("Postgres Integration was unable to access 'pg-native' bindings."));const{Client:r}=this._usePgNative?n.native:n;je(r.prototype,"query",function(t){return function(n,r,i){const s=wc([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=wc([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.text,op:"db",data:{"db.system":"postgresql"}})]);if("function"==typeof i)return t.call(this,n,r,function(t,e){wc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e)});if("function"==typeof r)return t.call(this,n,function(t,e){wc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),r(t,e)});const o=void 0!==r?t.call(this,n,r):t.call(this,n);return _e(o)?o.then(t=>(wc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),t)):(wc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),o)}})}}Cc.__initStatic();class Rc{constructor(){Rc.prototype.__init.call(this)}static __initStatic(){this.id="Mysql"}__init(){this.name=Rc.id}loadDependency(){return this._module=this._module||Nn("mysql/lib/Connection.js")}setupOnce(t,e){if(kc(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("Mysql Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?je(n,"createQuery",function(t){return function(n,r,i){const s=wc([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=wc([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.sql,op:"db",data:{"db.system":"mysql"}})]);return"function"==typeof i?t.call(this,n,r,function(t,e,n){wc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e,n)}):"function"==typeof r?t.call(this,n,function(t,e,n){wc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),r(t,e,n)}):t.call(this,n,r,i)}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("Mysql Integration was unable to require `mysql` package.")}}Rc.__initStatic();const Dc=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],Ic={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]};class Nc{static __initStatic(){this.id="Mongo"}__init(){this.name=Nc.id}constructor(t={}){Nc.prototype.__init.call(this),this._operations=Array.isArray(t.operations)?t.operations:Dc,this._describeOperations=!("describeOperations"in t)||t.describeOperations,this._useMongoose=!!t.useMongoose}loadDependency(){return this._module=this._module||Nn(this._useMongoose?"mongoose":"mongodb")}setupOnce(t,e){if(kc(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("Mongo Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?this._instrumentOperations(n.Collection,this._operations,e):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error(`Mongo Integration was unable to require \`${this._useMongoose?"mongoose":"mongodb"}\` package.`)}_instrumentOperations(t,e,n){e.forEach(e=>this._patchOperation(t,e,n))}_patchOperation(t,e,n){if(!(e in t.prototype))return;const r=this._getSpanContextFromOperationArguments.bind(this);je(t.prototype,e,function(t){return function(...i){const s=i[i.length-1],a=wc([n().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]);if("function"!=typeof s||"mapReduce"===e&&2===i.length){const n=wc([a,"optionalAccess",t=>t.startChild,"call",t=>t(r(this,e,i))]),s=t.call(this,...i);if(_e(s))return s.then(t=>(wc([n,"optionalAccess",t=>t.finish,"call",t=>t()]),t));if((o=s)&&"object"==typeof o&&o.once&&"function"==typeof o.once){const t=s;try{t.once("close",()=>{wc([n,"optionalAccess",t=>t.finish,"call",t=>t()])})}catch(t){wc([n,"optionalAccess",t=>t.finish,"call",t=>t()])}return t}return wc([n,"optionalAccess",t=>t.finish,"call",t=>t()]),s}var o;const c=wc([a,"optionalAccess",t=>t.startChild,"call",t=>t(r(this,e,i.slice(0,-1)))]);return t.call(this,...i.slice(0,-1),function(t,e){wc([c,"optionalAccess",t=>t.finish,"call",t=>t()]),s(t,e)})}})}_getSpanContextFromOperationArguments(t,e,n){const r={collectionName:t.collectionName,dbName:t.dbName,namespace:t.namespace,"db.system":"mongodb"},i={op:"db",description:e,data:r},s=Ic[e],a=Array.isArray(this._describeOperations)?this._describeOperations.includes(e):this._describeOperations;if(!s||!a)return i;try{if("mapReduce"===e){const[t,e]=n;r[s[0]]="string"==typeof t?t:t.name||"<anonymous>",r[s[1]]="string"==typeof e?e:e.name||"<anonymous>"}else for(let t=0;t<s.length;t++)r[s[t]]=JSON.stringify(n[t])}catch(t){}return i}}Nc.__initStatic();class Oc{static __initStatic(){this.id="Prisma"}__init(){this.name=Oc.id}constructor(t={}){var e;Oc.prototype.__init.call(this),(e=t.client)&&e.$use&&!t.client._sentryInstrumented?(Fe(t.client,"_sentryInstrumented",!0),t.client.$use((t,e)=>{if(kc(xr))return e(t);const n=t.action,r=t.model;return function(t,e,n=(()=>{})){const r={...t};void 0!==r.name&&void 0===r.description&&(r.description=r.name);const i=xr(),s=i.getScope(),a=s.getSpan(),o=function(){if(Dr())return a?a.startChild(r):i.startTransaction(r)}();function c(){o&&o.finish(),i.getScope().setSpan(a)}let l;s.setSpan(o);try{l=e(o)}catch(t){throw o&&o.setStatus("internal_error"),n(t),c(),t}return _e(l)?Promise.resolve(l).then(()=>{c()},t=>{o&&o.setStatus("internal_error"),n(t),c()}):c(),l}({name:r?`${r} ${n}`:n,op:"db.sql.prisma",data:{"db.system":"prisma"}},()=>e(t))})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(t.client)}`)}setupOnce(){}}Oc.__initStatic();class Ac{constructor(){Ac.prototype.__init.call(this)}static __initStatic(){this.id="GraphQL"}__init(){this.name=Ac.id}loadDependency(){return this._module=this._module||Nn("graphql/execution/execute.js")}setupOnce(t,e){if(kc(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("GraphQL Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?je(n,"execute",function(t){return function(...n){const r=e().getScope(),i=wc([r,"optionalAccess",t=>t.getSpan,"call",t=>t()]),s=wc([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:"execute",op:"graphql.execute"})]);wc([r,"optionalAccess",t=>t.setSpan,"call",t=>t(s)]);const a=t.call(this,...n);return _e(a)?a.then(t=>(wc([s,"optionalAccess",t=>t.finish,"call",t=>t()]),wc([r,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),t)):(wc([s,"optionalAccess",t=>t.finish,"call",t=>t()]),wc([r,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),a)}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("GraphQL Integration was unable to require graphql/execution package.")}}Ac.__initStatic();class Uc{static __initStatic(){this.id="Apollo"}__init(){this.name=Uc.id}constructor(t={useNestjs:!1}){Uc.prototype.__init.call(this),this._useNest=!!t.useNestjs}loadDependency(){return this._module=this._useNest?this._module||Nn("@nestjs/graphql"):this._module||Nn("apollo-server-core"),this._module}setupOnce(t,e){if(kc(e))("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("Apollo Integration is skipped because of instrumenter configuration.");else if(this._useNest){const t=this.loadDependency();if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("Apollo-NestJS Integration was unable to require @nestjs/graphql package."));je(t.GraphQLFactory.prototype,"mergeWithSchema",function(t){return function(...n){return je(this.resolversExplorerService,"explore",function(t){return function(){return Pc(Rn(t.call(this)),e)}}),t.call(this,...n)}})}else{const t=this.loadDependency();if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.error("Apollo Integration was unable to require apollo-server-core package."));je(t.ApolloServerBase.prototype,"constructSchema",function(t){return function(){if(!this.config.resolvers)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this.config.schema?(Ue.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead."),Ue.warn()):this.config.modules&&Ue.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),Ue.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),t.call(this);const n=Rn(this.config.resolvers);return this.config.resolvers=Pc(n,e),t.call(this)}})}}}function Pc(t,e){return t.map(t=>(Object.keys(t).forEach(n=>{Object.keys(t[n]).forEach(r=>{"function"==typeof t[n][r]&&function(t,e,n,r){je(t[e],n,function(t){return function(...i){const s=wc([r().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=wc([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:`${e}.${n}`,op:"graphql.resolve"})]),o=t.call(this,...i);return _e(o)?o.then(t=>(wc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),t)):(wc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),o)}})}(t,n,r,e)})}),t))}Uc.__initStatic();const Bc=ke,Mc=(t,e,n)=>{let r,i;return s=>{e.value>=0&&(s||n)&&(i=e.value-(r||0),(i||void 0===r)&&(r=e.value,e.delta=i,t(e)))}},Lc=()=>Bc.__WEB_VITALS_POLYFILL__?Bc.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=Bc.performance.timing,e=Bc.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"};for(const e in t)"navigationStart"!==e&&"toJSON"!==e&&(n[e]=Math.max(t[e]-t.navigationStart,0));return n})()):Bc.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],zc=()=>{const t=Lc();return t&&t.activationStart||0},Hc=(t,e)=>{const n=Lc();let r="navigate";return n&&(r=Bc.document.prerendering||zc()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Gc=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(t=>{e(t.getEntries())});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},Yc=(t,e)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==Bc.document.visibilityState||(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)};let jc=-1;const Fc=()=>(jc<0&&(jc="hidden"!==Bc.document.visibilityState||Bc.document.prerendering?Infinity:0,Yc(({timeStamp:t})=>{jc=t},!0)),{get firstHiddenTime(){return jc}}),$c={};function Vc(t){return"number"==typeof t&&isFinite(t)}function qc(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}function Zc(t){return t/1e3}function Wc(){return Bc&&Bc.addEventListener&&Bc.performance}let Kc,Jc,Xc=0,Qc={};function tl(t,e,n,r,i,s){const a=s?e[s]:e[`${n}End`],o=e[`${n}Start`];o&&a&&qc(t,{op:"browser",description:i||n,startTimestamp:r+Zc(o),endTimestamp:r+Zc(a)})}const el=["localhost",/^\/(?!\/)/],nl={traceFetch:!0,traceXHR:!0,tracingOrigins:el,tracePropagationTargets:el,_experiments:{}};function rl(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:s,_experiments:a}={traceFetch:nl.traceFetch,traceXHR:nl.traceXHR,...t},o="function"==typeof s?s:t=>!0,c=t=>function(t,e){return Ye(t,e||el)}(t,r||i),l={};e&&dn("fetch",t=>{const e=function(t,e,n,r){if(!Dr()||!t.fetchData)return;const i=e(t.fetchData.url);if(t.endTimestamp&&i){const e=t.fetchData.__span;if(!e)return;const n=r[e];if(n){if(t.response){n.setHttpStatus(t.response.status);const e=t.response&&t.response.headers&&t.response.headers.get("content-length"),r=parseInt(e);r>0&&n.setData("http.response_content_length",r)}else t.error&&n.setStatus("internal_error");n.finish(),delete r[e]}return}const s=xr(),a=s.getScope(),o=s.getClient(),c=a.getSpan(),{method:l,url:u}=t.fetchData,d=i&&c?c.startChild({data:{url:u,type:"fetch","http.method":l},description:`${l} ${u}`,op:"http.client"}):void 0;if(d&&(t.fetchData.__span=d.spanId,r[d.spanId]=d),n(t.fetchData.url)&&o){const e=t.args[0];t.args[1]=t.args[1]||{};const n=t.args[1];n.headers=function(t,e,n,r){const i=n.getSpan(),s=i&&i.transaction,{traceId:a,sampled:o,dsc:c}=n.getPropagationContext(),l=i?i.toTraceparent():rr(a,void 0,o),u=tr(s?s.getDynamicSamplingContext():c||Pr(a,e,n)),d="undefined"!=typeof Request&&ye(t,Request)?t.headers:r.headers;if(d){if("undefined"!=typeof Headers&&ye(d,Headers)){const t=new Headers(d);return t.append("sentry-trace",l),u&&t.append(Kn,u),t}if(Array.isArray(d)){const t=[...d,["sentry-trace",l]];return u&&t.push([Kn,u]),t}{const t="baggage"in d?d.baggage:void 0,e=[];return Array.isArray(t)?e.push(...t):t&&e.push(t),u&&e.push(u),{...d,"sentry-trace":l,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":l,baggage:u}}(e,o,a,n)}return d}(t,o,c,l);wc([a,"optionalAccess",t=>t.enableHTTPTimings])&&e&&il(e)}),n&&dn("xhr",t=>{const e=function(t,e,n,r){const i=t.xhr,s=i&&i[cn];if(!Dr()||i&&i.__sentry_own_request__||!i||!s)return;const a=e(s.url);if(t.endTimestamp&&a){const t=i.__sentry_xhr_span_id__;if(!t)return;const e=r[t];return void(e&&(e.setHttpStatus(s.status_code),e.finish(),delete r[t]))}const o=xr(),c=o.getScope(),l=c.getSpan(),u=a&&l?l.startChild({data:{...s.data,type:"xhr","http.method":s.method,url:s.url},description:`${s.method} ${s.url}`,op:"http.client"}):void 0;if(u&&(i.__sentry_xhr_span_id__=u.spanId,r[i.__sentry_xhr_span_id__]=u),i.setRequestHeader&&n(s.url))if(u){const t=u&&u.transaction,e=tr(t&&t.getDynamicSamplingContext());sl(i,u.toTraceparent(),e)}else{const t=o.getClient(),{traceId:e,sampled:n,dsc:r}=c.getPropagationContext();sl(i,rr(e,void 0,n),tr(r||(t?Pr(e,t,c):void 0)))}return u}(t,o,c,l);wc([a,"optionalAccess",t=>t.enableHTTPTimings])&&e&&il(e)})}function il(t){const e=t.data.url,n=new PerformanceObserver(r=>{r.getEntries().forEach(r=>{"fetch"!==r.initiatorType&&"xmlhttprequest"!==r.initiatorType||!r.name.endsWith(e)||(function(t){const e=t.nextHopProtocol.split("/")[1]||"none",n=[];return e&&n.push(["network.protocol.version",e]),Wn?[...n,["http.request.connect_start",(Wn+t.connectStart)/1e3],["http.request.request_start",(Wn+t.requestStart)/1e3],["http.request.response_start",(Wn+t.responseStart)/1e3]]:n}(r).forEach(e=>t.setData(...e)),n.disconnect())})});n.observe({entryTypes:["resource"]})}function sl(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(Kn,n)}catch(t){}}const al={...Mr,markBackgroundTransactions:!0,routingInstrumentation:function(t,e=!0,n=!0){if(!Bc||!Bc.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("Could not initialize routing instrumentation due to invalid location"));let r,i=Bc.location.href;e&&(r=t({name:Bc.location.pathname,startTimestamp:Wn?Wn/1e3:void 0,op:"pageload",metadata:{source:"url"}})),n&&dn("history",({to:e,from:n})=>{void 0===n&&i&&-1!==i.indexOf(e)?i=void 0:n!==e&&(i=void 0,r&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`[Tracing] Finishing current transaction with op: ${r.op}`),r.finish()),r=t({name:Bc.location.pathname,op:"navigation",metadata:{source:"url"}}))})},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,...nl};class ol{__init(){this.name="BrowserTracing"}__init2(){this._hasSetTracePropagationTargets=!1}constructor(t){ol.prototype.__init.call(this),ol.prototype.__init2.call(this),$r(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!(!t||!t.tracePropagationTargets&&!t.tracingOrigins)),this.options={...al,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=function(){const t=Wc();if(t&&Wn){t.mark&&Bc.performance.mark("sentry-tracing-init"),(t=>{const e=Fc(),n=Hc("FID");let r;const i=t=>{t.startTime<e.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),r(!0))},s=t=>{t.forEach(i)},a=Gc("first-input",s);r=Mc(t=>{const e=t.entries.pop();if(!e)return;const n=Zc(Wn),r=Zc(e.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Measurements] Adding FID"),Qc.fid={value:t.value,unit:"millisecond"},Qc["mark.fid"]={value:n+r,unit:"second"}},n),a&&Yc(()=>{s(a.takeRecords()),a.disconnect()},!0)})();const e=(t=>{const e=Hc("CLS",0);let n,r=0,i=[];const s=t=>{t.forEach(t=>{t.hadRecentInput||(r&&0!==i.length&&t.startTime-i[i.length-1].startTime<1e3&&t.startTime-i[0].startTime<5e3?(r+=t.value,i.push(t)):(r=t.value,i=[t]),r>e.value&&(e.value=r,e.entries=i,n&&n()))})},a=Gc("layout-shift",s);if(a){n=Mc(t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Measurements] Adding CLS"),Qc.cls={value:t.value,unit:""},Jc=e)},e);const t=()=>{s(a.takeRecords()),n(!0)};return Yc(t),t}})(),n=(t=>{const e=Fc(),n=Hc("LCP");let r;const i=t=>{const i=t[t.length-1];if(i){const t=Math.max(i.startTime-zc(),0);t<e.firstHiddenTime&&(n.value=t,n.entries=[i],r())}},s=Gc("largest-contentful-paint",i);if(s){r=Mc(t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Measurements] Adding LCP"),Qc.lcp={value:t.value,unit:"millisecond"},Kc=e)},n);const t=()=>{$c[n.id]||(i(s.takeRecords()),s.disconnect(),$c[n.id]=!0,r(!0))};return["keydown","click"].forEach(e=>{addEventListener(e,t,{once:!0,capture:!0})}),Yc(t,!0),t}})();return()=>{e&&e(),n&&n()}}return()=>{}}(),this.options.enableLongTask&&Gc("longtask",t=>{for(const e of t){const t=Ir();if(!t)return;const n=Zc(Wn+e.startTime),r=Zc(e.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:n,endTimestamp:n+r})}}),this.options._experiments.enableInteractions&&Gc("event",t=>{for(const e of t){const t=Ir();if(!t)return;if("click"===e.name){const n=Zc(Wn+e.startTime),r=Zc(e.duration);t.startChild({description:De(e.target),op:`ui.interaction.${e.name}`,startTimestamp:n,endTimestamp:n+r})}}},{durationThreshold:0})}setupOnce(t,e){this._getCurrentHub=e;const n=e().getClient(),r=n&&n.getOptions(),{routingInstrumentation:i,startTransactionOnLocationChange:s,startTransactionOnPageLoad:a,markBackgroundTransactions:o,traceFetch:c,traceXHR:l,shouldCreateSpanForRequest:u,_experiments:d}=this.options,p=r&&r.tracePropagationTargets,h=p||this.options.tracePropagationTargets;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&p&&Ue.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),i(t=>{const n=this._createRouteTransaction(t);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,t,e),n},a,s),o&&(Bc&&Bc.document?Bc.document.addEventListener("visibilitychange",()=>{const t=Ir();if(Bc.document.hidden&&t){const e="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("[Tracing] Could not set up background tab detection due to lack of global document")),d.enableInteractions&&this._registerInteractionListener(),rl({traceFetch:c,traceXHR:l,tracePropagationTargets:h,shouldCreateSpanForRequest:u,_experiments:{enableHTTPTimings:d.enableHTTPTimings}})}_createRouteTransaction(t){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`));const e=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:r,finalTimeout:i,heartbeatInterval:s}=this.options,a="pageload"===t.op,o=a?cl("sentry-trace"):"",c=a?cl("baggage"):"",{traceparentData:l,dynamicSamplingContext:u,propagationContext:d}=function(t,e){const n=function(t){if(!t)return;const e=t.match(nr);if(!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(t),r=function(t){if(!de(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce((t,e)=>({...t,...er(e)}),{});else{if(!t)return;e=er(t)}const n=Object.entries(e).reduce((t,[e,n])=>(e.match(Xn)&&(t[e.slice(Jn.length)]=n),t),{});return Object.keys(n).length>0?n:void 0}(e),{traceId:i,parentSpanId:s,parentSampled:a}=n||{},o={traceId:i||En(),spanId:En().substring(16),sampled:void 0!==a&&a};return s&&(o.parentSpanId=s),r&&(o.dsc=r),{traceparentData:n,dynamicSamplingContext:r,propagationContext:o}}(o,c),p={...t,...l,metadata:{...t.metadata,dynamicSamplingContext:l&&!u?{}:u},trimEnd:!0},h="function"==typeof n?n(p):p,f=void 0===h?{...p,sampled:!1}:h;f.metadata=f.name!==p.name?{...f.metadata,source:"custom"}:f.metadata,this._latestRouteName=f.name,this._latestRouteSource=f.metadata&&f.metadata.source,!1===f.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`[Tracing] Will not send ${f.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`[Tracing] Starting ${f.op} transaction on scope`);const{location:m}=Bc,_=Fr(e,f,r,i,!0,{location:m},s);return e.getScope().setPropagationContext(a&&l?d:{traceId:_.traceId,spanId:_.spanId,parentSpanId:_.parentSpanId,sampled:!!_.sampled}),_.registerBeforeFinishCallback(t=>{this._collectWebVitals(),function(t){const e=Wc();if(!e||!Bc.performance.getEntries||!Wn)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Tracing] Adding & adjusting spans using Performance API");const n=Zc(Wn),r=e.getEntries();let i,s;if(r.slice(Xc).forEach(e=>{const r=Zc(e.startTime),a=Zc(e.duration);if(!("navigation"===t.op&&n+r<t.startTimestamp))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{tl(t,e,r,n)}),tl(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),tl(t,e,"fetch",n,"cache","domainLookupStart"),tl(t,e,"domainLookup",n,"DNS"),function(t,e,n){qc(t,{op:"browser",description:"request",startTimestamp:n+Zc(e.requestStart),endTimestamp:n+Zc(e.responseEnd)}),qc(t,{op:"browser",description:"response",startTimestamp:n+Zc(e.responseStart),endTimestamp:n+Zc(e.responseEnd)})}(t,e,n)}(t,e,n),i=n+Zc(e.responseStart),s=n+Zc(e.requestStart);break;case"mark":case"paint":case"measure":{!function(t,e,n,r,i){const s=i+n;qc(t,{description:e.name,endTimestamp:s+r,op:e.entryType,startTimestamp:s})}(t,e,r,a,n);const i=Fc(),s=e.startTime<i.firstHiddenTime;"first-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Measurements] Adding FP"),Qc.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Measurements] Adding FCP"),Qc.fcp={value:e.startTime,unit:"millisecond"});break}case"resource":{const i=e.name.replace(Bc.location.origin,"");!function(t,e,n,r,i,s){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return;const a={};"transferSize"in e&&(a["http.response_transfer_size"]=e.transferSize),"encodedBodySize"in e&&(a["http.response_content_length"]=e.encodedBodySize),"decodedBodySize"in e&&(a["http.decoded_response_content_length"]=e.decodedBodySize),"renderBlockingStatus"in e&&(a["resource.render_blocking_status"]=e.renderBlockingStatus);const o=s+r;qc(t,{description:n,endTimestamp:o+i,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",startTimestamp:o,data:a})}(t,e,i,r,a,n);break}}}),Xc=Math.max(r.length-1,0),function(t){const e=Bc.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),Vc(n.rtt)&&(Qc["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Vc(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),Vc(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}(t),"pageload"===t.op){"number"==typeof i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Measurements] Adding TTFB"),Qc.ttfb={value:1e3*(i-t.startTimestamp),unit:"millisecond"},"number"==typeof s&&s<=i&&(Qc["ttfb.requestTime"]={value:1e3*(i-s),unit:"millisecond"})),["fcp","fp","lcp"].forEach(e=>{if(!Qc[e]||n>=t.startTimestamp)return;const r=Qc[e].value,i=n+Zc(r),s=Math.abs(1e3*(i-t.startTimestamp));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log(`[Measurements] Normalized ${e} from ${r} to ${s} (${s-r})`),Qc[e].value=s});const e=Qc["mark.fid"];e&&Qc.fid&&(qc(t,{description:"first input delay",endTimestamp:e.value+Zc(Qc.fid.value),op:"ui.action",startTimestamp:e.value}),delete Qc["mark.fid"]),"fcp"in Qc||delete Qc.cls,Object.keys(Qc).forEach(e=>{t.setMeasurement(e,Qc[e].value,Qc[e].unit)}),function(t){Kc&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Measurements] Adding LCP Data"),Kc.element&&t.setTag("lcp.element",De(Kc.element)),Kc.id&&t.setTag("lcp.id",Kc.id),Kc.url&&t.setTag("lcp.url",Kc.url.trim().slice(0,200)),t.setTag("lcp.size",Kc.size)),Jc&&Jc.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.log("[Measurements] Adding CLS Data"),Jc.sources.forEach((e,n)=>t.setTag(`cls.source.${n+1}`,De(e.node))))}(t)}Kc=void 0,Jc=void 0,Qc={}}(t)}),_}_registerInteractionListener(){let t;const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:r}=this.options,i="ui.action.click",s=Ir();if(s&&s.op&&["navigation","pageload"].includes(s.op))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`[Tracing] Did not create ${i} transaction because a pageload or navigation transaction is in progress.`));if(t&&(t.setFinishReason("interactionInterrupted"),t.finish(),t=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`[Tracing] Did not create ${i} transaction because _getCurrentHub is invalid.`));if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`));const a=this._getCurrentHub(),{location:o}=Bc;t=Fr(a,{name:this._latestRouteName,op:i,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}},e,n,!0,{location:o},r)};["click"].forEach(t=>{addEventListener(t,e,{once:!1,capture:!0})})}}function cl(t){const e=Ce.document&&Ce.document.querySelector?Ce.document.querySelector(`meta[name=${t}]`):null;return e?e.getAttribute("content"):void 0}var ll={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ul={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},dl={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},pl={};function hl(t){return st.default.isMemo(t)?dl:pl[t.$$typeof]||ll}pl[st.default.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},pl[st.default.Memo]=dl;var fl=Object.defineProperty,ml=Object.getOwnPropertyNames,_l=Object.getOwnPropertySymbols,gl=Object.getOwnPropertyDescriptor,yl=Object.getPrototypeOf,vl=Object.prototype,bl=function t(e,n,r){if("string"!=typeof n){if(vl){var i=yl(n);i&&i!==vl&&t(e,i,r)}var s=ml(n);_l&&(s=s.concat(_l(n)));for(var a=hl(e),o=hl(n),c=0;c<s.length;++c){var l=s[c];if(!(ul[l]||r&&r[l]||o&&o[l]||a&&a[l])){var u=gl(n,l);try{fl(e,l,u)}catch(t){}}}}return e};const Sl="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/profiler.tsx";class El extends P.Component{__init(){this._mountSpan=void 0}__init2(){this._updateSpan=void 0}static __initStatic(){this.defaultProps={disabled:!1,includeRender:!0,includeUpdates:!0}}constructor(t){super(t),El.prototype.__init.call(this),El.prototype.__init2.call(this);const{name:e,disabled:n=!1}=this.props;if(n)return;const r=function(t=xr()){if(t){const e=t.getScope();if(e)return e.getTransaction()}}();r&&(this._mountSpan=r.startChild({description:`<${e}>`,op:"ui.react.mount"}))}componentDidMount(){this._mountSpan&&this._mountSpan.finish()}shouldComponentUpdate({updateProps:t,includeUpdates:e=!0}){if(e&&this._mountSpan&&t!==this.props.updateProps){const e=Object.keys(t).filter(e=>t[e]!==this.props.updateProps[e]);if(e.length>0){const t=Zn();this._updateSpan=this._mountSpan.startChild({data:{changedProps:e},description:`<${this.props.name}>`,op:"ui.react.update",startTimestamp:t})}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.finish(),this._updateSpan=void 0)}componentWillUnmount(){const{name:t,includeRender:e=!0}=this.props;this._mountSpan&&e&&this._mountSpan.startChild({description:`<${t}>`,endTimestamp:Zn(),op:"ui.react.render",startTimestamp:this._mountSpan.endTimestamp})}render(){return this.props.children}}El.__initStatic();const wl={componentStack:null,error:null,eventId:null};class kl extends P.Component{__init(){this.state=wl}__init2(){this._openFallbackReportDialog=!0}constructor(t){super(t),kl.prototype.__init.call(this),kl.prototype.__init2.call(this),kl.prototype.__init3.call(this);const e=xr().getClient();e&&e.on&&t.showDialog&&(this._openFallbackReportDialog=!1,e.on("afterSendEvent",e=>{e.type||e.event_id!==this._lastEventId||ds({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:e}){const{beforeCapture:n,onError:r,showDialog:i,dialogOptions:s}=this.props;qr(a=>{if(function(t){const e=P.version.match(/^([^.]+)/);return null!==e&&parseInt(e[0])>=17}()&&oe(t)){const n=new Error(t.message);n.name=`React ErrorBoundary ${n.name}`,n.stack=e,function(t,e){const n=new WeakMap;!function t(e,r){if(!n.has(e))return e.cause?(n.set(e,!0),t(e.cause,r)):void(e.cause=r)}(t,e)}(t,n)}n&&n(a,t,e);const o=Vr(t,{contexts:{react:{componentStack:e}}});r&&r(t,e,o),i&&(this._lastEventId=o,this._openFallbackReportDialog&&ds({...s,eventId:o})),this.setState({error:t,componentStack:e,eventId:o})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:e,eventId:n}=this.state,{onUnmount:r}=this.props;r&&r(t,e,n)}__init3(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:e,componentStack:n,eventId:r}=this.state;t&&t(e,n,r),this.setState(wl)}}render(){const{fallback:t,children:e}=this.props,n=this.state;if(n.error){let e;return e="function"==typeof t?t({error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):t,P.isValidElement(e)?e:(t&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("fallback did not produce a valid ReactElement"),null)}return"function"==typeof e?e():e}}let Tl,xl,Cl,Rl,Dl,Il,Nl,Ol;const Al={"routing.instrumentation":"react-router-v6"};function Ul(t,e,n){if(!t||0===t.length)return[e.pathname,"url"];let r="";if(n)for(let t=0;t<n.length;t++){const i=n[t],s=i.route;if(s){if(s.index)return[i.pathname,"route"];const t=s.path;if(t){const n="/"===t[0]||"/"===r[r.length-1]?t:`/${t}`;if(r+=n,i.pathname===e.pathname)return Gn(r)!==Gn(i.pathname)&&"/*"!==r.slice(-2)?[n,"route"]:[r,"route"]}}}return[e.pathname,"url"]}function Pl(){return Pl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Pl.apply(this,arguments)}var Bl,Ml=(Bl=/*#__PURE__*/Object.defineProperty({default:function(t){console.warn("[react-gtm]",t)}},"__esModule",{value:!0}))&&Bl.__esModule?Bl:{default:Bl},Ll=function(t){return t&&t.__esModule?t:{default:t}}({tags:function(t){var e=t.id,n=t.events,r=t.dataLayer,i=t.dataLayerName,s=">m_auth="+t.auth,a=">m_preview="+t.preview;return e||(0,Ml.default)("GTM Id is required"),{iframe:'\n <iframe src="https://www.googletagmanager.com/ns.html?id='+e+s+a+'>m_cookies_win=x"\n height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>',script:"\n (function(w,d,s,l,i){w[l]=w[l]||[];\n w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', "+JSON.stringify(n).slice(1,-1)+"});\n var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';\n j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'"+s+a+">m_cookies_win=x';\n f.parentNode.insertBefore(j,f);\n })(window,document,'script','"+i+"','"+e+"');",dataLayerVar:this.dataLayer(r,i)}},dataLayer:function(t,e){return"\n window."+e+" = window."+e+" || [];\n window."+e+".push("+JSON.stringify(t)+")"}}),zl=function(t){return t&&t.__esModule?t:{default:t}}({dataScript:function(t){var e=document.createElement("script");return e.innerHTML=t,e},gtm:function(t){var e=Ll.default.tags(t);return{noScript:function(){var t=document.createElement("noscript");return t.innerHTML=e.iframe,t},script:function(){var t=document.createElement("script");return t.innerHTML=e.script,t},dataScript:this.dataScript(e.dataLayerVar)}},initialize:function(t){var e=t.events,n=t.dataLayer,r=t.dataLayerName,i=t.auth,s=t.preview,a=this.gtm({id:t.gtmId,events:void 0===e?{}:e,dataLayer:n||void 0,dataLayerName:void 0===r?"dataLayer":r,auth:void 0===i?"":i,preview:void 0===s?"":s});n&&document.head.appendChild(a.dataScript),document.head.insertBefore(a.script(),document.head.childNodes[0]),document.body.insertBefore(a.noScript(),document.body.childNodes[0])},dataLayer:function(t){var e=t.dataLayer,n=t.dataLayerName,r=void 0===n?"dataLayer":n;if(window[r])return window[r].push(e);var i=Ll.default.dataLayer(e,r),s=this.dataScript(i);document.head.insertBefore(s,document.head.childNodes[0])}}),Hl=zl.default;const Gl={BrowserTracing:ol,Apollo:Uc,Express:Tc,GraphQL:Ac,Mongo:Nc,Mysql:Rc,Postgres:Cc,Prisma:Oc};function Yl(t){return Yl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yl(t)}("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&($r(),Dn()&&function(){const t=kr();if(!t.__SENTRY__)return;const e={mongodb:()=>new(In(module,"./node/integrations/mongo").Mongo),mongoose:()=>new(In(module,"./node/integrations/mongo").Mongo),mysql:()=>new(In(module,"./node/integrations/mysql").Mysql),pg:()=>new(In(module,"./node/integrations/postgres").Postgres)},n=Object.keys(e).filter(t=>!!Nn(t)).map(t=>{try{return e[t]()}catch(t){return}}).filter(t=>t);n.length>0&&(t.__SENTRY__.integrations=[...t.__SENTRY__.integrations||[],...n])}());var jl=[],Fl=jl.forEach,$l=jl.slice,Vl=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,ql={name:"cookie",lookup:function(t){var e;if(t.lookupCookie&&"undefined"!=typeof document){var n=function(t){for(var e="".concat(t,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(e))return i.substring(e.length,i.length)}return null}(t.lookupCookie);n&&(e=n)}return e},cacheUserLanguage:function(t,e){e.lookupCookie&&"undefined"!=typeof document&&function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*n*1e3)),r&&(i.domain=r),document.cookie=function(t,e,n){var r=n||{};r.path=r.path||"/";var i=encodeURIComponent(e),s="".concat(t,"=").concat(i);if(r.maxAge>0){var a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(a))}if(r.domain){if(!Vl.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(r.domain)}if(r.path){if(!Vl.test(r.path))throw new TypeError("option path is invalid");s+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s}(t,encodeURIComponent(e),i)}(e.lookupCookie,t,e.cookieMinutes,e.cookieDomain,e.cookieOptions)}},Zl={name:"querystring",lookup:function(t){var e;if("undefined"!=typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),i=0;i<r.length;i++){var s=r[i].indexOf("=");s>0&&r[i].substring(0,s)===t.lookupQuerystring&&(e=r[i].substring(s+1))}}return e}},Wl=null,Kl=function(){if(null!==Wl)return Wl;try{Wl="undefined"!==window&&null!==window.localStorage;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch(t){Wl=!1}return Wl},Jl={name:"localStorage",lookup:function(t){var e;if(t.lookupLocalStorage&&Kl()){var n=window.localStorage.getItem(t.lookupLocalStorage);n&&(e=n)}return e},cacheUserLanguage:function(t,e){e.lookupLocalStorage&&Kl()&&window.localStorage.setItem(e.lookupLocalStorage,t)}},Xl=null,Ql=function(){if(null!==Xl)return Xl;try{Xl="undefined"!==window&&null!==window.sessionStorage;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch(t){Xl=!1}return Xl},tu={name:"sessionStorage",lookup:function(t){var e;if(t.lookupSessionStorage&&Ql()){var n=window.sessionStorage.getItem(t.lookupSessionStorage);n&&(e=n)}return e},cacheUserLanguage:function(t,e){e.lookupSessionStorage&&Ql()&&window.sessionStorage.setItem(e.lookupSessionStorage,t)}},eu={name:"navigator",lookup:function(t){var e=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)e.push(navigator.languages[n]);navigator.userLanguage&&e.push(navigator.userLanguage),navigator.language&&e.push(navigator.language)}return e.length>0?e:void 0}},nu={name:"htmlTag",lookup:function(t){var e,n=t.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(e=n.getAttribute("lang")),e}},ru={name:"path",lookup:function(t){var e;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof t.lookupFromPathIndex){if("string"!=typeof n[t.lookupFromPathIndex])return;e=n[t.lookupFromPathIndex].replace("/","")}else e=n[0].replace("/","")}return e}},iu={name:"subdomain",lookup:function(t){var e="number"==typeof t.lookupFromSubdomainIndex?t.lookupFromSubdomainIndex+1:1,n="undefined"!=typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[e]}},su=/*#__PURE__*/function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}var e,n;return e=t,n=[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=function(t){return Fl.call($l.call(arguments,1),function(e){if(e)for(var n in e)void 0===t[n]&&(t[n]=e[n])}),t}(e,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(t){return t.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(ql),this.addDetector(Zl),this.addDetector(Jl),this.addDetector(tu),this.addDetector(eu),this.addDetector(nu),this.addDetector(ru),this.addDetector(iu)}},{key:"addDetector",value:function(t){this.detectors[t.name]=t}},{key:"detect",value:function(t){var e=this;t||(t=this.options.order);var n=[];return t.forEach(function(t){if(e.detectors[t]){var r=e.detectors[t].lookup(e.options);r&&"string"==typeof r&&(r=[r]),r&&(n=n.concat(r))}}),n=n.map(function(t){return e.options.convertDetectedLanguage(t)}),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(t,e){var n=this;e||(e=this.options.caches),e&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||e.forEach(function(e){n.detectors[e]&&n.detectors[e].cacheUserLanguage(t,n.options)}))}}],n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=function(t,e){if("object"!==Yl(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Yl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Yl(i)?i:String(i)),r)}var i}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function au(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}su.type="languageDetector",z.default.use(su).use(e.initReactI18next).init({resources:{en:{translation:{release:"Release",forbiddenErrorMessage:"You are not authorized to perform this operation",somethingWentWrongMessage:"Oops... something went wrong",changeLanguageText:"Change language to Polish",headerLoginButton:"Sign in",headerLogoutButton:"Sign out",loginCardTitle:"Sign in",loginFormText:"Fill both fields in order to log in to the system",loginCardCancelButton:"Cancel",loginCardSubmitButton:"Sign in",loginCardUsernameHint:"Username",loginCardPasswordHint:"Password",networkErrorHeader:"Connection issue detected",networkErrorButtonText:"Reload the page",newVersionAvailable:"New version available, the application will refresh in few seconds..."}},pl:{translation:{release:"Wydanie",forbiddenErrorMessage:"Nie masz uprawnień do wykonania tej operacji",somethingWentWrongMessage:"Ups... coś poszło nie tak",changeLanguageText:"Zmiana języka na Angielski",headerLoginButton:"Zaloguj się",headerLogoutButton:"Wyloguj",loginCardTitle:"Logowanie",loginFormText:"Wypełnij oba pola w celu zalogowania do systemu",loginCardCancelButton:"Anuluj",loginCardSubmitButton:"Zaloguj",loginCardUsernameHint:"Użytkownik",loginCardPasswordHint:"Hasło",networkErrorHeader:"Błąd połączenia",networkErrorButtonText:"Odśwież stronę",newVersionAvailable:"Dostępna jest nowa wersja, za kilka sekund nastąpi odświeżenie aplikacji..."}}},interpolation:{escapeValue:!1},react:{bindI18nStore:"added"},returnNull:!1});var ou,cu=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=au({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+s}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var s=n[i].split("="),a=s.slice(1).join("=");try{var o=decodeURIComponent(s[0]);if(r[o]=e.read(a,o),t===o)break}catch(t){}}return t?r[t]:r}},remove:function(t,e){r(t,"",au({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,au({},this.attributes,e))},withConverter:function(e){return t(au({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),lu=/*#__PURE__*/function(){function t(){}return t.recognizeRootDomain=function(){if(!this.rootDomain){var t=window.location.hostname;if(0===window.location.port.length){var e,n,r=t.split(".");e=r[0],n=r.slice(1),this.subdomain=e,this.rootDomain=n.join(".")}else this.rootDomain=t}return this.rootDomain},t.get=function(t){var e=this.recognizeRootDomain();return cu.get(t,{domain:e})},t.set=function(t,e){var n=this.recognizeRootDomain();return cu.set(t,e,{domain:n})},t.remove=function(t){var e=this.recognizeRootDomain();return cu.remove(t,{domain:e})},t}(),uu=function(t,e){void 0===e&&(e={});try{var n=function(){var n=mu.requestHeaders();return null!==n&&(e.headers=Object.assign({},n,e.headers)),Promise.resolve(fetch(t,e).catch(function(t){Vr(t),mu.setNetworkError({title:z.default.t("somethingWentWrongMessage"),details:t.message})})).then(function(t){var e=function(){if(t){var e=function(){if(401!==t.status)return Promise.resolve(t.clone().text()).then(function(e){switch(t.status){case 403:se.error(z.default.t("forbiddenErrorMessage"));break;case 500:se.error(/*#__PURE__*/B.default.createElement(B.default.Fragment,null,/*#__PURE__*/B.default.createElement(d.Typography,{mr:e?2:0},z.default.t("somethingWentWrongMessage}")),e&&/*#__PURE__*/B.default.createElement(d.Tooltip,{title:e,arrow:!0},/*#__PURE__*/B.default.createElement(H.default,null))))}});mu.removeSession(),mu.removeCurrentUser(),mu.setNotAuthorizedLoginStatus()}();if(e&&e.then)return e.then(function(){})}}();return e&&e.then?e.then(function(){return t}):t})},r=function(){if(mu.isLoggedIn()&&!e.refresh){var t=mu.session,n=t.createdAt,r=t.expiresIn,i=function(){if(n+r-5<Math.round(+new Date/1e3)){var t=mu.refreshTokenPromise?Promise.resolve(mu.refreshTokenPromise).then(function(){}):Promise.resolve(mu.refresh()).then(function(){});if(t&&t.then)return t.then(function(){})}}();if(i&&i.then)return i.then(function(){})}}();return Promise.resolve(r&&r.then?r.then(n):n())}catch(t){return Promise.reject(t)}},du=new(/*#__PURE__*/function(){function t(){this.currentUser=null,c.makeObservable(this,{setCurrentUser:c.action,removeCurrentUser:c.action,currentUser:c.observable.deep,getCurrentUserJS:c.computed})}var e,n,r=t.prototype;return r.setCurrentUser=function(t){this.currentUser=t},r.removeCurrentUser=function(){this.currentUser=null},e=t,(n=[{key:"getCurrentUserJS",get:function(){return c.toJS(this.currentUser)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key))?i:String(i),r)}var i}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()),pu=function(){this.user={},this.accessToken=null,this.refreshToken=null,this.tokenType=null,this.createdAt=null,this.expiresIn=null},hu=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.setAuthConfig=function(t){var e=t.clientId,n=t.redirectUri;this.baseUrl=t.baseUrl,this.clientId=e,this.redirectUri=n},e.authorize=function(t){try{var e,n=this,r=new FormData,i=t.scope,s=t.refresh,a=t.code,o=t.username,c=t.password;return r.append("client_id",n.clientId),i&&r.append("scope",i),s?(r.append("grant_type","refresh_token"),r.append("refresh_token",s),r.append("redirect_uri",n.redirectUri)):a?(r.append("grant_type","authorization_code"),r.append("code",a),r.append("redirect_uri",n.redirectUri)):(r.append("grant_type","password"),r.append("username",o),r.append("password",c)),Promise.resolve(uu(n.baseUrl+"/v2/oauth2/token",{method:"POST",body:r,refresh:!!s}).then(function(t){try{var r,i;return Promise.resolve(function(){if(t){var a=function(t){if(r)return t;function a(){e.accessToken=i.access_token,e.refreshToken=i.refresh_token,e.tokenType=i.token_type,e.createdAt=i.created_at,e.expiresIn=i.expires_in}e=new pu;var o=function(){if(!s)return Promise.resolve(n.getUserData(i)).then(function(t){e.user=t})}();return o&&o.then?o.then(a):a()},o=function(e,n){try{var s=Promise.resolve(t.json()).then(function(e){i=e,t.ok&&200===t.status||(se.error(i.error_description),r=1)})}catch(t){return n()}return s&&s.then?s.then(void 0,n):s}(0,function(){se.error(z.default.t("somethingWentWrongMessage")),r=1});return o&&o.then?o.then(a):a(o)}}())}catch(t){return Promise.reject(t)}}).catch(function(t){se.error(t.message)})).then(function(){return e})}catch(t){return Promise.reject(t)}},e.getUserData=function(t){try{var e={method:"GET"};return t&&(e.headers={Authorization:t.token_type+" "+t.access_token}),Promise.resolve(uu(this.baseUrl+"/v2/me",e)).then(function(t){var e,n=function(){if(null!=t&&t.ok)return Promise.resolve(t.json()).then(function(t){var n=t.user;return e=1,{id:n.id,companyId:n.company_id,roleId:n.role_id,username:n.username,email:n.email,name:n.name}})}();return n&&n.then?n.then(function(t){return e?t:null}):e?n:null})}catch(t){return Promise.reject(t)}},e.signOut=function(t){try{var e=new FormData;return e.append("client_id",this.clientId),e.append("token",t),Promise.resolve(uu(this.baseUrl+"/v2/oauth2/revoke",{method:"POST",body:e})).then(function(){})}catch(t){return Promise.reject(t)}},t}(),fu=/*#__PURE__*/function(){function t(){this.loading=!1,this.loginStatus={status:"unknown"},this.refreshTokenPromise=null,this.api=new hu,this.networkError=null,c.makeObservable(this,{loading:c.observable,setLoading:c.action,loginStatus:c.observable.deep,setConnectedLoginStatus:c.action,setNotAuthorizedLoginStatus:c.action})}var e=t.prototype;return e.setLoading=function(t){this.loading=t},e.setConnectedLoginStatus=function(){this.loginStatus={status:"connected",authResponse:{user:this.session.user,accessToken:this.session.accessToken,refreshToken:this.session.refreshToken,tokenType:this.session.tokenType,createdAt:this.session.createdAt,expiresIn:this.session.expiresIn}}},e.setNotAuthorizedLoginStatus=function(){this.loginStatus={status:"not_authorized"}},e.setAuthConfig=function(t){this.api.setAuthConfig(t)},e.setNetworkError=function(t){this.networkError=t},e.isLoggedIn=function(){return Boolean(this.session)},e.requestHeaders=function(){var t={"Accept-Language":z.default.language};if(this.isLoggedIn()){var e=this.session;return Pl({},t,{Authorization:e.tokenType+" "+e.accessToken})}return t},e.authorize=function(t,e){void 0===e&&(e=!0);try{var n=this;return n.setLoading(!0),Promise.resolve(n.api.authorize(t)).then(function(t){return n.setLoading(!1),t?(e&&(n.session=t,n.storeSession(),n.setCurrentUser(t.user),n.setConnectedLoginStatus()),t):null})}catch(t){return Promise.reject(t)}},e.refresh=function(){try{var t=this;return t.session&&(t.refreshTokenPromise=t.api.authorize({refresh:t.session.refreshToken}),t.refreshTokenPromise.then(function(e){e?(t.session=Pl({},t.session,e,{user:t.session.user}),t.storeSession(),t.setConnectedLoginStatus(),t.refreshTokenPromise=null):(t.removeSession(),t.removeCurrentUser(),t.setNotAuthorizedLoginStatus(),t.refreshTokenPromise=null)})),Promise.resolve(t.refreshTokenPromise)}catch(t){return Promise.reject(t)}},e.recover=function(){try{var t=this;return t.session?Promise.resolve():Promise.resolve(t.restoreSession()).then(function(){var e=function(){if(t.session)return Promise.resolve(t.api.getUserData()).then(function(e){t.setCurrentUser(e),t.setConnectedLoginStatus()});t.setNotAuthorizedLoginStatus()}();if(e&&e.then)return e.then(function(){})})}catch(t){return Promise.reject(t)}},e.logout=function(){try{var t=this,e=function(){if(t.session)return Promise.resolve(t.api.signOut(t.session.accessToken)).then(function(){t.removeSession(),t.removeCurrentUser(),t.setNotAuthorizedLoginStatus()})}();return Promise.resolve(e&&e.then?e.then(function(){}):void 0)}catch(t){return Promise.reject(t)}},e.storeSession=function(){try{var t=this,e={};e["access-token"]=t.session.accessToken,e["refresh-token"]=t.session.refreshToken,e["token-type"]=t.session.tokenType,e["created-at"]=t.session.createdAt,e["expires-in"]=t.session.expiresIn;var n=JSON.stringify(e);return lu.set("authHeaders",n),Promise.resolve()}catch(t){return Promise.reject(t)}},e.restoreSession=function(){try{var t=this,e=lu.get("authHeaders");if(!e||"null"===e)return Promise.resolve();var n=JSON.parse(e),r=new pu;return r.accessToken=n["access-token"],r.refreshToken=n["refresh-token"],r.tokenType=n["token-type"],r.createdAt=n["created-at"],r.expiresIn=n["expires-in"],t.session=r,Promise.resolve(t.api.getUserData()).then(function(e){e&&(t.session.user=e)})}catch(t){return Promise.reject(t)}},e.removeSession=function(){lu.remove("authHeaders"),this.session=null},e.setCurrentUser=function(t){du.setCurrentUser(t)},e.removeCurrentUser=function(){du.removeCurrentUser()},t}(),mu=new fu,_u=function(){var e=t.useState(mu.loginStatus),n=e[0],r=e[1];return t.useEffect(function(){return c.reaction(function(){return c.toJS(mu.loginStatus)},function(){r(mu.loginStatus)})},[]),n},gu=B.default.createContext({showModal:null,hideModal:null,isOpenedModal:!1}),yu=function(e){var n=e.children,r=t.useState({}),i=r[0],s=r[1],a=t.useCallback(function(t,e){s(function(e){var n;return Pl({},e,((n={})[t]=Pl({},e[t],{isOpen:!1}),n))}),e&&e()},[s]),o=t.useCallback(function(t,e,n){s(function(r){var i;return Pl({},r,((i={})[t]={isOpen:!0,component:e,data:n},i))})},[s]),c=t.useMemo(function(){return{showModal:o,hideModal:a,isOpenedModal:Object.values(i).some(function(t){return t.isOpen})}},[a,o,i]);/*#__PURE__*/return B.default.createElement(gu.Provider,{value:c},n,Object.keys(i).map(function(t){var e=i[t],n=e.isOpen;return n&&/*#__PURE__*/B.default.createElement(e.component,Pl({onClose:function(){return a(t)},key:t,isOpen:n},e.data))}))},vu=(ou=0,function(){return""+ ++ou});function bu(e,n,r){var i=t.useMemo(vu,[]),s=t.useContext(gu);return[t.useCallback(function(t){return s.showModal(i,e,t instanceof Event?n:Pl({},n,t))},[n,s.showModal]),t.useCallback(function(){return s.hideModal(i,r)},[s.hideModal,r,i])]}bu.ModalContext=gu,bu.ModalProvider=yu;var Su={root:{height:"100vh",paddingTop:"70px",mixBlendMode:"color",background:"#1E1E1E"},overlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1,background:"repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1) 12px, transparent 12px, transparent 24px);"}},Eu=function(t){var n=t.error,r=e.useTranslation().t;/*#__PURE__*/return B.default.createElement(d.Container,{maxWidth:!1,disableGutters:!0,sx:Su.root},/*#__PURE__*/B.default.createElement(d.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"650px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/B.default.createElement(d.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/B.default.createElement(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/B.default.createElement(d.Typography,{variant:"h4",sx:{display:"flex",alignItems:"center",marginBottom:"40px",color:"rgba(255, 255, 255, 0.6)"}},r("somethingWentWrongMessage"),/*#__PURE__*/B.default.createElement(d.Tooltip,{title:n.toString(),arrow:!0},/*#__PURE__*/B.default.createElement(H.default,{sx:{marginLeft:"1em",fontSize:"inherit"}}))),/*#__PURE__*/B.default.createElement(d.Button,{onClick:function(){return window.location.reload()}},r("networkErrorButtonText"))))),/*#__PURE__*/B.default.createElement(d.Box,{sx:Su.overlay}))};Eu.propTypes={error:o.PropTypes.any,componentStack:o.PropTypes.any},Eu.defaultProps={};var wu=t.createContext(),ku=function(t){/*#__PURE__*/return B.default.createElement(wu.Provider,{value:t.config},t.children)},Tu=function(){return t.useContext(wu)},xu=t.createContext(),Cu=function(t){/*#__PURE__*/return B.default.createElement(xu.Provider,{value:t.info},t.children)},Ru={sessionStore:mu},Du=t.createContext(Ru),Iu=a.observer(function(t){/*#__PURE__*/return B.default.createElement(Du.Provider,{value:Ru},t.children)}),Nu=new(/*#__PURE__*/function(){function t(){this.appReady=!1,this.gtmReady=!1,this.sentryReady=!1,c.makeAutoObservable(this)}var e=t.prototype;return e.setAppReady=function(){this.appReady=!0},e.setGtmReady=function(){this.gtmReady=!0},e.setSentryReady=function(){this.sentryReady=!0},t}()),Ou=s.createTheme({components:{MuiCssBaseline:{styleOverrides:'\n body {\n font-family: "Inter", "system-ui";\n }\n @supports (font-variation-settings: normal) {\n body { font-family: "Inter var", "system-ui"; }\n }\n '}},palette:{background:"#1E1E1E",primary:{light:"#156bd1",main:"#155ed1",dark:"#1551d1",contrastText:"rgba(255,255,255,0.85)"},secondary:{light:"#656565",main:"#595959",dark:"#4d4d4d",contrastText:"rgba(255,255,255,0.85)"}},typography:{fontFamily:"'Inter', system-ui",fontWeightLight:"400",fontWeightRegular:"500",fontWeightMedium:"600",button:{textTransform:"none"}}}),Au=s.createTheme(Ou,{components:{MuiBackdrop:{styleOverrides:{root:{marginTop:70}}},MuiButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiLoadingButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiCardHeader:{styleOverrides:{root:{color:"rgba(255,255,255,0.85)",background:"linear-gradient(180deg, #4A4A4A 0%, #3F3F3F 100%)"},subheader:{marginTop:"0.5em",color:"rgba(255,255,255,0.5)"}}},MuiPaper:{styleOverrides:{rounded:{borderRadius:"20px"}}},MuiCard:{styleOverrides:{root:{borderRadius:"4px",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)"}}},MuiCardContent:{styleOverrides:{root:{background:"rgba(45, 45, 45, 1)","&:last-child":{paddingBottom:16}}}},MuiDialogTitle:{styleOverrides:{root:{textAlign:"center",color:"white",background:"linear-gradient(#4a4a4a 0%, #3e3e3e 100%)"}}},MuiDialogContent:{styleOverrides:{root:{minWidth:550,padding:"16px 24px",background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)"}}},MuiDialogContentText:{styleOverrides:{root:{textAlign:"center",color:"white"}}},MuiMenu:{styleOverrides:{paper:{background:"#2d2d2d"}}},MuiMenuItem:{styleOverrides:{root:{color:"white"}}},MuiFormControl:{styleOverrides:{root:{alignItems:"center"}}},MuiOutlinedInput:{styleOverrides:{root:{color:"white","&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"rgba(255,255,255,0.35)"}},notchedOutline:{borderColor:"rgba(255,255,255,0.25)"},input:{padding:"13px 16px",background:"transparent",color:"white",borderColor:"white"}}}}}),Uu=function(t){/*#__PURE__*/return B.default.createElement(d.Box,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100vh"},/*#__PURE__*/B.default.createElement("img",{"data-testid":t["data-testid"],alt:"loader",width:t.width,src:G.default}))},Pu=function(t){var n=t.error,r=e.useTranslation().t;/*#__PURE__*/return B.default.createElement(d.Container,{maxWidth:!1,disableGutters:!0,sx:Su.root},/*#__PURE__*/B.default.createElement(d.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"600px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/B.default.createElement(d.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/B.default.createElement(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/B.default.createElement("h1",{style:{textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},r("networkErrorHeader")),/*#__PURE__*/B.default.createElement("p",{style:{display:"inline-flex",textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},/*#__PURE__*/B.default.createElement(d.Typography,{mr:2},n.title),/*#__PURE__*/B.default.createElement(d.Tooltip,{title:n.details,arrow:!0},/*#__PURE__*/B.default.createElement(H.default,null))),/*#__PURE__*/B.default.createElement(d.Button,{onClick:function(){return window.location.reload()}},r("networkErrorButtonText"))))),/*#__PURE__*/B.default.createElement(d.Box,{sx:Su.overlay}))},Bu=function(){var e=new URLSearchParams(n.useLocation().search),r=e.get("next");return t.useEffect(function(){var t=e.get("code");t&&mu.authorize({code:t})},[e]),mu.isLoggedIn()?/*#__PURE__*/B.default.createElement(n.Navigate,{to:r}):null};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var Mu=function(t){var e={exports:{}};return function(t,e){var n;t.exports=(n={attachTo:function(t,e){if(void 0!==t.scannerDetectionData)throw new Error("onScan.js is already initialized for DOM element "+t);return e=this._mergeOptions({onScan:function(t,e){},onScanError:function(t){},onKeyProcess:function(t,e){},onKeyDetect:function(t,e){},onPaste:function(t,e){},keyCodeMapper:function(t){return n.decodeKeyEvent(t)},onScanButtonLongPress:function(){},scanButtonKeyCode:!1,scanButtonLongPressTime:500,timeBeforeScanTest:100,avgTimeByChar:30,minLength:6,suffixKeyCodes:[9,13],prefixKeyCodes:[],ignoreIfFocusOn:!1,stopPropagation:!1,preventDefault:!1,captureEvents:!1,reactToKeydown:!0,reactToPaste:!1,singleScanQty:1},e),t.scannerDetectionData={options:e,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},!0===e.reactToPaste&&t.addEventListener("paste",this._handlePaste,e.captureEvents),!1!==e.scanButtonKeyCode&&t.addEventListener("keyup",this._handleKeyUp,e.captureEvents),!0!==e.reactToKeydown&&!1===e.scanButtonKeyCode||t.addEventListener("keydown",this._handleKeyDown,e.captureEvents),this},detachFrom:function(t){t.scannerDetectionData.options.reactToPaste&&t.removeEventListener("paste",this._handlePaste),!1!==t.scannerDetectionData.options.scanButtonKeyCode&&t.removeEventListener("keyup",this._handleKeyUp),t.removeEventListener("keydown",this._handleKeyDown),t.scannerDetectionData=void 0},getOptions:function(t){return t.scannerDetectionData.options},setOptions:function(t,e){switch(t.scannerDetectionData.options.reactToPaste){case!0:!1===e.reactToPaste&&t.removeEventListener("paste",this._handlePaste);break;case!1:!0===e.reactToPaste&&t.addEventListener("paste",this._handlePaste)}return!1===t.scannerDetectionData.options.scanButtonKeyCode?!1!==e.scanButtonKeyCode&&t.addEventListener("keyup",this._handleKeyUp):!1===e.scanButtonKeyCode&&t.removeEventListener("keyup",this._handleKeyUp),t.scannerDetectionData.options=this._mergeOptions(t.scannerDetectionData.options,e),this._reinitialize(t),this},decodeKeyEvent:function(t){var e=this._getNormalizedKeyNum(t);switch(!0){case e>=48&&e<=90:case e>=106&&e<=111:if(void 0!==t.key&&""!==t.key)return t.key;var n=String.fromCharCode(e);switch(t.shiftKey){case!1:n=n.toLowerCase();break;case!0:n=n.toUpperCase()}return n;case e>=96&&e<=105:return e-96+0}return""},simulate:function(t,e){return this._reinitialize(t),Array.isArray(e)?e.forEach(function(t){var e={};"object"!=typeof t&&"function"!=typeof t||null===t?e.keyCode=parseInt(t):e=t;var n=new KeyboardEvent("keydown",e);document.dispatchEvent(n)}):this._validateScanCode(t,e),this},_reinitialize:function(t){var e=t.scannerDetectionData.vars;e.firstCharTime=0,e.lastCharTime=0,e.accumulatedString=""},_isFocusOnIgnoredElement:function(t){var e=t.scannerDetectionData.options.ignoreIfFocusOn;if(!e)return!1;var n=document.activeElement;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if(!0===n.matches(e[r]))return!0}else if(n.matches(e))return!0;return!1},_validateScanCode:function(t,e){var r,i=t.scannerDetectionData,s=i.options,a=i.options.singleScanQty,o=i.vars.firstCharTime,c=i.vars.lastCharTime,l={};switch(!0){case e.length<s.minLength:l={message:"Receieved code is shorter then minimal length"};break;case c-o>e.length*s.avgTimeByChar:l={message:"Receieved code was not entered in time"};break;default:return s.onScan.call(t,e,a),r=new CustomEvent("scan",{detail:{scanCode:e,qty:a}}),t.dispatchEvent(r),n._reinitialize(t),!0}return l.scanCode=e,l.scanDuration=c-o,l.avgTimeByChar=s.avgTimeByChar,l.minLength=s.minLength,s.onScanError.call(t,l),r=new CustomEvent("scanError",{detail:l}),t.dispatchEvent(r),n._reinitialize(t),!1},_mergeOptions:function(t,e){var n,r={};for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},_getNormalizedKeyNum:function(t){return t.which||t.keyCode},_handleKeyDown:function(t){var e=n._getNormalizedKeyNum(t),r=this.scannerDetectionData.options,i=this.scannerDetectionData.vars,s=!1;if(!1!==r.onKeyDetect.call(this,e,t)&&!n._isFocusOnIgnoredElement(this))if(!1===r.scanButtonKeyCode||e!=r.scanButtonKeyCode){switch(!0){case i.firstCharTime&&-1!==r.suffixKeyCodes.indexOf(e):t.preventDefault(),t.stopImmediatePropagation(),s=!0;break;case!i.firstCharTime&&-1!==r.prefixKeyCodes.indexOf(e):t.preventDefault(),t.stopImmediatePropagation(),s=!1;break;default:var a=r.keyCodeMapper.call(this,t);if(null===a)return;i.accumulatedString+=a,r.preventDefault&&t.preventDefault(),r.stopPropagation&&t.stopImmediatePropagation(),s=!1}i.firstCharTime||(i.firstCharTime=Date.now()),i.lastCharTime=Date.now(),i.testTimer&&clearTimeout(i.testTimer),s?(n._validateScanCode(this,i.accumulatedString),i.testTimer=!1):i.testTimer=setTimeout(n._validateScanCode,r.timeBeforeScanTest,this,i.accumulatedString),r.onKeyProcess.call(this,a,t)}else i.longPressed||(i.longPressTimer=setTimeout(r.onScanButtonLongPress,r.scanButtonLongPressTime,this),i.longPressed=!0)},_handlePaste:function(t){var e=this.scannerDetectionData.options,r=this.scannerDetectionData.vars,i=(event.clipboardData||window.clipboardData).getData("text");n._isFocusOnIgnoredElement(this)||(t.preventDefault(),e.stopPropagation&&t.stopImmediatePropagation(),e.onPaste.call(this,i,event),r.firstCharTime=0,r.lastCharTime=0,n._validateScanCode(this,i))},_handleKeyUp:function(t){n._isFocusOnIgnoredElement(this)||n._getNormalizedKeyNum(t)==this.scannerDetectionData.options.scanButtonKeyCode&&(clearTimeout(this.scannerDetectionData.vars.longPressTimer),this.scannerDetectionData.vars.longPressed=!1)},isScanInProgressFor:function(t){return t.scannerDetectionData.vars.firstCharTime>0},isAttachedTo:function(t){return void 0!==t.scannerDetectionData}},n)}(e),e.exports}(),Lu=function(r){var i=r.scope,s=r.redirectPath,a=r.onSuccess,o=r.onFailure,c=r.onCancel,l=r.storeSession,u=r.title,p=r["data-testid"],h=t.useState(""),f=h[0],_=h[1],g=t.useState(""),y=g[0],v=g[1],b=t.useContext(xu),S=b.releaseVersion,E=b.releasePageLink,w=n.useNavigate(),k=e.useTranslation().t,T=function(t){try{return Promise.resolve(mu.authorize(Pl({scope:i},t),l)).then(function(t){t?(a&&"function"==typeof a&&a(t),v(""),w(s)):o&&"function"==typeof o&&o()})}catch(t){return Promise.reject(t)}};t.useEffect(function(){return Mu.attachTo(document,{suffixKeyCodes:[13],onScan:function(t){_(""),v(""),T({username:"code",password:t})}}),function(){Mu.detachFrom(document)}},[]);var x=function(t){try{return t.preventDefault(),T({username:f,password:y}),Promise.resolve()}catch(t){return Promise.reject(t)}};/*#__PURE__*/return B.default.createElement("form",{onSubmit:x,"data-testid":p||"ac-sdk-login-form"},/*#__PURE__*/B.default.createElement(d.Box,{m:"0 80px"},/*#__PURE__*/B.default.createElement(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,m:"100px 0"},/*#__PURE__*/B.default.createElement(ju,null),S&&/*#__PURE__*/B.default.createElement(d.Link,{href:E,target:"_blank",fontSize:"14px",sx:{display:"flex",alignItems:"center",gap:.5,textDecoration:"none","&:hover":{cursor:"pointer",opacity:.8}}},/*#__PURE__*/B.default.createElement("img",{src:F.default,alt:"info",width:"14px",height:"14px"}),k("release")," ",S)),/*#__PURE__*/B.default.createElement(d.Box,{m:"0 0 30px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/B.default.createElement(d.Typography,{align:"center",color:"inherit"},u)),/*#__PURE__*/B.default.createElement(d.Box,{m:"0",display:"grid",sx:{gridGap:"18px"},gridTemplateColumns:"1fr"},/*#__PURE__*/B.default.createElement(d.FormControl,{fullWidth:!0},/*#__PURE__*/B.default.createElement(d.TextField,{autoFocus:!0,fullWidth:!0,variant:"outlined",placeholder:k("loginCardUsernameHint"),onChange:function(t){_(t.target.value)},value:f,id:"login-input",inputProps:{"data-testid":"ac-sdk-login-form-username-input"}})),/*#__PURE__*/B.default.createElement(d.FormControl,{fullWidth:!0},/*#__PURE__*/B.default.createElement(d.TextField,{fullWidth:!0,variant:"outlined",placeholder:k("loginCardPasswordHint"),onChange:function(t){v(t.target.value)},value:y,type:"password",id:"password-input",inputProps:{"data-testid":"ac-sdk-login-form-password-input"}})),/*#__PURE__*/B.default.createElement(m.LoadingButton,{id:"login-button",type:"submit",size:"large",color:"primary",onClick:x,loading:mu.loading,"data-testid":"ac-sdk-login-form-submit-button"},k("loginCardSubmitButton")),/*#__PURE__*/B.default.createElement(d.Button,{id:"cancel-button",type:"button",size:"large",color:"secondary",onClick:function(t){c&&"function"==typeof c?c():w("/")},"data-testid":"ac-sdk-login-form-cancel-button"},k("loginCardCancelButton"))),/*#__PURE__*/B.default.createElement(d.Box,{m:"30px 0 40px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/B.default.createElement(d.Typography,{align:"center",color:"inherit"},"or scan")),/*#__PURE__*/B.default.createElement(d.Box,{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",alignItems:"center",justifyItems:"center",marginBottom:"30px"},/*#__PURE__*/B.default.createElement(d.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/B.default.createElement(Hu,null)),/*#__PURE__*/B.default.createElement(Gu,null),/*#__PURE__*/B.default.createElement(d.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/B.default.createElement(Yu,null)))))};Lu.propTypes={scope:o.PropTypes.string,redirectPath:o.PropTypes.string,onSuccess:o.PropTypes.func,onFailure:o.PropTypes.func,onCancel:o.PropTypes.func,storeSession:o.PropTypes.bool},Lu.defaultProps={redirectPath:"/",storeSession:!0};var zu=a.observer(Lu),Hu=function(){/*#__PURE__*/return B.default.createElement("svg",{width:"51",height:"53",viewBox:"0 0 51 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/B.default.createElement("path",{d:"M8.66868 45.6365C8.66868 42.8453 6.99822 41.1535 4.7397 41.1535C2.47266 41.1535 0.806463 42.8453 0.806463 45.6365C0.806463 48.4234 2.47266 50.1194 4.7397 50.1194C5.3022 50.1194 5.82635 50.0172 6.2951 49.8169L7.04084 50.7842H8.38743L7.21129 49.2501C8.1147 48.4873 8.66868 47.243 8.66868 45.6365ZM4.29652 47.1706L5.53658 48.7984C5.28942 48.8794 5.02095 48.9177 4.7397 48.9177C3.23544 48.9177 2.1147 47.7629 2.1147 45.6365C2.1147 43.5101 3.23544 42.3552 4.7397 42.3552C6.2397 42.3552 7.3647 43.5101 7.3647 45.6365C7.3647 46.8297 7.01101 47.7203 6.43146 48.2657L5.59197 47.1706H4.29652ZM10.3104 50.0001H11.6271V46.6976H13.4169C13.4467 46.6976 13.4723 46.6976 13.5021 46.6976L15.2749 50.0001H16.7749L14.8402 46.4675C15.9098 46.0711 16.4425 45.1805 16.4425 44.0086C16.4425 42.4021 15.4453 41.2728 13.4212 41.2728H10.3104V50.0001ZM11.6271 45.564V42.4021H13.2805C14.5803 42.4021 15.1172 43.02 15.1172 44.0086C15.1172 44.993 14.5803 45.564 13.2976 45.564H11.6271ZM28.4691 44.1109C28.1708 42.2444 26.7092 41.1535 24.864 41.1535C22.6055 41.1535 20.9393 42.8453 20.9393 45.6365C20.9393 48.4277 22.5969 50.1194 24.864 50.1194C26.7816 50.1194 28.1836 48.9177 28.4691 47.1919L27.1396 47.1876C26.9137 48.3041 25.9762 48.9177 24.8725 48.9177C23.3768 48.9177 22.2475 47.7714 22.2475 45.6365C22.2475 43.5186 23.3725 42.3552 24.8768 42.3552C25.989 42.3552 26.9222 42.9817 27.1396 44.1109H28.4691ZM32.6996 50.1322C34.5447 50.1322 35.7507 48.7814 35.7507 46.7572C35.7507 44.7203 34.5447 43.3694 32.6996 43.3694C30.8544 43.3694 29.6484 44.7203 29.6484 46.7572C29.6484 48.7814 30.8544 50.1322 32.6996 50.1322ZM32.7038 49.0626C31.4979 49.0626 30.9354 48.0101 30.9354 46.753C30.9354 45.5001 31.4979 44.4348 32.7038 44.4348C33.9013 44.4348 34.4638 45.5001 34.4638 46.753C34.4638 48.0101 33.9013 49.0626 32.7038 49.0626ZM39.6232 50.128C40.8164 50.128 41.2852 49.3993 41.5153 48.9817H41.6218V50.0001H42.8661V41.2728H41.592V44.5157H41.5153C41.2852 44.1109 40.8505 43.3694 39.6317 43.3694C38.0508 43.3694 36.8874 44.618 36.8874 46.7402C36.8874 48.8581 38.0337 50.128 39.6232 50.128ZM39.9045 49.0413C38.7667 49.0413 38.1744 48.0399 38.1744 46.7274C38.1744 45.4277 38.7539 44.4518 39.9045 44.4518C41.0167 44.4518 41.6133 45.3595 41.6133 46.7274C41.6133 48.1038 41.0039 49.0413 39.9045 49.0413ZM47.5057 50.1322C48.9332 50.1322 49.9432 49.4291 50.233 48.3638L49.027 48.1464C48.7969 48.7643 48.2429 49.0797 47.5185 49.0797C46.4276 49.0797 45.6946 48.3723 45.6605 47.1109H50.3139V46.6592C50.3139 44.2942 48.8991 43.3694 47.4162 43.3694C45.5923 43.3694 44.3906 44.7586 44.3906 46.77C44.3906 48.8027 45.5753 50.1322 47.5057 50.1322ZM45.6648 46.1564C45.7159 45.2274 46.3892 44.422 47.4247 44.422C48.4134 44.422 49.0611 45.155 49.0653 46.1564H45.6648Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("g",{clipPath:"url(#clip0_2183_35009)"},/*#__PURE__*/B.default.createElement("path",{d:"M22.3002 3.27948H14.25V11.3318H22.3002V3.27948ZM20.6609 9.66275H15.9186V4.91923H20.6609V9.66275Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M19.1081 6.47128H17.4688V8.11102H19.1081V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M14.2773 24.7206H22.3275V16.7122H14.2773V24.7206ZM15.9166 18.3373H20.6589V23.0809H15.9166V18.3373Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M35.7147 17.5176H34.0754V23.081H32.4653V21.8366H30.826V23.0591H28.8281V24.6988H35.7147V17.5176Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M19.1081 19.8893H17.4688V21.529H19.1081V19.8893Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M35.7142 3.27948H27.6641V11.3318H35.7142V3.27948ZM34.0749 9.66275H29.318V4.91923H34.0603L34.0749 9.66275Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M32.5221 6.47128H30.8828V8.11102H32.5221V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M22.3014 13.184H17.5664V14.8237H22.3014V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M15.9167 13.184H14.2773V14.8237H15.9167V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M30.041 13.184H23.9375V14.8237H30.041V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M35.7121 15.8778V13.1766H31.6797V14.8237H34.0728V15.8778H35.7121Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M25.819 6.56622H24.1797V11.3024H25.819V6.56622Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M25.819 3.27948H24.1797V4.91922H25.819V3.27948Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M25.82 21.4338H27.0348V19.7941H25.82V16.7122H24.1953V24.7645H27.1958V23.0809H25.8346L25.82 21.4338Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M29.1874 19.5598H30.8267V18.3373H32.1587V16.7122H27.8555V18.352H29.1874V19.5598Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M33.2539 6.42268e-05V1.6398H37.3668V5.73182H39.0061V-0.00726318L33.2539 6.42268e-05Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M12.6408 1.63985H16.7391V0.00012207H11.0234V5.73188H12.6627L12.6408 1.63985Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M37.3678 26.3603H33.2695V28.0001H39.0071V22.261H37.3678V26.3603Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M12.6408 22.261H11.0234V28.0001H16.761V26.3603H12.6627L12.6408 22.261Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/B.default.createElement("defs",null,/*#__PURE__*/B.default.createElement("clipPath",{id:"clip0_2183_35009"},/*#__PURE__*/B.default.createElement("rect",{width:"28",height:"28",fill:"white",transform:"translate(11 0.00012207)"}))))},Gu=function(){/*#__PURE__*/return B.default.createElement("svg",{width:"52",height:"49",viewBox:"0 0 52 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/B.default.createElement("path",{d:"M1.42951 46.0001H4.77468C6.80309 46.0001 7.71928 44.9902 7.71928 43.6521C7.71928 42.3013 6.77326 41.5385 5.9082 41.4916V41.4064C6.70934 41.2018 7.37837 40.6564 7.37837 39.5655C7.37837 38.2743 6.48349 37.2728 4.62553 37.2728H1.42951V46.0001ZM2.74627 44.8709V42.0754H4.69371C5.75053 42.0754 6.41104 42.7572 6.41104 43.5882C6.41104 44.3211 5.91246 44.8709 4.64684 44.8709H2.74627ZM2.74627 41.0484V38.3936H4.54457C5.5886 38.3936 6.08718 38.9433 6.08718 39.6677C6.08718 40.5115 5.39684 41.0484 4.51048 41.0484H2.74627ZM11.0836 46.145C12.166 46.145 12.7754 45.5953 13.0183 45.1052H13.0694V46.0001H14.3137V41.6535C14.3137 39.7487 12.8137 39.3694 11.774 39.3694C10.5893 39.3694 9.4984 39.8467 9.07227 41.0399L10.2697 41.3126C10.4572 40.8481 10.9345 40.4007 11.791 40.4007C12.6135 40.4007 13.0353 40.8311 13.0353 41.5726V41.6024C13.0353 42.0669 12.5581 42.0584 11.3819 42.1947C10.1419 42.3396 8.87198 42.6635 8.87198 44.1507C8.87198 45.4376 9.83931 46.145 11.0836 46.145ZM11.3606 45.1223C10.6404 45.1223 10.1206 44.7984 10.1206 44.1677C10.1206 43.4859 10.7257 43.243 11.4629 43.145C11.8762 43.0896 12.8564 42.9788 13.0396 42.7956V43.6393C13.0396 44.4149 12.4217 45.1223 11.3606 45.1223ZM16.0108 46.0001H17.285V42.003C17.285 41.1464 17.9455 40.5285 18.8489 40.5285C19.1131 40.5285 19.4114 40.5754 19.5137 40.6052V39.3865C19.3858 39.3694 19.1344 39.3567 18.9725 39.3567C18.2054 39.3567 17.5492 39.7913 17.3105 40.4944H17.2424V39.4547H16.0108V46.0001ZM26.5492 46.1322C28.0961 46.1322 29.0975 45.2032 29.2381 43.9291H27.998C27.8361 44.6365 27.2864 45.0541 26.5577 45.0541C25.4796 45.0541 24.785 44.155 24.785 42.7274C24.785 41.3254 25.4924 40.4433 26.5577 40.4433C27.3674 40.4433 27.8617 40.9547 27.998 41.5683H29.2381C29.1017 40.2473 28.0236 39.3694 26.5364 39.3694C24.6912 39.3694 23.498 40.7586 23.498 42.7572C23.498 44.7302 24.6486 46.1322 26.5492 46.1322ZM33.3578 46.1322C35.2029 46.1322 36.4089 44.7814 36.4089 42.7572C36.4089 40.7203 35.2029 39.3694 33.3578 39.3694C31.5126 39.3694 30.3066 40.7203 30.3066 42.7572C30.3066 44.7814 31.5126 46.1322 33.3578 46.1322ZM33.362 45.0626C32.1561 45.0626 31.5936 44.0101 31.5936 42.753C31.5936 41.5001 32.1561 40.4348 33.362 40.4348C34.5595 40.4348 35.122 41.5001 35.122 42.753C35.122 44.0101 34.5595 45.0626 33.362 45.0626ZM40.2814 46.128C41.4746 46.128 41.9434 45.3993 42.1735 44.9817H42.28V46.0001H43.5243V37.2728H42.2502V40.5157H42.1735C41.9434 40.1109 41.5087 39.3694 40.29 39.3694C38.709 39.3694 37.5456 40.618 37.5456 42.7402C37.5456 44.8581 38.6919 46.128 40.2814 46.128ZM40.5627 45.0413C39.4249 45.0413 38.8326 44.0399 38.8326 42.7274C38.8326 41.4277 39.4121 40.4518 40.5627 40.4518C41.6749 40.4518 42.2715 41.3595 42.2715 42.7274C42.2715 44.1038 41.6621 45.0413 40.5627 45.0413ZM48.1639 46.1322C49.5914 46.1322 50.6014 45.4291 50.8912 44.3638L49.6852 44.1464C49.4551 44.7643 48.9011 45.0797 48.1767 45.0797C47.0858 45.0797 46.3528 44.3723 46.3187 43.1109H50.9721V42.6592C50.9721 40.2942 49.5574 39.3694 48.0744 39.3694C46.2505 39.3694 45.0488 40.7586 45.0488 42.77C45.0488 44.8027 46.2335 46.1322 48.1639 46.1322ZM46.323 42.1564C46.3741 41.2274 47.0474 40.422 48.0829 40.422C49.0716 40.422 49.7193 41.155 49.7235 42.1564H46.323Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("g",{clipPath:"url(#clip0_2183_35008)"},/*#__PURE__*/B.default.createElement("path",{d:"M47 9.00012H7V10.0001H47V9.00012Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M43 0.00012207H42V7.00012H43V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M43 12.0001H42V19.0001H43V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M41 12.0001H39V19.0001H41V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M41 0.00012207H39V7.00012H41V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M38 0.00012207H35V7.00012H38V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M38 12.0001H35V19.0001H38V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M33 12.0001H31V19.0001H33V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M33 0.00012207H31V7.00012H33V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M30 0.00012207H28V7.00012H30V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M30 12.0001H28V19.0001H30V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M27 0.00012207H26V7.00012H27V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M27 12.0001H26V19.0001H27V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M25 0.00012207H24V7.00012H25V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M25 12.0001H24V19.0001H25V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M23 0.00012207H20V7.00012H23V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M23 12.0001H20V19.0001H23V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M18 0.00012207H16V7.00012H18V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M18 12.0001H16V19.0001H18V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M15 12.0001H14V19.0001H15V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M15 0.00012207H14V7.00012H15V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M13 0.00012207H10V7.00012H13V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("path",{d:"M13 12.0001H10V19.0001H13V12.0001Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/B.default.createElement("defs",null,/*#__PURE__*/B.default.createElement("clipPath",{id:"clip0_2183_35008"},/*#__PURE__*/B.default.createElement("rect",{width:"40",height:"20",fill:"white",transform:"translate(7 0.00012207)"}))))},Yu=function(){/*#__PURE__*/return B.default.createElement("svg",{width:"58",height:"49",viewBox:"0 0 58 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/B.default.createElement("path",{d:"M1.27131 46.0001H2.58807V42.6976H4.37784C4.40767 42.6976 4.43324 42.6976 4.46307 42.6976L6.2358 46.0001H7.7358L5.80114 42.4675C6.87074 42.0711 7.40341 41.1805 7.40341 40.0086C7.40341 38.4021 6.40625 37.2728 4.3821 37.2728H1.27131V46.0001ZM2.58807 41.564V38.4021H4.24148C5.54119 38.4021 6.07812 39.02 6.07812 40.0086C6.07812 40.993 5.54119 41.564 4.25852 41.564H2.58807ZM10.3224 37.2728H9.00568V46.0001H10.3224V37.2728ZM12.2401 46.0001H13.5568V42.1947H17.2642V41.0655H13.5568V38.4064H17.652V37.2728H12.2401V46.0001ZM22.0966 46.0001C24.7557 46.0001 26.294 44.351 26.294 41.6237C26.294 38.9092 24.7557 37.2728 22.1861 37.2728H19.2713V46.0001H22.0966ZM20.5881 44.8496V38.4234H22.1051C24.0142 38.4234 24.9986 39.5655 24.9986 41.6237C24.9986 43.6905 24.0142 44.8496 22.0241 44.8496H20.5881ZM38.3558 40.1109C38.0575 38.2444 36.5959 37.1535 34.7507 37.1535C32.4922 37.1535 30.826 38.8453 30.826 41.6365C30.826 44.4277 32.4837 46.1194 34.7507 46.1194C36.6683 46.1194 38.0703 44.9177 38.3558 43.1919L37.0263 43.1876C36.8004 44.3041 35.8629 44.9177 34.7592 44.9177C33.2635 44.9177 32.1342 43.7714 32.1342 41.6365C32.1342 39.5186 33.2592 38.3552 34.7635 38.3552C35.8757 38.3552 36.8089 38.9817 37.0263 40.1109H38.3558ZM41.734 46.145C42.8164 46.145 43.4258 45.5953 43.6687 45.1052H43.7198V46.0001H44.9641V41.6535C44.9641 39.7487 43.4641 39.3694 42.4244 39.3694C41.2397 39.3694 40.1488 39.8467 39.7227 41.0399L40.9201 41.3126C41.1076 40.8481 41.5849 40.4007 42.4414 40.4007C43.2638 40.4007 43.6857 40.8311 43.6857 41.5726V41.6024C43.6857 42.0669 43.2085 42.0584 42.0323 42.1947C40.7923 42.3396 39.5224 42.6635 39.5224 44.1507C39.5224 45.4376 40.4897 46.145 41.734 46.145ZM42.011 45.1223C41.2908 45.1223 40.771 44.7984 40.771 44.1677C40.771 43.4859 41.3761 43.243 42.1133 43.145C42.5266 43.0896 43.5067 42.9788 43.69 42.7956V43.6393C43.69 44.4149 43.0721 45.1223 42.011 45.1223ZM46.6612 46.0001H47.9354V42.003C47.9354 41.1464 48.5959 40.5285 49.4993 40.5285C49.7635 40.5285 50.0618 40.5754 50.1641 40.6052V39.3865C50.0362 39.3694 49.7848 39.3567 49.6229 39.3567C48.8558 39.3567 48.1996 39.7913 47.9609 40.4944H47.8928V39.4547H46.6612V46.0001ZM53.4826 46.128C54.6758 46.128 55.1445 45.3993 55.3746 44.9817H55.4812V46.0001H56.7255V37.2728H55.4513V40.5157H55.3746C55.1445 40.1109 54.7099 39.3694 53.4911 39.3694C51.9102 39.3694 50.7468 40.618 50.7468 42.7402C50.7468 44.8581 51.8931 46.128 53.4826 46.128ZM53.7638 45.0413C52.6261 45.0413 52.0337 44.0399 52.0337 42.7274C52.0337 41.4277 52.6133 40.4518 53.7638 40.4518C54.8761 40.4518 55.4727 41.3595 55.4727 42.7274C55.4727 44.1038 54.8633 45.0413 53.7638 45.0413Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/B.default.createElement("g",{clipPath:"url(#clip0_2183_35036)"},/*#__PURE__*/B.default.createElement("path",{d:"M19.5998 19.9927H38.3927C40.7673 19.9927 41.9924 18.8037 41.9924 16.5215V3.47133C41.9924 1.1892 40.7673 0.00012207 38.3927 0.00012207H19.5998C17.2251 0.00012207 16 1.17443 16 3.47133V16.5215C16 18.8037 17.2251 19.9927 19.5998 19.9927ZM19.7283 17.8953C19.5129 17.9222 19.294 17.9003 19.0886 17.8313C18.8832 17.7623 18.6969 17.648 18.544 17.4973C18.3911 17.3466 18.2759 17.1635 18.2072 16.9623C18.1385 16.761 18.1181 16.547 18.1478 16.3369V3.64857C18.1197 3.43872 18.1411 3.22539 18.2104 3.02486C18.2796 2.82432 18.3949 2.6419 18.5474 2.49154C18.6999 2.34118 18.8856 2.22684 19.0903 2.15729C19.295 2.08774 19.5132 2.06481 19.7283 2.09024H38.2641C38.4792 2.06481 38.6975 2.08774 38.9022 2.15729C39.1068 2.22684 39.2925 2.34118 39.445 2.49154C39.5975 2.6419 39.7128 2.82432 39.7821 3.02486C39.8513 3.22539 39.8728 3.43872 39.8447 3.64857V16.3369C39.8728 16.5468 39.8513 16.7601 39.7821 16.9606C39.7128 17.1612 39.5975 17.3436 39.445 17.494C39.2925 17.6443 39.1068 17.7586 38.9022 17.8282C38.6975 17.8977 38.4792 17.9207 38.2641 17.8953H19.7283ZM24.5759 9.93366C24.9027 9.92527 25.2245 9.85291 25.5221 9.72085C25.8197 9.58879 26.0872 9.39974 26.3086 9.16488C26.5301 8.93003 26.701 8.65415 26.8112 8.3536C26.9215 8.05305 26.9689 7.73395 26.9505 7.41519C26.9123 6.96482 26.7407 6.53505 26.4565 6.1784C26.1723 5.82175 25.7879 5.55367 25.3502 5.40689C24.9125 5.26012 24.4405 5.24101 23.9919 5.3519C23.5433 5.46279 23.1375 5.69889 22.8241 6.03133C22.5106 6.36378 22.3031 6.77819 22.2269 7.22393C22.1506 7.66967 22.2089 8.12746 22.3947 8.54135C22.5805 8.95524 22.8858 9.3073 23.2731 9.55456C23.6605 9.80182 24.1132 9.93355 24.5759 9.93366ZM31.6091 6.54371H37.3112C37.4038 6.54577 37.4958 6.52936 37.5817 6.49548C37.6676 6.46159 37.7455 6.41095 37.8106 6.34665C37.8757 6.28235 37.9268 6.20575 37.9605 6.12153C37.9943 6.03731 38.0101 5.94725 38.007 5.85686C38.008 5.76802 37.9907 5.67989 37.9559 5.5978C37.9211 5.51571 37.8697 5.44134 37.8047 5.37922C37.7396 5.31709 37.6624 5.2685 37.5776 5.23634C37.4927 5.20419 37.4021 5.18914 37.3112 5.19214H31.6469C31.556 5.18914 31.4654 5.20419 31.3806 5.23634C31.2958 5.2685 31.2185 5.31709 31.1535 5.37922C31.0885 5.44134 31.037 5.51571 31.0022 5.5978C30.9674 5.67989 30.9501 5.76802 30.9511 5.85686C30.948 5.94725 30.9638 6.03731 30.9976 6.12153C31.0313 6.20575 31.0824 6.28235 31.1475 6.34665C31.2126 6.41095 31.2905 6.46159 31.3764 6.49548C31.4623 6.52936 31.5543 6.54577 31.6469 6.54371H31.6091ZM31.6091 10.6796H37.3112C37.4957 10.6796 37.6727 10.608 37.8032 10.4806C37.9337 10.3532 38.007 10.1803 38.007 10.0001C38.007 9.81992 37.9337 9.64709 37.8032 9.51967C37.6727 9.39224 37.4957 9.32065 37.3112 9.32065H31.6469C31.4624 9.32065 31.2854 9.39224 31.1549 9.51967C31.0245 9.64709 30.9511 9.81992 30.9511 10.0001C30.9511 10.1803 31.0245 10.3532 31.1549 10.4806C31.2854 10.608 31.4624 10.6796 31.6469 10.6796H31.6091ZM20.4392 14.8081H28.7126C28.796 14.8129 28.8794 14.7998 28.9571 14.7699C29.0347 14.74 29.1048 14.6939 29.1624 14.6349C29.22 14.5758 29.2637 14.5052 29.2905 14.428C29.3173 14.3508 29.3265 14.2688 29.3176 14.1877C29.3176 13.1907 27.8051 10.6501 24.5759 10.6501C21.3467 10.6501 19.8494 13.1907 19.8494 14.1877C19.8394 14.2678 19.8473 14.3489 19.8728 14.4256C19.8983 14.5023 19.9406 14.5726 19.9967 14.6317C20.0529 14.6908 20.1216 14.7372 20.198 14.7677C20.2745 14.7981 20.3567 14.8119 20.4392 14.8081ZM31.6091 14.8081H37.3112C37.4021 14.8111 37.4927 14.7961 37.5776 14.7639C37.6624 14.7318 37.7396 14.6832 37.8047 14.621C37.8697 14.5589 37.9211 14.4846 37.9559 14.4025C37.9907 14.3204 38.008 14.2322 38.007 14.1434C38.009 14.0529 37.9925 13.963 37.9584 13.8789C37.9243 13.7947 37.8734 13.718 37.8086 13.6534C37.7438 13.5887 37.6664 13.5373 37.581 13.5023C37.4956 13.4672 37.4039 13.4492 37.3112 13.4492H31.6469C31.5542 13.4492 31.4625 13.4672 31.3771 13.5023C31.2917 13.5373 31.2143 13.5887 31.1495 13.6534C31.0847 13.718 31.0338 13.7947 30.9997 13.8789C30.9656 13.963 30.9491 14.0529 30.9511 14.1434C30.9501 14.2322 30.9674 14.3204 31.0022 14.4025C31.037 14.4846 31.0885 14.5589 31.1535 14.621C31.2185 14.6832 31.2958 14.7318 31.3806 14.7639C31.4654 14.7961 31.556 14.8111 31.6469 14.8081H31.6091Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/B.default.createElement("defs",null,/*#__PURE__*/B.default.createElement("clipPath",{id:"clip0_2183_35036"},/*#__PURE__*/B.default.createElement("rect",{width:"26",height:"20",fill:"white",transform:"translate(16 0.00012207)"}))))},ju=function(){/*#__PURE__*/return B.default.createElement("svg",{width:"98",height:"50",viewBox:"0 0 98 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/B.default.createElement("g",{opacity:"0.25"},/*#__PURE__*/B.default.createElement("path",{d:"M66.8428 0.85791C66.2106 2.00303 65.7681 3.21177 65.3888 4.48413C64.883 4.54775 64.4405 4.61136 63.998 4.67498C63.5555 4.80222 63.0497 4.92945 62.6072 5.05669C61.8486 4.0388 61.0267 3.08453 60.0784 2.19388C59.4463 2.51197 58.8141 2.83006 58.1819 3.27539C58.3716 4.54774 58.6876 5.8201 59.1302 7.09246C58.7509 7.41055 58.4348 7.72864 58.1187 8.11034C57.8026 8.49205 57.4865 8.81014 57.2336 9.25547C56.0325 8.87376 54.7681 8.55567 53.5038 8.42843C53.1245 9.06461 52.8716 9.76441 52.6187 10.4006C53.5038 11.3549 54.5153 12.1819 55.59 12.8817C55.3371 13.8359 55.2107 14.7902 55.2739 15.7445C54.0727 16.1262 52.8716 16.6351 51.7969 17.2713C51.8601 17.9711 51.9865 18.7345 52.2394 19.4343C53.5038 19.6888 54.8313 19.7524 56.0957 19.6888C56.2854 20.1341 56.475 20.5794 56.7279 20.9611C56.9808 21.4065 57.2336 21.7882 57.4865 22.1699C56.7279 23.1878 56.0957 24.3329 55.5267 25.478C56.0325 25.987 56.5382 26.4959 57.1072 26.9412C58.2451 26.3687 59.383 25.6689 60.3945 24.8418C60.7738 25.0963 61.2164 25.3508 61.6589 25.5416C62.1014 25.7325 62.544 25.9233 62.9865 26.0506C62.9865 27.3229 63.1129 28.5953 63.3658 29.8676C64.0612 29.9949 64.8198 30.1221 65.5152 30.1221C66.1474 28.977 66.5899 27.7683 66.9692 26.4959C67.475 26.4323 67.9175 26.3687 68.36 26.305C68.8026 26.1778 69.3083 26.0506 69.7508 25.9233C70.5094 26.9412 71.3313 27.8955 72.2796 28.7861C72.9117 28.4681 73.5439 28.15 74.1761 27.7046C73.9864 26.4323 73.6704 25.1599 73.2278 23.8876C73.6071 23.5695 73.9232 23.2514 74.2393 22.8697C74.5554 22.488 74.8715 22.1699 75.1244 21.7246C76.3255 22.1063 77.5899 22.4244 78.8543 22.5516C79.2336 21.9154 79.4864 21.2156 79.7393 20.5794C78.8542 19.6252 77.8428 18.7981 76.7681 18.0983C77.0209 17.1441 77.1474 16.1898 77.0841 15.2355C78.2853 14.8538 79.4864 14.3449 80.5611 13.7087C80.4979 13.0089 80.3715 12.2455 80.1186 11.5457C78.8543 11.2912 77.5267 11.2276 76.2623 11.2912C76.0727 10.8459 75.883 10.4006 75.6301 10.0189C75.3773 9.57355 75.1244 9.19185 74.8715 8.81014C75.6301 7.79225 76.2623 6.64713 76.8313 5.50201C76.3255 4.99307 75.8198 4.48413 75.2508 4.0388C74.1129 4.61136 72.975 5.31116 71.9635 6.13819C71.5842 5.88372 71.1416 5.62925 70.6991 5.4384C70.2566 5.24754 69.8141 5.05669 69.3715 4.92945C69.3715 3.6571 69.2451 2.38474 68.9922 1.11238C68.2336 0.985147 67.5382 0.85791 66.8428 0.85791ZM68.929 9.25547C72.3428 10.8459 73.7968 14.8538 72.2796 18.2256C71.3945 20.1977 69.6244 21.5973 67.5382 22.0427C66.1474 22.2971 64.6934 22.1699 63.429 21.5973C60.0152 20.0069 58.5612 15.999 60.0784 12.6272C60.9635 10.6551 62.7336 9.25546 64.8198 8.81014C66.2106 8.49205 67.6646 8.6829 68.929 9.25547Z",fill:"white"}),/*#__PURE__*/B.default.createElement("path",{d:"M6.03298 22.8689L5.02149 29.2307H0.722656L5.4008 1.55695H11.0904L15.7054 29.2307H11.3433L10.395 22.8689H6.03298ZM8.1824 7.85511L6.66517 18.7974H9.76286L8.1824 7.85511Z",fill:"white"}),/*#__PURE__*/B.default.createElement("path",{d:"M23.861 1.49487L29.361 20.0713V1.49487H33.5334V29.1686H29.1081L23.4185 11.4193V29.1686H19.2461V1.49487H23.861Z",fill:"white"}),/*#__PURE__*/B.default.createElement("path",{d:"M50.2261 22.5524C50.2261 24.3337 49.5307 25.9878 48.3295 27.1965C47.1284 28.4688 45.4847 29.1686 43.7146 29.1686H37.2031V1.49487H43.7146C45.4847 1.49487 47.1284 2.19467 48.3295 3.46703C49.5939 4.67577 50.2261 6.39345 50.2261 8.11113V22.5524ZM41.3123 25.0971H43.7778C44.41 25.0971 45.0422 24.8426 45.4215 24.3973C45.864 23.952 46.1169 23.3158 46.1169 22.6796V8.17475C46.1169 7.53857 45.864 6.90239 45.4215 6.45707C44.979 6.01174 44.41 5.75727 43.7778 5.75727H41.3123V25.0971Z",fill:"white"}),/*#__PURE__*/B.default.createElement("path",{d:"M4.83183 49.0815C2.55598 49.0815 0.722656 47.2366 0.722656 45.01C0.722656 45.01 0.722656 45.01 0.722656 44.9464V35.5309C0.722656 33.2407 2.49276 31.3958 4.76862 31.3322C7.04447 31.2685 8.8778 33.1135 8.94101 35.4037C8.94101 35.4673 8.94101 35.4673 8.94101 35.5309V37.5031H6.28585V35.4673C6.28585 34.6403 5.59045 33.9405 4.76862 33.9405C4.38931 33.9405 4.01 34.0677 3.69391 34.3858C3.44104 34.6403 3.25138 35.022 3.25138 35.4673V44.9464C3.25138 45.7734 3.88356 46.4096 4.7054 46.4096C5.08471 46.4096 5.46402 46.2824 5.78011 45.9643C6.0962 45.7098 6.22263 45.3281 6.22263 44.8828V42.5289H8.94101V44.9464C8.94101 47.2366 7.10769 49.0815 4.83183 49.0815Z",fill:"white"}),/*#__PURE__*/B.default.createElement("path",{d:"M30.1227 48.8867H23.1055V31.6463H25.6974V46.342H30.1859L30.1227 48.8867Z",fill:"white"}),/*#__PURE__*/B.default.createElement("path",{d:"M48.0115 31.4559C50.2874 31.4559 52.1207 33.3009 52.1207 35.5911V45.0065C52.1207 47.2968 50.2874 49.1417 48.0115 49.1417C46.9368 49.1417 45.8621 48.6964 45.1035 47.933C44.3449 47.1696 43.9023 46.088 43.9023 45.0065V35.5911C43.9023 33.3009 45.7357 31.4559 48.0115 31.4559ZM49.4023 35.5275C49.4023 34.7004 48.7701 34.0643 47.9483 34.0643C47.569 34.0643 47.1897 34.1915 46.8736 34.5096C46.5575 34.7641 46.4311 35.1458 46.4311 35.5911V45.0065C46.4311 45.3883 46.5575 45.77 46.8736 46.0244C47.1265 46.2789 47.5058 46.4698 47.9483 46.4698C48.7701 46.4698 49.4023 45.8336 49.4023 45.0065V35.5275Z",fill:"white"}),/*#__PURE__*/B.default.createElement("path",{d:"M70.4451 49.0776C68.2325 49.0776 66.3992 47.2963 66.3359 45.0061V31.6463H68.8647V45.0061C68.8647 45.3878 68.9911 45.7695 69.3072 46.0876C69.5601 46.342 69.9394 46.5329 70.3819 46.5329C71.2037 46.5329 71.8359 45.8967 71.8359 45.0697V31.7099H74.5543V45.0697C74.5543 46.1512 74.1118 47.2327 73.3531 47.9961C72.5945 48.6959 71.583 49.1412 70.4451 49.0776Z",fill:"white"}),/*#__PURE__*/B.default.createElement("path",{d:"M97.0021 44.7516C97.0021 45.8331 96.5595 46.9146 95.8009 47.678C95.0423 48.4414 94.0308 48.8867 92.9561 48.8867H88.9102V31.6463H92.9561C94.0308 31.6463 95.1055 32.0916 95.8009 32.855C96.5595 33.6185 97.0021 34.7 97.0021 35.7815V44.7516ZM91.5021 46.342H93.0826C93.4619 46.342 93.8412 46.2148 94.094 45.8967C94.3469 45.6422 94.5366 45.2605 94.5366 44.8152V35.7815C94.5366 35.3998 94.4101 35.018 94.094 34.7C93.8412 34.4455 93.4619 34.2546 93.0826 34.2546H91.5021V46.342Z",fill:"white"}),/*#__PURE__*/B.default.createElement("path",{d:"M87.2555 1.49487L92.7555 20.0713V1.49487H96.9279V29.1686H92.5027L86.813 11.4193V29.1686H82.6406V1.49487H87.2555Z",fill:"white"})))},Fu=function(t){var n=t.open,r=t.subtitle,i=t.scope,s=t.redirectPath,a=t.onSuccess,o=t.onFailure,c=t.onCancel,l=t.storeSession,u=t["data-testid"],d=e.useTranslation();/*#__PURE__*/return B.default.createElement(Y.default,{open:n,onClose:c,disableEscapeKeyDown:!0,"data-testid":u||"ac-sdk-login-modal"},/*#__PURE__*/B.default.createElement(j.default,null,/*#__PURE__*/B.default.createElement(zu,{title:void 0!==r?r:(0,d.t)("loginFormText"),scope:i,redirectPath:s,onSuccess:a,onFailure:o,onCancel:c,storeSession:l})))};Fu.propTypes={title:o.PropTypes.string,subtitle:o.PropTypes.string,scope:o.PropTypes.string,redirectPath:o.PropTypes.string,onSuccess:o.PropTypes.func,onFailure:o.PropTypes.func,onCancel:o.PropTypes.func,storeSession:o.PropTypes.bool},Fu.defaultProps={redirectPath:"/",storeSession:!1};var $u=a.observer(Fu),Vu=function(e){var n=e.isOpen,r=e.title,i=e.subtitle,s=e.scope,a=e.redirectPath,o=e.onSuccess,c=e.onFailure,l=e.onCancel,u=e.storeSession,d=void 0===u||u,p=t.useState(n),h=p[0],f=p[1];return t.useEffect(function(){f(n)},[n]),/*#__PURE__*/B.default.createElement($u,{open:h,title:r,subtitle:i,scope:s,redirectPath:a,onSuccess:function(t){o&&"function"==typeof o&&o(t),f(!1)},onFailure:c,onCancel:function(){l&&"function"==typeof l&&l(),f(!1)},storeSession:d})},qu=function(t,e){void 0===e&&(e={});var n=Tu(),r=n.loginUrl,i=n.clientId,s=n.grantType,a=n.redirectUri,o=n.redirectPath,c=bu(Vu,Pl({scope:t},e))[0],l=encodeURIComponent(a+"?next="+(e.redirectPath||o));return"password"===s?function(){c({key:(new Date).getTime()})}:function(){window.location.assign(r+"?response_type=code&client_id="+i+"&redirect_uri="+l+"&scope="+t)}},Zu=Object.getOwnPropertySymbols,Wu=Object.prototype.hasOwnProperty,Ku=Object.prototype.propertyIsEnumerable,Ju=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,r,i=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),s=1;s<arguments.length;s++){for(var a in n=Object(arguments[s]))Wu.call(n,a)&&(i[a]=n[a]);if(Zu){r=Zu(n);for(var o=0;o<r.length;o++)Ku.call(n,r[o])&&(i[r[o]]=n[r[o]])}}return i};const Xu=({url:t,allowFullScreen:e,position:n,display:r,height:i,width:s,overflow:a,styles:o,onLoad:c,onMouseOver:l,onMouseOut:u,scrolling:d,id:p,frameBorder:h,ariaHidden:f,sandbox:m,allow:_,className:g,title:y,ariaLabel:v,ariaLabelledby:b,name:S,target:E,loading:w,importance:k,referrerpolicy:T,allowpaymentrequest:x,src:C,key:R})=>{const D=Ju({src:C||t,target:E||null,style:{position:n||null,display:r||"initial",overflow:a||null},scrolling:d||null,allowpaymentrequest:x||null,importance:k||null,sandbox:m&&[...m].join(" ")||null,loading:w||null,styles:o||null,name:S||null,className:g||null,allowFullScreen:"allowFullScreen",referrerpolicy:T||null,title:y||null,allow:_||null,id:p||null,"aria-labelledby":b||null,"aria-hidden":f||null,"aria-label":v||null,width:s||null,height:i||null,onLoad:c||null,onMouseOver:l||null,onMouseOut:u||null,key:R||"iframe"});let I=Object.create(null);for(let t of Object.keys(D))null!=D[t]&&(I[t]=D[t]);for(let t of Object.keys(I.style))null==I.style[t]&&delete I.style[t];if(I.styles)for(let t of Object.keys(I.styles))I.styles.hasOwnProperty(t)&&(I.style[t]=I.styles[t]),Object.keys(I.styles).pop()==t&&delete I.styles;if(e)if("allow"in I){const t=I.allow.replace("fullscreen","");I.allow=`fullscreen ${t.trim()}`.trim()}else I.allow="fullscreen";return h>=0&&(I.style.hasOwnProperty("border")||(I.style.border=h)),B.default.createElement("iframe",Object.assign({},I))};var Qu=function(t){/*#__PURE__*/return B.default.createElement(Xu,{src:t.src,width:"100%",frameBorder:"0",styles:{display:"block",height:"calc(100vh - 70px)"}})},td=function(r){var i=r.position,s=r.scrolled,a=r.showAcLogo,o=r.leadingText,c=r.title,l=r.titleStyles,u=r.navProps,d=r.userProps,p=r.menuProps,h=r.sidebarEnabled,f=r.sidebarOpen,m=r.onSidebarToggle,_=r.styles,g=r["data-testid"],y=Tu().baseUrl,v=e.useTranslation().t,b=Pl({items:[]},u).items,E=Pl({show:!0,showCompanyLogo:!1},d),w=E.show,k=E.showCompanyLogo,T=Pl({items:[],buttonColor:"white",dropdownStyles:{},styles:{}},p),x=T.items,C=T.buttonColor,R=T.dropdownStyles,D=T.styles,I=t.useState(new Date),N=I[0],O=I[1],A=t.useState(null),U=A[0],P=A[1],M=function(t){var e=t.titleStyles,n=t.menuStyles,r=t.menuDropdownStyles;return{root:Pl({padding:"10px 0",color:"rgba(255,255,255,0.85)",background:"transparent",zIndex:1201},t.styles),title:Pl({flexGrow:1},e),nav:{marginRight:"10px"},user:{},userInfo:{marginLeft:"0.5em",color:"rgba(255,255,255,0.5)"},button:{height:"50px",marginRight:"10px",fontSize:"16px",fontWeight:600,backgroundColor:"rgba(79, 79, 79, 1)",boxShadow:"0px 2px 5px rgba(0, 0, 0, 0.28)",borderRadius:"4px","&:hover":{backgroundColor:"rgba(79, 79, 79, 1)",filter:"brightness(1.1)"}},loginButton:{padding:"6px 18px"},logoutButton:{paddingRight:"18px"},menu:Pl({marginTop:"70px",backgroundColor:"rgba(0,0,0,0.5)"},n,{"& .MuiPaper-root":Pl({minWidth:"20%",backgroundColor:"#2d2d2d",color:"white"},r)})}}({styles:_,titleStyles:l,menuStyles:D,menuDropdownStyles:R}),L=n.useNavigate();t.useEffect(function(){var t=setInterval(function(){O(new Date)},1e3);return function(){return clearInterval(t)}});var z,H,G=function(){P(null)},Y=function(t){t.url?L(t.url):t.action&&"function"==typeof t.action&&t.action(),G()};/*#__PURE__*/return B.default.createElement(J.default,{position:i,elevation:0,sx:Pl({},M.root,"static"===i?{marginTop:"-70px"}:{},s||f?{background:"#1E1E1E"}:{}),"data-testid":g||"ac-sdk-header"},/*#__PURE__*/B.default.createElement(nt.default,{variant:"dense"},h&&/*#__PURE__*/B.default.createElement(Q.default,{size:"large",sx:Pl({color:"rgba(255,255,255,0.85)",borderRight:"1px solid rgba(255,255,255,0.5)"},f&&{color:"rgba(255,255,255,0.5)",borderTop:"1px solid rgba(255,255,255,0.5)",borderRightColor:"transparent"},{"> svg":{transform:"rotate(180deg)"}}),onClick:m},/*#__PURE__*/B.default.createElement(S.ViewSidebarRounded,null)),a&&/*#__PURE__*/B.default.createElement(n.Link,{to:"/"},/*#__PURE__*/B.default.createElement("img",{src:it.default,alt:"AndonCloud",style:{display:"block",marginLeft:"-4px"}})),o&&/*#__PURE__*/B.default.createElement(rt.default,{variant:"subtitle1"},o),/*#__PURE__*/B.default.createElement(rt.default,{variant:"subtitle1",align:"center",style:{flexGrow:1},sx:M.title},c),b&&/*#__PURE__*/B.default.createElement($.default,{display:"flex",sx:M.nav},b.map(function(t){/*#__PURE__*/return B.default.createElement(X.default,{key:t.label,onClick:function(){return Y(t)},endIcon:t.icon,sx:M.button},t.label)})),w&&/*#__PURE__*/B.default.createElement($.default,{display:"flex",sx:M.user},du.getCurrentUserJS?/*#__PURE__*/B.default.createElement(X.default,{id:"logout-button",onClick:function(){try{return Promise.resolve(mu.logout()).then(function(){L("/")})}catch(t){return Promise.reject(t)}},sx:Pl({},M.button,M.logoutButton),"data-testid":"ac-sdk-header-logout-button"},v("headerLogoutButton"),k&&(H=function(){var t="",e=du.getCurrentUserJS;return null===e?t:y+"/"+(t=e.company.logo_url)}(),/*#__PURE__*/B.default.createElement("img",{src:H,alt:""})),/*#__PURE__*/B.default.createElement($.default,{display:"inline-block",sx:M.userInfo},(z=du.currentUser)&&"("+z.name+")")):/*#__PURE__*/B.default.createElement(X.default,{id:"login-button",onClick:function(){return L("/login")},sx:Pl({},M.button,M.loginButton),"data-testid":"ac-sdk-header-login-button"},v("headerLoginButton"))),/*#__PURE__*/B.default.createElement(W.default,null),/*#__PURE__*/B.default.createElement(rt.default,{variant:"body1",align:"center",style:{width:"5rem",padding:"0 5px"}},N.toLocaleTimeString()),x&&/*#__PURE__*/B.default.createElement($.default,null,/*#__PURE__*/B.default.createElement(Q.default,{onClick:function(t){P(t.currentTarget)}},/*#__PURE__*/B.default.createElement(K.default,{style:C?{color:C}:{}})),/*#__PURE__*/B.default.createElement(tt.default,{id:"menu-appbar",marginThreshold:0,anchorEl:U,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(U),onClose:G,sx:M.menu},x.map(function(t){/*#__PURE__*/return B.default.createElement(et.default,{key:t.label,onClick:function(){return Y(t)}},t.label)})))))};td.propTypes={position:o.PropTypes.string,scrolled:o.PropTypes.bool,showAcLogo:o.PropTypes.bool,leadingText:o.PropTypes.string,title:o.PropTypes.string,titleStyles:o.PropTypes.any,navProps:o.PropTypes.shape({items:o.PropTypes.any}),userProps:o.PropTypes.shape({show:o.PropTypes.bool,showCompanyLogo:o.PropTypes.bool}),menuProps:o.PropTypes.shape({items:o.PropTypes.any,buttonColor:o.PropTypes.string,dropdownStyles:o.PropTypes.any,styles:o.PropTypes.any}),styles:o.PropTypes.any},td.defaultProps={navProps:{},userProps:{},menuProps:{},styles:{}};var ed=a.observer(td),nd=function(e){var r=e.open,i=e.items,s=e.width,a=e.styles,o=e.listStyles,c=e.itemStyles,l=e.subitemStyles,u=t.useState([]),p=u[0],h=u[1],f=function(t){var e=t.styles,n=t.listStyles,r=t.itemStyles,i=t.subitemStyles;return{root:Pl({flexShrink:0,"& .MuiDrawer-paper":{width:e.width+"px",boxSizing:"border-box",marginTop:"70px",color:"rgba(255,255,255,0.85)",background:"rgba(0,0,0,0.25)"}},e),list:Pl({height:"90%",overflowY:"scroll"},n),item:Pl({},r),itemIcon:{color:"rgba(255,255,255,0.85)"},subitem:Pl({},i),subitemText:{"& > span":{fontSize:"95%"}},subitemButton:{paddingLeft:4}}}({styles:Pl({},a,{width:s}),listStyles:o,itemStyles:c,subitemStyles:l}),m=n.useNavigate(),_=function(t,e,n,r){t?t():e&&(e.startsWith("/")?m(e):m("?external="+e))};/*#__PURE__*/return B.default.createElement(d.Drawer,{sx:f.root,variant:"persistent",anchor:"left",open:r},/*#__PURE__*/B.default.createElement(d.List,{sx:f.list},i.map(function(t,e){var n=t.action,r=t.url,i=t.icon,s=t.label,a=t.items;/*#__PURE__*/return B.default.createElement(B.default.Fragment,{key:s},/*#__PURE__*/B.default.createElement(d.ListItem,{sx:f.item,disablePadding:!0},/*#__PURE__*/B.default.createElement(d.ListItemButton,{onClick:function(){null!=a&&a.length?h(function(t){return t[e]=!t[e],Pl({},t)}):_(n,r)}},i&&/*#__PURE__*/B.default.createElement(d.ListItemIcon,{sx:f.itemIcon},i),/*#__PURE__*/B.default.createElement(d.ListItemText,{primary:s,sx:f.itemText}),a&&/*#__PURE__*/B.default.createElement(p[e]?S.ExpandLess:S.ExpandMore,null))),a&&/*#__PURE__*/B.default.createElement(d.Collapse,{in:p[e],timeout:"auto",unmountOnExit:!0},function(t){/*#__PURE__*/return B.default.createElement(d.List,{component:"div",disablePadding:!0},t.map(function(t){var e=t.action,n=t.url,r=t.icon,i=t.label;/*#__PURE__*/return B.default.createElement(d.ListItem,{key:i,sx:f.subitem,disablePadding:!0},/*#__PURE__*/B.default.createElement(d.ListItemButton,{sx:f.subitemButton,onClick:function(){return _(e,n)}},r&&/*#__PURE__*/B.default.createElement(d.ListItemIcon,{sx:f.itemIcon},r),/*#__PURE__*/B.default.createElement(d.ListItemText,{primary:i,sx:f.subitemText})))}))}(a)))})))};nd.propTypes={open:o.PropTypes.bool,items:o.PropTypes.any,width:o.PropTypes.number,styles:o.PropTypes.any,listStyles:o.PropTypes.any,itemStyles:o.PropTypes.any,subitemStyles:o.PropTypes.any},nd.defaultProps={styles:{},listStyles:{},itemStyles:{},subitemStyles:{}};var rd=d.styled("main",{shouldForwardProp:function(t){return!["open","sidebarWidth"].includes(t)}})(function(t){var e=t.theme,n=t.open,r=t.sidebarWidth;return Pl({flexGrow:1,transition:e.transitions.create("margin",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),marginLeft:0},n&&{transition:e.transitions.create("margin",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),marginLeft:r+"px"})}),id=function(e){var r=e.children,i=e.headerProps,s=e.sidebarMenuProps,a=e.styles,o=e["data-testid"],c=n.useSearchParams()[0],l=t.useState(),u=l[0],p=l[1],h=t.useState(s.open),f=h[0],m=h[1],_=d.useScrollTrigger({disableHysteresis:!0,target:u,threshold:0}),g=c.get("external"),y=s.width||240;/*#__PURE__*/return B.default.createElement(Z.default,{ref:function(t){t&&p(t)},maxWidth:!1,disableGutters:!0,sx:Pl({},Su.root,a),"data-testid":o||"ac-sdk-container"},/*#__PURE__*/B.default.createElement(ed,Pl({scrolled:_,showAcLogo:!0,sidebarEnabled:s.enabled,sidebarOpen:f,onSidebarToggle:function(){return m(function(t){return!t})}},i)),s.enabled&&/*#__PURE__*/B.default.createElement(nd,{open:f,items:s.items,width:y}),/*#__PURE__*/B.default.createElement(rd,{open:f,sidebarWidth:y},g?/*#__PURE__*/B.default.createElement(Qu,{src:g}):r),/*#__PURE__*/B.default.createElement(d.Box,{sx:Su.overlay}))};id.propTypes={children:o.PropTypes.any,headerProps:o.PropTypes.shape({position:o.PropTypes.string,showAcLogo:o.PropTypes.bool,leadingText:o.PropTypes.string.isRequired,title:o.PropTypes.string,navProps:o.PropTypes.shape({items:o.PropTypes.any}),userProps:o.PropTypes.shape({show:o.PropTypes.bool,showCompanyLogo:o.PropTypes.bool}),menuProps:o.PropTypes.shape({items:o.PropTypes.any,buttonColor:o.PropTypes.string,dropdownStyles:o.PropTypes.any,styles:o.PropTypes.any}),styles:o.PropTypes.any}),sidebarMenuProps:o.PropTypes.shape({enabled:o.PropTypes.bool,open:o.PropTypes.bool,items:o.PropTypes.any,width:o.PropTypes.number}),styles:o.PropTypes.any},id.defaultProps={headerProps:{},sidebarMenuProps:{}};var sd=function(t){var n=t.redirectPath,r=e.useTranslation(),i=r.i18n,s=r.t;/*#__PURE__*/return B.default.createElement(id,{headerProps:{position:"static",leadingText:"AndonCloud Software",userProps:{show:!1},menuProps:{items:[{label:s("changeLanguageText"),action:function(){i.changeLanguage("pl"===i.language?"en":"pl")}}],buttonColor:"white"}}},/*#__PURE__*/B.default.createElement($.default,{display:"flex",height:"100%",alignItems:"center",justifyContent:"center"},/*#__PURE__*/B.default.createElement(V.default,{sx:{borderRadius:"20px"}},/*#__PURE__*/B.default.createElement(q.default,null,/*#__PURE__*/B.default.createElement(zu,{title:s("loginFormText"),redirectPath:n})))))};sd.propTypes={redirectPath:o.PropTypes.string},sd.defaultProps={redirectPath:"/"};var ad=a.observer(sd),od=function(){var t=Tu(),e=t.grantType,r=t.redirectPath,i=qu("read write"),s=n.useNavigate();return"password"===e?/*#__PURE__*/B.default.createElement(ad,{redirectPath:r}):(s("/"),i(),null)},cd=function(t){if(!(xl&&Cl&&Rl&&Dl&&Il&&Nl))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.\n useEffect: ${xl}. useLocation: ${Cl}. useNavigationType: ${Rl}.\n createRoutesFromChildren: ${Dl}. matchRoutes: ${Il}. customStartTransaction: ${Nl}.`),t;let e=!0;const n=n=>{const r=Cl(),i=Rl();return xl(()=>{const t=Dl(n.children);e?(function(t,e,n,r){const i=Array.isArray(n)?n:Il(e,t,void 0);Tl&&i&&Tl.setName(...Ul(e,t,i))}(r,t),e=!1):function(t,e,n,r,i){const s=Array.isArray(r)?r:Il(e,t,void 0);if(Ol&&("PUSH"===n||"POP"===n)&&s){Tl&&Tl.finish();const[n,r]=Ul(e,t,s);Tl=Nl({name:n,op:"navigation",tags:Al,metadata:{source:r}})}}(r,t,i)},[r,i]),P.createElement(t,{...n,__self:this,__source:{fileName:"/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouterv6.tsx",lineNumber:205}})};return bl(n,t),n}(n.Routes),ld=function(t){/*#__PURE__*/return B.default.createElement(n.BrowserRouter,null,/*#__PURE__*/B.default.createElement(cd,null,t.children,/*#__PURE__*/B.default.createElement(n.Route,{exact:!0,path:"/login",element:/*#__PURE__*/B.default.createElement(od,null)}),/*#__PURE__*/B.default.createElement(n.Route,{path:"/oauth2/redirect",element:/*#__PURE__*/B.default.createElement(Bu,null)})))},ud=a.observer(function(r){var i=r.children,a=r.baseUrl,o=r.authProps,c=r.gtmProps,l=r.i18nProps,u=r.sentryProps,d=r.metaProps,p=r.muiTheme,h=_u().status,f=Pl({enabled:!0,redirectPath:"/"},o),m=f.enabled;return mu.setAuthConfig({baseUrl:a,clientId:f.clientId,redirectUri:f.redirectUri}),t.useEffect(function(){!Nu.gtmReady&&null!=c&&c.gtmId&&(Hl.initialize(c),Nu.setGtmReady())},[c]),t.useEffect(function(){var e,r,i,s,a,o;!Nu.sentryReady&&u&&((e=Pl({tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,integrations:[new Gl.BrowserTracing({routingInstrumentation:(r=t.useEffect,i=n.useLocation,s=n.useNavigationType,a=n.createRoutesFromChildren,o=n.matchRoutes,(t,e=!0,n=!0)=>{const c=fi&&fi.location&&fi.location.pathname;e&&c&&(Tl=t({name:c,op:"pageload",tags:Al,metadata:{source:"url"}})),xl=r,Cl=i,Rl=s,Il=o,Dl=a,Nl=t,Ol=n})}),new Sc]},u))._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:oi}],version:oi},function(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=us),void 0===t.release&&("string"==typeof __SENTRY_RELEASE__&&(t.release=__SENTRY_RELEASE__),fi.SENTRY_RELEASE&&fi.SENTRY_RELEASE.id&&(t.release=fi.SENTRY_RELEASE.id)),void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0);const e={...t,stackParser:(n=t.stackParser||ji,Array.isArray(n)?Qe(...n):n),integrations:Kr(t),transport:t.transport||(rn()?Ui:Pi)};var n;!function(t,e){!0===e.debug&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Ue.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));const n=xr();n.getScope().update(e.initialScope);const r=new t(e);n.bindClient(r)}(Oi,e),t.autoSessionTracking&&function(){if(void 0===fi.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ue.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));const t=xr();t.captureSession&&(ps(t),dn("history",({from:t,to:e})=>{void 0!==t&&t!==e&&ps(xr())}))}()}(e),Nu.setSentryReady())},[u]),t.useEffect(function(){m?function(){try{var t=function(){if(m)return Promise.resolve(mu.recover()).then(function(){})}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(t){return Promise.reject(t)}}():Nu.setAppReady()},[m]),t.useEffect(function(){var t=null==l?void 0:l.locales;if(t)for(var e="translation",n=0,r=Object.entries(t);n<r.length;n++){var i=r[n];z.default.addResources(i[0],e,i[1][e])}},[null==l?void 0:l.locales]),t.useEffect(function(){m&&"unknown"!==h&&Nu.setAppReady()},[m,h]),/*#__PURE__*/B.default.createElement(s.ThemeProvider,{theme:s.createTheme(p)},/*#__PURE__*/B.default.createElement(M.default,null),/*#__PURE__*/B.default.createElement(L.default,{styles:{"::-webkit-scrollbar":{width:"6px"},"::-webkit-scrollbar-track":{backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{borderRadius:"3px",backgroundColor:"rgba(255, 255, 255, 0.25)"}}}),/*#__PURE__*/B.default.createElement(kl,{fallback:function(t){/*#__PURE__*/return B.default.createElement(Eu,t)}},/*#__PURE__*/B.default.createElement(ie,null),/*#__PURE__*/B.default.createElement(ku,{config:Pl({baseUrl:a},o)},/*#__PURE__*/B.default.createElement(Iu,null,/*#__PURE__*/B.default.createElement(e.I18nextProvider,{i18n:z.default},/*#__PURE__*/B.default.createElement(Cu,{info:d},mu.networkError?/*#__PURE__*/B.default.createElement(Pu,{error:mu.networkError}):Nu.appReady?/*#__PURE__*/B.default.createElement(ld,null,/*#__PURE__*/B.default.createElement(n.Route,{path:"*",element:/*#__PURE__*/B.default.createElement(yu,null,i)})):/*#__PURE__*/B.default.createElement(Uu,{"data-testid":"ac-sdk-app-loading",width:"500px"})))))))});ud.propTypes={children:o.PropTypes.any.isRequired,baseUrl:o.PropTypes.string.isRequired,authProps:o.PropTypes.shape({enabled:o.PropTypes.bool,loginUrl:o.PropTypes.string,redirectUri:o.PropTypes.string,redirectPath:o.PropTypes.string,clientId:o.PropTypes.string.isRequired,grantType:o.PropTypes.string}),gtmProps:o.PropTypes.any,i18nProps:o.PropTypes.shape({locales:o.PropTypes.any}),sentryProps:o.PropTypes.any,metaProps:o.PropTypes.shape({releaseVersion:o.PropTypes.string,releasePageLink:o.PropTypes.string}),muiTheme:o.PropTypes.any},ud.defaultProps={authProps:{},gtmProps:{},i18nProps:{},sentryProps:{},metaProps:{},muiTheme:Au};var dd=function(t,e){const n=t.displayName||t.name||"unknown",r=e=>P.createElement(El,{name:n,updateProps:e,__self:this,__source:{fileName:Sl,lineNumber:146}},P.createElement(t,{...e,__self:this,__source:{fileName:Sl,lineNumber:147}}));return r.displayName=`profiler(${n})`,bl(r,t),r}(ud),pd=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function hd(t,e,n,r){navigator.serviceWorker.register(t).then(function(t){var i=null;r&&setInterval(function(){fetch("/manifest.json").then(function(e){try{return Promise.resolve(e.json()).then(function(e){var r=e.version;n!==r&&(i=r,t.update())})}catch(t){return Promise.reject(t)}}).catch(function(){})},3e4),t.onupdatefound=function(){var n=t.installing;null!=n&&(n.onstatechange=function(){"installed"===n.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),e&&e.onUpdate&&(r?e.onUpdate(t,i):e.onUpdate(t))):(console.log("Content is cached for offline use."),e&&e.onSuccess&&e.onSuccess(t)))})}}).catch(function(t){console.error("Error during service worker registration:",t)})}exports.App=dd,exports.Container=id,exports.captureException=Vr,exports.fetch=uu,exports.getLocale=function(){return z.default.language},exports.logout=function(){return mu.logout()},exports.notify=se,exports.registerServiceWorker=function(t){var e=t.version,n=function(t){var e=t.waiting;e&&(e.addEventListener("statechange",function(t){"activated"===t.target.state&&window.location.reload()}),e.postMessage({type:"SKIP_WAITING"}))},r=function(){return se(z.default.t("newVersionAvailable"),{duration:5e3,position:"bottom-left",style:{color:"rgba(255,255,255,0.85)",background:"#3F3F3F",border:"1px solid #FFE72F"}})};!function(t){var e=t.publicUrl,n=t.mode,r=t.autoUpdate,i=t.version,s=t.registrationConfig;if(globalThis.version=i,"production"===n&&"serviceWorker"in navigator){if(new URL(e,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",function(){var t=e+"/service-worker.js";pd?(function(t,e){fetch(t,{headers:{"Service-Worker":"script"}}).then(function(n){var r=n.headers.get("content-type");404===n.status||null!=r&&-1===r.indexOf("javascript")?navigator.serviceWorker.ready.then(function(t){t.unregister().then(function(){window.location.reload()})}):hd(t,e)}).catch(function(){console.log("No internet connection found. App is running in offline mode.")})}(t,s),navigator.serviceWorker.ready.then(function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):hd(t,s,i,r)})}}(Pl({},t,{registrationConfig:Pl({},(null==t?void 0:t.registrationConfig)||{},{onUpdate:function(i,s){var a,o;null!=(a=t.registrationConfig)&&a.onUpdate&&(null==(o=t.registrationConfig)||o.onUpdate(i)),s&&e!==s?(r(),setTimeout(function(){n(i)},5e3)):(r(),n(i))}})}))},exports.setLocale=function(t){return z.default.changeLanguage(t)},exports.useLogin=qu,exports.useLoginStatus=_u,exports.useStore=function(){return t.useContext(Du)};
|
|
172
172
|
//# sourceMappingURL=andoncloud-sdk.js.map
|