1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f1e89328-68e4-593d-96b3-9240045dc692")}catch(e){}}(); 3import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$a as t,$o as n,Ao as r,As as i,Ba as a,Bo as o,Bs as s,Co as c,Cs as l,Do as u,Ds as d,Eo as f,Es as p,Fo as m,Fs as h,Ga as g,Go as _,Gs as v,Ha as y,Ho as b,Hs as x,Io as S,Is as C,Ja as w,Jo as ee,Js as T,Ka as E,Ko as D,Ks as te,La as ne,Lo as re,Ls as ie,Mo as ae,Ms as O,No as oe,Ns as se,Oo as ce,Os as le,Po as ue,Ps as de,Qa as k,Qo as fe,Ra as pe,Ro as me,Rs as he,So as ge,Ss as _e,Ts as ve,Ua as ye,Uo as A,Us as j,Va as be,Vo as xe,Vs as Se,Wa as Ce,Wo as M,Ws as we,Xa as N,Xo as P,Ya as Te,Yo as Ee,Za as De,Zo as Oe,_o as ke,_s as Ae,ao as je,as as Me,bo as Ne,bs as F,co as Pe,cs as Fe,do as Ie,ds as Le,eo as Re,es as ze,fo as Be,fs as Ve,go as He,hs as Ue,io as We,is as Ge,jo as Ke,js as qe,ko as Je,ks as Ye,lo as Xe,ls as Ze,mo as Qe,ms as I,no as $e,ns as et,oo as tt,os as nt,po as rt,ps as it,qa as at,qo as ot,ro as st,rs as ct,so as lt,ss as ut,to as dt,ts as ft,uo as pt,us as mt,vo as ht,vs as gt,wo as _t,ws as vt,xo as yt,xs as bt,ys as L,za as xt,zo as St,zs as Ct}from"./app-charts-bCsSRjal.js";var wt=!1;function Tt(){if(wt)return;function e(){let e=M(),t=e&&_(e);if(t){let e=`internal_error`;te&&j.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}wt=!0,s(e),Ct(e)}var Et={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Dt=`heartbeatFailed`,Ot=`idleTimeout`,kt=`finalTimeout`,At=`externalFinish`;function jt(e,t={}){let n=new Map,r=!1,i,a,s=At,c=!t.disableAutoFinish,l=[],{idleTimeout:u=Et.idleTimeout,finalTimeout:d=Et.finalTimeout,childSpanTimeout:f=Et.childSpanTimeout,beforeSpanEnd:p,trimIdleSpanEndTimestamp:m=!0}=t,h=L(),g=F();if(!h||!A()){let e=new o({traceId:g.getPropagationContext().traceId});return ut(e,g,bt()),e}let _=M(),v=Mt(e);v.end=new Proxy(v.end,{apply(e,t,n){if(p&&p(v),xe(t))return;let[r,...i]=n,a=r||Ye(),o=Ee(a),s=D(v).filter(e=>e!==v),c=P(v);if(!s.length||!m)return T(o),Reflect.apply(e,t,[o,...i]);let l=h.getOptions().ignoreSpans,u=s?.reduce((e,t)=>{let n=P(t);return!n.timestamp||l&&b({description:n.description,op:n.op,attributes:n.data},l)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),f=c.start_timestamp,g=Math.min(f?f+d/1e3:1/0,Math.max(f||-1/0,Math.min(o,u||1/0)));return T(g),Reflect.apply(e,t,[g,...i])}});function y(){i&&=(clearTimeout(i),void 0)}function x(){a&&=(clearTimeout(a),void 0)}function S(e){y(),i=setTimeout(()=>{!r&&n.size===0&&c&&(s=Ot,v.end(e))},u)}function C(e){x(),a=setTimeout(()=>{!r&&c&&(s=Dt,v.end(e))},f)}function w(e){y(),n.set(e,!0),C(Ye()+f/1e3)}function ee(e){n.has(e)&&n.delete(e),n.size===0&&(S(Ye()+u/1e3),x())}function T(e){r=!0,n.clear(),l.forEach(e=>e()),vt(g,_);let t=P(v),{start_timestamp:i}=t;if(!i)return;t.data[`sentry.idle_span_finish_reason`]||v.setAttribute(mt,s);let a=t.status;(!a||a===`unknown`)&&v.setStatus({code:1}),j.log(`[Tracing] Idle span "${t.op}" finished`);let o=D(v).filter(e=>e!==v),c=0;o.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:`cancelled`}),t.end(e),te&&j.log(`[Tracing] Cancelling span since span ended early`,JSON.stringify(t,void 0,2)));let{timestamp:n=0,start_timestamp:r=0}=P(t),i=r<=e,a=(d+u)/1e3,o=n-r<=a;if(te){let e=JSON.stringify(t,void 0,2);i?o||j.log(`[Tracing] Discarding span since it finished after idle span final timeout`,e):j.log(`[Tracing] Discarding span since it happened after idle span was finished`,e)}(!o||!i)&&(ot(v,t),c++)}),c>0&&v.setAttribute(`sentry.idle_span_discarded_spans`,c)}return l.push(h.on(`spanStart`,e=>{r||e===v||P(e).timestamp||e instanceof ae&&e.isStandaloneSpan()||D(v).includes(e)&&w(e.spanContext().spanId)})),l.push(h.on(`spanEnd`,e=>{r||ee(e.spanContext().spanId)})),l.push(h.on(`idleSpanEnableAutoFinish`,e=>{e===v&&(c=!0,S(),n.size&&C())})),t.disableAutoFinish||S(),setTimeout(()=>{r||(v.setStatus({code:2,message:`deadline_exceeded`}),s=kt,v.end())},d),v}function Mt(e){let t=r(e);
3return vt(F(),t),te&&j.log(`[Tracing] Started span is an idle span`),t}function Nt(e,t,n){let r,i,a,o=n?.maxWait?Math.max(n.maxWait,t):0,s=n?.setTimeoutImpl||setTimeout;function c(){return l(),r=e(),r}function l(){i!==void 0&&clearTimeout(i),a!==void 0&&clearTimeout(a),i=a=void 0}function u(){return i!==void 0||a!==void 0?c():r}function d(){return i&&clearTimeout(i),i=s(c,t),o&&a===void 0&&(a=s(c,o)),r}return d.cancel=l,d.flush=u,d}function Pt(e,t){let n=t?.getDsn(),r=t?.getOptions().tunnel;return It(e,n)||Ft(e,r)}function Ft(e,t){return t?Rt(e)===Rt(t):!1}function It(e,t){let n=Pe(e);return!n||lt(n)||!t?!1:Lt(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function Lt(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function Rt(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function zt(e={}){let t=e.client||L();if(!Ne()||!t)return{};let r=we(),i=l(r);if(i.getTraceData)return i.getTraceData(e);let a=e.scope||F(),o=e.span||M(),s=xe(o)&&!A(t.getOptions());if(!o&&_e())return{};let c=o&&!s?fe(o):Bt(a),u=o?St(o):me(t,a),d=nt(u);if(!ze.test(c))return j.warn(`Invalid sentry-trace data. Cannot generate trace data`),{};let f={"sentry-trace":c,baggage:d};return e.propagateTraceparent&&(f.traceparent=o&&!s?n(o):Vt(a)),f}function Bt(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return ft(t,r,n)}function Vt(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return et(t,r,n)}function Ht(e,t,n,i,a){if(!e.fetchData)return;let{method:s,url:c}=e.fetchData,l=A()&&t(c);if(e.endTimestamp){let t=e.fetchData.__span;if(!t)return;let n=i[t];n&&(l&&(Gt(n,e),Ut(n,e,a)),delete i[t]);return}let{spanOrigin:u=`auto.http.browser`,propagateTraceparent:d=!1}=typeof a==`object`?a:{spanOrigin:a},f=L(),p=!!M(),m=p||!!f&&oe(f),h=l&&m?r(Yt(c,s,u)):new o,g=Je(h)&&p?void 0:h;if(l&&!m&&f?.recordDroppedEvent(`no_parent_span`,`span`),e.fetchData.__span=h.spanContext().spanId,i[h.spanContext().spanId]=h,n(e.fetchData.url)){let t=e.args[0],n={...e.args[1]||{}},r=Wt(t,n,A()&&m?g:void 0,d);r&&(e.args[1]=n,n.headers=r)}if(f){let t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit(`beforeOutgoingRequestSpan`,h,t)}return h}function Ut(e,t,n){(typeof n==`object`&&n?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function Wt(e,t,n,r){let i=zt({span:n,propagateTraceparent:r}),a=i[`sentry-trace`],o=i.baggage,s=i.traceparent;if(!a)return;let c=t.headers||(he(e)?e.headers:void 0);if(!c)return{"sentry-trace":a,...o&&{baggage:o},...s&&{traceparent:s}};if(qt(c)){let e=new Headers(c);if(e.get(`sentry-trace`)||e.set(`sentry-trace`,a),r&&s&&!e.get(`traceparent`)&&e.set(`traceparent`,s),o){let t=e.get(`baggage`);t?Kt(t)||e.set(`baggage`,`${t},${o}`):e.set(`baggage`,o)}return e}if(Jt(c)){let e=[...c];e.find(e=>e[0]===`sentry-trace`)||e.push([`sentry-trace`,a]),r&&s&&!e.find(e=>e[0]===`traceparent`)&&e.push([`traceparent`,s]);let t=c.find(e=>e[0]===`baggage`&&typeof e[1]==`string`&&Kt(e[1]));return o&&!t&&e.push([`baggage`,o]),e}{let e=`sentry-trace`in c?c[`sentry-trace`]:void 0,t=`traceparent`in c?c.traceparent:void 0,n=`baggage`in c?c.baggage:void 0,i=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>Kt(e)):Kt(n));o&&!l&&i.push(o);let u=Object.assign({},c,{"sentry-trace":e??a,...i.length>0&&{baggage:i.join(`,`)}});return r&&s&&!t&&(u.traceparent=s),u}}function Gt(e,t){if(t.response){Fe(e,t.response.status);let n=t.response?.headers?.get(`content-length`);if(n){let t=parseInt(n);t>0&&e.setAttribute(`http.response_content_length`,t)}}else t.error&&e.setStatus({code:2,message:`internal_error`});e.end()}function Kt(e){return typeof e==`string`&&e.split(`,`).some(e=>e.trim().startsWith(Me))}function qt(e){return typeof Headers<`u`&&h(e,Headers)}function Jt(e){return Array.isArray(e)?e.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`):!1}function Yt(e,t,n){if(e.startsWith(`data:`))return{name:`${t} ${pt(e)}`,attributes:Xt(e,void 0,t,n)};let r=Pe(e);return{name:`${t} ${r?tt(r):e}`,attributes:Xt(e,r,t,n)}}function Xt(e,t,n,r){let i={url:pt(e),type:`fetch`,"http.method":n,[I]:r,[it]:`http.client`};return t&&(lt(t)||(i[ce]=pt(t.href),i[u]=pt(t.href),i[`server.address`]=t.host),t.search&&(i[`http.query`]=t.search),t.hash&&(i[`http.fragment`]=t.hash)),i}var Zt=(e,t)=>
3e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`,Qt=(e,t,n,r)=>{let i,a;return o=>{t.value>=0&&(o||r)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=Zt(t.value,n),e(t)))}},$t=(e=!0)=>{let t=N.performance?.getEntriesByType?.(`navigation`)[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},en=()=>$t()?.activationStart??0,tn=-1,nn=new Set,rn=()=>N.document?.visibilityState===`hidden`&&!N.document?.prerendering?0:1/0,an=e=>{if(sn(e)&&tn>-1){if(e.type===`visibilitychange`||e.type===`pagehide`)for(let e of nn)e();isFinite(tn)||(tn=e.type===`visibilitychange`?e.timeStamp:0,Te(`prerenderingchange`,an,!0))}},on=()=>{if(N.document&&tn<0){let e=en();tn=(N.document.prerendering?void 0:globalThis.performance.getEntriesByType(`visibility-state`).filter(t=>t.name===`hidden`&&t.startTime>e)[0]?.startTime)??rn(),w(`visibilitychange`,an,!0),w(`pagehide`,an,!0),w(`prerenderingchange`,an,!0)}return{get firstHiddenTime(){return tn},onHidden(e){nn.add(e)}}};function sn(e){return e.type===`pagehide`||N.document?.visibilityState===`hidden`}var cn=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+0xe8d4a51000}`,ln=(e,t=-1)=>
3{let n=$t(),r=`navigate`;return n&&(N.document?.prerendering||en()>0?r=`prerender`:N.document?.wasDiscarded?r=`restore`:n.type&&(r=n.type.replace(/_/g,`-`))),{name:e,value:t,rating:`good`,delta:0,entries:[],id:cn(),navigationType:r}},un=new WeakMap;function dn(e,t){try{return un.get(e)||un.set(e,new t),un.get(e)}catch{return new t}}var fn=class{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;let t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}},pn=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},mn=e=>{N.document?.prerendering?addEventListener(`prerenderingchange`,()=>e(),!0):e()},hn=[1800,3e3],gn=(e,t={})=>{mn(()=>{let n=on(),r=ln(`FCP`),i,a=pn(`paint`,e=>{for(let t of e)t.name===`first-contentful-paint`&&(a.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-en(),0),r.entries.push(t),i(!0)))});a&&(i=Qt(e,r,hn,t.reportAllChanges))})},_n=[.1,.25],vn=(e,t={})=>{gn(at(()=>{let n=ln(`CLS`,0),r,i=on(),a=dn(t,fn),o=e=>{for(let t of e)a._processEntry(t);a._sessionValue>n.value&&(n.value=a._sessionValue,n.entries=a._sessionEntries,r())},s=pn(`layout-shift`,o);s&&(r=Qt(e,n,_n,t.reportAllChanges),i.onHidden(()=>{o(s.takeRecords()),r(!0)}),N?.setTimeout?.(r))}))},yn=0,bn=1/0,xn=0,Sn=e=>{e.forEach(e=>{e.interactionId&&(bn=Math.min(bn,e.interactionId),xn=Math.max(xn,e.interactionId),yn=xn?(xn-bn)/7+1:0)})},Cn,wn=()=>Cn?yn:performance.interactionCount||0,Tn=()=>{`interactionCount`in performance||Cn||(Cn=pn(`event`,Sn,{type:`event`,buffered:!0,durationThreshold:0}))},En=10,Dn=0,On=()=>wn()-Dn,kn=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){Dn=wn(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let e=Math.min(this._longestInteractionList.length-1,Math.floor(On()/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!(e.interactionId||e.entryType===`first-input`))return;let t=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<En||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>En){let e=this._longestInteractionList.splice(En);for(let t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}},An=[200,500],jn=40,Mn=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype))return;let n=on();mn(()=>{Tn();let r=ln(`INP`),i,a=dn(t,kn),o=e=>{E(()=>{for(let t of e)a._processEntry(t);let t=a._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,i())})},s=pn(`event`,o,{durationThreshold:t.durationThreshold??jn});i=Qt(e,r,An,t.reportAllChanges),s&&(s.observe({type:`first-input`,buffered:!0}),n.onHidden(()=>{o(s.takeRecords()),i(!0)}))})},Nn=class{_processEntry(e){this._onBeforeProcessingEntry?.(e)}},Pn=[2500,4e3],Fn=(e,t={})=>{mn(()=>{let n=on(),r=ln(`LCP`),i,a=dn(t,Nn),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(let t of e)a._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-en(),0),r.entries=[t],i())},s=pn(`largest-contentful-paint`,o);if(s){i=Qt(e,r,Pn,t.reportAllChanges);let n=at(()=>{o(s.takeRecords()),s.disconnect(),i(!0)}),a=e=>{e.isTrusted&&(E(n),Te(e.type,a,{capture:!0}))};for(let e of[`keydown`,`click`,`visibilitychange`])w(e,a,{capture:!0})}})},In=[800,1800],Ln=e=>{N.document?.prerendering?mn(()=>Ln(e)):N.document?.readyState===`complete`?setTimeout(e):addEventListener(`load`,()=>Ln(e),!0)},Rn=(e,t={})=>{let n=ln(`TTFB`),r=Qt(e,n,In,t.reportAllChanges);Ln(()=>{let e=$t();e&&(n.value=Math.max(e.responseStart-en(),0),n.entries=[e],r(!0))})},zn={},Bn={},Vn,Hn,Un,Wn;function Gn(e,t=!1){return tr(`cls`,e,Zn,Vn,t)}function Kn(e,t=!1){return tr(`lcp`,e,Qn,Hn,t)}function qn(e){return tr(`ttfb`,e,$n,Un)}function Jn(e){return tr(`inp`,e,er,Wn)}function Yn(e,t){return rr(e,t),Bn[e]||(nr(e),Bn[e]=!0),ir(e,t)}function Xn(e,t){let n=zn[e];if(n?.length)for(let r of n)try{r(t)}catch(t){De&&j.error(`Error while triggering instrumentation handler. 4Type: ${e} 5Name: ${Se(r)} 6Error:`,t)}}function Zn(){return vn(e=>{Xn(`cls`,{metric:e}),Vn=e},{reportAllChanges:!0})}function Qn(){return Fn(e=>{Xn(`lcp`,{metric:e}),Hn=e},{reportAllChanges:!0})}function $n(){return Rn(e=>{Xn(`ttfb`,{metric:e}),Un=e})}function er(){return Mn(e=>{Xn(`inp`,{metric:e}),Wn=e})}function tr(e,t,n,r,i=!1){rr(e,t);let a;return Bn[e]||(a=n(),Bn[e]=!0),r&&t({metric:r}),ir(e,t,i?a:void 0)}function nr(e){let t={};e===`event`&&(t.durationThreshold=0),pn(e,t=>{Xn(e,{entries:t})},t)}function rr(e,t){zn[e]=zn[e]||[],zn[e].push(t)}function ir(e,t,n){return()=>{n&&n();let r=zn[e];if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function ar(e){return`duration`in e}var or=e=>{let t=t=>{(t.type===`pagehide`||N.document?.visibilityState===`hidden`)&&e(t)};w(`visibilitychange`,t,{capture:!0,once:!0}),w(`pagehide`,t,{capture:!0,once:!0})};function sr(e){return typeof e==`number`&&isFinite(e)}function cr(e,t,n,{...i}){let a=P(e).start_timestamp;return a&&a>t&&typeof e.updateStartTime==`function`&&e.updateStartTime(t),Ke(e,()=>{let e=r({startTime:t,...i});return e&&e.end(n),e})}function lr(e){let t=L();if(!t)return;let{name:n,transaction:i,attributes:a,startTime:o}=e,{release:s,environment:c}=t.getOptions(),{userInfo:l}=t.getDataCollectionOptions(),u=t.getIntegrationByName(`Replay`)?.getReplayId(),d=F(),f=d.getUser(),p=f===void 0?void 0:f.email||f.id||f.ip_address,m;try{m=d.getScopeData().contexts.profile.profile_id}catch{}let h={release:s,environment:c,user:p||void 0,profile_id:m||void 0,replay_id:u||void 0,transaction:i,"user_agent.original":N.navigator?.userAgent,"client.address":l?`{{auto}}`:void 0,...a};return r({name:n,attributes:h,startTime:o,experimental:{standalone:!0}})}function ur(){return N.addEventListener&&N.performance}function R(e){return e/1e3}function dr(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}
6return r===e&&(t=r),{name:t,version:n}}function fr(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function pr(e,t){let n,r=!1;function i(e){!r&&n&&t(e,n.spanContext().spanId,n),r=!0}or(()=>{i(`pagehide`)});let a=e.on(`beforeStartNavigationSpan`,(e,t)=>{t?.isRedirect||(i(`navigation`),a(),o())}),o=e.on(`afterStartPageLoadSpan`,e=>{n=e,o()})}function mr(e){let t=0,n;if(!fr(`layout-shift`))return;let r=Gn(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);pr(e,(e,i)=>{hr(t,n,i,e),r()})}function hr(e,t,n,r){De&&j.log(`Sending CLS span (${e})`);let i=t?R((d()||0)+t.startTime):Ye(),a=F().getScopeData().transactionName,o=t?g(t.sources[0]?.node):`Layout shift`,s={[I]:`auto.http.browser.cls`,[it]:`ui.webvital.cls`,[Ze]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{s[`cls.source.${t+1}`]=g(e.node)});let c=lr({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`cls`,{[Le]:``,[Ve]:e}),c.end(i))}function gr(e){return e!=null&&e>0&&e<=6e4}function _r(e){let t=0,n;if(!fr(`largest-contentful-paint`))return;let r=Kn(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&gr(e.value)&&(t=e.value,n=r)},!0);pr(e,(e,i)=>{vr(t,n,i,e),r()})}function vr(e,t,n,r){if(!gr(e))return;De&&j.log(`Sending LCP span (${e})`);let i=R((d()||0)+(t?.startTime||0)),a=F().getScopeData().transactionName,o=t?g(t.element):`Largest contentful paint`,s={[I]:`auto.http.browser.lcp`,[it]:`ui.webvital.lcp`,[Ze]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(s[`lcp.element`]=g(t.element)),t.id&&(s[`lcp.id`]=t.id),t.url&&(s[`lcp.url`]=t.url),t.loadTime!=null&&(s[`lcp.loadTime`]=t.loadTime),t.renderTime!=null&&(s[`lcp.renderTime`]=t.renderTime),t.size!=null&&(s[`lcp.size`]=t.size));let c=lr({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`lcp`,{[Le]:`millisecond`,[Ve]:e}),c.end(i))}function z(e){return e&&((d()||performance.timeOrigin)+e)/1e3}function yr(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=dr(e.nextHopProtocol);t[`network.protocol.version`]=r,t[`network.protocol.name`]=n}return d()||ur()?.timeOrigin?br({...t,"http.request.redirect_start":z(e.redirectStart),"http.request.redirect_end":z(e.redirectEnd),"http.request.worker_start":z(e.workerStart),"http.request.fetch_start":z(e.fetchStart),"http.request.domain_lookup_start":z(e.domainLookupStart),"http.request.domain_lookup_end":z(e.domainLookupEnd),"http.request.connect_start":z(e.connectStart),"http.request.secure_connection_start":z(e.secureConnectionStart),"http.request.connection_end":z(e.connectEnd),"http.request.request_start":z(e.requestStart),"http.request.response_start":z(e.responseStart),"http.request.response_end":z(e.responseEnd),"http.request.time_to_first_byte":e.responseStart==null?void 0:e.responseStart/1e3}):t}function br(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null))}var xr=2147483647,Sr=0,B={},V,Cr;function wr({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=ur();if(r&&d()){r.mark&&N.performance.mark(`sentry-tracing-init`);let i=t?_r(n):t===!1?kr():void 0,a=e?mr(n):e===!1?Or():void 0,o=Ar(),s=jr();return()=>{o(),s(),i?.(),a?.()}}return()=>void 0}function Tr(){Yn(`longtask`,({entries:e})=>{let t=M();if(!t)return;let{op:n,start_timestamp:r}=P(t);for(let i of e){let e=R(d()+i.startTime),a=R(i.duration);n===`navigation`&&r&&e<r||cr(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-task`,attributes:{[I]:`auto.ui.browser.metrics`}})}})}function Er(){new PerformanceObserver(e=>{let t=M();if(t)for(let n of e.getEntries()){if(!n.scripts[0])continue;let e=R(d()+n.startTime),{start_timestamp:r,op:i}=P(t);if(i===`navigation`&&r&&e<r)continue;let a=R(n.duration),o={[I]:`auto.ui.browser.metrics`},{invoker:s,invokerType:c,sourceURL:l,sourceFunctionName:u,sourceCharPosition:f}=n.scripts[0];o[`browser.script.invoker`]=s,o[`browser.script.invoker_type`]=c,l&&(o[`code.filepath`]=l),u&&(o[`code.function`]=u),f!==-1&&(o[`browser.script.source_char_position`]=f),cr(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-animation-frame`,attributes:o})}}).observe({type:`long-animation-frame`,buffered:!0})}function Dr(){Yn(`event`,({entries:e})=>{let t=M();if(t){for(let n of e)if(n.name===`click`){let e=R(d()+n.startTime),r=R(n.duration),i={name:g(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[I]:`auto.ui.browser.metrics`}},a=Re(n.target);a&&(i.attributes[`ui.component_name`]=a),cr(t,e,e+r,i)}}})}function Or(){return Gn(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(B.cls={value:e.value,unit:``},Cr=t)},!0)}function kr(){return Kn(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&gr(e.value)&&(B.lcp={value:e.value,unit:`millisecond`},V=t)},!0)}function Ar(){return qn(({metric:e})=>{e.entries[e.entries.length-1]&&(B.ttfb={value:e.value,unit:`millisecond`})})}function jr(){return Yn(`paint`,({entries:e})=>
6{let t=on();for(let n of e){let e=n.startTime<t.firstHiddenTime;n.name===`first-paint`&&e&&(B.fp={value:n.startTime,unit:`millisecond`}),n.name===`first-contentful-paint`&&e&&(B.fcp={value:n.startTime,unit:`millisecond`})}})}function Mr(e,t){let n=ur(),r=d();if(!n?.getEntries||!r)return;let{spanStreamingEnabled:i,ignorePerformanceApiSpans:a,ignoreResourceSpans:o}=t,s=R(r),c=n.getEntries(),{op:l,start_timestamp:u}=P(e);c.slice(Sr).forEach(t=>{let n=R(t.startTime),r=R(Math.max(0,t.duration));if(!(l===`navigation`&&u&&s+n<u))switch(t.entryType){case`navigation`:Rr(e,t,s);break;case`mark`:case`paint`:case`measure`:Ir(e,t,n,r,s,a);break;case`resource`:Hr(e,t,t.name,n,r,s,o)}}),Sr=Math.max(c.length-1,0),Ur(e,i)}function Nr(e,t){let n=d();if(!ur()?.getEntries||!n){Pr();return}let{spanStreamingEnabled:r,recordClsOnPageloadSpan:i,recordLcpOnPageloadSpan:a}=t,o=R(n);if(P(e).op===`pageload`){if(Kr(B),r){let t=(t,n,r)=>{let i=r??`browser.web_vital.${t}.value`;e.setAttribute(i,n),De&&j.log(`Setting web vital attribute`,{[i]:n},`on pageload span`)};[`ttfb`,`fp`,`fcp`].forEach(e=>{B[e]&&t(e,B[e].value)}),B[`ttfb.requestTime`]&&t(`ttfb.requestTime`,B[`ttfb.requestTime`].value,`browser.web_vital.ttfb.request_time`)}else i||delete B.cls,a||delete B.lcp,Object.entries(B).forEach(([t,n])=>{ue(t,n.value,n.unit,e)}),Wr(e,t);e.setAttribute(r?`browser.performance.time_origin`:`performance.timeOrigin`,o),e.setAttribute(r?`browser.performance.navigation.activation_start`:`performance.activationStart`,en())}Pr()}function Pr(){V=void 0,Cr=void 0,B={}}function Fr(e){if(e?.entryType===`measure`)try{return e.detail.devtools.track===`Components â`}catch{return}}function Ir(e,t,n,r,i,a){if(Fr(t)||[`mark`,`measure`].includes(t.entryType)&&qe(t.name,a))return;let o=$t(!1),s=R(o?o.requestStart:0),c=i+Math.max(n,s),l=i+n,u=l+r,d={[I]:`auto.resource.browser.metrics`};c!==l&&(d[`sentry.browser.measure_happened_before_request`]=!0,d[`sentry.browser.measure_start_time`]=c),Lr(d,t),c<=u&&cr(e,c,u,{name:t.name,op:t.entryType,attributes:d})}function Lr(e,t){try{let n=t.detail;if(!n)return;if(typeof n==`object`){for(let[t,r]of Object.entries(n))if(r&&ie(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(r!==void 0)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(ie(n)){e[`sentry.browser.measure.detail`]=n;return}try{e[`sentry.browser.measure.detail`]=JSON.stringify(n)}catch{}}catch{}}function Rr(e,t,n){[`unloadEvent`,`redirect`,`domContentLoadedEvent`,`loadEvent`,`connect`].forEach(r=>{zr(e,t,r,n)}),zr(e,t,`secureConnection`,n,`TLS/SSL`),zr(e,t,`fetch`,n,`cache`),zr(e,t,`domainLookup`,n,`DNS`),Vr(e,t,n)}function zr(e,t,n,r,i=n){let a=t[Br(n)],o=t[`${n}Start`];o&&a&&cr(e,r+R(o),r+R(a),{op:`browser.${i}`,name:t.name,attributes:{[I]:`auto.ui.browser.metrics`,...n===`redirect`&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function Br(e){return e===`secureConnection`?`connectEnd`:e===`fetch`?`domainLookupStart`:`${e}End`}function Vr(e,t,n){let r=n+R(t.requestStart),i=n+R(t.responseEnd),a=n+R(t.responseStart);t.responseEnd&&(cr(e,r,i,{op:`browser.request`,name:t.name,attributes:{[I]:`auto.ui.browser.metrics`}}),cr(e,a,i,{op:`browser.response`,name:t.name,attributes:{[I]:`auto.ui.browser.metrics`}}))}function Hr(e,t,n,r,i,a,o){if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let s=t.initiatorType?`resource.${t.initiatorType}`:`resource.other`;if(o?.includes(s))return;let c={[I]:`auto.resource.browser.metrics`},l=Xe(n);l.protocol&&(c[`url.scheme`]=l.protocol.split(`:`).pop()),l.host&&(c[`server.address`]=l.host),c[`url.same_origin`]=n.includes(N.location.origin),c[u]=n,Gr(t,c,[[`responseStatus`,`http.response.status_code`],[`transferSize`,`http.response_transfer_size`],[`encodedBodySize`,`http.response_content_length`],[`decodedBodySize`,`http.decoded_response_content_length`],[`renderBlockingStatus`,`resource.render_blocking_status`],[`deliveryType`,`http.response_delivery_type`]]);let d={...c,...yr(t)},f=a+r;cr(e,f,f+i,{name:n.replace(N.location.origin,``),op:s,attributes:d})}function Ur(e,t){let n=N.navigator;if(!n)return;let r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?`network.connection.effective_type`:`effectiveConnectionType`,r.effectiveType),r.type&&e.setAttribute(t?`network.connection.type`:`connectionType`,r.type),sr(r.rtt)&&(t?e.setAttribute(`network.connection.rtt`,r.rtt):P(e).op===`pageload`&&ue(`connection.rtt`,r.rtt,`millisecond`))),sr(n.deviceMemory)&&(t?e.setAttribute(`device.memory.estimated_capacity`,n.deviceMemory):e.setAttribute(`deviceMemory`,`${n.deviceMemory} GB`)),sr(n.hardwareConcurrency)&&(t?e.setAttribute(`device.processor_count`,n.hardwareConcurrency):e.setAttribute(`hardwareConcurrency`,String(n.hardwareConcurrency)))}function Wr(e,t){V&&t.recordLcpOnPageloadSpan&&(V.element&&e.setAttribute(`lcp.element`,g(V.element)),V.id&&e.setAttribute(`lcp.id`,V.id),V.url&&e.setAttribute(`lcp.url`,V.url.trim().slice(0,200)),V.loadTime!=null&&e.setAttribute(`lcp.loadTime`,V.loadTime),V.renderTime!=null&&e.setAttribute(`lcp.renderTime`,V.renderTime),e.setAttribute(`lcp.size`,V.size)),Cr?.sources&&t.recordClsOnPageloadSpan&&Cr.sources.forEac
6h((t,n)=>e.setAttribute(`cls.source.${n+1}`,g(t.node)))}function Gr(e,t,n){n.forEach(([n,r])=>{let i=e[n];i!=null&&(typeof i==`number`&&i<xr||typeof i==`string`)&&(t[r]=i)})}function Kr(e){let t=$t(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}var qr=[],Jr=new Map,Yr=new Map;function Xr(){if(ur()&&d()){let e=Qr();return()=>{e()}}return()=>void 0}var Zr={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 Qr(){return Jn($r)}var $r=({metric:e})=>{if(e.value==null)return;let t=R(e.value);if(t>60)return;let n=e.entries.find(t=>t.duration===e.value&&Zr[t.name]);if(!n)return;let{interactionId:r}=n,i=Zr[n.name],a=R(d()+n.startTime),o=M(),s=o?_(o):void 0,c=r==null?void 0:Jr.get(r),l=c?.span||s,u=l?P(l).description:F().getScopeData().transactionName,f=lr({name:c?.elementName||g(n.target),transaction:u,attributes:{[I]:`auto.http.browser.inp`,[it]:`ui.interaction.${i}`,[Ze]:n.duration},startTime:a});f&&(f.addEvent(`inp`,{[Le]:`millisecond`,[Ve]:e.value}),f.end(a+t))};function ei(e){return e==null?void 0:Jr.get(e)}function ti(){let e=Object.keys(Zr);Qe()&&e.forEach(e=>{N.addEventListener(e,t,{capture:!0,passive:!0})});function t(e){let t=e.target;if(!t)return;let n=g(t),r=Math.round(e.timeStamp);if(Yr.set(r,n),Yr.size>50){let e=Yr.keys().next().value;e!==void 0&&Yr.delete(e)}}function n(e){let t=Math.round(e.startTime),n=Yr.get(t);if(!n)for(let e=-5;e<=5;e++){let r=Yr.get(t+e);if(r){n=r;break}}return n||`<unknown>`}let r=({entries:e})=>{let t=M(),r=t&&_(t);e.forEach(e=>{if(!ar(e))return;let t=e.interactionId;if(t==null||Jr.has(t))return;let i=e.target?g(e.target):n(e);if(qr.length>10){let e=qr.shift();Jr.delete(e)}qr.push(t),Jr.set(t,{span:r,elementName:i})})};Yn(`event`,r),Yn(`first-input`,r)}function ni(e){let{name:t,op:n,origin:i,metricName:a,value:o,attributes:s,parentSpan:c,reportEvent:l,startTime:u,endTime:d}=e,p=F().getScopeData().transactionName,m={[I]:i,[it]:n,[Ze]:0,[`browser.web_vital.${a}.value`]:o,[f]:p,[_t]:p,"user_agent.original":N.navigator?.userAgent,...s};c&&Oe(c).attributes?.[`sentry.op`]===`pageload`&&(m[`sentry.pageload.span_id`]=c.spanContext().spanId),l&&(m[`browser.web_vital.${a}.report_event`]=l);let h=r({name:t,attributes:m,startTime:u,parentSpan:c});h&&h.end(d??u)}function ri(e){let t=0,n;if(!fr(`largest-contentful-paint`))return;let r=Kn(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&gr(e.value)&&(t=e.value,n=r)},!0);pr(e,(e,i,a)=>{ii(t,n,a,e),r()})}function ii(e,t,n,r){if(!gr(e))return;De&&j.log(`Sending LCP span (${e})`);let i=d()||0,a=R(i),o=R(i+(t?.startTime||0)),s=t?g(t.element):`Largest contentful paint`,c={};t?.element&&(c[`browser.web_vital.lcp.element`]=g(t.element)),t?.id&&(c[`browser.web_vital.lcp.id`]=t.id),t?.url&&(c[`browser.web_vital.lcp.url`]=t.url),t?.loadTime!=null&&(c[`browser.web_vital.lcp.load_time`]=t.loadTime),t?.renderTime!=null&&(c[`browser.web_vital.lcp.render_time`]=t.renderTime),t?.size!=null&&(c[`browser.web_vital.lcp.size`]=t.size),ni({name:s,op:`ui.webvital.lcp`,origin:`auto.http.browser.lcp`,metricName:`lcp`,value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:a,endTime:o})}function ai(e){let t=0,n;if(!fr(`layout-shift`))return;let r=Gn(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);pr(e,(e,i,a)=>{oi(t,n,a,e),r()})}function oi(e,t,n,r){De&&j.log(`Sending CLS span (${e})`);let i=t?R((d()||0)+t.startTime):Ye(),a=t?g(t.sources[0]?.node):`Layout shift`,o={};t?.sources&&t.sources.forEach((e,t)=>{o[`browser.web_vital.cls.source.${t+1}`]=g(e.node)}),ni({name:a,op:`ui.webvital.cls`,origin:`auto.http.browser.cls`,metricName:`cls`,value:e,attributes:o,parentSpan:n,reportEvent:r,startTime:i})}function si(){ur()&&d()&&Jn(({metric:e})=>
6{if(e.value==null||R(e.value)>60)return;let t=e.entries.find(t=>t.duration===e.value&&Zr[t.name]);t&&ci(e.value,t)})}function ci(e,t){De&&j.log(`Sending INP span (${e})`);let n=R(d()+t.startTime),r=R(e),i=Zr[t.name],a=ei(t.interactionId),o=M(),s=o?_(o):void 0,c=a?.span||s,l=c?Oe(c).name:F().getScopeData().transactionName;ni({name:a?.elementName||g(t.target),op:`ui.interaction.${i}`,origin:`auto.http.browser.inp`,metricName:`inp`,value:e,attributes:{[Ze]:t.duration,[f]:l,[_t]:l},startTime:n,endTime:n+r,parentSpan:c})}var li=Symbol.for(`sentry__originalRequestBody`);function ui(e){return new URLSearchParams(e).toString()}function di(e,t=j){try{if(typeof e==`string`)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[ui(e)];if(!e)return[void 0]}catch(n){return De&&t.error(n,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return De&&t.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function fi(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){let t=e[0][li];return t===void 0?void 0:t}}function pi(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return De&&j.error(t,`Failed to get xhr response headers`,e),{}}return t?t.split(`\r 7`).reduce((e,t)=>{let[n,r]=t.split(`: `);return r&&(e[n.toLowerCase()]=r),e},{}):{}}var H=v,mi=`sentryReplaySession`,hi=`replay_event`,gi=`Unable to send Replay`,_i=3e5,vi=9e5,yi=5e3,bi=5500,xi=6e4,Si=5e3,Ci=3,wi=15e4,Ti=5e3,Ei=3e3,Di=300,Oi=2e7,ki=4999,Ai=5e4,ji=36e5,Mi=Object.defineProperty,Ni=(e,t,n)=>t in e?Mi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pi=(e,t,n)=>Ni(e,typeof t==`symbol`?t:t+``,n),U=(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))(U||{});function Fi(e){return e.nodeType===e.ELEMENT_NODE}function Ii(e){return e?.host?.shadowRoot===e}function Li(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function Ri(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 zi(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function Bi(e){try{let t=e.rules||e.cssRules;return t?Ri(Array.from(t,Hi).join(``)):null}catch{return null}}function Vi(e){let t=``;for(let n=0;n<e.style.length;n++){let r=e.style,i=r[n],a=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${a?` !important`:``};`}return`${e.selectorText} { ${t} }`}function Hi(e){let t;if(Wi(e))try{t=Bi(e.styleSheet)||zi(e)}catch{}else if(Gi(e)){let t=e.cssText,n=e.selectorText.includes(`:`),r=typeof e.style.all==`string`&&e.style.all;if(r&&(t=Vi(e)),n&&(t=Ui(t)),n||r)return t}return t||e.cssText}function Ui(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function Wi(e){return`styleSheet`in e}function Gi(e){return`selectorText`in e}var Ki=class{constructor(){Pi(this,`idNodeMap`,new Map),Pi(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function qi(){return new Ki}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 Yi({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||``;return e?(r&&(i=r(i,t)),`*`.repeat(i.length)):i}function Xi(e){return e.toLowerCase()}function Zi(e){return e.toUpperCase()}var Qi=`__rrweb_original__`;function $i(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=Qi in i?i[Qi]:i;
7if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function ea(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?Xi(t):null}function ta(e,t,n){return t===`INPUT`&&(n===`radio`||n===`checkbox`)?e.getAttribute(`value`)||``:e.value}function na(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}var ra={};function ia(e){let t=ra[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return ra[e]=r.bind(window)}function aa(...e){return ia(`setTimeout`)(...e)}function oa(...e){return ia(`clearTimeout`)(...e)}function sa(e){try{return e.contentDocument}catch{}}function ca(e){try{return e.contentWindow}catch{}}var la=1,ua=RegExp(`[^a-z0-9-_:]`),da=-2;function fa(){return la++}function pa(e){if(e instanceof HTMLFormElement)return`form`;let t=Xi(e.tagName);return ua.test(t)?`div`:t}function ma(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var ha,ga,_a=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,va=/^(?:[a-z+]+:)?\/\//i,ya=/^www\..*/i,ba=/^(data:)([^,]*),(.*)/i;function xa(e,t){if(!e||t.size===0)return e;try{let n=e.split(`;`),r=[];for(let e of n){if(e=e.trim(),!e)continue;let n=e.indexOf(`:`);if(n===-1){r.push(e);continue}let i=e.slice(0,n).trim();t.has(i)||r.push(e)}return r.join(`; `)+(r.length>0&&e.endsWith(`;`)?`;`:``)}catch(t){return console.warn(`Error filtering CSS properties:`,t),e}}function Sa(e,t){return(e||``).replace(_a,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(va.test(s)||ya.test(s)||ba.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${ma(t)+s}${c})`;let l=t.split(`/`),u=s.split(`/`);l.pop();for(let e of u)if(e===`.`)continue;else e===`..`?l.pop():l.push(e);return`url(${c}${l.join(`/`)}${c})`})}var Ca=/^[^ \t\n\r\u000c]+/,wa=/^[, \t\n\r\u000c]+/;function Ta(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(wa),!(n>=t.length);){let a=r(Ca);if(a.slice(-1)===`,`)a=Da(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=Da(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}if(o)e===`)`&&(o=!1);else{if(e===`,`){n+=1,i.push((a+r).trim());break}e===`(`&&(o=!0)}r+=e,n+=1}}}return i.join(`, `)}var Ea=new WeakMap;function Da(e,t){return!t||t.trim()===``?t:ka(e,t)}function Oa(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function ka(e,t){let n=Ea.get(e);if(n||(n=e.createElement(`a`),Ea.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function Aa(e,t,n,r,i,a,o){if(!r)return r;if(n===`src`||n===`href`&&(t!==`use`||r[0]!==`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&(t===`table`||t===`td`||t===`th`))return Da(e,r);if(n===`srcset`)return Ta(e,r);if(n===`style`){let t=Sa(r,ka(e));return o&&o.size>0&&(t=xa(t,o)),t}return t===`object`&&n===`data`?Da(e,r):typeof a==`function`?a(n,r,i):r}function ja(e,t,n){return(e===`video`||e===`audio`)&&t===`autoplay`}function Ma(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 n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function Na(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function Pa(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Pa(e.parentNode,t,n,r+1)}function Fa(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(Na(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Ia(e,t,n,r,i,a){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName===`INPUT`){let e=o.getAttribute(`autocomplete`);if([`current-password`,`new-password`,`cc-number`,`cc-exp`,`cc-exp-month`,`cc-exp-year`,`cc-csc`].includes(e))return!0}let s=-1,c=-1;
7if(a){if(c=Pa(o,Fa(r,i)),c<0)return!0;s=Pa(o,Fa(t,n),c>=0?c:1/0)}else{if(s=Pa(o,Fa(t,n)),s<0)return!1;c=Pa(o,Fa(r,i),s>=0?s:1/0)}return s>=0?c>=0?s<=c:!0:c>=0?!1:!!a}catch{}return!!a}function La(e,t,n){let r=ca(e);if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=aa(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{oa(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return aa(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function Ra(e,t,n){let r=!1,i;try{i=e.sheet}catch{i=null}if(i)return;let a=aa(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{oa(a),r=!0,t()})}function za(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:h,maskInputFn:g,dataURLOptions:_={},inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x=!1,ignoreCSSAttributes:S}=t,C=Ba(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:U.Document,childNodes:[]}:{type:U.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:U.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return Ha(e,{doc:n,blockClass:i,blockSelector:a,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:_,inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x,rootId:C,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:S});case e.TEXT_NODE:return Va(e,{doc:n,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:h,maskInputOptions:m,maskInputFn:g,rootId:C});case e.CDATA_SECTION_NODE:return{type:U.CDATA,textContent:``,rootId:C};case e.COMMENT_NODE:return{type:U.Comment,textContent:e.textContent||``,rootId:C};default:return!1}}function Ba(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function Va(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:a,unmaskTextSelector:o,maskTextFn:s,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,f=e.textContent,p=d===`STYLE`||void 0,m=d===`SCRIPT`||void 0,h=d===`TEXTAREA`||void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=Bi(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}f=Sa(f,ka(t.doc))}m&&(f=`SCRIPT_PLACEHOLDER`);let g=Ia(e,r,a,i,o,n);return!p&&!m&&!h&&f&&g&&(f=s?s(f,e.parentElement):f.replace(/[\S]/g,`*`)),h&&f&&(c.textarea||g)&&(f=l?l(f,e.parentNode):f.replace(/[\S]/g,`*`)),d===`OPTION`&&f&&(f=Yi({isMasked:Ia(e,r,a,i,o,Ji({type:null,tagName:d,maskInputOptions:c})),element:e,value:f,maskInputFn:l})),{type:U.Text,textContent:f||``,isStyle:p,rootId:u}}function Ha(e,t){let{doc:n,blockClass:r,blockSelector:i,unblockSelector:a,inlineStylesheet:o,maskInputOptions:s={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:h,maskTextClass:g,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:y,ignoreCSSAttributes:b}=t,x=Ma(e,r,i,a),S=pa(e),C={},w=e.attributes.length;for(let t=0;t<w;t++){let r=e.attributes[t];r.name&&!ja(S,r.name,r.value)&&(C[r.name]=Aa(n,S,Xi(r.name),r.value,e,c,b))}if(S===`link`&&o){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=Bi(t)),r&&(C.rel=null,C.href=null,C.crossorigin=null,C._cssText=Sa(r,t.href))}if(S===`style`&&e.sheet&&!(e.innerText||e.textContent||``).trim().length){let t=Bi(e.sheet);t&&(C._cssText=Sa(t,ka(n)))}if(S===`input`||S===`textarea`||S===`select`||S===`option`){let t=e,n=ea(t),r=ta(t,Zi(S),n),i=t.checked;if(n!==`submit`&&n!==`button`&&r){let e=Ia(t,g,v,_,y,Ji({type:n,tagName:Zi(S),maskInputOptions:s}));C.value=Yi({isMasked:e,element:t,value:r,maskInputFn:l})}i&&(C.checked=i)}if(S===`option`&&(e.selected&&!s.select?C.selected=!0:delete C.selected),S===`canvas`&&f){if(e.__context===`2d`)$i(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!(`__context`in e)){let t=e.toDataURL(u.type,u.quality),r=n.createElement(`canvas`);r.width=e.width,r.height=e.height,t!==r.toDataURL(u.type,u.quality)&&(C.rr_dataURL=t)}}if(S===`img`&&d){ha||(ha=n.createElement(`canvas`),ga=ha.getContext(`2d`));let t=e,r=t.currentSrc||t.getAttribute(`src`)||`<unknown-src>`,i=t.crossOrigin,a=()=>{t.removeEventListener(`load`,a);
7try{ha.width=t.naturalWidth,ha.height=t.naturalHeight,ga.drawImage(t,0,0),C.rr_dataURL=ha.toDataURL(u.type,u.quality)}catch(e){if(t.crossOrigin!==`anonymous`){t.crossOrigin=`anonymous`,t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a);return}console.warn(`Cannot inline img src=${r}! Error: ${e}`)}t.crossOrigin===`anonymous`&&(i?C.crossOrigin=i:t.removeAttribute(`crossorigin`))};t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a)}if((S===`audio`||S===`video`)&&(C.rr_mediaState=e.paused?`paused`:`played`,C.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),x){let{width:t,height:n}=e.getBoundingClientRect();C={class:C.class,rr_width:`${t}px`,rr_height:`${n}px`}}S===`iframe`&&!p(C.src)&&(!x&&!sa(e)&&(C.rr_src=C.src),delete C.src);let ee;try{customElements.get(S)&&(ee=!0)}catch{}return{type:U.Element,tagName:S,attributes:C,childNodes:[],isSVG:Oa(e)||void 0,needBlock:x,rootId:h,isCustom:ee}}function W(e){return e==null?``:e.toLowerCase()}function Ua(e,t){return!!(t.comment&&e.type===U.Comment||e.type===U.Element&&(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`&&na(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(W(e.attributes.name).match(/^msapplication-tile(image|color)$/)||W(e.attributes.name)===`application-name`||W(e.attributes.rel)===`icon`||W(e.attributes.rel)===`apple-touch-icon`||W(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&W(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(W(e.attributes.property).match(/^(og|twitter|fb):/)||W(e.attributes.name).match(/^(og|twitter):/)||W(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(W(e.attributes.name)===`robots`||W(e.attributes.name)===`googlebot`||W(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(W(e.attributes.name)===`author`||W(e.attributes.name)===`generator`||W(e.attributes.name)===`framework`||W(e.attributes.name)===`publisher`||W(e.attributes.name)===`progid`||W(e.attributes.property).match(/^article:/)||W(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(W(e.attributes.name)===`google-site-verification`||W(e.attributes.name)===`yandex-verification`||W(e.attributes.name)===`csrf-token`||W(e.attributes.name)===`p:domain_verify`||W(e.attributes.name)===`verify-v1`||W(e.attributes.name)===`verification`||W(e.attributes.name)===`shopify-checkout-api-token`))))}function Wa(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y={},inlineImages:b=!1,recordCanvas:x=!1,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w=5e3,onBlockedImageLoad:ee,onStylesheetLoad:T,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:D=()=>!1,newlyAddedElement:te=!1,ignoreCSSAttributes:ne}=t,{preserveWhiteSpace:re=!0}=t,ie=za(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,dataURLOptions:y,inlineImages:b,recordCanvas:x,keepIframeSrcFn:D,newlyAddedElement:te,ignoreCSSAttributes:ne});if(!ie)return console.warn(e,`not serialized`),null;let ae;ae=r.hasNode(e)?r.getId(e):Ua(ie,v)||!re&&ie.type===U.Text&&!ie.isStyle&&!ie.textContent.trim().length?da:fa();let O=Object.assign(ie,{id:ae});if(r.add(e,O),ae===da)return null;S&&S(e);let oe=!f;if(O.type===U.Element){oe&&=!O.needBlock;let t=e.shadowRoot;t&&Li(t)&&(O.isShadowHost=!0)}if((O.type===U.Document||O.type===U.Element)&&oe){v.headWhitespace&&O.type===U.Element&&O.tagName===`head`&&(re=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:re,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onBlockedImageLoad:ee,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:D,ignoreCSSAttributes:ne},te=e.childNodes?Array.from(e.childNodes):[];for(let e of te){let n=Wa(e,t);n&&O.childNodes.push(n)}if(Fi(e)&&e.shadowRoot)for(let n of Array.from(e.shadowRoot.childNodes)){let r=Wa(n,t);r&&(Li(e.shadowRoot)&&(r.isShadow=!0),O.childNodes.push(r))}}if(e.parentNode&&Ii(e.parentNode)&&Li(e.parentNode)&&(O.isShadow=!0),O.type===U.Element&&O.tagName===`iframe`&&!O.needBlock&&La(e,()=>{let t=sa(e);if(t&&C){let n=Wa(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:re,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:D,ignoreCSSAttributes:ne});n&&C(e,n)}},w),O.type===U.Element&&O.tagName===`img`&&!e.complete&&O.needBlock){let t=e,n=()=>
7{if(t.isConnected&&!t.complete&&ee)try{let e=t.getBoundingClientRect();e.width>0&&e.height>0&&ee(t,O,e)}catch{}t.removeEventListener(`load`,n)};t.isConnected&&t.addEventListener(`load`,n)}return O.type===U.Element&&O.tagName===`link`&&typeof O.attributes.rel==`string`&&(O.attributes.rel===`stylesheet`||O.attributes.rel===`preload`&&typeof O.attributes.href==`string`&&na(O.attributes.href)===`css`)&&Ra(e,()=>{if(T){let t=Wa(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:re,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:D,ignoreCSSAttributes:ne});t&&T(e,t)}},E),O.type===U.Element&&delete O.needBlock,O}function Ga(e,t){let{mirror:n=new Ki,blockClass:r=`rr-block`,blockSelector:i=null,unblockSelector:a=null,maskAllText:o=!1,maskTextClass:s=`rr-mask`,unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOM:v=!1,dataURLOptions:y,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:ee,stylesheetLoadTimeout:T,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:D=new Set([])}=t||{};return Wa(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,maskAllText:o,maskTextClass:s,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions: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,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v===!0||v===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v===`all`,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:y,inlineImages:f,recordCanvas:p,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:ee,stylesheetLoadTimeout:T,keepIframeSrcFn:E,newlyAddedElement:!1,ignoreCSSAttributes:D})}function G(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var Ka=`Please stop import mirror directly. Instead of that,\r 8now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 9or you can use record.mirror to access the mirror instance during recording.`,qa={map:{},getId(){return console.error(Ka),-1},getNode(){return console.error(Ka),null},removeNodeFromMap(){console.error(Ka)},has(){return console.error(Ka),!1},reset(){console.error(Ka)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(qa=new Proxy(qa,{get(e,t,n){return t===`map`&&console.error(Ka),Reflect.get(e,t,n)}}));function Ja(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(bo(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=yo(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function Ya(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){yo(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>Ya(e,t,a||{},!0)}function Xa(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var Za=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Za=()=>new Date().getTime());function Qa(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset===void 0?t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0:e.pageXOffset,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset===void 0?t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0:e.pageYOffset}}function $a(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function eo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function to(e){if(!e)return null;
9try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function K(e,t,n,r,i){if(!e)return!1;let a=to(e);if(!a)return!1;let o=Fa(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=Pa(a,o),c=-1;return s<0?!1:(r&&(c=Pa(a,Fa(null,r))),s>-1&&c<0||s<c)}function no(e,t){return t.getId(e)!==-1}function ro(e,t){return t.getId(e)===da}function io(e,t){if(Ii(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:!e.parentNode||io(e.parentNode,t):!0}function ao(e){return!!e.changedTouches}function oo(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=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError(`1 argument is required`);do if(this===t)return!0;while(t&&=t.parentNode);return!1})}function so(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function co(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function lo(e){return!!e?.shadowRoot}var uo=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function fo(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function po(e){let t=e,n;for(;n=fo(t);)t=n;return t}function mo(e){let t=e.ownerDocument;if(!t)return!1;let n=po(e);return t.contains(n)}function ho(e){let t=e.ownerDocument;return t?t.contains(e)||mo(e):!1}var go={};function _o(e){let t=go[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return go[e]=r.bind(window)}function vo(...e){return _o(`requestAnimationFrame`)(...e)}function yo(...e){return _o(`setTimeout`)(...e)}function bo(...e){return _o(`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||{}),J=(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))(J||{}),Y=(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))(Y||{}),xo=(e=>(e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e))(xo||{}),So=(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))(So||{}),Co;function wo(e){Co=e}function To(){Co=void 0}for(var X=e=>Co?((...t)=>{try{return e(...t)}catch(e){if(Co&&Co(e)===!0)return()=>{};throw e}}):e,Eo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Do=typeof Uint8Array>`u`?[]:new Uint8Array(256),Oo=0;Oo<Eo.length;
9Oo++)Do[Eo.charCodeAt(Oo)]=Oo;var ko=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function Ao(e){try{return e.contentDocument}catch{}}function jo(e){try{return e.contentWindow}catch{}}var Mo=class{constructor(e){this.doc=e,this.unattachedDoc=null}parse(e){return this.parseWithConstructableStylesheet(e)||this.parseWithDetachedElement(e)}parseWithConstructableStylesheet(e){if(typeof CSSStyleSheet>`u`||typeof CSSStyleSheet.prototype.replaceSync!=`function`)return null;try{let t=new CSSStyleSheet;t.replaceSync(`x { ${e} }`);let n=t.cssRules[0];return!n||n.type!==CSSRule.STYLE_RULE?null:n.style}catch{return null}}parseWithDetachedElement(e){let t=this.getUnattachedDoc().createElement(`span`);return t.setAttribute(`style`,e),t.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}};function No(e){return`__ln`in e}var Po=class{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error(`Position outside of list range`);let t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&No(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&No(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},Fo=(e,t)=>`${e}@${t}`,Io=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new Po,r=e=>{let t=e,n=da;for(;n===da;)t&&=t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!ho(i))return;let a=Ii(i.parentNode)?this.mirror.getId(fo(i)):this.mirror.getId(i.parentNode),o=r(i);if(a===-1||o===-1)return n.addNode(i);let s=Wa(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!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:e=>{so(e,this.mirror)&&!K(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),co(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),lo(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{if(K(e,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(e,t);let n=jo(e);n&&this.canvasManager.addWindow(n),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});s&&(e.push({parentId:a,nextId:o,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!Ro(this.removes,e,this.mirror)||this.movedSet.has(e.parentNode))&&i(e);for(let e of this.addedSet)!Bo(this.droppedSet,e)&&!Ro(this.removes,e,this.mirror)||Bo(this.movedSet,e)?i(e):this.droppedSet.add(e);let a=null;for(;n.length;){let e=null;if(a){let t=this.mirror.getId(a.value.parentNode),n=r(a.value);t!==-1&&n!==-1&&(e=a)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(n.value.parentNode);
9if(r(n.value)===-1)continue;if(t!==-1){e=n;break}{let t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(this.mirror.getId(r)!==-1){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}a=e.previous,n.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if(typeof t.style==`string`){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split(`var(`).length===t.style.split(`var(`).length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.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(o))},this.processMutation=e=>{if(!ro(e.target,this.mirror))switch(e.type){case`characterData`:{let t=e.target.textContent;!K(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Ia(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,to(e.target)):t.replace(/[\S]/g,`*`):t,node:e.target});break}case`attributes`:{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if(n===`value`){let n=ea(t),i=t.tagName;r=ta(t,i,n);let a=Ji({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=Yi({isMasked:Ia(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a),element:t,value:r,maskInputFn:this.maskInputFn})}if(K(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName===`IFRAME`&&n===`src`&&!this.keepIframeSrcFn(r)){if(!Ao(t))n=`rr_src`;else return}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}
9,this.attributes.push(i),this.attributeMap.set(e.target,i)),n===`type`&&t.tagName===`INPUT`&&(e.oldValue||``).toLowerCase()===`password`&&t.setAttribute(`data-rr-is-password`,`true`),!ja(t.tagName,n)&&(i.attributes[n]=Aa(this.doc,Xi(t.tagName),Xi(n),r,t,this.maskAttributeFn),n===`style`)){let n=e.oldValue?this.styleDeclarationParser.parse(e.oldValue):null;for(let e of Array.from(t.style)){let r=t.style.getPropertyValue(e),a=t.style.getPropertyPriority(e);r!==(n?.getPropertyValue(e)||``)||a!==(n?.getPropertyPriority(e)||``)?a===``?i.styleDiff[e]=r:i.styleDiff[e]=[r,a]:i._unchangedStyles[e]=[r,a]}if(n)for(let e of Array.from(n))t.style.getPropertyValue(e)===``&&(i.styleDiff[e]=!1)}break}case`childList`:if(K(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=Ii(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);K(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||ro(t,this.mirror)||!no(t,this.mirror)||(this.addedSet.has(t)?(Lo(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||io(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Fo(n,r)]?Lo(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:Ii(e.target)&&Li(e.target)?!0:void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(ro(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[Fo(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);K(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),lo(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){`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`.split(`.`).forEach(t=>{this[t]=e[t]}),this.styleDeclarationParser=new Mo(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()}};function Lo(e,t){e.delete(t),t.childNodes?.forEach(t=>Lo(e,t))}function Ro(e,t,n){return e.length!==0&&zo(e,t,n)}function zo(e,t,n){let r=t.parentNode;for(;r;){let t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}function Bo(e,t){return e.size!==0&&Vo(e,t)}function Vo(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:Vo(e,n):!1}var Ho=[];function Uo(e){try{if(`composedPath`in e){let t=e.composedPath();if(t.length)return t[0]}else if(`path`in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Wo(e,t){let n=new Io;Ho.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,i=window?.Zone?.__symbol__?.(`MutationObserver`);i&&window[i]&&(r=window[i]);let a=new r(X(t=>{e.onMutation&&e.onMutation(t)===!1||n.processMutations.bind(n)(t)}));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function Go({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove==`number`?t.mousemove:50,a=typeof t.mousemoveCallback==`number`?t.mousemoveCallback:500,o=[],s,c=Ja(X(t=>{let n=Date.now()-s;e(o.map(e=>(e.timeOffset-=n,e)),t),o=[],s=null}),a),l=X(Ja(X(e=>{let t=Uo(e),{clientX:n,clientY:i}=ao(e)?e.changedTouches[0]:e;s||=Za(),o.push({x:n,y:i,id:r.getId(t),timeOffset:Za()-s}),c(typeof DragEvent<`u`&&e instanceof DragEvent?J.Drag:e instanceof MouseEvent?J.MouseMove:J.TouchMove)}),i,{trailing:!1})),u=[G(`mousemove`,l,n),G(`touchmove`,l,n),G(`drag`,l,n)];return X(()=>
vendor: 8,898 bytes, line 9
9{u.forEach(e=>e())})}function Ko({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],l=null,u=t=>o=>{let s=Uo(o);if(K(s,r,i,a,!0))return;let c=null,u=t;if(`pointerType`in o){switch(o.pointerType){case`mouse`:c=xo.Mouse;break;case`touch`:c=xo.Touch;break;case`pen`:c=xo.Pen}c===xo.Touch?Y[t]===Y.MouseDown?u=`TouchStart`:Y[t]===Y.MouseUp&&(u=`TouchEnd`):xo.Pen}else ao(o)&&(c=xo.Touch);c===null?Y[t]===Y.Click&&(c=l,l=null):(l=c,(u.startsWith(`Touch`)&&c===xo.Touch||u.startsWith(`Mouse`)&&c===xo.Mouse)&&(c=null));let d=ao(o)?o.changedTouches[0]:o;if(!d)return;let f=n.getId(s),{clientX:p,clientY:m}=d;X(e)({type:Y[u],id:f,x:p,y:m,...c!==null&&{pointerType:c}})};return Object.keys(Y).filter(e=>Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&s[e]!==!1).forEach(e=>{let n=Xi(e),r=u(e);if(window.PointerEvent)switch(Y[e]){case Y.MouseDown:case Y.MouseUp:n=n.replace(`mouse`,`pointer`);break;case Y.TouchStart:case Y.TouchEnd:return}c.push(G(n,r,t))}),X(()=>{c.forEach(e=>e())})}function qo({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){return G(`scroll`,X(Ja(X(o=>{let s=Uo(o);if(!s||K(s,r,i,a,!0))return;let c=n.getId(s);if(s===t&&t.defaultView){let n=Qa(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),t)}function Jo({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return G(`resize`,X(Ja(X(()=>{let t=$a(),i=eo();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}var Yo=[`INPUT`,`TEXTAREA`,`SELECT`],Xo=new WeakMap;function Zo({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,ignoreClass:o,ignoreSelector:s,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:h}){function g(e){let n=Uo(e),u=e.isTrusted,g=n&&Zi(n.tagName);if(g===`OPTION`&&(n=n.parentElement),!n||!g||Yo.indexOf(g)<0||K(n,r,i,a,!0))return;let v=n;if(v.classList.contains(o)||s&&v.matches(s))return;let y=ea(n),b=ta(v,g,y),x=!1,S=Ji({maskInputOptions:c,tagName:g,type:y}),C=Ia(n,f,m,p,h,S);(y===`radio`||y===`checkbox`)&&(x=n.checked),b=Yi({isMasked:C,element:n,value:b,maskInputFn:l}),_(n,d?{text:b,isChecked:x,userTriggered:u}:{text:b,isChecked:x});let w=n.name;y===`radio`&&w&&x&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach(e=>{if(e!==n){let t=Yi({isMasked:C,element:e,value:ta(e,g,y),maskInputFn:l});_(e,d?{text:t,isChecked:!x,userTriggered:!1}:{text:t,isChecked:!x})}})}function _(t,r){let i=Xo.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){Xo.set(t,r);let i=n.getId(t);X(e)({...r,id:i})}}let v=(u.input===`last`?[`change`]:[`input`,`change`]).map(e=>G(e,X(g),t)),y=t.defaultView;if(!y)return()=>{v.forEach(e=>e())};let b=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,`value`),x=[[y.HTMLInputElement.prototype,`value`],[y.HTMLInputElement.prototype,`checked`],[y.HTMLSelectElement.prototype,`value`],[y.HTMLTextAreaElement.prototype,`value`],[y.HTMLSelectElement.prototype,`selectedIndex`],[y.HTMLOptionElement.prototype,`selected`]];return b&&b.set&&v.push(...x.map(e=>Ya(e[0],e[1],{set(){X(g)({target:this,isTrusted:!1})}},!1,y))),X(()=>{v.forEach(e=>e())})}function Qo(e){let t=[];function n(e,t){if(cs(`CSSGroupingRule`)&&e.parentRule instanceof CSSGroupingRule||cs(`CSSMediaRule`)&&e.parentRule instanceof CSSMediaRule||cs(`CSSSupportsRule`)&&e.parentRule instanceof CSSSupportsRule||cs(`CSSConditionRule`)&&e.parentRule instanceof CSSConditionRule){let n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}return n(e,t)}function $o(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function es({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:X((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=$o(i,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:s}]}),r.apply(i,a)})});let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:X((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$o(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:o}]}),r.apply(i,a)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:X((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$o(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replace:o}),r.apply(i,a)})}));let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:X((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$o(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replaceSync:o}),r.apply(i,a)})}));let c={};ls(`CSSGroupingRule`)?c.CSSGroupingRule=r.CSSGroupingRule:(ls(`CSSMediaRule`)&&(c.CSSMediaRule=r.CSSMediaRule),ls(`CSSConditionRule`)&&(c.CSSConditionRule=r.CSSConditionRule),ls(`CSSSupportsRule`)&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:X((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=$o(i.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:[...Qo(i),s||0]}]}),r.apply(i,a)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:X((r,i,a)=>{let[o]=a,{id:s,styleId:c}=$o(i.parentStyleSheet,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:[...Qo(i),o]}]}),r.apply(i,a)})})}),X(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=a,o&&(r.CSSStyleSheet.prototype.replace=o),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}function ts({mirror:e,stylesheetManager:t},n){let r=null;r=n.nodeName===`#document`?e.getId(n):e.getId(n.host);let i=n.nodeName===`#document`?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,a=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,`adoptedStyleSheets`):void 0;return r===null||r===-1||!i||!a?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){return a.get?.call(this)},set(e){let n=a.set?.call(this,e);if(r!==null&&r!==-1)try{t.adoptStyleSheets(e,r)}catch{}return n}}),X(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function ns({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:X((i,o,s)=>{let[c,l,u]=s;if(n.has(c))return a.apply(o,[c,l,u]);let{id:d,styleId:f}=$o(o.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:c,value:l,priority:u},index:Qo(o.parentRule)}),i.apply(o,s)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:X((i,a,s)=>{let[c]=s;if(n.has(c))return o.apply(a,[c]);let{id:l,styleId:u}=$o(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||u&&u!==-1)&&e({id:l,styleId:u,remove:{property:c},index:Qo(a.parentRule)}),i.apply(a,s)})}),X(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function rs({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:a,doc:o}){let s=X(o=>Ja(X(a=>{let s=Uo(a);if(!s||K(s,t,n,r,!0))return;let{currentTime:c,volume:l,muted:u,playbackRate:d}=s;e({type:o,id:i.getId(s),currentTime:c,volume:l,muted:u,playbackRate:d})}),a.media||500)),c=[G(`play`,s(So.Play),o),G(`pause`,s(So.Pause),o),G(`seeked`,s(So.Seeked),o),G(`volumechange`,s(So.VolumeChange),o),G(`ratechange`,s(So.RateChange),o)];return X(()=>{c.forEach(e=>e())})}function is({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){let r=new a(e,t,n);return i.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=Xa(t.fonts,`add`,function(t){return function(n){return yo(X(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=a}),r.push(o),X(()=>
9{r.forEach(e=>e())})}function as(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,selectionCb:o}=e,s=!0,c=X(()=>{let e=t.getSelection();if(!e||s&&e?.isCollapsed)return;s=e.isCollapsed||!1;let c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let{startContainer:o,startOffset:s,endContainer:l,endOffset:u}=e.getRangeAt(t);K(o,r,i,a,!0)||K(l,r,i,a,!0)||c.push({start:n.getId(o),startOffset:s,end:n.getId(l),endOffset:u})}o({ranges:c})});return c(),G(`selectionchange`,c)}function os({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:Xa(n.customElements,`define`,function(e){return function(n,r,i){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,i])}})}function ss(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Wo(e,e.doc));let i=Go(e),a=Ko(e),o=qo(e),s=Jo(e,{win:n}),c=Zo(e),l=rs(e),u=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(u=es(e,{win:n}),d=ts(e,e.doc),f=ns(e,{win:n}),e.collectFonts&&(p=is(e)));let m=as(e),h=os(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return X(()=>{Ho.forEach(e=>e.reset()),r?.disconnect(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g.forEach(e=>e())})}function cs(e){return window[e]!==void 0}function ls(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}var us=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}
9getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},ds=class{constructor(){this.crossOriginIframeMirror=new us(fa),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},fs=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new us(fa),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new us(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener(`message`,this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0);let t=jo(e);t&&this.crossOriginIframeMap.set(t,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&jo(e)?.addEventListener(`message`,this.handleMessage.bind(this)),this.loadListener?.(e);let n=Ao(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){let t=e;if(t.data.type!==`rrweb`||t.origin!==t.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case q.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:q.IncrementalSnapshot,data:{source:J.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case q.Meta:case q.Load:case q.DomContentLoaded:return!1;case q.Plugin:return t;case q.Custom:return this.replaceIds(t.data.payload,e,[`id`,`parentId`,`previousId`,`nextId`]),t;case q.IncrementalSnapshot:switch(t.data.source){case J.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,[`parentId`,`nextId`,`previousId`]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,[`parentId`,`id`])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,[`id`])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case J.Drag:case J.TouchMove:case J.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case J.ViewportResize:return!1;case J.MediaInteraction:case J.MouseInteraction:case J.Scroll:case J.CanvasMutation:case J.Input:return this.replaceIds(t.data,e,[`id`]),t;case J.StyleSheetRule:case J.StyleDeclaration:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleId`]),t;case J.Font:return t;case J.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,[`start`,`end`])}),t;case J.AdoptedStyleSheet:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleIds`]),t.data.styles?.forEach(t=>{this.replaceStyleIds(t,e,[`styleId`])}),t}}return!1}replace(e,t,n,r){for(let i of r)(Array.isArray(t[i])||typeof t[i]==`number`)&&(t[i]=Array.isArray(t[i])?e.getIds(n,t[i]):e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,[`id`,`rootId`]),`childNodes`in e&&e.childNodes.forEac
9h(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type!==U.Document&&!e.rootId&&(e.rootId=t),`childNodes`in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}},ps=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},ms=class{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Li(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);let n=Wo({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(qo({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),yo(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(ts({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){let t=Ao(e),n=jo(e);t&&n&&this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(Xa(e.prototype,`attachShadow`,function(e){return function(r){let i=e.call(this,r);return this.shadowRoot&&ho(this)&&n.addShadowRoot(this.shadowRoot,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},hs=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new uo,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:Hi(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},gs=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,vo(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},Z,_s;try{if(Array.from([1],e=>e*2)[0]!==2){let 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)}var vs=qi();function ys(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,unblockSelector:o=null,ignoreClass:s=`rr-ignore`,ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u=`rr-mask`,unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:h,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,maxCanvasSize:x=null,packFn:S,sampling:C={},dataURLOptions:w={},mousemoveWait:ee,recordDOM:T=!0,recordCanvas:E=!1,recordCrossOriginIframes:D=!1,recordAfter:te=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:ne=!1,collectFonts:re=!1,inlineImages:ie=!1,plugins:ae,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:oe=new Set([]),errorHandler:se,onMutation:ce,getCanvasManager:le}=e;wo(se);let ue=!D||window.parent===window,de=!1;if(!ue)try{window.parent.document&&(de=!1)}catch{de=!0}if(ue&&!t)throw Error(`emit function is required`);if(!ue&&!de)return()=>{};
9ee!==void 0&&C.mousemove===void 0&&(C.mousemove=ee),vs.reset();let k=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g===void 0?{}:g,fe=_===!0||_===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_===`all`,headMetaDescKeywords:_===`all`}:_||{};oo();let pe,me=0,he=e=>{for(let t of ae||[])t.eventProcessor&&(e=t.eventProcessor(e));return S&&!de&&(e=S(e)),e};Z=(e,i)=>{let a=e;if(a.timestamp=Za(),Ho[0]?.isFrozen()&&a.type!==q.FullSnapshot&&(a.type!==q.IncrementalSnapshot||a.data.source!==J.Mutation)&&Ho.forEach(e=>e.unfreeze()),ue)t?.(he(a),i);else if(de){let e={type:`rrweb`,event:he(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(a.type===q.FullSnapshot)pe=a,me=0;else if(a.type===q.IncrementalSnapshot){if(a.data.source===J.Mutation&&a.data.isAttachIframe)return;me++;let e=r&&me>=r,t=n&&pe&&a.timestamp-pe.timestamp>n;(e||t)&&Se(!0)}};let ge=e=>{Z({type:q.IncrementalSnapshot,data:{source:J.Mutation,...e}})},_e=e=>Z({type:q.IncrementalSnapshot,data:{source:J.Scroll,...e}}),ve=e=>Z({type:q.IncrementalSnapshot,data:{source:J.CanvasMutation,...e}}),ye=new hs({mutationCb:ge,adoptedStyleSheetCb:e=>Z({type:q.IncrementalSnapshot,data:{source:J.AdoptedStyleSheet,...e}})}),A=typeof __RRWEB_EXCLUDE_IFRAME__==`boolean`&&__RRWEB_EXCLUDE_IFRAME__?new ds:new fs({mirror:vs,mutationCb:ge,stylesheetManager:ye,recordCrossOriginIframes:D,wrappedEmit:Z});for(let e of ae||[])e.getMirror&&e.getMirror({nodeMirror:vs,crossOriginIframeMirror:A.crossOriginIframeMirror,crossOriginIframeStyleMirror:A.crossOriginIframeStyleMirror});let j=new gs,be=xs(le,{mirror:vs,win:window,mutationCb:e=>Z({type:q.IncrementalSnapshot,data:{source:J.CanvasMutation,...e}}),recordCanvas:E,blockClass:i,blockSelector:a,unblockSelector:o,maxCanvasSize:x,sampling:C.canvas,dataURLOptions:w,errorHandler:se}),xe=typeof __RRWEB_EXCLUDE_SHADOW_DOM__==`boolean`&&__RRWEB_EXCLUDE_SHADOW_DOM__?new ps:new ms({mutationCb:ge,scrollCb:_e,bypassOptions:{onMutation:ce,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:k,dataURLOptions:w,maskAttributeFn:v,maskTextFn:b,maskInputFn:y,recordCanvas:E,inlineImages:ie,sampling:C,slimDOMOptions:fe,iframeManager:A,stylesheetManager:ye,canvasManager:be,keepIframeSrcFn:O,processedNodeManager:j,ignoreCSSAttributes:oe},mirror:vs}),Se=(e=!1)=>{if(!T)return;Z({type:q.Meta,data:{href:window.location.href,width:eo(),height:$a()}},e),ye.reset(),xe.init(),Ho.forEach(e=>e.lock());let t=Ga(document,{mirror:vs,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:k,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,slimDOM:fe,dataURLOptions:w,recordCanvas:E,inlineImages:ie,onSerialize:e=>{so(e,vs)&&A.addIframe(e),co(e,vs)&&ye.trackLinkElement(e),lo(e)&&xe.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{A.attachIframe(e,t);let n=jo(e);n&&be.addWindow(n),xe.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{ye.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{ge({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:O,ignoreCSSAttributes:oe});if(!t)return console.warn(`Failed to snapshot the document`);Z({type:q.FullSnapshot,data:{node:t,initialOffset:Qa(window)}}),Ho.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ye.adoptStyleSheets(document.adoptedStyleSheets,vs.getId(document))};_s=Se;try{let e=[],t=e=>X(ss)({onMutation:ce,mutationCb:ge,mousemoveCb:(e,t)=>Z({type:q.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Z({type:q.IncrementalSnapshot,data:{source:J.MouseInteraction,...e}}),scrollCb:_e,viewportResizeCb:e=>Z({type:q.IncrementalSnapshot,data:{source:J.ViewportResize,...e}}),inputCb:e=>Z({type:q.IncrementalSnapshot,data:{source:J.Input,...e}}),mediaInteractionCb:e=>Z({type:q.IncrementalSnapshot,data:{source:J.MediaInteraction,...e}}),styleSheetRuleCb:e=>Z({type:q.IncrementalSnapshot,data:{source:J.StyleSheetRule,...e}}),styleDeclarationCb:e=>Z({type:q.IncrementalSnapshot,data:{source:J.StyleDeclaration,...e}}),canvasMutationCb:ve,fontCb:e=>Z({type:q.IncrementalSnapshot,data:{source:J.Font,...e}}),selectionCb:e=>{Z({type:q.IncrementalSnapshot,data:{source:J.Selection,...e}})},customElementCb:e=>{Z({type:q.IncrementalSnapshot,data:{source:J.CustomElement,...e}})},blockClass:i,ignoreClass:s,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:k,inlineStylesheet:m,sampling:C,recordDOM:T,recordCanvas:E,inlineImages:ie,userTriggeredOnInput:ne,collectFonts:re,doc:e,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,keepIframeSrcFn:O,blockSelector:a,unblockSelector:o,slimDOMOptions:fe,dataURLOptions:w,mirror:vs,iframeManager:A,stylesheetManager:ye,shadowDomManager:xe,processedNodeManager:j,canvasManager:be,ignoreCSSAttributes:oe,plugins:ae?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>Z({type:q.Plugin,data:{plugin:e.name,payload:t}}
9)}))||[]},{});A.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{Se(),e.push(t(document))};return document.readyState===`interactive`||document.readyState===`complete`?n():(e.push(G(`DOMContentLoaded`,()=>{Z({type:q.DomContentLoaded,data:{}}),te===`DOMContentLoaded`&&n()})),e.push(G(`load`,()=>{Z({type:q.Load,data:{}}),te===`load`&&n()},window))),()=>{e.forEach(e=>e()),j.destroy(),_s=void 0,To()}}catch(e){console.warn(e)}}function bs(e){if(!_s)throw Error(`please take full snapshot after start recording`);_s(e)}ys.mirror=vs,ys.takeFullSnapshot=bs;function xs(e,t){try{return e?e(t):new ko}catch{return console.warn(`Unable to initialize CanvasManager`),new ko}}var Ss;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(Ss||={});var Cs=3,ws=5;function Ts(e){return e>9999999999?e:e*1e3}function Es(e){return e>9999999999?e/1e3:e}function Ds(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:O(t,10,1e3)}}),t.category===`console`)))}var Os=`button,a`;function ks(e){return e.closest(Os)||e}function As(e){let t=js(e);return!t||!(t instanceof Element)?t:ks(t)}function js(e){return Ms(e)?e.target:e}function Ms(e){return C(e)&&`target`in e}var Ns;function Ps(e){return Ns||(Ns=[],Fs()),Ns.push(e),()=>{let t=Ns?Ns.indexOf(e):-1;t>-1&&Ns.splice(t,1)}}function Fs(){de(H,`open`,function(e){return function(...t){if(Ns)try{Ns.forEach(e=>e())}catch{}return e.apply(H,t)}})}var Is=new Set([J.Mutation,J.StyleSheetRule,J.StyleDeclaration,J.AdoptedStyleSheet,J.CanvasMutation,J.Selection,J.MediaInteraction]);function Ls(e,t,n){e.handleClick(t,n)}var Rs=class{constructor(e,t,n=Ds){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){let e=Ps(()=>{this._lastMutation=Hs()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(Bs(t,this._ignoreSelector)||!Vs(e))return;let n={timestamp:Es(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Es(e)}registerScroll(e=Date.now()){this._lastScroll=Es(e)}registerClick(e){let t=ks(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=Hs();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(let t of e){let e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:a,clickBreadcrumb:o}=e;if(i){let n=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,r=n<this._timeout*1e3?`mutation`:`timeout`,i={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.slowClickDetected`,data:{...o.data,url:H.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:a||1}};this._addBreadcrumbEvent(t,i);return}if(a>1){let e={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.multiClick`,data:{...o.data,url:H.location.href,route:t.getCurrentRoute(),clickCount:a,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=y(()=>this._checkClicks(),1e3)}},zs=[`A`,`BUTTON`,`INPUT`];function Bs(e,t){return!!(!zs.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))}
9function Vs(e){return!!(e.data&&typeof e.data.nodeId==`number`&&e.timestamp)}function Hs(){return Date.now()/1e3}function Us(e,t){try{if(!Ws(t))return;let{source:n}=t.data;if(Is.has(n)&&e.registerMutation(t.timestamp),n===J.Scroll&&e.registerScroll(t.timestamp),Gs(t)){let{type:n,id:r}=t.data,i=ys.mirror.getNode(r);i instanceof HTMLElement&&n===Y.Click&&e.registerClick(i)}}catch{}}function Ws(e){return e.type===Cs}function Gs(e){return e.data.source===J.MouseInteraction}function Ks(e){return{timestamp:Date.now()/1e3,type:`default`,...e}}var qs=(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))(qs||{}),Js=new Set([`id`,`class`,`aria-label`,`role`,`name`,`alt`,`title`,`data-test-id`,`data-testid`,`disabled`,`aria-disabled`,`data-sentry-component`]);function Ys(e){let t={};!e[`data-sentry-component`]&&e[`data-sentry-element`]&&(e[`data-sentry-component`]=e[`data-sentry-element`]);for(let n in e)if(Js.has(n)){let r=n;(n===`data-testid`||n===`data-test-id`)&&(r=`testId`),t[r]=e[n]}return t}var Xs=e=>t=>{if(!e.isEnabled())return;let n=Qs(t);if(!n)return;let r=t.name===`click`,i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&Ls(e.clickDetector,n,As(t.event)),Ds(e,n)};function Zs(e,t){let n=ys.mirror.getId(e),r=n&&ys.mirror.getNode(n),i=r&&ys.mirror.getMeta(r),a=i&&ec(i)?i:null;return{message:t,data:a?{nodeId:n,node:{id:n,tagName:a.tagName,textContent:Array.from(a.childNodes).map(e=>e.type===qs.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(``),attributes:Ys(a.attributes)}}:{}}}function Qs(e){let{target:t,message:n}=$s(e);return Ks({category:`ui.${e.name}`,...Zs(t,n)})}function $s(e){let t=e.name===`click`,n,r=null;try{r=t?As(e.event):js(e.event),n=g(r,{maxStringLength:200})||`<unknown>`}catch{n=`<unknown>`}return{target:r,message:n}}function ec(e){return e.type===qs.Element}function tc(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=nc(t);n&&Ds(e,n)}function nc(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a,target:o}=e;if(!o||rc(o)||!a)return null;let s=t||r||i,c=a.length===1;if(!s&&c)return null;let l=g(o,{maxStringLength:200})||`<unknown>`;return Ks({category:`ui.keyDown`,message:l,data:{...Zs(o,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a}})}function rc(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.isContentEditable}var ic={resource:dc,paint:lc,navigation:uc};function ac(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function oc(e){return e.map(sc).filter(Boolean)}function sc(e){let t=ic[e.entryType];return t?t(e):null}function cc(e){return((d()||H.performance.timeOrigin)+e)/1e3}function lc(e){let{duration:t,entryType:n,name:r,startTime:i}=e,a=cc(i);return{type:n,name:r,start:a,end:a+t,data:void 0}}function uc(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:a,encodedBodySize:o,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:m,type:h}=e;return i===0?null:{type:`${t}.${h}`,start:cc(p),end:cc(a),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:a,redirectCount:f}}}function dc(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:a,decodedBodySize:o,encodedBodySize:s,responseStatus:c,transferSize:l}=e;return[`fetch`,`xmlhttprequest`].includes(n)?null:{type:`${t}.${n}`,start:cc(a),end:cc(i),name:r,data:{size:l,statusCode:c,decodedBodySize:o,encodedBodySize:s}}}function fc(e){let t=e.entries[e.entries.length-1];return gc(e,`largest-contentful-paint`,t?.element?[t.element]:void 0)}function pc(e){return e.sources!==void 0}function mc(e){let t=[],n=[];for(let r of e.entries)if(pc(r)){let e=[];for(let t of r.sources)if(t.node){n.push(t.node);let r=ys.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return gc(e,`cumulative-layout-shift`,n,t)}function hc(e){let t=e.entries[e.entries.length-1];return gc(e,`interaction-to-next-paint`,t?.target?[t.target]:void 0)}function gc(e,t,n,r){let i=e.value,a=e.rating,o=cc(i);return{type:`web-vital`,name:t,start:o,end:o,data:{value:i,size:i,rating:a,nodeIds:n?n.map(e=>ys.mirror.getId(e)):void 0,attributions:r}}}function _c(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}let r=[];
9return[`navigation`,`paint`,`resource`].forEach(e=>{r.push(Yn(e,n))}),r.push(Kn(ac(fc,e)),Gn(ac(mc,e)),Jn(ac(hc,e))),()=>{r.forEach(e=>e())}}var Q=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,vc=
vendor: 10,332 bytes, line 9
9`var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});`;
9function yc(){let e=new Blob([vc],{type:`text/javascript`});return URL.createObjectURL(e)}var bc=[`log`,`warn`,`error`],xc=`[Replay] `;function Sc(e,t=`info`){je({category:`console`,data:{logger:`replay`},level:t,message:`${xc}${e}`},{level:t})}function Cc(){let e=!1,t=!1,n={exception:()=>void 0,infoTick:()=>void 0,setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return Q?(bc.forEach(e=>{n[e]=(...n)=>{j[e](xc,...n),t&&Sc(n.join(``),We(e))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),j.error(xc,r),e?ht(r,{mechanism:{handled:!0,type:`auto.function.replay.debug`}}):t&&Sc(r,`error`)},n.infoTick=(...e)=>{j.log(xc,...e),t&&setTimeout(()=>Sc(e[0]),0)}):bc.forEach(e=>{n[e]=()=>void 0}),n}var $=Cc(),wc=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Oi}.`)}},Tc=class extends Error{constructor(){super(`Worker destroyed`)}},Ec=class{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(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Oi)throw new wc;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(let{timestamp:t}of this.events)(e===null||t<e)&&(e=t);return e===null?e:Ts(e)}},Dc=class{constructor(e){this._onMessage=({data:e})=>{let t=e;if(typeof t.id!=`number`)return;let n=this._pending.get(t.id);if(n&&n.method===t.method){if(this._pending.delete(t.id),!t.success){Q&&$.error(`Error in compression worker: `,t.response),n.reject(Error(`Error in compression worker`));return}n.resolve(t.response)}},this._worker=e,this._id=0,this._pending=new Map,this._worker.addEventListener(`message`,this._onMessage)}ensureReady(){return this._ensureReadyPromise||=new Promise((e,t)=>{this._worker.addEventListener(`message`,({data:n})=>{n.success?e():(Q&&$.warn(`Received worker message with unsuccessful status`,n),t(Error(`Received worker message with unsuccessful status`)))},{once:!0}),this._worker.addEventListener(`error`,e=>{Q&&$.warn(`Failed to load Replay compression worker`,e),t(Error(`Failed to load Replay compression worker: ${e instanceof ErrorEvent&&e.message?e.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(){Q&&$.log(`Destroying compression worker`),this._worker.removeEventListener(`message`,this._onMessage),this._pending.forEach(e=>e.reject(new Tc)),this._pending.clear(),this._worker.terminate()}postMessage(e,t){let n=this._getAndIncrementId();return new Promise((r,i)=>{this._pending.set(n,{method:e,resolve:r,reject:i});try{this._worker.postMessage({id:n,method:e,arg:t})}catch(e){this._pending.delete(n),i(e)}})}_getAndIncrementId(){return this._id++}},Oc=class{constructor(e){this._worker=new Dc(e),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(e){let t=Ts(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Oi?Promise.reject(new wc):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage(`clear`).then(null,e=>{Q&&$.exception(e,`Sending "clear" message to worker failed`,e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage(`addEvent`,e)}async _finishRequest(){let e=await this._worker.postMessage(`finish`);return this._earliestTimestamp=null,this._totalSize=0,e}},kc=class{constructor(e){this._fallback=new Ec,this._compression=new Oc(e),this._used=this._fallback,this._ensureWorkerIsLoadedProm
9ise=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(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){Q&&$.exception(e,`Failed to load the compression worker, falling back to simple buffer`);return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(let t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){if(e instanceof Tc)return;Q&&$.exception(e,`Failed to add events when switching buffers.`)}}};function Ac({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=jc(t);if(e)return e}return Q&&$.log(`Using simple buffer`),new Ec}function jc(e){try{let t=e||Mc();return t?(Q&&$.log(`Using compression worker${e?` from ${e}`:``}`),new kc(new Worker(t))):void 0}catch(e){Q&&$.exception(e,`Failed to create compression worker`)}}function Mc(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>`u`||!__SENTRY_EXCLUDE_REPLAY_WORKER__?yc():``}function Nc(){try{return`sessionStorage`in H&&!!H.sessionStorage}catch{return!1}}function Pc(e){Fc(),e.session=void 0}function Fc(){if(Nc())try{H.sessionStorage.removeItem(mi)}catch{}}function Ic(e){return e!==void 0&&Math.random()<e}function Lc(e){if(Nc())try{H.sessionStorage.setItem(mi,JSON.stringify(e))}catch{}}function Rc(e){let t=Date.now();return{id:e.id||i(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function zc(e,t){return Ic(e)?`session`:t?`buffer`:!1}function Bc({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=Rc({sampled:zc(e,t),previousSessionId:r});return n&&Lc(i),i}function Vc(){if(!Nc())return null;try{let e=H.sessionStorage.getItem(mi);if(!e)return null;let t=JSON.parse(e);return Q&&$.infoTick(`Loading existing session`),Rc(t)}catch{return null}}function Hc(e,t,n=+new Date){return e===null||t===void 0||t<0||t!==0&&e+t<=n}function Uc(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Hc(e.started,t,r)||Hc(e.lastActivity,n,r)}function Wc(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Uc(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled===`buffer`&&e.segmentId===0)}function Gc({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){let i=r.stickySession&&Vc();return i?Wc(i,{sessionIdleExpire:e,maxReplayDuration:t})?(Q&&$.infoTick(`Session in sessionStorage is expired, creating new one...`),Bc(r,{previousSessionId:i.id})):i:(Q&&$.infoTick(`Creating new session`),Bc(r,{previousSessionId:n}))}function Kc(e){return e.type===q.Custom}function qc(e,t,n){return Xc(e,t)?(Yc(e,t,n),!0):!1}function Jc(e,t,n){return Xc(e,t)?Yc(e,t,n):Promise.resolve(null)}async function Yc(e,t,n){let{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;let i=e.recordingMode===`buffer`;try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let a=Zc(t,e.getOptions().beforeAddRecordingEvent);return a?await r.addEvent(a):void 0}catch(t){if(!e.isEnabled())return e.handleException(t),null;let n=t&&t instanceof wc,a=n?`eventBufferOverflow`:`eventBufferError`,o=L();if(o){let e=n?`buffer_overflow`:`internal_sdk_error`;o.recordDroppedEvent(e,`replay`)}if(n&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:a})}}
9function Xc(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=Ts(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Q&&$.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Zc(e,t){try{if(typeof t==`function`&&Kc(e))return t(e)}catch(e){return Q&&$.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}var Qc=100;function $c(e,t,n){let r=e.getContext();t&&r.traceIds.size<Qc&&r.traceIds.add(t),n&&r.segmentNames.size<Qc&&r.segmentNames.add(n)}function el(e){return t=>{e.isEnabled()&&$c(e,t.trace_id,t.name||void 0)}}function tl(e){return!e.type}function nl(e){return e.type===`transaction`}function rl(e){return e.type===`replay_event`}function il(e){return e.type===`feedback`}function al(e){return(t,n)=>{if(!e.isEnabled()||!tl(t)&&!nl(t))return;let r=n.statusCode;if(!(!r||r<200||r>=300)){if(nl(t)){ol(e,t);return}sl(e,t)}}}function ol(e,t){$c(e,t.contexts?.trace?.trace_id,t.transaction)}function sl(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!==`buffer`||!t.tags?.replayId)return;let{beforeErrorSampling:r}=e.getOptions();(typeof r!=`function`||r(t))&&y(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}function cl(e){return t=>{e.isEnabled()&&tl(t)&&ll(e,t)}}function ll(e,t){let n=t.exception?.values?.[0]?.value;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))&&Ds(e,Ks({category:`replay.hydrate-error`,data:{url:dt()}}))}function ul(e){let t=L();t&&t.on(`beforeAddBreadcrumb`,t=>dl(e,t))}function dl(e,t){if(!e.isEnabled()||!ml(t))return;let n=fl(t);n&&Ds(e,n)}function fl(e){return!ml(e)||[`fetch`,`xhr`,`sentry.event`,`sentry.transaction`].includes(e.category)||e.category.startsWith(`ui.`)?null:e.category===`console`?pl(e):Ks(e)}function pl(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return Ks(e);let n=!1,r=t.map(e=>{if(!e)return e;if(typeof e==`string`)return e.length>Ti?(n=!0,`${e.slice(0,Ti)}\u2026`):e;if(typeof e==`object`)try{let t=O(e,7);return JSON.stringify(t).length>Ti?(n=!0,`${JSON.stringify(t,null,2).slice(0,Ti)}\u2026`):t}catch{}return e});return Ks({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:[`CONSOLE_ARG_TRUNCATED`]}}:{}}})}function ml(e){return!!e.category}function hl(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function gl(){let e=F().getPropagationContext().dsc;e&&delete e.replay_id;let t=M();if(t){let e=St(t);delete e.replay_id}}function _l(e){let t=F().getPropagationContext().dsc;t&&(t.replay_id=e);let n=M();if(n){let t=St(n);t.replay_id=e}}function vl(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))}function yl(e,t){return e.recordingMode!==`buffer`||t.message===gi||!t.exception||t.type?!1:Ic(e.getOptions().errorSampleRate)}function bl(e){return Object.assign((t,n)=>{if(e.session&&Wc(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&gl(),!e.isEnabled()||e.isPaused())return t;if(rl(t))return delete t.breadcrumbs,t;if(!tl(t)&&!nl(t)&&!il(t))return t;if(!e.checkAndHandleExpiredSession())return gl(),t;if(il(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),vl(e,t),t;if(hl(t,n)&&!e.getOptions()._experiments.captureExceptions)return Q&&$.log(`Ignoring error from rrweb internals`,t),null;let r=yl(e,t);if((r||e.recordingMode===`session`)&&(t.tags={...t.tags,replayId:e.getSessionId()}),r&&e.recordingMode===`buffer`&&e.session?.sampled===`buffer`){let t=e.session;t.dirty=!0,e.getOptions().stickySession&&Lc(t)}return t},{id:`Replay`})}function xl(e,t){return t.map(({type:t,start:n,end:r,name:i,data:a})=>{let o=e.throttledAddEvent({type:q.Custom,timestamp:n,data:{tag:`performanceSpan`,payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:a}}});return typeof o==`string`?Promise.resolve(null):o})}function Sl(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:`navigation.push`,start:r,end:r,name:n,data:{previous:t}}}function Cl(e){return t=>{if(!e.isEnabled())return;let n=Sl(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(xl(e,[n]),!1)))}}function wl(e,t){return Q&&e.getOptions()._experiments.traceInternals?!1:Pt(t,L())}function Tl(e,t){e.isEnabled()&&t!==null&&(wl(e,t.name)||e.addUpdate(()=>(xl(e,[t]),!0)))}function El(e){if(!e)return;let 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){let n=ui(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Dl(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Ol(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function kl(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:a,statusCode:o,request:s,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:a,statusCode:o,request:s,response:c}}}function Al(e){return{headers:{},size:e,_meta:{warnings:[`URL_SKIPPED`]}}}function jl(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:i,warnings:a}=Nl(n);return r.body=i,a?.length&&(r._meta={warnings:a}),r}function Ml(e,t){return Object.entries(e).reduce((n,[r,i])=>{let a=r.toLowerCase();return t.includes(a)&&e[r]&&(n[a]=i),n},{})}function Nl(e){if(!e||typeof e!=`string`)return{body:e};let t=e.length>wi,n=Pl(e);if(t){let t=e.slice(0,wi);return n?{body:t,warnings:[`MAYBE_JSON_TRUNCATED`]}:{body:`${t}\u2026`,warnings:[`TEXT_TRUNCATED`]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Pl(e){let t=e[0],n=e[e.length-1];return t===`[`&&n===`]`||t===`{`&&n===`}`}function Fl(e,t){let n=Il(e);return qe(n,t)}function Il(e,t=H.document.baseURI){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(H.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith(`/`)&&r.endsWith(`/`)?r.slice(0,-1):r}async function Ll(e,t,n){try{let r=kl(`resource.fetch`,await zl(e,t,n));Tl(n.replay,r)}catch(e){Q&&$.exception(e,`Failed to capture fetch breadcrumb`)}}
9function Rl(e,t){let{input:n,response:r}=t,i=El(n?fi(n):void 0),a=r?Dl(r.headers.get(`content-length`)):void 0;i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}async function zl(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r}=t,{url:o,method:s,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=Fl(o,n.networkDetailAllowUrls)&&!Fl(o,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:a,url:o,method:s,statusCode:c,request:d?Bl(n,t.input,l):Al(l),response:await Vl(d,n,t.response,u)}}function Bl({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let i=n?Gl(n,t):{};if(!e)return jl(i,r,void 0);let[a,o]=di(fi(n),$),s=jl(i,r,a);return o?Ol(s,o):s}async function Vl(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return Al(i);let a=r?Wl(r.headers,n):{};if(!r||!t&&i!==void 0)return jl(a,i,void 0);let[o,s]=await Ul(r),c=Hl(o,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:a});return s?Ol(c,s):c}function Hl(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{let a=e?.length&&n===void 0?El(e):n;
9return r?t?jl(i,a,e):jl(i,a,void 0):Al(a)}catch(e){return Q&&$.exception(e,`Failed to serialize response body`),jl(i,n,void 0)}}async function Ul(e){let t=ql(e);if(!t)return[void 0,`BODY_PARSE_ERROR`];try{return[await Jl(t)]}catch(e){return e instanceof Error&&e.message.indexOf(`Timeout`)>-1?(Q&&$.warn(`Parsing text body from response timed out`),[void 0,`BODY_PARSE_TIMEOUT`]):(Q&&$.exception(e,`Failed to get text body from response`),[void 0,`BODY_PARSE_ERROR`])}}function Wl(e,t){let n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function Gl(e,t){return e.length===1&&typeof e[0]!=`string`?Kl(e[0],t):e.length===2?Kl(e[1],t):{}}function Kl(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?Wl(n,t):Array.isArray(n)?{}:Ml(n,t):{}}function ql(e){try{return e.clone()}catch(e){Q&&$.exception(e,`Failed to clone response body`)}}function Jl(e){return new Promise((t,n)=>{let r=y(()=>n(Error(`Timeout while trying to read response body`)),500);Yl(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}async function Yl(e){return await e.text()}async function Xl(e,t,n){try{let r=kl(`resource.xhr`,Ql(e,t,n));Tl(n.replay,r)}catch(e){Q&&$.exception(e,`Failed to capture xhr breadcrumb`)}}function Zl(e,t){let{xhr:n,input:r}=t;if(!n)return;let i=El(r),a=n.getResponseHeader(`content-length`)?Dl(n.getResponseHeader(`content-length`)):tu(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}function Ql(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r,input:s,xhr:c}=t,{url:l,method:u,status_code:d=0,request_body_size:f,response_body_size:p}=e.data;if(!l)return null;if(!c||!Fl(l,n.networkDetailAllowUrls)||Fl(l,n.networkDetailDenyUrls))return{startTimestamp:i,endTimestamp:o,url:l,method:u,statusCode:d,request:Al(f),response:Al(p)};let m=c[a],h=m?Ml(m.request_headers,n.networkRequestHeaders):{},g=Ml(pi(c),n.networkResponseHeaders),[_,v]=n.networkCaptureBodies?di(s,$):[void 0],[y,b]=n.networkCaptureBodies?$l(c):[void 0],x=jl(h,f,_),S=jl(g,p,y);return{startTimestamp:i,endTimestamp:o,url:l,method:u,statusCode:d,request:v?Ol(x,v):x,response:b?Ol(S,b):S}}function $l(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return eu(e.response,e.responseType)}catch(e){t.push(e)}return Q&&$.warn(`Failed to get xhr response body`,...t),[void 0]}function eu(e,t){try{if(typeof e==`string`)return[e];if(e instanceof Document)return[e.body.outerHTML];if(t===`json`&&C(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return Q&&$.exception(t,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return Q&&$.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function tu(e,t){try{return El(t===`json`&&C(e)?JSON.stringify(e):e)}catch{return}}function nu(e){let t=L();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o}=e.getOptions(),s={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o};t&&t.on(`beforeAddBreadcrumb`,(e,t)=>ru(s,e,t))}catch{}}function ru(e,t,n){if(t.data)try{iu(t)&&ou(n)&&(Zl(t,n),Xl(t,n,e)),au(t)&&su(n)&&(Rl(t,n),Ll(t,n,e))}catch(e){Q&&$.exception(e,`Error when enriching network breadcrumb`)}}function iu(e){return e.category===`xhr`}function au(e){return e.category===`fetch`}function ou(e){return e?.xhr}function su(e){return e?.input!==void 0}function cu(e){let t=L();Ce(Xs(e)),ye(Cl(e)),ul(e),nu(e);let n=bl(e);ke(n),t&&(t.on(`beforeSendEvent`,cl(e)),t.on(`afterSendEvent`,al(e)),t.on(`createDsc`,t=>{let n=e.getSessionId();n&&e.isEnabled()&&e.recordingMode===`session`&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on(`processSegmentSpan`,el(e)),t.on(`spanStart`,t=>{e.lastActiveSpan=t}),t.on(`spanEnd`,t=>{e.lastActiveSpan=t}),t.on(`beforeSendFeedback`,async(t,n)=>{let r=e.getSessionId();n?.includeReplay&&e.isEnabled()&&r&&t.contexts?.feedback&&(t.contexts.feedback.source===`api`&&await e.sendBufferedReplayOrFlush(),t.contexts.feedback.replay_id=r)}),t.on(`openFeedbackWidget`,async()=>{await e.sendBufferedReplayOrFlush()}))}async function lu(e){try{return Promise.all(xl(e,[uu(H.performance.memory)]))}catch{return[]}}function uu(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:`memory`,name:`memory`,start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function du(e,t,n){return Nt(e,t,{...n,setTimeoutImpl:y})}
9var fu=v.navigator;function pu(){return/iPhone|iPad|iPod/i.test(fu?.userAgent??``)||/Macintosh/i.test(fu?.userAgent??``)&&fu?.maxTouchPoints&&fu?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function mu(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){Q&&$.warn(`Received replay event after session expired.`);return}let i=r||!t;t=!0,hu(n),e.clickDetector&&Us(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode===`buffer`&&i&&e.setInitialState(),!qc(e,n,i))return!0;if(!i)return!1;let t=e.session;if(_u(e,i),e.recordingMode===`buffer`&&t&&e.eventBuffer&&!t.dirty){let n=e.eventBuffer.getEarliestTimestamp();n&&(Q&&$.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&Lc(t))}return t?.previousSessionId||e.recordingMode===`session`&&e.flush(),!0})}catch(t){e.handleException(t)}}}function hu(e){let t=e.data;if(e.type===q.IncrementalSnapshot&&t&&typeof t==`object`&&`source`in t&&t.source===J.Mutation&&`attributes`in t&&Array.isArray(t.attributes))for(let e of t.attributes){let t=ys.mirror.getNode(e.id),n=t&&ys.mirror.getMeta(t);if(n?.type===qs.Element)for(let[t,r]of Object.entries(e.attributes))r===null?delete n.attributes[t]:n.attributes[t]=r}}function gu(e){let 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 _u(e,t){t&&e.session?.segmentId===0&&qc(e,gu(e),!1)}function vu(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function yu(e,t,n,r){return m(S(e,re(e),r,n),[[{type:`replay_event`},e],[{type:`replay_recording`,length:typeof t==`string`?new TextEncoder().encode(t).length:t.length},t]])}function bu({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)} 10`;if(typeof e==`string`)n=`${r}${e}`;else{let t=new TextEncoder().encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function xu({client:e,scope:t,replayId:n,event:r}){let i={event_id:n,integrations:typeof e._integrations==`object`&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0};e.emit(`preprocessEvent`,r,i);let a=await ge(e.getOptions(),r,i,t,e,bt());if(!a)return null;e.emit(`postprocessEvent`,a,i),a.platform=a.platform||`javascript`;let{name:o,version:s,settings:c}=e.getSdkMetadata()?.sdk||{};return a.sdk={...a.sdk,name:o||`sentry.javascript.unknown`,version:s||`0.0.0`,settings:c},a}async function Su({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:a}){let o=bu({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:c,traceIds:l,segmentNames:u,initialTimestamp:d}=r,f=L(),p=F(),m=f?.getTransport(),h=f?.getDsn();if(!f||!m||!h||!a.sampled)return Promise.resolve({});let g=await xu({scope:p,client:f,replayId:t,event:{type:hi,replay_start_timestamp:d/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,segment_names:u,urls:s,replay_id:t,segment_id:n,replay_type:a.sampled}});if(!g)return f.recordDroppedEvent(`event_processor`,`replay`),Q&&$.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;let _=yu(g,o,h,f.getOptions().tunnel),v;try{v=await m.send(_)}catch(e){let t=Error(gi);try{t.cause=e}catch{}throw t}let y=rt({},v);if(Be(y,`replay`))throw new wu(y);if(typeof v.statusCode==`number`&&(v.statusCode<200||v.statusCode>=300))throw new Cu(v.statusCode);return v}var Cu=class extends Error{constructor(e){super(`Transport returned status code ${e}`)}},wu=class extends Error{constructor(e){super(`Rate limit hit`),this.rateLimits=e}}
10,Tu=class extends Error{constructor(){super(`Session is too long, not sending replay`)}};async function Eu(e,t={count:0,interval:Si}){let{recordingData:n,onError:r}=e;if(n.length)try{return await Su(e),!0}catch(n){if(n instanceof Cu||n instanceof wu)throw n;if(yt(`Replays`,{_retryCount:t.count}),r&&r(n),t.count>=Ci){let e=Error(`${gi} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{y(async()=>{try{await Eu(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}var Du=`__THROTTLED`,Ou=`__SKIPPED`;function ku(e,t,n){let r=new Map,i=e=>{let t=e-n;r.forEach((e,n)=>{n<t&&r.delete(n)})},a=()=>[...r.values()].reduce((e,t)=>e+t,0),o=!1;return(...n)=>{let s=Math.floor(Date.now()/1e3);if(i(s),a()>=t){let e=o;return o=!0,e?Ou:Du}o=!1;let c=r.get(s)||0;return r.set(s,c+1),e(...n)}}var Au=class{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode=`session`,this.timeouts={sessionIdlePause:_i,sessionIdleExpire:vi},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=t,this._options=e,this._debouncedFlush=du(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=ku((e,t)=>Jc(this,e,t),300,5);let{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(Ei,n),timeout:n,scrollTimeout:Di,ignoreSelector:r?r.join(`,`):``}:void 0;if(i&&(this.clickDetector=new Rs(this,i)),Q){let t=e._experiments;$.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{H.document.visibilityState===`visible`?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let e=Ks({category:`ui.blur`});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{let e=Ks({category:`ui.focus`});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{tc(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){Q&&$.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session){Q&&$.exception(Error(`Unable to initialize and create session`));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled===`buffer`&&this.session.segmentId===0?`buffer`:`session`,Q&&$.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode===`session`){Q&&$.log(`Recording is already in progress`);return}if(this._isEnabled&&this.recordingMode===`buffer`){Q&&$.log("Buffering is in progress, call `flush()` to save the replay");return}Q&&$.infoTick(`Starting replay in session mode`),this._updateUserActivity();let e=Gc({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode=`session`,this._initializeRecording()}startBuffering(){if(this._isEnabled){Q&&$.log("Buffering is in progress, call `flush()` to save the replay");return}Q&&$.infoTick(`Starting replay in buffer mode`);let e=Gc({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode=`buffer`,this._initializeRecording()}startRecording(){try{let e=this._canvas;this._stopRecording=ys({...this._recordingOptions,...this.recordingMode===`buffer`?{checkoutEveryNms:xi}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:mu(this),...pu(),onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&=(this._stopRecording(),void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode=`buffer`;let n=t??`manual`;L()?.emit(`replayEnd`,{sessionId:this.session?.id,reason:n});try{Q&&$.log(`Stopping Replay triggered by ${n}`),gl(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,Pc(this)}catch(e){this.handleException(e)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Q&&$.log(`Pausing replay`))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),Q&&$.log(`Resuming replay`))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode===`session`)return this.flushImmediate();let t=Date.now();
10Q&&$.log(`Converting buffer to session`),await this.flushImmediate();let n=this.stopRecording();e&&n&&this.recordingMode!==`session`&&(this.recordingMode=`session`,this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession(),_l(this.session.id)),this.startRecording())}addUpdate(e){let t=e();this.recordingMode!==`buffer`&&this._isEnabled&&t!==!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(e){if(!(e&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Hc(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled===`session`){this.pause();return}return!!this._checkSession()}setInitialState(){let e=`${H.location.pathname}${H.location.hash}${H.location.search}`,t=`${H.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let n=this._throttledAddEvent(e,t);if(n===Du){let e=Ks({category:`replay.throttled`});this.addUpdate(()=>!qc(this,{type:ws,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e,metric:!0}}))}return n}getCurrentRoute(){let e=this.lastActiveSpan||M(),t=e&&_(e),n=(t&&P(t).data||{})[Ae];if(t&&n&&[`route`,`custom`].includes(n))return P(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Ac({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&L()?.emit(`replayStart`,{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode===`session`&&this.session&&_l(this.session.id)}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,n=Gc({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;let e=this.session;return!Wc(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:`sessionExpired`}),this.initializeSampling(e.id))}_addListeners(){try{H.document.addEventListener(`visibilitychange`,this._handleVisibilityChange),H.addEventListener(`blur`,this._handleWindowBlur),H.addEventListener(`focus`,this._handleWindowFocus),H.addEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||=(cu(this),!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=_c(this)}_removeListeners(){try{H.document.removeEventListener(`visibilitychange`,this._handleVisibilityChange),H.removeEventListener(`blur`,this._handleWindowBlur),H.removeEventListener(`focus`,this._handleWindowFocus),H.removeEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){if(this.session){if(Wc(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){gl();return}e&&this._createCustomBreadcrumb(e),this.conditionalFlush()}}_doChangeToForegroundTasks(e){if(this.session){if(!this.checkAndHandleExpiredSession()){Q&&$.log(`Document has become active, but session has expired`);return}e&&this._createCustomBreadcrumb(e)}}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:q.Custom,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e}})})}_addPerformanceEntries(){let e=oc(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let t=this._context.
10initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(xl(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;let n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){let e={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(),e}async _runFlush(){let e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){Q&&$.error(`No session or eventBuffer found to flush.`);return}if(await this._addPerformanceEntries(),this.eventBuffer?.hasEvents&&(await lu(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Tu;let n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await Eu({replayId:e,recordingData:await this.eventBuffer.finish(),segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:`sendError`});let t=L();if(t){let n;n=e instanceof wu?`ratelimit_backoff`:e instanceof Tu?`invalid`:`send_error`,t.recordDroppedEvent(n,`replay`)}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){Q&&$.error(`Attempting to finish replay event after session expired.`);return}if(!this.session)return;let t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();let r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){Q&&$.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?`short`:`long`}, not sending replay.`),r&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&Q&&$.log(`Flushing initial segment without checkout.`);let o=!!this._flushLock;this._flushLock||=this._runFlush();try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,o&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Lc(this.session)}_onMutationHandler(e){let{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{let n=vu(e.target),r=t.join(`,`);return n?.matches(r)}))return!1;let n=e.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,a=r&&n>r;if(n>i||a){let e=Ks({category:`replay.mutations`,data:{count:n,limit:a}});this._createCustomBreadcrumb(e)}return!a||(this.stop({reason:`mutationLimit`,forceFlush:this.recordingMode===`session`}),!1)}};function ju(e,t){return[...e,...t].join(`,`)}function Mu({mask:e,unmask:t,block:n,unblock:r,ignore:i}){return{maskTextSelector:ju(e,[`.sentry-mask`,`[data-sentry-mask]`]),unmaskTextSelector:ju(t,[]),blockSelector:ju(n,[`.sentry-block`,`[data-sentry-block]`,`base`,`iframe[srcdoc]:not([src])`]),unblockSelector:ju(r,[]),ignoreSelector:ju(i,[`.sentry-ignore`,`[data-sentry-ignore]`,`input[type="file"]`])}}function Nu({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:a}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return a;let o=n.includes(t),s=r&&t===`value`&&e.tagName===`INPUT`&&[`submit`,`button`].includes(e.getAttribute(`type`)||``);return o||s?a.replace(/[\S]/g,`*`):a}var Pu=`img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]`,Fu=[`content-length`,`content-type`,`accept`],Iu=Symbol.for(`sentry__originalRequestBody`),Lu=!1,Ru=!1;function zu(){if(typeof Request>`u`||Ru)return;let e=Request;try{let t=function(t,n){let r=new e(t,n);return n?.body!=null&&(r[Iu]=n.body),r};t.prototype=e.prototype,v.Request=t,Ru=!0}catch{}}var Bu=(e=>new Vu(e)),Vu=class{constructor({flushMinDelay:e=yi,flushMaxDelay:t=bi,minReplayDuration:n=ki,maxReplayDuration:r=ji,stickySession:i=!0,useCompression:a=!0,workerUrl:o,_experiments:s={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:f=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:h=[],networkDetailDenyUrls:g=[],networkCaptureBodies:_=!0,networkRequestHeaders:v=[],networkResponseHeaders:y=[],mask:b=[],maskAttributes:x=[`title`,`placeholder`,`aria-label`],unmask:S=[],block:C=[],unblock:w=[],ignore:ee=[],maskFn:T,beforeAddRecordingEvent:E,beforeErrorSampling:D,onError:te,attachRawBodyFromRequest:ne=!1}={}){this.name=`Replay`;let re=Mu({mask:b,unmask:S,block:C,unblock:w,ignore:ee});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>Nu({maskAttributes:x,maskAllText:c,privacyOptions:re,key:e,value:t,el:n}),...re,slimDOMOptions:`all`,inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!s.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,Ai),maxReplayDuration:Math.min(r,ji),stickySession:i,useCompression:a,workerUrl:o,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:f,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:h,networkDetailDenyUrls:g,networkCaptureBodies:_,networkRequestHeaders:Uu(v),networkResponseHeaders:Uu(y),beforeAddRecordingEvent:E,beforeErrorSampling:D,onError:te,attachRawBodyFromRequest:ne,_experiments:s},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Pu}`:Pu,this._recordingOptions.ignoreCSSAttributes=new Set([`background-image`])),this._isInitialized&&Qe())throw Error(`Multiple Sentry Session Replay instances are not supported`);this._isInitialized=!0}get _isInitialized(){return Lu}set _isInitialized(e){Lu=e}afterAllSetup(e){Qe()&&!this._replay&&(this._initialOptions.attachRawBodyFromRequest&&zu(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}
10startBuffering(){this._replay&&this._replay.startBuffering()}stop(e){return this._replay?this._replay.stop({forceFlush:e?.flush??this._replay.recordingMode===`session`,reason:`manual`}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(e){let t=this.getReplayId(!0);t&&(c(e,{"sentry.replay_id":t}),this.getRecordingMode()===`buffer`&&c(e,{"sentry._internal.replay_is_buffering":!0}))}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){let t=Hu(this._initialOptions,e);this._replay=new Au({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{let t=e.getIntegrationByName(`ReplayCanvas`);if(!t)return;this._replay._canvas=t.getOptions()}catch{}}};function Hu(e,t){let n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=Ge(n.replaysSessionSampleRate),a=Ge(n.replaysOnErrorSampleRate);return i==null&&a==null&&x(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),a!=null&&(r.errorSampleRate=a),r}function Uu(e){return[...Fu,...e.map(e=>e.toLowerCase())]}function Wu(e){return e.split(`,`).some(e=>e.trim().startsWith(`sentry-`))}function Gu(e){try{return new URL(e,k.location.origin).href}catch{return}}function Ku(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function qu(e){try{return new Headers(e)}catch{return}}var Ju={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Yu(e,t){let{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:a,tracePropagationTargets:o,onRequestSpanStart:s,onRequestSpanEnd:c}
10={...Ju,...t},l=typeof i==`function`?i:e=>!0,d=e=>Qu(e,o),f={},p=e.getOptions().propagateTraceparent;n&&st(t=>{let n=Ht(t,l,d,f,{propagateTraceparent:p,onRequestSpanEnd:c});if(n){let r=Gu(t.fetchData.url),i=r?Xe(r).host:void 0,o=r?pt(r):void 0;n.setAttributes({[ce]:o,[u]:o,"server.address":i}),a&&Zu(n,e),s?.(n,{headers:t.headers})}}),r&&be(t=>{let n=$u(t,l,d,f,p,c);n&&(a&&Zu(n,e),s?.(n,{headers:qu(t.xhr.__sentry_xhr_v3__?.request_headers)}))})}var Xu=300;function Zu(e,t){let{url:n}=P(e).data;if(!n||typeof n!=`string`)return;let r=()=>void setTimeout(i);if(oe(t)){let t=e.end.bind(e);e.end=e=>{let n=e??Ye(),a=!1,o=()=>{a||(a=!0,setTimeout(i),t(n),clearTimeout(s))};r=o;let s=setTimeout(o,Xu)}}let i=Yn(`resource`,({entries:t})=>{t.forEach(t=>{Ku(t)&&t.name.endsWith(n)&&(e.setAttributes(yr(t)),r())})})}function Qu(e,t){let n=dt();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let a=r.origin===i;return t?qe(r.toString(),t)||a&&qe(r.pathname,t):a}{let n=!!e.match(/^\/(?!\/)/);return t?qe(e,t):n}}function $u(e,t,n,i,s,c){let l=e.xhr,d=l?.[a];if(!l||l.__sentry_own_request__||!d)return;let{url:f,method:p}=d,m=A()&&t(f);if(e.endTimestamp){let t=l.__sentry_xhr_span_id__;if(!t)return;let n=i[t];n&&(m&&d.status_code!==void 0&&(Fe(n,d.status_code),n.end(),c?.(n,{headers:qu(pi(l)),error:e.error})),delete i[t]);return}let h=Gu(f),g=Xe(h||f),_=h?pt(h):void 0,v=pt(Ie(f)),y=L(),b=!!M(),x=b||!!y&&oe(y),S=m&&x?r({name:`${p} ${v}`,attributes:{url:pt(f),type:`xhr`,"http.method":p,"http.url":_,[u]:_,"server.address":g?.host,[I]:`auto.http.browser`,[it]:`http.client`,...g?.search&&{"http.query":g?.search},...g?.hash&&{"http.fragment":g?.hash}}}):new o,C=Je(S)&&b?void 0:S;return m&&!x&&y?.recordDroppedEvent(`no_parent_span`,`span`),l.__sentry_xhr_span_id__=S.spanContext().spanId,i[l.__sentry_xhr_span_id__]=S,n(f)&&ed(l,A()&&x?C:void 0,s),y&&y.emit(`beforeOutgoingRequestSpan`,S,e),S}function ed(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:a}=zt({span:t,propagateTraceparent:n});r&&td(e,r,i,a)}function td(e,t,n,r){let i=e.__sentry_xhr_v3__?.request_headers;if(!i?.[`sentry-trace`]&&e.setRequestHeader)try{if(e.setRequestHeader(`sentry-trace`,t),r&&!i?.traceparent&&e.setRequestHeader(`traceparent`,r),n){let t=i?.baggage;(!t||!Wu(t))&&e.setRequestHeader(`baggage`,n)}}catch{}}var nd=new WeakMap,rd=new WeakMap,id=9e4,ad=[`text/event-stream`,`application/x-ndjson`,`application/stream+json`],od=He(()=>({name:`FetchStreamPerformance`,setup(){$e(e=>{if(e.response){let t=nd.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let n=rd.get(e.response);n&&clearTimeout(n)}}}),st(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get(`content-type`)||``;if(e.response.headers?.get(`content-length`)||!ad.some(e=>t.startsWith(e)))return;let n=e.fetchData?.url||``,i=e.fetchData?.method||`GET`,a=Pe(n),o=n.startsWith(`data:`)?pt(n):a?tt(a):n,s=r({name:`${i} ${o}`,startTime:e.endTimestamp,attributes:{url:pt(n),"http.method":i,type:`fetch`,[it]:`http.client.stream`,[I]:`auto.http.browser.stream`}});nd.set(e.response,s);let c=setTimeout(()=>{s.isRecording()&&s.end()},id);rd.set(e.response,c)}})}})),sd=`WebVitals`,cd=He((e={})=>{let t=new Set(e.ignore??[]);return{name:sd,setup(n){let r=oe(n),{enableStandaloneClsSpans:i,enableStandaloneLcpSpans:a}=e._experiments??{},o=r||t.has(`cls`)?void 0:i||!1,s=r||t.has(`lcp`)?void 0:a||!1,c=wr({recordClsStandaloneSpans:o,recordLcpStandaloneSpans:s,client:n}),l=new WeakSet;n.on(`afterStartPageLoadSpan`,e=>{l.add(e)}),n.on(`spanEnd`,e=>{l.delete(e)&&(c(),Nr(e,{recordClsOnPageloadSpan:o===!1,recordLcpOnPageloadSpan:s===!1,spanStreamingEnabled:r}))}),r?(t.has(`lcp`)||ri(n),t.has(`cls`)||ai(n),t.has(`inp`)||si()):t.has(`inp`)||Xr()},afterAllSetup(){t.has(`inp`)||ti()}}});function ld(){k.document?k.document.addEventListener(`visibilitychange`,()=>{let e=M();if(!e)return;let t=_(e);if(k.document.hidden&&t){let e=`cancelled`,{op:n,status:r}=P(t);xt&&j.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute(`sentry.cancellation_reason`,`document.hidden`),t.end()}}):xt&&j.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var ud=`sentry_previous_trace`,dd=`sentry.previous_trace`;function fd(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t===`session-storage`,i=r?hd():void 0;e.on(`spanStart`,e=>{if(_(e)!==e)return;let t=F().getPropagationContext();i=pd(i,e,t),r&&md(i)});let a=!0;n&&e.on(`beforeSampling`,e=>{if(!i)return;let t=F(),n=t.getPropagationContext();if(a&&n.parentSpanId){a=!1;return}t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(gd(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=gd(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[Ue]:i.sampleRate}})}
10function pd(e,t,n){let r=P(t);function i(){try{let e=Number(r.data?.[`sentry.sample_rate`]??n.dsc?.sample_rate);return Number.isNaN(e)?0:e}catch{return 0}}let a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;let o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(xt&&j.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:o,attributes:{[gt]:`previous_trace`}}),t.setAttribute(dd,`${o.traceId}-${o.spanId}-${+!!gd(o)}`)),a)}function md(e){try{k.sessionStorage.setItem(ud,JSON.stringify(e))}catch(e){xt&&j.warn(`Could not store previous trace in sessionStorage`,e)}}function hd(){try{let e=k.sessionStorage?.getItem(ud);return JSON.parse(e)}catch{return}}function gd(e){return e.traceFlags===1}var _d=`BrowserTracing`,vd=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function yd(){let e=k.navigator;return e?.userAgent?vd.test(e.userAgent):!1}var bd={...Et,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:`in-memory`,consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Ju},xd=((e={})=>{`enableElementTiming`in e&&x(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let n={name:void 0,source:void 0},i=k.document,{enableInp:a,enableLongTask:o,enableLongAnimationFrame:s,_experiments:{enableInteractions:c,enableStandaloneClsSpans:l,enableStandaloneLcpSpans:u},beforeStartSpan:f,idleTimeout:m,finalTimeout:h,childSpanTimeout:g,markBackgroundSpan:_,traceFetch:y,traceXHR:b,trackFetchStreamPerformance:S,shouldCreateSpanForRequest:C,enableHTTPTimings:w,ignoreResourceSpans:T,ignorePerformanceApiSpans:E,instrumentPageLoad:D,instrumentNavigation:te,detectRedirects:ne,linkPreviousTrace:re,consistentTraceSampling:ie,enableReportPageLoaded:ae,onRequestSpanStart:O,onRequestSpanEnd:se}={...bd,...e},ce=yd(),ue,de;function fe(e,t,a=!0,o){let s=t.op===`pageload`,c=t.name,l=f?f(t):t,u=Pe(o||dt()),d={...u?.pathname&&{"url.path":u.pathname},...u&&!lt(u)&&{"url.full":u.href},...l.attributes};if(c!==l.name&&(d[Ae]=`custom`),l.attributes=d,!a){let e=le();r({...l,startTime:e}).end(e);return}n.name=l.name,n.source=d[Ae];let p=jt(l,{idleTimeout:m,finalTimeout:h,childSpanTimeout:g,disableAutoFinish:s,beforeSpanEnd:t=>{Mr(t,{ignoreResourceSpans:T,ignorePerformanceApiSpans:E,spanStreamingEnabled:oe(e)}),kd(e,void 0);let n=F(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:p.spanContext().traceId,sampled:ee(p),dsc:St(t)}),s&&(de=void 0)},trimIdleSpanEndTimestamp:!ae});s&&ae&&(de=p),kd(e,p);function _(){i&&[`interactive`,`complete`].includes(i.readyState)&&(e.emit(`idleSpanEnableAutoFinish`,p),i.removeEventListener(`readystatechange`,_))}s&&!ae&&i&&(i.addEventListener(`readystatechange`,_),_())}return{name:_d,setup(e){if(ce){xt&&j.log(`[Tracing] Skipping browserTracingIntegration setup for bot user agent.`);return}if(Tt(),s&&v.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes(`long-animation-frame`)?Er():o&&Tr(),c&&Dr(),ne&&i){let e=()=>{ue=Ye()};addEventListener(`click`,e,{capture:!0}),addEventListener(`keydown`,e,{capture:!0,passive:!0})}function n(){let t=Od(e);t&&!P(t).timestamp&&(xt&&j.log(`[Tracing] Finishing current active span with op: ${P(t).op}`),t.setAttribute(mt,`cancelled`),t.end())}e.on(`startNavigationSpan`,(t,r)=>{if(L()!==e)return;if(r?.isRedirect){xt&&j.warn(`[Tracing] Detected redirect, navigation span will not be the root span, but a child span.`),fe(e,{op:`navigation.redirect`,...t},!1,r.url);return}ue=void 0,n(),bt().setPropagationContext({traceId:p(),sampleRand:Math.random(),propagationSpanId:A()?void 0:ve()});let i=F();i.setPropagationContext({traceId:p(),sampleRand:Math.random(),propagationSpanId:A()?void 0:ve()}),i.setSDKProcessingMetadata({normalizedRequest:void 0}),fe(e,{op:`navigation`,...t,parentSpan:null,forceTransaction:!0},!0,r?.url)}),e.on(`startPageLoadSpan`,(r,i={})=>
10{if(L()!==e)return;n();let a=i.sentryTrace||wd(`sentry-trace`)||Td(`sentry-trace`),o=i.baggage||wd(`baggage`)||Td(`baggage`),s=ct(a,o),c=F();c.setPropagationContext(s),A()||(c.getPropagationContext().propagationSpanId=ve()),c.setSDKProcessingMetadata({normalizedRequest:t()}),fe(e,{op:`pageload`,...r})}),e.on(`endPageloadSpan`,()=>{ae&&de&&(de.setAttribute(mt,`reportPageLoaded`),de.end())})},afterAllSetup(e){if(ce)return;e.addIntegration&&!e.getIntegrationByName?.(`WebVitals`)&&e.addIntegration(cd({ignore:a?[]:[`inp`],_experiments:{enableStandaloneClsSpans:l,enableStandaloneLcpSpans:u}}));let t=dt();if(re!==`off`&&fd(e,{linkPreviousTrace:re,consistentTraceSampling:ie}),k.location){if(D){let t=d();Sd(e,{name:k.location.pathname,startTime:t?t/1e3:void 0,attributes:{[Ae]:`url`,[I]:`auto.pageload.browser`}})}te&&ye(({to:n,from:r})=>{if(r===void 0&&t?.indexOf(n)!==-1){t=void 0;return}t=void 0;let i=Pe(n),a=Od(e),o=a&&ne&&jd(a,ue);Cd(e,{name:i?.pathname||k.location.pathname,attributes:{[Ae]:`url`,[I]:`auto.navigation.browser`}},{url:n,isRedirect:o})})}_&&ld(),c&&Ed(e,m,h,g,n),Yu(e,{traceFetch:y,traceXHR:b,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:C,enableHTTPTimings:w,onRequestSpanStart:O,onRequestSpanEnd:se}),S&&e.addIntegration(od())}}});function Sd(e,t,n){e.emit(`startPageLoadSpan`,t,n),F().setTransactionName(t.name);let r=Od(e);return r&&e.emit(`afterStartPageLoadSpan`,r),r}function Cd(e,n,r){let{url:i,isRedirect:a}=r||{};e.emit(`beforeStartNavigationSpan`,n,{isRedirect:a,url:i}),e.emit(`startNavigationSpan`,n,{isRedirect:a,url:i});let o=F();return o.setTransactionName(n.name),i&&!a&&o.setSDKProcessingMetadata({normalizedRequest:{...t(),url:i}}),Od(e)}function wd(e){return(k.document?.querySelector(`meta[name=${e}]`))?.getAttribute(`content`)||void 0}function Td(e){return(k.performance?.getEntriesByType?.(`navigation`)[0])?.serverTiming?.find(t=>t.name===e)?.description}function Ed(e,t,n,r,i){let a=k.document,o;a&&addEventListener(`click`,()=>{let a=`ui.action.click`,s=Od(e);if(s){let e=P(s).op;if([`navigation`,`pageload`].includes(e)){xt&&j.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&=(o.setAttribute(mt,`interactionInterrupted`),o.end(),void 0),!i.name){xt&&j.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}o=jt({name:i.name,op:a,attributes:{[Ae]:i.source||`url`}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})},{capture:!0})}var Dd=`_sentry_idleSpan`;function Od(e){return e[Dd]}function kd(e,t){se(e,Dd,t)}var Ad=1.5;function jd(e,t){let n=P(e),r=le();return!(r-n.start_timestamp>Ad||t&&r-t<=Ad)}var Md=e(T()),Nd=`ui.react.render`,Pd=`ui.react.update`,Fd=`ui.react.mount`,Id=class extends Md.Component{constructor(e){super(e);let{name:t,disabled:n=!1}=this.props;n||(this._mountSpan=r({name:`<${t}>`,onlyIfParent:!0,op:Fd,attributes:{[I]:`auto.ui.react.profiler`,"ui.component_name":t}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:e,includeUpdates:t=!0}){if(t&&this._mountSpan&&e!==this.props.updateProps){let t=Object.keys(e).filter(t=>e[t]!==this.props.updateProps[t]);if(t.length>0){let e=Ye();this._updateSpan=Ke(this._mountSpan,()=>r({name:`<${this.props.name}>`,onlyIfParent:!0,op:Pd,startTime:e,attributes:{[I]:`auto.ui.react.profiler`,"ui.component_name":this.props.name,"ui.react.changed_props":t}}))}}return!0}componentDidUpdate(){this._updateSpan&&=(this._updateSpan.end(),void 0)}componentWillUnmount(){let e=Ye(),{name:t,includeRender:n=!0}=this.props;if(this._mountSpan&&n){let n=P(this._mountSpan).timestamp;Ke(this._mountSpan,()=>{let i=r({onlyIfParent:!0,name:`<${t}>`,op:Nd,startTime:n,attributes:{[I]:`auto.ui.react.profiler`,"ui.component_name":t}});i&&i.end(e)})}}render(){return this.props.children}};Object.assign(Id,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function Ld(e,t){let n=t?.name||e.displayName||e.name||`unknown`,r=r=>Md.createElement(Id,{...t,name:n,updateProps:r},Md.createElement(e,{...r}));return r.displayName=`profiler(${n})`,pe(r,e),r}var Rd=new WeakSet;k?.document?Md.useLayoutEffect:Md.useEffect;function zd(e,t){let n=xd({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:i,useNavigationType:a,createRoutesFromChildren:o,matchRoutes:s,stripBasename:c,enableAsyncRouteHandlers:l=!1,instrumentPageLoad:u=!0,instrumentNavigation:d=!0,lazyRouteTimeout:f,lazyRouteManifest:p}=e;return{...n,setup(t){n.setup(t);let r=e.finalTimeout??3e4,i=(e.idleTimeout??1e3)*3,a=f??i;a===1/0?ne&&j.log(`[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:`,r,`ms to prevent indefinite hangs`):Number.isNaN(a)?ne&&j.warn(`[React Router] lazyRouteTimeout must be a number, falling back to default:`,i):a<0&&ne&&j.warn(`[React Router] lazyRouteTimeout must be non-negative or Infinity, got:`,a,`falling back to:`,i)},afterAllSetup(e){n.afterAllSetup(e);let r=k.location?.pathname;u&&r&&Sd(e,{name:r,attributes:{[Ae]:`url`,[it]:`pageload`,[I]:`auto.pageload.react.reactrouter${t?`_v${t}`:``}`}}),d&&Rd.add(e)}}}function Bd(e){return zd(e,`6`)}var Vd=(...e)=>{typeof window<`u`&&(window.gtag===void 0&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),window.gtag(...e))},Hd=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function Ud(e){return e.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,(e,t,n)=>t>0&&t+e.length!==n.length&&e.search(Hd)>-1&&n.charAt(t-2)!==`:`&&(n.charAt(t+e.length)!==`-`||n.charAt(t-1)===`-`)&&n.charAt(t-1).search(/[^\s-]/)<0?e.toLowerCase():e.substr(1).search(/[A-Z]|\../)>-1?e:e.charAt(0).toUpperCase()+e.substr(1))}function Wd(e){return typeof e==`string`&&e.indexOf(`@`)!==-1}var Gd=`REDACTED (Potential Email Address)`;function Kd(e){return Wd(e)?(console.warn(`This arg looks like an email address, redacting.`),Gd):e}function qd(e=``,t=!0,n=!0){let r=e||``;return t&&(r=Ud(e)),n&&(r=Kd(r)),r}var Jd=new class{isInitialized;_testMode;_currentMeasurementId;_hasLoadedGA;_isQueuing;_queueGtag;constructor(){this.reset()}
10reset=()=>{this.isInitialized=!1,this._testMode=!1,this._currentMeasurementId=``,this._hasLoadedGA=!1,this._isQueuing=!1,this._queueGtag=[]};_gtag=(...e)=>{this._testMode||this._isQueuing?this._queueGtag.push(e):Vd(...e)};gtag(...e){this._gtag(...e)}_loadGA=(e,t,n=`https://www.googletagmanager.com/gtag/js`)=>{if(!(typeof window>`u`||typeof document>`u`)&&!this._hasLoadedGA){let r=document.createElement(`script`);r.async=!0,r.src=`${n}?id=${e}`,t&&r.setAttribute(`nonce`,t),document.body.appendChild(r),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},this._hasLoadedGA=!0}};_toGtagOptions=e=>{if(!e)return;let t={cookieUpdate:`cookie_update`,cookieExpires:`cookie_expires`,cookieDomain:`cookie_domain`,cookieFlags:`cookie_flags`,userId:`user_id`,clientId:`client_id`,anonymizeIp:`anonymize_ip`,contentGroup1:`content_group1`,contentGroup2:`content_group2`,contentGroup3:`content_group3`,contentGroup4:`content_group4`,contentGroup5:`content_group5`,allowAdFeatures:`allow_google_signals`,allowAdPersonalizationSignals:`allow_ad_personalization_signals`,nonInteraction:`non_interaction`,page:`page_path`,hitCallback:`event_callback`};return Object.entries(e).reduce((e,[n,r])=>(t[n]?e[t[n]]=r:e[n]=r,e),{})};initialize=(e,t={})=>{if(!e)throw Error(`Require GA_MEASUREMENT_ID`);let n=typeof e==`string`?[{trackingId:e}]:e;this._currentMeasurementId=n[0].trackingId;let{gaOptions:r,gtagOptions:i,nonce:a,testMode:o=!1,gtagUrl:s}=t;if(this._testMode=o,o||this._loadGA(this._currentMeasurementId,a,s),this.isInitialized||(this._gtag(`js`,new Date),n.forEach(e=>{let t={...this._toGtagOptions({...r,...e.gaOptions}),...i,...e.gtagOptions};Object.keys(t).length?this._gtag(`config`,e.trackingId,t):this._gtag(`config`,e.trackingId)})),this.isInitialized=!0,!o){let e=[...this._queueGtag];for(this._queueGtag=[],this._isQueuing=!1;e.length;){let t=e.shift();this._gtag(...t),t[0]===`get`&&(this._isQueuing=!0)}}};set=e=>{if(!e){console.warn("`fieldsObject` is required in .set()");return}if(typeof e!=`object`){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(e).length===0&&console.warn("empty `fieldsObject` given to .set()"),this._gaCommand(`set`,e)};_gaCommandSendEvent=(e,t,n,r,i)=>{this._gtag(`event`,t,{event_category:e,event_label:n,value:r,...i&&{non_interaction:i.nonInteraction},...this._toGtagOptions(i)})};_gaCommandSendEventParameters=(...e)=>{if(typeof e[0]==`string`)this._gaCommandSendEvent(...e.slice(1));else{let{eventCategory:t,eventAction:n,eventLabel:r,eventValue:i,hitType:a,...o}=e[0];this._gaCommandSendEvent(t,n,r,i,o)}};_gaCommandSendTiming=(e,t,n,r)=>{this._gtag(`event`,`timing_complete`,{name:t,value:n,event_category:e,event_label:r})};_gaCommandSendPageview=(e,t)=>{if(t&&Object.keys(t).length){let{title:n,location:r,...i}=this._toGtagOptions(t)||{};this._gtag(`event`,`page_view`,{...e&&{page_path:e},...n&&{page_title:n},...r&&{page_location:r},...i})}else e?this._gtag(`event`,`page_view`,{page_path:e}):this._gtag(`event`,`page_view`)};_gaCommandSendPageviewParameters=(...e)=>{if(typeof e[0]==`string`)this._gaCommandSendPageview(...e.slice(1));else{let{page:t,hitType:n,...r}=e[0];this._gaCommandSendPageview(t,r)}};_gaCommandSend=(...e)=>{let t=typeof e[0]==`string`?e[0]:e[0].hitType;switch(t){case`event`:this._gaCommandSendEventParameters(...e);break;case`pageview`:this._gaCommandSendPageviewParameters(...e);break;case`timing`:this._gaCommandSendTiming(...e.slice(1));break;case`screenview`:case`transaction`:case`item`:case`social`:case`exception`:console.warn(`Unsupported send command: ${t}`);break;default:console.warn(`Send command doesn't exist: ${t}`)}};_gaCommandSet=(...e)=>{typeof e[0]==`string`&&(e[0]={[e[0]]:e[1]}),this._gtag(`set`,this._toGtagOptions(e[0]))};_gaCommand=(e,...t)=>{switch(e){case`send`:this._gaCommandSend(...t);break;case`set`:this._gaCommandSet(...t);break;default:console.warn(`Command doesn't exist: ${e}`)}};ga=(...e)=>{if(typeof e[0]==`string`)this._gaCommand(...e);else{let[t]=e;this._gtag(`get`,this._currentMeasurementId,`client_id`,e=>{this._isQueuing=!1;let n=this._queueGtag;for(t({get:t=>t===`clientId`?e:t===`trackingId`?this._currentMeasurementId:t===`apiVersion`?`1`:void 0});n.length;){let e=n.shift();this._gtag(...e)}}),this._isQueuing=!0}return this.ga};event=(e,t)=>
10{if(typeof e==`string`)this._gtag(`event`,e,this._toGtagOptions(t));else{let{action:t,category:n,label:r,value:i,nonInteraction:a,transport:o}=e;if(!n||!t){console.warn(`args.category AND args.action are required in event()`);return}let s={hitType:`event`,eventCategory:qd(n),eventAction:qd(t)};r&&(s.eventLabel=qd(r)),i!==void 0&&(typeof i==`number`?s.eventValue=i:console.warn("Expected `args.value` arg to be a Number.")),a!==void 0&&(typeof a==`boolean`?s.nonInteraction=a:console.warn("`args.nonInteraction` must be a boolean.")),o!==void 0&&(typeof o==`string`?([`beacon`,`xhr`,`image`].indexOf(o)===-1&&console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),s.transport=o):console.warn("`args.transport` must be a string.")),this._gaCommand(`send`,s)}};send=e=>{this._gaCommand(`send`,e)}};function Yd(e){try{(function(e,t,n,r,i,a,o){t.getElementById(`clarity-script`)||(e[n]=e[n]||function(){(e[n].q=e[n].q||[]).push(arguments)},a=t.createElement(r),a.async=1,a.src=`https://www.clarity.ms/tag/`+i+`?ref=npm`,a.id=`clarity-script`,o=t.getElementsByTagName(r)[0],o.parentNode.insertBefore(a,o))})(window,document,`clarity`,`script`,e);return}catch{return}}var Xd={init(e){Yd(e,`clarity-script`)},setTag(e,t){window.clarity(`set`,e,t)},identify(e,t,n,r){window.clarity(`identify`,e,t,n,r)},consent(e=!0){window.clarity(`consent`,e)},consentV2(e={ad_Storage:`granted`,analytics_Storage:`granted`}){window.clarity(`consentv2`,e)},upgrade(e){window.clarity(`upgrade`,e)},event(e){window.clarity(`event`,e)}};export{xd as a,Ld as i,Jd as n,Bu as o,Bd as r,Xd as t}; 11//# sourceMappingURL=analytics-BG1MKP15.js.map 12//# debugId=f1e89328-68e4-593d-96b3-9240045dc692
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.