tokentracker-cli 1.5.4 → 1.5.5
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/dashboard/dist/assets/{AchievementBadge-CKNb_cwg.js → AchievementBadge-BYxdWhS1.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-u9P8DXJI.js → AchievementsPage-Bv9o7Aj8.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-BSCUJ4DR.js → AchievementsSection-DE5bZGxg.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-Bg7cE3Zq.js → BadgeDetailModal-CgZaSVTp.js} +1 -1
- package/dashboard/dist/assets/{BotAnimated-C7D2WbQA.js → BotAnimated-CwhPfUBI.js} +1 -1
- package/dashboard/dist/assets/{Card-B4IqAhai.js → Card-Y7qaxMuE.js} +1 -1
- package/dashboard/dist/assets/{CloudCheckoutPage-P75pH9Ym.js → CloudCheckoutPage-DVl7jk6b.js} +1 -1
- package/dashboard/dist/assets/{CloudPage-DDEZfmZg.js → CloudPage-BnIvpHGH.js} +2 -2
- package/dashboard/dist/assets/{CommandPalette-CER_AklA.js → CommandPalette-CzMv2Zxn.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-Cbb74eib.js → CommunityStatsModal-D8sOZqUc.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-Q1ZQdZHt.js → ConfirmModal-Bun5xKMm.js} +1 -1
- package/dashboard/dist/assets/{Controls-DaGOfcoz.js → Controls-ltfnvkFW.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-CXI7RmxO.js → DashboardPage-C3Xu6_3t.js} +1 -1
- package/dashboard/dist/assets/{DateRangePopover-DSS1Ira_.js → DateRangePopover-e3gJYqFJ.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-6zPLYydh.js → DevicePage-JgT16dEp.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-DdCQ36LK.js → DialogClose-DeWert7h.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-Ca6W3nCT.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-BjP217Y1.js → DialogTitle-BfK_yOeR.js} +1 -1
- package/dashboard/dist/assets/{ElectricLogo-Dhq8PM4h.js → ElectricLogo-Bbev0Y8Q.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-CGNbED4E.js → FadeIn-fypYWLDK.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-DwqEFzb6.js → HeaderGithubStar-Cnil2Lbo.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-CQZTgyQy.js → HoverTooltip-Bw_8tru-.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-Bz09HXLn.js → IpCheckPage-CHnhUgA2.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-DC-lZsYR.js → LandingPage-Bq4iQS6S.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardPage-D8MpLM_t.js → LeaderboardPage-D42lUdw-.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProBadge-pdXgokhE.js → LeaderboardProBadge-eTKceT90.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardProfileModal-nHZLiE0m.js → LeaderboardProfileModal-D-3tRrOR.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfilePage-BKv3oIAW.js → LeaderboardProfilePage-DkRCJoiA.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-TmRTgSCb.js → LimitsPage-dUXjP3_1.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-aF01udyR.js → LocalOnlyNotice-CtpjB6Z2.js} +1 -1
- package/dashboard/dist/assets/{LoginCard-BaroD0Ct.js → LoginCard-zrRd8o54.js} +1 -1
- package/dashboard/dist/assets/{LoginModal-0jgyMGVM.js → LoginModal-DNl5Rt1e.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-BUx8U58i.js → LoginPage-BuB707vV.js} +1 -1
- package/dashboard/dist/assets/{PetPage-CpOjtJqg.js → PetPage-BpDriXkp.js} +2 -2
- package/dashboard/dist/assets/{PopoverPopup-BYjfer-M.js → PopoverPopup-rQNSs8R6.js} +1 -1
- package/dashboard/dist/assets/{ProviderIcon-NtYa2h0u.js → ProviderIcon-CumyO371.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-CYUg7TR1.js → ResetPasswordPage-ecUHfJAk.js} +1 -1
- package/dashboard/dist/assets/{Select-CYP95o5y.js → Select-YVEqEhk4.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-BCDfusOM.js → SelectItemText-D1NBc4uc.js} +1 -1
- package/dashboard/dist/assets/{SelfHostPage-BmVc2rIT.js → SelfHostPage-8nAin68c.js} +1 -1
- package/dashboard/dist/assets/{ServiceStatusPage-Dyp8NwIn.js → ServiceStatusPage-D1zxuzOg.js} +1 -1
- package/dashboard/dist/assets/{SessionsPage-tGEj6Ztz.js → SessionsPage-B6ksEER_.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-CCMbq5wc.js → SettingsPage-COqP8ZbJ.js} +3 -3
- package/dashboard/dist/assets/{SkillsPage-C4O4fbaQ.js → SkillsPage-DCX7xTj0.js} +1 -1
- package/dashboard/dist/assets/TokenGalaxy-D4n7AR-R.js +4431 -0
- package/dashboard/dist/assets/{TooltipPopup-BJfFYesG.js → TooltipPopup-DvSoB_eS.js} +1 -1
- package/dashboard/dist/assets/{TrendMonitor-CElakFSU.js → TrendMonitor-5GVzh0Ye.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-Cvd1LbJm.js → WidgetsPage-BIc4MBiu.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-wRC1tE_a.js → WrappedPage-BpQk4g0o.js} +1 -1
- package/dashboard/dist/assets/{__vite-browser-external-V4TPLCJG.js → __vite-browser-external-B_rKFTTN.js} +3 -3
- package/dashboard/dist/assets/{agent-logos-Ba57HF3w.js → agent-logos-DVg-sTm4.js} +1 -1
- package/dashboard/dist/assets/{arrow-left-B1bKnxXL.js → arrow-left-Ch6Q7eU5.js} +1 -1
- package/dashboard/dist/assets/{arrow-right-DrOlKzX5.js → arrow-right-B2B9GvSI.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-hlYpo3yw.js → arrow-up-right-DwNO_uSb.js} +1 -1
- package/dashboard/dist/assets/{calendar-days-CSY6SEsI.js → calendar-days---NjJlBi.js} +1 -1
- package/dashboard/dist/assets/{check-xrP1gLw5.js → check-D3mhgRrW.js} +1 -1
- package/dashboard/dist/assets/{chevron-down-6-zT5n9d.js → chevron-down-x-b39Zto.js} +1 -1
- package/dashboard/dist/assets/{cloud-checkout-BZymZD4K.js → cloud-checkout-CycWyTsg.js} +1 -1
- package/dashboard/dist/assets/{composite-C9izWafa.js → composite-CnA1qtYn.js} +1 -1
- package/dashboard/dist/assets/{copy-Dkas5wZX.js → copy-JRnRMgdX.js} +1 -1
- package/dashboard/dist/assets/{download-CagGRs0_.js → download-CRLqGD62.js} +1 -1
- package/dashboard/dist/assets/{external-link-DRl10hxd.js → external-link-BrmaWV_t.js} +1 -1
- package/dashboard/dist/assets/{flame-CkvmsTFB.js → flame-meQ5-vRD.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-BtwhO3mV.js → format-tokens-D8mIJGz1.js} +1 -1
- package/dashboard/dist/assets/{gift-YzjXkMQx.js → gift-Cd0FPXgO.js} +1 -1
- package/dashboard/dist/assets/{icons-CHhKYs0u.js → icons-D-PTKw7b.js} +1 -1
- package/dashboard/dist/assets/{index-B0MQZTrM.js → index-CMV9UKNf.js} +1 -1
- package/dashboard/dist/assets/{index-DojzoMqd.js → index-C_6gEM83.js} +1 -1
- package/dashboard/dist/assets/{index-CJknN9Jd.js → index-DCIZaLNC.js} +1 -1
- package/dashboard/dist/assets/index-HLYcwmPD.js +502 -0
- package/dashboard/dist/assets/{info-Torep-Ti.js → info-e0tP9P3D.js} +1 -1
- package/dashboard/dist/assets/{link-2-DE5Yu-z6.js → link-2-DZ2TQhER.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-BL8LxD9n.js → loader-circle-DjflRntu.js} +1 -1
- package/dashboard/dist/assets/{local-usage-transfer-8X1InWix.js → local-usage-transfer-XTZLA3XH.js} +1 -1
- package/dashboard/dist/assets/{modifiers.esm-D60-6UQa.js → modifiers.esm-BpEQ8-Gt.js} +1 -1
- package/dashboard/dist/assets/module-BbVsRaE2.js +3 -0
- package/dashboard/dist/assets/{monitor-smartphone-C-IFPjqk.js → monitor-smartphone-VVBcI30G.js} +1 -1
- package/dashboard/dist/assets/{play-n6uWrdH9.js → play-DN4Sb3W_.js} +1 -1
- package/dashboard/dist/assets/{plus-B2f6TaNj.js → plus-Cz_k7arH.js} +1 -1
- package/dashboard/dist/assets/{provider-display-DWqCEcsP.js → provider-display-S1mSaydF.js} +1 -1
- package/dashboard/dist/assets/{react-B-zfi_j6.js → react-MQBcjrn_.js} +1 -1
- package/dashboard/dist/assets/{safePolygon-C2PsvI-v.js → safePolygon-InKxYcXd.js} +1 -1
- package/dashboard/dist/assets/{search-DZOaTLF9.js → search-C-N0RDi0.js} +1 -1
- package/dashboard/dist/assets/{server-DIp4Qfsv.js → server-CZkn8vIZ.js} +1 -1
- package/dashboard/dist/assets/{shield-check-Cs2M8-iT.js → shield-check-DPrGFouZ.js} +1 -1
- package/dashboard/dist/assets/{skills-api-CoYy6Tov.js → skills-api-wMwM-GpF.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-B5_hjIfs.js → sortable.esm-CUPP1ihT.js} +1 -1
- package/dashboard/dist/assets/{store-BLXqtJzb.js → store-BpVdRYnQ.js} +1 -1
- package/dashboard/dist/assets/{terminal-CEMKX3ba.js → terminal-C-7TFeKg.js} +1 -1
- package/dashboard/dist/assets/{trash-DOWYaXjK.js → trash-Be8cd4HD.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-BjRI1Bzz.js → use-community-stats-cG0WrB4Y.js} +1 -1
- package/dashboard/dist/assets/{use-latest-request-guard-T7L5qBU6.js → use-latest-request-guard-C91enyPD.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-vNIrCPZA.js → use-limits-display-prefs-DdwoLqPD.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-Cg5Zb4q_.js → use-native-settings-BR-NiMKh.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-BF-wIvmG.js → use-ordered-list-oqV724BP.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-DW5YHBBI.js +1 -0
- package/dashboard/dist/assets/{use-transform-CbJ1IcNc.js → use-transform-BsNSgVD6.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-Dgg3jpC4.js → use-usage-limits-Dk8LcMU-.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-3oBHWfSe.js → useCurrency-FxerRfd2.js} +1 -1
- package/dashboard/dist/assets/{usePositioner-D0YrIW0A.js → usePositioner-D2J-rSfX.js} +1 -1
- package/dashboard/dist/assets/{useTokenFormat-DZAHWE_R.js → useTokenFormat-CaI2nl2C.js} +1 -1
- package/dashboard/dist/assets/{zap-kLub6Jiv.js → zap-D3C37XAj.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/ip-check.html +1 -1
- package/dashboard/dist/leaderboard.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +4 -4
- package/src/lib/cursor-config.js +15 -1
- package/src/lib/pricing/curated-overrides.json +14 -0
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +13 -4
- package/src/lib/usage-limits.js +266 -10
- package/dashboard/dist/assets/DialogDescription-DztHQvj-.js +0 -1
- package/dashboard/dist/assets/TokenGalaxy-D2d738xr.js +0 -4426
- package/dashboard/dist/assets/index-C2DK8av-.js +0 -502
- package/dashboard/dist/assets/module-ZyVsxBG_.js +0 -3
- package/dashboard/dist/assets/use-reduced-motion-B9K5mIx4.js +0 -1
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import{r as _e}from"./__vite-browser-external-B_rKFTTN.js";const A=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,D=globalThis,nn="11.10.0";function at(){return pn(D),D}function pn(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||nn,t[nn]=t[nn]||{}}function Rr(e,t,n=D){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[nn]=r[nn]||{};return o[e]||(o[e]=t())}const pi=["debug","info","warn","error","log","assert","trace"],Ly="Sentry Logger ",ks={};function pt(e){if(!("console"in D))return e();const t=D.console,n={},r=Object.keys(ks);r.forEach(o=>{const s=ks[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Dy(){zc().enabled=!0}function $y(){zc().enabled=!1}function hp(){return zc().enabled}function Fy(...e){Wc("log",...e)}function By(...e){Wc("warn",...e)}function Uy(...e){Wc("error",...e)}function Wc(e,...t){A&&hp()&&pt(()=>{D.console[e](`${Ly}[${e}]:`,...t)})}function zc(){return A?Rr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const _={enable:Dy,disable:$y,isEnabled:hp,log:Fy,warn:By,error:Uy},mp=50,vt="?",dl=/\(error: (.*)\)/,fl=/captureMessage|captureException/;function gp(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{const s=[],i=n.split(`
|
|
2
|
+
`);for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));const u=dl.test(c)?c.replace(dl,"$1"):c;if(!u.includes("Error: ")){for(const l of t){const f=l(u);if(f){s.push(f);break}}if(s.length>=mp+o)break}}return Wy(s.slice(o))}}function Hy(e){return Array.isArray(e)?gp(...e):e}function Wy(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(qo(t).function||"")&&t.pop(),t.reverse(),fl.test(qo(t).function||"")&&(t.pop(),fl.test(qo(t).function||"")&&t.pop()),t.slice(0,mp).map(n=>({...n,filename:n.filename||qo(t).filename,function:n.function||vt}))}function qo(e){return e[e.length-1]||{}}const na="<anonymous>";function Dt(e){try{return!e||typeof e!="function"?na:e.name||na}catch{return na}}function Ga(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function zy(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}const Gr={},pl={};function hn(e,t){return Gr[e]=Gr[e]||[],Gr[e].push(t),()=>{const n=Gr[e];if(n){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function mn(e,t){if(!pl[e]){pl[e]=!0;try{t()}catch(n){A&&_.error(`Error while instrumenting ${e}`,n)}}}function tt(e,t){const n=e&&Gr[e];if(n)for(const r of n)try{r(t)}catch(o){A&&_.error(`Error while triggering instrumentation handler.
|
|
3
|
+
Type: ${e}
|
|
4
|
+
Name: ${Dt(r)}
|
|
5
|
+
Error:`,o)}}let ra=null;function _p(e){const t="error";hn(t,e),mn(t,jy)}function jy(){ra=D.onerror,D.onerror=function(e,t,n,r,o){return tt("error",{column:r,error:o,line:n,msg:e,url:t}),ra?ra.apply(this,arguments):!1},D.onerror.__SENTRY_INSTRUMENTED__=!0}let oa=null;function yp(e){const t="unhandledrejection";hn(t,e),mn(t,qy)}function qy(){oa=D.onunhandledrejection,D.onunhandledrejection=function(e){return tt("unhandledrejection",e),oa?oa.apply(this,arguments):!0},D.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Sp=Object.prototype.toString;function Re(e){switch(Sp.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return gi(e,Error)}}function Cr(e,t){return Sp.call(e)===`[object ${t}]`}function bp(e){return Cr(e,"ErrorEvent")}function hl(e){return Cr(e,"DOMError")}function Gy(e){return Cr(e,"DOMException")}function nt(e){return Cr(e,"String")}function hi(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function dt(e){return e===null||hi(e)||typeof e!="object"&&typeof e!="function"}function We(e){return Cr(e,"Object")}function rt(e){return typeof e=="object"&&e!==null}function mi(e){return typeof Event<"u"&&gi(e,Event)}function vp(e){return Cr(e,"RegExp")}function $t(e){return!!(e?.then&&typeof e.then=="function")}function gi(e,t){try{return e instanceof t}catch{return!1}}function jc(e){return typeof Request<"u"&&gi(e,Request)}function Pe(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const o=n(r);typeof o=="function"&&Ep(o,r);try{e[t]=o}catch{A&&_.log(`Failed to replace method "${t}" in object`,e)}}function pe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{A&&_.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Ep(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,pe(e,"__sentry_original__",t)}catch{}}function qc(e){return e.__sentry_original__}function wp(e){if(Re(e))return{message:e.message,name:e.name,stack:e.stack,...ml(e)};if(mi(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...ml(e)}}return e}function ml(e){return rt(e)?Object.fromEntries(Object.entries(e)):{}}function Vy(e){const t=Object.keys(wp(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let Vn;function dr(e){if(Vn!==void 0)return Vn?Vn(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=D;return t in n&&typeof n[t]=="function"?(Vn=n[t],Vn(e)):(Vn=null,e())}function rn(){return dr(()=>Math.random())}function zt(){return dr(()=>Date.now())}const Tp=Symbol.for("sentry.skipNormalization"),Ip=Symbol.for("sentry.overrideNormalizationDepth");function Ky(e){pe(e,Tp,!0)}function Yy(e,t){pe(e,Ip,t)}function Xy(e){return!!e[Tp]}function Jy(e){const t=e[Ip];return typeof t=="number"?t:void 0}let Va;function kp(e){Va=e}function Te(e,t=100,n=1/0){try{return Ka("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Rp(e,t=3,n=100*1024){const r=Te(e,t);return eS(r)>n?Rp(e,t-1,n):r}function Ka(e,t,n=1/0,r=1/0,o=tS()){const[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=Cp(e,t);if(!a.startsWith("[object "))return a;if(Xy(t))return t;const c=Jy(t),u=c!==void 0?c:n;if(u===0)return a.replace("object ","");if(s(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const h=l.toJSON();return Ka("",h,u-1,r,o)}catch{}const f=Array.isArray(t)?[]:{};let d=0;const p=wp(t);for(const h in p){if(!Object.prototype.hasOwnProperty.call(p,h))continue;if(d>=r){f[h]="[MaxProperties ~]";break}const m=p[h];f[h]=Ka(h,m,u-1,r,o),d++}return i(t),f}function Cp(e,t){try{if(Va){const r=Va(t);if(r)return r}return typeof global<"u"&&t===global?"[Global]":typeof t=="number"&&!Number.isFinite(t)?`[${t}]`:typeof t=="function"?`[Function: ${Dt(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Qy(t)}]`}catch(n){return`**non-serializable** (${n})`}}function Qy(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Zy(e){return~-encodeURI(e).split(/%..|./).length}function eS(e){return Zy(JSON.stringify(e))}function tS(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function oo(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function sa(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let s=Math.min(o+140,r);return s>r-5&&(s=r),s===r&&(o=Math.max(s-140,0)),n=n.slice(o,s),o>0&&(n=`'{snip} ${n}`),s<r&&(n+=" {snip}"),n}function Ya(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const o=e[r];dt(o)?n.push(String(o)):o instanceof Error?n.push(o.message?`${o.name}: ${o.message}`:o.name):n.push(Cp(void 0,o))}return n.join(t)}function Yr(e,t,n=!1){return nt(e)?vp(t)?t.test(e):nt(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function jt(e,t=[],n=!1){for(const r of t)if(Yr(e,r,n))return!0;return!1}function nS(){const e=D;return e.crypto||e.msCrypto}let ia;function rS(){return rn()*16}function Le(e=nS()){try{if(e?.randomUUID)return dr(()=>e.randomUUID()).replace(/-/g,"")}catch{}return ia||(ia="10000000100040008000"+1e11),ia.replace(/[018]/g,t=>(t^(rS()&15)>>t/4).toString(16))}function Ap(e){return e.exception?.values?.[0]}function Tn(e){const{message:t,event_id:n}=e;if(t)return t;const r=Ap(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Xa(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function Ot(e,t){const n=Ap(e);n&&Np(n,t)}function oS(e,t){const n=e.exception?.values,r=n?.find(o=>o.mechanism?.exception_id===0)??n?.[0];r&&Np(r,t)}function Np(e,t){const n={type:"generic",handled:!0},r=e.mechanism;e.mechanism={...n,...r,...t},t&&"data"in t&&(e.mechanism.data={...r?.data,...t.data})}function sS(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(i=>sa(i,0));const s=Math.min(r-1,o);t.context_line=sa(e[s],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(i=>sa(i,0))}function gl(e){if(iS(e))return!0;try{pe(e,"__sentry_captured__",!0)}catch{}return!1}function iS(e){try{return e.__sentry_captured__}catch{}}const Gc=1e3,aS=1e3,cS=100;function Hn(){return zt()/Gc}let En=[];function uS(){const{performance:e}=D;if(!e?.now||!e.timeOrigin)return e?.now&&(En=[{from:0,origin:zt()-dr(()=>e.now())}]),Hn;let t=e.timeOrigin;En=[{from:0,origin:t}];let n=!0,r=0;return()=>dr(()=>{const o=e.now(),s=Date.now();return Math.abs(t+o-s)>aS&&(t=s-o,n?En=[{from:0,origin:t}]:(En.push({from:r,origin:t}),En.length>cS&&En.splice(1,1))),n=!1,r=o,(t+o)/Gc})}function _l(){const{performance:e}=D;return e?.now?dr(()=>e.now()):void 0}let yl,aa=!1;function De(e,t=e){const n=Ar(t);return n==null?void 0:(n+e)/Gc}function fe(){return(yl??(yl=uS()))()}function Ar(e=0){aa||(aa=!0,Promise.resolve().then(()=>{aa=!1}),fe());let t;for(const n of En){if(t&&n.from>e)break;t=n}return t?.origin}function lS(e){const t=fe(),n={sid:Le(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>fS(n)};return e&&fr(n,e),n}function fr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||fe(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Le()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function dS(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),fr(e,n)}function fS(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function yo(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=yo(r[o],t[o],n-1));return r}function gn(){return Le()}function cn(){return Le().substring(16)}const pS=100;class Et{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},pe(this,"refs",{}),this._propagationContext={traceId:gn(),sampleRand:rn()}}clone(){const t=new Et;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,t.refs={...this.refs},t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&fr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof Et?n.getScopeData():We(n)?t:void 0,{tags:o,attributes:s,extra:i,user:a,contexts:c,level:u,fingerprint:l=[],propagationContext:f,conversationId:d}=r||{};return this._tags={...this._tags,...o},this._attributes={...this._attributes,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),l.length&&(this._fingerprint=l),f&&(this._propagationContext=f),d&&(this._conversationId=d),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:pS;if(r<=0)return this;const o={timestamp:Hn(),...t,message:t.message?oo(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=yo(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||Le();if(!this._client)return A&&_.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){const o=r?.event_id||Le();if(!this._client)return A&&_.warn("No client configured on scope - will not capture message!"),o;const s=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:o},this),o}captureEvent(t,n){const r=t.event_id||n?.event_id||Le();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(A&&_.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function hS(){return Rr("defaultCurrentScope",()=>new Et)}function mS(){return Rr("defaultIsolationScope",()=>new Et)}const Rs="__SENTRY_SUPPRESS_TRACING__",Sl=e=>e instanceof Promise&&!e[xp],xp=Symbol("chained PromiseLike"),Mp=(e,t,n)=>{const r=e.then(o=>(t(o),o),o=>{throw n(o),o});return Sl(r)&&Sl(e)?r:gS(e,r)},gS=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const o=e[r];typeof o=="function"?Object.defineProperty(t,r,{value:(...s)=>o.apply(e,s),enumerable:!0,configurable:!0,writable:!0}):t[r]=o}return n&&Object.assign(t,{[xp]:!0}),t};class _S{constructor(t,n){let r;t?r=t:r=new Et;let o;n?o=n:o=new Et,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(o){throw this._popScope(),o}return $t(r)?Mp(r,()=>this._popScope(),()=>this._popScope()):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function pr(){const e=at(),t=pn(e);return t.stack=t.stack||new _S(hS(),mS())}function Op(e){return pr().withScope(e)}function yS(e,t){const n=pr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function bl(e){return pr().withScope(()=>e(pr().getIsolationScope()))}function SS(){return{suppressTracing:bS,withIsolationScope:bl,withScope:Op,withSetScope:yS,withSetIsolationScope:(e,t)=>bl(t),getCurrentScope:()=>pr().getScope(),getIsolationScope:()=>pr().getIsolationScope()}}function bS(e){return Op(t=>{t.setSDKProcessingMetadata({[Rs]:!0});const n=e();return t.setSDKProcessingMetadata({[Rs]:void 0}),n})}function _n(e){const t=pn(e);return t.acs?t.acs:SS()}function vS(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function ES(e,t){const{value:n,unit:r}=vS(e)?e:{value:e,unit:void 0},o=wS(n),s=r&&typeof r=="string"?{unit:r}:{};if(o)return{...o,...s};if(!t||t==="skip-undefined"&&n===void 0)return;let i="";try{i=JSON.stringify(n)??""}catch{}return{value:i,type:"string",...s}}function hr(e,t=!1){const n={};for(const[r,o]of Object.entries(e??{})){const s=ES(o,t);s&&(n[r]=s)}return n}function vl(e){if(!e)return 0;let t=0;for(const[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;const o=r.value;Array.isArray(o)?t+=El(o[0])*o.length:dt(o)?t+=El(o):t+=100}return t}function El(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function wS(e){if(Array.isArray(e))return{value:e,type:"array"};const t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}function Pp(){return pn(at()).externalPropagationContextProvider?.()}function TS(){return pn(at()).externalPropagationContextProvider!==void 0}function q(){const e=at();return _n(e).getCurrentScope()}function me(){const e=at();return _n(e).getIsolationScope()}function or(){return Rr("globalScope",()=>new Et)}function Ze(...e){const t=at(),n=_n(t);if(e.length===2){const[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function DP(...e){const t=at(),n=_n(t);if(e.length===2){const[r,o]=e;return r?n.withSetIsolationScope(r,o):n.withIsolationScope(o)}return n.withIsolationScope(e[0])}function v(){return q().getClient()}function Vc(e){const t=Pp();if(t)return{trace_id:t.traceId,span_id:t.spanId};const n=e.getPropagationContext(),{traceId:r,parentSpanId:o,propagationSpanId:s}=n,i={trace_id:r,span_id:s||cn()};return o&&(i.parent_span_id=o),i}const IS="browser.bfcache.frame",kS="browser.bfcache.not_restored_reason_count",RS="browser.bfcache.outcome",CS="browser.bfcache.reason",Lp="browser.navigation.id",_i="browser.navigation.type",AS="browser.paint.type",NS="browser.web_vital.inp.interaction_type",Kc="browser.web_vital.inp.target",xS="code.file.path",MS="code.function.name",Dp="db.operation.name",$p="db.system.name",OS="gen_ai.conversation.id",Fp="graphql.document",PS="graphql.operation.name",LS="graphql.operation.type",DS="http.method",$S="http.request.header",yi="http.request.method",FS="http.request.same_origin",Bp="http.response.body.size",BS="http.response.size",US="http.response.status_code",Up="http.route",HS="network.connection.effective_type",WS="network.connection.rtt",zS="network.connection.type",jS="params",Hp="router.navigation.route.id",Xr="sentry.description",qS="sentry.environment",So="sentry.exclusive_time",sr="sentry.idle_span_finish_reason",GS="sentry.is_localhost",VS="sentry.link.type",U="sentry.op",re="sentry.origin",Yc="sentry.profile_id",KS="sentry.release",YS="sentry.replay_id",XS="sentry.sdk.integrations",JS="sentry.sdk.name",QS="sentry.sdk.version",ZS="sentry.segment.id",Nr="sentry.segment.name",ce="sentry.segment.name.source",eb="sentry.source",tb="sentry.status.message",nb="sentry.trace_lifecycle",rb="sentry.transaction",Si="server.address",ob="server.port",Pt="ui.component_name",bi="url.domain",Wp="url.fragment",Fe="url.full",vi="url.path",sb="url.path.parameter",zp="url.query",ib="url.scheme",je="url.template",jp="user_agent.original",ab="user.email",cb="user.id",ub="user.ip_address",lb="user.name",Xc="sentry.sample_rate",qp="sentry.previous_trace_sample_rate",$P="sentry.op",FP="sentry.origin",Gp="sentry.measurement_unit",Vp="sentry.measurement_value",Cs="sentry.custom_span_name",db=["ok","deadline_exceeded","unauthenticated","permission_denied","not_found","resource_exhausted","invalid_argument","unimplemented","unavailable","internal_error","unknown_error","cancelled","already_exists","failed_precondition","aborted","out_of_range","data_loss"],Kp=0,bo=1,we=2;function fb(e){return e!=="ok"&&db.includes(e)}function pb(e){if(e<400&&e>=100)return{code:bo};if(e>=400&&e<500)switch(e){case 401:return{code:we,message:"unauthenticated"};case 403:return{code:we,message:"permission_denied"};case 404:return{code:we,message:"not_found"};case 409:return{code:we,message:"already_exists"};case 413:return{code:we,message:"failed_precondition"};case 429:return{code:we,message:"resource_exhausted"};case 499:return{code:we,message:"cancelled"};default:return{code:we,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:we,message:"unimplemented"};case 503:return{code:we,message:"unavailable"};case 504:return{code:we,message:"deadline_exceeded"};default:return{code:we,message:"internal_error"}}return{code:we,message:"internal_error"}}function As(e,t){e.setAttribute("http.response.status_code",t);const n=pb(t);n.message!=="unknown_error"&&e.setStatus(n)}function Yp(e){try{const t=D.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Xp(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}const Jp="_sentryScope",Qp="_sentryIsolationScope",hb=Symbol.for("sentry.tracerProviderSpan");function Nn(e,t,n){e&&(pe(e,Qp,Yp(n)),pe(e,Jp,t))}function Lt(e){const t=e;return{scope:t[Jp],isolationScope:Xp(t[Qp])}}function Zp(e){return e[hb]===!0}const Ns="sentry-",mb=8192;function Jc(e){const t=gb(e);if(!t)return;const n=Object.entries(t).reduce((r,[o,s])=>{if(o.startsWith(Ns)){const i=o.slice(Ns.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function eh(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${Ns}${r}`]=o),n),{});return _b(t)}function gb(e){if(!(!e||!nt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=wl(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):wl(e)}function wl(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),o=t.slice(n+1);return[r,o].map(s=>{try{return decodeURIComponent(s.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function _b(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],o)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=o===0?s:`${t},${s}`;return i.length>mb?(A&&_.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}const yb=/^o(\d+)\./,Sb=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function bb(e){return e==="http"||e==="https"}function kt(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${i}`}function th(e){const t=Sb.exec(e);if(!t){pt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const f=u.match(/^\d+/);f&&(u=f[0])}return nh({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function nh(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function vb(e){if(!A)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(_.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?bb(r)?t&&isNaN(parseInt(t,10))?(_.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(_.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(_.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Eb(e){return e.match(yb)?.[1]}function rh(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=Eb(n)),r}function Ei(e){const t=typeof e=="string"?th(e):nh(e);if(!(!t||!vb(t)))return t}function xn(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const oh=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function wb(e){if(!e)return;const t=e.match(oh);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function sh(e,t){const n=wb(e),r=Jc(t);if(!n?.traceId)return{traceId:gn(),sampleRand:rn()};const o=Tb(n,r);r&&(r.sample_rand=o.toString());const{traceId:s,parentSpanId:i,parentSampled:a}=n;return{traceId:s,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:o}}function ih(e=gn(),t=cn(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function ah(e=gn(),t=cn(),n){return`00-${e}-${t}-${n?"01":"00"}`}function Tb(e,t){const n=xn(t?.sample_rand);if(n!==void 0)return n;const r=xn(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?rn()*r:r+rn()*(1-r):rn()}function Ib(e,t){const n=rh(e);return t&&n&&t!==n?(_.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!n||!t&&n)?(_.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}const Ja="span";function so(e,t){t?e.refs[Ja]=Yp(t):delete e.refs[Ja]}function kb(e){return Xp(e.refs[Ja])}const ch=0,wi=1;function Rb(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a,links:c}=xe(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a,links:c}}function Qc(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:xe(e).parent_span_id,s=Lt(e).scope,i=r?s?.getPropagationContext().propagationSpanId||cn():t;return{parent_span_id:o,span_id:i,trace_id:n}}function Cb(e){const{traceId:t,spanId:n}=e.spanContext(),r=ht(e);return ih(t,n,r)}function Ab(e){const{traceId:t,spanId:n}=e.spanContext(),r=ht(e);return ah(t,n,r)}function uh(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...o},attributes:s})=>({span_id:t,trace_id:n,sampled:r===wi,attributes:s,...o}))}function lh(e){if(e?.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:o})=>({span_id:t,trace_id:n,sampled:r===wi,attributes:o}))}function un(e){return typeof e=="number"?Tl(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Tl(e.getTime()):fe()}function Tl(e){return e>9999999999?e/1e3:e}function Nb(e){return typeof e!="number"?un(e):e<1e12?De(e)??fe():e/1e3}function xe(e){if(hh(e))return e.getStaticSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(ph(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:dh(e),start_timestamp:un(o),timestamp:un(i)||void 0,status:mh(a),op:r[U],origin:r[re],links:uh(c)}}return{span_id:t,trace_id:n,start_timestamp:0,status:"ok",data:{}}}function ne(e){if(hh(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(ph(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{name:s,span_id:t,trace_id:n,parent_span_id:dh(e),start_timestamp:un(o),end_timestamp:un(i)||void 0,is_segment:io(e),status:Zc(a),attributes:gh(r,a),links:lh(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",status:"ok",is_segment:io(e),attributes:{}}}function dh(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function fh(e){return{...e,end_timestamp:e.end_timestamp??e.start_timestamp,attributes:hr(e.attributes),links:e.links?.map(t=>({...t,attributes:hr(t.attributes)}))}}function ph(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function hh(e){return typeof e.getSpanJSON=="function"}function ht(e){const{traceFlags:t}=e.spanContext();return t===wi}function mh(e){return!e||e.code===Kp||e.code===bo?"ok":e.message&&fb(e.message)?e.message:"internal_error"}function Zc(e){return!e||e.code===bo||e.code===Kp||e.message==="cancelled"?"ok":"error"}function gh(e,t){const n=Zc(t)==="error"?t?.message:void 0;return{...n&&{[tb]:n},...e}}const Cn="_sentryChildSpans",Qa="_sentryRootSpan";function ls(e,t){const n=e[Qa]||e;pe(t,Qa,n),t.setAttribute(ce,void 0),ht(e)&&(!e.isRecording()&&!n.isRecording()||(e[Cn]?e[Cn].add(t):pe(e,Cn,new Set([t]))))}function xb(e,t){e[Cn]&&e[Cn].delete(t)}function ds(e){const t=new Set;function n(r){if(!t.has(r)&&ht(r)){t.add(r);const o=r[Cn]?Array.from(r[Cn]):[];for(const s of o)n(s)}}return n(e),Array.from(t)}const Ce=Ti;function Ti(e){return e[Qa]||e}function io(e){return e===Ti(e)}function he(e){const t=at(),n=_n(t);return n.getActiveSpan?n.getActiveSpan(e):kb(e||q())}function BP(e,t){e.updateName(t),e.setAttributes({[Cs]:t}),_h(e,"custom")}function _h(e,t){io(e)&&e.setAttribute(ce,t)}let Il=!1;function Mb(){if(Il)return;function e(){const t=he(),n=t&&Ce(t);if(n){const r="internal_error";A&&_.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:we,message:r})}}Il=!0,_p(e),yp(e)}function Je(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||v()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function kl(e){_.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function xs(e,t){if(!t?.length)return!1;for(const n of t){if(Lb(n)){if(e.description&&Yr(e.description,n))return A&&kl(e),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const o=n.name?e.description&&Yr(e.description,n.name):!0,s=n.op?e.op&&Yr(e.op,n.op):!0,i=n.attributes?Object.entries(n.attributes).every(([a,c])=>Ob(e.attributes?.[a],c)):!0;if(o&&s&&i)return A&&kl(e),!0}return!1}function Ob(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?Yr(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function Pb(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const o of e)o.parent_span_id===r&&(o.parent_span_id=n)}function Lb(e){return typeof e=="string"||e instanceof RegExp}const Rl=[];function Db(e){const t={};return e.forEach(n=>{const{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function $b(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return Db(r)}function Fb(e,t){const n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&yh(e,r,n)}),n}function Cl(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function yh(e,t,n){if(n[t.name]){A&&_.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Rl.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Rl.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,s)=>r(o,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(r=>{const o=t[r];typeof o=="function"&&e.on(r,s=>o.call(t,s,e))}),A&&_.log(`Integration installed: ${t.name}`)}function Al(e){const t=v();if(!t){A&&_.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function Bb(e,t){const n={...e,...t};for(const r in t){const o=e[r],s=t[r];if(typeof o=="function"&&typeof s=="function"){const i=new Proxy(o,{apply:(a,c,u)=>(Reflect.apply(a,c,u),Reflect.apply(s,c,u))});n[r]=i}}return n}const Ii="production",Sh=Symbol.for("sentry.nonRecordingSpan");class Mn{constructor(t={}){this._traceId=t.traceId||gn(),this._spanId=t.spanId||cn(),this.dropReason=t.dropReason,pe(this,Sh,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:ch}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function mr(e){return!!e&&e[Sh]===!0}const bh="_frozenDsc";function Nl(e,t){pe(e,bh,t)}function vh(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Ii,release:n.release,public_key:r,trace_id:e,org_id:rh(t)};return t.emit("createDsc",o),o}function ki(e,t){if(Pp())return;const n=t.getPropagationContext();return n.dsc||vh(n.traceId,e)}function it(e){const t=v();if(!t)return{};const n=Ce(e),r=xe(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[Xc]??o[qp];function a(g){return(typeof i=="number"||typeof i=="string")&&(g.sample_rate=`${i}`),g}const c=n[bh];if(c)return a(c);const u=mr(n),l=u&&n.dropReason==="ignored";if(u&&(!Je(t.getOptions())||l)){const g=Lt(n).scope,y=g&&ki(t,g);if(y){const S={...y};return l&&(S.sampled="false"),a(S)}}const f=s?.get("sentry.dsc"),d=f&&Jc(f);if(d)return a(d);const p=vh(e.spanContext().traceId,t),h=o[ce],m=r.description;return h!=="url"&&m&&(p.transaction=m),Je()&&(p.sampled=String(ht(n)),p.sample_rand=s?.get("sentry.sample_rand")??Lt(n).scope?.getPropagationContext().sampleRand.toString()),a(p),t.emit("createDsc",p,n),p}function UP(e){const t=it(e);return eh(t)}function Ub(e,t){const{fingerprint:n,breadcrumbs:r,sdkProcessingMetadata:o}=t;Hb(e,t),qb(e,n),Wb(e,r),zb(e,o)}function xl(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:l,eventProcessors:f,attachments:d,propagationContext:p,transactionName:h}=t;Wr(e,"extra",n),Wr(e,"tags",r),Wr(e,"attributes",o),Wr(e,"user",s),Wr(e,"contexts",i),e.sdkProcessingMetadata=yo(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),f.length&&(e.eventProcessors=[...e.eventProcessors,...f]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function Wr(e,t,n){e[t]=yo(e[t],n,1)}function xr(e,t){const n=or().getScopeData();return e&&xl(n,e.getScopeData()),t&&xl(n,t.getScopeData()),n}function Hb(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function Wb(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function zb(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function jb(e,t){e.contexts={trace:Qc(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:it(t),...e.sdkProcessingMetadata};const n=Ce(t),r=xe(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function qb(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}const Ms=Symbol.for("SentryCallbackError");function wt(e,t,n){let r;try{r=t()}catch(o){return Ml(e,o,n)}return $t(r)?r.then(void 0,o=>Ml(e,o,n)):r}function Ml(e,t,n){return A&&_.error(e,t),n(t)}function HP(e){return pe(e,"_static",!0),e}function WP(e){return e}function Ri(e){return!!e&&typeof e=="function"&&"_static"in e&&!!e._static}function Os(e,t){return wt(A?"The `beforeSendSpan` callback threw an error, sending the span unmodified:":"",()=>t(e),()=>e)||e}function Eh(e){const t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp,status:!e.status||e.status==="ok"||e.status==="cancelled"?"ok":"error",is_segment:!1,attributes:{...e.data},links:e.links};return fh(t)}function Gb(e){const t={},{response:n,profile:r,cloud_resource:o,culture:s,state:i}=e;if(n&&(n.status_code!=null&&(t["http.response.status_code"]=n.status_code),n.body_size!=null&&(t["http.response.body.size"]=n.body_size)),r&&(r.profile_id&&(t["sentry.profile_id"]=r.profile_id),r.profiler_id&&(t["sentry.profiler_id"]=r.profiler_id)),o)for(const[u,l]of Object.entries(o))l!=null&&(t[u]=l);s&&(s.locale&&(t["culture.locale"]=s.locale),s.timezone&&(t["culture.timezone"]=s.timezone)),i?.state&&typeof i.state.type=="string"&&(t["state.type"]=i.state.type);const a=e.angular;if(a){const u=a.version;(typeof u=="string"||typeof u=="number")&&(t["angular.version"]=u)}const c=e.react;if(c){const u=c.version;(typeof u=="string"||typeof u=="number")&&(t["react.version"]=u)}return t}function wh(e,t){const n=ne(e);n.attributes&&delete n.attributes[Cs];const r=Ti(e),o=ne(r),{isolationScope:s,scope:i}=Lt(e),a=xr(s,i);Yb(n,o,t,a),t.emit("preprocessSpan",n),n.is_segment&&(Vb(n,a),Kb(n,t),t.emit("processSegmentSpan",n)),t.emit("processSpan",n);const{beforeSendSpan:c,traceLifecycle:u}=t.getOptions(),l=u!=="static"&&c&&!Ri(c)?Os(n,c):n;return{...fh(l),_segmentSpan:r}}function Vb(e,t){const n=Gb(t.contexts);On(e,n)}function On(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,o])=>{o!=null&&!(r in n)&&(n[r]=o)})}function Kb(e,t){const n=t.getIntegrationNames();n.length&&On(e,{[XS]:n})}function Th(e,t,n,r=!0){const o=t.getSdkMetadata(),{release:s,environment:i}=t.getOptions();return{[nb]:"stream",[Nr]:e.name,[ZS]:e.span_id,[JS]:o?.sdk?.name,[QS]:o?.sdk?.version,[KS]:s,[qS]:i||Ii,[cb]:n.user?.id,[ab]:n.user?.email,[ub]:n.user?.ip_address,[lb]:n.user?.username,...r?n.attributes:void 0}}function Yb(e,t,n,r){On(e,Th(t,n,r))}function Xb(e,t,n){const r=xe(e),o=Ti(e),s=ne(o),{isolationScope:i,scope:a}=Lt(e),c=xr(i,a),u=Th(s,t,c,!1);Object.entries(u).forEach(([f,d])=>{d!=null&&!(f in r.data)&&(r.data[f]=d)});const l=Os(r,n);return Eh(l)}function V(e){return e.getOptions().traceLifecycle==="stream"}function vo(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}function mt(e,t=[]){return[e,t]}function Ol(e,t){const[n,r]=e;return[n,[...r,t]]}function gr(e,t){const n=e[1];for(const r of n){const o=r[0].type;if(t(r,o))return!0}return!1}function Za(e,t){return gr(e,(n,r)=>t.includes(r))}function Ps(e){const t=pn(D);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Jb(e){const t=pn(D);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function Ls(e){const[t,n]=e;let r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[Ps(r),s]:r.push(typeof s=="string"?Ps(s):s)}for(const s of n){const[i,a]=s;if(o(`
|
|
6
|
+
${JSON.stringify(i)}
|
|
7
|
+
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Te(a))}o(c)}}return typeof r=="string"?r:Qb(r)}function Qb(e){const t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Zb(e){let t=typeof e=="string"?Ps(e):e;function n(i){const a=t.subarray(0,i);return t=t.subarray(i+1),a}function r(){let i=t.indexOf(10);return i<0&&(i=t.length),JSON.parse(Jb(n(i)))}const o=r(),s=[];for(;t.length;){const i=r(),a=typeof i.length=="number"?i.length:void 0;s.push([i,a?n(a):r()])}return[o,s]}function ev(e){const t=typeof e.data=="string"?Ps(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Ih={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",metric:"trace_metric"};function tv(e){return e in Ih}function Pl(e){return tv(e)?Ih[e]:e}function Eo(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function kh(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(zt()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:kt(r)},...o&&{trace:o}}}function ec(e){return e==="replay_event"?"replay":e||"error"}function nv(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function rv(){return"npm"}function ov(){return!nv()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ln(){return typeof window<"u"&&(!ov()||sv())}function sv(){return D.process?.type==="renderer"}function tc(e,t,n){const r=n.getOptions(),o=n.getDsn(),s=r.tunnel,i=Eo(r._metadata),a={sent_at:new Date(zt()).toISOString(),...iv(t)&&{trace:t},...i&&{sdk:i},...!!s&&o&&{dsn:kt(o)}};return mt(a,[Rh(e,n)])}function Rh(e,t){const n=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,ingest_settings:ln()?{infer_ip:n,infer_user_agent:n}:void 0,items:e}]}function iv(e){return!!e.trace_id&&!!e.public_key}function av(e){let t=156;if(t+=e.name.length*2,t+=vl(e.attributes),e.links&&e.links.length>0){const r=e.links[0]?.attributes,o=100+(r?vl(r):0);t+=o*e.links.length}return t}const Ll=1e3,cv=5e6;class uv{constructor(t,n){this._traceBuckets=new Map,this._client=t;const{maxSpanLimit:r,flushInterval:o,maxTraceWeightInBytes:s}=n??{};this._maxSpanLimit=r&&r>0&&r<=Ll?r:Ll,this._flushInterval=o&&o>0?o:5e3,this._maxTraceWeight=s&&s>0?s:cv,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(i=>{clearTimeout(i.timeout)}),this._traceBuckets.clear()})}add(t){const n=t.trace_id;let r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:vo(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=av(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(A&&_.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){const n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}const r=Array.from(n.spans),o=r[0]?._segmentSpan;if(!o){A&&_.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}const s=it(o),i=r.map(c=>{const{_segmentSpan:u,...l}=c;return l}),a=tc(i,s,this._client);A&&_.log(`Sending span envelope for trace ${t} with ${i.length} spans`),this._client.sendEnvelope(a).then(null,c=>{A&&_.error("Error while sending streamed span envelope:",c)}),this._removeTrace(t)}_removeTrace(t){const n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}}const Dl="SpanStreaming",lv=(e={})=>{const t=e.flushOnSegmentEnd??!0;return{name:Dl,setup(n){if(!V(n)){A&&_.log(`[${Dl}] \`traceLifecycle\` is "static", skipping setup.`);return}const r=new uv(n);n.on("afterSpanEnd",o=>{ht(o)&&r.add(wh(o,n))}),n.on("flushTraceSpans",o=>{r.flush(o)}),t&&n.on("afterSegmentSpanEnd",o=>{const s=o.spanContext().traceId;vo(setTimeout(()=>{r.flush(s)},500))})}}};function dv(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(s){throw t(s),n(),s}return fv(o,t,n,r)}function fv(e,t,n,r){return $t(e)?Mp(e,o=>{n(),r(o)},o=>{t(o),n()}):(n(),r(e),e)}const nc=new WeakMap;function Ch(e){return dt(e)?void 0:e}function pv(e,t){const n=Ch(e);!n||!ht(t)||nc.has(n)||nc.set(n,Qc(t))}function hv(e,t,n){const r=Ch(t.originalException),o=r&&nc.get(r);if(!o)return;const s=e.contexts?.trace;(s?.trace_id??(n&&Vc(n).trace_id))===o.trace_id&&(e.contexts={...e.contexts,trace:{...s,...o}})}function mv(e){if(!A)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=xe(e),{spanId:o}=e.spanContext(),s=ht(e),i=Ce(e),a=i===e,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:l,description:f}=xe(i);u.push(`root ID: ${i.spanContext().spanId}`),l&&u.push(`root op: ${l}`),f&&u.push(`root description: ${f}`)}_.log(`${c}
|
|
8
|
+
${u.join(`
|
|
9
|
+
`)}`)}function gv(e){if(!A)return;const{description:t="< unknown name >",op:n="< unknown op >"}=xe(e),{spanId:r}=e.spanContext(),s=Ce(e)===e,i=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${t}" with ID ${r}`;_.log(i)}function _v(e,t,n){if(!Je(e))return[!1];const r=yv(e,t);if(!r)return[!1,void 0,void 0,"callback_error"];const[o,s]=r,i=xn(o);if(i===void 0)return A&&_.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!i)return A&&_.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,s];const a=n<i;return a||A&&_.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[a,i,s]}function yv(e,t){const{tracesSampler:n,tracesSampleRate:r}=e;if(typeof n=="function"){const o=wt(A?"The `tracesSampler` callback threw an error, falling back to the parent sampling decision or `tracesSampleRate`:":"",()=>[n({...t,inheritOrSampleWith:s=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):s}),!0],()=>{});if(o)return o}if(t.parentSampled!==void 0)return[t.parentSampled];if(typeof r<"u")return[r,!0]}function Ah(e,t,n,r=he()){const o=r&&Ce(r);o&&(A&&_.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[Vp]:t,[Gp]:n}))}function $l(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},o=r[Gp],s=r[Vp];typeof o=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:o})}),t}function Fl(){return pn(at()).segmentSpanCaptureStrategy}const Go=1e3;class Ci{constructor(t={}){this._traceId=t.traceId||gn(),this._spanId=t.spanId||cn(),t.startTimestamp?this._startTime=t.startTimestamp:(this._startTime=fe(),this._startPerformanceNow=_l()),this._links=t.links,this._attributes={},this.setAttributes({[re]:"manual",[U]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),this._events=[],this._isStandaloneSpan=t.isStandalone}addLink(t){return this._frozen?this:(this._links?this._links.push(t):this._links=[t],this)}addLinks(t){return this._frozen?this:(this._links?this._links.push(...t):this._links=t,this)}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?wi:ch}}setAttribute(t,n){return this._frozen?this:t===ce&&n!==void 0&&!io(this)?(A&&_.warn("[Tracing] Ignoring name source on a child span: this attribute is only valid on the root span."),this):(n===void 0?delete this._attributes[t]:this._attributes[t]=n,this)}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._frozen||(this._startTime=ca(this,t),this._startPerformanceNow=void 0)}setStatus(t){return this._frozen?this:(this._status=t,this)}updateName(t){return this._frozen?this:(this._name=t,_h(this,"custom"),this)}end(t){this._endTime||(this._endTime=t==null?this._getEndTimeFromDuration():ca(this,t),gv(this),this._onSpanEnded(),this._frozen=Zp(this))}getStaticSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[U],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:mh(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[re],profile_id:this._attributes[Yc],exclusive_time:this._attributes[So],measurements:$l(this._events),links:uh(this._links)}}getSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime,is_segment:io(this),status:Zc(this._status),attributes:gh(this._attributes,this._status),links:lh(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){if(this._frozen)return this;A&&_.log("[Tracing] Adding an event to span:",t);const o=Bl(n)?n:r||void 0,s=Bl(n)?{}:n||{},i={name:t,time:ca(this,o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_getEndTimeFromDuration(){const t=_l();return this._startPerformanceNow==null||t==null?fe():this._startTime+(t-this._startPerformanceNow)/1e3}_onSpanEnded(){const t=v();if(t?.emit("spanEnd",this),this._isStandaloneSpan){if(!t)return;if(this._sampled){bv(this,t);return}A&&_.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled.");return}t?.emit("afterSpanEnd",this);const n=Ce(this);if(n!==this){const s=Fl();if(s){const i=Lt(this).scope||q();s.onChildSpanEnded(this,n,a=>this._convertSpanToTransaction(a),i)}return}if(t&&V(t)){t.emit("afterSegmentSpanEnd",this);return}const r=Lt(this).scope||q(),o=Fl();if(o)o.onSegmentSpanEnded(s=>this._convertSpanToTransaction(s),r);else{const s=this._convertSpanToTransaction();s&&r.captureEvent(s)}}_convertSpanToTransaction(t={}){if(!Ul(xe(this)))return;this._name||(A&&_.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:n,isolationScope:r}=Lt(this),o=n?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;t.onSpanCaptured?.(this);const s=[];let i=0;for(const p of ds(this)){if(p===this||Sv(p)||t.isSpanAlreadyCaptured?.(p))continue;const h=xe(p);if(!Ul(h)){t.onSpanCaptured||i++;continue}t.onSpanCaptured?.(p),s.push(h)}const a=n?.getClient()||v();i&&a?.recordDroppedEvent("invalid","span",i),s.length>Go&&a?.recordDroppedEvent("buffer_overflow","span",s.length-Go);const c=this._attributes[ce];delete this._attributes[Cs];let u=!1;s.forEach(p=>{delete p.data[Cs],p.op?.startsWith("gen_ai.")&&(u=!0)});const l={contexts:{trace:Rb(this)},spans:s.length>Go?s.sort((p,h)=>p.start_timestamp-h.start_timestamp).slice(0,Go):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:n,capturedSpanIsolationScope:r,dynamicSamplingContext:it(this),hasGenAiSpans:u},request:o,...c&&{transaction_info:{source:c}}},f=$l(this._events);return f&&Object.keys(f).length&&(A&&_.log("[Measurements] Adding measurements to transaction event",JSON.stringify(f,void 0,2)),l.measurements=f),l}}function ca(e,t){return Zp(e)?Nb(t):un(t)}function Bl(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Ul(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Sv(e){return e instanceof Ci&&e.isStandaloneSpan()}function bv(e,t){const{beforeSendSpan:n,traceLifecycle:r}=t.getOptions();if(r==="static"&&Ri(n)){const a=Xb(e,t,n),c=it(e);t.sendEnvelope(tc([a],c,t));return}const{_segmentSpan:o,...s}=wh(e,t),i=it(o);t.sendEnvelope(tc([s],i,t))}function vv(e,t){const n=su(e),{forceTransaction:r,parentSpan:o,scope:s}=e,i=s?.clone();return Ze(i,()=>Nh(o)(()=>{const c=q(),u=iu(s??c,o),l=v(),d=e.onlyIfParent&&!u?ru(c,l):ou({parentSpan:u,spanArguments:n,forceTransaction:r,scope:c}),p=!Ni(d)||!u;return xh(d,p,()=>t(d),()=>d.end())}))}function eu(e,t){const n=su(e),{forceTransaction:r,parentSpan:o,scope:s}=e,i=s?.clone();return Ze(i,()=>Nh(o)(()=>{const c=q(),u=iu(s??c,o),f=e.onlyIfParent&&!u?ru(c,v()):ou({parentSpan:u,spanArguments:n,forceTransaction:r,scope:c}),d=!Ni(f)||!u;return xh(f,d,()=>t(f,()=>f.end()))}))}function tu(e){const t=su(e),{forceTransaction:n,parentSpan:r,scope:o}=e;return(o?i=>Ze(o,i):r!==void 0?i=>dn(r,i):i=>i())(()=>{const i=q(),a=iu(o??i,r),c=v();return e.onlyIfParent&&!a?ru(i,c):ou({parentSpan:a,spanArguments:t,forceTransaction:n,scope:i})})}const zP=(e,t)=>{const n=at(),r=_n(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:o,baggage:s}=e,i=v(),a=Jc(s);return i&&!Ib(i,a?.org_id)?wv(t):Ze(c=>{const u=sh(o,s);return c.setPropagationContext(u),dn(null,t)})};function dn(e,t){const n=Ai();return n.withActiveSpan?n.withActiveSpan(e,t):Ze(r=>(so(r,e||void 0),t(r)))}function Ev(e){const t=Ai();return t.suppressTracing?t.suppressTracing(e):Ze(n=>(n.setSDKProcessingMetadata({[Rs]:!0}),e()))}function nu(e=q()){const t=Ai();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[Rs]===!0}function wv(e){const t=Ai();return t.startNewTrace?t.startNewTrace(e):dn(null,()=>Ze(n=>(n.setPropagationContext({traceId:gn(),sampleRand:rn()}),A&&_.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),e())))}function ru(e,t){t?.recordDroppedEvent("no_parent_span","span");const n=new Mn({dropReason:"no_parent_span",traceId:e.getPropagationContext().traceId});return Nn(n,e,me()),n}function ou({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){const o=me(),s={scope:r,parentSpan:e};v()?.emit("prepareSpanScope",s);const{scope:i,parentSpan:a}=s;if(!Je()){const l=i.getPropagationContext(),f=a?a.spanContext().traceId:l.traceId,d=new Mn({traceId:f});return a&&!n&&ls(a,d),Nn(d,i,o),d}const c=v();if(Iv(c,t)){nu(i)||c?.recordDroppedEvent("ignored","span");const l=new Mn({dropReason:"ignored",traceId:a?.spanContext().traceId??i.getPropagationContext().traceId});return a&&!n&&ls(a,l),Nn(l,i,o),l}let u;if(a&&!n)u=Tv(a,i,t,o),ls(a,u);else if(a){const l=it(a),{traceId:f,spanId:d}=a.spanContext(),p=ht(a);u=Hl({traceId:f,parentSpanId:d,...t},i,o,p),Nl(u,l)}else{const{traceId:l,dsc:f,parentSpanId:d,sampled:p,sampleRand:h}=i.getPropagationContext();if(u=Hl({traceId:l,parentSpanId:d,...t},i,o,p),f){const m=Object.keys(f).length===0&&h!==void 0?{sample_rand:h.toString()}:f;Nl(u,m)}}return mv(u),u}function su(e){const t={isStandalone:e.experimental?.standalone,...e};if(e.op&&(t.attributes={[U]:e.op,...e.attributes}),e.startTime){const n={...t};return n.startTimestamp=un(e.startTime),delete n.startTime,n}return t}function Ai(){const e=at();return _n(e)}function Hl(e,t,n,r){const o=v(),s=o?.getOptions()||{},{name:i=""}=e,a={spanAttributes:{...e.attributes},spanName:i,parentSampled:r};o?.emit("beforeSampling",a,{decision:!1});const c=a.parentSampled??r,u=a.spanAttributes,l=t.getPropagationContext(),f=nu(t),[d,p,h,m]=f?[!1]:_v(s,{name:i,parentSampled:c,attributes:u,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:xn(l.dsc?.sample_rate)},l.sampleRand),g=new Ci({...e,attributes:{[ce]:"custom",[Xc]:p!==void 0&&h?p:void 0,...u},sampled:d});if(!d&&o&&!f){A&&_.log("[Tracing] Discarding root span because its trace was not chosen to be sampled.");const y=m||"sample_rate";!V(o)&&!e.isStandalone&&o.recordDroppedEvent(y,"transaction"),o.recordDroppedEvent(y,"span")}return Nn(g,t,n),o&&o.emit("spanStart",g),g}function Tv(e,t,n,r){const{spanId:o,traceId:s}=e.spanContext(),i=nu(t),a=i?!1:ht(e),c=a?new Ci({...n,parentSpanId:o,traceId:s,sampled:a}):new Mn({traceId:s});ls(e,c),Nn(c,t,r);const u=v();return u&&(mr(c)&&(mr(e)&&e.dropReason?(c.dropReason=e.dropReason,u.recordDroppedEvent(e.dropReason,"span")):i||(c.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span"))),u.emit("spanStart",c)),c}function iu(e,t){if(t)return t;if(t===null)return;const n=he(e);if(!n)return;const r=v();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Ce(n):n}function Nh(e){return e!==void 0?t=>dn(e,t):t=>t()}function Iv(e,t){const n=e?.getOptions().ignoreSpans;return!e||!V(e)||!n?.length?!1:xs({description:t.name||"",op:t.attributes?.[U]||t.op,attributes:t.attributes},n)}function Ni(e){return mr(e)&&e.dropReason==="ignored"}function xh(e,t,n,r){return(t?s=>dn(e,()=>{const i=q(),a=Lt(e).scope;return a&&i.setPropagationContext(a.getPropagationContext()),Nn(e,i,me()),s()}):s=>s())(()=>dv(()=>n(),s=>{pv(s,e);const{status:i}=xe(e);e.isRecording()&&i==="ok"&&e.setStatus({code:we,message:"internal_error"})},r))}const Wl=new WeakSet;function wo(e=v()){!e||Wl.has(e)||!V(e)||(Wl.add(e),e.addIntegration(lv()))}function jP(e,t){return wo(),vv(e,t)}function qP(e,t){return wo(),eu(e,t)}function bt(e){return wo(),tu(e)}const fs={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},kv="heartbeatFailed",Rv="idleTimeout",Cv="finalTimeout",Av="externalFinish";function Mh(e,t={}){const n=v();wo(n);const r=new Map;let o=!1,s,i,a=Av,c=!t.disableAutoFinish;const u=[],{idleTimeout:l=fs.idleTimeout,finalTimeout:f=fs.finalTimeout,childSpanTimeout:d=fs.childSpanTimeout,trimIdleSpanEndTimestamp:p=!0}=t,h=q();if(!n||!Je()){const R=new Mn({traceId:h.getPropagationContext().traceId});return Nn(R,h,me()),R}const m=he(),g=tu(e);so(q(),g),A&&_.log("[Tracing] Started span is an idle span"),g.end=new Proxy(g.end,{apply(R,B,w){if(n.emit("beforeIdleSpanEnd",g),mr(B))return;const[O,...M]=w,T=O||fe(),$=un(T),x=ds(g).filter(Z=>Z!==g),Y=xe(g);if(!x.length||!p)return k($),Reflect.apply(R,B,[$,...M]);const X=n.getOptions().ignoreSpans,P=x?.reduce((Z,Se)=>{const ae=xe(Se);return!ae.timestamp||X&&xs({description:ae.description,op:ae.op,attributes:ae.data},X)?Z:Z?Math.max(Z,ae.timestamp):ae.timestamp},void 0),K=Y.start_timestamp,F=Math.min(K?K+f/1e3:1/0,Math.max(K||-1/0,Math.min($,P||1/0)));return k(F),Reflect.apply(R,B,[F,...M])}});function y(){s&&(clearTimeout(s),s=void 0)}function S(){i&&(clearTimeout(i),i=void 0)}function E(R){y(),s=setTimeout(()=>{!o&&r.size===0&&c&&(a=Rv,g.end(R))},l)}function b(R){S(),i=setTimeout(()=>{!o&&c&&(a=kv,g.end(R))},d)}function N(R){y(),r.set(R,!0);const B=fe();b(B+d/1e3)}function I(R){if(r.has(R)&&r.delete(R),r.size===0){const B=fe();E(B+l/1e3),S()}}function k(R){o=!0,r.clear(),u.forEach(x=>x()),so(h,m);const B=xe(g),{start_timestamp:w}=B;if(!w)return;B.data[sr]||g.setAttribute(sr,a);const M=B.status;(!M||M==="unknown")&&g.setStatus({code:bo}),_.log(`[Tracing] Idle span "${B.op}" finished`);const T=ds(g).filter(x=>x!==g);let $=0;T.forEach(x=>{x.isRecording()&&(x.setStatus({code:we,message:"cancelled"}),x.end(R),A&&_.log("[Tracing] Cancelling span since span ended early",JSON.stringify(x,void 0,2)));const Y=xe(x),{timestamp:X=0,start_timestamp:P=0}=Y,K=P<=R,F=(f+l)/1e3,Z=X-P<=F;if(A){const Se=JSON.stringify(x,void 0,2);K?Z||_.log("[Tracing] Discarding span since it finished after idle span final timeout",Se):_.log("[Tracing] Discarding span since it happened after idle span was finished",Se)}(!Z||!K)&&(xb(g,x),$++)}),$>0&&g.setAttribute("sentry.idle_span_discarded_spans",$)}return u.push(n.on("spanStart",R=>{if(o||R===g||ne(R).end_timestamp||R instanceof Ci&&R.isStandaloneSpan())return;ds(g).includes(R)&&N(R.spanContext().spanId)})),u.push(n.on("spanEnd",R=>{o||I(R.spanContext().spanId)})),u.push(n.on("idleSpanEnableAutoFinish",R=>{R===g&&(c=!0,E(),r.size&&b())})),t.disableAutoFinish||E(),setTimeout(()=>{o||(g.setStatus({code:we,message:"deadline_exceeded"}),a=Cv,g.end())},f),g}function Nv(e,t,n){let r,o,s;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){o!==void 0&&clearTimeout(o),s!==void 0&&clearTimeout(s),o=s=void 0}function l(){return o!==void 0||s!==void 0?c():r}function f(){return o&&clearTimeout(o),o=a(c,t),i&&s===void 0&&(s=a(c,i)),r}return f.cancel=u,f.flush=l,f}const xv=["addListener","on","once","prependListener","prependOnceListener","addEventListener"],Mv=["removeListener","off","removeEventListener"],Oh=Symbol("SentryScopeBoundListeners");let ir;function Ov(e){return ir!==void 0&&(e===ir||e.listener===ir)}function GP(e,t=q()){const n=e;if(xi(n))return e;au(n);for(const r of xv)typeof n[r]=="function"&&(n[r]=Lv(n,n[r],t));for(const r of Mv)typeof n[r]=="function"&&(n[r]=Dv(n,n[r]));return typeof n.removeAllListeners=="function"&&(n.removeAllListeners=$v(n,n.removeAllListeners)),e}function Pv(e,t){return function(...n){return Ze(t,()=>e.apply(this,n))}}function Ph(e){return typeof e=="function"}function Lv(e,t,n){return function(...r){const o=r[0],s=r[1],i=r.slice(2);if(!Ph(s)||Ov(s))return t.apply(this,r);const a=xi(e)||au(e);let c=a.get(o);c||(c=new WeakMap,a.set(o,c));let u=c.get(s);u||(u=Pv(s,n),c.set(s,u));const l=ir;ir=u;try{return t.call(this,o,u,...i)}finally{ir=l}}}function Dv(e,t){return function(...n){const r=n[0],o=n[1],s=n.slice(2),i=Ph(o)?xi(e)?.get(r)?.get(o):void 0;return i?t.call(this,r,i,...s):t.apply(this,n)}}function $v(e,t){return function(...n){const r=xi(e);if(r)if(n.length===0)au(e);else{const o=n[0];r.delete(o)}return t.apply(this,n)}}function au(e){const t=new Map;return e[Oh]=t,t}function xi(e){return e[Oh]}const To="pageload",Mr="navigation",Fv="navigation.redirect",Bv="resource.other",Uv="browser.paint",Lh="browser.unload_event",Dh="browser.redirect",$h="browser.dom_content_loaded_event",Fh="browser.load_event",Bh="browser.connect",Uh="browser.tls_ssl",Hh="browser.cache",Wh="browser.dns",rc="browser.request",oc="browser.response",zh="ui.render",jh="ui.mount",Hv="ui.update",Wv="ui.long_task",zv="ui.long_animation_frame",Ds="ui.interaction.click",jv="ui.interaction.hover",qv="ui.interaction.drag",Gv="ui.interaction.press",Vv="ui.webvital.lcp",Kv="ui.webvital.cls",ua="ui.action.click",qh="db",Gh="http.client",Yv="http.client.stream",Ft="Pageload",ft="Navigation",Xv="Resource",Vh="Component mount",Jv="Component update",Kh="Component render",Yh="Main UI thread blocked",Qv="Click",Xh="Click",Zv="Hover",eE="Drag",tE="Key press",zl="Largest contentful paint",jl="Layout shift",sc={[Hh]:"Cache lookup",[Wh]:"DNS lookup",[Bh]:"Connect",[Uh]:"TLS handshake",[Dh]:"Redirect",[rc]:"Request",[oc]:"Response",[Lh]:"Unload event",[$h]:"DOMContentLoaded event",[Fh]:"Load event"};function nE(e,t){if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function rE(e,t,n,r){const o=Eo(n),s={sent_at:new Date(zt()).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:kt(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return mt(s,[i])}function oE(e,t,n,r){const o=Eo(n),s=e.type&&e.type!=="replay_event"?e.type:"event";nE(e,n?.sdk);const i=kh(e,o,r,t);return delete e.sdkProcessingMetadata,mt(i,[[{type:s},e]])}const la=0,ql=1,Gl=2;function Io(e){return new ao(t=>{t(e)})}function cu(e){return new ao((t,n)=>{n(e)})}class ao{constructor(t){this._state=la,this._handlers=[],this._runExecutor(t)}then(t,n){return new ao((r,o)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(i){o(i)}},s=>{if(!n)o(s);else try{r(n(s))}catch(i){o(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new ao((n,r)=>{let o,s;return this.then(i=>{s=!1,o=i,t&&t()},i=>{s=!0,o=i,t&&t()}).then(()=>{if(s){r(o);return}n(o)})})}_executeHandlers(){if(this._state===la)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===ql&&n[1](this._value),this._state===Gl&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,i)=>{if(this._state===la){if($t(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(ql,s)},o=s=>{n(Gl,s)};try{t(r,o)}catch(s){o(s)}}}function sE(e,t,n,r=0,o){try{const s=ic(t,n,e,r,o);return $t(s)?s:Io(s)}catch(s){return cu(s)}}function ic(e,t,n,r,o){const s=n[r];if(!e||!s)return e;const i=`Event processor "${s.id||"?"}"`;let a=!1;const c=wt(A?`${i} threw an error, dropping event:`:"",()=>s({...e},t),()=>(a=!0,null));return A&&c===null&&_.log(`${i} dropped event`),$t(c)?c.then(u=>u?ic(u,t,n,r+1,o):(o?.(a?"callback_error":"event_processor"),null)):c?ic(c,t,n,r+1,o):(o?.(a?"callback_error":"event_processor"),null)}let Sn,Vl,Kl,Kt;function Jh(e){const t=D._sentryDebugIds,n=D._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(Kt&&r.length===Vl&&o.length===Kl)return Kt;Vl=r.length,Kl=o.length,Kt={},Sn||(Sn={});const s=(i,a)=>{for(const c of i){const u=a[c],l=Sn?.[c];if(l&&Kt&&u)Kt[l[0]]=u,Sn&&(Sn[c]=[l[0],u]);else if(u){const f=e(c);for(let d=f.length-1;d>=0;d--){const h=f[d]?.filename;if(h&&Kt&&Sn){Kt[h]=u,Sn[c]=[h,u];break}}}}};return t&&s(r,t),n&&s(o,n),Kt}function iE(e,t){const n=Jh(e);if(!n)return[];const r=[];for(const o of t){const s=zy(o);s&&n[s]&&r.push({type:"sourcemap",code_file:o,debug_id:n[s]})}return r}function ac(e){return e.data?.__sentry__===!0}function Qh(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Zh(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Le(),timestamp:t.timestamp||Hn()},u=n.integrations||e.integrations.map(E=>E.name);aE(c,e),lE(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&cE(c,e.stackParser);const l=fE(r,n.captureContext);n.mechanism&&oS(c,n.mechanism);const f=o?o.getEventProcessors():[],d=xr(s,l),p=[...n.attachments||[],...d.attachments];p.length&&(n.attachments=p),Ub(c,d);const h=he(l);h&&jb(c,h),hv(c,n,l);const m=[...f,...d.eventProcessors],g=t.type==="transaction",y=t.spans?.length||0;return(ac(n)?Io(c):sE(m,c,n,0,E=>{o&&(o.recordDroppedEvent(E,ec(t.type)),g&&o.recordDroppedEvent(E,"span",1+y))})).then(E=>{if(!E)return null;if(g&&o){const b=y-(E.spans?.length||0);b>0&&o.recordDroppedEvent("event_processor","span",b)}return uE(E),typeof i=="number"&&i>0?dE(E,i,a):E})}function aE(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||Ii,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&s&&(i.url=oo(i.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=oo(a.value,s))})}function cE(e,t){const n=Jh(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function uE(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function lE(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function dE(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:Te(o.data,t,n)}}))},...e.user&&{user:Te(e.user,t,n)},...e.contexts&&{contexts:Te(e.contexts,t,n)},...e.extra&&{extra:Te(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Te(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:Te(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Te(e.contexts.flags,3,n)),r}function fE(e,t){if(!t)return e;const n=e?e.clone():new Et;return n.update(t),n}function pE(e){if(e)return hE(e)?{captureContext:e}:gE(e)?{captureContext:e}:e}function hE(e){return e instanceof Et||typeof e=="function"}const mE=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function gE(e){return Object.keys(e).some(t=>mE.includes(t))}function Pn(e,t){return q().captureException(e,pE(t))}function _E(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return q().captureMessage(e,n,r)}function ko(e,t){return q().captureEvent(e,t)}function em(e,t){me().setContext(e,t)}function VP(e){me().setExtras(e)}function KP(e,t){me().setExtra(e,t)}function YP(e){me().setTags(e)}function XP(e,t){me().setTag(e,t)}function JP(e){me().setAttributes(e)}function QP(e,t){me().setAttribute(e,t)}function ZP(e){me().setUser(e)}function eL(e){me().setConversationId(e)}function yE(){return me().lastEventId()}async function tL(e){const t=v();return t?t.flush(e):(A&&_.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function nL(e){const t=q(),n=t.getClient();if(n){const r=await n.close(e);return t.getClient()===n&&t.setClient(void 0),r}return A&&_.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1)}function rL(){return!!v()}function SE(){const e=v();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function bE(e){me().addEventProcessor(e)}function Yl(e){const t=me(),{user:n}=xr(t,q()),{userAgent:r}=D.navigator||{},o=lS({user:n,...r&&{userAgent:r},...e}),s=t.getSession();return s?.status==="ok"&&fr(s,{status:"exited"}),tm(),t.setSession(o),o}function tm(){const e=me(),n=q().getSession()||e.getSession();n&&dS(n),nm(),e.setSession()}function nm(){const e=me(),t=v(),n=e.getSession();n&&t&&t.captureSession(n)}function da(e=!1){if(e){tm();return}nm()}const vE="7";function rm(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function EE(e){return`${rm(e)}${e.projectId}/envelope/`}function wE(e,t){const n={sentry_version:vE};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function om(e,t,n){return t||`${EE(e)}?${wE(e,n)}`}function TE(e,t){const n=Ei(e);if(!n)return"";const r=`${rm(n)}embed/error-page/`;let o=`dsn=${kt(n)}`;for(const s in t)if(s!=="dsn"&&!(s==="onClose"||s==="onError"))if(s==="user"){const i=t.user;if(!i)continue;i.name&&(o+=`&name=${encodeURIComponent(i.name)}`),i.email&&(o+=`&email=${encodeURIComponent(i.email)}`)}else o+=`&${encodeURIComponent(s)}=${encodeURIComponent(t[s])}`;return`${r}?${o}`}const IE="sentry.timestamp.sequence";let fa=0,pa;function sm(e){const t=Math.floor(e*1e3);pa!==void 0&&t!==pa&&(fa=0);const n=fa;return fa++,pa=t,{key:IE,value:{value:n,type:"integer"}}}function im(e,t){return t?Ze(t,()=>{const n=he(),r=n?Qc(n):Vc(t);return[n?it(n):ki(e,t),r]}):[void 0,void 0]}const kE={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function RE(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...ln()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function CE(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=kt(r)),mt(s,[RE(e,o)])}const AE=100;function yt(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function NE(e,t){const n=uu(),r=cm(e);r===void 0?n.set(e,[t]):r.length>=AE?(am(e,r),n.set(e,[t])):n.set(e,[...r,t])}function $s(e,t=q(),n=NE){const r=t?.getClient()??v();if(!r){A&&_.warn("No client available to capture log.");return}const{release:o,environment:s,beforeSendLog:i}=r.getOptions(),[,a]=im(r,t),c={...e.attributes},{user:{id:u,email:l,username:f},attributes:d}=xr(me(),t);yt(c,"user.id",u,!1),yt(c,"user.email",l,!1),yt(c,"user.name",f,!1),yt(c,"sentry.release",o),yt(c,"sentry.environment",s);const{name:p,version:h}=r.getSdkMetadata()?.sdk??{};yt(c,"sentry.sdk.name",p),yt(c,"sentry.sdk.version",h);const m=r.getIntegrationByName("Replay"),g=m?.getReplayId(!0);yt(c,"sentry.replay_id",g),g&&m?.getRecordingMode()==="buffer"&&yt(c,"sentry._internal.replay_is_buffering",!0);const y=e.message;if(hi(y)){const{__sentry_template_string__:M,__sentry_template_values__:T=[]}=y;T?.length&&(c["sentry.message.template"]=M),T.forEach(($,x)=>{c[`sentry.message.parameter.${x}`]=$})}const S=he(t);yt(c,"sentry.trace.parent_span_id",S?.spanContext().spanId);const E={...e,attributes:c};r.emit("beforeCaptureLog",E);const b=i?wt(A?"The `beforeSendLog` callback threw an error, dropping the log:":"",()=>pt(()=>i(E)),()=>Ms):E;if(b===Ms){r.recordDroppedEvent("callback_error","log_item",1);return}if(!b){r.recordDroppedEvent("before_send","log_item",1),A&&_.warn("beforeSendLog returned null, log will not be captured.");return}const{level:N,message:I,attributes:k={},severityNumber:R}=b,B=fe(),w=sm(B),O={timestamp:B,level:N,body:cc(String(I)),trace_id:a?.trace_id,severity_number:R??kE[N],attributes:xE({...hr(d),...hr(k,!0),[w.key]:w.value})};n(r,O),r.emit("afterCaptureLog",b)}function am(e,t){const n=t??cm(e)??[];if(n.length===0)return;const r=e.getOptions(),o=CE(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);uu().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function cm(e){return uu().get(e)}function uu(){return Rr("clientToLogBufferMap",()=>new WeakMap)}function xE(e){const t={};for(const[n,r]of Object.entries(e)){const o=cc(n);r.type==="string"?t[o]={...r,value:cc(r.value)}:t[o]=r}return t}function cc(e){const t=Object(e),n=t.isWellFormed,r=t.toWellFormed;return typeof n=="function"&&typeof r=="function"?n.call(e)?e:r.call(e):e}function ME(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...ln()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function OE(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=kt(r)),mt(s,[ME(e,o)])}const PE=1e3;function Ct(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function LE(e,t){const n=lu(),r=lm(e);r===void 0?n.set(e,[t]):r.length>=PE?(um(e,r),n.set(e,[t])):n.set(e,[...r,t])}function DE(e,t,n){const{release:r,environment:o}=t.getOptions(),s={...e.attributes};Ct(s,"user.id",n.id,!1),Ct(s,"user.email",n.email,!1),Ct(s,"user.name",n.username,!1),Ct(s,"sentry.release",r),Ct(s,"sentry.environment",o);const{name:i,version:a}=t.getSdkMetadata()?.sdk??{};Ct(s,"sentry.sdk.name",i),Ct(s,"sentry.sdk.version",a);const c=t.getIntegrationByName("Replay"),u=c?.getReplayId(!0);return Ct(s,"sentry.replay_id",u),u&&c?.getRecordingMode()==="buffer"&&Ct(s,"sentry._internal.replay_is_buffering",!0),{...e,attributes:s}}function $E(e,t,n,r){const[,o]=im(t,n),s=he(n),i=s?s.spanContext().traceId:o?.trace_id,a=s?s.spanContext().spanId:void 0,c=fe(),u=sm(c);return{timestamp:c,trace_id:i??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...hr(r),...hr(e.attributes,"skip-undefined"),[u.key]:u.value}}}function FE(e,t){const n=t?.scope??q(),r=t?.captureSerializedMetric??LE,o=n?.getClient()??v();if(!o){A&&_.warn("No client available to capture metric.");return}const{beforeSendMetric:s}=o.getOptions(),{user:i,attributes:a}=xr(me(),n),c=DE(e,o,i);o.emit("processMetric",c);const u=s?wt(A?"The `beforeSendMetric` callback threw an error, dropping the metric:":"",()=>s(c),()=>Ms):c;if(u===Ms){o.recordDroppedEvent("callback_error","trace_metric",1);return}if(!u){o.recordDroppedEvent("before_send","trace_metric",1),A&&_.log("`beforeSendMetric` returned `null`, will not send metric.");return}const l=$E(u,o,n,a);A&&_.log("[Metric]",l),r(o,l),o.emit("afterCaptureMetric",u)}function um(e,t){const n=t??lm(e)??[];if(n.length===0)return;const r=e.getOptions(),o=OE(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);lu().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function lm(e){return lu().get(e)}function lu(){return Rr("clientToMetricBufferMap",()=>new WeakMap)}function BE(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||V(t))return;const n=[],r=[];for(const o of e.spans)o.op?.startsWith("gen_ai.")?n.push(Eh(o)):r.push(o);if(n.length!==0)return e.spans=r,Rh(n,t)}const du=Symbol.for("SentryBufferFullError");function fu(e=100){const t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return cu(du);const a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return Io(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;const c=[a,new Promise(u=>vo(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}const UE=60*1e3;function dm(e,t=zt()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?UE:r-t}function HE(e,t){return e[t]||e.all||0}function fm(e,t,n=zt()){return HE(e,t)>n}function pm(e,{statusCode:t,headers:n},r=zt()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const a of s.trim().split(",")){const[c,u,,,l]=a.split(":",5),f=parseInt(c,10),d=(isNaN(f)?60:f)*1e3;if(!u)o.all=r+d;else for(const p of u.split(";"))p==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(o[p]=r+d):o[p]=r+d}else i?o.all=r+dm(i,r):t===429&&(o.all=r+60*1e3);return o}const hm=64;function WE(e,t,n=fu(e.bufferSize||hm)){let r={};const o=a=>n.drain(a);function s(a,[c,u],l){const f=Pl(l);l==="transaction"&&e.recordDroppedEvent(a,"span",(u.spans?.length??0)+1),e.recordDroppedEvent(a,f,typeof c.item_count=="number"?c.item_count:1)}function i(a){const c=[];if(gr(a,(d,p)=>{fm(r,Pl(p))?s("ratelimit_backoff",d,p):c.push(d)}),c.length===0)return Promise.resolve({});const u=mt(a[0],c),l=d=>{if(Za(u,["client_report"])){A&&_.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}gr(u,(p,h)=>{s(d,p,h)})},f=()=>t({body:Ls(u)}).then(d=>d.statusCode===413?(A&&_.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),l("send_error"),d):(A&&d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&_.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=pm(r,d),d),d=>{throw l("network_error"),A&&_.error("Encountered error running transport request:",d),d});return n.add(f).then(d=>d,d=>{if(d===du)return A&&_.error("Skipped sending event because buffer is full."),l("queue_overflow"),Promise.resolve({});throw d})}return{send:i,flush:o}}function zE(e,t,n){const r=[{type:"client_report"},{timestamp:Hn(),discarded_events:e}];return mt(t?{dsn:t}:{},[r])}function jE(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o??"ok",timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[Yc],exclusive_time:i?.[So],measurements:e.measurements,is_segment:!0}}function qE(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[Yc]:e.profile_id},...e.exclusive_time&&{[So]:e.exclusive_time}}}},measurements:e.measurements}}function GE(e){e.traceLifecycle!=="stream"||!(e.beforeSendTransaction||e.ignoreTransactions?.length)||pt(()=>{console.warn("[Sentry] `beforeSendTransaction` and `ignoreTransactions` are ignored with `traceLifecycle: 'stream'` (enabled by default). Use `beforeSendSpan` and `ignoreSpans` instead, or set `traceLifecycle: 'static'`.")})}const Oe={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},mcp:{inputs:!0,outputs:!0},databaseQueryData:!0,queues:!0,stackFrameVariables:!0,frameContextLines:5};function VE(e){return typeof e=="boolean"||"allow"in e||"deny"in e}function KE(e){return e===void 0?{...Oe.httpHeaders}:VE(e)?{request:e,response:e}:{request:e.request??Oe.httpHeaders.request,response:e.response??Oe.httpHeaders.response}}function YE(e){const t=e.dataCollection??{};return{userInfo:t.userInfo??Oe.userInfo,cookies:t.cookies??Oe.cookies,httpHeaders:KE(t.httpHeaders),httpBodies:t.httpBodies??Oe.httpBodies,urlQueryParams:t.urlQueryParams??Oe.urlQueryParams,graphQL:{document:t.graphQL?.document??Oe.graphQL.document,variables:t.graphQL?.variables??Oe.graphQL.variables},genAI:{inputs:t.genAI?.inputs??Oe.genAI.inputs,outputs:t.genAI?.outputs??Oe.genAI.outputs},mcp:{inputs:t.mcp?.inputs??Oe.mcp.inputs,outputs:t.mcp?.outputs??Oe.mcp.outputs},databaseQueryData:t.databaseQueryData??Oe.databaseQueryData,queues:t.queues??Oe.queues,stackFrameVariables:t.stackFrameVariables??Oe.stackFrameVariables,frameContextLines:t.frameContextLines??Oe.frameContextLines}}const Xl="Not capturing exception because it's already been captured.",Jl="Discarded session because of missing or non-string release",mm=Symbol.for("SentryInternalError"),gm=Symbol.for("SentryDoNotSendEventError"),XE=5e3,_m=Symbol.for("SentryClosedClient");function JE(e){return _m in e}function Ql(e){return{message:e,[mm]:!0}}function uc(e){return{message:e,[gm]:!0}}function Zl(e){return uc(`Discarding event because it's not included in the random sample (sampling rate = ${e})`)}function ed(e){return rt(e)&&mm in e}function td(e){return rt(e)&&gm in e}function nd(e,t,n,r,o){let s=0,i,a=!1;e.on(n,()=>{s=0,clearTimeout(i),a=!1}),e.on(t,c=>{if(s+=r(c),s>=8e5)o(e);else if(!a){const u=e.getOptions()._flushInterval??XE;u>0&&(a=!0,i=vo(setTimeout(()=>{o(e)},u)))}}),e.on("flush",()=>{o(e)})}class QE{constructor(t){this._options={attachStacktrace:!0,...t,traceLifecycle:t.traceLifecycle==="static"?"static":"stream"},this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=fu(t.transportOptions?.bufferSize??hm),this._dataCollection=YE(t),this._unhandledSessionStatus="crashed",t.dsn?this._dsn=Ei(t.dsn):A&&_.warn("No DSN provided, client will not send events.");const{beforeSendSpan:n,traceLifecycle:r}=this._options;if(A&&n&&Ri(n)!==(r==="static")&&pt(()=>{console.warn(`Ignoring \`beforeSendSpan\`: ${r==="static"?"wrap it with":"remove"} \`Sentry.withStaticSpan\` to use it with \`traceLifecycle: "${r}"\`.`)}),this._dsn){const o=om(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:o})}nd(this,"afterCaptureLog","flushLogs",tw,am),nd(this,"afterCaptureMetric","flushMetrics",ew,um)}captureException(t,n,r){const o=Le();if(gl(t))return A&&_.log(Xl),o;const s={event_id:o,...n};return this._process(()=>this.eventFromException(t,s).then(i=>this._captureEvent(i,s,r)).then(i=>i),"error"),s.event_id}captureMessage(t,n,r,o){const s={event_id:Le(),...r},i=hi(t)?t:String(t),a=dt(t),c=a?this.eventFromMessage(i,n,s):this.eventFromException(t,s);return this._process(()=>c.then(u=>this._captureEvent(u,s,o)),a?"unknown":"error"),s.event_id}captureEvent(t,n,r){const o=Le();if(n?.originalException&&gl(n.originalException))return A&&_.log(Xl),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=ec(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),fr(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(this.emit("flush"),!n)return!0;const r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){Object.defineProperty(this,_m,{value:!0});const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&(this._setupIntegrations(),GE(this._options))}getIntegrationByName(t){return this._integrations[t]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),yh(this,t,this._integrations),n||Cl(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);const r=BE(t,this);let o=oE(t,this._dsn,this._options._metadata,this._options.tunnel);if(!ac(n))for(const s of n.attachments||[])o=Ol(o,ev(s));r&&(o=Ol(o,r)),this.sendEnvelope(o).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=Ii}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){A&&_.warn(Jl);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){A&&_.warn(Jl);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=rE(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const o=`${t}:${n}`;A&&_.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,o=(...s)=>n(...s);return r.add(o),()=>{r.delete(o)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{const n=await this._transport.send(t);return this.emit("afterEnvelope",t),n}catch(n){return A&&_.error("Error while sending envelope:",n),{}}return A&&_.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Fb(this,t),Cl(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1;const s=n.exception?.values;if(s){o=!0,r=!1;for(const c of s)if(c.mechanism?.handled===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(fr(t,{...r&&{status:this._unhandledSessionStatus},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){const s=this.getOptions(),i=this.getIntegrationNames();return!n.integrations&&i.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),Zh(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...a.contexts?.trace,...Vc(r)},...a.contexts};const c=ki(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=q(),o=me()){return A&&lc(t)&&_.log(`Captured error event \`${Qh(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{A&&(td(s)?_.log(s.message):ed(s)?_.warn(s.message):_.warn(s))})}_processEvent(t,n,r,o){const s=this.getOptions(),{sampleRate:i}=s,a=ym(t),c=lc(t),l=`before send for type \`${t.type||"error"}\``;let f="before_send",d=0;const p=typeof i>"u"?void 0:xn(i),h=c&&typeof p=="number"&&rn()>p,m=ec(t.type);let g=0;const y=r.getSession()||o.getSession();return h&&y?.status!=="ok"?(this.recordDroppedEvent("sample_rate","error"),cu(Zl(i))):this._prepareEvent(t,n,r,o).then(S=>{if(S===null)throw uc("An event processor returned `null`, will not send event.");return g=S.spans?.length||0,ac(n)?S:ZE(s,S,n,E=>{f=E},E=>{d=E})}).then(S=>{if(d&&this.recordDroppedEvent("ignored","span",d),!We(S)||S===null){if(this.recordDroppedEvent(f,m),a&&this.recordDroppedEvent(f,"span",1+g-d),S!==null)throw Ql(`${l} must return \`null\` or a valid event.`);const N=f==="ignored"?"Transaction matched `ignoreSpans`":`${l} ${f==="callback_error"?"threw an error":"returned `null`"}`;throw uc(`${N}, will not send event.`)}if(c&&y&&this._updateSessionFromEvent(y,S),h)throw this.recordDroppedEvent("sample_rate","error"),Zl(i);if(a){const N=g-d-(S.spans?.length||0);N>0&&this.recordDroppedEvent("before_send","span",N)}const b=S.transaction_info;if(a&&b&&S.transaction!==t.transaction){const N="custom";S.transaction_info={...b,source:N}}return this.sendEvent(S,n),S}).then(null,S=>{throw td(S)||ed(S)?S:(this.captureException(S,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:S}),Ql(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
10
|
+
Reason: ${S}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===du&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,s]=n.split(":");return{reason:o,category:s,quantity:r}})}_flushOutcomes(){A&&_.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){A&&_.log("No outcomes to send");return}if(!this._dsn){A&&_.log("No dsn provided, will not send outcomes");return}A&&_.log("Sending outcomes:",t);const n=zE(t,this._options.tunnel&&kt(this._dsn));this.sendEnvelope(n)}}function ZE(e,t,n,r,o){const{beforeSend:s,ignoreSpans:i,beforeSendTransaction:a}=e,c=Ri(e.beforeSendSpan)&&e.beforeSendSpan;let u=t;if(lc(u)&&s){const l=u;return wt(A?"The `beforeSend` callback threw an error, dropping the event:":"",()=>s(l,n),()=>(r("callback_error"),null))}if(ym(u)){if(c||i){const l=jE(u);if(i?.length&&xs({description:l.description,op:l.op,attributes:l.data},i))return r("ignored"),null;if(c){const f=Os(l,c);u=yo(t,qE(f))}if(u.spans){const f=[],d=u.spans;for(const p of d){if(i?.length&&xs({description:p.description,op:p.op,attributes:p.data},i)){Pb(d,p);continue}c?f.push(Os(p,c)):f.push(p)}o(d.length-f.length),u.spans=f}}if(a)return wt(A?"The `beforeSendTransaction` callback threw an error, dropping the event:":"",()=>a(u,n),()=>(r("callback_error"),null))}return u}function lc(e){return e.type===void 0}function ym(e){return e.type==="transaction"}function ew(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Sm(e.attributes)}function tw(e){let t=0;return e.message&&(t+=e.message.length*2),t+Sm(e.attributes)}function Sm(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*rd(n[0]):dt(n)?t+=rd(n):t+=100}),t}function rd(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function nw(e,t){t.debug===!0&&(A?_.enable():pt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ow(),q().update(t.initialScope);const r=new e(t);return sw(r),r.init(),r}function rw(){const e=v();return e&&!JE(e)?e:void 0}function ow(){rw()&&pt(()=>{console.warn("[Sentry] `Sentry.init()` was called more than once. The new client replaces the active client, but the active client is not closed, so state from both can mix. Call `Sentry.init()` only once, or call `await Sentry.close()` before you call it again.")})}function sw(e){q().setClient(e)}const ha=100,ma=5e3,iw=36e5;function aw(e){function t(...n){A&&_.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const o=n.createStore(n);let s=ma,i;function a(f,d,p){return Za(f,["client_report"])?!1:n.shouldStore?n.shouldStore(f,d,p):!0}function c(f){i&&clearTimeout(i),i=vo(setTimeout(async()=>{i=void 0;const d=await o.shift();d&&(t("Attempting to send previously queued event"),d[0].sent_at=new Date(zt()).toISOString(),l(d,!0).catch(p=>{t("Failed to retry sending",p)}))},f))}function u(){i||(c(s),s=Math.min(s*2,iw))}async function l(f,d=!1){if(!d&&Za(f,["replay_event","replay_recording"]))return await o.push(f),c(ha),{};try{if(n.shouldSend){const m=n.shouldSend(f);if(($t(m)?await m:m)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false")}const p=await r.send(f);let h=ha;if(p){if(p.headers?.["retry-after"])h=dm(p.headers["retry-after"]);else if(p.headers?.["x-sentry-rate-limits"])h=6e4;else if((p.statusCode||0)>=400)return p}return c(h),s=ma,p}catch(p){const h=a(f,p,s);if($t(h)?await h:h)return d?await o.unshift(f):await o.push(f),u(),t("Error sending. Event queued.",p),{};throw p}}return n.flushAtStartup&&u(),{send:l,flush:f=>(f===void 0&&(s=ma,c(ha)),r.flush(f))}}}const ga="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function bm(e,t){let n;return gr(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function cw(e,t){return n=>{const r=e(n);return{...r,send:async o=>{const s=bm(o,["event","transaction","profile","replay_event"]);return s&&(s.release=t),r.send(o)}}}}function uw(e,t){return mt(t?{...e[0],dsn:t}:e[0],e[1])}function oL(e,t){return n=>{const r=e(n),o=new Map,s=t||(u=>{const l=u.getEvent();return l?.extra?.[ga]&&Array.isArray(l.extra[ga])?l.extra[ga]:[]});function i(u,l){const f=l?`${u}:${l}`:u;let d=o.get(f);if(!d){const p=th(u);if(!p)return;const h=om(p,n.tunnel);d=l?cw(e,l)({...n,url:h}):e({...n,url:h}),o.set(f,d)}return[u,d]}async function a(u){function l(h){const m=h?.length?h:["event"];return bm(u,m)}const f=s({envelope:u,getEvent:l}).map(h=>typeof h=="string"?i(h,void 0):i(h.dsn,h.release)).filter(h=>!!h),d=f.length?f:[["",r]];return(await Promise.all(d.map(([h,m])=>m.send(uw(u,h)))))[0]}async function c(u){const l=[...o.values(),r];return(await Promise.all(l.map(d=>d.flush(u)))).every(d=>d)}return{send:a,flush:c}}}const pu="[Filtered]",od=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","sid","identity","set-cookie","cookie"],lw=[".sid","sessid","remember","oidc","pkce","nonce","__secure-","__host-","awsalb","awselb","akamai","__stripe","cognito","firebase","supabase","sb-","mfa","2fa"];function dw(e,t){return t.some(n=>e.includes(n))}function vm(e,t,n){if(t===!1)return!0;const r=e.toLowerCase(),o=n!=null?[...od,...n]:od;if(dw(r,o))return!0;if(t===!0)return!1;const i=("deny"in t?t.deny:t.allow).some(a=>r.includes(a.toLowerCase()));return"deny"in t?i:!i}function Ln(e,t,n){if(t===!1)return{};const r={};for(const o of Object.keys(e))r[o]=vm(o,t,n)?pu:e[o];return r}function fw(e,t){return(Array.isArray(e)?e:[e]).flatMap(r=>typeof r!="string"?[]:t==="set-cookie"?pw(r).map(o=>o.split(";")[0]):r.split(";")).map(r=>r.trim()).filter(r=>r!==""&&r!=="=").map(r=>{const o=r.indexOf("=");return o===-1?["",r]:[r.slice(0,o).trim(),r.slice(o+1).trim()]})}function pw(e){return e.split(/,(?=[^;=,]*=)/)}function hw(e){const t={};for(const[n,r]of e)t[n]===void 0&&(t[n]=n===""?pu:mw(r));return t}function mw(e){const t=e.length>1&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e;try{return t.indexOf("%")!==-1?decodeURIComponent(t):t}catch{return t}}function dc(e,t,n){if(t===!1)return{};const r=hw(fw(e,n));return Ln(r,t,lw)}function Em(e,t){if(!(!e||t===!1))return e.split("&").map(n=>{const r=n.indexOf("="),o=r===-1?n:n.slice(0,r),s=new URLSearchParams(`${o}=`).keys().next().value;return s!==void 0&&vm(s,t)?`${o}=${pu}`:n}).join("&")}function gw(e,t){const n=e.indexOf("#"),r=n===-1?e.length:n,o=e.indexOf("?");if(o===-1||o>r)return e;const s=e.slice(0,o),i=e.slice(o+1,r),a=e.slice(r),c=Em(i,t);return c?`${s}?${c}${a}`:`${s}${a}`}function wm(e){return(e??v())?.getDataCollectionOptions().urlQueryParams??!0}function be(e,t){return e===void 0?void 0:gw(e,wm(t))}function Tm(e,t){return e?Em(e,wm(t)):void 0}const _w="thismessage:/";function Mi(e){return"isRelative"in e}function Dn(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=t??(n?_w:void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;const o=new URL(e,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function Im(e){if(Mi(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function km(e){return e?.replace(/^\?/,"")||void 0}function Rm(e){return e?.replace(/^#/,"")||void 0}function hu(e,t){try{return new URL(e,t).hostname||void 0}catch{return}}function An(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Cm(e){return e.split(/[?#]/,1)[0]}function Bt(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),s=e.indexOf(",");let i="";if(t&&s!==-1){const a=e.slice(s+1);i=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${o?",base64":""}${i?`,${i}`:""}`}return e}function Am(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return Sw(e,n)||yw(e,r)}function yw(e,t){return t?sd(e)===sd(t):!1}function Sw(e,t){const n=Dn(e);return!n||Mi(n)||!t?!1:bw(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function bw(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function sd(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function vw(e,...t){const n=e.map((o,s)=>o??e.raw[s]),r=new String(String.raw({raw:n},...t));return r.__sentry_template_string__=n.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),r.__sentry_template_values__=t,r}const Ew=vw;function ww(e){const t=e?Ei(e):v()?.getDsn();return t?`/${Iw(kt(t)).toString(36)}`:void 0}function Tw(e){const t=(e?.startsWith("./")?e.slice(1):e??"").replace(/\/$/,"");return!t||t.startsWith("/")?t:`/${t}`}function Iw(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function kw(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Nm(e,t,n=[t],r="npm"){const o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(s=>({name:`${r}:@sentry/${s}`,version:nn})),o.version=nn)}function xm(e={}){const t=e.client||v();if(!SE()||!t)return{};const n=at(),r=_n(n);if(r.getTraceData)return r.getTraceData(e);const o=e.scope||q(),s=e.span||he(),i=mr(s)&&!Je(t.getOptions());if(!s&&TS())return{};const a=s&&!i?Cb(s):Rw(o),c=s?it(s):ki(t,o),u=eh(c);if(!oh.test(a))return _.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const f={"sentry-trace":a,baggage:u};return e.propagateTraceparent&&(f.traceparent=s&&!i?Ab(s):Cw(o)),f}function Rw(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return ih(t,r,n)}function Cw(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return ah(t,r,n)}const id=new WeakMap;function Aw(e){const t=`${e.flags.replace(/[gy]/g,"")}${e.ignoreCase?"":"i"}`;if(t===e.flags)return e;const n=id.get(e);if(n)return n;const r=new RegExp(e.source,t);return id.set(e,r),r}function _a(e,t,n=!1){const r=e.toLowerCase();for(const o of t)if(nt(o)){const s=o.toLowerCase();if(n?r===s:r.includes(s))return!0}else if(vp(o)&&Aw(o).test(e))return!0;return!1}const Nw=100;function Tt(e,t){const n=v(),r=me();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=Nw}=n.getOptions();if(s<=0)return;const a={timestamp:Hn(),...e},c=o?wt(A?"The `beforeBreadcrumb` callback threw an error, dropping the breadcrumb:":"",()=>pt(()=>o(a,t)),()=>null):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}const xw="FunctionToString",ad=new WeakMap,Mw=(()=>({name:xw,setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=qc(this);let r;try{ad.has(v())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){ad.set(e,!0)}})),Ow=Mw,Pw=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/Java exception was raised during method invocation$/,/Java object is gone$/],Lw="EventFilters",Dw=(e={})=>{let t;return{name:Lw,setup(n){const r=n.getOptions();t=cd(e,r)},processEvent(n,r,o){if(!t){const s=o.getOptions();t=cd(e,s)}return $w(n,t)?null:n}}};function cd(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Pw],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function $w(e,t){if(e.type){if(e.type==="transaction"&&Bw(e,t.ignoreTransactions))return A&&_.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
11
|
+
Event: ${Tn(e)}`),!0}else{if(Fw(e,t.ignoreErrors))return A&&_.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
12
|
+
Event: ${Tn(e)}`),!0;if(zw(e))return A&&_.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
13
|
+
Event: ${Tn(e)}`),!0;if(Uw(e,t.denyUrls))return A&&_.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
14
|
+
Event: ${Tn(e)}.
|
|
15
|
+
Url: ${Fs(e)}`),!0;if(!Hw(e,t.allowUrls))return A&&_.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
16
|
+
Event: ${Tn(e)}.
|
|
17
|
+
Url: ${Fs(e)}`),!0}return!1}function Fw(e,t){return t?.length?Qh(e).some(n=>jt(n,t)):!1}function Bw(e,t){if(!t?.length)return!1;const n=e.transaction;return n?jt(n,t):!1}function Uw(e,t){if(!t?.length)return!1;const n=Fs(e);return n?jt(n,t):!1}function Hw(e,t){if(!t?.length)return!0;const n=Fs(e);return n?jt(n,t):!0}function Ww(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Fs(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?Ww(n):null}catch{return A&&_.error(`Cannot extract url for event ${Tn(e)}`),null}}function zw(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function jw(e,t,n,r,o,s){if(!o.exception?.values||!s||!Re(s.originalException))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=ps(e,t,r,s.originalException,n,o.exception.values,i,0))}function ps(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(Re(r[o])){ya(i,a,r);const u=e(t,r[o]),l=c.length;Sa(u,o,l,a),c=ps(e,t,n,r[o],o,[u,...c],u,l)}return Mm(r)&&r.errors.forEach((u,l)=>{if(Re(u)){ya(i,a,r);const f=e(t,u),d=c.length;Sa(f,`errors[${l}]`,d,a),c=ps(e,t,n,u,o,[f,...c],f,d)}}),qw(r)&&["error","suppressed"].forEach(u=>{const l=r[u];if(Re(l)){ya(i,a,r);const f=e(t,l),d=c.length;Sa(f,u,d,a),c=ps(e,t,n,l,o,[f,...c],f,d)}}),c}function Mm(e){return Array.isArray(e.errors)}function qw(e){return"error"in e&&"suppressed"in e}function ya(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Mm(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Sa(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Gw(e){return Re(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function ud(e){return Gw(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const Om=new Map,ld=new Set;function Vw(e){if(D._sentryModuleMetadata)for(const t of Object.keys(D._sentryModuleMetadata)){const n=D._sentryModuleMetadata[t];if(ld.has(t))continue;ld.add(t);const r=e(t);for(const o of r.reverse())if(o.filename){Om.set(o.filename,n);break}}}function Kw(e,t){return Vw(e),Om.get(t)}function Pm(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const o=Kw(e,r.filename);o&&(r.module_metadata=o)})})}function Lm(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}const sL=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{gr(t,(n,r)=>{if(r==="event"){const o=Array.isArray(n)?n[1]:void 0;o&&(Lm(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;Pm(n,t)})}}),Bs=new Set([]);function mu(e){const t="console",n=hn(t,e);return mn(t,Xw),n}function Yw(e){for(const t of e)Bs.add(t);return()=>{for(const t of e)Bs.delete(t)}}const dd=new Set;function Xw(){"console"in D&&pi.forEach(function(e){dd.has(e)||!(e in D.console)||(dd.add(e),Pe(D.console,e,function(t){return ks[e]=t,function(...n){const r=n[0],o=ks[e],s=Bs.size&&typeof r=="string"&&jt(r,Bs);s||tt("console",{args:n,level:e}),(!s||A&&_.isEnabled())&&o?.apply(D.console,n)}}))})}function Us(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Jw="CaptureConsole",Qw=((e={})=>{const t=e.levels||pi,n=e.handled??!0;return{name:Jw,setup(r){"console"in D&&mu(({args:o,level:s})=>{v()!==r||!t.includes(s)||Zw(o,s,n)})}}}),iL=Qw;function Zw(e,t,n){const r=Us(t),o=new Error,s={level:Us(t),extra:{arguments:e}};Ze(i=>{if(i.addEventProcessor(u=>(u.logger="console",Ot(u,{handled:n,type:"auto.core.capture_console"}),u)),t==="assert"){if(!e[0]){const u=`Assertion failed: ${Ya(e.slice(1)," ")||"console.assert"}`;i.setExtra("arguments",e.slice(1)),i.captureMessage(u,r,{captureContext:s,syntheticException:o})}return}const a=e.find(u=>u instanceof Error);if(a){Pn(a,s);return}const c=Ya(e," ");i.captureMessage(c,r,{captureContext:s,syntheticException:o})})}const e0="Dedupe",t0=(()=>{let e;return{name:e0,processEvent(t){if(t.type)return t;try{if(r0(t,e))return A&&_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),n0=t0;function r0(e,t){return t?!!(o0(e,t)||s0(e,t)):!1}function o0(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!$m(e,t)||!Dm(e,t))}function s0(e,t){const n=fd(t),r=fd(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!$m(e,t)||!Dm(e,t))}function Dm(e,t){const n=Ga(e),r=Ga(t);if(!n||!r)return!n&&!r;if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){const s=r[o],i=n[o];if(s.filename!==i.filename||s.lineno!==i.lineno||s.colno!==i.colno||s.function!==i.function)return!1}return!0}function $m(e,t){const n=e.fingerprint,r=t.fingerprint;if(!n||!r)return!n&&!r;try{return n.join("")===r.join("")}catch{return!1}}function fd(e){return e.exception?.values?.[0]}const i0="ExtraErrorData",a0=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:i0,processEvent(r,o,s){const{maxValueLength:i}=s.getOptions();return c0(r,o,t,n,i)}}}),aL=a0;function c0(e,t={},n,r,o){if(!t.originalException||!Re(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=Fm(t.originalException,r,o);if(i){const a={...e.contexts},c=Te(i,n);return We(c)&&(Ky(c),a[s]=c),{...e,contexts:a}}return e}function Fm(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const s of Object.keys(e)){if(r.indexOf(s)!==-1)continue;const i=e[s];o[s]=Re(i)||typeof i=="string"?n?oo(`${i}`,n):`${i}`:i}if(t&&e.cause!==void 0)if(Re(e.cause)){const s=e.cause.name||e.cause.constructor.name;o.cause={[s]:Fm(e.cause,!1,n)}}else o.cause=e.cause;if(typeof e.toJSON=="function"){const s=e.toJSON();for(const i of Object.keys(s)){const a=s[i];o[i]=Re(a)?a.toString():a}}return o}catch(r){A&&_.error("Unable to extract extra data from the Error object:",r)}return null}function u0(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const l0=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function d0(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=l0.exec(t);return n?n.slice(1):[]}function pd(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=u0(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function hd(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function f0(e,t){e=pd(e).slice(1),t=pd(t).slice(1);const n=hd(e.split("/")),r=hd(t.split("/")),o=Math.min(n.length,r.length);let s=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){s=a;break}let i=[];for(let a=s;a<n.length;a++)i.push("..");return i=i.concat(r.slice(s)),i.join("/")}function p0(e,t){return d0(e)[2]||""}const h0="RewriteFrames",cL=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in D&&!!D.window,o=e.iteratee||m0({isBrowser:r,root:t,prefix:n});function s(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:i(c.stacktrace)}}))}}}catch{return a}}function i(a){return{...a,frames:a?.frames?.map(c=>o(c))}}return{name:h0,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=s(c)),c}}};function m0({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),s=/^\//.test(r.filename);if(e){if(t){const i=r.filename;i.indexOf(t)===0&&(r.filename=i.replace(t,n))}}else if(o||s){const i=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?f0(t,i):p0(i);r.filename=`${n}${a}`}return r}}const g0=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],_0=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],y0={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},Bm=["select","insert","upsert","update","delete"];function Oi(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Pi(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function Um(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function S0(e,t){return Um(e,t)!==void 0}function Hm(e,t){if(!e)return;if(typeof e.get=="function")return e.get(t)??void 0;const n=e,r=t.toLowerCase(),o=Object.keys(n).find(s=>s.toLowerCase()===r);return o!==void 0?n[o]:void 0}function b0(e,t={}){switch(e){case"GET":case"QUERY":return"select";case"POST":return Hm(t,"Prefer")?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function v0(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let o;return n?.startsWith("fts")?o="textSearch":n?.startsWith("plfts")?o="textSearch[plain]":n?.startsWith("phfts")?o="textSearch[phrase]":n?.startsWith("wfts")?o="textSearch[websearch]":o=n&&y0[n]||"filter",`${o}(${e}, ${r.join(".")})`}function md(e,t=!1){return new Proxy(e,{apply(n,r,o){const s=`auth${t?".admin":""}.${e.name}`,i=v(),a=i&&V(i)?s:`auth ${t?"(admin) ":""}${e.name}`;return eu({name:a,attributes:{[re]:"auto.db.supabase",[U]:qh,[$p]:"postgresql",[Dp]:s}},c=>Reflect.apply(n,r,o).then(u=>(rt(u)&&"error"in u&&u.error?(c.setStatus({code:we}),Pn(u.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):c.setStatus({code:bo}),c.end(),u)).catch(u=>{throw c.setStatus({code:we}),c.end(),Pn(u,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),u}).then(...o))}})}function E0(e){const t=e.auth;if(!(!t||Pi(e.auth))){for(const n of g0){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=md(r))}for(const n of _0){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=md(r,!0))}Oi(e.auth)}}function w0(e,t){Pi(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(n,r,o){const s=Reflect.apply(n,r,o),i=s.constructor;return I0(i,t),s}}),Oi(e.prototype.from))}function T0(e,t){Pi(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(n,r,o){const s=Bm,i=r,a=b0(i.method,i.headers);if(!s.includes(a)||!i?.url?.pathname||typeof i.url.pathname!="string")return Reflect.apply(n,r,o);const c=i.url.pathname.split("/"),u=c.length>0?c[c.length-1]:"",l=[];for(const[N,I]of i.url.searchParams.entries())l.push(v0(N,I));const f=Object.create(null);if(We(i.body))for(const[N,I]of Object.entries(i.body))f[N]=I;const d=v(),p=t.sendOperationData??d?.getDataCollectionOptions().databaseQueryData===!0,h=Um(i.body,f),m=a==="select"?"":`${a}${S0(i.body,f)?"(...) ":""}`,g=p?l.join(" "):l.length>0?"[redacted]":"",y=[m.trimEnd(),g].filter(Boolean).join(" "),S=y?`${y} from(${u})`:`from(${u})`,E=d&&V(d)?`${a}${u?` ${u}`:""}`:S,b={"db.table":u,"db.schema":i.schema,"db.url":i.url.origin,"db.sdk":Hm(i.headers,"X-Client-Info"),[$p]:"postgresql",[Dp]:a,[re]:"auto.db.supabase",[U]:qh};return l.length&&p&&(b["db.query"]=l),h!==void 0&&p&&(b["db.body"]=h),eu({name:E,attributes:b},N=>Reflect.apply(n,r,[]).then(I=>{if(N&&(I&&typeof I=="object"&&"status"in I&&As(N,I.status||500),N.end()),I?.error){const B=new Error(I.error.message);I.error.code&&(B.code=I.error.code),I.error.details&&(B.details=I.error.details);const w={};l.length&&p&&(w.query=l),h!==void 0&&p&&(w.body=h),Pn(B,O=>(O.addEventProcessor(M=>(Ot(M,{handled:!1,type:"auto.db.supabase.postgres"}),M)),O.setContext("supabase",w),O))}const k={type:"supabase",category:`db.${a}`,message:S},R={};return l.length&&p&&(R.query=l),h!==void 0&&p&&(R.body=h),Object.keys(R).length&&(k.data=R),Tt(k),I},I=>{throw N&&(As(N,500),N.end()),I}).then(...o))}}),Oi(e.prototype.then))}function I0(e,t){for(const n of Bm)Pi(e.prototype[n])||(e.prototype[n]=new Proxy(e.prototype[n],{apply(r,o,s){const i=Reflect.apply(r,o,s),a=i.constructor;return A&&_.log(`Instrumenting ${n} operation's PostgRESTFilterBuilder`),T0(a,t),i}}),Oi(e.prototype[n]))}const k0=(e,t={})=>{if(!e){A&&_.warn("Supabase integration was not installed because no Supabase client was provided.");return}const n=e.constructor===Function?e:e.constructor;w0(n,t),E0(e)},R0="Supabase",C0=((e,t)=>({setupOnce(){k0(e,t)},name:R0})),uL=e=>C0(e.supabaseClient,{sendOperationData:e.sendOperationData}),A0=10,N0="ZodErrors";function x0(e){return Re(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function M0(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function O0(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function P0(e){const t=new Set;for(const r of e.issues){const o=O0(r.path);o.length>0&&t.add(o)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const o=e.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${oo(n.join(", "),100)}`}function L0(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!x0(r.originalException)||r.originalException.issues.length===0)return n;try{const s=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(M0);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:s})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:P0(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":s.slice(0,e)}}}catch(o){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:o instanceof Error?`${o.name}: ${o.message}
|
|
18
|
+
${o.stack}`:"unknown"}}}}}const D0=((e={})=>{const t=e.limit??A0;return{name:N0,processEvent(n,r){return L0(t,e.saveZodIssuesAsAttachment,n,r)}}}),lL=D0,dL=e=>{const t=e.ignoreSentryInternalFrames??!1;return{name:"ThirdPartyErrorsFilter",setup(n){n.on("beforeEnvelope",r=>{gr(r,(o,s)=>{if(s==="event"){const i=Array.isArray(o)?o[1]:void 0;i&&(Lm(i),o[1]=i)}})}),n.on("applyFrameMetadata",r=>{if(r.type)return;const o=n.getOptions().stackParser;Pm(o,r)})},preprocessEvent(n){t&&(D._sentryWrappedDepth??0)>0&&(n.sdkProcessingMetadata={...n.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(n){const r=t?n.sdkProcessingMetadata?.insideSentryWrapped===!0&&n.exception?.values?.length===1:!1,o=F0(n,t,r);if(o){const s=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(o[s](a=>!a.some(c=>e.filterKeys.includes(c)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;n.tags={...n.tags,third_party_code:!0}}}return n}}};function $0(e,t,n){if(t!==0)return!1;if(n&&B0(e)||e.function==="sentryWrapped")return!0;if(!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(H0))return!1;if(e.pre_context){const r=e.pre_context.length;for(let o=0;o<r;o++)if(e.pre_context[o]?.includes(U0))return!0}return!1}function F0(e,t,n){const r=Ga(e);if(r)return r.filter((o,s)=>!o.filename||o.lineno==null&&o.colno==null&&o.instruction_addr==null?!1:!t||!$0(o,s,!!n)).map(o=>o.module_metadata?Object.keys(o.module_metadata).filter(s=>s.startsWith(gd)).map(s=>s.slice(gd.length)):[])}function B0(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}const gd="_sentryBundlerPluginAppKey:",U0="Attempt to invoke user-land function",H0="fn.apply(this, wrappedArguments)",W0="Console",z0=(e={})=>{const t=new Set(e.levels||pi);return{name:W0,setup(n){const r=mu(({args:o,level:s})=>{v()!==n||!t.has(s)||j0(s,o)});if(n.registerCleanup(r),e.filter){const o=Yw(e.filter);n.registerCleanup(o)}}}};function j0(e,t){const n={category:"console",data:{arguments:t,logger:"console"},level:Us(e),message:_d(t)};if(e==="assert")if(t[0]===!1){const r=t.slice(1);n.message=r.length>0?`Assertion failed: ${_d(r)}`:"Assertion failed",n.data.arguments=r}else return;Tt(n,{input:t,level:e})}function _d(e){return"util"in D&&typeof D.util.format=="function"?D.util.format(...e):Ya(e," ")}const q0=100,G0=10,Vo="flag.evaluation.";function Or(e){if(e.type)return e;const n=q().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function $n(e,t,n=q0){const r=q().getScopeData().contexts;r.flags||(r.flags={values:[]});const o=r.flags.values;V0(o,e,t,n)}function V0(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){A&&_.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const o=e.findIndex(s=>s.flag===t);o!==-1&&e.splice(o,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function Fn(e,t,n=G0){if(typeof t!="boolean")return;const r=he();if(!r)return;const o=xe(r).data;if(`${Vo}${e}`in o){r.setAttribute(`${Vo}${e}`,t);return}Object.keys(o).filter(i=>i.startsWith(Vo)).length<n&&r.setAttribute(`${Vo}${e}`,t)}const fL=()=>({name:"FeatureFlags",processEvent(e,t,n){return Or(e)},addFeatureFlag(e,t){$n(e,t),Fn(e,t)}}),K0=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&Pe(t,"isOn",yd),typeof t.getFeatureValue=="function"&&Pe(t,"getFeatureValue",yd)},processEvent(t,n,r){return Or(t)}});function yd(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&($n(n,r),Fn(n,r)),r}}const Y0="ConversationId",X0=(()=>({name:Y0,setup(e){e.on("spanStart",t=>{const n=q().getScopeData(),r=me().getScopeData(),o=n.conversationId||r.conversationId;if(o){const{op:s,data:i,description:a}=xe(t);if(!s?.startsWith("gen_ai.")&&!i["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute(OS,o)}})}})),J0=X0;function Q0(e,t,n,r,o){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=Je()&&t(i);if(e.endTimestamp){const g=e.fetchData.__span;if(!g)return;const y=r[g];y&&(a&&(tT(y,e),Z0(y,e,o)),delete r[g]);return}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1,urlBase:l}=o??{},f=v(),d=!!he(),p=d||!!f&&V(f),h=a&&p?tu(oT(i,s,c,f,l)):new Mn,m=Ni(h)&&d?void 0:h;if(a&&!p&&f?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h,n(e.fetchData.url)){const g=e.args[0],y={...e.args[1]||{}},S=eT(g,y,Je()&&p?m:void 0,u);S&&(e.args[1]=y,y.headers=S)}if(f){const g={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",h,g)}return h}function Z0(e,t,n){n?.onRequestSpanEnd?.(e,{headers:t.response?.headers,error:t.error})}function eT(e,t,n,r){const o=xm({span:n,propagateTraceparent:r}),s=o["sentry-trace"],i=o.baggage,a=o.traceparent;if(!s)return;const c=t.headers||(jc(e)?e.headers:void 0);if(c)if(nT(c)){const u=new Headers(c);if(u.get("sentry-trace")||u.set("sentry-trace",s),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),i){const l=u.get("baggage");l?Ko(l)||u.set("baggage",`${l},${i}`):u.set("baggage",i)}return u}else if(rT(c)){const u=[...c];u.find(f=>f[0]==="sentry-trace")||u.push(["sentry-trace",s]),r&&a&&!u.find(f=>f[0]==="traceparent")&&u.push(["traceparent",a]);const l=c.find(f=>f[0]==="baggage"&&typeof f[1]=="string"&&Ko(f[1]));return i&&!l&&u.push(["baggage",i]),u}else{const u="sentry-trace"in c?c["sentry-trace"]:void 0,l="traceparent"in c?c.traceparent:void 0,f="baggage"in c?c.baggage:void 0,d=f?Array.isArray(f)?[...f]:[f]:[],p=f&&(Array.isArray(f)?f.find(m=>Ko(m)):Ko(f));i&&!p&&d.push(i);const h=Object.assign({},c,{"sentry-trace":u??s,...d.length>0&&{baggage:d.join(",")}});return r&&a&&!l&&(h.traceparent=a),h}else return{"sentry-trace":s,...i&&{baggage:i},...a&&{traceparent:a}}}function tT(e,t){if(t.response){As(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute(Bp,r)}}else t.error&&e.setStatus({code:we,message:"internal_error"});e.end()}function Ko(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Ns))}function nT(e){return typeof Headers<"u"&&gi(e,Headers)}function rT(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function oT(e,t,n,r,o){const s=!!r&&V(r),i=hu(e,o);if(e.startsWith("data:")){const u=Bt(e);return{name:s?t:`${t} ${u}`,attributes:Sd(e,void 0,t,n,r,i)}}const a=Dn(e),c=a?Im(a):e;return{name:s?i?`${t} ${i}`:t:`${t} ${c}`,attributes:Sd(e,a,t,n,r,i)}}function Sd(e,t,n,r,o,s){const i={[Fe]:be(Bt(e),o),type:"fetch",[yi]:n,[re]:r,[U]:Gh,[bi]:s};return t&&(Mi(t)||(i[Fe]=be(Bt(t.href),o),i[Si]=t.hostname,i[ob]=t.port?Number(t.port):void 0),i[zp]=Tm(km(t.search),o),i[Wp]=Rm(t.hash)),i}const fc=D;function sT(){if(!("fetch"in fc))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function pc(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function iT(){if(typeof EdgeRuntime=="string")return!0;if(!sT())return!1;if(pc(fc.fetch))return!0;let e=!1;const t=fc.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=pc(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){A&&_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Li(e){const t="fetch",n=hn(t,e);return mn(t,()=>Wm()),n}function aT(e){const t="fetch-body-resolved",n=hn(t,e);return mn(t,()=>Wm(uT)),n}function Wm(e){ln()&&!iT()||Pe(D,"fetch",function(t){return new Proxy(t,{apply(n,r,o){const s=new Error,{method:i,url:a}=lT(o),c={args:o,fetchData:{method:i,url:a},startTimestamp:fe()*1e3,virtualError:s,headers:dT(o)};return e||tt("fetch",{...c}),Reflect.apply(n,D,o).then(async u=>(e?e(u):tt("fetch",{...c,endTimestamp:fe()*1e3,response:u}),u),u=>{tt("fetch",{...c,endTimestamp:fe()*1e3,error:u}),Re(u)&&u.stack===void 0&&(u.stack=s.stack,pe(u,"framesToPop",1));const f=v()?.getOptions().enhanceFetchErrorMessages??"always";if(f!==!1&&Re(u)&&u.name==="TypeError"&&(u.message==="Failed to fetch"||u.message==="Load failed"||u.message==="NetworkError when attempting to fetch resource."))try{const h=new URL(c.fetchData.url,D.location?.href).host;h&&(f==="always"?u.message=`${u.message} (${h})`:pe(u,"__sentry_fetch_url_host__",h))}catch{}throw u})}})})}async function cT(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let s=!0;for(;s;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(i),a&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(i)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function uT(e){let t;try{t=e.clone()}catch{return}cT(t,()=>{tt("fetch-body-resolved",{endTimestamp:fe()*1e3,response:e})})}function hs(e,t){return rt(e)&&!!e[t]}function bd(e){return typeof e=="string"?e:e?hs(e,"url")?e.url:e.toString?e.toString():"":""}function lT(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:bd(n),method:hs(r,"method")?String(r.method).toUpperCase():jc(n)&&hs(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:bd(t),method:hs(t,"method")?String(t.method).toUpperCase():"GET"}}function dT(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(jc(t))return new Headers(t.headers)}catch{}}function zm(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}class gu{constructor(t){this._maxSize=t,this._cache=new Map}get size(){return this._cache.size}get(t){const n=this._cache.get(t);if(n!==void 0)return this._cache.delete(t),this._cache.set(t,n),n}set(t,n){if(this._cache.delete(t),this._cache.size>=this._maxSize){const r=this._cache.keys().next().value;this._cache.delete(r)}this._cache.set(t,n)}remove(t){const n=this._cache.get(t);return n&&this._cache.delete(t),n}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){const t=[];return this._cache.forEach(n=>t.push(n)),t}}function fT(e,t={},n=q()){const{message:r,name:o,email:s,url:i,source:a,associatedEventId:c,tags:u}=e,l={contexts:{feedback:{contact_email:s,name:o,message:r,url:i,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},f=n?.getClient()||v();return f&&f.emit("beforeSendFeedback",l,t),n.captureEvent(l,t)}function Pr(e,t,n,r,o){$s({level:e,message:t,attributes:n,severityNumber:o},r)}function pT(e,t,{scope:n}={}){Pr("trace",e,t,n)}function hT(e,t,{scope:n}={}){Pr("debug",e,t,n)}function mT(e,t,{scope:n}={}){Pr("info",e,t,n)}function gT(e,t,{scope:n}={}){Pr("warn",e,t,n)}function _T(e,t,{scope:n}={}){Pr("error",e,t,n)}function yT(e,t,{scope:n}={}){Pr("fatal",e,t,n)}const pL=Object.freeze(Object.defineProperty({__proto__:null,debug:hT,error:_T,fatal:yT,fmt:Ew,info:mT,trace:pT,warn:gT},Symbol.toStringTag,{value:"Module"}));function Hs(e,t,n){return"util"in D&&typeof D.util.format=="function"?D.util.format(...e):ST(e,t,n)}function ST(e,t,n){return e.map(r=>dt(r)?String(r):JSON.stringify(Te(r,t,n))).join(" ")}function jm(e){return/%[sdifocO]/.test(e)}function qm(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((o,s)=>{n[`sentry.message.parameter.${s}`]=o}),n}const bT="ConsoleLogs",vd={[re]:"auto.log.console"},vT=((e={})=>{const t=e.levels||pi;return{name:bT,setup(n){const{normalizeDepth:r=3,normalizeMaxBreadth:o=1e3}=n.getOptions(),s=mu(({args:i,level:a})=>{if(v()!==n||!t.includes(a))return;const c=i[0],u=i.slice(1);if(a==="assert"){if(!c){const d=u.length>0?`Assertion failed: ${Hs(u,r,o)}`:"Assertion failed";$s({level:"error",message:d,attributes:vd})}return}const l=a==="log",f={...vd};if(We(c)){Object.assign(f,Te(c,r,o));const d=typeof i[1]=="string"?2:1;i.slice(d).forEach((h,m)=>{f[`sentry.message.parameter.${m}`]=Te(h,r,o)})}else if(u.length>0&&typeof c=="string"&&!jm(c)){const p=qm(c,u);for(const[h,m]of Object.entries(p))f[h]=h.startsWith("sentry.message.parameter.")?Te(m,r,o):m}$s({level:l?"info":a,message:Hs(i,r,o),severityNumber:l?10:void 0,attributes:f})});n.registerCleanup(s)}}}),hL=vT;function _u(e,t,n,r){FE({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function yu(e,t=1,n){_u("counter",e,t,n)}function ET(e,t,n){_u("gauge",e,t,n)}function Ws(e,t,n){_u("distribution",e,t,n)}const mL=Object.freeze(Object.defineProperty({__proto__:null,count:yu,distribution:Ws,gauge:ET},Symbol.toStringTag,{value:"Module"})),wT=["trace","debug","info","warn","error","fatal"];function gL(e={}){const t=new Set(e.levels??wT),n=e.client;return{log(r){const{type:o,level:s,message:i,args:a,tag:c,date:u,...l}=r,f=n||v();if(!f)return;const d=kT(o,s);if(!t.has(d))return;const{normalizeDepth:p=3,normalizeMaxBreadth:h=1e3}=f.getOptions(),m={};for(const[y,S]of Object.entries(l))m[y]=Te(S,p,h);m["sentry.origin"]="auto.log.consola",c&&(m["consola.tag"]=c),o&&(m["consola.type"]=o),s!=null&&typeof s=="number"&&(m["consola.level"]=s);const g=CT(RT(a,p,h),p,h);g?.attributes&&Object.assign(m,g.attributes),$s({level:d,message:g?.message||i||a&&Hs(a,p,h)||"",attributes:m})}}}const TT={silent:"trace",fatal:"fatal",error:"error",warn:"warn",log:"info",info:"info",success:"info",fail:"error",ready:"info",start:"info",box:"info",debug:"debug",trace:"trace",verbose:"debug",critical:"fatal",notice:"info"},IT={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function kT(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=TT[e];if(n)return n}if(typeof t=="number"){const n=IT[t];if(n)return n}return"info"}function RT(e,t,n){if(!e?.length)return{message:""};const r=Hs(e,t,n),o=e[0];if(We(o)){const s=typeof e[1]=="string"?2:1,i=e.slice(s);return{message:r,attributes:o,messageParameters:i}}else{const s=e.slice(1),i=s.length>0&&typeof o=="string"&&!jm(o);return{message:r,messageTemplate:i?o:void 0,messageParameters:i?s:void 0}}}function CT(e,t,n){const{message:r,attributes:o,messageTemplate:s,messageParameters:i}=e,a={};if(s&&i){const c=qm(s,i);for(const[u,l]of Object.entries(c))a[u]=u.startsWith("sentry.message.parameter.")?Te(l,t,n):l}else i&&i.length>0&&i.forEach((c,u)=>{a[`sentry.message.parameter.${u}`]=Te(c,t,n)});return{message:r,attributes:{...Te(o,t,n),...a}}}const Ve=D,ue=Ve.document,Vr=Ve.navigator,Gm="Report a Bug",AT="Cancel",NT="Send Bug Report",xT="Confirm",MT="Report a Bug",OT="your.email@example.org",PT="Email",LT="What's the bug? What did you expect?",DT="Description",$T="Your Name",FT="Name",BT="Thank you for your report!",UT="(required)",HT="Add a screenshot",WT="Remove screenshot",zT="Highlight",jT="Hide",qT="Remove",Vm="Unable to submit feedback with empty message",Km="No client setup, cannot send feedback.",Ym="Unable to determine if Feedback was correctly sent.",Xm="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",Jm="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",GT="widget",VT="api",KT=5e3,YT={ERROR_EMPTY_MESSAGE:Vm,ERROR_NO_CLIENT:Km,ERROR_TIMEOUT:Ym,ERROR_FORBIDDEN:Xm,ERROR_GENERIC:Jm};function XT(e,t){return t?.[e]??YT[e]}function zr(e,t){return new Error(XT(e,t))}const JT=(e,t={includeReplay:!0})=>{const n=t.errorMessages;if(!e.message)throw zr("ERROR_EMPTY_MESSAGE",n);const r=v();if(!r)throw zr("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&q().setTags(e.tags);const o=fT({source:VT,url:QT(),...e},t);return new Promise((s,i)=>{const a=setTimeout(()=>{c(),i(zr("ERROR_TIMEOUT",n))},3e4),c=r.on("afterSendEvent",(u,l)=>{if(u.event_id===o)return clearTimeout(a),c(),l?.statusCode&&l.statusCode>=200&&l.statusCode<300?s(o):l?.statusCode===403?i(zr("ERROR_FORBIDDEN",n)):i(zr("ERROR_GENERIC",n))})})};function QT(){try{return Ve.document.location.href}catch{return""}}const ms=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ZT(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Vr.userAgent)||/Macintosh/i.test(Vr.userAgent)&&Vr.maxTouchPoints&&Vr.maxTouchPoints>1||!isSecureContext)}function Yo(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function eI(e){const t=ue.createElement("style");return t.textContent=`
|
|
19
|
+
.widget__actor {
|
|
20
|
+
position: fixed;
|
|
21
|
+
z-index: var(--z-index);
|
|
22
|
+
margin: var(--page-margin);
|
|
23
|
+
inset: var(--actor-inset);
|
|
24
|
+
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 8px;
|
|
28
|
+
padding: 16px;
|
|
29
|
+
|
|
30
|
+
font-family: inherit;
|
|
31
|
+
font-size: var(--font-size);
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
line-height: 1.14em;
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
|
|
36
|
+
background: var(--actor-background, var(--background));
|
|
37
|
+
border-radius: var(--actor-border-radius, 1.7em/50%);
|
|
38
|
+
border: var(--actor-border, var(--border));
|
|
39
|
+
box-shadow: var(--actor-box-shadow, var(--box-shadow));
|
|
40
|
+
color: var(--actor-color, var(--foreground));
|
|
41
|
+
fill: var(--actor-color, var(--foreground));
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
opacity: 1;
|
|
44
|
+
transition: transform 0.2s ease-in-out;
|
|
45
|
+
transform: translate(0, 0) scale(1);
|
|
46
|
+
}
|
|
47
|
+
.widget__actor[aria-hidden="true"] {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
visibility: hidden;
|
|
51
|
+
transform: translate(0, 16px) scale(0.98);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.widget__actor:hover {
|
|
55
|
+
background: var(--actor-hover-background, var(--background));
|
|
56
|
+
filter: var(--interactive-filter);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.widget__actor svg {
|
|
60
|
+
width: 1.14em;
|
|
61
|
+
height: 1.14em;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@media (max-width: 600px) {
|
|
65
|
+
.widget__actor span {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`,e&&t.setAttribute("nonce",e),t}function Ye(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const Kn=20,tI="http://www.w3.org/2000/svg";function nI(){const e=a=>Ve.document.createElementNS(tI,a),t=Ye(e("svg"),{width:`${Kn}`,height:`${Kn}`,viewBox:`0 0 ${Kn} ${Kn}`,fill:"var(--actor-color, var(--foreground))"}),n=Ye(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Ye(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const o=e("defs"),s=Ye(e("clipPath"),{id:"clip0_57_80"}),i=Ye(e("rect"),{width:`${Kn}`,height:`${Kn}`,fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}function rI({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const o=ue.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||Gm,o.appendChild(nI()),e){const i=ue.createElement("span");i.appendChild(ue.createTextNode(e)),o.appendChild(i)}const s=eI(r);return{el:o,appendToDom(){n.appendChild(s),n.appendChild(o)},removeFromDom(){o.remove(),s.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}const Qm="rgba(88, 74, 192, 1)",oI={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Qm,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},Ed={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Qm,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function wd(e){return`
|
|
70
|
+
--foreground: ${e.foreground};
|
|
71
|
+
--background: ${e.background};
|
|
72
|
+
--accent-foreground: ${e.accentForeground};
|
|
73
|
+
--accent-background: ${e.accentBackground};
|
|
74
|
+
--success-color: ${e.successColor};
|
|
75
|
+
--error-color: ${e.errorColor};
|
|
76
|
+
--border: ${e.border};
|
|
77
|
+
--box-shadow: ${e.boxShadow};
|
|
78
|
+
--outline: ${e.outline};
|
|
79
|
+
--interactive-filter: ${e.interactiveFilter};
|
|
80
|
+
`}function Td({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const o=ue.createElement("style");return o.textContent=`
|
|
81
|
+
:host {
|
|
82
|
+
--font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
|
|
83
|
+
--font-size: 14px;
|
|
84
|
+
--z-index: 100000;
|
|
85
|
+
|
|
86
|
+
--page-margin: 16px;
|
|
87
|
+
--inset: auto 0 0 auto;
|
|
88
|
+
--actor-inset: var(--inset);
|
|
89
|
+
|
|
90
|
+
font-family: var(--font-family);
|
|
91
|
+
font-size: var(--font-size);
|
|
92
|
+
|
|
93
|
+
${e!=="system"?`color-scheme: only ${e};`:""}
|
|
94
|
+
|
|
95
|
+
${wd(e==="dark"?{...Ed,...t}:{...oI,...n})}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
${e==="system"?`
|
|
99
|
+
@media (prefers-color-scheme: dark) {
|
|
100
|
+
:host {
|
|
101
|
+
color-scheme: only dark;
|
|
102
|
+
|
|
103
|
+
${wd({...Ed,...t})}
|
|
104
|
+
}
|
|
105
|
+
}`:""}
|
|
106
|
+
`,r&&o.setAttribute("nonce",r),o}const Zm=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:o="sentry-feedback",autoInject:s=!0,showBranding:i=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:l=!0,enableScreenshot:f=!0,useSentryUser:d={email:"email",name:"username"},tags:p,styleNonce:h,scriptNonce:m,colorScheme:g="system",themeLight:y={},themeDark:S={},addScreenshotButtonLabel:E=HT,cancelButtonLabel:b=AT,confirmButtonLabel:N=xT,emailLabel:I=PT,emailPlaceholder:k=OT,formTitle:R=MT,isRequiredLabel:B=UT,messageLabel:w=DT,messagePlaceholder:O=LT,nameLabel:M=FT,namePlaceholder:T=$T,removeScreenshotButtonLabel:$=WT,submitButtonLabel:x=NT,successMessageText:Y=BT,triggerLabel:X=Gm,triggerAriaLabel:P="",highlightToolText:K=zT,hideToolText:F=jT,removeHighlightText:Z=qT,errorEmptyMessageText:Se=Vm,errorNoClientText:ae=Km,errorTimeoutText:Be=Ym,errorForbiddenText:qt=Xm,errorGenericText:Ur=Jm,onFormOpen:zn,onFormClose:jn,onSubmitSuccess:Hr,onSubmitError:jo,onFormSubmitted:yn}={})=>{const gt={id:o,autoInject:s,showBranding:i,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:l,enableScreenshot:f,useSentryUser:d,tags:p,styleNonce:h,scriptNonce:m,colorScheme:g,themeDark:S,themeLight:y,triggerLabel:X,triggerAriaLabel:P,cancelButtonLabel:b,submitButtonLabel:x,confirmButtonLabel:N,formTitle:R,emailLabel:I,emailPlaceholder:k,messageLabel:w,messagePlaceholder:O,nameLabel:M,namePlaceholder:T,successMessageText:Y,isRequiredLabel:B,addScreenshotButtonLabel:E,removeScreenshotButtonLabel:$,highlightToolText:K,hideToolText:F,removeHighlightText:Z,errorEmptyMessageText:Se,errorNoClientText:ae,errorTimeoutText:Be,errorForbiddenText:qt,errorGenericText:Ur,onFormClose:jn,onFormOpen:zn,onSubmitError:jo,onSubmitSuccess:Hr,onFormSubmitted:yn};let et=null,Gt=null,Ke=[];const _t=ie=>{if(!et){const H=ue.createElement("div");H.id=String(ie.id),ue.body.appendChild(H),et=H.attachShadow({mode:"open"}),Gt=Td(ie),et.appendChild(Gt)}return et},qn=async ie=>{const H=ie.enableScreenshot&&ZT();let Ie,ee;try{Ie=(t?t():await e("feedbackModalIntegration",m))(),Al(Ie)}catch{throw ms&&_.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const Rt=H?n?n():await e("feedbackScreenshotIntegration",m):void 0;Rt&&(ee=Rt(),Al(ee))}catch{ms&&_.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const oe={ERROR_EMPTY_MESSAGE:ie.errorEmptyMessageText,ERROR_NO_CLIENT:ie.errorNoClientText,ERROR_TIMEOUT:ie.errorTimeoutText,ERROR_FORBIDDEN:ie.errorForbiddenText,ERROR_GENERIC:ie.errorGenericText},J=(Rt,Py)=>JT(Rt,{includeReplay:!0,...Py,errorMessages:oe}),$e=Ie.createDialog({options:{...ie,onFormClose:()=>{$e?.close(),ie.onFormClose?.()},onFormSubmitted:()=>{$e?.close(),ie.onFormSubmitted?.()}},screenshotIntegration:ee,sendFeedback:J,shadow:_t(ie)});return $e},Gn=(ie,H={})=>{const Ie=Yo(gt,H),ee=typeof ie=="string"?ue.querySelector(ie):typeof ie.addEventListener=="function"?ie:null;if(!ee)throw ms&&_.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let oe=null;const J=async()=>{oe||(oe=await qn({...Ie,onFormSubmitted:()=>{oe?.removeFromDom(),Ie.onFormSubmitted?.()}})),oe.appendToDom(),oe.open()};ee.addEventListener("click",J);const $e=()=>{Ke=Ke.filter(Rt=>Rt!==$e),oe?.removeFromDom(),oe=null,ee.removeEventListener("click",J)};return Ke.push($e),$e},Vt=(ie={})=>{const H=Yo(gt,ie),Ie=_t(H),ee=rI({triggerLabel:H.triggerLabel,triggerAriaLabel:H.triggerAriaLabel,shadow:Ie,styleNonce:h});return Gn(ee.el,{...H,onFormOpen(){ee.hide()},onFormClose(){ee.show()},onFormSubmitted(){ee.show()}}),ee};return{name:"Feedback",setupOnce(){!ln()||!gt.autoInject||(ue.readyState==="loading"?ue.addEventListener("DOMContentLoaded",()=>Vt().appendToDom()):Vt().appendToDom())},attachTo:Gn,createWidget(ie={}){const H=Vt(Yo(gt,ie));return H.appendToDom(),H},async createForm(ie={}){return qn(Yo(gt,ie))},setTheme(ie){if(gt.colorScheme=ie,et){const H=Td(gt);Gt?et.replaceChild(H,Gt):et.prepend(H),Gt=H}},remove(){et&&(et.parentElement?.remove(),et=null,Gt=null),Ke.forEach(ie=>ie()),Ke=[]}}});function _L(){return v()?.getIntegrationByName("Feedback")}var Di,ye,eg,Jt,Id,tg,ng,ba,gs,Jr,rg,Su,hc,mc,zs={},js=[],sI=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$i=Array.isArray;function Nt(e,t){for(var n in t)e[n]=t[n];return e}function bu(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function te(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?Di.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return _s(e,i,r,o,null)}function _s(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++eg,__i:-1,__u:0};return o==null&&ye.vnode!=null&&ye.vnode(s),s}function Ro(e){return e.children}function ys(e,t){this.props=e,this.context=t}function Bn(e,t){if(t==null)return e.__?Bn(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Bn(e):null}function iI(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],o=[],s=Nt({},t);s.__v=t.__v+1,ye.vnode&&ye.vnode(s),vu(e.__P,s,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??Bn(t),!!(32&t.__u),o),s.__v=t.__v,s.__.__k[s.__i]=s,cg(r,s,o),t.__e=t.__=null,s.__e!=n&&og(s)}}function og(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),og(e)}function kd(e){(!e.__d&&(e.__d=!0)&&Jt.push(e)&&!qs.__r++||Id!=ye.debounceRendering)&&((Id=ye.debounceRendering)||tg)(qs)}function qs(){try{for(var e,t=1;Jt.length;)Jt.length>t&&Jt.sort(ng),e=Jt.shift(),t=Jt.length,iI(e)}finally{Jt.length=qs.__r=0}}function sg(e,t,n,r,o,s,i,a,c,u,l){var f,d,p,h,m,g,y=r&&r.__k||js,S=t.length;for(c=aI(n,t,y,c,S),f=0;f<S;f++)(p=n.__k[f])!=null&&(d=p.__i!=-1&&y[p.__i]||zs,p.__i=f,g=vu(e,p,d,o,s,i,a,c,u,l),h=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Eu(d.ref,null,p),l.push(p.ref,p.__c||h,p)),m==null&&h!=null&&(m=h),4&p.__u?(c=ig(p,c,e),d.__e&&(d.__e=null)):typeof p.type=="function"&&g!==void 0?c=g:h&&(c=h.nextSibling),p.__u&=-7);return n.__e=m,c}function aI(e,t,n,r,o){var s,i,a,c,u,l=n.length,f=l,d=0;for(e.__k=new Array(o),s=0;s<o;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?i=e.__k[s]=_s(null,i,null,null,null):$i(i)?i=e.__k[s]=_s(Ro,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?i=e.__k[s]=_s(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):e.__k[s]=i,c=s+d,i.__=e,i.__b=e.__b+1,a=null,(u=i.__i=cI(i,n,c,f))!=-1&&(f--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>l?d--:o<l&&d++),typeof i.type!="function"&&(i.__u|=4)):u!=c&&(u==c-1?d--:u==c+1?d++:(u>c?d--:d++,i.__u|=4))):e.__k[s]=null;if(f)for(s=0;s<l;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=Bn(a)),lg(a,a));return r}function ig(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=ig(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=Bn(e)),t=n.insertBefore(e.__e,t||null));do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function cI(e,t,n,r){var o,s,i,a=e.key,c=e.type,u=t[n],l=u!=null&&(2&u.__u)==0;if(u===null&&a==null||l&&a==u.key&&c==u.type)return n;if(r>(l?1:0)){for(o=n-1,s=n+1;o>=0||s<t.length;)if((u=t[i=o>=0?o--:s++])!=null&&(2&u.__u)==0&&a==u.key&&c==u.type)return i}return-1}function Rd(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||sI.test(t)?n:n+"px"}function Xo(e,t,n,r,o){var s,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Rd(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Rd(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(rg,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n[Jr]=r[Jr]:(n[Jr]=Su,e.addEventListener(t,s?mc:hc,s)):e.removeEventListener(t,s?mc:hc,s);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Cd(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[gs]==null)t[gs]=Su++;else if(t[gs]<n[Jr])return;return n(ye.event?ye.event(t):t)}}}function vu(e,t,n,r,o,s,i,a,c,u){var l,f,d,p,h,m,g,y,S,E,b,N,I,k,R,B,w=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=t.__e=n.__e]),(l=ye.__b)&&l(t);e:if(typeof w=="function"){f=i.length;try{if(S=t.props,E=w.prototype&&w.prototype.render,b=(l=w.contextType)&&r[l.__c],N=l?b?b.props.value:l.__:r,n.__c?y=(d=t.__c=n.__c).__=d.__E:(E?t.__c=d=new w(S,N):(t.__c=d=new ys(S,N),d.constructor=w,d.render=lI),b&&b.sub(d),d.state||(d.state={}),d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),E&&d.__s==null&&(d.__s=d.state),E&&w.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Nt({},d.__s)),Nt(d.__s,w.getDerivedStateFromProps(S,d.__s))),h=d.props,m=d.state,d.__v=t,p)E&&w.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),E&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(E&&w.getDerivedStateFromProps==null&&S!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(S,N),t.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(S,d.__s,N)===!1){t.__v!=n.__v&&(d.props=S,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(O){O&&(O.__=t)}),js.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&i.push(d),a=Bn(n);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(S,d.__s,N),E&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,m,g)})}if(d.context=N,d.props=S,d.__P=e,d.__e=!1,I=ye.__r,k=0,E)d.state=d.__s,d.__d=!1,I&&I(t),l=d.render(d.props,d.state,d.context),js.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,I&&I(t),l=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++k<25);d.state=d.__s,d.getChildContext!=null&&(r=Nt(Nt({},r),d.getChildContext())),E&&!p&&d.getSnapshotBeforeUpdate!=null&&(g=d.getSnapshotBeforeUpdate(h,m)),R=l!=null&&l.type===Ro&&l.key==null?ug(l.props.children):l,a=sg(e,$i(R)?R:[R],t,n,r,o,s,i,a,c,u),d.base=t.__e,t.__u&=-161,d.__h.length&&i.push(d),y&&(d.__E=d.__=null)}catch(O){if(i.length=f,t.__v=null,c||s!=null){if(O.then){for(t.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s!=null&&(s[s.indexOf(a)]=null),t.__e=a}else if(s!=null)for(B=s.length;B--;)bu(s[B])}else t.__e=n.__e;t.__k==null&&(t.__k=n.__k||[]),O.then||ag(t),ye.__e(O,t,n)}}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=uI(n.__e,t,n,r,o,s,i,c,u);return(l=ye.diffed)&&l(t),128&t.__u?void 0:a}function ag(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ag))}function cg(e,t,n){for(var r=0;r<n.length;r++)Eu(n[r],n[++r],n[++r]);ye.__c&&ye.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){ye.__e(s,o.__v)}})}function ug(e){return typeof e!="object"||e==null||e.__b>0?e:$i(e)?e.map(ug):e.constructor!==void 0?null:Nt({},e)}function uI(e,t,n,r,o,s,i,a,c){var u,l,f,d,p,h,m,g=n.props||zs,y=t.props,S=t.type;if(S=="svg"?o="http://www.w3.org/2000/svg":S=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(u=0;u<s.length;u++)if((p=s[u])&&"setAttribute"in p==!!S&&(S?p.localName==S:p.nodeType==3)){e=p,s[u]=null;break}}if(e==null){if(S==null)return document.createTextNode(y);e=document.createElementNS(o,S,y.is&&y),a&&(ye.__m&&ye.__m(t,s),a=!1),s=null}if(S==null)g===y||a&&e.data==y||(e.data=y);else{if(s=S=="textarea"&&y.defaultValue!=null?null:s&&Di.call(e.childNodes),!a&&s!=null)for(g={},u=0;u<e.attributes.length;u++)g[(p=e.attributes[u]).name]=p.value;for(u in g)p=g[u],u=="dangerouslySetInnerHTML"?f=p:u=="children"||u in y||u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y||Xo(e,u,null,p,o);for(u in y)p=y[u],u=="children"?d=p:u=="dangerouslySetInnerHTML"?l=p:u=="value"?h=p:u=="checked"?m=p:a&&typeof p!="function"||g[u]===p||Xo(e,u,p,g[u],o);if(l)a||f&&(l.__html==f.__html||l.__html==e.innerHTML)||(e.innerHTML=l.__html),t.__k=[];else if(f&&(e.innerHTML=""),sg(t.type=="template"?e.content:e,$i(d)?d:[d],t,n,r,S=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&Bn(n,0),a,c),s!=null)for(u=s.length;u--;)bu(s[u]);a&&S!="textarea"||(u="value",S=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[u]||S=="progress"&&!h||S=="option"&&h!=g[u])&&Xo(e,u,h,g[u],o),u="checked",m!=null&&m!=e[u]&&Xo(e,u,m,g[u],o))}return e}function Eu(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){ye.__e(o,n)}}function lg(e,t,n){var r,o;if(ye.unmount&&ye.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Eu(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){ye.__e(s,t)}r.base=r.__P=r.__n=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&lg(r[o],t,n||typeof e.type!="function");n||bu(e.__e),e.__c=e.__=e.__e=void 0}function lI(e,t,n){return this.constructor(e,n)}function dI(e,t,n){var r,o,s,i;t==document&&(t=document.documentElement),ye.__&&ye.__(e,t),o=(r=!1)?null:t.__k,s=[],i=[],vu(t,e=t.__k=te(Ro,null,[e]),o||zs,zs,t.namespaceURI,o?null:t.firstChild?Di.call(t.childNodes):null,s,o?o.__e:t.firstChild,r,i),cg(s,e,i),e.props.children=null}Di=js.slice,ye={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},eg=0,ys.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Nt({},this.state),typeof e=="function"&&(e=e(Nt({},n),this.props)),e&&Nt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),kd(this))},ys.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),kd(this))},ys.prototype.render=Ro,Jt=[],tg=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ng=function(e,t){return e.__v.__b-t.__v.__b},qs.__r=0,ba=Math.random().toString(8),gs="__d"+ba,Jr="__a"+ba,rg=/(PointerCapture)$|Capture$/i,Su=0,hc=Cd(!1),mc=Cd(!0);var Ut,le,va,Ad,_r=0,dg=[],ve=ye,Nd=ve.__b,xd=ve.__r,Md=ve.diffed,Od=ve.__c,Pd=ve.unmount,Ld=ve.__;function Wn(e,t){ve.__h&&ve.__h(le,e,_r||t),_r=0;var n=le.__H||(le.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Rn(e){return _r=1,fg(hg,e)}function fg(e,t,n){var r=Wn(Ut++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):hg(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=le,!le.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var l=!1,f=r.__c.props!==a;if(r.__c.__H.__.some(function(p){if(p.__N){l=!0;var h=p.__[0];p.__=p.__N,p.__N=void 0,h!==p.__[0]&&(f=!0)}}),s){var d=s.call(this,a,c,u);return l?d||f:d}return!l||f};le.__f=!0;var s=le.shouldComponentUpdate,i=le.componentWillUpdate;le.componentWillUpdate=function(a,c,u){if(this.__e){var l=s;s=void 0,o(a,c,u),s=l}i&&i.call(this,a,c,u)},le.shouldComponentUpdate=o}return r.__N||r.__}function fI(e,t){var n=Wn(Ut++,3);!ve.__s&&wu(n.__H,t)&&(n.__=e,n.u=t,le.__H.__h.push(n))}function pg(e,t){var n=Wn(Ut++,4);!ve.__s&&wu(n.__H,t)&&(n.__=e,n.u=t,le.__h.push(n))}function pI(e){return _r=5,Co(function(){return{current:e}},[])}function hI(e,t,n){_r=6,pg(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function Co(e,t){var n=Wn(Ut++,7);return wu(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ar(e,t){return _r=8,Co(function(){return e},t)}function mI(e){var t=le.context[e.__c],n=Wn(Ut++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(le)),t.props.value):e.__}function gI(e,t){ve.useDebugValue&&ve.useDebugValue(t?t(e):e)}function _I(e){var t=Wn(Ut++,10),n=Rn();return t.__=e,le.componentDidCatch||(le.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function yI(){var e=Wn(Ut++,11);if(!e.__){for(var t=le.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function SI(){for(var e;e=dg.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ss),t.__h.some(gc),t.__h=[]}catch(n){t.__h=[],ve.__e(n,e.__v)}}}ve.__b=function(e){le=null,Nd&&Nd(e)},ve.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ld&&Ld(e,t)},ve.__r=function(e){xd&&xd(e),Ut=0;var t=(le=e.__c).__H;t&&(va===le?(t.__h=[],le.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(Ss),t.__h.some(gc),t.__h=[],Ut=0)),va=le},ve.diffed=function(e){Md&&Md(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(dg.push(t)!==1&&Ad===ve.requestAnimationFrame||((Ad=ve.requestAnimationFrame)||bI)(SI)),t.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),va=le=null},ve.__c=function(e,t){t.some(function(n){try{n.__h.some(Ss),n.__h=n.__h.filter(function(r){return!r.__||gc(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],ve.__e(r,n.__v)}}),Od&&Od(e,t)},ve.unmount=function(e){Pd&&Pd(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Ss(r)}catch(o){t=o}}),n.__H=void 0,t&&ve.__e(t,n.__v))};var Dd=typeof requestAnimationFrame=="function";function bI(e){var t,n=function(){clearTimeout(r),Dd&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Dd&&(t=requestAnimationFrame(n))}function Ss(e){var t=le,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),le=t}function gc(e){var t=le;e.__c=e.__(),le=t}function wu(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function hg(e,t){return typeof t=="function"?t(e):t}const vI=Object.defineProperty({__proto__:null,useCallback:ar,useContext:mI,useDebugValue:gI,useEffect:fI,useErrorBoundary:_I,useId:yI,useImperativeHandle:hI,useLayoutEffect:pg,useMemo:Co,useReducer:fg,useRef:pI,useState:Rn},Symbol.toStringTag,{value:"Module"}),EI="http://www.w3.org/2000/svg";function wI(){const e=r=>ue.createElementNS(EI,r),t=Ye(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Ye(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function TI({options:e}){const t=Co(()=>({__html:wI().outerHTML}),[]);return te("h2",{class:"dialog__header"},te("span",{class:"dialog__title"},e.formTitle),e.showBranding?te("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function II(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function Ea(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function kI({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail:a,showName:c,screenshotInput:u}){const{tags:l,addScreenshotButtonLabel:f,removeScreenshotButtonLabel:d,cancelButtonLabel:p,emailLabel:h,emailPlaceholder:m,isEmailRequired:g,isNameRequired:y,messageLabel:S,messagePlaceholder:E,nameLabel:b,namePlaceholder:N,submitButtonLabel:I,isRequiredLabel:k}=e,[R,B]=Rn(!1),[w,O]=Rn(null),[M,T]=Rn(!1),$=u?.input,[x,Y]=Rn(null),X=ar(F=>{Y(F),T(!1)},[]),P=ar(F=>{const Z=II(F,{emailLabel:h,isEmailRequired:g,isNameRequired:y,messageLabel:S,nameLabel:b});return Z.length>0?O(`Please enter in the following required fields: ${Z.join(", ")}`):O(null),Z.length===0},[h,g,y,S,b]),K=ar(async F=>{B(!0);try{if(F.preventDefault(),!(F.target instanceof HTMLFormElement))return;const Z=new FormData(F.target),Se=await(u&&M?u.value():void 0),ae={name:Ea(Z,"name"),email:Ea(Z,"email"),message:Ea(Z,"message"),attachments:Se?[Se]:void 0};if(!P(ae))return;try{const Be=await o({name:ae.name,email:ae.email,message:ae.message,source:GT,tags:l},{attachments:ae.attachments});s(ae,Be)}catch(Be){ms&&_.error(Be);const qt=Be;O(qt.message),i(qt)}}finally{B(!1)}},[u&&M,s,i]);return te("form",{class:"form",onSubmit:K},$&&M?te($,{onError:X}):null,te("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:R},te("div",{class:"form__top"},w?te("div",{class:"form__error-container"},w):null,c?te("label",{for:"name",class:"form__label"},te(wa,{label:b,isRequiredLabel:k,isRequired:y}),te("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:N,required:y,type:"text"})):te("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?te("label",{for:"email",class:"form__label"},te(wa,{label:h,isRequiredLabel:k,isRequired:g}),te("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:m,required:g,type:"email"})):te("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),te("label",{for:"message",class:"form__label"},te(wa,{label:S,isRequiredLabel:k,isRequired:!0}),te("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:E,required:!0,rows:5})),$?te("label",{for:"screenshot",class:"form__label"},te("button",{class:"btn btn--default",disabled:R,type:"button",onClick:()=>{Y(null),T(F=>!F)}},M?d:f),x?te("div",{class:"form__error-container"},x.message):null):null),te("div",{class:"btn-group"},te("button",{class:"btn btn--primary",disabled:R,type:"submit"},I),te("button",{class:"btn btn--default",disabled:R,type:"button",onClick:r},p))))}function wa({label:e,isRequired:t,isRequiredLabel:n}){return te("span",{class:"form__label__text"},e,t&&te("span",{class:"form__label__text--required"},n))}const Jo=16,$d=17,RI="http://www.w3.org/2000/svg";function CI(){const e=c=>Ve.document.createElementNS(RI,c),t=Ye(e("svg"),{width:`${Jo}`,height:`${$d}`,viewBox:`0 0 ${Jo} ${$d}`,fill:"inherit"}),n=Ye(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Ye(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=Ye(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const s=e("defs"),i=Ye(e("clipPath"),{id:"clip0_57_156"}),a=Ye(e("rect"),{width:`${Jo}`,height:`${Jo}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function AI({open:e,onFormSubmitted:t,...n}){const r=n.options,o=Co(()=>({__html:CI().outerHTML}),[]),[s,i]=Rn(null),a=ar(()=>{s&&(clearTimeout(s),i(null)),t()},[s]),c=ar((u,l)=>{n.onSubmitSuccess(u,l),i(setTimeout(()=>{t(),i(null)},KT))},[t]);return te(Ro,null,s?te("div",{class:"success__position",onClick:a},te("div",{class:"success__content"},r.successMessageText,te("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):te("dialog",{class:"dialog",onClick:r.onFormClose,open:e},te("div",{class:"dialog__position"},te("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},te(TI,{options:r}),te(kI,{...n,onSubmitSuccess:c})))))}const NI=`
|
|
107
|
+
.dialog {
|
|
108
|
+
position: fixed;
|
|
109
|
+
z-index: var(--z-index);
|
|
110
|
+
margin: 0;
|
|
111
|
+
inset: 0;
|
|
112
|
+
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
padding: 0;
|
|
117
|
+
height: 100vh;
|
|
118
|
+
width: 100vw;
|
|
119
|
+
|
|
120
|
+
color: var(--dialog-color, var(--foreground));
|
|
121
|
+
fill: var(--dialog-color, var(--foreground));
|
|
122
|
+
line-height: 1.75em;
|
|
123
|
+
|
|
124
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
125
|
+
border: none;
|
|
126
|
+
inset: 0;
|
|
127
|
+
opacity: 1;
|
|
128
|
+
transition: opacity 0.2s ease-in-out;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.dialog__position {
|
|
132
|
+
position: fixed;
|
|
133
|
+
z-index: var(--z-index);
|
|
134
|
+
inset: var(--dialog-inset);
|
|
135
|
+
padding: var(--page-margin);
|
|
136
|
+
display: flex;
|
|
137
|
+
max-height: calc(100vh - (2 * var(--page-margin)));
|
|
138
|
+
}
|
|
139
|
+
@media (max-width: 600px) {
|
|
140
|
+
.dialog__position {
|
|
141
|
+
inset: var(--page-margin);
|
|
142
|
+
padding: 0;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.dialog__position:has(.editor) {
|
|
147
|
+
inset: var(--page-margin);
|
|
148
|
+
padding: 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.dialog:not([open]) {
|
|
152
|
+
opacity: 0;
|
|
153
|
+
pointer-events: none;
|
|
154
|
+
visibility: hidden;
|
|
155
|
+
}
|
|
156
|
+
.dialog:not([open]) .dialog__content {
|
|
157
|
+
transform: translate(0, -16px) scale(0.98);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.dialog__content {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
gap: 16px;
|
|
164
|
+
padding: var(--dialog-padding, 24px);
|
|
165
|
+
max-width: 100%;
|
|
166
|
+
width: 100%;
|
|
167
|
+
max-height: 100%;
|
|
168
|
+
overflow: auto;
|
|
169
|
+
|
|
170
|
+
background: var(--dialog-background, var(--background));
|
|
171
|
+
border-radius: var(--dialog-border-radius, 20px);
|
|
172
|
+
border: var(--dialog-border, var(--border));
|
|
173
|
+
box-shadow: var(--dialog-box-shadow, var(--box-shadow));
|
|
174
|
+
transform: translate(0, 0) scale(1);
|
|
175
|
+
transition: transform 0.2s ease-in-out;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
`,xI=`
|
|
179
|
+
.dialog__header {
|
|
180
|
+
display: flex;
|
|
181
|
+
gap: 4px;
|
|
182
|
+
justify-content: space-between;
|
|
183
|
+
font-weight: var(--dialog-header-weight, 600);
|
|
184
|
+
margin: 0;
|
|
185
|
+
}
|
|
186
|
+
.dialog__title {
|
|
187
|
+
align-self: center;
|
|
188
|
+
width: var(--form-width, 272px);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@media (max-width: 600px) {
|
|
192
|
+
.dialog__title {
|
|
193
|
+
width: auto;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.dialog__position:has(.editor) .dialog__title {
|
|
198
|
+
width: auto;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
.brand-link {
|
|
203
|
+
display: inline-flex;
|
|
204
|
+
}
|
|
205
|
+
.brand-link:focus-visible {
|
|
206
|
+
outline: var(--outline);
|
|
207
|
+
}
|
|
208
|
+
`,MI=`
|
|
209
|
+
.form {
|
|
210
|
+
display: flex;
|
|
211
|
+
overflow: auto;
|
|
212
|
+
flex-direction: row;
|
|
213
|
+
gap: 16px;
|
|
214
|
+
flex: 1 0;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.form fieldset {
|
|
218
|
+
border: none;
|
|
219
|
+
margin: 0;
|
|
220
|
+
padding: 0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.form__right {
|
|
224
|
+
flex: 0 0 auto;
|
|
225
|
+
display: flex;
|
|
226
|
+
overflow: auto;
|
|
227
|
+
flex-direction: column;
|
|
228
|
+
justify-content: space-between;
|
|
229
|
+
gap: 20px;
|
|
230
|
+
width: var(--form-width, 100%);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.dialog__position:has(.editor) .form__right {
|
|
234
|
+
width: var(--form-width, 272px);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.form__top {
|
|
238
|
+
display: flex;
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
gap: 8px;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.form__error-container {
|
|
244
|
+
color: var(--error-color);
|
|
245
|
+
fill: var(--error-color);
|
|
246
|
+
width: 0;
|
|
247
|
+
min-width: 100%;
|
|
248
|
+
overflow-wrap: break-word;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.form__label {
|
|
252
|
+
display: flex;
|
|
253
|
+
flex-direction: column;
|
|
254
|
+
gap: 4px;
|
|
255
|
+
margin: 0px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.form__label__text {
|
|
259
|
+
display: flex;
|
|
260
|
+
gap: 4px;
|
|
261
|
+
align-items: center;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.form__label__text--required {
|
|
265
|
+
font-size: 0.85em;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.form__input {
|
|
269
|
+
font-family: inherit;
|
|
270
|
+
line-height: inherit;
|
|
271
|
+
background: transparent;
|
|
272
|
+
box-sizing: border-box;
|
|
273
|
+
border: var(--input-border, var(--border));
|
|
274
|
+
border-radius: var(--input-border-radius, 6px);
|
|
275
|
+
color: var(--input-color, inherit);
|
|
276
|
+
fill: var(--input-color, inherit);
|
|
277
|
+
font-size: var(--input-font-size, inherit);
|
|
278
|
+
font-weight: var(--input-font-weight, 500);
|
|
279
|
+
padding: 6px 12px;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.form__input::placeholder {
|
|
283
|
+
opacity: 0.65;
|
|
284
|
+
color: var(--input-placeholder-color, inherit);
|
|
285
|
+
filter: var(--interactive-filter);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.form__input:focus-visible {
|
|
289
|
+
outline: var(--input-focus-outline, var(--outline));
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.form__input--textarea {
|
|
293
|
+
font-family: inherit;
|
|
294
|
+
resize: vertical;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.error {
|
|
298
|
+
color: var(--error-color);
|
|
299
|
+
fill: var(--error-color);
|
|
300
|
+
}
|
|
301
|
+
`,OI=`
|
|
302
|
+
.btn-group {
|
|
303
|
+
display: grid;
|
|
304
|
+
gap: 8px;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.btn {
|
|
308
|
+
line-height: inherit;
|
|
309
|
+
border: var(--button-border, var(--border));
|
|
310
|
+
border-radius: var(--button-border-radius, 6px);
|
|
311
|
+
cursor: pointer;
|
|
312
|
+
font-family: inherit;
|
|
313
|
+
font-size: var(--button-font-size, inherit);
|
|
314
|
+
font-weight: var(--button-font-weight, 600);
|
|
315
|
+
padding: var(--button-padding, 6px 16px);
|
|
316
|
+
}
|
|
317
|
+
.btn[disabled] {
|
|
318
|
+
opacity: 0.6;
|
|
319
|
+
pointer-events: none;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.btn--primary {
|
|
323
|
+
color: var(--button-primary-color, var(--accent-foreground));
|
|
324
|
+
fill: var(--button-primary-color, var(--accent-foreground));
|
|
325
|
+
background: var(--button-primary-background, var(--accent-background));
|
|
326
|
+
border: var(--button-primary-border, var(--border));
|
|
327
|
+
border-radius: var(--button-primary-border-radius, 6px);
|
|
328
|
+
font-weight: var(--button-primary-font-weight, 500);
|
|
329
|
+
}
|
|
330
|
+
.btn--primary:hover {
|
|
331
|
+
color: var(--button-primary-hover-color, var(--accent-foreground));
|
|
332
|
+
fill: var(--button-primary-hover-color, var(--accent-foreground));
|
|
333
|
+
background: var(--button-primary-hover-background, var(--accent-background));
|
|
334
|
+
filter: var(--interactive-filter);
|
|
335
|
+
}
|
|
336
|
+
.btn--primary:focus-visible {
|
|
337
|
+
background: var(--button-primary-hover-background, var(--accent-background));
|
|
338
|
+
filter: var(--interactive-filter);
|
|
339
|
+
outline: var(--button-primary-focus-outline, var(--outline));
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.btn--default {
|
|
343
|
+
color: var(--button-color, var(--foreground));
|
|
344
|
+
fill: var(--button-color, var(--foreground));
|
|
345
|
+
background: var(--button-background, var(--background));
|
|
346
|
+
border: var(--button-border, var(--border));
|
|
347
|
+
border-radius: var(--button-border-radius, 6px);
|
|
348
|
+
font-weight: var(--button-font-weight, 500);
|
|
349
|
+
}
|
|
350
|
+
.btn--default:hover {
|
|
351
|
+
color: var(--button-color, var(--foreground));
|
|
352
|
+
fill: var(--button-color, var(--foreground));
|
|
353
|
+
background: var(--button-hover-background, var(--background));
|
|
354
|
+
filter: var(--interactive-filter);
|
|
355
|
+
}
|
|
356
|
+
.btn--default:focus-visible {
|
|
357
|
+
background: var(--button-hover-background, var(--background));
|
|
358
|
+
filter: var(--interactive-filter);
|
|
359
|
+
outline: var(--button-focus-outline, var(--outline));
|
|
360
|
+
}
|
|
361
|
+
`,PI=`
|
|
362
|
+
.success__position {
|
|
363
|
+
position: fixed;
|
|
364
|
+
inset: var(--dialog-inset);
|
|
365
|
+
padding: var(--page-margin);
|
|
366
|
+
z-index: var(--z-index);
|
|
367
|
+
}
|
|
368
|
+
.success__content {
|
|
369
|
+
background: var(--success-background, var(--background));
|
|
370
|
+
border: var(--success-border, var(--border));
|
|
371
|
+
border-radius: var(--success-border-radius, 1.7em/50%);
|
|
372
|
+
box-shadow: var(--success-box-shadow, var(--box-shadow));
|
|
373
|
+
font-weight: var(--success-font-weight, 600);
|
|
374
|
+
color: var(--success-color);
|
|
375
|
+
fill: var(--success-color);
|
|
376
|
+
padding: 12px 24px;
|
|
377
|
+
line-height: 1.75em;
|
|
378
|
+
|
|
379
|
+
display: grid;
|
|
380
|
+
align-items: center;
|
|
381
|
+
grid-auto-flow: column;
|
|
382
|
+
gap: 6px;
|
|
383
|
+
cursor: default;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.success__icon {
|
|
387
|
+
display: flex;
|
|
388
|
+
}
|
|
389
|
+
`;function LI(e){const t=ue.createElement("style");return t.textContent=`
|
|
390
|
+
:host {
|
|
391
|
+
--dialog-inset: var(--inset);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
${NI}
|
|
395
|
+
${xI}
|
|
396
|
+
${MI}
|
|
397
|
+
${OI}
|
|
398
|
+
${PI}
|
|
399
|
+
`,e&&t.setAttribute("nonce",e),t}function DI(){const e=q().getUser(),t=me().getUser(),n=or().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const $I=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=DI(),a=ue.createElement("div"),c=LI(e.styleNonce);let u="";const l={get el(){return a},appendToDom(){!o.contains(c)&&!o.contains(a)&&(o.appendChild(c),o.appendChild(a))},removeFromDom(){a.remove(),c.remove(),ue.body.style.overflow=u},open(){d(!0),e.onFormOpen?.(),v()?.emit("openFeedbackWidget"),u=ue.body.style.overflow,ue.body.style.overflow="hidden"},close(){d(!1),ue.body.style.overflow=u}},f=t?.createInput({h:te,hooks:vI,dialog:l,options:e}),d=p=>{dI(te(AI,{options:e,screenshotInput:f,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(s&&i?.[s.name]||""),defaultEmail:String(s&&i?.[s.email]||""),onFormClose:()=>{d(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(h,m)=>{d(!1),e.onSubmitSuccess?.(h,m)},onSubmitError:h=>{e.onSubmitError?.(h)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:p}),a)};return l}}));function FI({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}function BI(e){const t=ue.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
|
|
400
|
+
.editor {
|
|
401
|
+
display: flex;
|
|
402
|
+
flex-grow: 1;
|
|
403
|
+
flex-direction: column;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.editor__image-container {
|
|
407
|
+
justify-items: center;
|
|
408
|
+
padding: 15px;
|
|
409
|
+
position: relative;
|
|
410
|
+
height: 100%;
|
|
411
|
+
border-radius: var(--menu-border-radius, 6px);
|
|
412
|
+
|
|
413
|
+
background-color: ${n};
|
|
414
|
+
background-image: repeating-linear-gradient(
|
|
415
|
+
-145deg,
|
|
416
|
+
transparent,
|
|
417
|
+
transparent 8px,
|
|
418
|
+
${n} 8px,
|
|
419
|
+
${n} 11px
|
|
420
|
+
),
|
|
421
|
+
repeating-linear-gradient(
|
|
422
|
+
-45deg,
|
|
423
|
+
transparent,
|
|
424
|
+
transparent 15px,
|
|
425
|
+
${r} 15px,
|
|
426
|
+
${r} 16px
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.editor__canvas-container {
|
|
431
|
+
width: 100%;
|
|
432
|
+
height: 100%;
|
|
433
|
+
position: relative;
|
|
434
|
+
display: flex;
|
|
435
|
+
align-items: center;
|
|
436
|
+
justify-content: center;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.editor__canvas-container > * {
|
|
440
|
+
object-fit: contain;
|
|
441
|
+
position: absolute;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.editor__tool-container {
|
|
445
|
+
padding-top: 8px;
|
|
446
|
+
display: flex;
|
|
447
|
+
justify-content: center;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.editor__tool-bar {
|
|
451
|
+
display: flex;
|
|
452
|
+
gap: 8px;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.editor__tool {
|
|
456
|
+
display: flex;
|
|
457
|
+
padding: 8px 12px;
|
|
458
|
+
justify-content: center;
|
|
459
|
+
align-items: center;
|
|
460
|
+
border: var(--button-border, var(--border));
|
|
461
|
+
border-radius: var(--button-border-radius, 6px);
|
|
462
|
+
background: var(--button-background, var(--background));
|
|
463
|
+
color: var(--button-color, var(--foreground));
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.editor__tool--active {
|
|
467
|
+
background: var(--button-primary-background, var(--accent-background));
|
|
468
|
+
color: var(--button-primary-color, var(--accent-foreground));
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.editor__rect {
|
|
472
|
+
position: absolute;
|
|
473
|
+
z-index: 2;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.editor__rect button {
|
|
477
|
+
opacity: 0;
|
|
478
|
+
position: absolute;
|
|
479
|
+
top: -12px;
|
|
480
|
+
right: -12px;
|
|
481
|
+
cursor: pointer;
|
|
482
|
+
padding: 0;
|
|
483
|
+
z-index: 3;
|
|
484
|
+
border: none;
|
|
485
|
+
background: none;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.editor__rect:hover button {
|
|
489
|
+
opacity: 1;
|
|
490
|
+
}
|
|
491
|
+
`,e&&t.setAttribute("nonce",e),t}function UI({h:e}){return function({action:n,setAction:r,options:o}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},o.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},o.hideToolText)))}}const HI=2,WI=300;function zI(e,t){return new Promise(n=>{const r=setTimeout(n,t);let o=e;const s=()=>{if(o-=1,o>0){Ve.requestAnimationFrame(s);return}clearTimeout(r),n()};Ve.requestAnimationFrame(s)})}function jI({hooks:e}){function t(){const[n,r]=e.useState(Ve.devicePixelRatio??1);return e.useEffect(()=>{const o=()=>{r(Ve.devicePixelRatio)},s=matchMedia(`(resolution: ${Ve.devicePixelRatio}dppx)`);return s.addEventListener("change",o),()=>{s.removeEventListener("change",o)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:o,onAfterScreenshot:s,onError:i}){const a=t();e.useEffect(()=>{(async()=>{r(),await zI(HI,WI);const u=await Vr.mediaDevices.getDisplayMedia({video:{width:Ve.innerWidth*a,height:Ve.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),l=ue.createElement("video");await new Promise((f,d)=>{l.srcObject=u,l.onloadedmetadata=()=>{o(l,a),u.getTracks().forEach(p=>p.stop()),f()},l.play().catch(d)}),s()})().catch(i)},[])}}function qI(e,t,n){switch(e.type){case"highlight":{t.save(),t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h),t.restore();break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function Qt(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function Ta(e,t){Qt(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function Ia(e,t,n){Qt(e,{alpha:!0},(r,o)=>{n.length&&(o.fillStyle="rgba(0, 0, 0, 0.25)",o.fillRect(0,0,r.width,r.height)),n.forEach(s=>{qI(s,o,t)})})}function GI({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=jI({hooks:t}),i=UI({h:e}),a=FI({h:e}),c={__html:BI(o.styleNonce).innerText},u=r.el.style,l=({screenshot:f})=>{const[d,p]=t.useState("highlight"),[h,m]=t.useState([]),g=t.useRef(null),y=t.useRef(null),S=t.useRef(null),E=t.useRef(null),[b,N]=t.useState(1),I=t.useMemo(()=>{const M=ue.getElementById(o.id);if(!M)return"white";const T=getComputedStyle(M);return T.getPropertyValue("--button-primary-background")||T.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const M=()=>{const T=g.current;T&&(Qt(f.canvas,{alpha:!1},$=>{const x=Math.min(T.clientWidth/$.width,T.clientHeight/$.height);N(x)}),(T.clientHeight===0||T.clientWidth===0)&&setTimeout(M,0))};return M(),Ve.addEventListener("resize",M),()=>{Ve.removeEventListener("resize",M)}},[f]);const k=t.useCallback((M,T)=>{Qt(M,{alpha:!0},($,x)=>{x.scale(T,T),$.width=f.canvas.width,$.height=f.canvas.height})},[f]);t.useEffect(()=>{k(y.current,f.dpi),Ta(y.current,f.canvas)},[f]),t.useEffect(()=>{k(S.current,f.dpi),Qt(S.current,{alpha:!0},(M,T)=>{T.clearRect(0,0,M.width,M.height)}),Ia(S.current,I,h)},[h,I]),t.useEffect(()=>{k(n,f.dpi),Ta(n,f.canvas),Qt(ue.createElement("canvas"),{alpha:!0},(M,T)=>{T.scale(f.dpi,f.dpi),M.width=f.canvas.width,M.height=f.canvas.height,Ia(M,I,h),Ta(n,M)})},[h,f,I]);const R=M=>{if(!d||!E.current)return;const T=E.current.getBoundingClientRect(),$={type:d,x:(M.clientX-T.x)/b,y:(M.clientY-T.y)/b},x=(P,K)=>{const F=(K.clientX-T.x)/b,Z=(K.clientY-T.y)/b;return{type:P.type,x:Math.min(P.x,F),y:Math.min(P.y,Z),w:Math.abs(F-P.x),h:Math.abs(Z-P.y)}},Y=P=>{Qt(S.current,{alpha:!0},(K,F)=>{F.clearRect(0,0,K.width,K.height)}),Ia(S.current,I,[...h,x($,P)])},X=P=>{const K=x($,P);K.w*b>=1&&K.h*b>=1&&m(F=>[...F,K]),ue.removeEventListener("mousemove",Y),ue.removeEventListener("mouseup",X)};ue.addEventListener("mousemove",Y),ue.addEventListener("mouseup",X)},B=t.useCallback(M=>T=>{T.preventDefault(),T.stopPropagation(),m($=>{const x=[...$];return x.splice(M,1),x})},[]),w={width:`${f.canvas.width*b}px`,height:`${f.canvas.height*b}px`},O=M=>{M.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:g},e("canvas",{ref:y,id:"background",style:w}),e("canvas",{ref:S,id:"foreground",style:w}),e("div",{ref:E,onMouseDown:R,style:w},h.map((M,T)=>e("div",{key:T,class:"editor__rect",style:{top:`${M.y*b}px`,left:`${M.x*b}px`,width:`${M.w*b}px`,height:`${M.h*b}px`}},e("button",{"aria-label":o.removeHighlightText,onClick:B(T),onMouseDown:O,onMouseUp:O,type:"button"},e(a,null))))))),e(i,{options:o,action:d,setAction:p}))};return function({onError:d}){const[p,h]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((m,g)=>{Qt(ue.createElement("canvas"),{alpha:!1},(y,S)=>{S.scale(g,g),y.width=m.videoWidth,y.height=m.videoHeight,S.drawImage(m,0,0,y.width,y.height),h({canvas:y,dpi:g})}),n.width=m.videoWidth,n.height=m.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(m=>{u.display="block",d(m)},[])}),p?e(l,{screenshot:p}):e("div",null)}}const VI=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=ue.createElement("canvas");return{input:GI({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const s=await new Promise(i=>{o.toBlob(i,"image/png")});if(s)return{data:new Uint8Array(await s.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}));let mg=-1;const Lr=()=>mg,Dr=e=>{addEventListener("pageshow",t=>{t.persisted&&(mg=t.timeStamp,e(t))},!0)},Xe=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o??0),(s||o===void 0)&&(o=t.value,t.delta=s,t.rating=((a,c)=>a>c[1]?"poor":a>c[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Tu=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},Iu=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Ao=()=>Iu()?.activationStart??0;let In=-1;const gg=new Set,Fd=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,_c=e=>{if(document.visibilityState==="hidden"){if(e.type==="visibilitychange")for(const t of gg)t();isFinite(In)||(In=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("prerenderingchange",_c,!0))}},co=(e=!1)=>{if(e&&(In=1/0),In<0){const t=Ao();In=(document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(r=>r.name==="hidden"&&r.startTime>=t)?.startTime)??Fd(),addEventListener("visibilitychange",_c,!0),addEventListener("prerenderingchange",_c,!0),Dr(()=>{setTimeout(()=>{In=Fd()})})}return{get firstHiddenTime(){return In},onHidden(t){gg.add(t)}}},ot=(e,t=-1,n,r=0,o,s,i)=>{const a=Iu(),c=a?.navigationId||0;let u="navigate";return n?u=n:Lr()>=0?u="back-forward-cache":a&&(document.prerendering||Ao()>0?u="prerender":document.wasDiscarded?u="restore":a.type&&(u=a.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:u,navigationId:r||c,navigationInteractionId:o,navigationURL:s||a?.name,navigationStartTime:i||0}},Bd=new WeakMap;function Fi(e,t){let n=Bd.get(t);return n||(n=new WeakMap,Bd.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}class KI{t;i=0;o=[];h(t){if(t.hadRecentInput)return;const n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),this.t?.(t)}}const Un=(e,t,n={})=>{try{const r=e.filter(o=>PerformanceObserver.supportedEntryTypes.includes(o));if(r.length>0){const o=new PerformanceObserver(s=>{queueMicrotask(()=>{const i=s.getEntries();r.length>1&&i.sort((a,c)=>a.startTime+a.duration-(c.startTime+c.duration)),t(i)})});for(const s of r)o.observe({type:s,buffered:!0,...n});return o}}catch{}},No=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint=="function"&&e&&e.reportSoftNavs,_g=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const n=e.keys().next().value;n!==void 0&&e.delete(n)}},yg=e=>{let t=!1;return()=>{t||(e(),t=!0)}};class YI{l}const Bi=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},ka=[1800,3e3],Sg=(e,t={})=>{const n=No(t);Bi(()=>{const r=Fi(t,YI),o=co();let s,i=ot("FCP");const a=Un(["paint"],c=>{for(const u of c)u.name==="first-contentful-paint"&&(a.disconnect(),u.startTime<o.firstHiddenTime&&(i.value=Math.max(u.startTime-Ao(),0),i.entries.push(u),i.navigationId=u.navigationId||i.navigationId,s(!0)))});a&&(s=Xe(e,i,ka,t.reportAllChanges),Dr(c=>{i=ot("FCP",-1,"back-forward-cache",i.navigationId,i.navigationInteractionId,i.navigationURL,Lr()),s=Xe(e,i,ka,t.reportAllChanges),Tu(()=>{i.value=performance.now()-c.timeStamp,s(!0)})})),n&&Un(["soft-navigation"],c=>{c.forEach(u=>{r.l&&u.navigationId&&_g(r.l,u);const l=Math.max((u.presentationTime||u.paintTime||0)-u.startTime,0);i=ot("FCP",l,"soft-navigation",u.navigationId,u.interactionId,u.name,u.startTime),s=Xe(e,i,ka,t.reportAllChanges),s(!0)})},t)})},Ud=[.1,.25],XI=(e,t={})=>{const n=co();Sg(yg(()=>{let r,o=ot("CLS",0);const s=Fi(t,KI),i=(d,p,h,m,g)=>{o=ot("CLS",0,d,p,h,m,g),s.i=0,r=Xe(e,o,Ud,t.reportAllChanges)},a=(d=!1)=>{s.i>o.value&&(o.value=s.i,o.entries=s.o),r(d)},c=d=>{a(!0),i("soft-navigation",d.navigationId,d.interactionId,d.name,d.startTime)},u=d=>{for(const p of d)p.entryType!=="soft-navigation"?s.h(p):c(p);a()},l=["layout-shift"];No(t)&&l.push("soft-navigation");const f=Un(l,u);f&&(r=Xe(e,o,Ud,t.reportAllChanges),n.onHidden(()=>{u(f.takeRecords()),r(!0)}),Dr(()=>{i("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,Lr()),Tu(r)}),setTimeout(r))}))};let bg=0,Ra=1/0,Qo=0;const JI=e=>{for(const t of e)t.interactionId&&(Ra=Math.min(Ra,t.interactionId),Qo=Math.max(Qo,t.interactionId),bg=Qo?(Qo-Ra)/7+1:0)};let yc;const Hd=()=>yc?bg:performance.interactionCount??0,QI=()=>{"interactionCount"in performance||yc||(yc=Un(["event"],JI,{durationThreshold:0}))};class ZI{u=0;v=[];m=new Map;p;T;_(){return Hd()-this.u}M(){this.u=Hd(),this.v.length=0,this.m.clear()}L(t){const n=this._(),r=Math.min(this.v.length-1,Math.floor(n/50));return!n||r!==-1||t!=="soft-navigation"&&t!=="back-forward-cache"?this.v[r]:{P:8,id:-1,entries:[]}}h(t){if(this.p?.(t),!t.interactionId)return;const n=this.v.at(-1);let r=this.m.get(t.interactionId);if(r||this.v.length<10||t.duration>n.P){if(r?t.duration>r.P?(r.entries=[t],r.P=t.duration):t.duration===r.P&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],P:t.duration},this.m.set(r.id,r),this.v.push(r)),this.v.sort((o,s)=>s.P-o.P),this.v.length>10){const o=this.v.splice(10);for(const s of o)this.m.delete(s.id)}this.T?.(r)}}}const vg=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,r=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState==="hidden")e();else{const o=yg(e);let s=-1;const i=()=>{r(s),o()};addEventListener("visibilitychange",i,{once:!0,capture:!0}),s=n(()=>{removeEventListener("visibilitychange",i,{capture:!0}),o()},{timeout:t})}},Wd=[200,500],ek=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=co();Bi(()=>{QI();let r,o=ot("INP");const s=Fi(t,ZI),i=(d,p,h,m,g)=>{s.M(),o=ot("INP",-1,d,p,h,m,g),r=Xe(e,o,Wd,t.reportAllChanges)},a=()=>{const d=s.L(o.navigationType);d&&d.P!==o.value&&(o.value=d.P,o.entries=d.entries,r())},c=d=>{a(),r(!0),i("soft-navigation",d.navigationId,d.interactionId,d.name,d.startTime)},u=(d,p=!1)=>{vg(()=>{for(const h of d)h.entryType!=="soft-navigation"?s.h(h):c(h);a(),p&&r(!0)})},l=["event","first-input"];No(t)&&l.push("soft-navigation");const f=Un(l,u,{...t,durationThreshold:t.durationThreshold??40});r=Xe(e,o,Wd,t.reportAllChanges),f&&(n.onHidden(()=>{u(f.takeRecords(),!0)}),Dr(()=>{i("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,Lr())}))})};class tk{p;l;h(t){this.p?.(t)}}const Ca=[2500,4e3],nk=(e,t={})=>{let n=!1;const r=No(t);Bi(()=>{let o,s=co(),i=ot("LCP");const a=Fi(t,tk),c=(p,h,m,g,y)=>{i=ot("LCP",-1,p,h,m,g,y),o=Xe(e,i,Ca,t.reportAllChanges),n=!1,p==="soft-navigation"&&(s=co(!0))},u=p=>{a.l&&p.navigationId&&_g(a.l,p),n||o(!0),c("soft-navigation",p.navigationId,p.interactionId,p.name,p.startTime);const h=p.getLargestInteractionContentfulPaint?.();h&&l([h])},l=p=>{t.reportAllChanges||r||(p=p.slice(-1));for(const h of p){if(!h)continue;if(h.entryType==="soft-navigation"){u(h);continue}let m=0,g=[],y=h.startTime;if(h.entryType==="largest-contentful-paint")m=Math.max(h.startTime-Ao(),0),a.h(h),g=[h];else if(h.entryType==="interaction-contentful-paint"){const S=h;if(!i.navigationId||"interactionId"in S&&S.interactionId!=i.navigationInteractionId)continue;y=S.largestContentfulPaint?.renderTime||0,m=Math.max(y-h.startTime,0),S.largestContentfulPaint&&(a.h(S.largestContentfulPaint),g=[S.largestContentfulPaint])}y<s.firstHiddenTime&&(i.value=m,i.entries=g,o())}},f=["largest-contentful-paint"];r&&f.push("interaction-contentful-paint","soft-navigation");const d=Un(f,l);if(d){o=Xe(e,i,Ca,t.reportAllChanges);const p=["keydown","click","visibilitychange"],h=m=>{if(m.isTrusted&&!n){const g=i.id;vg(()=>{if(!n){if(!r){d.disconnect();for(const y of p)removeEventListener(y,h,{capture:!0})}g===i.id&&(n=!0,o(!0))}})}};for(const m of p)addEventListener(m,h,{capture:!0});Dr(m=>{c("back-forward-cache",i.navigationId,i.navigationInteractionId,i.navigationURL,Lr()),o=Xe(e,i,Ca,t.reportAllChanges),Tu(()=>{i.value=performance.now()-m.timeStamp,n=!0,o(!0)})})}})},Aa=[800,1800],Sc=e=>{document.prerendering?Bi(()=>Sc(e)):document.readyState!=="complete"?addEventListener("load",()=>Sc(e),!0):setTimeout(e)},rk=(e,t={})=>{const n=No(t);let r=ot("TTFB"),o=Xe(e,r,Aa,t.reportAllChanges);Sc(()=>{const s=Iu();if(s){const i=s.responseStart;r.value=Math.max(i-Ao(),0),r.entries=[s],o(!0),Dr(()=>{r=ot("TTFB",0,"back-forward-cache",r.navigationId,r.navigationInteractionId,r.navigationURL,Lr()),o=Xe(e,r,Aa,t.reportAllChanges),o(!0)}),n&&Un(["soft-navigation"],a=>{a.forEach(c=>{c.navigationId&&(r=ot("TTFB",0,"soft-navigation",c.navigationId,c.interactionId,c.name,c.startTime),r.entries=[c],o=Xe(e,r,Aa,t.reportAllChanges),o(!0))})},t)}})},Me=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Qr={},Gs={};let Eg,wg,Tg,Ig,kg;const Rg={};let yr=!1,Ui=!1;function ok(){yr=!0}function sk(){Ui=!0}function Vs(e,t=!1){return Mo("cls",e,ck,Eg,t)}function Ks(e,t=!1){return Mo("lcp",e,uk,wg,t)}function ik(e){return Mo("ttfb",e,lk,Tg)}function ak(e){return Mo("fcp",e,dk,kg)}function bc(e){return Mo("inp",e,fk,Ig)}function ut(e,t){return Cg(e,t),Gs[e]||(pk(e),Gs[e]=!0),Ag(e,t)}function $r(e,t){const n=Qr[e];if(n?.length)for(const r of n)try{r(t)}catch(o){Me&&_.error(`Error while triggering instrumentation handler.
|
|
492
|
+
Type: ${e}
|
|
493
|
+
Name: ${Dt(r)}
|
|
494
|
+
Error:`,o)}}function xo(e){return t=>{!Ui&&t.navigationType==="back-forward-cache"||e(t)}}function ck(){return XI(xo(e=>{$r("cls",{metric:e}),Eg=e}),{reportAllChanges:!yr&&!Ui,reportSoftNavs:yr})}function uk(){return nk(xo(e=>{$r("lcp",{metric:e}),wg=e}),{reportAllChanges:!yr&&!Ui,reportSoftNavs:yr})}function lk(){return rk(xo(e=>{$r("ttfb",{metric:e}),Tg=e}))}function dk(){return Sg(xo(e=>{$r("fcp",{metric:e}),kg=e}))}function fk(){return ek(xo(e=>{$r("inp",{metric:e}),Ig=e}),{reportSoftNavs:yr})}function Mo(e,t,n,r,o=!1){return Cg(e,t),Gs[e]||(Gs[e]=!0,Promise.resolve().then(()=>{Rg[e]=n()})),r&&t({metric:r}),Ag(e,t,o)}function pk(e){const t={type:e,buffered:!0};e==="event"&&(t.durationThreshold=0);try{PerformanceObserver.supportedEntryTypes.includes(e)&&new PerformanceObserver(r=>{Promise.resolve().then(()=>{$r(e,{entries:r.getEntries()})})}).observe(t)}catch{}}function Cg(e,t){Qr[e]=Qr[e]||[],Qr[e].push(t)}function Ag(e,t,n=!1){return()=>{n&&Rg[e]?.();const r=Qr[e];if(!r)return;const o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function Ng(e){return"duration"in e}const j=D,xg=5,hk=5;let Zo,es,jr;const Kr=new gu(xg),Mg=new gu(xg);let zd=!1;function jd(e,t){return Math.abs(e-t)<=hk}function Og(){try{return PerformanceObserver.supportedEntryTypes.includes("soft-navigation")&&typeof j.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint=="function"}catch{return!1}}function mk(e){if(zd||!Og())return;zd=!0;const t=r=>{r.isTrusted&&(jr=r.timeStamp)};j.addEventListener("click",t,{capture:!0,passive:!0}),j.addEventListener("keydown",t,{capture:!0,passive:!0}),e.on("spanStart",r=>{if(ne(r).attributes?.[U]!=="navigation")return;Zo=void 0;const o=jr;if(o!=null){if(es?.interactionTimestamp===o){Kr.set(es.interactionId,r),es=void 0;return}Zo={span:r,interactionTimestamp:o}}});const n=({entries:r})=>{for(const o of r){if(!Ng(o)||!o.interactionId)continue;const s=Zo;if(s&&jd(o.startTime,s.interactionTimestamp)){Kr.set(o.interactionId,s.span),Zo=void 0;continue}Kr.get(o.interactionId)||jr!=null&&jd(o.startTime,jr)&&(es={interactionId:o.interactionId,interactionTimestamp:jr})}};ut("event",n),ut("first-input",n),ut("soft-navigation",({entries:r})=>{for(const o of r){const s=Kr.get(o.interactionId);if(!s){Me&&_.log(`[SoftNav] No navigation span found for soft navigation ${o.navigationId}`,o);continue}Mg.set(o.navigationId,s),s.setAttribute(Lp,o.navigationId)}})}function gk(e){if(e.navigationType!=="soft-navigation")return;const t=Mg.get(e.navigationId);return t||(e.navigationInteractionId!=null?Kr.get(e.navigationInteractionId):void 0)}function Na(e){return typeof e=="number"&&isFinite(e)}function Ht(e,t,n,{...r}){const o=xe(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),dn(e,()=>{const s=bt({startTime:t,...r});return s&&s.end(n),s})}function Fr(){return j.addEventListener&&j.performance}function lt(e){return e/1e3}function _k(e){let t="unknown",n="unknown",r="";for(const o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function Pg(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Lg(e){const t={};if(e.nextHopProtocol!=null){const{name:r,version:o}=_k(e.nextHopProtocol);t["network.protocol.version"]=o,t["network.protocol.name"]=r}if(De(e.startTime)===void 0)return t;const n=r=>r&&De(r,e.startTime);return yk({...t,"http.request.redirect_start":n(e.redirectStart),"http.request.redirect_end":n(e.redirectEnd),"http.request.worker_start":n(e.workerStart),"http.request.fetch_start":n(e.fetchStart),"http.request.domain_lookup_start":n(e.domainLookupStart),"http.request.domain_lookup_end":n(e.domainLookupEnd),"http.request.connect_start":n(e.connectStart),"http.request.secure_connection_start":n(e.secureConnectionStart),"http.request.connection_end":n(e.connectEnd),"http.request.request_start":n(e.requestStart),"http.request.response_start":n(e.responseStart),"http.request.response_end":n(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?lt(e.responseStart):void 0})}function yk(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const Sk=2147483647;let qd=0;function bk(){ut("longtask",({entries:e})=>{const t=he();if(!t)return;const{attributes:n,start_timestamp:r}=ne(t);for(const o of e){const s=De(o.startTime);if(!s)continue;const i=lt(o.duration);n[U]==="navigation"&&r&&s<r||Ht(t,s,s+i,{name:Yh,op:Wv,attributes:{[re]:"auto.ui.browser.metrics"}})}})}function vk(){new PerformanceObserver(t=>{const n=he();if(n)for(const r of t.getEntries()){const o=De(r.startTime);if(!o||!r.scripts[0])continue;const{start_timestamp:s,attributes:{[U]:i}}=ne(n);if(i==="navigation"&&s&&o<s)continue;const a=lt(r.duration),c={[re]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:l,invokerType:f,sourceURL:d,sourceFunctionName:p,sourceCharPosition:h}=u;c["browser.script.invoker"]=l,c["browser.script.invoker_type"]=f,d&&(c[xS]=d),p&&(c[MS]=p),h!==-1&&(c["browser.script.source_char_position"]=h),Ht(n,o,o+a,{name:Yh,op:zv,attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function Ek(e,t){const n=Fr();if(!n?.getEntries)return;const{spanStreamingEnabled:r,ignoreResourceSpans:o}=t,s=n.getEntries(),{attributes:i,start_timestamp:a}=ne(e);s.slice(qd).forEach(c=>{const u=De(c.startTime);if(!u)return;const l=lt(Math.max(0,c.duration));if(!(i[U]==="navigation"&&a&&u<a))switch(c.entryType){case"navigation":{Tk(e,c,r);break}case"paint":{wk(e,c,u,l);break}case"resource":{Ck(e,c,c.name,u,l,o,r);break}}}),qd=Math.max(s.length-1,0),Ak(e,r)}function wk(e,t,n,r){Ht(e,n,n+r,{name:t.name,attributes:{[U]:Uv,[re]:"auto.resource.browser.metrics",[AS]:t.name}})}function Tk(e,t,n){Yt(e,t,"unloadEvent",n),Yt(e,t,"redirect",n),Yt(e,t,"domContentLoadedEvent",n),Yt(e,t,"loadEvent",n),Yt(e,t,"connect",n),Yt(e,t,"secureConnection",n),Yt(e,t,"fetch",n),Yt(e,t,"domainLookup",n),Rk(e,t,n)}function Zr(e,t){return De(t,e.startTime)}const Ik={secureConnection:Uh,fetch:Hh,domainLookup:Wh,unloadEvent:Lh,redirect:Dh,connect:Bh,domContentLoadedEvent:$h,loadEvent:Fh};function Yt(e,t,n,r){const o=kk(n),s=t[o],i=t[`${n}Start`];if(!i||!s)return;const a=Ik[n],c=be(t.name);Ht(e,Zr(t,i),Zr(t,s),{name:r?sc[a]:c,attributes:{[U]:a,[re]:"auto.ui.browser.metrics",[Fe]:c,...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function kk(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function Rk(e,t,n){const r=Zr(t,t.requestStart),o=Zr(t,t.responseEnd),s=Zr(t,t.responseStart);if(t.responseEnd){const i=be(t.name);Ht(e,r,o,{name:n?sc[rc]:i,attributes:{[U]:rc,[re]:"auto.ui.browser.metrics",[Fe]:i}}),Ht(e,s,o,{name:n?sc[oc]:i,attributes:{[U]:oc,[re]:"auto.ui.browser.metrics",[Fe]:i}})}}function Ck(e,t,n,r,o,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:Bv;if(s?.includes(a))return;const c={[re]:"auto.resource.browser.metrics"},u=An(n);u.protocol&&(c[ib]=u.protocol.split(":").pop());const l=u.host?.replace(/^.*@/,"");l&&(c[Si]=l);const f=l?.replace(/:\d+$/,"");f&&(c[bi]=f),c[FS]=n.includes(j.location.origin);const d=be(n);c[Fe]=d,Nk(t,c,[["responseStatus",US],["transferSize",BS],["encodedBodySize",Bp],["decodedBodySize","http.response.body.decoded_size"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const p={...c,...Lg(t)},h=r+o;Ht(e,r,h,{name:i?f||Xv:d.replace(j.location.origin,""),op:a,attributes:p})}function Ak(e,t){const n=j.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?HS:"effectiveConnectionType",r.effectiveType),r.type&&e.setAttribute(t?zS:"connectionType",r.type),Na(r.rtt)&&(t?e.setAttribute(WS,r.rtt):ne(e).attributes[U]==="pageload"&&Ah("connection.rtt",r.rtt,"millisecond"))),Na(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),Na(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function Nk(e,t,n){n.forEach(([r,o])=>{const s=e[r];s!=null&&(typeof s=="number"&&s<Sk||typeof s=="string")&&(t[o]=s)})}const xk=80,wn={};try{typeof Node<"u"&&(wn.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),typeof Element<"u"&&(wn.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,wn.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,wn.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,wn.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<"u"&&(wn.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function Xt(e,t,n){const r=wn[t];if(r)try{return r.call(e,n)}catch{}const o=e[t];return typeof o=="function"?o.call(e,n):o}function Qe(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=a.length;let u;const l=Array.isArray(t)?t:t.keyAttrs,f=Array.isArray(t)?void 0:t.maskAttributeFn,d=!Array.isArray(t)&&t.maxStringLength||xk;for(;n&&s++<r&&(u=Mk(n,l,f),!(u==="html"||s>1&&i+o.length*c+u.length>=d));)o.push(u),i+=u.length,n=Xt(n,"parentNode");return o.reverse().join(a)}catch{return"<unknown>"}}function Mk(e,t,n){const r=[],o=Xt(e,"tagName");if(!o)return"";if(typeof HTMLElement<"u"&&e instanceof HTMLElement){const i=Xt(e,"dataset");if(i){if(i.sentryComponent)return n?n("data-sentry-component",i.sentryComponent,e):i.sentryComponent;if(i.sentryElement)return n?n("data-sentry-element",i.sentryElement,e):i.sentryElement}}r.push(o.toLowerCase());const s=t?.length?t.filter(i=>Xt(e,"getAttribute",i)).map(i=>[i,Xt(e,"getAttribute",i)]):null;if(s?.length)s.forEach(([i,a])=>{r.push(`[${i}="${n&&a?n(i,a,e):a}"]`)});else{const i=Xt(e,"id");i&&r.push(`#${n?n("id",i,e):i}`);const a=Xt(e,"className");if(a&&nt(a)){const c=(n?n("class",a,e):a).split(/\s+/);for(const u of c)r.push(`.${u}`)}}for(const i of["aria-label","type","name","title","alt"]){const a=Xt(e,"getAttribute",i);a&&r.push(`[${i}="${n?n(i,a,e):a}"]`)}return r.join("")}const Ok=6e4;function ku(e){return e!=null&&e>0&&e<=Ok}function Ys(e,t,n){j.document&&j.addEventListener(e,t,n)}function Dg(e,t,n){j.document&&j.removeEventListener(e,t,n)}const Ru=(e=!0)=>{const t=j.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Cu=()=>Ru()?.activationStart??0,Pk=e=>{Ys("visibilitychange",n=>{j.document?.visibilityState==="hidden"&&e(n)},{capture:!0})};let cr=-1;const $g=new Set,Lk=()=>j.document?.visibilityState==="hidden"&&!j.document?.prerendering?0:1/0,vc=e=>{if(j.document?.visibilityState==="hidden"&&cr>-1){if(e.type==="visibilitychange")for(const t of $g)t();isFinite(cr)||(cr=e.type==="visibilitychange"?e.timeStamp:0,Dg("prerenderingchange",vc,!0))}},Dk=()=>{if(j.document&&cr<0){const e=Cu();cr=(j.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??Lk(),Ys("visibilitychange",vc,!0),Ys("prerenderingchange",vc,!0)}return{get firstHiddenTime(){return cr},onHidden(e){$g.add(e)}}},$k=e=>{const t=j.requestIdleCallback||j.setTimeout;if(j.document?.visibilityState==="hidden")e();else{let n=!1;const r=()=>{n||(e(),n=!0)};Ys("visibilitychange",r,{once:!0,capture:!0}),t(()=>{r(),Dg("visibilitychange",r,{capture:!0})})}};let He={},qe,Xs,uo;function Fk({trackCls:e,trackLcp:t}){if(Fr()&&Ar()){const r=t?Uk():void 0,o=e?Bk():void 0,s=Hk(),i=Wk(),a=zk();return()=>{s(),i(),a(),r?.(),o?.()}}return()=>{}}function Bk(){return Vs(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(He.cls={value:e.value,unit:""},Xs=t)},!0)}function Uk(){return Ks(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!ku(e.value)||(He.lcp={value:e.value,unit:"millisecond"},qe=t)},!0)}function Hk(){return ik(({metric:e})=>{uo=e.navigationType,e.entries[e.entries.length-1]&&(He.ttfb={value:e.value,unit:"millisecond"})})}function Wk(){return ak(({metric:e})=>{uo=e.navigationType,He.fcp={value:e.value,unit:"millisecond"}})}function zk(){return ut("paint",({entries:e})=>{const t=Dk();for(const n of e)n.name==="first-paint"&&n.startTime<t.firstHiddenTime&&(He.fp={value:n.startTime,unit:"millisecond"})})}function jk(e,t){const n=Ar();if(!Fr()?.getEntries||!n){Gd();return}const{spanStreamingEnabled:r,recordClsOnPageloadSpan:o,recordLcpOnPageloadSpan:s}=t,i=lt(n);if(ne(e).attributes[U]==="pageload"){if(Vk(He),Gk(He),r){const a=(c,u,l)=>{const f=l??`browser.web_vital.${c}.value`;e.setAttribute(f,u),Me&&_.log("Setting web vital attribute",{[f]:u},"on pageload span")};["ttfb","fp","fcp"].forEach(c=>{He[c]&&a(c,He[c].value)}),He["ttfb.requestTime"]&&a("ttfb.requestTime",He["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else o||delete He.cls,s||delete He.lcp,Object.entries(He).forEach(([a,c])=>{Ah(a,c.value,c.unit,e)}),qk(e,t);uo&&e.setAttribute(_i,uo),e.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",i),e.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",Cu())}Gd()}function Gd(){qe=void 0,Xs=void 0,uo=void 0,He={}}function qk(e,t){qe&&t.recordLcpOnPageloadSpan&&(qe.element&&e.setAttribute("lcp.element",Qe(qe.element)),qe.id&&e.setAttribute("lcp.id",qe.id),qe.url&&e.setAttribute("lcp.url",be(qe.url.trim()).slice(0,200)),qe.loadTime!=null&&e.setAttribute("lcp.loadTime",qe.loadTime),qe.renderTime!=null&&e.setAttribute("lcp.renderTime",qe.renderTime),e.setAttribute("lcp.size",qe.size)),Xs?.sources&&t.recordClsOnPageloadSpan&&Xs.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Qe(n.node)))}function Gk(e){const t=e.fp;t&&(t.value=Math.max(t.value-Cu(),0))}function Vk(e){const t=Ru(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const Kk="ElementTiming",Yk=(()=>({name:Kk,setup(){!Fr()||!Ar()||ut("element",({entries:t})=>{for(const n of t){const r=n;if(!r.identifier)continue;const o=r.identifier,s=r.name,i=r.renderTime,a=r.loadTime,c={"sentry.origin":"auto.ui.browser.element_timing","ui.element.identifier":o};s&&(c["ui.element.paint_type"]=s),r.id&&(c["ui.element.id"]=r.id),r.element&&(c["ui.element.type"]=r.element.tagName.toLowerCase()),r.url&&(c["ui.element.url"]=be(r.url)),r.naturalWidth&&(c["ui.element.width"]=r.naturalWidth),r.naturalHeight&&(c["ui.element.height"]=r.naturalHeight),i>0&&Ws("ui.element.render_time",i,{unit:"millisecond",attributes:c}),a>0&&Ws("ui.element.load_time",a,{unit:"millisecond",attributes:c})}})}})),yL=Yk,xa=[],bs=new Map,Js="<unknown>",bn=new Map,Xk=60,Au={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Jk(e){return e!=null?bs.get(e):void 0}function Qk(){const e=Object.keys(Au);ln()&&e.forEach(o=>{j.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){const s=o.target;if(!s)return;const i=Qe(s),a=Math.round(o.timeStamp);if(!(!i||i===Js)&&!bn.has(a)&&(bn.set(a,i),bn.size>50)){const c=bn.keys().next().value;c!==void 0&&bn.delete(c)}}function n(o){const s=Math.round(o.startTime);let i=bn.get(s);if(!i)for(let a=-5;a<=5;a++){const c=bn.get(s+a);if(c){i=c;break}}return i||Js}const r=({entries:o})=>{const s=he(),i=s&&Ce(s);o.forEach(a=>{if(!Ng(a))return;const c=a.interactionId;if(c==null||bs.has(c))return;const u=a.target?Qe(a.target):n(a);if(xa.length>10){const l=xa.shift();bs.delete(l)}xa.push(c),bs.set(c,{span:i,elementName:u})})};ut("event",r),ut("first-input",r)}const Zk=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function Fg(){const e=j.navigator;return e?.userAgent?Zk.test(e.userAgent):!1}function Br(e,t=5){if(!D.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}const eR="Interactions",tR=((e={})=>({name:eR,setup(t){if(Fg())return;const n={name:void 0,source:void 0,routeId:void 0,urlTemplate:void 0,httpRoute:void 0,urlPath:void 0,urlFull:void 0};let r;function o(s){const{name:i,attributes:a}=ne(s);n.name=i,n.source=a[eb]||a[ce],n.routeId=a[Hp],n.urlTemplate=a[je],n.httpRoute=a[Up],n.urlPath=a[vi],n.urlFull=a[Fe]}t.on("spanStart",s=>{nR(s)&&(r=s,o(s))}),t.on("spanEnd",s=>{s===r&&(r=void 0,o(s))}),rR(t,n,()=>r,e),oR(t)}})),SL=tR;function nR(e){if(Ce(e)!==e)return!1;const t=ne(e).attributes[U];return t==="pageload"||t==="navigation"}function rR(e,t,n,r){if(!j.document)return;let o;addEventListener("click",()=>{if(n()){Me&&_.warn(`[Tracing] Did not create ${ua} span because a pageload or navigation span is in progress.`);return}if(o&&(o.setAttribute(sr,"interactionInterrupted"),o.end(),o=void 0),!t.name){Me&&_.warn(`[Tracing] Did not create ${ua} span because the latest route name is missing.`);return}const s=V(e),i=t.routeId||t.urlTemplate||t.httpRoute,a=i||Qv,c=!i||t.routeId?"custom":"route";o=Mh({name:s?a:t.name,attributes:{[U]:ua,[ce]:s?c:t.source||"url",[re]:"auto.browser.interactions",...s&&{[Nr]:a},...t.routeId&&{[Hp]:t.routeId},...t.urlTemplate&&{[je]:t.urlTemplate},...t.httpRoute&&{[Up]:t.httpRoute},...t.urlPath&&{[vi]:t.urlPath},...t.urlFull&&{[Fe]:be(t.urlFull)}}},r)},{capture:!0})}function oR(e){ut("event",({entries:t})=>{const n=he();if(n){for(const r of t)if(r.name==="click"){const o=De(r.startTime);if(!o)continue;const s=lt(r.duration),i=Qe(r.target),a=Br(r.target),u={name:V(e)?a||Xh:i,startTime:o,attributes:{[U]:Ds,[re]:"auto.browser.interactions",...i&&i!==Js&&{[Kc]:i}}};a&&(u.attributes[Pt]=a),Ht(n,o,o+s,u)}}})}function Wt(){try{return j.document?.location.href??""}catch{return""}}const Bg=new WeakMap;function sR(e,t=v()){if(!t){Me&&_.warn("Cannot set a route provider without a client.");return}Me&&Nu(t)&&_.warn("A route provider is already registered for this client and will be replaced. Routes only the previous provider knows about will no longer resolve."),Bg.set(t,e)}function Nu(e=v()){return e&&Bg.get(e)}function bL(e,t=v()){const n=Nu(t);if(!n)return;const r=typeof e=="string"?Ug(e):e;if(r)return wt(Me?"Route provider threw while resolving a route:":"",()=>n.resolveRoute(r)||void 0,()=>{})}function iR(e=v()){const t=Nu(e);return wt(Me?"Route provider threw while resolving a route:":"",()=>t?.resolveCurrentRoute()||void 0,()=>{})}function aR(e){return{resolveRoute:e,resolveCurrentRoute:()=>{const t=Ug(Wt());return t&&e(t)}}}function vL(e=50){const t=new gu(e);return{...aR(n=>t.get(n.pathname)),record(n,r){n&&r&&t.set(n,r)}}}function Ug(e){return e?Dn(e,Wt()||void 0):void 0}const cR="UserTiming",uR=((e={})=>({name:cR,setup(t){const n=Fr();if(!n?.getEntries)return;let r=0;t.on("beforeIdleSpanEnd",o=>{const{attributes:s,start_timestamp:i}=ne(o),a=s[U];if(a!=="pageload"&&a!=="navigation")return;const c=Ru(!1)?.requestStart??0,u=n.getEntries();for(const l of u.slice(r)){if(l.entryType!=="mark"&&l.entryType!=="measure")continue;const f=De(l.startTime);if(!f||a==="navigation"&&i&&f<i)continue;const d=De(l.startTime+Math.max(0,l.duration),l.startTime),p=De(c,l.startTime);lR(o,l,f,d,p,e.ignore??[])}r=u.length})}})),EL=uR;function lR(e,t,n,r,o,s){if(dR(t)||jt(t.name,s))return;const i=Math.max(n,o),a={[re]:`auto.browser.user_timing.${t.entryType}`};i!==n&&(a["sentry.browser.measure_happened_before_request"]=!0,a["sentry.browser.measure_start_time"]=i),fR(a,t),i<=r&&Ht(e,i,r,{name:t.name,op:t.entryType,attributes:a})}function dR(e){if(e.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function fR(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,o]of Object.entries(n))if(o&&dt(o))e[`sentry.browser.measure.detail.${r}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(o)}catch{}return}if(dt(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function xu(e){const{name:t,op:n,origin:r,metricName:o,value:s,attributes:i,parentSpan:a,startTime:c,endTime:u,standalone:l,softNavigationId:f,navigationType:d}=e,p=a&&Ce(a),h=p?ne(p).name:q().getScopeData().transactionName,m={[re]:r,[U]:n,[So]:0,[`browser.web_vital.${o}.value`]:s,[rb]:h,[Nr]:h,[jp]:j.navigator?.userAgent,...i};a&&ne(a).attributes[U]==="pageload"&&(m["sentry.pageload.span_id"]=a.spanContext().spanId),f!=null&&(m[Lp]=f),d&&(m[_i]=d),l&&Object.assign(m,pR());const g=bt({name:t,attributes:m,startTime:c,parentSpan:a,experimental:l?{standalone:!0}:void 0});g&&g.end(u??c)}function pR(){const e=v()?.getIntegrationByName("Replay"),t=e?.getReplayId(!0);return t?{[YS]:t,"sentry._internal.replay_is_buffering":e.getRecordingMode()==="buffer"?!0:void 0}:{}}function Hg(e,t){let n,r=!1;function o(){!r&&n&&t(n),r=!0}Pk(()=>{o()});const s=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(o(),s(),i())}),i=e.on("afterStartPageLoadSpan",a=>{n=a,i()})}const hR={click:Ds,hover:jv,drag:qv,press:Gv},mR={click:Xh,hover:Zv,drag:eE,press:tE};function Mu(e,t,n){let r;e.on("afterStartPageLoadSpan",s=>{r=s});let o;e.on("spanStart",s=>{const i=ne(s).attributes;i?.[U]===Mr&&i[_i]==="back-forward-cache"&&(o=s)}),t(({metric:s})=>{const i=gk(s);if(s.navigationType==="soft-navigation"){i?n(s,i,s.navigationId):Me&&_.log(`[SoftNav] Dropping ${s.name} for uncorrelated soft navigation ${s.navigationId}`);return}if(s.navigationType==="back-forward-cache"){n(s,o,void 0);return}n(s,r,void 0)})}function gR(e,t=!1){if(!Pg("largest-contentful-paint"))return;if(t){Mu(e,Ks,(i,a,c)=>{const u=i.entries[i.entries.length-1];Vd(i.value,u,a,c,i.navigationType,i.navigationStartTime)});return}let n=0,r,o;const s=Ks(({metric:i})=>{o=i.navigationType;const a=i.entries[i.entries.length-1];!a||!ku(i.value)||(n=i.value,r=a)},!0);Hg(e,i=>{Vd(n,r,i,void 0,o),s()})}function Vd(e,t,n,r,o,s){if(!ku(e))return;Me&&_.log(`Sending LCP span (${e})`);const i=s||0,a=De(i)??lt(i),c=t?De(t.startTime,i)??lt(t.startTime):a+lt(e),u=t?Qe(t.element):void 0,l=t?.element?Br(t.element):null,f=v(),p=!!f&&V(f)?l||zl:u??zl,h={};u&&(h["browser.web_vital.lcp.element"]=u),l&&(h[Pt]=l),t?.id&&(h["browser.web_vital.lcp.id"]=t.id),t?.url&&(h["browser.web_vital.lcp.url"]=be(t.url,f)),t?.loadTime!=null&&(h["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(h["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(h["browser.web_vital.lcp.size"]=t.size),xu({name:p,op:Vv,origin:"auto.ui.browser.lcp",metricName:"lcp",value:e,attributes:h,parentSpan:n,startTime:a,endTime:c,softNavigationId:r,navigationType:o})}function _R(e,t=!1){if(!Pg("layout-shift"))return;if(t){Mu(e,Vs,(i,a,c)=>{const u=i.entries[i.entries.length-1];Kd(i.value,u,a,c,i.navigationType,i.navigationStartTime)});return}let n=0,r,o;const s=Vs(({metric:i})=>{o=i.navigationType;const a=i.entries[i.entries.length-1];a&&(n=i.value,r=a)},!0);Hg(e,i=>{Kd(n,r,i,void 0,o),s()})}function Kd(e,t,n,r,o,s){Me&&_.log(`Sending CLS span (${e})`);const i=t?.startTime??s??0,a=De(i)??fe(),c=t?.sources[0]?.node,u=t?Qe(c):void 0,l=c?Br(c):null,f=v(),p=!!f&&V(f)?l||jl:u??jl,h={};l&&(h[Pt]=l),t?.sources&&t.sources.forEach((m,g)=>{h[`browser.web_vital.cls.source.${g+1}`]=Qe(m.node)}),xu({name:p,op:Kv,origin:"auto.ui.browser.cls",metricName:"cls",value:e,attributes:h,parentSpan:n,startTime:a,softNavigationId:r,navigationType:o})}function yR(e,t=!1){if(!Fr()||!Ar())return;const r=!V(e);if(t){Mu(e,bc,(s,i,a)=>{Yd(s)&&Jd(s.value,Xd(s),r,i,a,s)});return}bc(({metric:s})=>{Yd(s)&&Jd(s.value,Xd(s),r,void 0,void 0,s)})}function Yd(e){return e.value!=null&<(e.value)<=Xk}function Xd(e){return e.entries.find(t=>t.duration===e.value&&Au[t.name])}function Jd(e,t,n=!1,r,o,s){Me&&_.log(`Sending INP span (${e})`);const i=De(t?.startTime??s?.navigationStartTime??0);if(!i)return;const a=lt(e),c=t&&Au[t.name],u=c||"click",l=t&&Jk(t.interactionId),f=he(),d=f?Ce(f):void 0,p=r||l?.span||d,h=l?.elementName||(t?Qe(t.target):void 0),m=t?.target?Br(t.target):null,g=v(),y=!!g&&V(g),S=mR[u],E=y?m||S:h??"Interaction to next paint",b={[So]:t?.duration??e};h&&h!==Js&&(b[Kc]=h),c&&(b[NS]=c),m&&(b[Pt]=m),xu({name:E,op:hR[u],origin:"auto.ui.browser.inp",metricName:"inp",value:e,attributes:b,startTime:i,endTime:i+a,navigationType:s?.navigationType,parentSpan:p,standalone:n,softNavigationId:o})}const SR=1e3;let Qd,Ec,wc;function Zd(e){return typeof e=="boolean"?e:!!e?.capture}function Wg(e){hn("dom",e),mn("dom",bR)}function bR(){if(!j.document)return;const e=tt.bind(null,"dom"),t=ef(e,!0);j.document.addEventListener("click",t,!1),j.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const o=j[n]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Pe(o,"addEventListener",function(s){return function(i,a,c){if((i==="click"||i=="keypress")&&a)try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},l=u[i]=u[i]||{captureListeners:new WeakSet,bubbleListeners:new WeakSet,listenerCount:0},f=Zd(c);if(!l.handler){const p=ef(e);l.handler=p,l.capture=f,s.call(this,i,p,l.capture)}const d=l[f?"captureListeners":"bubbleListeners"];d.has(a)||(typeof c=="object"&&(c?.once||c?.signal)?l.sticky=!0:(d.add(a),l.listenerCount++))}catch{}return s.call(this,i,a,c)}}),Pe(o,"removeEventListener",function(s){return function(i,a,c){if((i==="click"||i=="keypress")&&a)try{const u=this.__sentry_instrumentation_handlers__||{},l=u[i];l?.[Zd(c)?"captureListeners":"bubbleListeners"].delete(a)&&(!--l.listenerCount&&!l.sticky&&(s.call(this,i,l.handler,l.capture),l.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,a,c)}}))})}function vR(e){if(e.type!==Ec)return!1;try{if(!e.target||e.target._sentryId!==wc)return!1}catch{}return!0}function ER(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function ef(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=wR(n);if(ER(n.type,r))return;pe(n,"_sentryCaptured",!0),r&&!r._sentryId&&pe(r,"_sentryId",Le());const o=n.type==="keypress"?"input":n.type;vR(n)||(e({event:n,name:o,global:t}),Ec=n.type,wc=r?r._sentryId:void 0),clearTimeout(Qd),Qd=j.setTimeout(()=>{wc=void 0,Ec=void 0},SR)}}function wR(e){try{return e.target}catch{return null}}let ts;function TR(){return"history"in j&&!!j.history}function Hi(e){const t="history";hn(t,e),mn(t,IR)}function IR(){if(j.addEventListener("popstate",()=>{const t=j.location.href,n=ts;if(ts=t,n===t)return;tt("history",{from:n,to:t})}),!TR())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=ts,s=kR(String(r));if(ts=s,o===s)return t.apply(this,n);tt("history",{from:o,to:s})}return t.apply(this,n)}}Pe(j.history,"pushState",e),Pe(j.history,"replaceState",e)}function kR(e){try{return new URL(e,j.location.origin).toString()}catch{return e}}const eo={};function Ou(e){const t=eo[e];if(t)return t;let n=j[e];if(pc(n))return eo[e]=n.bind(j);const r=j.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const s=o.contentWindow;s?.[e]&&(n=s[e]),r.head.removeChild(o)}catch(o){Me&&_.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(eo[e]=n.bind(j))}function RR(e){eo[e]=void 0}function Oo(...e){try{return Ou("setTimeout")(...e)}catch(t){Me&&_.warn("Could not use native setTimeout implementation, falling back to window.setTimeout: ",t);const n=j.setTimeout.bind(j);return eo.setTimeout=n,n(...e)}}const xt="__sentry_xhr_v3__";function Pu(e){hn("xhr",e),mn("xhr",CR)}function CR(){if(!j.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){let o=new Error;const s=fe()*1e3,i=nt(r[0])?r[0].toUpperCase():void 0,a=AR(r[1]);if(!i||!a)return t.apply(n,r);n[xt]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[xt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const l={endTimestamp:fe()*1e3,startTimestamp:s,xhr:n,virtualError:o};tt("xhr",l),o=void 0,n.removeEventListener("readystatechange",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,l,f){return c(),u.apply(l,f)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,l,f){const[d,p]=f,h=l[xt];return h&&nt(d)&&nt(p)&&(h.request_headers[d.toLowerCase()]=p),u.apply(l,f)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const o=n[xt];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const s={startTimestamp:fe()*1e3,xhr:n};return tt("xhr",s),t.apply(n,r)}})}function AR(e){if(nt(e))return e;try{return e.toString()}catch{}}const NR=Symbol.for("sentry__originalRequestBody");function zg(e){return new URLSearchParams(e).toString()}function Qs(e,t=_){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[zg(e)];if(!e)return[void 0]}catch(n){return Me&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Me&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Lu(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const n=e[0][NR];return n!==void 0?n:void 0}}function jg(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return Me&&_.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
|
|
495
|
+
`).reduce((n,r)=>{const[o,s]=r.split(": ");return s&&(n[o.toLowerCase()]=s),n},{}):{}}function xR(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}function MR(e){try{return new URL(e,j.location.origin).toString()}catch{return e}}const C=D;let Tc=0;const to=[];function qg(e){if(Tc>0)return!0;const t=e?to.findIndex(n=>PR(n,e)):-1;return t===-1?!1:(to.splice(t,1),!0)}function OR(e){to.push(e),setTimeout(()=>{const t=to.indexOf(e);t!==-1&&to.splice(t,1)})}function PR(e,t){return e.msg===t.msg&&e.url===t.url&&e.line===t.line&&e.column===t.column}function LR(){Tc++,setTimeout(()=>{Tc--})}function Sr(e,t={}){function n(o){return typeof o=="function"}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const s=e.__sentry_wrapped__;return typeof s=="function"?s:e}if(qc(e))return e}catch{return e}const r=function(...o){D._sentryWrappedDepth=(D._sentryWrappedDepth||0)+1;try{const s=o.map(i=>Sr(i,t));return e.apply(this,s)}catch(s){throw LR(),Ze(i=>{i.addEventProcessor(a=>(t.mechanism&&(Xa(a,void 0),Ot(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),Pn(s)}),s}finally{D._sentryWrappedDepth=(D._sentryWrappedDepth||0)-1}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}Ep(r,e),pe(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Zs(e){const t=Wt(),{referrer:n}=C.document||{},{userAgent:r}=C.navigator||{},o={...n&&{Referer:be(n,e)},...r&&{"User-Agent":r}};return{url:t,headers:o}}const DR=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","userTimingIntegration","interactionsIntegration","moduleMetadataIntegration"],$R={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function FR(e){return $R[e]||e.replace("Integration","").toLowerCase()}const tf=C;async function BR(e,t){const n=DR.includes(e)?FR(e):void 0,r=tf.Sentry=tf.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;const s=UR(n),i=C.document.createElement("script");i.src=s,i.crossOrigin="anonymous",i.referrerPolicy="strict-origin",t&&i.setAttribute("nonce",t);const a=new Promise((f,d)=>{i.addEventListener("load",()=>f()),i.addEventListener("error",d)}),c=C.document.currentScript,u=C.document.body||C.document.head||c?.parentElement;if(u)u.appendChild(i);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const l=r[e];if(typeof l!="function")throw new Error(`Could not load integration: ${e}`);return l}function UR(e){const n=v()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${nn}/${e}.min.js`,n).toString()}const wL=Zm({lazyLoadIntegration:BR}),TL=Zm({getModalIntegration:()=>$I,getScreenshotIntegration:()=>VI});function Du(e,t){const n=Wi(e,t),r={type:Vg(t),value:Kg(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function HR(e,t,n,r){const s=v()?.getOptions().normalizeDepth,i=YR(t),a={__serialized__:Rp(t,s)};if(i)return{exception:{values:[Du(e,i)]},extra:a};const u={exception:{values:[{type:mi(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:VR(t,{isUnhandledRejection:r})}]},extra:a};if(n){const l=Wi(e,n);l.length&&(u.exception.values[0].stacktrace={frames:l})}return u}function Ma(e,t){return{exception:{values:[Du(e,t)]}}}function Wi(e,t){const n=t.stacktrace||t.stack||"",r=zR(t),o=jR(t);try{return e(n,r,o)}catch{}return[]}const WR=/Minified React error #\d+;/i;function zR(e){return e&&WR.test(e.message)?1:0}function jR(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Gg(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Vg(e){const t=e?.name;return!t&&Gg(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Kg(e){const t=e?.message;return Gg(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?ud(t.error):ud(e):"No error message"}function qR(e,t,n,r){const o=n?.syntheticException||void 0,s=zi(e,t,o,r);return Ot(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),Io(s)}function GR(e,t,n="info",r,o){const s=r?.syntheticException||void 0,i=Ic(e,t,s,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),Io(i)}function zi(e,t,n,r,o){let s;if(bp(t)&&t.error)return Ma(e,t.error);if(hl(t)||Gy(t)){const a=t;if("stack"in t){s=Ma(e,t);const c=s.exception?.values?.[0];if(r&&n&&c&&!c.stacktrace){const u=Wi(e,n);u.length&&(c.stacktrace={frames:u},Ot(s,{synthetic:!0}))}}else{const c=a.name||(hl(a)?"DOMError":"DOMException"),u=a.message?`${c}: ${a.message}`:c;s=Ic(e,u,n,r),Xa(s,u)}return s}if(Re(t))return Ma(e,t);if(We(t)||mi(t))return s=HR(e,t,n,o),Ot(s,{synthetic:!0}),s;const i=String(t);return s=Ic(e,i,n,r),Xa(s,i),Ot(s,{synthetic:!0}),s}function Ic(e,t,n,r){const o={};if(r&&n){const s=Wi(e,n);s.length&&(o.exception={values:[{value:t,stacktrace:{frames:s}}]}),Ot(o,{synthetic:!0})}if(hi(t)){const{__sentry_template_string__:s,__sentry_template_values__:i}=t;return o.logentry={message:s,params:i},o}return o.message=t,o}function VR(e,{isUnhandledRejection:t}){const n=Vy(e),r=t?"promise rejection":"exception";return bp(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:mi(e)?`Event \`${KR(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function KR(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function YR(e){return Object.values(e).find(Re)}class XR extends QE{constructor(t){const n=JR(t),r=C.SENTRY_SDK_SOURCE||rv();Nm(n,"browser",["browser"],r),super(n),n.routeProvider&&sR(n.routeProvider,this),this._unhandledSessionStatus="unhandled";const{userInfo:o}=this.getDataCollectionOptions();n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:o?"auto":"never",...n._metadata.sdk.settings});const{sendClientReports:s}=this._options,i=()=>{fe()},a=[[C.document,"visibilitychange",()=>{i(),C.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}],[C.document,"freeze",i],[C.document,"resume",i],[C,"pagehide",i],[C,"pageshow",i]];a.forEach(([c,u,l])=>c?.addEventListener?.(u,l)),this.on("close",()=>a.forEach(([c,u,l])=>c?.removeEventListener?.(u,l))),o&&this.on("beforeSendSession",kw)}eventFromException(t,n){return qR(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return GR(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,o)}}function JR(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:C.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const QR=40;function Yg(e,t=Ou("fetch")){let n=0,r=0;async function o(s){const i=s.body.length;n+=i,r++;const a={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const c=await t(e.url,a);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw RR("fetch"),c}finally{n-=i,r--}}return WE(e,o,fu(e.bufferSize||QR))}const L=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ZR(){const e=v();if(!e){L&&_.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){L&&_.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}function eC(){const e=v();if(!e){L&&_.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){L&&_.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}const IL={startProfiler:ZR,stopProfiler:eC},tC=10,nC=20,rC=30,oC=40,sC=50;function br(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?vt:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const iC=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,aC=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,cC=/\((\S*)(?::(\d+))(?::(\d+))\)/,uC=/at (.+?) ?\(data:(.+?),/,lC=e=>{const t=e.match(uC);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=iC.exec(e);if(n){const[,o,s,i]=n;return br(o,vt,+s,+i)}const r=aC.exec(e);if(r){if(r[2]?.indexOf("eval")===0){const a=cC.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[s,i]=Xg(r[1]||vt,r[2]);return br(i,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},dC=[rC,lC],fC=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,pC=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,hC=e=>{const t=fC.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=pC.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],o=t[1]||vt;return[o,r]=Xg(o,r),br(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},mC=[sC,hC],gC=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,_C=e=>{const t=gC.exec(e);return t?br(t[2],t[1]||vt,+t[3],t[4]?+t[4]:void 0):void 0},kL=[oC,_C],yC=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,SC=e=>{const t=yC.exec(e);return t?br(t[2],t[3]||vt,+t[1]):void 0},RL=[tC,SC],bC=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,vC=e=>{const t=bC.exec(e);return t?br(t[5],t[3]||t[4]||vt,+t[1],+t[2]):void 0},CL=[nC,vC],EC=[dC,mC],wC=gp(...EC),Xg=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:vt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function AL(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:kt(r)}},s=TC(e);return mt(o,[s])}function TC(e){return[{type:"user_report"},e]}const ns=1024,IC="Breadcrumbs",kC=((e={})=>{const t={dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:IC,setup(n){t.dom&&Wg(AC(n,t.dom)),t.xhr&&Pu(NC(n)),t.fetch&&Li(xC(n)),t.history&&Hi(MC(n)),t.sentry&&n.on("beforeSendEvent",CC(n))}}}),RC=kC;function CC(e){return function(n){v()===e&&Tt({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Tn(n)},{event:n})}}function AC(e,t){return function(r){if(v()!==e)return;let o,s,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>ns&&(L&&_.warn(`\`dom.maxStringLength\` cannot exceed ${ns}, but a value of ${a} was configured. Sentry will use ${ns} instead.`),a=ns),typeof i=="string"&&(i=[i]);try{const u=r.event,l=OC(u)?u.target:u;o=Qe(l,{keyAttrs:i,maxStringLength:a}),s=Br(l)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${r.name}`,message:o};s&&(c.data={"ui.component_name":s}),Tt(c,{event:r.event,name:r.name,global:r.global})}}function NC(e){return function(n){if(v()!==e)return;const{startTimestamp:r,endTimestamp:o}=n,s=n.xhr[xt];if(!r||!o||!s)return;const{method:i,url:a,status_code:c,body:u}=s,l={method:i,url:be(a),status_code:c},f={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o},d={category:"xhr",data:l,type:"http",level:zm(c)};e.emit("beforeOutgoingRequestBreadcrumb",d,f),Tt(d,f)}}function xC(e){return function(n){if(v()!==e)return;const{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o},i={category:"fetch",data:{...n.fetchData,url:be(n.fetchData.url)},level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,s),Tt(i,s)}else{const s=n.response,i={...n.fetchData,url:be(n.fetchData.url),status_code:s?.status},a={input:n.args,response:s,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:i,type:"http",level:zm(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),Tt(c,a)}}}function MC(e){return function(n){if(v()!==e)return;let r=n.from,o=n.to;const s=An(C.location.href);let i=r?An(r):void 0;const a=An(o);i?.path||(i=s),s.protocol===a.protocol&&s.host===a.host&&(o=a.relative),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),Tt({category:"navigation",data:{from:be(r),to:be(o)}})}}function OC(e){return!!e&&!!e.target}const PC="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),LC="BrowserApiErrors",DC=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:LC,setupOnce(){t.setTimeout&&Pe(C,"setTimeout",nf),t.setInterval&&Pe(C,"setInterval",nf),t.requestAnimationFrame&&Pe(C,"requestAnimationFrame",FC),t.XMLHttpRequest&&"XMLHttpRequest"in C&&Pe(XMLHttpRequest.prototype,"send",BC);const n=t.eventTarget;n&&(Array.isArray(n)?n:PC).forEach(o=>UC(o,t))}}}),$C=DC;function nf(e){return function(...t){const n=t[0];return t[0]=Sr(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Dt(e)}`}}),e.apply(this,t)}}function FC(e){return function(t){return e.apply(this,[Sr(t,{mechanism:{data:{handler:Dt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function BC(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&Pe(n,o,function(s){const i={mechanism:{data:{handler:Dt(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=qc(s);return a&&(i.mechanism.data.handler=Dt(a)),Sr(s,i)})}),e.apply(this,t)}}function UC(e,t){const r=C[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Pe(r,"addEventListener",function(o){return function(s,i,a){try{HC(i)&&(i.handleEvent=Sr(i.handleEvent,{mechanism:{data:{handler:Dt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&WC(this,s,i),o.apply(this,[s,Sr(i,{mechanism:{data:{handler:Dt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Pe(r,"removeEventListener",function(o){return function(s,i,a){try{if(Object.prototype.hasOwnProperty.call(i,"__sentry_wrapped__")){const c=i.__sentry_wrapped__;c&&o.call(this,s,c,a)}}catch{}return o.call(this,s,i,a)}}))}function HC(e){return typeof e.handleEvent=="function"}function WC(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const zC=(e={})=>{const t=e.lifecycle??"page";return{name:"BrowserSession",setupOnce(){if(typeof C.document>"u"){L&&_.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Yl({ignoreDuration:!0});let n=!1;$k(()=>{n||(da(),n=!0)});const r=me();let o=r.getUser();r.addScopeListener(s=>{const i=s.getUser();(o?.id!==i?.id||o?.ip_address!==i?.ip_address)&&(o=i,n&&da())}),t==="route"&&Hi(({from:s,to:i})=>{s!==i&&(Yl({ignoreDuration:!0}),da(),n=!0)})}}},jC="CultureContext",qC=(()=>({name:jC,preprocessEvent(e){const t=rf();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=rf();t&&On(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),GC=qC;function rf(){try{const e=C.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const VC="GlobalHandlers",KC=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:VC,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(XC(n),of("onerror")),t.onunhandledrejection&&(JC(n),of("onunhandledrejection"))}}}),YC=KC;function XC(e){_p(t=>{const{stackParser:n,attachStacktrace:r}=e_();if(v()!==e||qg(t))return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=Zg(zi(n,c||o,void 0,r,!1),s,i,a);u.level="error",ko(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function JC(e){yp(t=>{const{stackParser:n,attachStacktrace:r}=e_();if(v()!==e||qg())return;const o=Jg(t),s=dt(o)?Qg(o):zi(n,o,void 0,r,!0);s.level="error",ko(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function Jg(e){if(dt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function Qg(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Zg(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:QC(t)??Wt(),function:vt,in_app:!0}),e}function of(e){L&&_.log(`Global Handler attached: ${e}`)}function e_(){return v()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function QC(e){if(!(!nt(e)||e.length===0))return e.startsWith("data:")?`<${Bt(e,!1)}>`:e}const ZC=()=>({name:"HttpContext",preprocessEvent(e,t,n){if(!C.navigator&&!C.location&&!C.document)return;const{url:r,headers:o}=Zs(n),s=n.getDataCollectionOptions().httpHeaders.request,i=Object.entries(e.request?.headers??{}).filter(([c])=>!(c in o)),a={...Ln(o,s),...Object.fromEntries(i)};e.request={url:be(r,n),...e.request,...Object.keys(a).length>0?{headers:a}:{headers:void 0}}},processSpan(e,t){if(!C.navigator&&!C.location&&!C.document)return;const n=Zs(t),r=Ln(n.headers,t.getDataCollectionOptions().httpHeaders.request),o=r.Referer,{hostname:s,protocol:i}=C.location||{};On(e,{[jp]:r["User-Agent"],[GS]:i==="file:"||s==="localhost"||s==="127.0.0.1"||s==="[::1]"||!!s?.endsWith(".localhost"),...e.is_segment&&{[Fe]:e.attributes?.[U]!=="http.client"?be(n.url):void 0,[`${$S}.referer`]:o?[o]:void 0}})}}),e1="cause",t1=5,n1="LinkedErrors",r1=((e={})=>{const t=e.limit||t1,n=e.key||e1;return{name:n1,preprocessEvent(r,o,s){const i=s.getOptions();jw(Du,i.stackParser,n,t,r,o)}}}),o1=r1,s1=/^HTML(\w*)Element$/;function t_(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(xR(e)){const t=i1(e);if(s1.test(t))return`[HTMLElement: ${Qe(e)}]`}}function i1(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function a1(){return c1()?(L&&pt(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function c1(){if(typeof C.window>"u")return!1;const e=C;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=Wt();return!(C===C.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function u1(e){const{tunnel:t,dsn:n,transportOptions:r}=e;if(!t||typeof t=="string")return{tunnel:t,transportOptions:r};const o=t===!0?{}:t,s=n&&Ei(n),i=o.path??(s&&ww(s));if(!i)return{tunnel:void 0,transportOptions:r};const c=`${Tw(o.basePath)}${i}${o.trailingSlash?"/":""}`;return L&&_.log(`Tunneling events to "${c}"`),{tunnel:c,transportOptions:{...r,headers:{"Content-Type":"application/x-sentry-envelope",...r?.headers}}}}function l1(e){return[Dw(),Ow(),J0(),$C(),RC(),z0(),YC(),o1(),n0(),ZC(),GC(),zC()]}function d1(e={}){const t=!e.skipBrowserExtensionCheck&&a1();let n=e.defaultIntegrations==null?l1():e.defaultIntegrations;const r=$b({integrations:e.integrations,defaultIntegrations:n}),o={...e,...u1(e),enabled:t?!1:e.enabled,stackParser:Hy(e.stackParser||wC),integrations:r,transport:e.transport||Yg};return kp(t_),nw(XR,o)}function NL(){}function xL(e){e()}function sf(e={}){const t=C.document,n=t?.head||t?.body;if(!n){L&&_.error("[showReportDialog] Global document not defined");return}const r=q(),s=v()?.getDsn();if(!s){L&&_.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||yE()},{onLoad:a,onClose:c,onError:u}=i;if(!i.eventId){L&&_.error("[showReportDialog] No event ID"),u?.(new Error("No event ID to show the report dialog for"));return}const l=C.document.createElement("script");if(l.async=!0,l.crossOrigin="anonymous",l.src=TE(s,i),a&&(l.onload=a),u&&(l.onerror=()=>{u(new Error("Failed to load the report dialog script"))}),c){const f=d=>{if(d.data==="__sentry_reportdialog_closed__")try{c()}finally{C.removeEventListener("message",f)}};C.addEventListener("message",f),l.addEventListener("error",()=>{C.removeEventListener("message",f)})}n.appendChild(l)}const n_=D;function f1(){return"ReportingObserver"in n_}const p1="ReportingObserver",af=new WeakMap,h1=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(af.has(v()))for(const o of r)Ze(s=>{s.setExtra("url",o.url);const i=`ReportingObserver [${o.type}]`;let a="No details available";if(o.body){const c={};for(const u in o.body)c[u]=o.body[u];if(s.setExtra("body",c),o.type==="crash"){const u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}_E(`${i}: ${a}`)})}return{name:p1,setupOnce(){if(!f1())return;new n_.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){af.set(r,!0)}}}),ML=h1,m1="HttpClient",g1=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:m1,setup(n){w1(n,t),T1(n,t)}}}),OL=g1;function _1(e,t,n,r,o){if(r_(e,n.status,n.url)){const s=I1(t,r);let i,a,c,u;const l=s_();if(l.requestHeaders!==!1&&(i=Ln(cf(s.headers),l.requestHeaders)),l.responseHeaders!==!1&&(a=Ln(cf(n.headers),l.responseHeaders)),l.cookies!==!1){const d=s.headers.get("Cookie")||void 0;d&&(c=dc(d,l.cookies,"cookie"));const p=n.headers.get("Set-Cookie")||void 0;p&&(u=dc(p,l.cookies,"set-cookie"))}const f=o_({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:c,responseCookies:u,error:o,type:"fetch"});ko(f)}}function y1(e,t,n,r,o){if(r_(e,t.status,t.responseURL)){let s,i,a;const c=s_();if(c.cookies!==!1)try{const l=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;l&&(i=dc(l,c.cookies,"set-cookie"))}catch{}if(c.responseHeaders!==!1)try{a=Ln(b1(t),c.responseHeaders)}catch{}c.requestHeaders!==!1&&(s=Ln(r,c.requestHeaders));const u=o_({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:a,responseCookies:i,error:o,type:"xhr"});ko(u)}}function S1(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function cf(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function b1(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
496
|
+
`).reduce((n,r)=>{const[o,s]=r.split(": ");return o&&s&&(n[o]=s),n},{}):{}}function v1(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function E1(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function w1(e,t){Li(n=>{if(v()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&_1(t,a,r,c,s||i)})}function T1(e,t){"XMLHttpRequest"in D&&Pu(n=>{if(v()!==e)return;const{error:r,virtualError:o}=n,s=n.xhr,i=s[xt];if(!i)return;const{method:a,request_headers:c}=i;try{y1(t,s,a,c,r||o)}catch(u){L&&_.warn("Error while extracting response event form XHR response",u)}})}function r_(e,t,n){return E1(e.failedRequestStatusCodes,t)&&v1(e.failedRequestTargets,n)&&!Am(n,v())}function o_(e){const t=v(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,o=`HTTP Client Error with status code: ${e.status}`,s={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:S1(e.responseHeaders)}}};return Ot(s,{type:`auto.http.client.${e.type}`,handled:!1}),s}function I1(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function s_(){const e=v();if(!e)return{cookies:!1,requestHeaders:!1,responseHeaders:!1};const{cookies:t,httpHeaders:n}=e.getDataCollectionOptions();return{cookies:t,requestHeaders:n.request,responseHeaders:n.response}}const Oa=D,k1=5,R1="ContextLines",C1=((e={})=>({name:R1,processEvent(t,n,r){const o=e.frameContextLines??r?.getDataCollectionOptions().frameContextLines??k1;return A1(t,o)}})),PL=C1;function A1(e,t){const n=Oa.document,r=Oa.location&&Cm(Oa.location.href);if(!n||!r)return e;const o=e.exception?.values;if(!o?.length)return e;const s=n.documentElement.innerHTML;if(!s)return e;const i=["<!DOCTYPE html>","<html>",...s.split(`
|
|
497
|
+
`),"</html>"];return o.forEach(a=>{const c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>N1(u,i,r,t)))}),e}function N1(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||sS(t,e,r),e}const x1="GraphQLClient",M1=(e=>({name:x1,setup(t){O1(t,e),P1(t,e)}}));function O1(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const s=ne(n).attributes;if(!(s[U]==="http.client"))return;const c=s[Fe],u=s[yi]||s[DS];if(!nt(c)||!nt(u))return;const{endpoints:l}=t,f=jt(c,l),d=c_(r);if(f&&d){const p=u_(d);if(p){V(e)||n.updateName(`${u} ${c} (${a_(p)})`);const{operationName:h,operationType:m}=i_(p);n.setAttribute(PS,h),n.setAttribute(LS,m),Po(p)&&e.getDataCollectionOptions().graphQL.document===!0&&n.setAttribute(Fp,p.query),Lo(p)&&(n.setAttribute("graphql.persisted_query.hash.sha256",p.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",p.extensions.persistedQuery.version))}}})}function P1(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:o,type:s,data:i}=n;if(s==="http"&&(o==="fetch"||o==="xhr")){const l=i?.url,{endpoints:f}=t,d=jt(l,f),p=c_(r);if(d&&i&&p){const h=u_(p);if(!i.graphql&&h){const m=a_(h);i["graphql.operation"]=m,Po(h)&&e.getDataCollectionOptions().graphQL.document===!0&&(i[Fp]=h.query),Lo(h)&&(i["graphql.persisted_query.hash.sha256"]=h.extensions.persistedQuery.sha256Hash,i["graphql.persisted_query.version"]=h.extensions.persistedQuery.version)}}}})}function i_(e){if(Lo(e))return{operationName:e.operationName,operationType:void 0};if(Po(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=L1(t);return{operationName:r,operationType:o}}return{operationName:void 0,operationType:void 0}}function a_(e){if(Lo(e))return`persisted ${e.operationName}`;if(Po(e)){const{operationName:t,operationType:n}=i_(e);return t?`${n} ${t}`:`${n}`}return"unknown"}function c_(e){const t="xhr"in e;let n;if(t){const r=e.xhr[xt];n=r&&Qs(r.body)[0]}else{const r=Lu(e.input);n=Qs(r)[0]}return n}function L1(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const o=e.match(n);return o?{operationType:o[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function Po(e){return rt(e)&&typeof e.query=="string"}function Lo(e){return rt(e)&&typeof e.operationName=="string"&&rt(e.extensions)&&rt(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function u_(e){try{const t=JSON.parse(e);return Po(t)||Lo(t)?t:void 0}catch{return}}const LL=M1,DL=(e={})=>{const t=["script"];function n(r,o,s=0){if(!r)return;const i="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const a of i){if(!(a instanceof HTMLElement))continue;const c=Br(a,1)||void 0,u=a.tagName.toLowerCase();if(t.includes(u))continue;const l=e.onElement?.({element:a,componentName:c,tagName:u,depth:s})||{};if(l==="skip")continue;if(l==="children"){n(a,o,s+1);continue}const{x:f,y:d,width:p,height:h}=a.getBoundingClientRect(),m={identifier:a.id||void 0,type:c||u,visible:!0,alpha:1,height:h,width:p,x:f,y:d,...l},g=[];m.children=g,n(a,m.children,s+1),o.push(m)}}return{name:"ViewHierarchy",processEvent:(r,o)=>{if(r.type!==void 0||e.shouldAttach?.(r,o)===!1)return r;const s={rendering_system:"DOM",positioning:"absolute",windows:[]};n(e.rootElement?.()||C.document.body,s.windows);const i={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(s)};return o.attachments=o.attachments||[],o.attachments.push(i),r}}},ge=D,$u="sentryReplaySession",D1="replay_event",Fu="Unable to send Replay",$1=3e5,F1=9e5,B1=5e3,U1=5500,H1=6e4,W1=5e3,z1=3,uf=15e4,rs=5e3,j1=3e3,q1=300,Bu=2e7,G1=4999,V1=5e4,lf=36e5,K1="sentry.segment.name.source";var Y1=Object.defineProperty,X1=(e,t,n)=>t in e?Y1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,df=(e,t,n)=>X1(e,typeof t!="symbol"?t+"":t,n),ke=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(ke||{});function l_(e){return e.nodeType===e.ELEMENT_NODE}function ur(e){return e?.host?.shadowRoot===e}function no(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function J1(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Q1(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function ei(e){try{const t=e.rules||e.cssRules;return t?J1(Array.from(t,d_).join("")):null}catch{return null}}function Z1(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,o=r[n],s=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}function d_(e){let t;if(tA(e))try{t=ei(e.styleSheet)||Q1(e)}catch{}else if(nA(e)){let n=e.cssText;const r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=Z1(e)),r&&(n=eA(n)),r||o)return n}return t||e.cssText}function eA(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function tA(e){return"styleSheet"in e}function nA(e){return"selectorText"in e}let f_=class{constructor(){df(this,"idNodeMap",new Map),df(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r)),l_(t)&&t.shadowRoot&&this.removeNodeFromMap(t.shadowRoot)}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function rA(){return new f_}function ji({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function lo({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function vr(e){return e.toLowerCase()}function kc(e){return e.toUpperCase()}const ff="__rrweb_original__";function oA(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const s=t.getImageData,i=ff in s?s[ff]:s;if(new Uint32Array(i.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function Uu(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?vr(t):null}function ti(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function p_(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const Pa={};function h_(e){const t=Pa[e];if(t)return t;const n=window[e].bind(window);let r=n;const o=window.document;if(o&&typeof o.createElement=="function")try{const s=o.createElement("iframe");s.hidden=!0,o.head.appendChild(s);const i=s.contentWindow;if(i&&i[e]){const a=i[e].bind(window);r=(...c)=>{try{return a(...c)}catch{return Pa[e]=n,n(...c)}}}o.head.removeChild(s)}catch{}return Pa[e]=r}function Rc(...e){return h_("setTimeout")(...e)}function m_(...e){return h_("clearTimeout")(...e)}function g_(e){try{return e.contentDocument}catch{}}function sA(e){try{return e.contentWindow}catch{}}let iA=1;const aA=new RegExp("[^a-z0-9-_:]"),fo=-2;function Hu(){return iA++}function cA(e){if(e instanceof HTMLFormElement)return"form";const t=vr(e.tagName);return aA.test(t)?"div":t}function uA(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Yn,pf;const lA=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,dA=/^(?:[a-z+]+:)?\/\//i,fA=/^www\..*/i,pA=/^(data:)([^,]*),(.*)/i;function hA(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let o of n){if(o=o.trim(),!o)continue;const s=o.indexOf(":");if(s===-1){r.push(o);continue}const i=o.slice(0,s).trim();t.has(i)||r.push(o)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function ni(e,t){return(e||"").replace(lA,(n,r,o,s,i,a)=>{const c=o||i||a,u=r||s||"";if(!c)return n;if(dA.test(c)||fA.test(c))return`url(${u}${c}${u})`;if(pA.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${uA(t)+c}${u})`;const l=t.split("/"),f=c.split("/");l.pop();for(const d of f)d!=="."&&(d===".."?l.pop():l.push(d));return`url(${u}${l.join("/")}${u})`})}const mA=/^[^ \t\n\r\u000c]+/,gA=/^[, \t\n\r\u000c]+/;function _A(e,t){if(t.trim()==="")return t;let n=0;function r(s){let i;const a=s.exec(t.substring(n));return a?(i=a[0],n+=i.length,i):""}const o=[];for(;r(gA),!(n>=t.length);){let s=r(mA);if(s.slice(-1)===",")s=Zn(e,s.substring(0,s.length-1)),o.push(s);else{let i="";s=Zn(e,s);let a=!1;for(;;){const c=t.charAt(n);if(c===""){o.push((s+i).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,o.push((s+i).trim());break}else c==="("&&(a=!0);i+=c,n+=1}}}return o.join(", ")}const hf=new WeakMap;function Zn(e,t){return!t||t.trim()===""?t:qi(e,t)}function yA(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function qi(e,t){let n=hf.get(e);if(n||(n=e.createElement("a"),hf.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function __(e,t,n,r,o,s,i){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Zn(e,r);if(n==="xlink:href"&&r[0]!=="#")return Zn(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Zn(e,r);if(n==="srcset")return _A(e,r);if(n==="style"){let a=ni(r,qi(e));return i&&i.size>0&&(a=hA(a,i)),a}else if(t==="object"&&n==="data")return Zn(e,r);return typeof s=="function"?s(n,r,o):r}function y_(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function SA(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){const s=e.classList[o];if(t.test(s))return!0}if(n)return e.matches(n)}catch{}return!1}function bA(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function tn(e,t,n=1/0,r=0){return e?ur(e)?tn(e.host,t,n,r+1):e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:tn(e.parentNode,t,n,r+1):-1}function er(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(bA(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Er(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(i.tagName==="INPUT"){const u=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(s){if(c=tn(i,er(r,o)),c<0)return!0;a=tn(i,er(t,n),c>=0?c:1/0)}else{if(a=tn(i,er(t,n)),a<0)return!1;c=tn(i,er(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!s}catch{}return!!s}function vA(e,t,n){const r=sA(e);if(!r)return;let o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const a=Rc(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{m_(a),o=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return Rc(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function EA(e,t,n){let r=!1,o;try{o=e.sheet}catch{o=null}if(o)return;const s=Rc(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{m_(s),r=!0,t()})}function wA(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:m,maskInputFn:g,dataURLOptions:y={},inlineImages:S,recordCanvas:E,keepIframeSrcFn:b,newlyAddedElement:N=!1,ignoreCSSAttributes:I}=t,k=TA(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ke.Document,childNodes:[],compatMode:e.compatMode}:{type:ke.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ke.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return kA(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:h,maskInputFn:g,dataURLOptions:y,inlineImages:S,recordCanvas:E,keepIframeSrcFn:b,newlyAddedElement:N,rootId:k,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:d,ignoreCSSAttributes:I});case e.TEXT_NODE:return IA(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:d,maskTextFn:m,maskInputOptions:h,maskInputFn:g,rootId:k});case e.CDATA_SECTION_NODE:return{type:ke.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:ke.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function TA(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function IA(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,f=e.parentNode&&e.parentNode.tagName;let d=e.textContent;const p=f==="STYLE"?!0:void 0,h=f==="SCRIPT"?!0:void 0,m=f==="TEXTAREA"?!0:void 0;if(p&&d){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(d=ei(e.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,e)}d=ni(d,qi(t.doc))}h&&(d="SCRIPT_PLACEHOLDER");const g=Er(e,r,s,o,i,n);if(!p&&!h&&!m&&d&&g&&(d=a?a(d,e.parentElement):d.replace(/[\S]/g,"*")),m&&d&&(c.textarea||g)&&(d=u?u(d,e.parentNode):d.replace(/[\S]/g,"*")),f==="OPTION"&&d){const y=ji({type:null,tagName:f,maskInputOptions:c});d=lo({isMasked:Er(e,r,s,o,i,y),element:e,value:d,maskInputFn:u})}return{type:ke.Text,textContent:d||"",isStyle:p,rootId:l}}function kA(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m,maskTextClass:g,unmaskTextClass:y,maskTextSelector:S,unmaskTextSelector:E,ignoreCSSAttributes:b}=t,N=SA(e,r,o,s),I=cA(e);let k={};const R=e.attributes.length;for(let w=0;w<R;w++){const O=e.attributes[w];O.name&&!y_(I,O.name,O.value)&&(k[O.name]=__(n,I,vr(O.name),O.value,e,c,b))}if(I==="link"&&i){const w=Array.from(n.styleSheets).find(M=>M.href===e.href);let O=null;w&&(O=ei(w)),O&&(k.rel=null,k.href=null,k.crossorigin=null,k._cssText=ni(O,w.href))}if(I==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const w=ei(e.sheet);w&&(k._cssText=ni(w,qi(n)))}if(I==="input"||I==="textarea"||I==="select"||I==="option"){const w=e,O=Uu(w),M=ti(w,kc(I),O),T=w.checked;if(O!=="submit"&&O!=="button"&&M){const $=Er(w,g,S,y,E,ji({type:O,tagName:kc(I),maskInputOptions:a}));k.value=lo({isMasked:$,element:w,value:M,maskInputFn:u})}T&&(k.checked=T)}if(I==="option"&&(e.selected&&!a.select?k.selected=!0:delete k.selected),I==="canvas"&&d){if(e.__context==="2d")oA(e)||(k.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const w=e.toDataURL(l.type,l.quality),O=n.createElement("canvas");O.width=e.width,O.height=e.height;const M=O.toDataURL(l.type,l.quality);w!==M&&(k.rr_dataURL=w)}}if(I==="img"&&f){Yn||(Yn=n.createElement("canvas"),pf=Yn.getContext("2d"));const w=e,O=w.currentSrc||w.getAttribute("src")||"<unknown-src>",M=w.crossOrigin,T=()=>{w.removeEventListener("load",T);try{Yn.width=w.naturalWidth,Yn.height=w.naturalHeight,pf.drawImage(w,0,0),k.rr_dataURL=Yn.toDataURL(l.type,l.quality)}catch($){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?T():w.addEventListener("load",T);return}else console.warn(`Cannot inline img src=${O}! Error: ${$}`)}w.crossOrigin==="anonymous"&&(M?k.crossOrigin=M:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?T():w.addEventListener("load",T)}if((I==="audio"||I==="video")&&(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop)),N){const{width:w,height:O}=e.getBoundingClientRect();k={class:k.class,rr_width:`${w}px`,rr_height:`${O}px`}}I==="iframe"&&!p(k.src)&&(!N&&!g_(e)&&(k.rr_src=k.src),delete k.src);let B;try{customElements.get(I)&&(B=!0)}catch{}return{type:ke.Element,tagName:I,attributes:k,childNodes:[],isSVG:yA(e)||void 0,needBlock:N,rootId:m,isCustom:B}}function de(e){return e==null?"":e.toLowerCase()}function RA(e,t){if(t.comment&&e.type===ke.Comment)return!0;if(e.type===ke.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&p_(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(de(e.attributes.name).match(/^msapplication-tile(image|color)$/)||de(e.attributes.name)==="application-name"||de(e.attributes.rel)==="icon"||de(e.attributes.rel)==="apple-touch-icon"||de(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&de(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(de(e.attributes.property).match(/^(og|twitter|fb):/)||de(e.attributes.name).match(/^(og|twitter):/)||de(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(de(e.attributes.name)==="robots"||de(e.attributes.name)==="googlebot"||de(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(de(e.attributes.name)==="author"||de(e.attributes.name)==="generator"||de(e.attributes.name)==="framework"||de(e.attributes.name)==="publisher"||de(e.attributes.name)==="progid"||de(e.attributes.property).match(/^article:/)||de(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(de(e.attributes.name)==="google-site-verification"||de(e.attributes.name)==="yandex-verification"||de(e.attributes.name)==="csrf-token"||de(e.attributes.name)==="p:domain_verify"||de(e.attributes.name)==="verify-v1"||de(e.attributes.name)==="verification"||de(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function tr(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:d=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S,dataURLOptions:E={},inlineImages:b=!1,recordCanvas:N=!1,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:R=5e3,onBlockedImageLoad:B,onStylesheetLoad:w,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:T=!1,ignoreCSSAttributes:$}=t;let{preserveWhiteSpace:x=!0}=t;const Y=wA(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,dataURLOptions:E,inlineImages:b,recordCanvas:N,keepIframeSrcFn:M,newlyAddedElement:T,ignoreCSSAttributes:$});if(!Y)return console.warn(e,"not serialized"),null;let X;r.hasNode(e)?X=r.getId(e):RA(Y,S)||!x&&Y.type===ke.Text&&!Y.isStyle&&!Y.textContent.trim().length?X=fo:X=Hu();const P=Object.assign(Y,{id:X});if(r.add(e,P),X===fo)return null;I&&I(e);let K=!d;if(P.type===ke.Element){K=K&&!P.needBlock;const F=e.shadowRoot;F&&no(F)&&(P.isShadowHost=!0)}if((P.type===ke.Document||P.type===ke.Element)&&K){S.headWhitespace&&P.type===ke.Element&&P.tagName==="head"&&(x=!1);const F={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:d,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S,dataURLOptions:E,inlineImages:b,recordCanvas:N,preserveWhiteSpace:x,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:R,onBlockedImageLoad:B,onStylesheetLoad:w,stylesheetLoadTimeout:O,keepIframeSrcFn:M,ignoreCSSAttributes:$},Z=e.childNodes?Array.from(e.childNodes):[];for(const Se of Z){const ae=tr(Se,F);ae&&P.childNodes.push(ae)}if(l_(e)&&e.shadowRoot)for(const Se of Array.from(e.shadowRoot.childNodes)){const ae=tr(Se,F);ae&&(no(e.shadowRoot)&&(ae.isShadow=!0),P.childNodes.push(ae))}}if(e.parentNode&&ur(e.parentNode)&&no(e.parentNode)&&(P.isShadow=!0),P.type===ke.Element&&P.tagName==="iframe"&&!P.needBlock&&vA(e,()=>{const F=g_(e);if(F&&k){const Z=tr(F,{doc:F,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S,dataURLOptions:E,inlineImages:b,recordCanvas:N,preserveWhiteSpace:x,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:R,onStylesheetLoad:w,stylesheetLoadTimeout:O,keepIframeSrcFn:M,ignoreCSSAttributes:$});Z&&k(e,Z)}},R),P.type===ke.Element&&P.tagName==="img"&&!e.complete&&P.needBlock){const F=e,Z=()=>{if(F.isConnected&&!F.complete&&B)try{const Se=F.getBoundingClientRect();Se.width>0&&Se.height>0&&B(F,P,Se)}catch{}F.removeEventListener("load",Z)};F.isConnected&&F.addEventListener("load",Z)}return P.type===ke.Element&&P.tagName==="link"&&typeof P.attributes.rel=="string"&&(P.attributes.rel==="stylesheet"||P.attributes.rel==="preload"&&typeof P.attributes.href=="string"&&p_(P.attributes.href)==="css")&&EA(e,()=>{if(w){const F=tr(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S,dataURLOptions:E,inlineImages:b,recordCanvas:N,preserveWhiteSpace:x,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:R,onStylesheetLoad:w,stylesheetLoadTimeout:O,keepIframeSrcFn:M,ignoreCSSAttributes:$});F&&w(e,F)}},O),P.type===ke.Element&&delete P.needBlock,P}function CA(e,t){const{mirror:n=new f_,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:f=!0,inlineImages:d=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:S=!1,dataURLOptions:E,preserveWhiteSpace:b,onSerialize:N,onIframeLoad:I,iframeLoadTimeout:k,onBlockedImageLoad:R,onStylesheetLoad:B,stylesheetLoadTimeout:w,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:M=new Set([])}=t||{};return tr(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,hidden:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:S==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:S===!1?{}:S,dataURLOptions:E,inlineImages:d,recordCanvas:p,preserveWhiteSpace:b,onSerialize:N,onIframeLoad:I,iframeLoadTimeout:k,onBlockedImageLoad:R,onStylesheetLoad:B,stylesheetLoadTimeout:w,keepIframeSrcFn:O,newlyAddedElement:!1,ignoreCSSAttributes:M})}function ze(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Xn=`Please stop import mirror directly. Instead of that,\r
|
|
498
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
499
|
+
or you can use record.mirror to access the mirror instance during recording.`;let mf={map:{},getId(){return console.error(Xn),-1},getNode(){return console.error(Xn),null},removeNodeFromMap(){console.error(Xn)},has(){return console.error(Xn),!1},reset(){console.error(Xn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(mf=new Proxy(mf,{get(e,t,n){return t==="map"&&console.error(Xn),Reflect.get(e,t,n)}}));function po(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();!o&&n.leading===!1&&(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(LA(r),r=null),o=i,e.apply(c,s)):!r&&n.trailing!==!1&&(r=Gi(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},a))}}function S_(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){Gi(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>S_(e,t,s||{},!0)}function Wu(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}let ho=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ho=()=>new Date().getTime());function b_(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function v_(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function E_(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function w_(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ge(e,t,n,r,o){if(!e)return!1;const s=w_(e);if(!s)return!1;const i=er(t,n);if(!o){const u=r&&s.matches(r);return i(s)&&!u}const a=tn(s,i);let c=-1;return a<0?!1:(r&&(c=tn(s,er(null,r))),a>-1&&c<0?!0:a<c)}function AA(e,t){return t.getId(e)!==-1}function La(e,t){return t.getId(e)===fo}function T_(e,t){if(ur(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?T_(e.parentNode,t):!0:!0}function Cc(e){return!!e.changedTouches}function NA(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function I_(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function k_(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function ri(e){return!!e?.shadowRoot}class xA{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function R_(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function MA(e){let t=e,n;for(;n=R_(t);)t=n;return t}function OA(e){const t=e.ownerDocument;if(!t)return!1;const n=MA(e);return t.contains(n)}function oi(e){const t=e.ownerDocument;return t?t.contains(e)||OA(e):!1}const Da={};function zu(e){const t=Da[e];if(t)return t;const n=window[e].bind(window);let r=n;const o=window.document;if(o&&typeof o.createElement=="function")try{const s=o.createElement("iframe");s.hidden=!0,o.head.appendChild(s);const i=s.contentWindow;if(i&&i[e]){const a=i[e].bind(window);r=(...c)=>{try{return a(...c)}catch{return Da[e]=n,n(...c)}}}o.head.removeChild(s)}catch{}return Da[e]=r}function PA(...e){return zu("requestAnimationFrame")(...e)}function Gi(...e){return zu("setTimeout")(...e)}function LA(...e){return zu("clearTimeout")(...e)}var Q=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Q||{}),G=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(G||{}),Ue=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Ue||{}),At=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(At||{}),Jn=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Jn||{});let ro;function DA(e){ro=e}function $A(){ro=void 0}const se=e=>ro?((...n)=>{try{return e(...n)}catch(r){if(ro&&ro(r)===!0)return()=>{};throw r}}):e;var gf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",FA=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var os=0;os<gf.length;os++)FA[gf.charCodeAt(os)]=os;class _f{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function ju(e){try{return e.contentDocument}catch{}}function mo(e){try{return e.contentWindow}catch{}}class BA{constructor(t){this.doc=t,this.unattachedDoc=null}parse(t){return this.parseWithConstructableStylesheet(t)||this.parseWithDetachedElement(t)}parseWithConstructableStylesheet(t){if(typeof CSSStyleSheet>"u"||typeof CSSStyleSheet.prototype.replaceSync!="function")return null;try{const n=new CSSStyleSheet;n.replaceSync(`x { ${t} }`);const r=n.cssRules[0];return!r||r.type!==CSSRule.STYLE_RULE?null:r.style}catch{return null}}parseWithDetachedElement(t){const n=this.getUnattachedDoc().createElement("span");return n.setAttribute("style",t),n.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}}function yf(e){return"__ln"in e}class UA{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&yf(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&yf(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Sf=(e,t)=>`${e}@${t}`;class HA{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new UA,o=c=>{let u=c,l=fo;for(;l===fo;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},s=c=>{if(!c.parentNode||!oi(c))return;const u=ur(c.parentNode)?this.mirror.getId(R_(c)):this.mirror.getId(c.parentNode),l=o(c);if(u===-1||l===-1)return r.addNode(c);const f=tr(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:d=>{I_(d,this.mirror)&&!Ge(d,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(d),k_(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),ri(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(d,p)=>{if(Ge(d,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(d,p);const h=mo(d);h&&this.canvasManager.addWindow(h),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,p)=>{this.stylesheetManager.attachLinkElement(d,p)},onBlockedImageLoad:(d,p,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:`${h}px`,height:`${m}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});f&&(t.push({parentId:u,nextId:l,node:f}),n.add(f.id))};for(;this.mapRemoves.length;){const c=this.mapRemoves.shift();this.mirror.removeNodeFromMap(c),this.shadowDomManager.removeShadowRootsFor(c)}for(const c of this.movedSet)bf(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||s(c);for(const c of this.addedSet)!vf(this.droppedSet,c)&&!bf(this.removes,c,this.mirror)||vf(this.movedSet,c)?s(c):this.droppedSet.add(c);let i=null;for(;r.length;){let c=null;if(i){const u=this.mirror.getId(i.value.parentNode),l=o(i.value);u!==-1&&l!==-1&&(c=i)}if(!c){let u=r.tail;for(;u;){const l=u;if(u=u.previous,l){const f=this.mirror.getId(l.value.parentNode);if(o(l.value)===-1)continue;if(f!==-1){c=l;break}else{const p=l.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.parentNode.host;if(this.mirror.getId(h)!==-1){c=l;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}i=c.previous,r.removeNode(c.value),s(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const l=JSON.stringify(c.styleDiff),f=JSON.stringify(c._unchangedStyles);l.length<u.style.length&&(l+f).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!La(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Ge(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Er(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,w_(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){const i=Uu(n),a=n.tagName;o=ti(n,a,i);const c=ji({maskInputOptions:this.maskInputOptions,tagName:a,type:i}),u=Er(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=lo({isMasked:u,element:n,value:o,maskInputFn:this.maskInputFn})}if(Ge(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!ju(n))r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!y_(n.tagName,r)&&(s.attributes[r]=__(this.doc,vr(n.tagName),vr(r),o,n,this.maskAttributeFn),r==="style")){const i=t.oldValue?this.styleDeclarationParser.parse(t.oldValue):null;for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==(i?.getPropertyValue(a)||"")||u!==(i?.getPropertyPriority(a)||"")?u===""?s.styleDiff[a]=c:s.styleDiff[a]=[c,u]:s._unchangedStyles[a]=[c,u]}if(i)for(const a of Array.from(i))n.style.getPropertyValue(a)===""&&(s.styleDiff[a]=!1)}break}case"childList":{if(Ge(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=ur(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ge(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||La(n,this.mirror)||!AA(n,this.mirror)||(this.addedSet.has(n)?(Ac(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||T_(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Sf(r,o)]?Ac(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:ur(t.target)&&no(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(La(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Sf(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ge(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),ri(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(n=>{this[n]=t[n]}),this.styleDeclarationParser=new BA(this.doc)}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()}release(t){for(t.forEach(n=>{n.type==="childList"&&n.removedNodes.forEach(r=>this.mapRemoves.push(r))});this.mapRemoves.length;){const n=this.mapRemoves.shift();oi(n)||(this.mirror.removeNodeFromMap(n),this.shadowDomManager.removeShadowRootsFor(n))}}}function Ac(e,t){e.delete(t),t.childNodes?.forEach(n=>Ac(e,n))}function bf(e,t,n){return e.length===0?!1:WA(e,t,n)}function WA(e,t,n){let r=t.parentNode;for(;r;){const o=n.getId(r);if(e.some(s=>s.id===o))return!0;r=r.parentNode}return!1}function vf(e,t){return e.size===0?!1:C_(e,t)}function C_(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:C_(e,n):!1}const go=[];function vs(e){[...go].forEach(e)}const Nc=new WeakMap;function Do(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function A_(e,t){const n=new HA;go.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const{onMutation:s,blockClass:i,blockSelector:a,unblockSelector:c}=e,u={isBlocked:f=>Ge(f,i,a,c,!0)},l=new r(se(f=>{let d=f;if(s){const p=s(f,u);if(p===!1)return;Array.isArray(p)&&(d=p)}n.processMutations(d)}));return l.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),Nc.set(l,n),l}function zA(e){const t=e.takeRecords();e.disconnect();const n=Nc.get(e);if(n){n.release(t);const r=go.indexOf(n);r!==-1&&go.splice(r,1),Nc.delete(e)}}function jA({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let i=[],a;const c=po(se(f=>{const d=Date.now()-a;e(i.map(p=>(p.timeOffset-=d,p)),f),i=[],a=null}),s),u=se(po(se(f=>{const d=Do(f),{clientX:p,clientY:h}=Cc(f)?f.changedTouches[0]:f;a||(a=ho()),i.push({x:p,y:h,id:r.getId(d),timeOffset:ho()-a}),c(typeof DragEvent<"u"&&f instanceof DragEvent?G.Drag:f instanceof MouseEvent?G.MouseMove:G.TouchMove)}),o,{trailing:!1})),l=[ze("mousemove",u,n),ze("touchmove",u,n),ze("drag",u,n)];return se(()=>{l.forEach(f=>f())})}function qA({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,c=[];let u=null;const l=f=>d=>{const p=Do(d);if(Ge(p,r,o,s,!0))return;let h=null,m=f;if("pointerType"in d){switch(d.pointerType){case"mouse":h=At.Mouse;break;case"touch":h=At.Touch;break;case"pen":h=At.Pen;break}h===At.Touch?Ue[f]===Ue.MouseDown?m="TouchStart":Ue[f]===Ue.MouseUp&&(m="TouchEnd"):At.Pen}else Cc(d)&&(h=At.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===At.Touch||m.startsWith("Mouse")&&h===At.Mouse)&&(h=null)):Ue[f]===Ue.Click&&(h=u,u=null);const g=Cc(d)?d.changedTouches[0]:d;if(!g)return;const y=n.getId(p),{clientX:S,clientY:E}=g;se(e)({type:Ue[m],id:y,x:S,y:E,...h!==null&&{pointerType:h}})};return Object.keys(Ue).filter(f=>Number.isNaN(Number(f))&&!f.endsWith("_Departed")&&a[f]!==!1).forEach(f=>{let d=vr(f);const p=l(f);if(window.PointerEvent)switch(Ue[f]){case Ue.MouseDown:case Ue.MouseUp:d=d.replace("mouse","pointer");break;case Ue.TouchStart:case Ue.TouchEnd:return}c.push(ze(d,p,t))}),se(()=>{c.forEach(f=>f())})}function N_({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){const a=se(po(se(c=>{const u=Do(c);if(!u||Ge(u,r,o,s,!0))return;const l=n.getId(u);if(u===t&&t.defaultView){const f=b_(t.defaultView);e({id:l,x:f.left,y:f.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return ze("scroll",a,t)}function GA({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=se(po(se(()=>{const s=v_(),i=E_();(n!==s||r!==i)&&(e({width:Number(i),height:Number(s)}),n=s,r=i)}),200));return ze("resize",o,t)}const VA=["INPUT","TEXTAREA","SELECT"],Ef=new WeakMap;function KA({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:f,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:m}){function g(k){let R=Do(k);const B=k.isTrusted,w=R&&kc(R.tagName);if(w==="OPTION"&&(R=R.parentElement),!R||!w||VA.indexOf(w)<0||Ge(R,r,o,s,!0))return;const O=R;if(O.classList.contains(i)||a&&O.matches(a))return;const M=Uu(R);let T=ti(O,w,M),$=!1;const x=ji({maskInputOptions:c,tagName:w,type:M}),Y=Er(R,d,h,p,m,x);(M==="radio"||M==="checkbox")&&($=R.checked),T=lo({isMasked:Y,element:R,value:T,maskInputFn:u}),y(R,f?{text:T,isChecked:$,userTriggered:B}:{text:T,isChecked:$});const X=R.name;M==="radio"&&X&&$&&t.querySelectorAll(`input[type="radio"][name="${X}"]`).forEach(P=>{if(P!==R){const K=lo({isMasked:Y,element:P,value:ti(P,w,M),maskInputFn:u});y(P,f?{text:K,isChecked:!$,userTriggered:!1}:{text:K,isChecked:!$})}})}function y(k,R){const B=Ef.get(k);if(!B||B.text!==R.text||B.isChecked!==R.isChecked){Ef.set(k,R);const w=n.getId(k);se(e)({...R,id:w})}}const E=(l.input==="last"?["change"]:["input","change"]).map(k=>ze(k,se(g),t)),b=t.defaultView;if(!b)return()=>{E.forEach(k=>k())};const N=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),I=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return N&&N.set&&E.push(...I.map(k=>S_(k[0],k[1],{set(){se(g)({target:this,isTrusted:!1})}},!1,b))),se(()=>{E.forEach(k=>k())})}function si(e){const t=[];function n(r,o){if(ss("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||ss("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||ss("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||ss("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else if(r.parentStyleSheet){const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(e,t)}function Zt(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function YA({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:se((l,f,d)=>{const[p,h]=d,{id:m,styleId:g}=Zt(f,t,n.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,adds:[{rule:p,index:h}]}),l.apply(f,d)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:se((l,f,d)=>{const[p]=d,{id:h,styleId:m}=Zt(f,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,removes:[{index:p}]}),l.apply(f,d)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:se((l,f,d)=>{const[p]=d,{id:h,styleId:m}=Zt(f,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replace:p}),l.apply(f,d)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:se((l,f,d)=>{const[p]=d,{id:h,styleId:m}=Zt(f,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:p}),l.apply(f,d)})}));const c={};is("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(is("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),is("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),is("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([l,f])=>{u[l]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(u[l].insertRule,{apply:se((d,p,h)=>{const[m,g]=h,{id:y,styleId:S}=Zt(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||S&&S!==-1)&&e({id:y,styleId:S,adds:[{rule:m,index:[...si(p),g||0]}]}),d.apply(p,h)})}),f.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:se((d,p,h)=>{const[m]=h,{id:g,styleId:y}=Zt(p.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||y&&y!==-1)&&e({id:g,styleId:y,removes:[{index:[...si(p),m]}]}),d.apply(p,h)})})}),se(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([l,f])=>{f.prototype.insertRule=u[l].insertRule,f.prototype.deleteRule=u[l].deleteRule})})}function x_({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const o=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(i){const a=s.set?.call(this,i);if(r!==null&&r!==-1)try{t.adoptStyleSheets(i,r)}catch{}return a}}),se(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function XA({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:se((a,c,u)=>{const[l,f,d]=u;if(n.has(l))return s.apply(c,[l,f,d]);const{id:p,styleId:h}=Zt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:l,value:f,priority:d},index:si(c.parentRule)}),a.apply(c,u)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:se((a,c,u)=>{const[l]=u;if(n.has(l))return i.apply(c,[l]);const{id:f,styleId:d}=Zt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(f&&f!==-1||d&&d!==-1)&&e({id:f,styleId:d,remove:{property:l},index:si(c.parentRule)}),a.apply(c,u)})}),se(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}function JA({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=se(u=>po(se(l=>{const f=Do(l);if(!f||Ge(f,t,n,r,!0))return;const{currentTime:d,volume:p,muted:h,playbackRate:m}=f;e({type:u,id:o.getId(f),currentTime:d,volume:p,muted:h,playbackRate:m})}),s.media||500)),c=[ze("play",a(Jn.Play),i),ze("pause",a(Jn.Pause),i),ze("seeked",a(Jn.Seeked),i),ze("volumechange",a(Jn.VolumeChange),i),ze("ratechange",a(Jn.RateChange),i)];return se(()=>{c.forEach(u=>u())})}function QA({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(c,u,l){const f=new s(c,u,l);return o.set(f,{family:c,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),f};const i=Wu(t.fonts,"add",function(a){return function(c){return Gi(se(()=>{const u=o.get(c);u&&(e(u),o.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=s}),r.push(i),se(()=>{r.forEach(a=>a())})}function ZA(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=se(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const l=[],f=u.rangeCount||0;for(let d=0;d<f;d++){const p=u.getRangeAt(d),{startContainer:h,startOffset:m,endContainer:g,endOffset:y}=p;Ge(h,r,o,s,!0)||Ge(g,r,o,s,!0)||l.push({start:n.getId(h),startOffset:m,end:n.getId(g),endOffset:y})}i({ranges:l})});return c(),ze("selectionchange",c)}function eN({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Wu(n.customElements,"define",function(o){return function(s,i,a){try{t({define:{name:s}})}catch{}return o.apply(this,[s,i,a])}})}function tN(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=A_(e,e.doc));const o=jA(e),s=qA(e),i=N_(e),a=GA(e,{win:n}),c=KA(e),u=JA(e);let l=()=>{},f=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(l=YA(e,{win:n}),f=x_(e,e.doc),d=XA(e,{win:n}),e.collectFonts&&(p=QA(e)));const h=ZA(e),m=eN(e),g=[];for(const y of e.plugins)g.push(y.observer(y.callback,n,y.options));return se(()=>{vs(y=>y.reset()),r?.disconnect(),o(),s(),i(),a(),c(),u(),l(),f(),d(),p(),h(),m(),g.forEach(y=>y())})}function ss(e){return typeof window[e]<"u"}function is(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class xc{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){const s=r||this.getIdToRemoteIdMap(t),i=o||this.getRemoteIdToIdMap(t);let a=s.get(n);return a||(a=this.generateIdFn(),s.set(n,a),i.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,o))}getRemoteId(t,n,r){const o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=o.get(n);return s||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class nN{constructor(){this.crossOriginIframeMirror=new xc(Hu),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class rN{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new xc(Hu),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new xc(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0);const n=mo(t);n&&this.crossOriginIframeMap.set(n,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&mo(t)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=ju(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const o=this.crossOriginIframeMap.get(t.source);if(!o)return;const s=this.transformCrossOriginEvent(o,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case Q.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:Q.IncrementalSnapshot,data:{source:G.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Q.Meta:case Q.Load:case Q.DomContentLoaded:return!1;case Q.Plugin:return n;case Q.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case Q.IncrementalSnapshot:switch(n.data.source){case G.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(r.node,o)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case G.Drag:case G.TouchMove:case G.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case G.ViewportResize:return!1;case G.MediaInteraction:case G.MouseInteraction:case G.Scroll:case G.CanvasMutation:case G.Input:return this.replaceIds(n.data,t,["id"]),n;case G.StyleSheetRule:case G.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case G.Font:return n;case G.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case G.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,o){for(const s of o)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==ke.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class oN{init(){}addShadowRoot(){}observeAttachShadow(){}removeShadowRootsFor(){}reset(){}}class sN{constructor(t){this.shadowDoms=new WeakSet,this.shadowRootTeardowns=new Map,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!no(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const r=[];this.shadowRootTeardowns.set(t,r),this.bypassOptions.canvasManager.addShadowRoot(t);const o=A_({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);r.push(()=>zA(o)),r.push(N_({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Gi(()=>{this.shadowRootTeardowns.get(t)===r&&(t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),r.push(x_({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)))},0)}removeShadowRoot(t){const n=this.shadowRootTeardowns.get(t);n&&(n.forEach(r=>{try{r()}catch{}}),this.shadowRootTeardowns.delete(t)),this.shadowDoms.delete(t)}removeShadowRootsFor(t){if(this.shadowRootTeardowns.size!==0){if(ri(t)){const n=t.shadowRoot;this.shadowDoms.has(n)&&!oi(t)&&this.removeShadowRoot(n),this.removeShadowRootsFor(n)}t.childNodes?.forEach(n=>this.removeShadowRootsFor(n))}}observeAttachShadow(t){const n=ju(t),r=mo(t);if(!n||!r)return;let o;try{o=r.Element}catch{return}o&&this.patchAttachShadow(o,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Wu(t.prototype,"attachShadow",function(o){return function(s){const i=o.call(this,s);return this.shadowRoot&&oi(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowRootTeardowns.forEach(t=>{t.forEach(n=>{try{n()}catch{}})}),this.shadowRootTeardowns=new Map,this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class iN{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new xA,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},o=[];for(const s of t){let i;this.styleMirror.has(s)?i=this.styleMirror.getId(s):(i=this.styleMirror.add(s),o.push({styleId:i,rules:Array.from(s.rules||CSSRule,(a,c)=>({rule:d_(a),index:c}))})),r.styleIds.push(i)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class aN{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,PA(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Ee,ii;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ct=rA();function st(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:f=null,maskTextSelector:d=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:S,maskInputFn:E,maskTextFn:b,maxCanvasSize:N=null,packFn:I,sampling:k={},dataURLOptions:R={},mousemoveWait:B,recordDOM:w=!0,recordCanvas:O=!1,recordCrossOriginIframes:M=!1,recordAfter:T=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:$=!1,collectFonts:x=!1,inlineImages:Y=!1,plugins:X,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:K=new Set([]),errorHandler:F,onMutation:Z,getCanvasManager:Se}=e;DA(F);const ae=M?window.parent===window:!0;let Be=!1;if(!ae)try{window.parent.document&&(Be=!1)}catch{Be=!0}if(ae&&!t)throw new Error("emit function is required");if(!ae&&!Be)return()=>{};B!==void 0&&k.mousemove===void 0&&(k.mousemove=B),ct.reset();const qt=m===!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,hidden:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g!==void 0?g:{},Ur=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y||{};NA();let zn=0,jn=0,Hr=0;const jo=H=>{for(const Ie of X||[])Ie.eventProcessor&&(H=Ie.eventProcessor(H));return I&&!Be&&(H=I(H)),H};Ee=(H,Ie)=>{const ee=H;if(ee.timestamp=ho(),go[0]?.isFrozen()&&ee.type!==Q.FullSnapshot&&!(ee.type===Q.IncrementalSnapshot&&ee.data.source===G.Mutation)&&vs(oe=>oe.unfreeze()),ae)t?.(jo(ee),Ie);else if(Be){const oe={type:"rrweb",event:jo(ee),origin:window.location.origin,isCheckout:Ie};window.parent.postMessage(oe,"*")}if(ee.type===Q.FullSnapshot)zn=ee.timestamp,jn=0,Hr=0;else if(ee.type===Q.IncrementalSnapshot){if(ee.data.source===G.Mutation&&ee.data.isAttachIframe)return;jn++;const oe=r&&jn>=r,J=n&&zn&&ee.timestamp-zn>n;(oe||J)&&ie(!0)}};const yn=H=>{Ee({type:Q.IncrementalSnapshot,data:{source:G.Mutation,...H}})},gt=H=>Ee({type:Q.IncrementalSnapshot,data:{source:G.Scroll,...H}}),et=H=>Ee({type:Q.IncrementalSnapshot,data:{source:G.CanvasMutation,...H}}),Gt=H=>Ee({type:Q.IncrementalSnapshot,data:{source:G.AdoptedStyleSheet,...H}}),Ke=new iN({mutationCb:yn,adoptedStyleSheetCb:Gt}),_t=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new nN:new rN({mirror:ct,mutationCb:yn,stylesheetManager:Ke,recordCrossOriginIframes:M,wrappedEmit:Ee});for(const H of X||[])H.getMirror&&H.getMirror({nodeMirror:ct,crossOriginIframeMirror:_t.crossOriginIframeMirror,crossOriginIframeStyleMirror:_t.crossOriginIframeStyleMirror});const qn=new aN,Gn=uN(Se,{mirror:ct,win:window,mutationCb:H=>Ee({type:Q.IncrementalSnapshot,data:{source:G.CanvasMutation,...H}}),recordCanvas:O,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:N,sampling:k.canvas,dataURLOptions:R,errorHandler:F}),Vt=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new oN:new sN({mutationCb:yn,scrollCb:gt,bypassOptions:{onMutation:Z,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:qt,dataURLOptions:R,maskAttributeFn:S,maskTextFn:b,maskInputFn:E,recordCanvas:O,inlineImages:Y,sampling:k,slimDOMOptions:Ur,iframeManager:_t,stylesheetManager:Ke,canvasManager:Gn,keepIframeSrcFn:P,processedNodeManager:qn,ignoreCSSAttributes:K},mirror:ct}),ie=(H=!1)=>{if(!w)return;Ee({type:Q.Meta,data:{href:window.location.href,width:E_(),height:v_()}},H),Ke.reset(),Vt.init(),vs(ee=>ee.lock());let Ie=!1;try{const ee=CA(document,{mirror:ct,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:qt,maskAttributeFn:S,maskInputFn:E,maskTextFn:b,slimDOM:Ur,dataURLOptions:R,recordCanvas:O,inlineImages:Y,onSerialize:oe=>{I_(oe,ct)&&_t.addIframe(oe),k_(oe,ct)&&Ke.trackLinkElement(oe),ri(oe)&&Vt.addShadowRoot(oe.shadowRoot,document)},onIframeLoad:(oe,J)=>{_t.attachIframe(oe,J);const $e=mo(oe);$e&&Gn.addWindow($e),Vt.observeAttachShadow(oe)},onStylesheetLoad:(oe,J)=>{Ke.attachLinkElement(oe,J)},onBlockedImageLoad:(oe,J,{width:$e,height:Rt})=>{yn({adds:[],removes:[],texts:[],attributes:[{id:J.id,attributes:{style:{width:`${$e}px`,height:`${Rt}px`}}}]})},keepIframeSrcFn:P,ignoreCSSAttributes:K});if(!ee)return console.warn("Failed to snapshot the document");Ee({type:Q.FullSnapshot,data:{node:ee,initialOffset:b_(window)}}),Ie=!0}finally{if(!Ie){if(Hr++,n){const ee=Math.min(1e3*2**(Hr-1),n);zn=ho()-n+ee}jn=0}vs(ee=>ee.unlock())}document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ke.adoptStyleSheets(document.adoptedStyleSheets,ct.getId(document))};ii=ie;try{const H=[],Ie=oe=>se(tN)({onMutation:Z,mutationCb:yn,mousemoveCb:(J,$e)=>Ee({type:Q.IncrementalSnapshot,data:{source:$e,positions:J}}),mouseInteractionCb:J=>Ee({type:Q.IncrementalSnapshot,data:{source:G.MouseInteraction,...J}}),scrollCb:gt,viewportResizeCb:J=>Ee({type:Q.IncrementalSnapshot,data:{source:G.ViewportResize,...J}}),inputCb:J=>Ee({type:Q.IncrementalSnapshot,data:{source:G.Input,...J}}),mediaInteractionCb:J=>Ee({type:Q.IncrementalSnapshot,data:{source:G.MediaInteraction,...J}}),styleSheetRuleCb:J=>Ee({type:Q.IncrementalSnapshot,data:{source:G.StyleSheetRule,...J}}),styleDeclarationCb:J=>Ee({type:Q.IncrementalSnapshot,data:{source:G.StyleDeclaration,...J}}),canvasMutationCb:et,fontCb:J=>Ee({type:Q.IncrementalSnapshot,data:{source:G.Font,...J}}),selectionCb:J=>{Ee({type:Q.IncrementalSnapshot,data:{source:G.Selection,...J}})},customElementCb:J=>{Ee({type:Q.IncrementalSnapshot,data:{source:G.CustomElement,...J}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,maskInputOptions:qt,inlineStylesheet:h,sampling:k,recordDOM:w,recordCanvas:O,inlineImages:Y,userTriggeredOnInput:$,collectFonts:x,doc:oe,maskAttributeFn:S,maskInputFn:E,maskTextFn:b,keepIframeSrcFn:P,blockSelector:s,unblockSelector:i,slimDOMOptions:Ur,dataURLOptions:R,mirror:ct,iframeManager:_t,stylesheetManager:Ke,shadowDomManager:Vt,processedNodeManager:qn,canvasManager:Gn,ignoreCSSAttributes:K,plugins:X?.filter(J=>J.observer)?.map(J=>({observer:J.observer,options:J.options,callback:$e=>Ee({type:Q.Plugin,data:{plugin:J.name,payload:$e}})}))||[]},{});_t.addLoadListener(oe=>{try{H.push(Ie(oe.contentDocument))}catch(J){console.warn(J)}});const ee=()=>{ie(),H.push(Ie(document))};return document.readyState==="interactive"||document.readyState==="complete"?ee():(H.push(ze("DOMContentLoaded",()=>{Ee({type:Q.DomContentLoaded,data:{}}),T==="DOMContentLoaded"&&ee()})),H.push(ze("load",()=>{Ee({type:Q.Load,data:{}}),T==="load"&&ee()},window))),()=>{H.forEach(oe=>oe()),qn.destroy(),ii=void 0,$A()}}catch(H){console.warn(H)}}function cN(e){if(!ii)throw new Error("please take full snapshot after start recording");ii(e)}st.mirror=ct;st.takeFullSnapshot=cN;function uN(e,t){try{return e?e(t):new _f}catch{return console.warn("Unable to initialize CanvasManager"),new _f}}var wf;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(wf||(wf={}));const lN=3,dN=5;function qu(e){return e>9999999999?e:e*1e3}function $a(e){return e>9999999999?e/1e3:e}function $o(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Q.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Te(t,10,1e3)}}),t.category==="console")))}const fN="button,a";function M_(e){return e.closest(fN)||e}function O_(e){const t=P_(e);return!t||!(t instanceof Element)?t:M_(t)}function P_(e){return pN(e)?e.target:e}function pN(e){return rt(e)&&"target"in e}let en;function hN(e){return en||(en=[],mN()),en.push(e),()=>{const t=en?en.indexOf(e):-1;t>-1&&en.splice(t,1)}}function mN(){Pe(ge,"open",function(e){return function(...t){if(en)try{en.forEach(n=>n())}catch{}return e.apply(ge,t)}})}const gN=new Set([G.Mutation,G.StyleSheetRule,G.StyleDeclaration,G.AdoptedStyleSheet,G.CanvasMutation,G.Selection,G.MediaInteraction]);function _N(e,t,n){e.handleClick(t,n)}class yN{constructor(t,n,r=$o){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=hN(()=>{this._lastMutation=Tf()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(bN(n,this._ignoreSelector)||!vN(t))return;const r={timestamp:$a(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=$a(t)}registerScroll(t=Date.now()){this._lastScroll=$a(t)}registerClick(t){const n=M_(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=Tf();this._clicks.forEach(r=>{r.mutationAfter===void 0&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),r.scrollAfter===void 0&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter!==void 0&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter!==void 0&&t.mutationAfter<=this._threshold,s=!r&&!o,{clickCount:i,clickBreadcrumb:a}=t;if(s){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:ge.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,l);return}if(i>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:ge.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Oo(()=>this._checkClicks(),1e3)}}const SN=["A","BUTTON","INPUT"];function bN(e,t){return!!(!SN.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function vN(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Tf(){return Date.now()/1e3}function EN(e,t){try{if(!wN(t))return;const{source:n}=t.data;if(gN.has(n)&&e.registerMutation(t.timestamp),n===G.Scroll&&e.registerScroll(t.timestamp),TN(t)){const{type:r,id:o}=t.data,s=st.mirror.getNode(o);s instanceof HTMLElement&&r===Ue.Click&&e.registerClick(s)}}catch{}}function wN(e){return e.type===lN}function TN(e){return e.data.source===G.MouseInteraction}function St(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Vi=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Vi||{});const L_=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]),IN=new Set([...L_,"data-sentry-element"]);function kN(e){const t={};for(const n in e)if(L_.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return!t["data-sentry-component"]&&e["data-sentry-element"]&&(t["data-sentry-component"]=e["data-sentry-element"]),t}const RN=e=>t=>{if(!e.isEnabled())return;const n=CN(t,e.getMaskAttributeFn());if(!n)return;const r=t.name==="click",o=r?t.event:void 0;r&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&_N(e.clickDetector,n,O_(t.event)),$o(e,n)};function D_(e,t){const n=st.mirror.getId(e),r=n&&st.mirror.getNode(n),o=r&&st.mirror.getMeta(r),s=o&&NN(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(i=>i.type===Vi.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:kN(s.attributes)}}:{}}}function CN(e,t){const{target:n,message:r}=AN(e,t);return St({category:`ui.${e.name}`,...D_(n,r)})}function AN(e,t){const n=e.name==="click";let r,o=null;try{o=n?O_(e.event):P_(e.event),r=Qe(o,{maxStringLength:200,maskAttributeFn:t})||"<unknown>"}catch{r="<unknown>"}return{target:o,message:r}}function NN(e){return e.type===Vi.Element}function xN(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=MN(t,e.getMaskAttributeFn());n&&$o(e,n)}function MN(e,t){const{metaKey:n,shiftKey:r,ctrlKey:o,altKey:s,key:i,target:a}=e;if(!a||ON(a)||!i)return null;const c=n||o||s,u=i.length===1;if(!c&&u)return null;const l=Qe(a,{maxStringLength:200,maskAttributeFn:t})||"<unknown>",f=D_(a,l);return St({category:"ui.keyDown",message:l,data:{...f.data,metaKey:n,shiftKey:r,ctrlKey:o,altKey:s,key:i}})}function ON(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const PN={resource:BN,paint:$N,navigation:FN};function Fa(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function LN(e){return e.map(DN).filter(Boolean)}function DN(e){const t=PN[e.entryType];return t?t(e):null}function wr(e,t=e){return De(e,t)}function $N(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=wr(o);return{type:n,name:r,start:s,end:s+t,data:void 0}}function FN(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:f,redirectCount:d,startTime:p,transferSize:h,type:m}=e;return o===0?null:{type:`${t}.${m}`,start:wr(p),end:wr(s,p),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:f,domComplete:s,redirectCount:d}}}function BN(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:wr(s),end:wr(o,s),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function UN(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return Gu(e,"largest-contentful-paint",n)}function HN(e){return e.sources!==void 0}function WN(e){const t=[],n=[];for(const r of e.entries)if(HN(r)){const o=[];for(const s of r.sources)if(s.node){n.push(s.node);const i=st.mirror.getId(s.node);i&&o.push(i)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return Gu(e,"cumulative-layout-shift",n,t)}function zN(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return Gu(e,"interaction-to-next-paint",n)}function Gu(e,t,n,r){const o=e.value,s=e.rating,i=e.entries[e.entries.length-1],a=wr(i?.startTime??(e.navigationStartTime??0)+o);return{type:"web-vital",name:t,start:a,end:a,data:{value:o,size:o,rating:s,nodeIds:n?n.map(c=>st.mirror.getId(c)):void 0,attributions:r}}}function jN(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(o=>{r.push(ut(o,n))}),r.push(Ks(Fa(UN,e)),Vs(Fa(WN,e)),bc(Fa(zN,e))),()=>{r.forEach(o=>o())}}const W=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,qN='var t=Uint8Array,r=Uint16Array,n=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new r(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new n(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new r(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,n,e){for(var i=t.length,s=0,a=new r(n);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new r(n);for(s=1;s<n;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new r(1<<n);var f=15-n;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=n-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new r(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(r,n,e){return(null==e||e>r.length)&&(e=r.length),new t(r.subarray(n,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,r,n){var e=new Error(r||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!n)throw e;return e},z=function(t,r,n){n<<=7&r;var e=r/8|0;t[e]|=n,t[e+1]|=n>>8},_=function(t,r,n){n<<=7&r;var e=r/8|0;t[e]|=n,t[e+1]|=n>>8,t[e+2]|=n>>16},x=function(n,e){for(var i=[],s=0;s<n.length;++s)n[s]&&i.push({s:s,f:n[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,r){return t.f-r.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new r(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,r){return p[r.s]-p[t.s]||t.f-r.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,r,n){return-1==t.s?Math.max(A(t.l,r,n+1),A(t.r,r,n+1)):r[t.s]=n},D=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new r(++n),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=n;++h)if(t[h]==s&&h!=n)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:n}},T=function(t,r){for(var n=0,e=0;e<r.length;++e)n+=t[e]*r[e];return n},k=function(t,r,n){var e=n.length,i=m(r+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=n[s];return 8*(i+4+e)},U=function(t,n,a,o,h,f,l,u,c,v,m){z(n,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new r(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(n,m,t.subarray(c,c+v));if(z(n,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(n,m,S-257),z(n,m+5,j-1),z(n,m+10,K-4),m+=14;for(B=0;B<K;++B)z(n,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var rt=31&tt[B];z(n,m,Y[rt]),m+=H[rt],rt>15&&(z(n,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var nt=o[B];if(nt>255){_(n,m,N[(rt=nt>>18&31)+257]),m+=P[rt+257],rt>7&&(z(n,m,nt>>23&31),m+=e[rt]);var et=31&nt;_(n,m,Q[et]),m+=R[et],et>3&&(_(n,m,nt>>5&8191),m+=i[et])}else _(n,m,N[nt]),m+=P[nt]}return _(n,m,N[256]),m+P[256]},C=new n([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),r=0;r<256;++r){for(var n=r,e=9;--e;)n=(1&n&&-306674912)^n>>>1;t[r]=n}return t}(),S=function(){var t=1,r=0;return{p:function(n){for(var e=t,i=r,s=0|n.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=n[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,r=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(r%=65521))<<8|r>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new r(32768),x=c.h||new r(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new n(25e3),I=new r(288),S=new r(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),rt=0;for(P=0;P<tt;++P){var nt=j-W+P&32767,et=nt-_[nt]&32767;et>rt&&(rt=et,K=nt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,r,n){for(;n;++r)t[r]=n,n>>>=8},j=function(){function r(r,n){if("function"==typeof r&&(n=r,r={}),this.ondata=n,this.o=r||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return r.prototype.p=function(t,r){this.ondata(L(t,this.o,0,0,this.s),r)},r.prototype.push=function(r,n){this.ondata||E(5),this.s.l&&E(4);var e=r.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(r.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(r.subarray(s),32768),this.s.z=r.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(r,this.s.z),this.s.z+=r.length;this.s.l=1&n,(this.s.z>this.s.w+8191||n)&&(this.p(this.b,n||!1),this.s.w=this.s.i,this.s.i-=2),n&&(this.s=this.o={},this.b=F)},r.prototype.flush=function(r){if(this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2,r){var n=new t(6);n[0]=this.s.r>>3;var e=k(n,this.s.r,F);this.s.r=0,this.ondata(n.subarray(0,e>>3),!1)}},r}();function q(t,r){r||(r={});var n=function(){var t=-1;return{p:function(r){for(var n=t,e=0;e<r.length;++e)n=I[255&n^r[e]]^n>>>8;t=n},d:function(){return~t}}}(),e=t.length;n.p(t);var i,s=L(t,r,10+((i=r).filename?i.filename.length+1:0),8),a=s.length;return function(t,r){var n=r.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=r.level<2?4:9==r.level?2:0,t[9]=3,0!=r.mtime&&O(t,4,Math.floor(new Date(r.mtime||Date.now())/1e3)),n){t[3]=8;for(var e=0;e<=n.length;++e)t[e+10]=n.charCodeAt(e)}}(s,r),O(s,a-8,n.d()),O(s,a-4,e),s}var B=function(){function t(t,r){this.c=S(),this.v=1,j.call(this,t,r)}return t.prototype.push=function(t,r){this.c.p(t),j.prototype.push.call(this,t,r)},t.prototype.p=function(t,r){var n=L(t,this.o,this.v&&(this.o.dictionary?6:2),r&&4,this.s);this.v&&(function(t,r){var n=r.level,e=0==n?0:n<6?1:9==n?3:2;if(t[0]=120,t[1]=e<<6|(r.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,r.dictionary){var i=S();i.p(r.dictionary),O(t,2,i.d())}}(n,this.o),this.v=0),r&&O(n,n.length-4,this.c.d()),this.ondata(n,r)},t.prototype.flush=function(t){j.prototype.flush.call(this,t)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,r){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=r||!1)},t}();function K(r,n){if(G)return G.encode(r);for(var e=r.length,i=new t(r.length+(r.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=r.charCodeAt(o);f<128||n?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&r.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const r=this._hasEvents?",":"";this.stream.push(r+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let r=0;for(const n of t)r+=n.length;const n=new Uint8Array(r);for(let r=0,e=0,i=t.length;r<i;r++){const i=t[r];n.set(i,e),e+=i.length}return n}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,r)=>{this._deflatedData.push(t)},this.stream=new J((t,r)=>{this.deflate.push(t,r)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const r=t.data.method,n=t.data.id,e=t.data.arg;if(r in P&&"function"==typeof P[r])try{const t=P[r](e);postMessage({id:n,method:r,success:!0,response:t})}catch(t){postMessage({id:n,method:r,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function GN(){const e=new Blob([qN],{type:"text/javascript"});return URL.createObjectURL(e)}const If=["log","warn","error"],Es="[Replay] ";function Ba(e,t="info"){Tt({category:"console",data:{logger:"replay"},level:t,message:`${Es}${e}`},{level:t})}function VN(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return W?(If.forEach(r=>{n[r]=(...o)=>{_[r](Es,...o),t&&Ba(o.join(""),Us(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),_.error(Es,r),e?Pn(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Ba(r,"error")},n.infoTick=(...r)=>{_.log(Es,...r),t&&setTimeout(()=>Ba(r[0]),0)}):If.forEach(r=>{n[r]=()=>{}}),n}const z=VN();class Vu extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Bu}.`)}}class $_ extends Error{constructor(){super("Worker destroyed")}}class F_{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Bu)throw new Vu;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(const{timestamp:n}of this.events)(t===null||n<t)&&(t=n);return t===null?t:qu(t)}}class KN{constructor(t){this._onMessage=({data:n})=>{const r=n;if(typeof r.id!="number")return;const o=this._pending.get(r.id);if(!(!o||o.method!==r.method)){if(this._pending.delete(r.id),!r.success){W&&z.error("Error in compression worker: ",r.response),o.reject(new Error("Error in compression worker"));return}o.resolve(r.response)}},this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():(W&&z.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{W&&z.warn("Failed to load Replay compression worker",r),n(new Error(`Failed to load Replay compression worker: ${r instanceof ErrorEvent&&r.message?r.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){W&&z.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new $_)),this._pending.clear(),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((o,s)=>{this._pending.set(r,{method:t,resolve:o,reject:s});try{this._worker.postMessage({id:r,method:t,arg:n})}catch(i){this._pending.delete(r),s(i)}})}_getAndIncrementId(){return this._id++}}class YN{constructor(t){this._worker=new KN(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=qu(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Bu?Promise.reject(new Vu):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{W&&z.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class XN{constructor(t){this._fallback=new F_,this._compression=new YN(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){W&&z.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,o=[];for(const s of t)o.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(s){if(s instanceof $_)return;W&&z.exception(s,"Failed to add events when switching buffers.")}}}function JN({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=QN(t);if(n)return n}return W&&z.log("Using simple buffer"),new F_}function QN(e){try{const t=e||ZN();if(!t)return;W&&z.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new XN(n)}catch(t){W&&z.exception(t,"Failed to create compression worker")}}function ZN(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?GN():""}function Ku(){try{return"sessionStorage"in ge&&!!ge.sessionStorage}catch{return!1}}function ex(e){tx(),e.session=void 0}function tx(){if(Ku())try{ge.sessionStorage.removeItem($u)}catch{}}function B_(e){return e===void 0?!1:Math.random()<e}function Ki(e){if(Ku())try{ge.sessionStorage.setItem($u,JSON.stringify(e))}catch{}}function U_(e){const t=Date.now(),n=e.id||Le(),r=e.started||t,o=e.lastActivity||t,s=e.segmentId||0,i=e.sampled,a=e.previousSessionId,c=e.dirty||!1;return{id:n,started:r,lastActivity:o,segmentId:s,sampled:i,previousSessionId:a,dirty:c}}function nx(e,t){return B_(e)?"session":t?"buffer":!1}function kf({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=nx(e,t),s=U_({sampled:o,previousSessionId:r});return n&&Ki(s),s}function rx(){if(!Ku())return null;try{const e=ge.sessionStorage.getItem($u);if(!e)return null;const t=JSON.parse(e);return W&&z.infoTick("Loading existing session"),U_(t)}catch{return null}}function Mc(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function ox(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Mc(e.started,t,r)||Mc(e.lastActivity,n,r)}function ai(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!ox(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Ua({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&rx();return o?ai(o,{sessionIdleExpire:e,maxReplayDuration:t})?(W&&z.infoTick("Session in sessionStorage is expired, creating new one..."),kf(r,{previousSessionId:o.id})):o:(W&&z.infoTick("Creating new session"),kf(r,{previousSessionId:n}))}function sx(e){return e.type===Q.Custom}function Yu(e,t,n){return W_(e,t)?(H_(e,t,n),!0):!1}function ix(e,t,n){return W_(e,t)?H_(e,t,n):Promise.resolve(null)}async function H_(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o=e.recordingMode==="buffer";try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=e.getOptions(),i=ax(t,s.beforeAddRecordingEvent);return i?await r.addEvent(i):void 0}catch(s){if(!e.isEnabled())return e.handleException(s),null;const i=s&&s instanceof Vu,a=i?"eventBufferOverflow":"eventBufferError",c=v();if(c){const u=i?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(u,"replay")}if(i&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(s),await e.stop({reason:a})}}function W_(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=qu(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(W&&z.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function ax(e,t){try{if(typeof t=="function"&&sx(e))return t(e)}catch(n){return W&&z.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}const Rf=100;function z_(e,t,n){const r=e.getContext();t&&r.traceIds.size<Rf&&r.traceIds.add(t),n&&r.segmentNames.size<Rf&&r.segmentNames.add(n)}function cx(e){return t=>{e.isEnabled()&&z_(e,t.trace_id,t.name||void 0)}}function Xu(e){return!e.type}function Oc(e){return e.type==="transaction"}function ux(e){return e.type==="replay_event"}function Cf(e){return e.type==="feedback"}function lx(e){return(t,n)=>{if(!e.isEnabled()||!Xu(t)&&!Oc(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Oc(t)){dx(e,t);return}fx(e,t)}}}function dx(e,t){z_(e,t.contexts?.trace?.trace_id,t.transaction)}function fx(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||Oo(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function px(e){return t=>{!e.isEnabled()||!Xu(t)||hx(e,t)}}function hx(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=St({category:"replay.hydrate-error",data:{url:Wt()}});$o(e,r)}}function mx(e){const t=v();t&&t.on("beforeAddBreadcrumb",n=>gx(e,n))}function gx(e,t){if(!e.isEnabled()||!j_(t))return;const n=_x(t);n&&$o(e,n)}function _x(e){return!j_(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?yx(e):St(e)}function yx(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return St(e);let n=!1;const r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>rs?(n=!0,`${o.slice(0,rs)}…`):o;if(typeof o=="object")try{const s=Te(o,7);return JSON.stringify(s).length>rs?(n=!0,`${JSON.stringify(s,null,2).slice(0,rs)}…`):s}catch{}return o});return St({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function j_(e){return!!e.category}function Sx(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function ci(){const e=q().getPropagationContext().dsc;e&&delete e.replay_id;const t=he();if(t){const n=it(t);delete n.replay_id}}function Af(e){const t=q().getPropagationContext().dsc;t&&(t.replay_id=e);const n=he();if(n){const r=it(n);r.replay_id=e}}function bx(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Q.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function vx(e,t){return e.recordingMode!=="buffer"||t.message===Fu||!t.exception||t.type?!1:B_(e.getOptions().errorSampleRate)}function Ex(e){return Object.assign((t,n)=>{if(e.session&&ai(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&ci(),!e.isEnabled()||e.isPaused())return t;if(ux(t))return delete t.breadcrumbs,t;if(!Xu(t)&&!Oc(t)&&!Cf(t))return t;if(!e.checkAndHandleExpiredSession())return ci(),t;if(Cf(t)){const i=e.getSessionId(),a=t.contexts.feedback.replay_id;return a&&a!==i||(e.flush(),t.contexts.feedback.replay_id=i,bx(e,t)),t}if(Sx(t,n)&&!e.getOptions()._experiments.captureExceptions)return W&&z.log("Ignoring error from rrweb internals",t),null;const o=vx(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const i=e.session;i.dirty=!0,e.getOptions().stickySession&&Ki(i)}return t},{id:"Replay"})}function Yi(e,t){return t.map(({type:n,start:r,end:o,name:s,data:i})=>{const a=e.throttledAddEvent({type:Q.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:o,data:i}}});return typeof a=="string"?Promise.resolve(null):a})}function wx(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Tx(e){return t=>{if(!e.isEnabled())return;const n=wx(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Yi(e,[n]),!1)))}}function Ix(e,t){return W&&e.getOptions()._experiments.traceInternals?!1:Am(t,v())}function q_(e,t){e.isEnabled()&&t!==null&&(Ix(e,t.name)||e.addUpdate(()=>(Yi(e,[t]),!0)))}function Xi(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=zg(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function G_(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function ui(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function V_(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:s,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:s,statusCode:i,request:a,response:c}}}function _o(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function on(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=kx(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function Pc(e,t){return Object.entries(e).reduce((n,[r,o])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=o),n},{})}function kx(e){if(!e||typeof e!="string")return{body:e};const t=e.length>uf,n=Rx(e);if(t){const r=e.slice(0,uf);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Rx(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function li(e,t){const n=Cx(e);return jt(n,t)}function Cx(e,t=ge.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(ge.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function Ax(e,t,n){try{const r=await xx(e,t,n),o=V_("resource.fetch",r);q_(n.replay,o)}catch(r){W&&z.exception(r,"Failed to capture fetch breadcrumb")}}function Nx(e,t){const{input:n,response:r}=t,o=n?Lu(n):void 0,s=Xi(o),i=r?G_(r.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}async function xx(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,f=li(i,n.networkDetailAllowUrls)&&!li(i,n.networkDetailDenyUrls),d=f?Mx(n,t.input,u):_o(u),p=await Ox(f,n,t.response,l);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:d,response:p}}function Mx({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?Dx(n,t):{};if(!e)return on(o,r,void 0);const s=Lu(n),[i,a]=Qs(s,z),c=on(o,r,i);return a?ui(c,a):c}async function Ox(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return _o(o);const s=r?K_(r.headers,n):{};if(!r||!t&&o!==void 0)return on(s,o,void 0);const[i,a]=await Lx(r),c=Px(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?ui(c,a):c}function Px(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&n===void 0?Xi(e):n;return r?t?on(o,s,e):on(o,s,void 0):_o(s)}catch(s){return W&&z.exception(s,"Failed to serialize response body"),on(o,n,void 0)}}async function Lx(e){const t=$x(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Fx(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(W&&z.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(W&&z.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function K_(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Dx(e,t){return e.length===1&&typeof e[0]!="string"?Nf(e[0],t):e.length===2?Nf(e[1],t):{}}function Nf(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?K_(n,t):Array.isArray(n)?{}:Pc(n,t):{}}function $x(e){try{return e.clone()}catch(t){W&&z.exception(t,"Failed to clone response body")}}function Fx(e){return new Promise((t,n)=>{const r=Oo(()=>n(new Error("Timeout while trying to read response body")),500);Bx(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function Bx(e){return e.text()}async function Ux(e,t,n){try{const r=Wx(e,t,n),o=V_("resource.xhr",r);q_(n.replay,o)}catch(r){W&&z.exception(r,"Failed to capture xhr breadcrumb")}}function Hx(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=Xi(r),s=n.getResponseHeader("content-length")?G_(n.getResponseHeader("content-length")):qx(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}function Wx(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:f,response_body_size:d}=e.data;if(!c)return null;if(!a||!li(c,n.networkDetailAllowUrls)||li(c,n.networkDetailDenyUrls)){const I=_o(f),k=_o(d);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:l,request:I,response:k}}const p=a[xt],h=p?Pc(p.request_headers,n.networkRequestHeaders):{},m=Pc(jg(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?Qs(i,z):[void 0],[S,E]=n.networkCaptureBodies?zx(a):[void 0],b=on(h,f,g),N=on(m,d,S);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:l,request:y?ui(b,y):b,response:E?ui(N,E):N}}function zx(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return jx(e.response,e.responseType)}catch(n){t.push(n)}return W&&z.warn("Failed to get xhr response body",...t),[void 0]}function jx(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&rt(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return W&&z.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return W&&z.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function qx(e,t){try{const n=t==="json"&&rt(e)?JSON.stringify(e):e;return Xi(n)}catch{return}}function Gx(e){const t=v();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(c,u)=>Vx(a,c,u))}catch{}}function Vx(e,t,n){if(t.data)try{Kx(t)&&Xx(n)&&(Hx(t,n),Ux(t,n,e)),Yx(t)&&Jx(n)&&(Nx(t,n),Ax(t,n,e))}catch(r){W&&z.exception(r,"Error when enriching network breadcrumb")}}function Kx(e){return e.category==="xhr"}function Yx(e){return e.category==="fetch"}function Xx(e){return e?.xhr}function Jx(e){return e?.input!==void 0}function Qx(e){const t=v();Wg(RN(e)),Hi(Tx(e)),mx(e),Gx(e);const n=Ex(e);if(bE(n),t){t.on("beforeSendEvent",px(e)),t.on("afterSendEvent",lx(e)),t.on("createDsc",o=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(o.replay_id=s)}),t.on("processSegmentSpan",cx(e)),t.on("spanStart",o=>{e.lastActiveSpan=o}),t.on("spanEnd",o=>{e.lastActiveSpan=o});let r;t.on("beforeSendFeedback",async(o,s)=>{const i=o.contexts?.feedback;if(!s?.includeReplay||!i)return;if(i.source==="widget"&&r){i.replay_id=r,r=void 0;return}const a=e.getSessionId();e.isEnabled()&&a&&(i.source==="api"&&await e.sendBufferedReplayOrFlush(),i.replay_id=a)}),t.on("openFeedbackWidget",async()=>{r=void 0,await e.sendBufferedReplayOrFlush(),r=e.isEnabled()?e.getSessionId():void 0})}}async function Zx(e){try{return await Promise.all(Yi(e,[eM(ge.performance.memory)]))}catch{return[]}}function eM(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function tM(e,t,n){return Nv(e,t,{...n,setTimeoutImpl:Oo})}const as=D.navigator;function nM(){return/iPhone|iPad|iPod/i.test(as?.userAgent??"")||/Macintosh/i.test(as?.userAgent??"")&&as?.maxTouchPoints&&as?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function rM(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){W&&z.warn("Received replay event after session expired.");return}const o=r||!t;t=!0,oM(n),e.clickDetector&&EN(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!Yu(e,n,o))return!0;if(!o)return!1;const s=e.session;if(iM(e,o),e.recordingMode==="buffer"&&s&&e.eventBuffer&&!s.dirty){const i=e.eventBuffer.getEarliestTimestamp();i&&(W&&z.log(`Updating session start time to earliest event in buffer to ${new Date(i)}`),s.started=i,e.getOptions().stickySession&&Ki(s))}return s?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}catch(o){e.handleException(o)}}}function oM(e){const t=e.data;if(!(e.type!==Q.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==G.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(const n of t.attributes){const r=st.mirror.getNode(n.id),o=r&&st.mirror.getMeta(r);if(!r||o?.type!==Vi.Element)continue;const s={...o.attributes};let i=!1;for(const[a,c]of Object.entries(n.attributes))IN.has(a)&&(c===null?delete s[a]:s[a]=c,i=!0);i&&st.mirror.add(r,{...o,attributes:s})}}function sM(e){const t=e.getOptions();return{type:Q.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function iM(e,t){!t||e.session?.segmentId!==0||Yu(e,sM(e),!1)}function aM(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function cM(e,t,n,r){return mt(kh(e,Eo(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function uM({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
500
|
+
`;if(typeof e=="string")n=`${r}${e}`;else{const s=new TextEncoder().encode(r);n=new Uint8Array(s.length+e.length),n.set(s),n.set(e,s.length)}return n}async function lM({client:e,scope:t,replayId:n,event:r}){const o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,s={event_id:n,integrations:o};e.emit("preprocessEvent",r,s);const i=await Zh(e.getOptions(),r,s,t,e,me());if(!i)return null;e.emit("postprocessEvent",i,s),i.platform=i.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u,settings:l}=a?.sdk||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0",settings:l},i}async function dM({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=uM({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,segmentNames:l,initialTimestamp:f}=r,d=v(),p=q(),h=d?.getTransport(),m=d?.getDsn();if(!d||!h||!m||!s.sampled)return Promise.resolve({});const g={type:D1,replay_start_timestamp:f/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,segment_names:l,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},y=await lM({scope:p,client:d,replayId:t,event:g});if(!y)return W&&z.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete y.sdkProcessingMetadata;const S=cM(y,i,m,d.getOptions().tunnel);let E;try{E=await h.send(S)}catch(N){const I=new Error(Fu);try{I.cause=N}catch{}throw I}const b=pm({},E);if(fm(b,"replay"))throw new Ju(b);if(typeof E.statusCode=="number"&&(E.statusCode<200||E.statusCode>=300))throw new Y_(E.statusCode);return E}class Y_ extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Ju extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class xf extends Error{constructor(){super("Session is too long, not sending replay")}}async function X_(e,t={count:0,interval:W1}){const{recordingData:n,onError:r}=e;if(n.length)try{return await dM(e),!0}catch(o){if(o instanceof Y_||o instanceof Ju)throw o;if(em("Replays",{_retryCount:t.count}),r&&r(o),t.count>=z1){const s=new Error(`${Fu} - max retries exceeded`);try{s.cause=o}catch{}throw s}return t.interval*=++t.count,new Promise((s,i)=>{Oo(async()=>{try{await X_(e,t),s(!0)}catch(a){i(a)}},t.interval)})}}const J_="__THROTTLED",fM="__SKIPPED";function pM(e,t,n){const r=new Map,o=a=>{const c=a-n;r.forEach((u,l)=>{l<c&&r.delete(l)})},s=()=>[...r.values()].reduce((a,c)=>a+c,0);let i=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(o(c),s()>=t){const l=i;return i=!0,l?fM:J_}i=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class hM{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:$1,sessionIdleExpire:F1},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=tM(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=pM((i,a)=>ix(this,i,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),s=r?{threshold:Math.min(j1,r),timeout:r,scrollTimeout:q1,ignoreSelector:o?o.join(","):""}:void 0;if(s&&(this.clickDetector=new yN(this,s)),W){const i=t._experiments;z.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}this._handleVisibilityChange=()=>{ge.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const i=St({category:"ui.blur"});this._doChangeToBackgroundTasks(i)},this._handleWindowFocus=()=>{const i=St({category:"ui.focus"});this._doChangeToForegroundTasks(i)},this._handleKeyboardEvent=i=>{xN(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}getMaskAttributeFn(){return this._recordingOptions.maskAttributeFn}handleException(t){W&&z.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){W&&z.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",W&&z.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){W&&z.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){W&&z.log("Buffering is in progress, call `flush()` to save the replay");return}W&&z.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Ua({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){W&&z.log("Buffering is in progress, call `flush()` to save the replay");return}W&&z.infoTick("Starting replay in buffer mode");const t=Ua({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=st({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:H1}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:rM(this),...nM(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const r=n??"manual";v()?.emit("replayEnd",{sessionId:this.session?.id,reason:r});try{W&&z.log(`Stopping Replay triggered by ${r}`),ci(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,ex(this)}catch(o){this.handleException(o)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),W&&z.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),W&&z.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();W&&z.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession(),Af(this.session.id)),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Mc(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${ge.location.pathname}${ge.location.hash}${ge.location.search}`,n=`${ge.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===J_){const o=St({category:"replay.throttled"});this.addUpdate(()=>!Yu(this,{type:dN,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||he(),n=t&&Ce(t);if(!n)return;const r=ne(n),o=r.attributes[K1];if(!(!o||!["route","custom"].includes(o)))return r.name}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=JN({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&v()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode==="session"&&this.session&&Af(this.session.id)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Ua({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return ai(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{ge.document.addEventListener("visibilitychange",this._handleVisibilityChange),ge.addEventListener("blur",this._handleWindowBlur),ge.addEventListener("focus",this._handleWindowFocus),ge.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Qx(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=jN(this)}_removeListeners(){try{ge.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ge.removeEventListener("blur",this._handleWindowBlur),ge.removeEventListener("focus",this._handleWindowFocus),ge.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;if(ai(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){ci();return}t&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){W&&z.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:Q.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=LN(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(Yi(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),segmentNames:Array.from(this._context.segmentNames),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){W&&z.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await Zx(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new xf;const r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await X_({replayId:t,recordingData:s,segmentId:o,eventContext:r,session:this.session,timestamp:n,onError:i=>this.handleException(i)})}catch(n){this.handleException(n),this.stop({reason:"sendError"});const r=v();if(r){let o;n instanceof Ju?o="ratelimit_backoff":n instanceof xf?o="invalid":o="send_error",r.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){W&&z.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();const s=o<this._options.minReplayDuration,i=o>this._options.maxReplayDuration+5e3;if(s||i){W&&z.log(`Session duration (${Math.floor(o/1e3)}s) is too ${s?"short":"long"}, not sending replay.`),s&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&W&&z.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Ki(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=aM(a.target),u=n.join(",");return c?.matches(u)}))return!1;const r=t.length,o=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=o&&r>o;if(r>s||i){const a=St({category:"replay.mutations",data:{count:r,limit:i}});this._createCustomBreadcrumb(a)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function qr(e,t){return[...e,...t].join(",")}function mM({mask:e,unmask:t,block:n,unblock:r,ignore:o}){const s=["base","iframe[srcdoc]:not([src])"],i=qr(e,[".sentry-mask","[data-sentry-mask]"]),a=qr(t,[]);return{maskTextSelector:i,unmaskTextSelector:a,blockSelector:qr(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:qr(r,[]),ignoreSelector:qr(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function gM({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){if(o.unmaskTextSelector&&e.matches(o.unmaskTextSelector))return s;const i=n.includes(t),a=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return i||a?s.replace(/[\S]/g,"*"):s}const Mf='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',_M=["content-length","content-type","accept"],yM=Symbol.for("sentry__originalRequestBody");let Of=!1,Pf=!1;function SM(){if(typeof Request>"u"||Pf)return;const e=Request;try{const t=function(n,r){const o=new e(n,r);return r?.body!=null&&(o[yM]=r.body),o};t.prototype=e.prototype,D.Request=t,Pf=!0}catch{}}const FL=(e=>new bM(e));class bM{constructor({flushMinDelay:t=B1,flushMaxDelay:n=U1,minReplayDuration:r=G1,maxReplayDuration:o=lf,stickySession:s=!0,useCompression:i=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:l=!0,blockAllMedia:f=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:y=[],networkCaptureBodies:S=!0,networkRequestHeaders:E=[],networkResponseHeaders:b=[],mask:N=[],maskAttributes:I=["title","placeholder","aria-label"],unmask:k=[],block:R=[],unblock:B=[],ignore:w=[],maskFn:O,beforeAddRecordingEvent:M,beforeErrorSampling:T,onError:$,attachRawBodyFromRequest:x=!1}={}){this.name="Replay";const Y=mM({mask:N,unmask:k,block:R,unblock:B,ignore:w});if(this._recordingOptions={maskAllInputs:l,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:O,maskInputFn:O,maskAttributeFn:(X,P,K)=>gM({maskAttributes:I,maskAllText:u,privacyOptions:Y,key:X,value:P,el:K}),...Y,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:X=>{try{X.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,V1),maxReplayDuration:Math.min(o,lf),stickySession:s,useCompression:i,workerUrl:a,blockAllMedia:f,maskAllInputs:l,maskAllText:u,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:g,networkDetailDenyUrls:y,networkCaptureBodies:S,networkRequestHeaders:Lf(E),networkResponseHeaders:Lf(b),beforeAddRecordingEvent:M,beforeErrorSampling:T,onError:$,attachRawBodyFromRequest:x,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Mf}`:Mf,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&ln())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Of}set _isInitialized(t){Of=t}afterAllSetup(t){!ln()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&SM(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(t){return this._replay?this._replay.stop({forceFlush:t?.flush??this._replay.recordingMode==="session",reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(t){const n=this.getReplayId(!0);n&&(On(t,{"sentry.replay_id":n}),this.getRecordingMode()==="buffer"&&On(t,{"sentry._internal.replay_is_buffering":!0}))}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=vM(this._initialOptions,t);this._replay=new hM({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function vM(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=xn(n.replaysSessionSampleRate),s=xn(n.replaysOnErrorSampleRate);return o==null&&s==null&&pt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),s!=null&&(r.errorSampleRate=s),r}function Lf(e){return[..._M,...e.map(t=>t.toLowerCase())]}function BL(){return v()?.getIntegrationByName("Replay")}var EM=Object.defineProperty,wM=(e,t,n)=>t in e?EM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Df=(e,t,n)=>wM(e,typeof t!="symbol"?t+"":t,n);function TM(e){return e.nodeType===e.ELEMENT_NODE}function IM(e){return e?.host?.shadowRoot===e}class kM{constructor(){Df(this,"idNodeMap",new Map),Df(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r)),TM(t)&&t.shadowRoot&&this.removeNodeFromMap(t.shadowRoot)}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function RM(){return new kM}function CM(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function di(e,t,n=1/0,r=0){return e?IM(e)?di(e.host,t,n,r+1):e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:di(e.parentNode,t,n,r+1):-1}function $f(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(CM(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Qn=`Please stop import mirror directly. Instead of that,\r
|
|
501
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
502
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Ff={map:{},getId(){return console.error(Qn),-1},getNode(){return console.error(Qn),null},removeNodeFromMap(){console.error(Qn)},has(){return console.error(Qn),!1},reset(){console.error(Qn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Ff=new Proxy(Ff,{get(e,t,n){return t==="map"&&console.error(Qn),Reflect.get(e,t,n)}}));function Qu(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){Z_(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>Qu(e,t,s||{},!0)}function Zu(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function AM(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ji(e,t,n,r,o){if(!e)return!1;const s=AM(e);if(!s)return!1;const i=$f(t,n),a=di(s,i);let c=-1;return a<0?!1:(r&&(c=di(s,$f(null,r))),a>-1&&c<0?!0:a<c)}const Ha={};function Q_(e){const t=Ha[e];if(t)return t;const n=window[e].bind(window);let r=n;const o=window.document;if(o&&typeof o.createElement=="function")try{const s=o.createElement("iframe");s.hidden=!0,o.head.appendChild(s);const i=s.contentWindow;if(i&&i[e]){const a=i[e].bind(window);r=(...c)=>{try{return a(...c)}catch{return Ha[e]=n,n(...c)}}}o.head.removeChild(s)}catch{}return Ha[e]=r}function vn(...e){return Q_("requestAnimationFrame")(...e)}function Z_(...e){return Q_("setTimeout")(...e)}var Tr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Tr||{});let ws;function NM(e){ws=e}const Wa=e=>ws?((...n)=>{try{return e(...n)}catch(r){if(ws&&ws(r)===!0)return()=>{};throw r}}):e;var nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xM=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var cs=0;cs<nr.length;cs++)xM[nr.charCodeAt(cs)]=cs;var MM=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=nr[t[n]>>2],o+=nr[(t[n]&3)<<4|t[n+1]>>4],o+=nr[(t[n+1]&15)<<2|t[n+2]>>6],o+=nr[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const Bf=new Map;function OM(e,t){let n=Bf.get(e);return n||(n=new Map,Bf.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const ey=(e,t,n)=>{if(!e||!(ny(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=OM(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function Ts(e,t,n){if(e instanceof Array)return e.map(r=>Ts(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=MM(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ts(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Ts(e.data,t,n),e.width,e.height]};if(ny(e,t)||typeof e=="object"){const r=e.constructor.name,o=ey(e,t,n);return{rr_type:r,index:o}}}}return e}const ty=(e,t,n)=>e.map(r=>Ts(r,t,n)),ny=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function PM(e,t,n,r,o){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=Zu(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...l){return Ji(this.canvas,n,r,o,!0)||Z_(()=>{const f=ty(l,t,this);e(this.canvas,{type:Tr["2D"],property:a,args:f})},0),u.apply(this,l)}});s.push(c)}catch{const c=Qu(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:Tr["2D"],property:a,args:[u],setter:!0})}});s.push(c)}return()=>{s.forEach(a=>a())}}function LM(e){return e==="experimental-webgl"?"webgl":e}function Uf(e,t,n,r,o){const s=[];try{const i=Zu(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Ji(this,t,n,r,!0)){const l=LM(c);if("__context"in this||(this.__context=l),o&&["webgl","webgl2"].includes(l))if(u[0]&&typeof u[0]=="object"){const f=u[0];f.preserveDrawingBuffer||(f.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});s.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(i=>i())}}function Hf(e,t,n,r,o,s,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const l of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;const f=Zu(e,l,function(d){return function(...p){const h=d.apply(this,p);if(ey(h,a,this),"tagName"in this.canvas&&!Ji(this.canvas,r,o,s,!0)){const m=ty(p,a,this),g={type:t,property:l,args:m};n(this.canvas,g)}return h}});c.push(f)}catch{const f=Qu(e,l,{set(d){n(this.canvas,{type:t,property:l,args:[d],setter:!0})}});c.push(f)}return c}function DM(e,t,n,r,o,s){const i=[];return i.push(...Hf(t.WebGLRenderingContext.prototype,Tr.WebGL,e,n,r,o,s,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...Hf(t.WebGL2RenderingContext.prototype,Tr.WebGL2,e,n,r,o,s,t)),()=>{i.forEach(a=>a())}}const $M='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function FM(){const e=new Blob([$M]);return URL.createObjectURL(e)}class BM{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:o,recordCanvas:s,errorHandler:i}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,i&&NM(i),(s&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(o),!n&&Wa(()=>{s&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),s&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:s,recordCanvas:i,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}Wa(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(t,r,o,s),i&&typeof n=="number"){const c=Uf(t,r,o,s,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),t);return}vn(r=>this.takeSnapshot(r,t))}initFPSWorker(){const t=new Worker(FM());return t.onmessage=n=>{const r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;const{base64:s,type:i,width:a,height:c}=r;this.mutationCb({id:o,type:Tr["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:i}]},0,0,a,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r),t=vn(n)};t=vn(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,o){const s=Uf(t,n,r,o,!1),i=PM(this.processMutation.bind(this),t,n,r,o),a=DM(this.processMutation.bind(this),t,n,r,o,this.mirror);this.restoreHandlers.push(()=>{s(),i(),a()})}getCanvasElements(t,n,r){const o=[],s=i=>{i.querySelectorAll("canvas").forEach(a=>{Ji(a,t,n,r)||o.push(a)})};for(const i of this.windows){const a=i.deref();let c;try{c=a&&a.document}catch{}c&&s(c)}for(const i of this.shadowDoms){const a=i.deref();a&&s(a)}return o}takeSnapshot(t,n){const{sampling:r,blockClass:o,blockSelector:s,unblockSelector:i,dataURLOptions:a,maxCanvasSize:c}=this.options,l=1e3/(r==="all"?2:r||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=t,(n?[n]:this.getCanvasElements(o,s,i)).forEach(p=>{const h=this.mirror.getId(p);!this.mirror.hasNode(p)||!p.width||!p.height||this.snapshotInProgressMap.get(h)||(this.snapshotInProgressMap.set(h,!0),createImageBitmap(p).then(m=>{this.worker?.postMessage({id:h,bitmap:m,width:p.width,height:p.height,dataURLOptions:a,maxCanvasSize:c},[m])}).catch(m=>{Wa(()=>{throw this.snapshotInProgressMap.delete(h),m})()}))}),!0)}startPendingCanvasMutationFlusher(){vn(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,vn(t)};vn(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),vn(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(i=>{const{type:a,...c}=i;return c}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}RM();var Wf;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Wf||(Wf={}));const zf={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},UM="ReplayCanvas",us=1280,HM=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,us):us,n?Math.min(n,us):us]};let o,s;const i=new Promise(a=>s=a);return{name:UM,getOptions(){const{quality:a,enableManualSnapshot:c,maxCanvasSize:u}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:l=>{const f=new BM({...l,enableManualSnapshot:c,maxCanvasSize:u,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return o=f,s(f),f},...zf[a]||zf.medium}},async snapshot(a,c){(o||await i).snapshot(a,c)}}}),UL=HM;function WM(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function ry(e){try{return new URL(e,C.location?.href).href}catch{return}}function zM(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function oy(e){try{return new Headers(e)}catch{return}}const sy={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function jM(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:i,onRequestSpanStart:a,onRequestSpanEnd:c}={...sy,...t},u=typeof o=="function"?o:p=>!0,l=p=>GM(p,i),f={},d=e.getOptions().propagateTraceparent;n&&Li(p=>{const h=Q0(p,u,l,f,{propagateTraceparent:d,onRequestSpanEnd:c,urlBase:C.location?.href});if(h){const m=ry(p.fetchData.url),g=m?An(m).host?.replace(/^.*@/,""):void 0,y=m?Bt(m):void 0;h.setAttributes({[Fe]:be(y),[Si]:g}),s&&jf(h,e),a?.(h,{headers:p.headers})}}),r&&Pu(p=>{const h=VM(p,u,l,f,d,c);h&&(s&&jf(h,e),a?.(h,{headers:oy(p.xhr.__sentry_xhr_v3__?.request_headers)}))})}const qM=300;function jf(e,t){const n=ne(e).attributes[Fe];if(!n||typeof n!="string")return;let r=()=>{setTimeout(o)};if(V(t)){const s=e.end.bind(e);e.end=i=>{const a=i??fe();let c=!1;const u=()=>{c||(c=!0,setTimeout(o),s(a),clearTimeout(l))};r=u;const l=setTimeout(u,qM)}}const o=ut("resource",({entries:s})=>{s.forEach(i=>{zM(i)&&i.name.endsWith(n)&&(e.setAttributes(Lg(i)),r())})})}function GM(e,t){const n=Wt();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}const s=r.origin===o;return t?_a(r.toString(),t)||s&&_a(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?_a(e,t):r}}function VM(e,t,n,r,o,s){const i=e.xhr,a=i?.[xt];if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:u}=a,l=Je()&&t(c);if(e.endTimestamp){const k=i.__sentry_xhr_span_id__;if(!k)return;const R=r[k];R&&(l&&a.status_code!==void 0&&(As(R,a.status_code),R.end(),s?.(R,{headers:oy(jg(i)),error:e.error})),delete r[k]);return}const f=ry(c),d=An(f||c),p=f?Bt(f):void 0,h=Bt(Cm(c)),m=v(),g=!!he(),y=g||!!m&&V(m),S=d?.host?.replace(/^.*@/,""),E=hu(f||c),b=E?`${u} ${E}`:u,N=l&&y?bt({name:m&&V(m)?b:`${u} ${h}`,attributes:{type:"xhr",[yi]:u,[Fe]:be(p),[Si]:S,[bi]:E,[re]:"auto.http.browser",[U]:Gh,[zp]:Tm(km(d?.search)),[Wp]:Rm(d?.hash)}}):new Mn,I=Ni(N)&&g?void 0:N;return l&&!y&&m?.recordDroppedEvent("no_parent_span","span"),i.__sentry_xhr_span_id__=N.spanContext().spanId,r[i.__sentry_xhr_span_id__]=N,n(c)&&KM(i,Je()&&y?I:void 0,o),m&&m.emit("beforeOutgoingRequestSpan",N,e),N}function KM(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:s}=xm({span:t,propagateTraceparent:n});r&&YM(e,r,o,s)}function YM(e,t,n,r){const o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!o?.traceparent&&e.setRequestHeader("traceparent",r),n){const s=o?.baggage;(!s||!WM(s))&&e.setRequestHeader("baggage",n)}}catch{}}const iy="WebVitals",XM=(e={})=>{const{ignore:t=[],softNavigations:n=!0,bfcacheNavigations:r=!0}=e,o=new Set(t);return{name:iy,setup(s){const i=V(s),a=n&&i&&Og(),c=r&&i,u=a||c;a&&(ok(),mk(s)),c&&sk();const l=!i&&!o.has("cls"),f=!i&&!o.has("lcp"),d=Fk({trackCls:l,trackLcp:f}),p=new WeakSet;s.on("afterStartPageLoadSpan",h=>{p.add(h)}),s.on("spanEnd",h=>{p.delete(h)&&(d(),jk(h,{recordClsOnPageloadSpan:l,recordLcpOnPageloadSpan:f,spanStreamingEnabled:i}))}),i&&(o.has("lcp")||gR(s,u),o.has("cls")||_R(s,u)),o.has("inp")||yR(s,u)},afterAllSetup(){o.has("inp")||Qk()}}};function JM(){C.document?C.document.addEventListener("visibilitychange",()=>{const e=he();if(!e)return;const t=Ce(e);if(C.document.hidden&&t){const n="cancelled",{attributes:{[U]:r},status:o}=ne(t);L&&_.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o==="ok"&&t.setStatus({code:we,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):L&&_.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const QM=3600,ay="sentry_previous_trace",ZM="sentry.previous_trace";function eO(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let o=r?rO():void 0;e.on("spanStart",i=>{if(Ce(i)!==i)return;const a=q().getPropagationContext();o=tO(o,i,a),r&&nO(o)});let s=!0;n&&e.on("beforeSampling",i=>{if(!o)return;const a=q(),c=a.getPropagationContext();if(s&&c.parentSpanId){s=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(o.sampleRate),sampled:String(Lc(o.spanContext))},sampleRand:o.sampleRand}),i.parentSampled=Lc(o.spanContext),i.parentSampleRate=o.sampleRate,i.spanAttributes={...i.spanAttributes,[qp]:o.sampleRate}})}function tO(e,t,n){const r=ne(t);function o(){try{const a=Number(r.attributes[Xc]??n.dsc?.sample_rate);return Number.isNaN(a)?0:a}catch{return 0}}const s={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return s;const i=e.spanContext;return i.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=QM&&(L&&_.log(`Adding previous_trace \`${JSON.stringify(i)}\` link to span \`${JSON.stringify({op:r.attributes[U],...t.spanContext()})}\``),t.addLink({context:i,attributes:{[VS]:"previous_trace"}}),t.setAttribute(ZM,`${i.traceId}-${i.spanId}-${Lc(i)?1:0}`)),s)}function nO(e){try{C.sessionStorage.setItem(ay,JSON.stringify(e))}catch(t){L&&_.warn("Could not store previous trace in sessionStorage",t)}}function rO(){try{const e=C.sessionStorage?.getItem(ay);return JSON.parse(e)}catch{return}}function Lc(e){return e.traceFlags===1}const oO="BrowserTracing",sO={...fs,instrumentNavigation:!0,instrumentBfcacheRestore:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,...sy},Fo=((e={})=>{"enableElementTiming"in e&&pt(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const t=C.document,{enableInp:n,enableLongTask:r,enableLongAnimationFrame:o,webVitals:s,beforeStartSpan:i,idleTimeout:a,finalTimeout:c,childSpanTimeout:u,markBackgroundSpan:l,traceFetch:f,traceXHR:d,shouldCreateSpanForRequest:p,enableHTTPTimings:h,ignoreResourceSpans:m,instrumentPageLoad:g,instrumentNavigation:y,instrumentBfcacheRestore:S,detectRedirects:E,linkPreviousTrace:b,consistentTraceSampling:N,enableReportPageLoaded:I,onRequestSpanStart:k,onRequestSpanEnd:R}={...sO,...e},B=Fg();let w,O;function M(T,$,x=!0,Y){const X=$.op==="pageload",P=$.name,K=i?i($):$,F=Dn(Y||Wt()),Z={...F?.pathname&&{[vi]:F.pathname},...F&&!Mi(F)&&{[Fe]:be(F.href)},...K.attributes};if(P!==K.name&&(Z[ce]="custom"),K.attributes=Z,!x){const Be=Hn();bt({...K,startTime:Be}).end(Be);return}const Se=Mh(K,{idleTimeout:a,finalTimeout:c,childSpanTimeout:u,disableAutoFinish:X,trimIdleSpanEndTimestamp:!I});X&&I&&(O=Se),Vf(T,Se);function ae(){t&&["interactive","complete"].includes(t.readyState)&&(T.emit("idleSpanEnableAutoFinish",Se),t.removeEventListener("readystatechange",ae))}X&&!I&&t&&(t.addEventListener("readystatechange",ae),ae())}return{name:oO,setup(T){if(B){L&&_.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(Mb(),o&&D.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?vk():r&&bk(),E&&t){const x=()=>{w=fe()};addEventListener("click",x,{capture:!0}),addEventListener("keydown",x,{capture:!0,passive:!0})}function $(){const x=rr(T);x&&!ne(x).end_timestamp&&(L&&_.log(`[Tracing] Finishing current active span with op: ${ne(x).attributes[U]}`),x.setAttribute(sr,"cancelled"),x.end())}T.on("beforeIdleSpanEnd",x=>{if(rr(T)!==x)return;Ek(x,{ignoreResourceSpans:m,spanStreamingEnabled:V(T)}),Vf(T,void 0);const Y=q(),X=Y.getPropagationContext();Y.setPropagationContext({...X,traceId:x.spanContext().traceId,sampled:ht(x),dsc:it(x)}),O===x&&(O=void 0)}),T.on("startNavigationSpan",(x,Y)=>{if(v()!==T)return;if(Y?.isRedirect){L&&_.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),M(T,{op:Fv,...x},!1,Y.url);return}w=void 0,$();const X=q();X.setPropagationContext({traceId:gn(),sampleRand:Math.random(),propagationSpanId:Je()?void 0:cn()}),X.setSDKProcessingMetadata({normalizedRequest:void 0}),M(T,{op:Mr,...x,parentSpan:null},!0,Y?.url)}),T.on("startPageLoadSpan",(x,Y={})=>{if(v()!==T)return;$();const X=Y.sentryTrace||qf("sentry-trace")||Gf("sentry-trace"),P=Y.baggage||qf("baggage")||Gf("baggage"),K=sh(X,P),F=q();F.setPropagationContext(K),Je()||(F.getPropagationContext().propagationSpanId=cn());const Z=Zs(T);F.setSDKProcessingMetadata({normalizedRequest:{...Z,url:be(Z.url,T)}}),M(T,{op:To,...x})}),T.on("endPageloadSpan",()=>{I&&O&&(O.setAttribute(sr,"reportPageLoaded"),O.end())}),C.addEventListener?.("pagehide",()=>{const x=rr(T);x&&!ne(x).end_timestamp&&(x.setAttribute(sr,"documentHidden"),x.end()),T.flush()})},afterAllSetup(T){if(B)return;if(wo(T),T.addIntegration&&!T.getIntegrationByName?.(iy)){const x=s?.ignore??[];T.addIntegration(XM({...s,ignore:n||x.includes("inp")?x:[...x,"inp"]}))}let $=Wt();b!=="off"&&eO(T,{linkPreviousTrace:b,consistentTraceSampling:N}),C.location&&(g&&Bo(T,{name:V(T)?Ft:C.location.pathname,attributes:{[ce]:"url",[re]:"auto.pageload.browser"}}),y&&Hi(({to:x,from:Y})=>{if(Y===void 0&&$!==void 0&&$.indexOf(x)!==-1){$=void 0;return}$=void 0;const X=Dn(x),P=rr(T),K=P&&E&&iO(P,w);Ir(T,{name:V(T)?ft:X?.pathname||C.location.pathname,attributes:{[ce]:"url",[re]:"auto.navigation.browser"}},{url:x,isRedirect:K})}),S&&C.addEventListener?.("pageshow",x=>{x.persisted&&($=void 0,Ir(T,{name:V(T)?ft:C.location?.pathname||"/",attributes:{[ce]:"url",[re]:"auto.navigation.browser.bfcache",[_i]:"back-forward-cache"}},{url:C.location?.href}))})),l&&JM(),jM(T,{traceFetch:f,traceXHR:d,tracePropagationTargets:T.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:p,enableHTTPTimings:h,onRequestSpanStart:k,onRequestSpanEnd:R})}}});function Bo(e,t,n){const r=t.name===Ft;q().setTransactionName(r?C.location?.pathname:t.name);const o=Ar(),s={...t,startTime:t.startTime??(o?o/1e3:void 0)};e.emit("startPageLoadSpan",s,n);const i=rr(e);return i&&e.emit("afterStartPageLoadSpan",i),i}function Ir(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o,url:r}),e.emit("startNavigationSpan",t,{isRedirect:o,url:r});const s=q(),i=t.name===ft;return s.setTransactionName(i?r&&Dn(r)?.pathname||C.location?.pathname:t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...Zs(e),url:be(r,e)}}),rr(e)}function qf(e){return C.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function Gf(e){return C.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}const cy="_sentry_idleSpan";function rr(e){return e[cy]}function Vf(e,t){pe(e,cy,t)}const Kf=1.5;function iO(e,t){const n=ne(e),r=Hn(),o=n.start_timestamp;return!(r-o>Kf||t&&r-t<=Kf)}function HL(e=v()){e?.emit("endPageloadSpan")}function WL(e){const t=he();if(t===e)return;const n=q();e.end=new Proxy(e.end,{apply(r,o,s){return so(n,t),Reflect.apply(r,o,s)}}),so(n,e)}const Yf=new WeakMap,Xf=new WeakMap,aO=9e4,cO=["text/event-stream","application/x-ndjson","application/stream+json"],zL=()=>({name:"FetchStreamPerformance",setup(e){aT(t=>{if(t.response){const n=Yf.get(t.response);if(n&&t.endTimestamp){n.end(t.endTimestamp);const r=Xf.get(t.response);r&&clearTimeout(r)}}}),Li(t=>{if(t.endTimestamp&&t.response){const n=t.response.headers?.get("content-type")||"";if(t.response.headers?.get("content-length")||!cO.some(f=>n.startsWith(f)))return;const r=t.fetchData?.url||"",o=t.fetchData?.method||"GET",s=Dn(r),i=r.startsWith("data:")?Bt(r):s?Im(s):r,a=hu(r,C.location?.href),c=a?`${o} ${a}`:o,u=bt({name:V(e)?c:`${o} ${i}`,startTime:t.endTimestamp,attributes:{[Fe]:be(Bt(r)),[bi]:a,[yi]:o,type:"fetch",[U]:Yv,[re]:"auto.http.browser.stream"}});Yf.set(t.response,u);const l=setTimeout(()=>{u.isRecording()&&u.end()},aO);Xf.set(t.response,l)}})}}),Dc="BfcacheMetrics",jL=(e={})=>{const t=dO(e.maxReasons);return{name:Dc,setupOnce(){if(!C.addEventListener||!C.performance?.getEntriesByType){L&&_.log(`[${Dc}] Browser APIs unavailable, skipping instrumentation.`);return}function n(r){const o=lO();if(r.persisted){Jf("hit",0,o);return}const s=C.performance.getEntriesByType("navigation")[0];if(s?.type!=="back_forward")return;const i=fO(s.notRestoredReasons,t);Jf("miss",i.length,o),typeof s.duration=="number"&&s.duration>0&&Ws("browser.bfcache.reload.duration",s.duration,{unit:"millisecond",attributes:el({[Nr]:o})}),i.forEach(a=>uO(a,o))}C.addEventListener("pageshow",n,!0)}}};function Jf(e,t,n){yu("browser.bfcache.navigation",1,{attributes:el({[RS]:e,[kS]:t||void 0,[Nr]:n})})}function uO({reason:e,frame:t},n){yu("browser.bfcache.not_restored",1,{attributes:el({[CS]:e,[IS]:t,[Nr]:n})})}function lO(){return iR()||q().getScopeData().transactionName||C.location?.pathname}function dO(e){return e==null?1/0:e<1?(L&&_.warn(`[${Dc}] \`maxReasons\` must be at least 1, got ${e}. Using 1 instead.`),1):e}function fO(e,t){const n=[];return!e||t<=0||uy(e,"top",n,t),n}function uy(e,t,n,r){n.length>=r||(e.reasons?.forEach(o=>{if(n.length>=r)return;const s=typeof o=="string"?o:o.reason;s&&n.push({reason:s,frame:t})}),e.children?.forEach(o=>{uy(o,"child",n,r)}))}function el(e){return e[re]="auto.browser.bfcache",e}function kr(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function pO(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=kr(n);return o=>r.then(s=>o(s.transaction(t,"readwrite").objectStore(t)))}function tl(e){return kr(e.getAllKeys())}function hO(e,t,n){return e(r=>tl(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),kr(r.transaction)}))}function mO(e,t,n){return e(r=>tl(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),kr(r.transaction)}))}function gO(e){return e(t=>tl(t).then(n=>{const r=n[0];if(r!=null)return kr(t.get(r)).then(o=>(t.delete(r),kr(t.transaction).then(()=>o)))}))}function _O(e){let t;function n(){return t==null&&(t=pO(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const o=Ls(r);await hO(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const o=Ls(r);await mO(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await gO(n());if(r)return Zb(r)}catch{}}}}function yO(e){return t=>{const n=e({...t,createStore:_O});return C.addEventListener("online",async r=>{await n.flush()}),n}}function qL(e=Yg){return yO(aw(e))}const SO="window"in D&&D.window===D&&typeof importScripts>"u",$c=String(0),ly=SO?"main":"worker";function bO(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=EO(e),o=t.getOptions(),s=t.getSdkMetadata?.()?.sdk;return{chunk_id:Le(),client_sdk:{name:s?.name??"sentry.javascript.browser",version:s?.version??"0.0.0"},profiler_id:n||Le(),platform:"javascript",version:"2",release:o.release??"",environment:o.environment??"production",debug_meta:{images:wO(e.resources)},profile:r}}function vO(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);if(!t(e.profiler_id))return{reason:"missing or invalid profiler_id"};if(!t(e.chunk_id))return{reason:"missing or invalid chunk_id"};if(!e.client_sdk)return{reason:"missing client_sdk metadata"};const n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:"profile has no frames"}:!Array.isArray(n.stacks)||!n.stacks.length?{reason:"profile has no stacks"}:!Array.isArray(n.samples)||!n.samples.length?{reason:"profile has no samples"}:{valid:!0}:{reason:"missing profile data"}}catch(t){return{reason:`unknown validation error: ${t}`}}}function EO(e){const t=[];for(let s=0;s<e.frames.length;s++){const i=e.frames[s];i&&(t[s]={function:i.name,abs_path:typeof i.resourceId=="number"?e.resources[i.resourceId]:void 0,lineno:i.line,colno:i.column})}const n=[];for(let s=0;s<e.stacks.length;s++){const i=e.stacks[s];if(!i)continue;const a=[];let c=i;for(;c;)a.push(c.frameId),c=c.parentId===void 0?void 0:e.stacks[c.parentId];n[s]=a}const r=e.stacks.length,o=[];for(let s=0;s<e.samples.length;s++){const i=e.samples[s];if(!i)continue;const a=i.stackId??r;a===r&&(n[r]??(n[r]=[]));const c=De(i.timestamp);o[s]={stack_id:a,thread_id:$c,timestamp:c}}return{frames:t,stacks:n,samples:o,thread_metadata:{[$c]:{name:ly}}}}function wO(e){const r=v()?.getOptions()?.stackParser;return r?iE(r,e):[]}function TO(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(L&&_.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(L&&_.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}let dy=!1;const IO=3e4;function kO(e){return typeof e=="function"}function RO(){const e=C.Profiler;if(!kO(e)){L&&_.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(IO/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{L&&(_.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),_.log("[Profiling] Disabling profiling for current user session.")),dy=!0}}function CO(e){if(dy)return L&&_.log("[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started."),!1;if(e.profileLifecycle!=="trace"&&e.profileLifecycle!=="manual")return L&&_.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;const t=e.profileSessionSampleRate;return TO(t)?t?Math.random()<=t:(L&&_.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(L&&_.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function Qf(e){e.setAttribute("thread.id",$c),e.setAttribute("thread.name",ly)}const AO=6e4,NO=3e5;class xO{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(t){const n=t.getOptions().profileLifecycle,r=CO(t.getOptions());L&&_.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||L&&_.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=Le(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t),t.on("spanStart",o=>{this._isRunning&&Qf(o)})}start(){if(this._lifecycleMode==="trace"){L&&_.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){L&&_.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){L&&_.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){L&&_.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){L&&_.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(t){if(this._lifecycleMode!=="trace"||!this._sessionSampled||!t.isRecording())return;const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._registerTraceRootSpan(n);const r=this._activeRootSpanIds.size;r===1&&(L&&_.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling()),this._isRunning&&Qf(t)}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,L&&_.log("[Profiling] Started profiling with profiler ID:",this._profilerId),or().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){L&&_.log("[Profiling] Failed to start JS Profiler; stopping."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(t=>{L&&_.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&or().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){L&&_.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==Ce(n))return;if(!n.isRecording()){L&&_.log("[Profiling] Discarding profile because root span was not sampled.");return}const r=n.spanContext().spanId;if(!r||this._activeRootSpanIds.has(r))return;this._registerTraceRootSpan(r);const o=this._activeRootSpanIds.size;o===1&&(L&&_.log(`[Profiling] Root span ${r} started. Profiling active while there are active root spans (count=${o}).`),this._beginProfiling())}),t.on("spanEnd",n=>{if(!this._sessionSampled)return;const r=n.spanContext().spanId;if(!r||!this._activeRootSpanIds.has(r))return;this._activeRootSpanIds.delete(r);const o=this._activeRootSpanIds.size;L&&_.log(`[Profiling] Root span with ID ${r} ended. Will continue profiling for as long as there are active root spans (currently: ${o}).`),o===0&&(this._collectCurrentChunk().catch(s=>{L&&_.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",s)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,or().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);const n=setTimeout(()=>this._onRootSpanTimeout(t),NO);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=RO();if(!t){L&&_.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{L&&_.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},AO))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&(L&&_.log(`[Profiling] Reached 5-minute timeout for root span ${t}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){const t=this._profiler;if(this._profiler=void 0,!!t)try{const n=await t.stop(),r=bO(n,this._client,this._profilerId),o=vO(r);if("reason"in o){L&&_.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",o.reason);return}this._sendProfileChunk(r),L&&_.log("[Profiling] Collected browser profile chunk.")}catch(n){L&&_.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){const n=this._client,r=Eo(n.getSdkMetadata?.()),o=n.getDsn(),s=n.getOptions().tunnel,i=mt({event_id:Le(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!s&&o&&{dsn:kt(o)}},[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(i).then(null,a=>{L&&_.error("Error while sending profile chunk envelope:",a)})}}const MO="BrowserProfiling",OO=(()=>({name:MO,setup(e){const t=e.getOptions(),n=new xO;t.profileLifecycle||(t.profileLifecycle="manual");const r=he(),o=r&&Ce(r),s=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),s==="manual")n.initialize(e);else if(s==="trace"){if(!Je(t)){L&&_.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),o&&n.notifyRootSpanActive(o),C.setTimeout(()=>{const i=he(),a=i&&Ce(i);a&&n.notifyRootSpanActive(a)},0)}}})),GL=OO,PO="SpotlightBrowser",LO=[{op:Ds,name:"#sentry-spotlight"},{op:Ds,attributes:{[Kc]:"#sentry-spotlight"}}],DO=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:PO,setup:()=>{L&&_.log("Using Sidecar URL",t)},beforeSetup(n){const r=n.getOptions();r.ignoreSpans=[...r.ignoreSpans||[],...LO]},afterAllSetup:n=>{$O(n,t)}}});function $O(e,t){const n=Ou("fetch");let r=0;e.on("beforeEnvelope",o=>{if(r>3){_.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:Ls(o),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(s=>{s.status>=200&&s.status<400&&(r=0)},s=>{r++,_.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",s)})})}const VL=DO,KL=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Or(e)}});function YL(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{$n(e,t.value),Fn(e,t.value)}}}const XL=()=>({name:"OpenFeature",processEvent(e,t,n){return Or(e)}});class JL{after(t,n){$n(n.flagKey,n.value),Fn(n.flagKey,n.value)}error(t,n,r){$n(t.flagKey,t.defaultValue),Fn(t.flagKey,t.defaultValue)}}const QL=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Pe(t,"isEnabled",FO)},processEvent(t,n,r){return Or(t)}});function FO(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?($n(n,r),Fn(n,r)):L&&_.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const ZL=(({growthbookClass:e})=>K0({growthbookClass:e})),eD=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{$n(n.gate.name,n.gate.value),Fn(n.gate.name,n.gate.value)})},processEvent(t,n,r){return Or(t)}});async function tD(){const e=v();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";const r=e.getOptions().tunnel||"https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7";try{await Ev(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const BO="WebWorker",UO=20,nD=({worker:e})=>({name:BO,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>Zf(t))},addWorker:t=>Zf(t)});function Zf(e){const t=[];e.addEventListener("error",({message:n,filename:r,lineno:o,colno:s})=>{const i=t.findIndex(a=>a.message===n&&a.url===r&&a.lineno===o&&a.colno===s);i!==-1&&(t.splice(0,i+1),OR({msg:n,url:r,line:o,column:s}))}),e.addEventListener("message",n=>{if(jO(n.data)){if(n.stopImmediatePropagation(),n.data._sentryDebugIds&&(L&&_.log("Sentry debugId web worker message received",n.data),C._sentryDebugIds={...n.data._sentryDebugIds,...C._sentryDebugIds}),n.data._sentryModuleMetadata&&(L&&_.log("Sentry module metadata web worker message received",n.data),C._sentryModuleMetadata={...n.data._sentryModuleMetadata,...C._sentryModuleMetadata}),n.data._sentryWasmImages){L&&_.log("Sentry WASM images web worker message received",n.data);const r=C._sentryWasmImages||[],o=n.data._sentryWasmImages.filter(s=>We(s)&&typeof s.code_file=="string"&&!r.some(i=>i.code_file===s.code_file));C._sentryWasmImages=[...r,...o]}if(n.data._sentryWorkerError){L&&_.log("Sentry worker error message received",n.data._sentryWorkerError);const{kind:r,message:o,url:s,lineno:i,colno:a}=n.data._sentryWorkerError;r==="error"&&t.push({message:o,url:s,lineno:i,colno:a})>UO&&t.shift(),HO(n.data._sentryWorkerError)}}})}function HO(e){const{reason:t,kind:n,name:r,filename:o,url:s,lineno:i,colno:a,plainError:c}=e,u=n!=="error",l=c&&We(t)?zO(t):t;r&&Re(l)&&l.name!==r&&pe(l,"name",r);const f=v();if(!f)return;const{stackParser:d,attachStacktrace:p}=f.getOptions(),h=u&&dt(l)?Qg(l):zi(d,l,void 0,p,u);u||Zg(h,s||o,i,a),h.level="error",o&&(h.contexts={...h.contexts,worker:{filename:o}}),ko(h,{originalException:l,mechanism:{handled:!1,type:u?"auto.browser.web_worker.onunhandledrejection":"auto.browser.web_worker.onerror"}}),L&&_.log(`Captured worker ${u?"unhandled rejection":"error"}`,l)}function rD({self:e}){Error.stackTraceLimit=50,e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0});const t=n=>{const{reason:r}=n;L&&_.log(`[Sentry Worker] Forwarding ${n.kind} to parent`,n),WO(e,{...n,filename:e.location?.href,name:Re(r)?Vg(r):void 0})};e.addEventListener("error",n=>{const{error:r,message:o,filename:s,lineno:i,colno:a}=n;t({kind:"error",reason:r??o,message:o,url:s,lineno:i,colno:a})}),e.addEventListener("unhandledrejection",n=>{t({kind:"unhandledrejection",reason:Jg(n)})}),L&&_.log("[Sentry Worker] Registered worker with error and unhandled rejection handling")}function WO(e,t){try{e.postMessage({_sentryMessage:!0,_sentryWorkerError:t});return}catch{}const{reason:n}=t,r=Re(n),o=r?{message:Kg(n),stack:n.stack}:Te(n);try{e.postMessage({_sentryMessage:!0,_sentryWorkerError:{...t,reason:o,plainError:r}})}catch{}}function zO(e){const t=new Error(String(e.message));return t.stack=typeof e.stack=="string"?e.stack:void 0,t}function jO(e){if(!We(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,o="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!o||t&&!(We(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(We(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!We(e._sentryWorkerError)||o&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(s=>We(s)&&typeof s.code_file=="string")))}function qO(e){return We(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function oD(e){const t={...e};Nm(t,"react"),em("react",{version:_e.version});const n=d1(t);return kp(GO),n}function GO(e){return qO(e)?"[SyntheticEvent]":t_(e)}function VO(e,t){const n=new WeakSet;function r(o,s){if(!n.has(o)){if(o.cause)return Re(o.cause)?(n.add(o),r(o.cause,s)):void 0;o.cause=s}}r(e,t)}function fy(e,{componentStack:t},n){if(Re(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,VO(e,r)}return Pn(e,n)}function sD(e){return(t,n)=>{const r=!!e,o=fy(t,n,{mechanism:{handled:r,type:"auto.function.react.error_handler"}});r&&e(t,n,o)}}const KO={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},YO={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},XO={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},JO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},QO=Symbol.for("react.forward_ref"),ZO=Symbol.for("react.memo"),nl={};nl[QO]=XO;nl[ZO]=JO;function ep(e){const t=e.$$typeof;return t&&nl[t]||KO}const eP=Object.defineProperty.bind(Object),tP=Object.getOwnPropertyNames.bind(Object),tp=Object.getOwnPropertySymbols?.bind(Object),np=Object.getOwnPropertyDescriptor.bind(Object),nP=Object.getPrototypeOf.bind(Object),rp=Object.prototype;function Uo(e,t,n){if(typeof t!="string"){if(rp){const i=nP(t);i&&i!==rp&&Uo(e,i)}let r=tP(t);tp&&(r=r.concat(tp(t)));const o=ep(e),s=ep(t);for(const i of r)if(!YO[i]&&!s?.[i]&&!o?.[i]&&!np(e,i)){const a=np(t,i);if(a)try{eP(e,i,a)}catch{}}}return e}const lr="unknown";class py extends _e.Component{constructor(t){super(t);const{name:n,disabled:r=!1}=this.props;if(r)return;const o=v(),s=!!o&&V(o),i=`<${n}>`,a=n===lr?void 0:n;this._mountSpan=bt({name:s?a||Vh:i,onlyIfParent:!0,attributes:{[U]:jh,[re]:"auto.ui.react.profiler",...a&&{[Pt]:a},...s&&{[Xr]:i}}})}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:t,includeUpdates:n=!0}){if(n&&this._mountSpan&&t!==this.props.updateProps){const r=Object.keys(t).filter(o=>t[o]!==this.props.updateProps[o]);if(r.length>0){const o=fe();this._updateSpan=dn(this._mountSpan,()=>{const s=v(),i=!!s&&V(s),a=`<${this.props.name}>`,c=this.props.name===lr?void 0:this.props.name;return bt({name:i?c||Jv:a,onlyIfParent:!0,startTime:o,attributes:{[U]:Hv,[re]:"auto.ui.react.profiler",...c&&{[Pt]:c},"ui.react.changed_props":r,...i&&{[Xr]:a}}})})}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const t=fe(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const o=ne(this._mountSpan).end_timestamp;dn(this._mountSpan,()=>{const s=v(),i=!!s&&V(s),a=`<${n}>`,c=n===lr?void 0:n,u=bt({onlyIfParent:!0,name:i?c||Kh:a,startTime:o,attributes:{[U]:zh,[re]:"auto.ui.react.profiler",...c&&{[Pt]:c},...i&&{[Xr]:a}}});u&&u.end(t)})}}render(){return this.props.children}}Object.assign(py,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function iD(e,t){const n=t?.name||e.displayName||e.name||lr,r=o=>_e.createElement(py,{...t,name:n,updateProps:o},_e.createElement(e,{...o}));return r.displayName=`profiler(${n})`,Uo(r,e),r}function aD(e,t={disabled:!1,hasRenderSpan:!0}){const[n]=_e.useState(()=>{if(t?.disabled)return;const r=v(),o=!!r&&V(r),s=`<${e}>`,i=e===lr?void 0:e;return bt({name:o?i||Vh:s,onlyIfParent:!0,attributes:{[U]:jh,[re]:"auto.ui.react.profiler",...i&&{[Pt]:i},...o&&{[Xr]:s}}})});_e.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){const r=ne(n).end_timestamp,o=fe(),s=v(),i=!!s&&V(s),a=`<${e}>`,c=e===lr?void 0:e,u=bt({name:i?c||Kh:a,onlyIfParent:!0,startTime:r,attributes:{[U]:zh,[re]:"auto.ui.react.profiler",...c&&{[Pt]:c},...i&&{[Xr]:a}}});u&&u.end(o)}}),[])}const Ae=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rP="unknown",za={componentStack:null,error:null,eventId:null};class oP extends _e.Component{constructor(t){super(t),this.state=za,this._openFallbackReportDialog=!0;const n=v();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&sf({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,{beforeCapture:o,onError:s,showDialog:i,dialogOptions:a}=this.props;Ze(c=>{o&&o(c,t,r);const u=this.props.handled!=null?this.props.handled:!!this.props.fallback,l=fy(t,n,{mechanism:{handled:u,type:"auto.function.react.error_boundary"}});s&&s(t,r,l),i&&(this._lastEventId=l,this._openFallbackReportDialog&&sf({...a,eventId:l})),this.setState({error:t,componentStack:r,eventId:l})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:o}=this.props;o&&(this.state===za?o(null,null,null):o(t,n,r)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:t}=this.props,{error:n,componentStack:r,eventId:o}=this.state;t&&t(n,r,o),this.setState(za)}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.componentStack===null)return typeof n=="function"?n():n;const o=typeof t=="function"?_e.createElement(t,{error:r.error,componentStack:r.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:r.eventId}):t;return _e.isValidElement(o)?o:(t&&Ae&&_.warn("fallback did not produce a valid ReactElement"),null)}}function cD(e,t){const n=e.displayName||e.name||rP,r=_e.memo(o=>_e.createElement(oP,{...t},_e.createElement(e,{...o})));return r.displayName=`errorBoundary(${n})`,Uo(r,e),r}const sP="redux.action",iP="info",aP={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function uD(e){const t={...aP,...e};return n=>(r,o)=>{t.attachReduxState&&or().addEventProcessor((a,c)=>{try{a.type===void 0&&a.contexts.state.state.type==="redux"&&(c.attachments=[...c.attachments||[],{filename:"redux_state.json",data:JSON.stringify(a.contexts.state.state.value)}])}catch{}return a});function s(a){return(c,u)=>{const l=a(c,u),f=q(),d=t.actionTransformer(u);typeof d<"u"&&d!==null&&Tt({category:sP,data:d,type:iP});const p=t.stateTransformer(l);if(typeof p<"u"&&p!==null){const y=v()?.getOptions()?.normalizeDepth||3,S={state:{type:"redux",value:p}};Yy(S,3+y),f.setContext("state",S)}else f.setContext("state",null);const{configureScopeWithState:h}=t;return typeof h=="function"&&h(f,l),l}}const i=n(s(r),o);return i.replaceReducer=new Proxy(i.replaceReducer,{apply:function(a,c,u){a.apply(c,[s(u[0])])}}),i}}function lD(e){const t=Fo({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),s&&C.location&&op(r,C.location,o,(c,u="url")=>{Bo(a,{name:u==="route"||!V(a)?c:Ft,attributes:{[U]:To,[re]:"auto.pageload.react.reactrouter_v3",[ce]:u,...u==="route"&&{[je]:c}}})}),i&&n.listen&&n.listen(c=>{(c.action==="PUSH"||c.action==="POP")&&op(r,c,o,(u,l="url")=>{Ir(a,{name:l==="route"||!V(a)?u:ft,attributes:{[U]:Mr,[re]:"auto.navigation.react.reactrouter_v3",[ce]:l,...l==="route"&&{[je]:u}}})})})}}}function op(e,t,n,r){let o=t.pathname;n({location:t,routes:e},(s,i,a)=>{if(s||!a)return r(o);const c=cP(a.routes||[]);return c.length===0||c==="/*"?r(o):(o=c,r(o,"route"))})}function cP(e){if(!Array.isArray(e)||e.length===0)return"";const t=e.filter(r=>!!r.path);let n=-1;for(let r=t.length-1;r>=0;r--)if(t[r].path?.startsWith("/")){n=r;break}return t.slice(n).reduce((r,{path:o})=>{const s=r==="/"||r===""?o:`/${o}`;return`${r}${s}`},"")}function dD(e,t={}){const n=e,r=Fo({...t,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:o=!0,instrumentNavigation:s=!0}=t;return{...r,afterAllSetup(i){r.afterAllSetup(i);const a=(l,f)=>{const d=n.matchRoutes(l,f,{preload:!1,throwOnError:!1}),p=d[d.length-1];return p?.routeId!=="__root__"?p:void 0},c=(l,f,d,p)=>{l.updateName(f?f.routeId:p),l.setAttribute(ce,f?"route":"url"),l.setAttributes({...f&&{[je]:f.routeId},...uP(n,d),...ja(f)})},u=C.location;if(o&&u){const l=n.state?.location,f=l?a(l.pathname,l.search):a(u.pathname,n.options.parseSearch(u.search)),d=Bo(i,{name:f?f.routeId:V(i)?Ft:u.pathname,attributes:{[U]:To,[re]:"auto.pageload.react.tanstack_router",[ce]:f?"route":"url",...f&&{[je]:f.routeId},...ja(f)}}),p=n.subscribe("onResolved",h=>{if(p(),!d)return;const{toLocation:m}=h,g=a(m.pathname,m.search);c(d,g,m,V(i)?Ft:m.pathname)})}if(s){let l;n.subscribe("onBeforeLoad",f=>{const{toLocation:d,fromLocation:p}=f;if(!p||d.state===p.state)return;const h=a(d.pathname,d.search),m=V(i)?ft:C.location?.pathname||d.pathname;if(l){c(l,h,d,m);return}l=Ir(i,{name:h?h.routeId:m,attributes:{[U]:Mr,[re]:"auto.navigation.react.tanstack_router",[ce]:h?"route":"url",...h&&{[je]:h.routeId},...ja(h)}},{url:hy(n,d)})}),n.subscribe("onResolved",f=>{const d=l;if(l=void 0,!d)return;const{toLocation:p}=f,h=a(p.pathname,p.search);h&&c(d,h,p,V(i)?ft:C.location?.pathname||p.pathname)})}}}}function hy(e,t){const n=e.options.stringifySearch?.(t.search)??"",r=`${t.pathname}${n&&n!=="?"?n:""}`;return MR(r)}function uP(e,t){const n=hy(e,t);return{[vi]:t.pathname,[Fe]:be(n)}}function ja(e){if(!e)return{};const t={};return Object.entries(e.params).forEach(([n,r])=>{t[`${sb}.${n}`]=r,t[`${jS}.${n}`]=r}),t}function fD(e){const t=Fo({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),my(a,s,i,n,"reactrouter_v4",r,o)}}}function pD(e){const t=Fo({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),my(a,s,i,n,"reactrouter_v5",r,o)}}}function my(e,t,n,r,o,s=[],i){function a(){if(r.location)return r.location.pathname;if(C.location)return C.location.pathname}function c(u){if(s.length===0||!i)return[u,"url"];const l=gy(s,u,i);for(const f of l)if(f.match.isExact)return[f.match.path,"route"];return[u,"url"]}if(t){const u=a();if(u){const[l,f]=c(u);Bo(e,{name:f==="route"||!V(e)?l:Ft,attributes:{[U]:To,[re]:`auto.pageload.react.${o}`,[ce]:f,...f==="route"&&{[je]:l}}})}}n&&r.listen&&r.listen((u,l)=>{if(l&&(l==="PUSH"||l==="POP")){const[f,d]=c(u.pathname);Ir(e,{name:d==="route"||!V(e)?f:ft,attributes:{[U]:Mr,[re]:`auto.navigation.react.${o}`,[ce]:d,...d==="route"&&{[je]:f}}})}})}function gy(e,t,n,r=[]){return e.some(o=>{const s=o.path?n(t,o):r.length?r[r.length-1].match:lP(t);return s&&(r.push({route:o,match:s}),o.routes&&gy(o.routes,t,n,r)),!!s}),r}function lP(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function hD(e){const t=e.displayName||e.name,n=r=>{if(r?.computedMatch?.isExact){const o=r.computedMatch.path,s=dP();q().setTransactionName(o),s&&(s.updateName(o),s.setAttributes({[ce]:"route",[je]:o}))}return _e.createElement(e,{...r})};return n.displayName=`sentryRoute(${t})`,Uo(n,e),n}function dP(){const e=he(),t=e&&Ce(e);if(!t)return;const n=ne(t).attributes[U];return n==="navigation"||n==="pageload"?t:void 0}function Qi(e,t){if(!t||t==="/"||!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?e:e.slice(n)||"/"}const sp=new WeakMap;function fP(e,t,n){if(!e||!t?.length)return null;const r=n?Qi(e,n):e;let o=sp.get(t);o||(o=yP(t),sp.set(t,o),Ae&&_.log("[React Router] Sorted route manifest by specificity:",o.length,"patterns"));for(const s of o)if(pP(r,s))return Ae&&_.log("[React Router] Matched pathname",r,"to pattern",s),s;return Ae&&_.log("[React Router] No manifest match found for pathname:",r),null}function pP(e,t){if(t==="/")return e==="/"||e==="";const n=ap(e),r=ap(t);if(r.length>0&&r[r.length-1]==="*"){const s=r.slice(0,-1);if(n.length<s.length)return!1;for(const[i,a]of s.entries())if(!ip(n[i],a))return!1;return!0}if(n.length!==r.length)return!1;for(const[s,i]of r.entries())if(!ip(n[s],i))return!1;return!0}function ip(e,t){return e===void 0||t===void 0?!1:_y.test(t)?!0:e===t}function ap(e){return e.split("/").filter(Boolean)}const _y=/^:[\w-]+$/,hP=10,mP=3,gP=1,_P=-2;function cp(e){const t=e.split("/");let n=t.length;t.includes("*")&&(n+=_P);for(const r of t)r!=="*"&&(_y.test(r)?n+=mP:r===""?n+=gP:n+=hP);return n}function yP(e){return[...e].sort((t,n)=>{const r=cp(t);return cp(n)-r})}const sn=[],SP=10;function bP(e,t){const n={};return sn.length>=SP&&(Ae&&_.warn("[React Router] Navigation context stack overflow - removing oldest context"),sn.shift()),sn.push({token:n,targetPath:e,span:t}),n}function vP(e){sn[sn.length-1]?.token===e&&sn.pop()}function yy(){const e=sn.length;return e>0?sn[e-1]??null:null}function EP(e){return by(e.route.path||"")}function Sy(e){return e.params["*"]||""}function by(e){return e[e.length-1]==="*"?e.slice(0,-1):e}function an(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function vy(e){return e.endsWith("*")}function fn(e){return e.includes("/*")||e.endsWith("*")}function up(e,t){return vy(e)&&!!t.route.children?.length||!1}function Ey(e){return!!(!e.children&&e.element&&e.path?.endsWith("/*"))}function wP(e,t,n,r){const o=e&&e.length>0?e:r?Qi(t,n):t;let s=o.slice(-2)==="/*"?o.slice(0,-2):o;return s.length>1&&s[s.length-1]==="/"&&(s=s.slice(0,-1)),[s,"route"]}function lp(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function Mt(e){return e[0]==="/"?e:`/${e}`}function wy(e,t){const n=Fc(t);return n===0?e:Mt(e.split("/").filter(Boolean).slice(n).join("/"))}function Fc(e){return e.split("/").filter(Boolean).length}function rl(e,t,n){const r=n(e,t);if(!r||r.length===0)return"";for(const o of r)if(o.route.path&&o.route.path!=="*"){const s=EP(o),i=wy(t.pathname,Mt(o.pathnameBase));return t.pathname===i?an(i):an(an(s||"")+Mt(rl(e.filter(a=>a!==o.route),{pathname:i},n)))}return""}function TP(e,t,n,r){const o=t.filter(Ey);if(!o.length)return;const s=r(o,e),i=s?.[s.length-1];if(!i||!Sy(i))return;const a=an(by(i.route.path||""));if(!a)return;const c=Mt(a),u=a.split("/")[0],l=u?.startsWith(":")&&n?.split("/").includes(u);if(n===c||n?.startsWith(`${c}/`)||l)return;const f=wy(e.pathname,Mt(i.pathnameBase)),d=rl(t.filter(p=>p!==i.route),{pathname:f},r);return d?Mt(`${a}${Mt(d)}`):void 0}function Ho(e){const t=new Set(e.flatMap(n=>n.children??[]));return e.filter(n=>!t.has(n))}function IP(e,t,n){return Ty(n(Ho(t),e))}function Ty(e){return!!e?.some(t=>Ey(t.route)&&Sy(t))}function dp(e,t,n){return n?Qi(e.pathname,t):e.pathname||""}function kP(e,t,n,r="",o=!1){if(!e||e.length===0)return[o?Qi(t.pathname,r):t.pathname,"url"];if(!n)return[dp(t,r,o),"url"];let s="";for(const i of n){const a=i.route;if(!a)continue;if(a.index)return wP(s,i.pathname,r,o);const c=a.path;if(!c||up(c,i))continue;const u=c[0]==="/"||s[s.length-1]==="/"?c:`/${c}`;if(s=an(s)+Mt(u),Fc(t.pathname)===Fc(r+i.pathname))return lp(s)!==lp(i.pathname)&&!vy(s)?[(o?"":an(r))+u,"route"]:(up(s,i)&&(s=s.slice(0,-1)),[(o?"":an(r))+s,"route"])}return[dp(t,r,o),"url"]}function Zi(e,t,n,r,o){const{matchRoutes:s,stripBasename:i,basename:a,lazyRouteManifest:c,enableAsyncRouteHandlers:u}=o;if(u&&c&&c.length>0){const h=fP(e.pathname,c,a);if(h)return[(i?"":an(a))+h,"route"]}let l,f="url";const d=a?IP(e,n,s):Ty(r);d&&(l=Mt(rl(n,e,s)),f="route"),(!d||!l)&&([l,f]=kP(t,e,r,a,i));const p=TP(e,n,l,s);return p?[p,"route"]:[l||e.pathname,f]}function It(){const e=he(),t=e?Ce(e):void 0;if(!t)return;const n=ne(t).attributes[U];return n==="navigation"||n==="pageload"?t:void 0}function RP(){const e=yy();if(e)return e.targetPath?{pathname:e.targetPath,search:"",hash:"",state:null,key:"default"}:null;if(typeof C<"u")try{const t=C.location;if(t)return{pathname:t.pathname,search:t.search||"",hash:t.hash||"",state:null,key:"default"}}catch{Ae&&_.warn("[React Router] Could not access window.location")}return null}function CP(){const e=yy();return e?e.span:It()}function AP(e,t,n,r){const o=new Proxy(e,{apply(s,i,a){const c=RP(),u=CP(),l=s.apply(i,a);return NP(l,t,n,r,c,u),l}});return pe(o,"__sentry_proxied__",!0),o}function NP(e,t,n,r,o,s){$t(e)?e.then(i=>{Array.isArray(i)&&r(i,t,o??void 0,s)}).catch(i=>{Ae&&_.warn(`Error resolving async handler '${n}' for route`,t,i)}):Array.isArray(e)&&r(e,t,o??void 0,s)}function ea(e,t){if(e.handle&&typeof e.handle=="object")for(const n of Object.keys(e.handle)){const r=e.handle[n];typeof r=="function"&&!r.__sentry_proxied__&&(e.handle[n]=AP(r,e,n,t))}if(Array.isArray(e.children))for(const n of e.children)ea(n,t)}const Iy=new WeakMap;function ta(e){return e?Iy.get(e):void 0}const fi=C?.document?_e.useLayoutEffect:_e.useEffect,kn=new WeakMap,Ne=new Set,Is=new WeakMap,Bc=new WeakMap;function xP(e){return C?.requestAnimationFrame?C.requestAnimationFrame(e):setTimeout(e,0)}function fp(e){C?.cancelAnimationFrame?C.cancelAnimationFrame(e):clearTimeout(e)}function ky(e){return`${e.pathname}${e.search||""}${e.hash||""}`}function pp(e){return e.includes(":")||e.includes("*")}function MP(e,t,n,r){if(!e)return{skip:!1,shouldUpdate:!1};if(e.locationKey===t&&(e.isPlaceholder||!r)){const s=!!e.routeName&&fn(e.routeName),i=fn(n),a=!!e.routeName&&pp(e.routeName),c=pp(n),u=s&&!i,l=!a&&c,f=n!==e.routeName&&n.length>(e.routeName?.length||0)&&!i;return{skip:!0,shouldUpdate:!!(e.routeName&&(u||l||f))}}return{skip:!1,shouldUpdate:!1}}function Ry(e,t){const n=t.children||[],r=e.filter(o=>!n.some(s=>s===o||o.path&&s.path===o.path||o.id&&s.id===o.id));r.length>0&&(t.children=[...n,...r])}function Cy(e,t){let n=Is.get(e);n||(n=new Set,Is.set(e,n)),n.add(t),t.finally(()=>{const r=Is.get(e);r&&r.delete(t)})}function Ay(e){const t=new Promise(n=>{Bc.set(e,n)});Cy(e,t)}function OP(e){const t=Bc.get(e);t&&(t(),Bc.delete(e),e.__sentry_may_have_lazy_routes__&&(e.__sentry_may_have_lazy_routes__=!1))}function ol(e,t,n,r=null,o){e.forEach(i=>{Ne.add(i),t.enableAsyncRouteHandlers&&ea(i,(a,c,u,l)=>ol(a,t,c,u,l))}),n&&Ry(e,n);const s=o??It();if(s){const{end_timestamp:i,attributes:a}=ne(s);if(i){Ae&&_.warn("[React Router] Lazy handler resolved after span ended - skipping update");return}const c=a[U];let u=r;if(!u&&!o&&typeof C<"u"){const l=C.location;l?.pathname&&(u={pathname:l.pathname})}u&&(c==="pageload"?zo({activeRootSpan:s,location:{pathname:u.pathname},routes:Array.from(Ne),allRoutes:Array.from(Ne),config:t}):c==="navigation"&&Uc(s,u,Array.from(Ne),!1,t))}}function Uc(e,t,n,r=!1,o){const{name:s,end_timestamp:i,attributes:a}=ne(e),c=e?.__sentry_navigation_pathname__;if(c!==void 0&&c!==t.pathname){Ae&&_.log(`[React Router] Not renaming the navigation span for "${c}" with the route of "${t.pathname}"`);return}const u=e?.__sentry_navigation_name_set__,l=s&&fn(s);if((!u||r||l)&&!i){const d=o.matchRoutes(Ho(n),t),[p,h]=Zi(t,n,n,d||[],o),m=a[ce];if(p&&(!s||!u&&(m!=="route"||h==="route")||m!=="route"&&h==="route"||m==="route"&&h==="route"&&l)){const y=v(),S=h!=="route"&&!!y&&V(y);e.updateName(S?ft:p),e.setAttribute(ce,h),h==="route"&&e.setAttribute(je,p),!fn(p)&&h==="route"&&pe(e,"__sentry_navigation_name_set__",!0)}}}function Ny(e,t,n,r,o){let s=!1,i=!!r&&ne(r).attributes[U]==="pageload",a=!1,c=null,u=null;e.subscribe(l=>{if(!s){const d=It();d&&ne(d).attributes[U]==="pageload"?i=!0:i&&(l.historyAction==="POP"&&!a?a=!0:s=!0)}if(l.historyAction==="PUSH"||l.historyAction==="POP"&&s){const d=ky(l.location),p=()=>{u!==d&&(u=d,c=null,ul({location:l.location,routes:t,navigationType:l.historyAction,version:n,allRoutes:Array.from(Ne),config:o}))};l.navigation.state!=="idle"?(u!==d&&(u=null),c!==null&&fp(c),c=xP(p)):(c!==null&&(fp(c),c=null),p())}})}function sl(e,t){return function(n,r){const o=ta(v());if(!o)return Ae&&_.warn(`reactRouter${t?`V${t}`:""}Instrumentation was unable to wrap the \`createRouter\` function because the React Router browser tracing integration was not set up. Make sure \`Sentry.init()\` runs before the router is created.`),e(n,r);const s={...o,basename:r?.basename||""};if(Wo(n),s.enableAsyncRouteHandlers)for(const l of n)ea(l,(f,d,p,h)=>ol(f,s,d,p,h));const i=It();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&i&&(pe(i,"__sentry_may_have_lazy_routes__",!0),Ay(i));const c=xy(r,!1,i,s),u=e(n,c);return u.state.historyAction==="POP"&&i&&zo({activeRootSpan:i,location:u.state.location,routes:n,allRoutes:Array.from(Ne),config:s}),Ny(u,n,t,i,s),u}}function il(e,t){return function(n,r){const o=ta(v());if(!o)return Ae&&_.warn(`reactRouter${t?`V${t}`:""}Instrumentation was unable to wrap the \`createMemoryRouter\` function because the React Router browser tracing integration was not set up. Make sure \`Sentry.init()\` runs before the router is created.`),e(n,r);const s={...o,basename:r?.basename||""};if(Wo(n),s.enableAsyncRouteHandlers)for(const y of n)ea(y,(S,E,b,N)=>ol(S,s,E,b,N));const i=It();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&i&&(pe(i,"__sentry_may_have_lazy_routes__",!0),Ay(i));const c=xy(r,!0,i,s),u=e(n,c);let l;const f=r?.initialEntries,d=r?.initialIndex,p=f?.length===1,h=d!==void 0&&f?.[d];l=p?f[0]:h?f[d]:void 0;const m=l?typeof l=="string"?{pathname:l}:l:u.state.location,g=It();return u.state.historyAction==="POP"&&g&&zo({activeRootSpan:g,location:m,routes:n,allRoutes:Array.from(Ne),config:s}),Ny(u,n,t,g,s),u}}function al(e,t){const n=Fo({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useLocation:r,useNavigationType:o,createRoutesFromChildren:s,matchRoutes:i,stripBasename:a,enableAsyncRouteHandlers:c=!1,instrumentPageLoad:u=!0,instrumentNavigation:l=!0,lazyRouteTimeout:f,lazyRouteManifest:d}=e;return Bb(n,{setup(p){const h=e.finalTimeout??3e4,m=(e.idleTimeout??1e3)*3,g=f??m;let y;g===1/0?(y=h,Ae&&_.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",h,"ms to prevent indefinite hangs")):Number.isNaN(g)?(Ae&&_.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",m),y=m):g<0?(Ae&&_.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:",g,"falling back to:",m),y=m):y=g,typeof r=="function"&&typeof o=="function"&&typeof s=="function"&&typeof i=="function"?Iy.set(p,{useLocation:r,useNavigationType:o,createRoutesFromChildren:s,matchRoutes:i,stripBasename:a||!1,enableAsyncRouteHandlers:c,instrumentNavigation:l,lazyRouteTimeout:y,lazyRouteManifest:d,basename:""}):Ae&&_.warn("[React Router] Skipping route instrumentation because `useLocation`, `useNavigationType`, `createRoutesFromChildren` or `matchRoutes` was not provided. Pass them to `reactRouterBrowserTracingIntegration`, or import it from `@sentry/react/react-router` to have them supplied automatically.")},afterAllSetup(p){const h=C.location?.pathname;u&&h&&Bo(p,{name:V(p)?Ft:h,attributes:{[ce]:"url",[U]:To,[re]:`auto.pageload.react.reactrouter${t?`_v${t}`:""}`}})}})}function cl(e,t){const n=({config:o,routes:s,locationArg:i})=>{const a=_e.useRef(!0),c=o.useLocation(),u=o.useNavigationType(),l=typeof i=="string"||i?.pathname?i:c;return fi(()=>{const f=Wo(s);return()=>My(f)}),fi(()=>{const f=typeof l=="string"?{pathname:l}:l;a.current?(zo({activeRootSpan:It(),location:f,routes:s,allRoutes:Array.from(Ne),config:o}),a.current=!1):ul({location:f,routes:s,navigationType:u,version:t,allRoutes:Array.from(Ne),config:o})},[u,l]),null},r=({routes:o,locationArg:s})=>{const i=ta(v()),a=e(o,s);return _e.createElement(_e.Fragment,null,a,i?_e.createElement(n,{config:i,routes:o,locationArg:s}):null)};return(o,s)=>_e.createElement(r,{routes:o,locationArg:s})}function xy(e,t,n,r){if(!e||!("patchRoutesOnNavigation"in e)||typeof e.patchRoutesOnNavigation!="function")return e||{};const o=e.patchRoutesOnNavigation;return{...e,patchRoutesOnNavigation:async s=>{const i=s?.path,a=It()??n;if(!t){const u=s?.patch,l=s?.matches;u&&(s.patch=(f,d)=>{if(Wo(d),l&&l.length>0){const m=l[l.length-1]?.route;if(m){const g=Array.from(Ne).find(y=>{const S=y.id!==void 0&&y.id===f,E=y===m,b=y.path!==void 0&&m.path!==void 0&&y.path===m.path;return S||E||b});g&&Ry(d,g)}}const p=a?ne(a):void 0;return i&&a&&p&&!p.end_timestamp&&p.attributes[U]==="navigation"&&Uc(a,{pathname:i,search:"",hash:"",state:null,key:"default"},Array.from(Ne),!0,r),u(f,d)})}const c=(async()=>{const u=bP(i,a);let l;try{l=await o(s)}finally{vP(u),a&&OP(a)}const f=a?ne(a):void 0;if(a&&f&&!f.end_timestamp&&f.attributes[U]==="navigation"){const d=i;d&&Uc(a,{pathname:d,search:"",hash:"",state:null,key:"default"},Array.from(Ne),!1,r)}return l})();return a&&Cy(a,c),c}}}function ul(e){const{location:t,routes:n,navigationType:r,version:o,config:s,matches:i,allRoutes:a}=e,c=Array.isArray(i)?i:s.matchRoutes(Ho(a||n),t,s.basename),u=v();if(!u||!s.instrumentNavigation)return;const l=It();if(!(l&&ne(l).attributes[U]==="pageload"&&r==="POP")&&(r==="PUSH"||r==="POP")&&c){const[f,d]=Zi(t,a||n,a||n,c,s),p=ky(t),h=kn.get(u),m=h&&!h.isPlaceholder?!!ne(h.span).end_timestamp:!1,{skip:g,shouldUpdate:y}=MP(h,p,f,m);if(g){if(y&&h){const N=h.routeName;if(h.isPlaceholder)h.routeName=f,Ae&&_.log(`[Tracing] Updated placeholder navigation name from "${N}" to "${f}" (will apply to real span)`);else{const I=d!=="route"&&V(u);h.span.updateName(I?ft:f),h.span.setAttribute(ce,d),d==="route"&&h.span.setAttribute(je,f),pe(h.span,"__sentry_navigation_name_set__",!0),h.routeName=f,Ae&&_.log(`[Tracing] Updated navigation span name from "${N}" to "${f}"`)}}else Ae&&_.log(`[Tracing] Skipping duplicate navigation for location: ${p}`);return}const E={span:{end:()=>{}},routeName:f,pathname:t.pathname,locationKey:p,isPlaceholder:!0};kn.set(u,E);let b;try{b=Ir(u,{name:d==="route"||!V(u)?E.routeName:ft,attributes:{[ce]:d,[U]:Mr,[re]:`auto.navigation.react.reactrouter${o?`_v${o}`:""}`,...d==="route"&&{[je]:E.routeName}}})}catch(N){throw kn.delete(u),N}b?(pe(b,"__sentry_navigation_pathname__",t.pathname),kn.set(u,{span:b,routeName:E.routeName,pathname:t.pathname,locationKey:p}),Hc(b,t,n,"navigation",s)):kn.delete(u)}}function Wo(e){const t=[];return e.forEach(n=>{Oy(n).forEach(o=>{Ne.add(o),t.push(o)})}),t}function My(e){e.forEach(t=>{Ne.delete(t)})}function Oy(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(n=>{Oy(n,t).forEach(o=>{t.add(o)})})),t}function zo({activeRootSpan:e,location:t,routes:n,config:r,matches:o,allRoutes:s}){const i=Array.isArray(o)?o:r.matchRoutes(Ho(s||n),t,r.basename);if(i){const[a,c]=Zi(t,s||n,s||n,i,r);if(q().setTransactionName(a||"/"),e){const u=v(),l=c!=="route"&&!!u&&V(u);e.updateName(l?Ft:a),e.setAttribute(ce,c),c==="route"&&e.setAttribute(je,a),Hc(e,t,n,"pageload",r)}}else e&&Hc(e,t,n,"pageload",r)}function PP(e,t,n,r,o=!1){return n?!!(!e&&o||e&&fn(e)&&r==="route"&&!fn(n)||t!=="route"&&r==="route"):!1}function qa(e,t,n,r,o,s,i,a){try{const c=t.attributes[ce];if(c==="route"&&n&&!fn(n))return;const u=Array.from(i),l=u.length>0?u:o,f=a.matchRoutes(Ho(l),r,a.basename);if(!f)return;const[d,p]=Zi(r,l,l,f,a),h=PP(n,c,d,p,!0),m=s==="pageload"||!t.end_timestamp;if(h&&m){const g=v(),y=p!=="route"&&!!g&&V(g),S=s==="pageload"?Ft:ft;e.updateName(y?S:d),e.setAttribute(ce,p),p==="route"&&e.setAttribute(je,d)}}catch(c){Ae&&_.warn(`Error updating span details before ending: ${c}`)}}function Hc(e,t,n,r,o){const s=`__sentry_${r}_end_patched__`;if(e?.[s]||!e.end)return;const a=e.end.bind(e);let c=!1;e.end=function(...l){if(c)return;c=!0;const f=l.length>0?l[0]:Date.now()/1e3,d=ne(e),p=d.name,h=d.attributes[ce],m=()=>{const b=v();b&&r==="navigation"&&kn.get(b)?.span===e&&kn.delete(b)},g=Is.get(e),y=e.__sentry_may_have_lazy_routes__;if((g&&g.size>0||y)&&p&&(fn(p)||h!=="route")){if(o.lazyRouteTimeout===0){qa(e,d,p,t,n,r,Ne,o),m(),a(f);return}const b=new Promise(I=>setTimeout(I,o.lazyRouteTimeout));let N;if(g&&g.size>0){const I=Promise.allSettled(g).then(()=>{});N=o.lazyRouteTimeout===1/0?I:Promise.race([I,b])}else N=b;N.then(()=>{const I=ne(e);qa(e,I,I.name,t,n,r,Ne,o),m(),a(f)}).catch(()=>{m(),a(f)});return}qa(e,d,p,t,n,r,Ne,o),m(),a(f)},pe(e,s,!0)}function ll(e,t){const n=({config:o,routeChildren:s})=>{const i=_e.useRef(!0),a=o.useLocation(),c=o.useNavigationType(),u=o.createRoutesFromChildren(s);return fi(()=>{const l=Wo(u);return()=>My(l)}),fi(()=>{i.current?(zo({activeRootSpan:It(),location:a,routes:u,allRoutes:Array.from(Ne),config:o}),i.current=!1):ul({location:a,routes:u,navigationType:c,version:t,allRoutes:Array.from(Ne),config:o})},[a,c]),null},r=o=>{const s=ta(v());return _e.createElement(_e.Fragment,null,_e.createElement(e,{...o}),s?_e.createElement(n,{config:s,routeChildren:o.children}):null)};return Uo(r,e),r}function mD(e){return al(e,"6")}function gD(e){return cl(e,"6")}function _D(e){return sl(e,"6")}function yD(e){return il(e,"6")}function SD(e){return ll(e,"6")}function bD(e){return al(e,"7")}function vD(e){return ll(e,"7")}function ED(e){return sl(e,"7")}function wD(e){return il(e,"7")}function TD(e){return cl(e,"7")}function ID(e){return al(e,"")}function kD(e){return ll(e,"")}function RD(e){return sl(e,"")}function CD(e){return il(e,"")}function AD(e){return cl(e,"")}export{XR as BrowserClient,oP as ErrorBoundary,ga as MULTIPLEXED_TRANSPORT_EXTRA_KEY,JL as OpenFeatureIntegrationHook,py as Profiler,nn as SDK_VERSION,$P as SEMANTIC_ATTRIBUTE_SENTRY_OP,FP as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,Xc as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,Et as Scope,C as WINDOW,Tt as addBreadcrumb,bE as addEventProcessor,Al as addIntegration,jL as bfcacheMetricsIntegration,GP as bindScopeToEmitter,RC as breadcrumbsIntegration,$C as browserApiErrorsIntegration,GL as browserProfilingIntegration,zC as browserSessionIntegration,Fo as browserTracingIntegration,YL as buildLaunchDarklyFlagUsedHandler,iL as captureConsoleIntegration,ko as captureEvent,Pn as captureException,fT as captureFeedback,_E as captureMessage,fy as captureReactException,da as captureSession,dC as chromeStackLineParser,nL as close,z0 as consoleIntegration,hL as consoleLoggingIntegration,PL as contextLinesIntegration,zP as continueTrace,vL as createCachedRouteProvider,gL as createConsolaReporter,uD as createReduxEnhancer,WE as createTransport,aR as createUrlRouteProvider,AL as createUserFeedbackEnvelope,GC as cultureContextIntegration,n0 as dedupeIntegration,sy as defaultRequestInstrumentationOptions,EC as defaultStackLineParsers,wC as defaultStackParser,tD as diagnoseSdkConnectivity,yL as elementTimingIntegration,tm as endSession,Dw as eventFiltersIntegration,qR as eventFromException,GR as eventFromMessage,Du as exceptionFromError,aL as extraErrorDataIntegration,fL as featureFlagsIntegration,wL as feedbackAsyncIntegration,TL as feedbackIntegration,TL as feedbackSyncIntegration,zL as fetchStreamPerformanceIntegration,tL as flush,NL as forceLoad,Ow as functionToStringIntegration,mC as geckoStackLineParser,MR as getAbsoluteUrl,he as getActiveSpan,v as getClient,q as getCurrentScope,l1 as getDefaultIntegrations,_L as getFeedback,or as getGlobalScope,me as getIsolationScope,BL as getReplay,Ce as getRootSpan,Nu as getRouteProvider,ds as getSpanDescendants,pb as getSpanStatusFromHttpCode,xm as getTraceData,YC as globalHandlersIntegration,LL as graphqlClientIntegration,ZL as growthbookIntegration,OL as httpClientIntegration,ZC as httpContextIntegration,oD as init,jM as instrumentOutgoingRequests,k0 as instrumentSupabaseClient,SL as interactionsIntegration,Fg as isBotUserAgent,SE as isEnabled,rL as isInitialized,yE as lastEventId,KL as launchDarklyIntegration,BR as lazyLoadIntegration,o1 as linkedErrorsIntegration,pL as logger,qL as makeBrowserOfflineTransport,Yg as makeFetchTransport,oL as makeMultiplexedTransport,mL as metrics,sL as moduleMetadataIntegration,t_ as normalizeStringifyValue,xL as onLoad,XL as openFeatureIntegration,RL as opera10StackLineParser,CL as opera11StackLineParser,vw as parameterize,sD as reactErrorHandler,ID as reactRouterBrowserTracingIntegration,lD as reactRouterV3BrowserTracingIntegration,fD as reactRouterV4BrowserTracingIntegration,pD as reactRouterV5BrowserTracingIntegration,mD as reactRouterV6BrowserTracingIntegration,bD as reactRouterV7BrowserTracingIntegration,Mb as registerSpanErrorInstrumentation,rD as registerWebWorker,UL as replayCanvasIntegration,FL as replayIntegration,HL as reportPageLoaded,ML as reportingObserverIntegration,iR as resolveCurrentRoute,bL as resolveRoute,cL as rewriteFramesIntegration,JT as sendFeedback,WL as setActiveSpanInBrowser,QP as setAttribute,JP as setAttributes,em as setContext,eL as setConversationId,sw as setCurrentClient,KP as setExtra,VP as setExtras,As as setHttpStatus,Ah as setMeasurement,sR as setRouteProvider,XP as setTag,YP as setTags,ZP as setUser,sf as showReportDialog,lv as spanStreamingIntegration,UP as spanToBaggageHeader,ne as spanToJSON,xe as spanToStaticSpanJSON,Cb as spanToTraceHeader,VL as spotlightBrowserIntegration,Ir as startBrowserTracingNavigationSpan,Bo as startBrowserTracingPageLoadSpan,bt as startInactiveSpan,wv as startNewTrace,Yl as startSession,jP as startSpan,qP as startSpanManual,eD as statsigIntegration,uL as supabaseIntegration,Ev as suppressTracing,dD as tanstackRouterBrowserTracingIntegration,dL as thirdPartyErrorFilterIntegration,IL as uiProfiler,QL as unleashIntegration,BP as updateSpanName,aD as useProfiler,EL as userTimingIntegration,DL as viewHierarchyIntegration,XM as webVitalsIntegration,nD as webWorkerIntegration,kL as winjsStackLineParser,dn as withActiveSpan,cD as withErrorBoundary,DP as withIsolationScope,iD as withProfiler,Ze as withScope,SD as withSentryReactRouterV6Routing,vD as withSentryReactRouterV7Routing,hD as withSentryRouting,HP as withStaticSpan,WP as withStreamedSpan,RD as wrapCreateBrowserRouter,_D as wrapCreateBrowserRouterV6,ED as wrapCreateBrowserRouterV7,CD as wrapCreateMemoryRouter,yD as wrapCreateMemoryRouterV6,wD as wrapCreateMemoryRouterV7,kD as wrapReactRouterRouting,AD as wrapUseRoutes,gD as wrapUseRoutesV6,TD as wrapUseRoutesV7,lL as zodErrorsIntegration};
|