var BY=Object.defineProperty,HY=Object.defineProperties;var FY=Object.getOwnPropertyDescriptors;var Lp=Object.getOwnPropertySymbols;var ED=Object.prototype.hasOwnProperty,TD=Object.prototype.propertyIsEnumerable;var SD=(We,Ut,Vt)=>Ut in We?BY(We,Ut,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):We[Ut]=Vt,A=(We,Ut)=>{for(var Vt in Ut||(Ut={}))ED.call(Ut,Vt)&&SD(We,Vt,Ut[Vt]);if(Lp)for(var Vt of Lp(Ut))TD.call(Ut,Vt)&&SD(We,Vt,Ut[Vt]);return We},ee=(We,Ut)=>HY(We,FY(Ut));var no=(We,Ut)=>{var Vt={};for(var Cn in We)ED.call(We,Cn)&&Ut.indexOf(Cn)<0&&(Vt[Cn]=We[Cn]);if(We!=null&&Lp)for(var Cn of Lp(We))Ut.indexOf(Cn)<0&&TD.call(We,Cn)&&(Vt[Cn]=We[Cn]);return Vt};var _e=(We,Ut,Vt)=>new Promise((Cn,zr)=>{var ro=Ur=>{try{Wo(Vt.next(Ur))}catch(Yo){zr(Yo)}},Yl=Ur=>{try{Wo(Vt.throw(Ur))}catch(Yo){zr(Yo)}},Wo=Ur=>Ur.done?Cn(Ur.value):Promise.resolve(Ur.value).then(ro,Yl);Wo((Vt=Vt.apply(We,Ut)).next())});(function(){try{var We=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{};We.SENTRY_RELEASE={id:"5aab2d7dfd1139a006042cae0e56d5d53beba730"}}catch(Ut){}})();try{(function(){var We=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},Ut=new We.Error().stack;Ut&&(We._sentryDebugIds=We._sentryDebugIds||{},We._sentryDebugIds[Ut]="eb798489-c54f-487f-8d1e-0633d4bd5bd6",We._sentryDebugIdIdentifier="sentry-dbid-eb798489-c54f-487f-8d1e-0633d4bd5bd6")})()}catch(We){}(function(){try{var We=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{};We._sentryModuleMetadata=We._sentryModuleMetadata||{},We._sentryModuleMetadata[new We.Error().stack]=(function(Ut){for(var Vt=1;Vtr[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const Ut=(function(){const t=typeof document!="undefined"&&document.createElement("link").relList;return t&&t.supports&&t.supports("modulepreload")?"modulepreload":"preload"})(),Vt=function(e){return"/"+e},Cn={},zr=function(t,n,r){let a=Promise.resolve();function s(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return a.then(c=>{for(const f of c||[])f.status==="rejected"&&s(f.reason);return t().catch(s)})};let ro=null;const Yl=new Map,Wo=()=>ro||(ro=zr(()=>Promise.resolve().then(()=>oj),void 0).then(e=>{const t=e.default;return Yl.forEach((n,r)=>{t.setTag(r,n)}),Yl.clear(),t}).catch(e=>{throw console.error("Failed to load Sentry:",e),ro=null,e}),ro),Ur=[];let Yo=!1,zp=!1;function m0(e){Yo||(Ur.push({error:e}),CD())}function CD(){zp||(zp=!0,Wo().then(e=>{Yo=!0,window.removeEventListener("error",g0),window.removeEventListener("unhandledrejection",y0),Ur.forEach(t=>{e.captureException(t.error)}),Ur.length=0}).catch(()=>{zp=!1}))}const g0=e=>{m0(e.error||new Error(e.message))},y0=e=>{m0(e.reason)};window.addEventListener("error",g0),window.addEventListener("unhandledrejection",y0);const AD="PEANUT_FORM",v0="PEANUT_SCHEDULER",_0="PEANUT_RESCHEDULER",OD="PEANUT_MEETING_INDEX",Xl="NUTSHELL_BOOT",Kl="NUTSHELL_CHAT",RD="PEANUT_QUOTE",MD="PEANUT_QUOTE_DOWNLOAD",xD="'IBM Plex Sans', Trebuchet MS, sans-serif",Yu="nudgeShown",ID="https://agent.marketingcloudfx.com/mcfx.js",kD="boot",b0="chat",DD="aiChatbot",ND="forms",LD="scheduler",zD="quotes",UD="analytics";function Up(){try{return window.parent.location.href?window.parent.location:window.location}catch(e){return window.location}}function BD(e,t){var s;if(!window.location.search.includes("ns_is_embedded_preview=1"))return!1;const r=(s=document.querySelector(`#nutshell-boot-${e}`)||document.querySelector(`#nutshell-boot-${t}`))==null?void 0:s.getAttribute("previewType");return!(r==="preview-onboarding"||r==="preview-test")}function Xo(c){return _e(this,arguments,function*({instanceId:e,peanutSlug:t=null,peanutType:n,errorDescription:r,exception:a,isPreview:s}){let f;switch(n){case AD:f=s?"[PEANUT_FORM_PREVIEW]":"[PEANUT_FORM]";break;case v0:case _0:case OD:n===_0?f="[PEANUT_RESCHEDULER]":n===v0?f=s?"[PEANUT_SCHEDULER_PREVIEW]":"[PEANUT_SCHEDULER]":f="[PEANUT_MEETING_INDEX]";break;case Xl:f="[NUTSHELL_BOOT]";break;case Kl:f="[NUTSHELL_CHAT]";break;case RD:f="[PEANUT_QUOTE]";break;case MD:f="[PEANUT_QUOTE_DOWNLOAD]";break}try{const d=yield Wo();d.withScope(function(h){h.setLevel("error"),h.setTag("errorType",f),e&&h.setTag("instanceId",String(e)),n&&h.setTag("peanutType",String(n)),t&&h.setTag("peanutSlug",String(t)),s!==void 0&&h.setTag("isPreview",String(s));const g=a!=null?a:new Error(r||"Peanut error");d.captureException(g)})}catch(d){console.error("[Peanut Error]",f,r,d)}})}const Bp=()=>{const e=Up();return{"Peanut-Action-Requester-Url":e.href.replace(e.search,"")}},Jl=()=>"https://app.nutshell.com";function HD(e){const t=document.createElement("script");return t.setAttribute("id","analytics-script"),t.setAttribute("type","text/javascript"),t.text=` (function (w,d,o,a,m) { w[o]=w[o]||function(){(w[o].q=w[o].q||[]).push(arguments); },w[o].e=1*new Date();a=d.createElement('script'), m=d.getElementsByTagName('script')[0];a.async=1; a.src='${ID}';m.parentNode.insertBefore(a, m); })(window, document, 'mcfx'); mcfx('create', 'ns-${e}'); `,t}function FD(e){return e.includes("analytics")?"mcfx":"nutshell"}const S0="nutshell_use_esm";let Hp=null;const io=(e,t)=>{e.includes(t)||e.push(t)},PD=e=>{Hp=e;try{sessionStorage.setItem(S0,String(e))}catch(t){}},jD=()=>{try{const e=sessionStorage.getItem(S0);if(e!==null)return e==="true"}catch(e){}return null},E0=e=>{if(Hp!==null)return Hp;const t=jD();return t!==null?t:!1},qD=(e,t,n)=>(n!=null?n:E0())?`/${e}-esm.js`:`/${e}.js`,$D=()=>`${Date.now()}-${Math.random().toString(36).slice(2,9)}`,T0=(e,t,n,r,a)=>{const s=r.createElement("script"),c=a!=null?a:E0(),f=qD(e,t,c),d=$D();return s.id=`${e}-script-${d}`,s.type=c?"module":"text/javascript",s.src=c?`${n}${f}?id=${d}`:`${n}${f}`,s},Fp=(e,t,n)=>T0("peanut",e,t,document,n),VD=(e,t,n=document,r)=>T0("chat",e,t,n,r),GD=(e,t)=>{},QD=e=>{const{instanceId:t,target:n,renderTarget:r,loadedModules:a}=e,s=document.createElement("script");s.setAttribute("target",n),s.setAttribute("instance-id",t),s.setAttribute("id","chatbot-script"),s.setAttribute("type","text/javascript"),s.setAttribute("src","https://static.nlcdn.com/st-11053/chatbot.js"),r.appendChild(s),io(a,DD)},WD=e=>{const{instanceId:t,form:n,target:r,defaultValues:a={},renderTarget:s,loadedModules:c}=e,d=Fp(!1,"https://static.nlcdn.com/st-11053");d.setAttribute("target",r),d.setAttribute("instance-id",t),d.setAttribute("form-id",n),d.setAttribute("defaultValues",JSON.stringify(a)),s.appendChild(d),io(c,ND)},YD=e=>{const{instanceId:t,quoteSlug:n,action:r,target:a,renderTarget:s,loadedModules:c}=e,d=Fp(!1,"https://static.nlcdn.com/st-11053");d.setAttribute("target",a),d.setAttribute("instance-id",t),d.setAttribute("quote-slug",n),r&&d.setAttribute("action",r),s.appendChild(d),io(c,zD)},XD=e=>{const{instanceId:t,target:n,meeting:r,bookingSlug:a,meetingIndexUserId:s,action:c,renderTarget:f,loadedModules:d}=e,g=Fp(!1,"https://static.nlcdn.com/st-11053");g.setAttribute("target",n),g.setAttribute("instance-id",t),r&&g.setAttribute("meeting-id",r),a&&g.setAttribute("booking-slug",a),s&&g.setAttribute("meeting-index-user-id",s),c&&g.setAttribute("action",c),f.appendChild(g),io(d,LD)},KD="nstestautomation",JD="nsuser";function ZD(){return!!w0()}function eN(){try{return new URLSearchParams(window.location.search).get(JD)}catch(e){return null}}function w0(){try{return new URLSearchParams(window.location.search).get(KD)}catch(e){return null}}function tN(e,t){return _e(this,null,function*(){const n=Jl(),r=encodeURIComponent(window.location.href),a=eN(),s=w0();if(!(!a||!s))try{const c=new URLSearchParams(ee(A({},e?{instanceId:e}:t?{siteId:t}:{}),{userApiId:a,maUrlId:s,pageUrl:r})),f=`${n}/boot/test-page-view?${c.toString()}`;yield fetch(f,{method:"POST",headers:A({"Content-Type":"application/json"},Bp())})}catch(c){}})}(function(e){e()})(function(){const e=()=>{const t=window.Nutsheller.q||[],n=window.Nutsheller.loadedModules||[];window.Nutsheller=(...r)=>{((a=[])=>{const[s,...c]=a,f=c[0]?c[0]:{},{instance:d,siteId:h,excludedModules:g=[]}=f;if(!d&&!h)throw new Error("Instance or site id is required.");try{const{target:m}=f;if(!m)throw new Error("Target is required.");const v=document.getElementById(m);if(!v)throw new Error("Valid target is required.");switch(s){case"initForm":{if(!d)throw new Error("Instance id is required.");const{form:_}=f;if(!_)throw new Error("Form id is required.");WD({instanceId:d,form:_,target:m,defaultValues:f.defaultValues||{},renderTarget:v,loadedModules:n});break}case"initScheduler":{if(!d)throw new Error("Instance id is required.");const{meeting:_,bookingSlug:S,meetingIndexUserId:E,action:w}=f;if(!(_||S||E||w))throw new Error("Scheduler identifier or action is required.");XD({instanceId:d,target:m,meeting:_,bookingSlug:S,meetingIndexUserId:E,action:w,renderTarget:v,loadedModules:n});break}case"boot":{if(ZD()&&tN(d,h),BD(d,h))break;zr(()=>Promise.resolve().then(()=>C2),void 0).then(_=>_.initializeBoot({instanceId:d,siteId:h,target:m,excludedModules:g,loadedModules:n})).catch(()=>{Xo({instanceId:d||h||"",peanutType:Xl,errorDescription:"Error during boot initialization"})});break}case"initQuotes":{const{quoteSlug:_,action:S}=f;if(!_)throw new Error("Quote slug is required.");YD({instanceId:d||"",quoteSlug:_,action:S,target:m,renderTarget:v,loadedModules:n});break}case"initAiChatbot":{if(!d)throw new Error("Instance id is required.");const{promptData:_}=f;QD({instanceId:d,target:m,promptData:_,renderTarget:v,loadedModules:n});break}default:throw new Error("Invalid task for nutsheller.")}}catch(m){Xo({instanceId:d,peanutType:Xl,errorDescription:"General nutsheller error"})}})(r)},t.forEach(r=>{window.Nutsheller.apply(null,Array.from(r))}),window.Nutsheller.loadedModules=n,typeof performance!="undefined"&&performance.mark&&performance.mark("nutsheller-initialized")};document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)});const me=typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__,ke=globalThis,_i="10.19.0";function bi(){return Xu(ke),ke}function Xu(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||_i,t[_i]=t[_i]||{}}function Ko(e,t,n=ke){const r=n.__SENTRY__=n.__SENTRY__||{},a=r[_i]=r[_i]||{};return a[e]||(a[e]=t())}const Pp=["debug","info","warn","error","log","assert","trace"],nN="Sentry Logger ",Zl={};function Si(e){if(!("console"in ke))return e();const t=ke.console,n={},r=Object.keys(Zl);r.forEach(a=>{const s=Zl[a];n[a]=t[a],t[a]=s});try{return e()}finally{r.forEach(a=>{t[a]=n[a]})}}function rN(){qp().enabled=!0}function iN(){qp().enabled=!1}function C0(){return qp().enabled}function aN(...e){jp("log",...e)}function oN(...e){jp("warn",...e)}function sN(...e){jp("error",...e)}function jp(e,...t){me&&C0()&&Si(()=>{ke.console[e](`${nN}[${e}]:`,...t)})}function qp(){return me?Ko("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Y={enable:rN,disable:iN,isEnabled:C0,log:aN,warn:oN,error:sN},A0=50,ri="?",O0=/\(error: (.*)\)/,R0=/captureMessage|captureException/;function M0(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,a=0)=>{const s=[],c=n.split(` `);for(let f=r;f1024&&(d=d.slice(0,1024));const h=O0.test(d)?d.replace(O0,"$1"):d;if(!h.match(/\S*Error: /)){for(const g of t){const m=g(h);if(m){s.push(m);break}}if(s.length>=A0+a)break}}return cN(s.slice(a))}}function uN(e){return Array.isArray(e)?M0(...e):e}function cN(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(ef(t).function||"")&&t.pop(),t.reverse(),R0.test(ef(t).function||"")&&(t.pop(),R0.test(ef(t).function||"")&&t.pop()),t.slice(0,A0).map(n=>ee(A({},n),{filename:n.filename||ef(t).filename,function:n.function||ri}))}function ef(e){return e[e.length-1]||{}}const $p="";function Ei(e){try{return!e||typeof e!="function"?$p:e.name||$p}catch(t){return $p}}function Vp(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch(r){return}}}const tf={},x0={};function ra(e,t){tf[e]=tf[e]||[],tf[e].push(t)}function ia(e,t){if(!x0[e]){x0[e]=!0;try{t()}catch(n){me&&Y.error(`Error while instrumenting ${e}`,n)}}}function gr(e,t){const n=e&&tf[e];if(n)for(const r of n)try{r(t)}catch(a){me&&Y.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${Ei(r)} Error:`,a)}}let Gp=null;function I0(e){const t="error";ra(t,e),ia(t,lN)}function lN(){Gp=ke.onerror,ke.onerror=function(e,t,n,r,a){return gr("error",{column:r,error:a,line:n,msg:e,url:t}),Gp?Gp.apply(this,arguments):!1},ke.onerror.__SENTRY_INSTRUMENTED__=!0}let Qp=null;function k0(e){const t="unhandledrejection";ra(t,e),ia(t,fN)}function fN(){Qp=ke.onunhandledrejection,ke.onunhandledrejection=function(e){return gr("unhandledrejection",e),Qp?Qp.apply(this,arguments):!0},ke.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const D0=Object.prototype.toString;function Ti(e){switch(D0.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ci(e,Error)}}function Jo(e,t){return D0.call(e)===`[object ${t}]`}function N0(e){return Jo(e,"ErrorEvent")}function L0(e){return Jo(e,"DOMError")}function dN(e){return Jo(e,"DOMException")}function Br(e){return Jo(e,"String")}function nf(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Zo(e){return e===null||nf(e)||typeof e!="object"&&typeof e!="function"}function wi(e){return Jo(e,"Object")}function rf(e){return typeof Event!="undefined"&&Ci(e,Event)}function hN(e){return typeof Element!="undefined"&&Ci(e,Element)}function pN(e){return Jo(e,"RegExp")}function ao(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function mN(e){return wi(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Ci(e,t){try{return e instanceof t}catch(n){return!1}}function z0(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function U0(e){return typeof Request!="undefined"&&Ci(e,Request)}const Wp=ke,gN=80;function yr(e,t={}){if(!e)return"";try{let n=e;const r=5,a=[];let s=0,c=0;const f=" > ",d=f.length;let h;const g=Array.isArray(t)?t:t.keyAttrs,m=!Array.isArray(t)&&t.maxStringLength||gN;for(;n&&s++1&&c+a.length*d+h.length>=m));)a.push(h),c+=h.length,n=n.parentNode;return a.reverse().join(f)}catch(n){return""}}function yN(e,t){const n=e,r=[];if(!(n!=null&&n.tagName))return"";if(Wp.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const a=t!=null&&t.length?t.filter(c=>n.getAttribute(c)).map(c=>[c,n.getAttribute(c)]):null;if(a!=null&&a.length)a.forEach(c=>{r.push(`[${c[0]}="${c[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const c=n.className;if(c&&Br(c)){const f=c.split(/\s+/);for(const d of f)r.push(`.${d}`)}}const s=["aria-label","type","name","title","alt"];for(const c of s){const f=n.getAttribute(c);f&&r.push(`[${c}="${f}"]`)}return r.join("")}function oo(){try{return Wp.document.location.href}catch(e){return""}}function B0(e){if(!Wp.HTMLElement)return null;let t=e;const n=5;for(let r=0;rr&&(t=r);let a=Math.max(t-60,0);a<5&&(a=0);let s=Math.min(a+140,r);return s>r-5&&(s=r),s===r&&(a=Math.max(s-140,0)),n=n.slice(a,s),a>0&&(n=`'{snip} ${n}`),sof(e,r,n))}function Fn(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const a=n(r);typeof a=="function"&&H0(a,r);try{e[t]=a}catch(s){me&&Y.log(`Failed to replace method "${t}" in object`,e)}}function An(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(r){me&&Y.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function H0(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,An(e,"__sentry_original__",t)}catch(n){}}function Xp(e){return e.__sentry_original__}function F0(e){if(Ti(e))return A({message:e.message,name:e.name,stack:e.stack},j0(e));if(rf(e)){const t=A({type:e.type,target:P0(e.target),currentTarget:P0(e.currentTarget)},j0(e));return typeof CustomEvent!="undefined"&&Ci(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function P0(e){try{return hN(e)?yr(e):Object.prototype.toString.call(e)}catch(t){return""}}function j0(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function vN(e,t=40){const n=Object.keys(F0(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return es(r,t);for(let a=n.length;a>0;a--){const s=n.slice(0,a).join(", ");if(!(s.length>t))return a===n.length?s:es(s,t)}return""}function _N(){const e=ke;return e.crypto||e.msCrypto}function Pn(e=_N()){let t=()=>Math.random()*16;try{if(e!=null&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e!=null&&e.getRandomValues&&(t=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch(n){}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function q0(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function so(e){const{message:t,event_id:n}=e;if(t)return t;const r=q0(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Kp(e,t,n){const r=e.exception=e.exception||{},a=r.values=r.values||[],s=a[0]=a[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function Ai(e,t){const n=q0(e);if(!n)return;const r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism=A(A(A({},r),a),t),t&&"data"in t){const s=A(A({},a==null?void 0:a.data),t.data);n.mechanism.data=s}}function bN(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,a=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,a-n),a).map(c=>Yp(c,0));const s=Math.min(r-1,a);t.context_line=Yp(e[s],t.colno||0),t.post_context=e.slice(Math.min(a+1,r),a+1+n).map(c=>Yp(c,0))}function $0(e){if(SN(e))return!0;try{An(e,"__sentry_captured__",!0)}catch(t){}return!1}function SN(e){try{return e.__sentry_captured__}catch(t){}}const V0=1e3;function uo(){return Date.now()/V0}function EN(){const{performance:e}=ke;if(!(e!=null&&e.now)||!e.timeOrigin)return uo;const t=e.timeOrigin;return()=>(t+e.now())/V0}let sf;function Bt(){return(sf!=null?sf:sf=EN())()}let Jp;function TN(){var g;const{performance:e}=ke;if(!(e!=null&&e.now))return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=aAN(n)};return e&&ts(n,e),n}function ts(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Bt(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Pn()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function CN(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),ts(e,n)}function AN(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Ku(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r=A({},e);for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=Ku(r[a],t[a],n-1));return r}function ii(){return Pn()}function Oi(){return Pn().substring(16)}const Zp="_sentrySpan";function Ri(e,t){t?An(e,Zp,t):delete e[Zp]}function ns(e){return e[Zp]}const ON=100;class Fr{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ii(),sampleRand:Math.random()}}clone(){const t=new Fr;return t._breadcrumbs=[...this._breadcrumbs],t._tags=A({},this._tags),t._extra=A({},this._extra),t._contexts=A({},this._contexts),this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata=A({},this._sdkProcessingMetadata),t._propagationContext=A({},this._propagationContext),t._client=this._client,t._lastEventId=this._lastEventId,Ri(t,ns(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&ts(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags=A(A({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,n){return this._tags=ee(A({},this._tags),{[t]:n}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=A(A({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,n){return this._extra=ee(A({},this._extra),{[t]:n}),this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof Fr?n.getScopeData():wi(n)?t:void 0,{tags:a,extra:s,user:c,contexts:f,level:d,fingerprint:h=[],propagationContext:g}=r||{};return this._tags=A(A({},this._tags),a),this._extra=A(A({},this._extra),s),this._contexts=A(A({},this._contexts),f),c&&Object.keys(c).length&&(this._user=c),d&&(this._level=d),h.length&&(this._fingerprint=h),g&&(this._propagationContext=g),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,Ri(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ii(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var s;const r=typeof n=="number"?n:ON;if(r<=0)return this;const a=ee(A({timestamp:uo()},t),{message:t.message?es(t.message,2048):t.message});return this._breadcrumbs.push(a),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(s=this._client)==null||s.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:ns(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Ku(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=(n==null?void 0:n.event_id)||Pn();if(!this._client)return me&&Y.warn("No client configured on scope - will not capture exception!"),r;const a=new Error("Sentry syntheticException");return this._client.captureException(t,ee(A({originalException:t,syntheticException:a},n),{event_id:r}),this),r}captureMessage(t,n,r){const a=(r==null?void 0:r.event_id)||Pn();if(!this._client)return me&&Y.warn("No client configured on scope - will not capture message!"),a;const s=new Error(t);return this._client.captureMessage(t,n,ee(A({originalException:t,syntheticException:s},r),{event_id:a}),this),a}captureEvent(t,n){const r=(n==null?void 0:n.event_id)||Pn();return this._client?(this._client.captureEvent(t,ee(A({},n),{event_id:r}),this),r):(me&&Y.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function RN(){return Ko("defaultCurrentScope",()=>new Fr)}function MN(){return Ko("defaultIsolationScope",()=>new Fr)}class xN{constructor(t,n){let r;t?r=t:r=new Fr;let a;n?a=n:a=new Fr,this._stack=[{scope:r}],this._isolationScope=a}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(a){throw this._popScope(),a}return ao(r)?r.then(a=>(this._popScope(),a),a=>{throw this._popScope(),a}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function rs(){const e=bi(),t=Xu(e);return t.stack=t.stack||new xN(RN(),MN())}function IN(e){return rs().withScope(e)}function kN(e,t){const n=rs();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function G0(e){return rs().withScope(()=>e(rs().getIsolationScope()))}function DN(){return{withIsolationScope:G0,withScope:IN,withSetScope:kN,withSetIsolationScope:(e,t)=>G0(t),getCurrentScope:()=>rs().getScope(),getIsolationScope:()=>rs().getIsolationScope()}}function aa(e){const t=Xu(e);return t.acs?t.acs:DN()}function Ue(){const e=bi();return aa(e).getCurrentScope()}function cn(){const e=bi();return aa(e).getIsolationScope()}function is(){return Ko("globalScope",()=>new Fr)}function Wn(...e){const t=bi(),n=aa(t);if(e.length===2){const[r,a]=e;return r?n.withSetScope(r,a):n.withScope(a)}return n.withScope(e[0])}function NN(...e){const t=bi(),n=aa(t);if(e.length===2){const[r,a]=e;return r?n.withSetIsolationScope(r,a):n.withIsolationScope(a)}return n.withIsolationScope(e[0])}function ye(){return Ue().getClient()}function Q0(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:a}=t,s={trace_id:n,span_id:a||Oi()};return r&&(s.parent_span_id=r),s}const jt="sentry.source",uf="sentry.sample_rate",W0="sentry.previous_trace_sample_rate",rn="sentry.op",Ze="sentry.origin",Ju="sentry.idle_span_finish_reason",Zu="sentry.measurement_unit",ec="sentry.measurement_value",em="sentry.custom_span_name",tm="sentry.profile_id",as="sentry.exclusive_time",LN="http.request.method",zN="url.full",UN="sentry.link.type",BN=0,nm=1,Xt=2;function Y0(e){if(e<400&&e>=100)return{code:nm};if(e>=400&&e<500)switch(e){case 401:return{code:Xt,message:"unauthenticated"};case 403:return{code:Xt,message:"permission_denied"};case 404:return{code:Xt,message:"not_found"};case 409:return{code:Xt,message:"already_exists"};case 413:return{code:Xt,message:"failed_precondition"};case 429:return{code:Xt,message:"resource_exhausted"};case 499:return{code:Xt,message:"cancelled"};default:return{code:Xt,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Xt,message:"unimplemented"};case 503:return{code:Xt,message:"unavailable"};case 504:return{code:Xt,message:"deadline_exceeded"};default:return{code:Xt,message:"internal_error"}}return{code:Xt,message:"unknown_error"}}function tc(e,t){e.setAttribute("http.response.status_code",t);const n=Y0(t);n.message!=="unknown_error"&&e.setStatus(n)}const X0="_sentryScope",K0="_sentryIsolationScope";function HN(e){try{const t=ke.WeakRef;if(typeof t=="function")return new t(e)}catch(t){}return e}function FN(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch(t){return}return e}}function PN(e,t,n){e&&(An(e,K0,HN(n)),An(e,X0,t))}function cf(e){const t=e;return{scope:t[X0],isolationScope:FN(t[K0])}}const rm="sentry-",jN=/^sentry-/,qN=8192;function im(e){const t=$N(e);if(!t)return;const n=Object.entries(t).reduce((r,[a,s])=>{if(a.match(jN)){const c=a.slice(rm.length);r[c]=s}return r},{});if(Object.keys(n).length>0)return n}function J0(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,a])=>(a&&(n[`${rm}${r}`]=a),n),{});return VN(t)}function $N(e){if(!(!e||!Br(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=Z0(n);return Object.entries(r).forEach(([a,s])=>{t[a]=s}),t},{}):Z0(e)}function Z0(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),a=t.slice(n+1);return[r,a].map(s=>{try{return decodeURIComponent(s.trim())}catch(c){return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function VN(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],a)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,c=a===0?s:`${t},${s}`;return c.length>qN?(me&&Y.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):c},"")}const GN=/^o(\d+)\./,QN=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function WN(e){return e==="http"||e==="https"}function oa(e,t=!1){const{host:n,path:r,pass:a,port:s,projectId:c,protocol:f,publicKey:d}=e;return`${f}://${d}${t&&a?`:${a}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${c}`}function eS(e){const t=QN.exec(e);if(!t){Si(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,a="",s="",c="",f=""]=t.slice(1);let d="",h=f;const g=h.split("/");if(g.length>1&&(d=g.slice(0,-1).join("/"),h=g.pop()),h){const m=h.match(/^\d+/);m&&(h=m[0])}return tS({host:s,pass:a,path:d,projectId:h,port:c,protocol:n,publicKey:r})}function tS(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function YN(e){if(!me)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(c=>e[c]?!1:(Y.error(`Invalid Sentry Dsn: ${c} missing`),!0))?!1:n.match(/^\d+$/)?WN(r)?t&&isNaN(parseInt(t,10))?(Y.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Y.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Y.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function XN(e){const t=e.match(GN);return t==null?void 0:t[1]}function nS(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=XN(n)),r}function rS(e){const t=typeof e=="string"?eS(e):tS(e);if(!(!t||!YN(t)))return t}function co(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const iS=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function KN(e){if(!e)return;const t=e.match(iS);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function aS(e,t){const n=KN(e),r=im(t);if(!(n!=null&&n.traceId))return{traceId:ii(),sampleRand:Math.random()};const a=JN(n,r);r&&(r.sample_rand=a.toString());const{traceId:s,parentSpanId:c,parentSampled:f}=n;return{traceId:s,parentSpanId:c,sampled:f,dsc:r||{},sampleRand:a}}function oS(e=ii(),t=Oi(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function sS(e=ii(),t=Oi(),n){return`00-${e}-${t}-${n?"01":"00"}`}function JN(e,t){const n=co(t==null?void 0:t.sample_rand);if(n!==void 0)return n;const r=co(t==null?void 0:t.sample_rate);return r&&(e==null?void 0:e.parentSampled)!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}function ZN(e,t){const n=nS(e);return t&&n&&t!==n?(Y.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!n||!t&&n)?(Y.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}const uS=0,am=1;let cS=!1;function e5(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:a,parent_span_id:s,status:c,origin:f,links:d}=Me(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:a,status:c,origin:f,links:d}}function lS(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),a=r?t:Me(e).parent_span_id,s=cf(e).scope,c=r?(s==null?void 0:s.getPropagationContext().propagationSpanId)||Oi():t;return{parent_span_id:a,span_id:c,trace_id:n}}function fS(e){const{traceId:t,spanId:n}=e.spanContext(),r=sa(e);return oS(t,n,r)}function t5(e){const{traceId:t,spanId:n}=e.spanContext(),r=sa(e);return sS(t,n,r)}function dS(e){if(e&&e.length>0)return e.map(c=>{var f=c,{context:d}=f,h=d,{spanId:t,traceId:n,traceFlags:r}=h,a=no(h,["spanId","traceId","traceFlags"]),{attributes:s}=f;return A({span_id:t,trace_id:n,sampled:r===am,attributes:s},a)})}function lo(e){return typeof e=="number"?hS(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?hS(e.getTime()):Bt()}function hS(e){return e>9999999999?e/1e3:e}function Me(e){var r;if(r5(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(n5(e)){const{attributes:a,startTime:s,name:c,endTime:f,status:d,links:h}=e,g="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?(r=e.parentSpanContext)==null?void 0:r.spanId:void 0;return{span_id:t,trace_id:n,data:a,description:c,parent_span_id:g,start_timestamp:lo(s),timestamp:lo(f)||void 0,status:pS(d),op:a[rn],origin:a[Ze],links:dS(h)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function n5(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function r5(e){return typeof e.getSpanJSON=="function"}function sa(e){const{traceFlags:t}=e.spanContext();return t===am}function pS(e){if(!(!e||e.code===BN))return e.code===nm?"ok":e.message||"unknown_error"}const fo="_sentryChildSpans",om="_sentryRootSpan";function mS(e,t){const n=e[om]||e;An(t,om,n),e[fo]?e[fo].add(t):An(e,fo,new Set([t]))}function i5(e,t){e[fo]&&e[fo].delete(t)}function nc(e){const t=new Set;function n(r){if(!t.has(r)&&sa(r)){t.add(r);const a=r[fo]?Array.from(r[fo]):[];for(const s of a)n(s)}}return n(e),Array.from(t)}function an(e){return e[om]||e}function Qt(){const e=bi(),t=aa(e);return t.getActiveSpan?t.getActiveSpan():ns(Ue())}function sm(){cS||(Si(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),cS=!0)}function a5(e,t){e.updateName(t),e.setAttributes({[jt]:"custom",[em]:t})}let gS=!1;function yS(){if(gS)return;function e(){const t=Qt(),n=t&&an(t);if(n){const r="internal_error";me&&Y.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:Xt,message:r})}}e.tag="sentry_tracingErrorCallback",gS=!0,I0(e),k0(e)}function Pr(e){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((n=ye())==null?void 0:n.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function vS(e){Y.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function lf(e,t){if(!(t!=null&&t.length)||!e.description)return!1;for(const n of t){if(s5(n)){if(of(e.description,n))return me&&vS(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?of(e.description,n.name):!0,a=n.op?e.op&&of(e.op,n.op):!0;if(r&&a)return me&&vS(e),!0}return!1}function o5(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const a of e)a.parent_span_id===r&&(a.parent_span_id=n)}function s5(e){return typeof e=="string"||e instanceof RegExp}const ff="production",_S="_frozenDsc";function df(e,t){An(e,_S,t)}function bS(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},a={environment:n.environment||ff,release:n.release,public_key:r,trace_id:e,org_id:nS(t)};return t.emit("createDsc",a),a}function um(e,t){const n=t.getPropagationContext();return n.dsc||bS(n.traceId,e)}function jr(e){var S,E,w,T;const t=ye();if(!t)return{};const n=an(e),r=Me(n),a=r.data,s=n.spanContext().traceState,c=(E=(S=s==null?void 0:s.get("sentry.sample_rate"))!=null?S:a[uf])!=null?E:a[W0];function f(O){return(typeof c=="number"||typeof c=="string")&&(O.sample_rate=`${c}`),O}const d=n[_S];if(d)return f(d);const h=s==null?void 0:s.get("sentry.dsc"),g=h&&im(h);if(g)return f(g);const m=bS(e.spanContext().traceId,t),v=a[jt],_=r.description;return v!=="url"&&_&&(m.transaction=_),Pr()&&(m.sampled=String(sa(n)),m.sample_rand=(T=s==null?void 0:s.get("sentry.sample_rand"))!=null?T:(w=cf(n).scope)==null?void 0:w.getPropagationContext().sampleRand.toString()),f(m),t.emit("createDsc",m,n),m}function u5(e){const t=jr(e);return J0(t)}class Mi{constructor(t={}){this._traceId=t.traceId||ii(),this._spanId=t.spanId||Oi()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:uS}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function ar(e,t=100,n=1/0){try{return cm("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function SS(e,t=3,n=100*1024){const r=ar(e,t);return d5(r)>n?SS(e,t-1,n):r}function cm(e,t,n=1/0,r=1/0,a=h5()){const[s,c]=a;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const f=c5(e,t);if(!f.startsWith("[object "))return f;if(t.__sentry_skip_normalization__)return t;const d=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(d===0)return f.replace("object ","");if(s(t))return"[Circular ~]";const h=t;if(h&&typeof h.toJSON=="function")try{const _=h.toJSON();return cm("",_,d-1,r,a)}catch(_){}const g=Array.isArray(t)?[]:{};let m=0;const v=F0(t);for(const _ in v){if(!Object.prototype.hasOwnProperty.call(v,_))continue;if(m>=r){g[_]="[MaxProperties ~]";break}const S=v[_];g[_]=cm(_,S,d-1,r,a),m++}return c(t),g}function c5(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global!="undefined"&&t===global)return"[Global]";if(typeof window!="undefined"&&t===window)return"[Window]";if(typeof document!="undefined"&&t===document)return"[Document]";if(z0(t))return"[VueViewModel]";if(mN(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Ei(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=l5(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function l5(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function f5(e){return~-encodeURI(e).split(/%..|./).length}function d5(e){return f5(JSON.stringify(e))}function h5(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function ai(e,t=[]){return[e,t]}function p5(e,t){const[n,r]=e;return[n,[...r,t]]}function ho(e,t){const n=e[1];for(const r of n){const a=r[0].type;if(t(r,a))return!0}return!1}function ES(e,t){return ho(e,(n,r)=>t.includes(r))}function hf(e){const t=Xu(ke);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function m5(e){const t=Xu(ke);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function pf(e){const[t,n]=e;let r=JSON.stringify(t);function a(s){typeof r=="string"?r=typeof s=="string"?r+s:[hf(r),s]:r.push(typeof s=="string"?hf(s):s)}for(const s of n){const[c,f]=s;if(a(` ${JSON.stringify(c)} `),typeof f=="string"||f instanceof Uint8Array)a(f);else{let d;try{d=JSON.stringify(f)}catch(h){d=JSON.stringify(ar(f))}a(d)}}return typeof r=="string"?r:g5(r)}function g5(e){const t=e.reduce((a,s)=>a+s.length,0),n=new Uint8Array(t);let r=0;for(const a of e)n.set(a,r),r+=a.length;return n}function y5(e){let t=typeof e=="string"?hf(e):e;function n(c){const f=t.subarray(0,c);return t=t.subarray(c+1),f}function r(){let c=t.indexOf(10);return c<0&&(c=t.length),JSON.parse(m5(n(c)))}const a=r(),s=[];for(;t.length;){const c=r(),f=typeof c.length=="number"?c.length:void 0;s.push([c,f?n(f):r()])}return[a,s]}function v5(e){return[{type:"span"},e]}function _5(e){const t=typeof e.data=="string"?hf(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const b5={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function TS(e){return b5[e]}function lm(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function wS(e,t,n,r){var s;const a=(s=e.sdkProcessingMetadata)==null?void 0:s.dynamicSamplingContext;return A(A(A({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:oa(r)}),a&&{trace:a})}function S5(e,t){var r,a,s,c;if(!t)return e;const n=e.sdk||{};return e.sdk=ee(A({},n),{name:n.name||t.name,version:n.version||t.version,integrations:[...((r=e.sdk)==null?void 0:r.integrations)||[],...t.integrations||[]],packages:[...((a=e.sdk)==null?void 0:a.packages)||[],...t.packages||[]],settings:(s=e.sdk)!=null&&s.settings||t.settings?A(A({},(c=e.sdk)==null?void 0:c.settings),t.settings):void 0}),e}function E5(e,t,n,r){const a=lm(n),s=A(A({sent_at:new Date().toISOString()},a&&{sdk:a}),!!r&&t&&{dsn:oa(t)}),c="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ai(s,[c])}function T5(e,t,n,r){const a=lm(n),s=e.type&&e.type!=="replay_event"?e.type:"event";S5(e,n==null?void 0:n.sdk);const c=wS(e,a,r,t);return delete e.sdkProcessingMetadata,ai(c,[[{type:s},e]])}function w5(e,t){function n(_){return!!_.trace_id&&!!_.public_key}const r=jr(e[0]),a=t==null?void 0:t.getDsn(),s=t==null?void 0:t.getOptions().tunnel,c=A(A({sent_at:new Date().toISOString()},n(r)&&{trace:r}),!!s&&a&&{dsn:oa(a)}),{beforeSendSpan:f,ignoreSpans:d}=(t==null?void 0:t.getOptions())||{},h=d!=null&&d.length?e.filter(_=>!lf(Me(_),d)):e,g=e.length-h.length;g&&(t==null||t.recordDroppedEvent("before_send","span",g));const m=f?_=>{const S=Me(_),E=f(S);return E||(sm(),S)}:Me,v=[];for(const _ of h){const S=m(_);S&&v.push(v5(S))}return ai(c,v)}function C5(e){if(!me)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Me(e),{spanId:a}=e.spanContext(),s=sa(e),c=an(e),f=c===e,d=`[Tracing] Starting ${s?"sampled":"unsampled"} ${f?"root ":""}span`,h=[`op: ${n}`,`name: ${t}`,`ID: ${a}`];if(r&&h.push(`parent ID: ${r}`),!f){const{op:g,description:m}=Me(c);h.push(`root ID: ${c.spanContext().spanId}`),g&&h.push(`root op: ${g}`),m&&h.push(`root description: ${m}`)}Y.log(`${d} ${h.join(` `)}`)}function A5(e){if(!me)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Me(e),{spanId:r}=e.spanContext(),s=an(e)===e,c=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${t}" with ID ${r}`;Y.log(c)}function CS(e,t,n,r=Qt()){const a=r&&an(r);a&&(me&&Y.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),a.addEvent(e,{[ec]:t,[Zu]:n}))}function AS(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},a=r[Zu],s=r[ec];typeof a=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:a})}),t}const OS=1e3;class mf{constructor(t={}){this._traceId=t.traceId||ii(),this._spanId=t.spanId||Oi(),this._startTime=t.startTimestamp||Bt(),this._links=t.links,this._attributes={},this.setAttributes(A({[Ze]:"manual",[rn]:t.op},t.attributes)),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?am:uS}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=lo(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(jt,"custom"),this}end(t){this._endTime||(this._endTime=lo(t),A5(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[rn],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:pS(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Ze],profile_id:this._attributes[tm],exclusive_time:this._attributes[as],measurements:AS(this._events),is_segment:this._isStandaloneSpan&&an(this)===this||void 0,segment_id:this._isStandaloneSpan?an(this).spanContext().spanId:void 0,links:dS(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){me&&Y.log("[Tracing] Adding an event to span:",t);const a=RS(n)?n:r||Bt(),s=RS(n)?{}:n||{},c={name:t,time:lo(a),attributes:s};return this._events.push(c),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=ye();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===an(this)))return;if(this._isStandaloneSpan){this._sampled?R5(w5([this],t)):(me&&Y.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(cf(this).scope||Ue()).captureEvent(r)}_convertSpanToTransaction(){var g;if(!MS(Me(this)))return;this._name||(me&&Y.warn("Transaction has no name, falling back to ``."),this._name="");const{scope:t,isolationScope:n}=cf(this),r=(g=t==null?void 0:t.getScopeData().sdkProcessingMetadata)==null?void 0:g.normalizedRequest;if(this._sampled!==!0)return;const s=nc(this).filter(m=>m!==this&&!O5(m)).map(m=>Me(m)).filter(MS),c=this._attributes[jt];delete this._attributes[em],s.forEach(m=>{delete m.data[em]});const f=A({contexts:{trace:e5(this)},spans:s.length>OS?s.sort((m,v)=>m.start_timestamp-v.start_timestamp).slice(0,OS):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:jr(this)},request:r},c&&{transaction_info:{source:c}}),d=AS(this._events);return d&&Object.keys(d).length&&(me&&Y.log("[Measurements] Adding measurements to transaction event",JSON.stringify(d,void 0,2)),f.measurements=d),f}}function RS(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function MS(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function O5(e){return e instanceof mf&&e.isStandaloneSpan()}function R5(e){const t=ye();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function xS(e,t,n=()=>{},r=()=>{}){let a;try{a=e()}catch(s){throw t(s),n(),s}return M5(a,t,n,r)}function M5(e,t,n,r){return ao(e)?e.then(a=>(n(),r(a),a),a=>{throw t(a),n(),a}):(n(),r(e),e)}function x5(e,t,n){if(!Pr(e))return[!1];let r,a;typeof e.tracesSampler=="function"?(a=e.tracesSampler(ee(A({},t),{inheritOrSampleWith:f=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):f})),r=!0):t.parentSampled!==void 0?a=t.parentSampled:typeof e.tracesSampleRate!="undefined"&&(a=e.tracesSampleRate,r=!0);const s=co(a);if(s===void 0)return me&&Y.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(a)} of type ${JSON.stringify(typeof a)}.`),[!1];if(!s)return me&&Y.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,s,r];const c=nNS(s)(()=>{const h=Ue(),g=hm(h,s),v=e.onlyIfParent&&!g?new Mi:fm({parentSpan:g,spanArguments:r,forceTransaction:a,scope:h});return Ri(h,v),xS(()=>t(v),()=>{const{status:_}=Me(v);v.isRecording()&&(!_||_==="ok")&&v.setStatus({code:Xt,message:"internal_error"})},()=>{v.end()})}))}function I5(e,t){const n=rc();if(n.startSpanManual)return n.startSpanManual(e,t);const r=dm(e),{forceTransaction:a,parentSpan:s,scope:c}=e,f=c==null?void 0:c.clone();return Wn(f,()=>NS(s)(()=>{const h=Ue(),g=hm(h,s),v=e.onlyIfParent&&!g?new Mi:fm({parentSpan:g,spanArguments:r,forceTransaction:a,scope:h});return Ri(h,v),xS(()=>t(v,()=>v.end()),()=>{const{status:_}=Me(v);v.isRecording()&&(!_||_==="ok")&&v.setStatus({code:Xt,message:"internal_error"})})}))}function vr(e){const t=rc();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=dm(e),{forceTransaction:r,parentSpan:a}=e;return(e.scope?c=>Wn(e.scope,c):a!==void 0?c=>po(a,c):c=>c())(()=>{const c=Ue(),f=hm(c,a);return e.onlyIfParent&&!f?new Mi:fm({parentSpan:f,spanArguments:n,forceTransaction:r,scope:c})})}const k5=(e,t)=>{const n=bi(),r=aa(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:a,baggage:s}=e,c=ye(),f=im(s);return c&&!ZN(c,f==null?void 0:f.org_id)?kS(t):Wn(d=>{const h=aS(a,s);return d.setPropagationContext(h),t()})};function po(e,t){const n=rc();return n.withActiveSpan?n.withActiveSpan(e,t):Wn(r=>(Ri(r,e||void 0),t(r)))}function IS(e){const t=rc();return t.suppressTracing?t.suppressTracing(e):Wn(n=>{n.setSDKProcessingMetadata({[gf]:!0});const r=e();return n.setSDKProcessingMetadata({[gf]:void 0}),r})}function kS(e){return Wn(t=>(t.setPropagationContext({traceId:ii(),sampleRand:Math.random()}),me&&Y.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),po(null,e)))}function fm({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Pr()){const c=new Mi;if(n||!e){const f=A({sampled:"false",sample_rate:"0",transaction:t.name},jr(c));df(c,f)}return c}const a=cn();let s;if(e&&!n)s=D5(e,r,t),mS(e,s);else if(e){const c=jr(e),{traceId:f,spanId:d}=e.spanContext(),h=sa(e);s=DS(A({traceId:f,parentSpanId:d},t),r,h),df(s,c)}else{const{traceId:c,dsc:f,parentSpanId:d,sampled:h}=A(A({},a.getPropagationContext()),r.getPropagationContext());s=DS(A({traceId:c,parentSpanId:d},t),r,h),f&&df(s,f)}return C5(s),PN(s,r,a),s}function dm(e){const t=e.experimental||{},n=A({isStandalone:t.standalone},e);if(e.startTime){const r=A({},n);return r.startTimestamp=lo(e.startTime),delete r.startTime,r}return n}function rc(){const e=bi();return aa(e)}function DS(e,t,n){var S,E;const r=ye(),a=(r==null?void 0:r.getOptions())||{},{name:s=""}=e,c={spanAttributes:A({},e.attributes),spanName:s,parentSampled:n};r==null||r.emit("beforeSampling",c,{decision:!1});const f=(S=c.parentSampled)!=null?S:n,d=c.spanAttributes,h=t.getPropagationContext(),[g,m,v]=t.getScopeData().sdkProcessingMetadata[gf]?[!1]:x5(a,{name:s,parentSampled:f,attributes:d,parentSampleRate:co((E=h.dsc)==null?void 0:E.sample_rate)},h.sampleRand),_=new mf(ee(A({},e),{attributes:A({[jt]:"custom",[uf]:m!==void 0&&v?m:void 0},d),sampled:g}));return!g&&r&&(me&&Y.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",_),_}function D5(e,t,n){const{spanId:r,traceId:a}=e.spanContext(),s=t.getScopeData().sdkProcessingMetadata[gf]?!1:sa(e),c=s?new mf(ee(A({},n),{parentSpanId:r,traceId:a,sampled:s})):new Mi({traceId:a});mS(e,c);const f=ye();return f&&(f.emit("spanStart",c),n.endTimestamp&&f.emit("spanEnd",c)),c}function hm(e,t){if(t)return t;if(t===null)return;const n=ns(e);if(!n)return;const r=ye();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?an(n):n}function NS(e){return e!==void 0?t=>po(e,t):t=>t()}const vf={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},N5="heartbeatFailed",L5="idleTimeout",z5="finalTimeout",U5="externalFinish";function LS(e,t={}){const n=new Map;let r=!1,a,s=U5,c=!t.disableAutoFinish;const f=[],{idleTimeout:d=vf.idleTimeout,finalTimeout:h=vf.finalTimeout,childSpanTimeout:g=vf.childSpanTimeout,beforeSpanEnd:m,trimIdleSpanEndTimestamp:v=!0}=t,_=ye();if(!_||!Pr()){const D=new Mi,G=A({sample_rate:"0",sampled:"false"},jr(D));return df(D,G),D}const S=Ue(),E=Qt(),w=B5(e);w.end=new Proxy(w.end,{apply(D,G,V){if(m&&m(w),G instanceof Mi)return;const[ae,...he]=V,te=ae||Bt(),X=lo(te),pe=nc(w).filter(fe=>fe!==w),ce=Me(w);if(!pe.length||!v)return L(X),Reflect.apply(D,G,[X,...he]);const H=_.getOptions().ignoreSpans,P=pe==null?void 0:pe.reduce((fe,k)=>{const q=Me(k);return!q.timestamp||H&&lf(q,H)?fe:fe?Math.max(fe,q.timestamp):q.timestamp},void 0),oe=ce.start_timestamp,re=Math.min(oe?oe+h/1e3:1/0,Math.max(oe||-1/0,Math.min(X,P||1/0)));return L(re),Reflect.apply(D,G,[re,...he])}});function T(){a&&(clearTimeout(a),a=void 0)}function O(D){T(),a=setTimeout(()=>{!r&&n.size===0&&c&&(s=L5,w.end(D))},d)}function x(D){a=setTimeout(()=>{!r&&c&&(s=N5,w.end(D))},g)}function I(D){T(),n.set(D,!0);const G=Bt();x(G+g/1e3)}function M(D){if(n.has(D)&&n.delete(D),n.size===0){const G=Bt();O(G+d/1e3)}}function L(D){r=!0,n.clear(),f.forEach(X=>X()),Ri(S,E);const G=Me(w),{start_timestamp:V}=G;if(!V)return;G.data[Ju]||w.setAttribute(Ju,s),Y.log(`[Tracing] Idle span "${G.op}" finished`);const he=nc(w).filter(X=>X!==w);let te=0;he.forEach(X=>{X.isRecording()&&(X.setStatus({code:Xt,message:"cancelled"}),X.end(D),me&&Y.log("[Tracing] Cancelling span since span ended early",JSON.stringify(X,void 0,2)));const pe=Me(X),{timestamp:ce=0,start_timestamp:H=0}=pe,P=H<=D,oe=(h+d)/1e3,re=ce-H<=oe;if(me){const fe=JSON.stringify(X,void 0,2);P?re||Y.log("[Tracing] Discarding span since it finished after idle span final timeout",fe):Y.log("[Tracing] Discarding span since it happened after idle span was finished",fe)}(!re||!P)&&(i5(w,X),te++)}),te>0&&w.setAttribute("sentry.idle_span_discarded_spans",te)}return f.push(_.on("spanStart",D=>{if(r||D===w||Me(D).timestamp||D instanceof mf&&D.isStandaloneSpan())return;nc(w).includes(D)&&I(D.spanContext().spanId)})),f.push(_.on("spanEnd",D=>{r||M(D.spanContext().spanId)})),f.push(_.on("idleSpanEnableAutoFinish",D=>{D===w&&(c=!0,O(),n.size&&x())})),t.disableAutoFinish||O(),setTimeout(()=>{r||(w.setStatus({code:Xt,message:"deadline_exceeded"}),s=z5,w.end())},h),w}function B5(e){const t=vr(e);return Ri(Ue(),t),me&&Y.log("[Tracing] Started span is an idle span"),t}const pm=0,zS=1,US=2;function _f(e){return new ic(t=>{t(e)})}function mm(e){return new ic((t,n)=>{n(e)})}class ic{constructor(t){this._state=pm,this._handlers=[],this._runExecutor(t)}then(t,n){return new ic((r,a)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(c){a(c)}},s=>{if(!n)a(s);else try{r(n(s))}catch(c){a(c)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new ic((n,r)=>{let a,s;return this.then(c=>{s=!1,a=c,t&&t()},c=>{s=!0,a=c,t&&t()}).then(()=>{if(s){r(a);return}n(a)})})}_executeHandlers(){if(this._state===pm)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===zS&&n[1](this._value),this._state===US&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,c)=>{if(this._state===pm){if(ao(c)){c.then(r,a);return}this._state=s,this._value=c,this._executeHandlers()}},r=s=>{n(zS,s)},a=s=>{n(US,s)};try{t(r,a)}catch(s){a(s)}}}function H5(e,t,n,r=0){try{const a=gm(t,n,e,r);return ao(a)?a:_f(a)}catch(a){return mm(a)}}function gm(e,t,n,r){const a=n[r];if(!e||!a)return e;const s=a(A({},e),t);return me&&s===null&&Y.log(`Event processor "${a.id||"?"}" dropped event`),ao(s)?s.then(c=>gm(c,t,n,r+1)):gm(s,t,n,r+1)}function F5(e,t){const{fingerprint:n,span:r,breadcrumbs:a,sdkProcessingMetadata:s}=t;P5(e,t),r&&$5(e,r),V5(e,n),j5(e,a),q5(e,s)}function os(e,t){const{extra:n,tags:r,user:a,contexts:s,level:c,sdkProcessingMetadata:f,breadcrumbs:d,fingerprint:h,eventProcessors:g,attachments:m,propagationContext:v,transactionName:_,span:S}=t;bf(e,"extra",n),bf(e,"tags",r),bf(e,"user",a),bf(e,"contexts",s),e.sdkProcessingMetadata=Ku(e.sdkProcessingMetadata,f,2),c&&(e.level=c),_&&(e.transactionName=_),S&&(e.span=S),d.length&&(e.breadcrumbs=[...e.breadcrumbs,...d]),h.length&&(e.fingerprint=[...e.fingerprint,...h]),g.length&&(e.eventProcessors=[...e.eventProcessors,...g]),m.length&&(e.attachments=[...e.attachments,...m]),e.propagationContext=A(A({},e.propagationContext),v)}function bf(e,t,n){e[t]=Ku(e[t],n,1)}function P5(e,t){const{extra:n,tags:r,user:a,contexts:s,level:c,transactionName:f}=t;Object.keys(n).length&&(e.extra=A(A({},n),e.extra)),Object.keys(r).length&&(e.tags=A(A({},r),e.tags)),Object.keys(a).length&&(e.user=A(A({},a),e.user)),Object.keys(s).length&&(e.contexts=A(A({},s),e.contexts)),c&&(e.level=c),f&&e.type!=="transaction"&&(e.transaction=f)}function j5(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function q5(e,t){e.sdkProcessingMetadata=A(A({},e.sdkProcessingMetadata),t)}function $5(e,t){e.contexts=A({trace:lS(t)},e.contexts),e.sdkProcessingMetadata=A({dynamicSamplingContext:jr(t)},e.sdkProcessingMetadata);const n=an(t),r=Me(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function V5(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}let Sf,BS,Ef;function HS(e){const t=ke._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return Ef&&n.length===BS||(BS=n.length,Ef=n.reduce((r,a)=>{Sf||(Sf={});const s=Sf[a];if(s)r[s[0]]=s[1];else{const c=e(a);for(let f=c.length-1;f>=0;f--){const d=c[f],h=d==null?void 0:d.filename,g=t[a];if(h&&g){r[h]=g,Sf[a]=[h,g];break}}}return r},{})),Ef}function G5(e,t){const n=HS(e);if(!n)return[];const r=[];for(const a of t)a&&n[a]&&r.push({type:"sourcemap",code_file:a,debug_id:n[a]});return r}function FS(e,t,n,r,a,s){const{normalizeDepth:c=3,normalizeMaxBreadth:f=1e3}=e,d=ee(A({},t),{event_id:t.event_id||n.event_id||Pn(),timestamp:t.timestamp||uo()}),h=n.integrations||e.integrations.map(w=>w.name);Q5(d,e),X5(d,h),a&&a.emit("applyFrameMetadata",t),t.type===void 0&&W5(d,e.stackParser);const g=J5(r,n.captureContext);n.mechanism&&Ai(d,n.mechanism);const m=a?a.getEventProcessors():[],v=is().getScopeData();if(s){const w=s.getScopeData();os(v,w)}if(g){const w=g.getScopeData();os(v,w)}const _=[...n.attachments||[],...v.attachments];_.length&&(n.attachments=_),F5(d,v);const S=[...m,...v.eventProcessors];return H5(S,d,n).then(w=>(w&&Y5(w),typeof c=="number"&&c>0?K5(w,c,f):w))}function Q5(e,t){const{environment:n,release:r,dist:a,maxValueLength:s=250}=t;e.environment=e.environment||n||ff,!e.release&&r&&(e.release=r),!e.dist&&a&&(e.dist=a);const c=e.request;c!=null&&c.url&&(c.url=es(c.url,s))}function W5(e,t){var r,a;const n=HS(t);(a=(r=e.exception)==null?void 0:r.values)==null||a.forEach(s=>{var c,f;(f=(c=s.stacktrace)==null?void 0:c.frames)==null||f.forEach(d=>{d.filename&&(d.debug_id=n[d.filename])})})}function Y5(e){var r,a;const t={};if((a=(r=e.exception)==null?void 0:r.values)==null||a.forEach(s=>{var c,f;(f=(c=s.stacktrace)==null?void 0:c.frames)==null||f.forEach(d=>{d.debug_id&&(d.abs_path?t[d.abs_path]=d.debug_id:d.filename&&(t[d.filename]=d.debug_id),delete d.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([s,c])=>{n.push({type:"sourcemap",code_file:s,debug_id:c})})}function X5(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function K5(e,t,n){var a,s;if(!e)return null;const r=A(A(A(A(A({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(c=>A(A({},c),c.data&&{data:ar(c.data,t,n)}))}),e.user&&{user:ar(e.user,t,n)}),e.contexts&&{contexts:ar(e.contexts,t,n)}),e.extra&&{extra:ar(e.extra,t,n)});return(a=e.contexts)!=null&&a.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ar(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(c=>A(A({},c),c.data&&{data:ar(c.data,t,n)}))),(s=e.contexts)!=null&&s.flags&&r.contexts&&(r.contexts.flags=ar(e.contexts.flags,3,n)),r}function J5(e,t){if(!t)return e;const n=e?e.clone():new Fr;return n.update(t),n}function Z5(e){if(e)return e3(e)?{captureContext:e}:n3(e)?{captureContext:e}:e}function e3(e){return e instanceof Fr||typeof e=="function"}const t3=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function n3(e){return Object.keys(e).some(t=>t3.includes(t))}function ua(e,t){return Ue().captureException(e,Z5(t))}function Tf(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return Ue().captureMessage(e,n,r)}function ac(e,t){return Ue().captureEvent(e,t)}function ym(e,t){cn().setContext(e,t)}function r3(e){cn().setExtras(e)}function i3(e,t){cn().setExtra(e,t)}function a3(e){cn().setTags(e)}function o3(e,t){cn().setTag(e,t)}function s3(e){cn().setUser(e)}function PS(){return cn().lastEventId()}function u3(e){return _e(this,null,function*(){const t=ye();return t?t.flush(e):(me&&Y.warn("Cannot flush events. No client defined."),Promise.resolve(!1))})}function c3(e){return _e(this,null,function*(){const t=ye();return t?t.close(e):(me&&Y.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))})}function l3(){return!!ye()}function jS(){const e=ye();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function qS(e){cn().addEventProcessor(e)}function vm(e){const t=cn(),n=Ue(),{userAgent:r}=ke.navigator||{},a=wN(A(A({user:n.getUser()||t.getUser()},r&&{userAgent:r}),e)),s=t.getSession();return(s==null?void 0:s.status)==="ok"&&ts(s,{status:"exited"}),_m(),t.setSession(a),a}function _m(){const e=cn(),n=Ue().getSession()||e.getSession();n&&CN(n),$S(),e.setSession()}function $S(){const e=cn(),t=ye(),n=e.getSession();n&&t&&t.captureSession(n)}function bm(e=!1){if(e){_m();return}$S()}const f3="7";function VS(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function d3(e){return`${VS(e)}${e.projectId}/envelope/`}function h3(e,t){const n={sentry_version:f3};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function GS(e,t,n){return t||`${d3(e)}?${h3(e,n)}`}function p3(e,t){const n=rS(e);if(!n)return"";const r=`${VS(n)}embed/error-page/`;let a=`dsn=${oa(n)}`;for(const s in t)if(s!=="dsn"&&s!=="onClose")if(s==="user"){const c=t.user;if(!c)continue;c.name&&(a+=`&name=${encodeURIComponent(c.name)}`),c.email&&(a+=`&email=${encodeURIComponent(c.email)}`)}else a+=`&${encodeURIComponent(s)}=${encodeURIComponent(t[s])}`;return`${r}?${a}`}const QS=[];function m3(e){const t={};return e.forEach(n=>{const{name:r}=n,a=t[r];a&&!a.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function g3(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(a=>{a.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const a=n(t);r=Array.isArray(a)?a:[a]}else r=t;return m3(r)}function y3(e,t){const n={};return t.forEach(r=>{r&&YS(e,r,n)}),n}function WS(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function YS(e,t,n){if(n[t.name]){me&&Y.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,QS.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),QS.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(a,s)=>r(a,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),a=Object.assign((s,c)=>r(s,c,e),{id:t.name});e.addEventProcessor(a)}me&&Y.log(`Integration installed: ${t.name}`)}function Sm(e){const t=ye();if(!t){me&&Y.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function PY(e){return e}function v3(e,t,n){const r=[{type:"client_report"},{timestamp:uo(),discarded_events:e}];return ai(t?{dsn:t}:{},[r])}function XS(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch(n){}return t}function _3(e){var d,h,g;const{trace_id:t,parent_span_id:n,span_id:r,status:a,origin:s,data:c,op:f}=(h=(d=e.contexts)==null?void 0:d.trace)!=null?h:{};return{data:c!=null?c:{},description:e.transaction,op:f,parent_span_id:n,span_id:r!=null?r:"",start_timestamp:(g=e.start_timestamp)!=null?g:0,status:a,timestamp:e.timestamp,trace_id:t!=null?t:"",origin:s,profile_id:c==null?void 0:c[tm],exclusive_time:c==null?void 0:c[as],measurements:e.measurements,is_segment:!0}}function b3(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:A(A(A({},e.data),e.profile_id&&{[tm]:e.profile_id}),e.exclusive_time&&{[as]:e.exclusive_time})}},measurements:e.measurements}}const KS="Not capturing exception because it's already been captured.",JS="Discarded session because of missing or non-string release",ZS=Symbol.for("SentryInternalError"),eE=Symbol.for("SentryDoNotSendEventError");function wf(e){return{message:e,[ZS]:!0}}function Em(e){return{message:e,[eE]:!0}}function tE(e){return!!e&&typeof e=="object"&&ZS in e}function nE(e){return!!e&&typeof e=="object"&&eE in e}class S3{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=rS(t.dsn):me&&Y.warn("No DSN provided, client will not send events."),this._dsn){const n=GS(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport(ee(A({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{url:n}))}}captureException(t,n,r){const a=Pn();if($0(t))return me&&Y.log(KS),a;const s=A({event_id:a},n);return this._process(this.eventFromException(t,s).then(c=>this._captureEvent(c,s,r))),s.event_id}captureMessage(t,n,r,a){const s=A({event_id:Pn()},r),c=nf(t)?t:String(t),f=Zo(t)?this.eventFromMessage(c,n,s):this.eventFromException(t,s);return this._process(f.then(d=>this._captureEvent(d,s,a))),s.event_id}captureEvent(t,n,r){const a=Pn();if(n!=null&&n.originalException&&$0(n.originalException))return me&&Y.log(KS),a;const s=A({event_id:a},n),c=t.sdkProcessingMetadata||{},f=c.capturedSpanScope,d=c.capturedSpanIsolationScope;return this._process(this._captureEvent(t,s,f||r,d)),s.event_id}captureSession(t){this.sendSession(t),ts(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){return _e(this,null,function*(){const n=this._transport;if(!n)return!0;this.emit("flush");const r=yield this._isClientDoneProcessing(t),a=yield n.flush(t);return r&&a})}close(t){return _e(this,null,function*(){const n=yield this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n})}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];YS(this,t,this._integrations),n||WS(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=T5(t,this._dsn,this._options._metadata,this._options.tunnel);for(const a of n.attachments||[])r=p5(r,_5(a));this.sendEnvelope(r).then(a=>this.emit("afterSendEvent",t,a))}sendSession(t){const{release:n,environment:r=ff}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){me&&Y.warn(JS);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){me&&Y.warn(JS);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const a=E5(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(a)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const a=`${t}:${n}`;me&&Y.log(`Recording outcome: "${a}"${r>1?` (${r} times)`:""}`),this._outcomes[a]=(this._outcomes[a]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,a=(...s)=>n(...s);return r.add(a),()=>{r.delete(a)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(a=>a(...n))}sendEnvelope(t){return _e(this,null,function*(){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return yield this._transport.send(t)}catch(n){return me&&Y.error("Error while sending envelope:",n),{}}return me&&Y.error("Transport disabled"),{}})}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=y3(this,t),WS(this,t)}_updateSessionFromEvent(t,n){var d;let r=n.level==="fatal",a=!1;const s=(d=n.exception)==null?void 0:d.values;if(s){a=!0;for(const h of s){const g=h.mechanism;if((g==null?void 0:g.handled)===!1){r=!0;break}}}const c=t.status==="ok";(c&&t.errors===0||c&&r)&&(ts(t,ee(A({},r&&{status:"crashed"}),{errors:t.errors||Number(a||r)})),this.captureSession(t))}_isClientDoneProcessing(t){return _e(this,null,function*(){let n=0;for(;!t||nsetTimeout(r,1)),!this._numProcessing)return!0;n++}return!1})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,a){const s=this.getOptions(),c=Object.keys(this._integrations);return!n.integrations&&(c!=null&&c.length)&&(n.integrations=c),this.emit("preprocessEvent",t,n),t.type||a.setLastEventId(t.event_id||n.event_id),FS(s,t,n,r,this,a).then(f=>{if(f===null)return f;this.emit("postprocessEvent",f,n),f.contexts=A({trace:Q0(r)},f.contexts);const d=um(this,r);return f.sdkProcessingMetadata=A({dynamicSamplingContext:d},f.sdkProcessingMetadata),f})}_captureEvent(t,n={},r=Ue(),a=cn()){return me&&Tm(t)&&Y.log(`Captured error event \`${XS(t)[0]||""}\``),this._processEvent(t,n,r,a).then(s=>s.event_id,s=>{me&&(nE(s)?Y.log(s.message):tE(s)?Y.warn(s.message):Y.warn(s))})}_processEvent(t,n,r,a){const s=this.getOptions(),{sampleRate:c}=s,f=rE(t),d=Tm(t),h=t.type||"error",g=`before send for type \`${h}\``,m=typeof c=="undefined"?void 0:co(c);if(d&&typeof m=="number"&&Math.random()>m)return this.recordDroppedEvent("sample_rate","error"),mm(Em(`Discarding event because it's not included in the random sample (sampling rate = ${c})`));const v=h==="replay_event"?"replay":h;return this._prepareEvent(t,n,r,a).then(_=>{if(_===null)throw this.recordDroppedEvent("event_processor",v),Em("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return _;const E=T3(this,s,_,n);return E3(E,g)}).then(_=>{var w;if(_===null){if(this.recordDroppedEvent("before_send",v),f){const O=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",O)}throw Em(`${g} returned \`null\`, will not send event.`)}const S=r.getSession()||a.getSession();if(d&&S&&this._updateSessionFromEvent(S,_),f){const T=((w=_.sdkProcessingMetadata)==null?void 0:w.spanCountBeforeProcessing)||0,O=_.spans?_.spans.length:0,x=T-O;x>0&&this.recordDroppedEvent("before_send","span",x)}const E=_.transaction_info;if(f&&E&&_.transaction!==t.transaction){const T="custom";_.transaction_info=ee(A({},E),{source:T})}return this.sendEvent(_,n),_}).then(null,_=>{throw nE(_)||tE(_)?_:(this.captureException(_,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:_}),wf(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${_}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[a,s]=n.split(":");return{reason:a,category:s,quantity:r}})}_flushOutcomes(){me&&Y.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){me&&Y.log("No outcomes to send");return}if(!this._dsn){me&&Y.log("No dsn provided, will not send outcomes");return}me&&Y.log("Sending outcomes:",t);const n=v3(t,this._options.tunnel&&oa(this._dsn));this.sendEnvelope(n)}}function E3(e,t){const n=`${t} must return \`null\` or a valid event.`;if(ao(e))return e.then(r=>{if(!wi(r)&&r!==null)throw wf(n);return r},r=>{throw wf(`${t} rejected with ${r}`)});if(!wi(e)&&e!==null)throw wf(n);return e}function T3(e,t,n,r){const{beforeSend:a,beforeSendTransaction:s,beforeSendSpan:c,ignoreSpans:f}=t;let d=n;if(Tm(d)&&a)return a(d,r);if(rE(d)){if(c||f){const h=_3(d);if(f!=null&&f.length&&lf(h,f))return null;if(c){const g=c(h);g?d=Ku(n,b3(g)):sm()}if(d.spans){const g=[],m=d.spans;for(const _ of m){if(f!=null&&f.length&&lf(_,f)){o5(m,_);continue}if(c){const S=c(_);S?g.push(S):(sm(),g.push(_))}else g.push(_)}const v=d.spans.length-g.length;v&&e.recordDroppedEvent("before_send","span",v),d.spans=g}}if(s){if(d.spans){const h=d.spans.length;d.sdkProcessingMetadata=ee(A({},n.sdkProcessingMetadata),{spanCountBeforeProcessing:h})}return s(d,r)}}return d}function Tm(e){return e.type===void 0}function rE(e){return e.type==="transaction"}function iE(e,t){return t?Wn(t,()=>{const n=Qt(),r=n?lS(n):Q0(t);return[n?jr(n):um(e,t),r]}):[void 0,void 0]}const w3={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function C3(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function A3(e,t,n,r){const a={};return t!=null&&t.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=oa(r)),ai(a,[C3(e)])}const O3=100;function R3(e){var t;switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let n="";try{n=(t=JSON.stringify(e))!=null?t:""}catch(r){}return{value:n,type:"string"}}}}function oi(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function M3(e,t){const n=wm(),r=aE(e);r===void 0?n.set(e,[t]):(n.set(e,[...r,t]),r.length>=O3&&Af(e,r))}function Cf(e,t=Ue(),n=M3){var ae,he,te;const r=(ae=t==null?void 0:t.getClient())!=null?ae:ye();if(!r){me&&Y.warn("No client available to capture log.");return}const{release:a,environment:s,enableLogs:c=!1,beforeSendLog:f}=r.getOptions();if(!c){me&&Y.warn("logging option not enabled, log will not be captured.");return}const[,d]=iE(r,t),h=A({},e.attributes),{user:{id:g,email:m,username:v}}=x3(t);oi(h,"user.id",g,!1),oi(h,"user.email",m,!1),oi(h,"user.name",v,!1),oi(h,"sentry.release",a),oi(h,"sentry.environment",s);const{name:_,version:S}=(te=(he=r.getSdkMetadata())==null?void 0:he.sdk)!=null?te:{};oi(h,"sentry.sdk.name",_),oi(h,"sentry.sdk.version",S);const E=r.getIntegrationByName("Replay"),w=E==null?void 0:E.getReplayId(!0);oi(h,"sentry.replay_id",w),w&&(E==null?void 0:E.getRecordingMode())==="buffer"&&oi(h,"sentry._internal.replay_is_buffering",!0);const T=e.message;if(nf(T)){const{__sentry_template_string__:X,__sentry_template_values__:pe=[]}=T;pe!=null&&pe.length&&(h["sentry.message.template"]=X),pe.forEach((ce,H)=>{h[`sentry.message.parameter.${H}`]=ce})}const O=ns(t);oi(h,"sentry.trace.parent_span_id",O==null?void 0:O.spanContext().spanId);const x=ee(A({},e),{attributes:h});r.emit("beforeCaptureLog",x);const I=f?Si(()=>f(x)):x;if(!I){r.recordDroppedEvent("before_send","log_item",1),me&&Y.warn("beforeSendLog returned null, log will not be captured.");return}const{level:M,message:L,attributes:D={},severityNumber:G}=I,V={timestamp:Bt(),level:M,body:L,trace_id:d==null?void 0:d.trace_id,severity_number:G!=null?G:w3[M],attributes:Object.keys(D).reduce((X,pe)=>(X[pe]=R3(D[pe]),X),{})};n(r,V),r.emit("afterCaptureLog",I)}function Af(e,t){var s;const n=(s=t!=null?t:aE(e))!=null?s:[];if(n.length===0)return;const r=e.getOptions(),a=A3(n,r._metadata,r.tunnel,e.getDsn());wm().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(a)}function aE(e){return wm().get(e)}function x3(e){const t=is().getScopeData();return os(t,cn().getScopeData()),os(t,e.getScopeData()),t}function wm(){return Ko("clientToLogBufferMap",()=>new WeakMap)}function I3(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function k3(e,t,n,r){const a={};return t!=null&&t.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=oa(r)),ai(a,[I3(e)])}const D3=100;function N3(e){var t;switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let n="";try{n=(t=JSON.stringify(e))!=null?t:""}catch(r){}return{value:n,type:"string"}}}}function xi(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function L3(e,t){const n=Cm(),r=oE(e);r===void 0?n.set(e,[t]):(n.set(e,[...r,t]),r.length>=D3&&Of(e,r))}function z3(e,t){var G,V,ae,he,te;const n=(G=t==null?void 0:t.scope)!=null?G:Ue(),r=(V=t==null?void 0:t.captureSerializedMetric)!=null?V:L3,a=(ae=n==null?void 0:n.getClient())!=null?ae:ye();if(!a){me&&Y.warn("No client available to capture metric.");return}const{release:s,environment:c,_experiments:f}=a.getOptions();if(!(f!=null&&f.enableMetrics)){me&&Y.warn("metrics option not enabled, metric will not be captured.");return}const[,d]=iE(a,n),h=A({},e.attributes),{user:{id:g,email:m,username:v}}=U3(n);xi(h,"user.id",g,!1),xi(h,"user.email",m,!1),xi(h,"user.name",v,!1),xi(h,"sentry.release",s),xi(h,"sentry.environment",c);const{name:_,version:S}=(te=(he=a.getSdkMetadata())==null?void 0:he.sdk)!=null?te:{};xi(h,"sentry.sdk.name",_),xi(h,"sentry.sdk.version",S);const E=a.getIntegrationByName("Replay"),w=E==null?void 0:E.getReplayId(!0);xi(h,"sentry.replay_id",w),w&&(E==null?void 0:E.getRecordingMode())==="buffer"&&xi(h,"sentry._internal.replay_is_buffering",w);const T=ee(A({},e),{attributes:h}),O=f!=null&&f.beforeSendMetric?f.beforeSendMetric(T):T;if(!O){me&&Y.log("`beforeSendMetric` returned `null`, will not send metric.");return}const x={};for(const X in O.attributes)O.attributes[X]!==void 0&&(x[X]=N3(O.attributes[X]));const I=ns(n),M=I?I.spanContext().traceId:d==null?void 0:d.trace_id,L=I?I.spanContext().spanId:void 0,D={timestamp:Bt(),trace_id:M,span_id:L,name:O.name,type:O.type,unit:O.unit,value:O.value,attributes:x};Si(()=>{me&&console.log("[Metric]",D)}),r(a,D),a.emit("afterCaptureMetric",T)}function Of(e,t){var s;const n=(s=t!=null?t:oE(e))!=null?s:[];if(n.length===0)return;const r=e.getOptions(),a=k3(n,r._metadata,r.tunnel,e.getDsn());Cm().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(a)}function oE(e){return Cm().get(e)}function U3(e){const t=is().getScopeData();return os(t,cn().getScopeData()),os(t,e.getScopeData()),t}function Cm(){return Ko("clientToMetricBufferMap",()=>new WeakMap)}function B3(e,t){t.debug===!0&&(me?Y.enable():Si(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Ue().update(t.initialScope);const r=new e(t);return sE(r),r.init(),r}function sE(e){Ue().setClient(e)}const uE=Symbol.for("SentryBufferFullError");function H3(e=100){const t=new Set;function n(){return t.sizer(f),()=>r(f)),f}function s(c){if(!t.size)return _f(!0);const f=Promise.allSettled(Array.from(t)).then(()=>!0);if(!c)return f;const d=[f,new Promise(h=>setTimeout(()=>h(!1),c))];return Promise.race(d)}return{get $(){return Array.from(t)},add:a,drain:s}}const F3=60*1e3;function cE(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?F3:r-t}function P3(e,t){return e[t]||e.all||0}function lE(e,t,n=Date.now()){return P3(e,t)>n}function fE(e,{statusCode:t,headers:n},r=Date.now()){const a=A({},e),s=n==null?void 0:n["x-sentry-rate-limits"],c=n==null?void 0:n["retry-after"];if(s)for(const f of s.trim().split(",")){const[d,h,,,g]=f.split(":",5),m=parseInt(d,10),v=(isNaN(m)?60:m)*1e3;if(!h)a.all=r+v;else for(const _ of h.split(";"))_==="metric_bucket"?(!g||g.split(";").includes("custom"))&&(a[_]=r+v):a[_]=r+v}else c?a.all=r+cE(c,r):t===429&&(a.all=r+60*1e3);return a}const j3=64;function dE(e,t,n=H3(e.bufferSize||j3)){let r={};const a=c=>n.drain(c);function s(c){const f=[];if(ho(c,(m,v)=>{const _=TS(v);lE(r,_)?e.recordDroppedEvent("ratelimit_backoff",_):f.push(m)}),f.length===0)return Promise.resolve({});const d=ai(c[0],f),h=m=>{ho(d,(v,_)=>{e.recordDroppedEvent(m,TS(_))})},g=()=>t({body:pf(d)}).then(m=>(m.statusCode!==void 0&&(m.statusCode<200||m.statusCode>=300)&&me&&Y.warn(`Sentry responded with status code ${m.statusCode} to sent event.`),r=fE(r,m),m),m=>{throw h("network_error"),me&&Y.error("Encountered error running transport request:",m),m});return n.add(g).then(m=>m,m=>{if(m===uE)return me&&Y.error("Skipped sending event because buffer is full."),h("queue_overflow"),Promise.resolve({});throw m})}return{send:s,flush:a}}const Am=100,Om=5e3,q3=36e5;function $3(e){function t(...n){me&&Y.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const a=n.createStore(n);let s=Om,c;function f(m,v,_){return ES(m,["client_report"])?!1:n.shouldStore?n.shouldStore(m,v,_):!0}function d(m){c&&clearTimeout(c),c=setTimeout(()=>_e(null,null,function*(){c=void 0;const v=yield a.shift();v&&(t("Attempting to send previously queued event"),v[0].sent_at=new Date().toISOString(),g(v,!0).catch(_=>{t("Failed to retry sending",_)}))}),m),typeof c!="number"&&c.unref&&c.unref()}function h(){c||(d(s),s=Math.min(s*2,q3))}function g(m,v=!1){return _e(this,null,function*(){var _,S;if(!v&&ES(m,["replay_event","replay_recording"]))return yield a.push(m),d(Am),{};try{if(n.shouldSend&&(yield n.shouldSend(m))===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const E=yield r.send(m);let w=Am;if(E){if((_=E.headers)!=null&&_["retry-after"])w=cE(E.headers["retry-after"]);else if((S=E.headers)!=null&&S["x-sentry-rate-limits"])w=6e4;else if((E.statusCode||0)>=400)return E}return d(w),s=Om,E}catch(E){if(yield f(m,E,s))return v?yield a.unshift(m):yield a.push(m),h(),t("Error sending. Event queued.",E),{};throw E}})}return n.flushAtStartup&&h(),{send:g,flush:m=>(m===void 0&&(s=Om,d(Am)),r.flush(m))}}}function hE(e,t){let n;return ho(e,(r,a)=>(t.includes(a)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function V3(e,t){return n=>{const r=e(n);return ee(A({},r),{send:a=>_e(null,null,function*(){const s=hE(a,["event","transaction","profile","replay_event"]);return s&&(s.release=t),r.send(a)})})}}function G3(e,t){return ai(t?ee(A({},e[0]),{dsn:t}):e[0],e[1])}function Q3(e,t){return n=>{const r=e(n),a=new Map;function s(d,h){const g=h?`${d}:${h}`:d;let m=a.get(g);if(!m){const v=eS(d);if(!v)return;const _=GS(v,n.tunnel);m=h?V3(e,h)(ee(A({},n),{url:_})):e(ee(A({},n),{url:_})),a.set(g,m)}return[d,m]}function c(d){return _e(this,null,function*(){function h(_){const S=_!=null&&_.length?_:["event"];return hE(d,S)}const g=t({envelope:d,getEvent:h}).map(_=>typeof _=="string"?s(_,void 0):s(_.dsn,_.release)).filter(_=>!!_),m=g.length?g:[["",r]];return(yield Promise.all(m.map(([_,S])=>S.send(G3(d,_)))))[0]})}function f(d){return _e(this,null,function*(){const h=[...a.values(),r];return(yield Promise.all(h.map(m=>m.flush(d)))).every(m=>m)})}return{send:c,flush:f}}}const W3="thismessage:/";function Rm(e){return"isRelative"in e}function Mm(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?W3:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const a=new URL(e,r);return n?{isRelative:n,pathname:a.pathname,search:a.search,hash:a.hash}:a}catch(a){}}function Y3(e){if(Rm(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function mo(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function pE(e){return e.split(/[?#]/,1)[0]}function mE(e,t){const n=t==null?void 0:t.getDsn(),r=t==null?void 0:t.getOptions().tunnel;return K3(e,n)||X3(e,r)}function X3(e,t){return t?gE(e)===gE(t):!1}function K3(e,t){const n=Mm(e);return!n||Rm(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function gE(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function yE(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const J3=yE;function Z3(e){var t;"aggregates"in e?((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs=ee(A({},e.attrs),{ip_address:"{{auto}}"})):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function vE(e,t,n=[t],r="npm"){const a=e._metadata||{};a.sdk||(a.sdk={name:`sentry.javascript.${t}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:_i})),version:_i}),e._metadata=a}function xm(e={}){const t=e.client||ye();if(!jS()||!t)return{};const n=bi(),r=aa(n);if(r.getTraceData)return r.getTraceData(e);const a=e.scope||Ue(),s=e.span||Qt(),c=s?fS(s):eL(a),f=s?jr(s):um(t,a),d=J0(f);if(!iS.test(c))return Y.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const g={"sentry-trace":c,baggage:d};if(e.propagateTraceparent){const m=s?t5(s):tL(a);m&&(g.traceparent=m)}return g}function eL(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return oS(t,r,n)}function tL(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return sS(t,r,n)}function nL(e,t,n){let r,a,s;const c=n!=null&&n.maxWait?Math.max(n.maxWait,t):0,f=(n==null?void 0:n.setTimeoutImpl)||setTimeout;function d(){return h(),r=e(),r}function h(){a!==void 0&&clearTimeout(a),s!==void 0&&clearTimeout(s),a=s=void 0}function g(){return a!==void 0||s!==void 0?d():r}function m(){return a&&clearTimeout(a),a=f(d,t),c&&s===void 0&&(s=f(d,c)),r}return m.cancel=h,m.flush=g,m}const rL=100;function qr(e,t){const n=ye(),r=cn();if(!n)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:s=rL}=n.getOptions();if(s<=0)return;const c=uo(),f=A({timestamp:c},e),d=a?Si(()=>a(f,t)):f;d!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",d,t),r.addBreadcrumb(d,s))}let _E;const iL="FunctionToString",bE=new WeakMap,SE=(()=>({name:iL,setupOnce(){_E=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Xp(this),n=bE.has(ye())&&t!==void 0?t:this;return _E.apply(n,e)}}catch(e){}},setup(e){bE.set(e,!0)}})),aL=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],oL="EventFilters",EE=(e={})=>{let t;return{name:oL,setup(n){const r=n.getOptions();t=wE(e,r)},processEvent(n,r,a){if(!t){const s=a.getOptions();t=wE(e,s)}return sL(n,t)?null:n}}},TE=((e={})=>ee(A({},EE(e)),{name:"InboundFilters"}));function wE(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:aL],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function sL(e,t){if(e.type){if(e.type==="transaction"&&cL(e,t.ignoreTransactions))return me&&Y.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. Event: ${so(e)}`),!0}else{if(uL(e,t.ignoreErrors))return me&&Y.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${so(e)}`),!0;if(hL(e))return me&&Y.warn(`Event dropped due to not having an error message, error type or stacktrace. Event: ${so(e)}`),!0;if(lL(e,t.denyUrls))return me&&Y.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${so(e)}. Url: ${Rf(e)}`),!0;if(!fL(e,t.allowUrls))return me&&Y.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${so(e)}. Url: ${Rf(e)}`),!0}return!1}function uL(e,t){return t!=null&&t.length?XS(e).some(n=>Hr(n,t)):!1}function cL(e,t){if(!(t!=null&&t.length))return!1;const n=e.transaction;return n?Hr(n,t):!1}function lL(e,t){if(!(t!=null&&t.length))return!1;const n=Rf(e);return n?Hr(n,t):!1}function fL(e,t){if(!(t!=null&&t.length))return!0;const n=Rf(e);return n?Hr(n,t):!0}function dL(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function Rf(e){var t,n,r;try{const a=[...(n=(t=e.exception)==null?void 0:t.values)!=null?n:[]].reverse().find(c=>{var f,d,h;return((f=c.mechanism)==null?void 0:f.parent_id)===void 0&&((h=(d=c.stacktrace)==null?void 0:d.frames)==null?void 0:h.length)}),s=(r=a==null?void 0:a.stacktrace)==null?void 0:r.frames;return s?dL(s):null}catch(a){return me&&Y.error(`Cannot extract url for event ${so(e)}`),null}}function hL(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)!=null&&n.length?!e.message&&!e.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function pL(e,t,n,r,a,s){var f;if(!((f=a.exception)!=null&&f.values)||!s||!Ci(s.originalException,Error))return;const c=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;c&&(a.exception.values=Im(e,t,r,s.originalException,n,a.exception.values,c,0))}function Im(e,t,n,r,a,s,c,f){if(s.length>=n+1)return s;let d=[...s];if(Ci(r[a],Error)){CE(c,f);const h=e(t,r[a]),g=d.length;AE(h,a,g,f),d=Im(e,t,n,r[a],a,[h,...d],h,g)}return Array.isArray(r.errors)&&r.errors.forEach((h,g)=>{if(Ci(h,Error)){CE(c,f);const m=e(t,h),v=d.length;AE(m,`errors[${g}]`,v,f),d=Im(e,t,n,h,a,[m,...d],m,v)}}),d}function CE(e,t){e.mechanism=ee(A(A({handled:!0,type:"auto.core.linked_errors"},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function AE(e,t,n,r){e.mechanism=ee(A({handled:!0},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}const OE=new Map,RE=new Set;function mL(e){if(ke._sentryModuleMetadata)for(const t of Object.keys(ke._sentryModuleMetadata)){const n=ke._sentryModuleMetadata[t];if(RE.has(t))continue;RE.add(t);const r=e(t);for(const a of r.reverse())if(a.filename){OE.set(a.filename,n);break}}}function gL(e,t){return mL(e),OE.get(t)}function ME(e,t){var n,r;(r=(n=t.exception)==null?void 0:n.values)==null||r.forEach(a=>{var s,c;(c=(s=a.stacktrace)==null?void 0:s.frames)==null||c.forEach(f=>{if(!f.filename||f.module_metadata)return;const d=gL(e,f.filename);d&&(f.module_metadata=d)})})}function xE(e){var t,n;(n=(t=e.exception)==null?void 0:t.values)==null||n.forEach(r=>{var a,s;(s=(a=r.stacktrace)==null?void 0:a.frames)==null||s.forEach(c=>{delete c.module_metadata})})}const yL=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{ho(t,(n,r)=>{if(r==="event"){const a=Array.isArray(n)?n[1]:void 0;a&&(xE(a),n[1]=a)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;ME(n,t)})}});function km(e){const t="console";ra(t,e),ia(t,vL)}function vL(){"console"in ke&&Pp.forEach(function(e){e in ke.console&&Fn(ke.console,e,function(t){return Zl[e]=t,function(...n){gr("console",{args:n,level:e});const a=Zl[e];a==null||a.apply(ke.console,n)}})})}function Dm(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const _L="CaptureConsole",bL=((e={})=>{var r;const t=e.levels||Pp,n=(r=e.handled)!=null?r:!0;return{name:_L,setup(a){"console"in ke&&km(({args:s,level:c})=>{ye()!==a||!t.includes(c)||SL(s,c,n)})}}});function SL(e,t,n){const r={level:Dm(t),extra:{arguments:e}};Wn(a=>{if(a.addEventProcessor(f=>(f.logger="console",Ai(f,{handled:n,type:"auto.core.capture_console"}),f)),t==="assert"){if(!e[0]){const f=`Assertion failed: ${af(e.slice(1)," ")||"console.assert"}`;a.setExtra("arguments",e.slice(1)),Tf(f,r)}return}const s=e.find(f=>f instanceof Error);if(s){ua(s,r);return}const c=af(e," ");Tf(c,r)})}const EL="Dedupe",IE=(()=>{let e;return{name:EL,processEvent(t){if(t.type)return t;try{if(TL(t,e))return me&&Y.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(n){}return e=t}}});function TL(e,t){return t?!!(wL(e,t)||CL(e,t)):!1}function wL(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!DE(e,t)||!kE(e,t))}function CL(e,t){const n=NE(t),r=NE(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!DE(e,t)||!kE(e,t))}function kE(e,t){let n=Vp(e),r=Vp(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:AL,processEvent(r,a,s){const{maxValueLength:c=250}=s.getOptions();return RL(r,a,t,n,c)}}});function RL(e,t={},n,r,a){if(!t.originalException||!Ti(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,c=LE(t.originalException,r,a);if(c){const f=A({},e.contexts),d=ar(c,n);return wi(d)&&(An(d,"__sentry_skip_normalization__",!0),f[s]=d),ee(A({},e),{contexts:f})}return e}function LE(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],a={};for(const s of Object.keys(e)){if(r.indexOf(s)!==-1)continue;const c=e[s];a[s]=Ti(c)||typeof c=="string"?es(`${c}`,n):c}if(t&&e.cause!==void 0)if(Ti(e.cause)){const s=e.cause.name||e.cause.constructor.name;a.cause={[s]:LE(e.cause,!1,n)}}else a.cause=e.cause;if(typeof e.toJSON=="function"){const s=e.toJSON();for(const c of Object.keys(s)){const f=s[c];a[c]=Ti(f)?f.toString():f}}return a}catch(r){me&&Y.error("Unable to extract extra data from the Error object:",r)}return null}function ML(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const a=e[r];a==="."?e.splice(r,1):a===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const xL=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function IL(e){const t=e.length>1024?`${e.slice(-1024)}`:e,n=xL.exec(t);return n?n.slice(1):[]}function zE(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const a=r>=0?e[r]:"/";a&&(t=`${a}/${t}`,n=a.charAt(0)==="/")}return t=ML(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function UE(e){let t=0;for(;t=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function kL(e,t){e=zE(e).slice(1),t=zE(t).slice(1);const n=UE(e.split("/")),r=UE(t.split("/")),a=Math.min(n.length,r.length);let s=a;for(let f=0;f{const t=e.root,n=e.prefix||"app:///",r="window"in ke&&!!ke.window,a=e.iteratee||zL({isBrowser:r,root:t,prefix:n});function s(f){try{return ee(A({},f),{exception:ee(A({},f.exception),{values:f.exception.values.map(d=>A(A({},d),d.stacktrace&&{stacktrace:c(d.stacktrace)}))})})}catch(d){return f}}function c(f){var d;return ee(A({},f),{frames:(d=f==null?void 0:f.frames)==null?void 0:d.map(h=>a(h))})}return{name:NL,processEvent(f){let d=f;return f.exception&&Array.isArray(f.exception.values)&&(d=s(d)),d}}};function zL({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const a=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),s=/^\//.test(r.filename);if(e){if(t){const c=r.filename;c.indexOf(t)===0&&(r.filename=c.replace(t,n))}}else if(a||s){const c=a?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,f=t?kL(t,c):DL(c);r.filename=`${n}${f}`}return r}}const UL=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],BL=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],HL={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},BE=["select","insert","upsert","update","delete"];function Mf(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch(t){}}function xf(e){try{return e.__SENTRY_INSTRUMENTED__}catch(t){return!1}}function FL(e,t={}){var n;switch(e){case"GET":return"select";case"POST":return(n=t.Prefer)!=null&&n.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return""}}function PL(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let a;return n!=null&&n.startsWith("fts")?a="textSearch":n!=null&&n.startsWith("plfts")?a="textSearch[plain]":n!=null&&n.startsWith("phfts")?a="textSearch[phrase]":n!=null&&n.startsWith("wfts")?a="textSearch[websearch]":a=n&&HL[n]||"filter",`${a}(${e}, ${r.join(".")})`}function HE(e,t=!1){return new Proxy(e,{apply(n,r,a){return yf({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[Ze]:"auto.db.supabase",[rn]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},s=>Reflect.apply(n,r,a).then(c=>(c&&typeof c=="object"&&"error"in c&&c.error?(s.setStatus({code:Xt}),ua(c.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):s.setStatus({code:nm}),s.end(),c)).catch(c=>{throw s.setStatus({code:Xt}),s.end(),ua(c,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),c}).then(...a))}})}function jL(e){const t=e.auth;if(!(!t||xf(e.auth))){for(const n of UL){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=HE(r))}for(const n of BL){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=HE(r,!0))}Mf(e.auth)}}function qL(e){xf(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){const a=Reflect.apply(t,n,r),s=a.constructor;return VL(s),a}}),Mf(e.prototype.from))}function $L(e){xf(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){var _;const a=BE,s=n,c=FL(s.method,s.headers);if(!a.includes(c)||!((_=s==null?void 0:s.url)!=null&&_.pathname)||typeof s.url.pathname!="string")return Reflect.apply(t,n,r);const f=s.url.pathname.split("/"),d=f.length>0?f[f.length-1]:"",h=[];for(const[S,E]of s.url.searchParams.entries())h.push(PL(S,E));const g=Object.create(null);if(wi(s.body))for(const[S,E]of Object.entries(s.body))g[S]=E;const m=`${c==="select"?"":`${c}${g?"(...) ":""}`}${h.join(" ")} from(${d})`,v={"db.table":d,"db.schema":s.schema,"db.url":s.url.origin,"db.sdk":s.headers["X-Client-Info"],"db.system":"postgresql","db.operation":c,[Ze]:"auto.db.supabase",[rn]:"db"};return h.length&&(v["db.query"]=h),Object.keys(g).length&&(v["db.body"]=g),yf({name:m,attributes:v},S=>Reflect.apply(t,n,[]).then(E=>{if(S&&(E&&typeof E=="object"&&"status"in E&&tc(S,E.status||500),S.end()),E.error){const O=new Error(E.error.message);E.error.code&&(O.code=E.error.code),E.error.details&&(O.details=E.error.details);const x={};h.length&&(x.query=h),Object.keys(g).length&&(x.body=g),ua(O,I=>(I.addEventProcessor(M=>(Ai(M,{handled:!1,type:"auto.db.supabase.postgres"}),M)),I.setContext("supabase",x),I))}const w={type:"supabase",category:`db.${c}`,message:m},T={};return h.length&&(T.query=h),Object.keys(g).length&&(T.body=g),Object.keys(T).length&&(w.data=T),qr(w),E},E=>{throw S&&(tc(S,500),S.end()),E}).then(...r))}}),Mf(e.prototype.then))}function VL(e){for(const t of BE)xf(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,a){const s=Reflect.apply(n,r,a),c=s.constructor;return me&&Y.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),$L(c),s}}),Mf(e.prototype[t]))}const FE=e=>{if(!e){me&&Y.warn("Supabase integration was not installed because no Supabase client was provided.");return}const t=e.constructor===Function?e:e.constructor;qL(t),jL(e)},GL="Supabase",QL=(e=>({setupOnce(){FE(e)},name:GL})),WL=e=>QL(e.supabaseClient),YL=10,XL="ZodErrors";function KL(e){return Ti(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function JL(e){return ee(A({},e),{path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0})}function ZL(e){return e.map(t=>typeof t=="number"?"":t).join(".")}function e4(e){const t=new Set;for(const r of e.issues){const a=ZL(r.path);a.length>0&&t.add(a)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const a=e.issues[0];a!==void 0&&"expected"in a&&typeof a.expected=="string"&&(r=a.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${es(n.join(", "),100)}`}function t4(e,t=!1,n,r){var a;if(!((a=n.exception)!=null&&a.values)||!r.originalException||!KL(r.originalException)||r.originalException.issues.length===0)return n;try{const c=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(JL);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:c})})),ee(A({},n),{exception:ee(A({},n.exception),{values:[ee(A({},n.exception.values[0]),{value:e4(r.originalException)}),...n.exception.values.slice(1)]}),extra:ee(A({},n.extra),{"zoderror.issues":c.slice(0,e)})})}catch(s){return ee(A({},n),{extra:ee(A({},n.extra),{"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:s instanceof Error?`${s.name}: ${s.message} ${s.stack}`:"unknown"}})})}}const n4=((e={})=>{var n;const t=(n=e.limit)!=null?n:YL;return{name:XL,processEvent(r,a){return t4(t,e.saveZodIssuesAsAttachment,r,a)}}}),PE=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{ho(n,(r,a)=>{if(a==="event"){const s=Array.isArray(r)?r[1]:void 0;s&&(xE(s),r[1]=s)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;ME(r,n)})},processEvent(t){const n=r4(t);if(n){const r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](s=>!s.some(c=>e.filterKeys.includes(c)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags=ee(A({},t.tags),{third_party_code:!0})}}return t}});function r4(e){const t=Vp(e);if(t)return t.filter(n=>{var r;return!!n.filename&&((r=n.lineno)!=null?r:n.colno)!=null}).map(n=>n.module_metadata?Object.keys(n.module_metadata).filter(r=>r.startsWith(jE)).map(r=>r.slice(jE.length)):[])}const jE="_sentryBundlerPluginAppKey:",i4=100,a4=10,If="flag.evaluation.";function oc(e){const n=Ue().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function ss(e,t,n=i4){const r=Ue().getScopeData().contexts;r.flags||(r.flags={values:[]});const a=r.flags.values;o4(a,e,t,n)}function o4(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){me&&Y.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const a=e.findIndex(s=>s.flag===t);a!==-1&&e.splice(a,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function us(e,t,n=a4){if(typeof t!="boolean")return;const r=Qt();if(!r)return;const a=Me(r).data;if(`${If}${e}`in a){r.setAttribute(`${If}${e}`,t);return}Object.keys(a).filter(c=>c.startsWith(If)).length({name:"FeatureFlags",processEvent(e,t,n){return oc(e)},addFeatureFlag(e,t){ss(e,t),us(e,t)}});function u4(e,t,n,r,a){if(!e.fetchData)return;const{method:s,url:c}=e.fetchData,f=Pr()&&t(c);if(e.endTimestamp&&f){const _=e.fetchData.__span;if(!_)return;const S=r[_];S&&(l4(S,e),delete r[_]);return}const{spanOrigin:d="auto.http.browser",propagateTraceparent:h=!1}=typeof a=="object"?a:{spanOrigin:a},g=!!Qt(),m=f&&g?vr(d4(c,s,d)):new Mi;if(e.fetchData.__span=m.spanContext().spanId,r[m.spanContext().spanId]=m,n(e.fetchData.url)){const _=e.args[0],S=e.args[1]||{},E=c4(_,S,Pr()&&g?m:void 0,h);E&&(e.args[1]=S,S.headers=E)}const v=ye();if(v){const _={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};v.emit("beforeOutgoingRequestSpan",m,_)}return m}function c4(e,t,n,r){const a=xm({span:n,propagateTraceparent:r}),s=a["sentry-trace"],c=a.baggage,f=a.traceparent;if(!s)return;const d=t.headers||(U0(e)?e.headers:void 0);if(d)if(f4(d)){const h=new Headers(d);if(h.get("sentry-trace")||h.set("sentry-trace",s),r&&f&&!h.get("traceparent")&&h.set("traceparent",f),c){const g=h.get("baggage");g?kf(g)||h.set("baggage",`${g},${c}`):h.set("baggage",c)}return h}else if(Array.isArray(d)){const h=[...d];d.find(m=>m[0]==="sentry-trace")||h.push(["sentry-trace",s]),r&&f&&!d.find(m=>m[0]==="traceparent")&&h.push(["traceparent",f]);const g=d.find(m=>m[0]==="baggage"&&kf(m[1]));return c&&!g&&h.push(["baggage",c]),h}else{const h="sentry-trace"in d?d["sentry-trace"]:void 0,g="traceparent"in d?d.traceparent:void 0,m="baggage"in d?d.baggage:void 0,v=m?Array.isArray(m)?[...m]:[m]:[],_=m&&(Array.isArray(m)?m.find(E=>kf(E)):kf(m));c&&!_&&v.push(c);const S=ee(A({},d),{"sentry-trace":h!=null?h:s,baggage:v.length>0?v.join(","):void 0});return r&&f&&!g&&(S.traceparent=f),S}else return A({},a)}function l4(e,t){var n,r;if(t.response){tc(e,t.response.status);const a=(r=(n=t.response)==null?void 0:n.headers)==null?void 0:r.get("content-length");if(a){const s=parseInt(a);s>0&&e.setAttribute("http.response_content_length",s)}}else t.error&&e.setStatus({code:Xt,message:"internal_error"});e.end()}function kf(e){return e.split(",").some(t=>t.trim().startsWith(rm))}function f4(e){return typeof Headers!="undefined"&&Ci(e,Headers)}function d4(e,t,n){const r=Mm(e);return{name:r?`${t} ${Y3(r)}`:t,attributes:h4(e,r,t,n)}}function h4(e,t,n,r){const a={url:e,type:"fetch","http.method":n,[Ze]:r,[rn]:"http.client"};return t&&(Rm(t)||(a["http.url"]=t.href,a["server.address"]=t.host),t.search&&(a["http.query"]=t.search),t.hash&&(a["http.fragment"]=t.hash)),a}function qE(e,t={},n=Ue()){const{message:r,name:a,email:s,url:c,source:f,associatedEventId:d,tags:h}=e,g={contexts:{feedback:{contact_email:s,name:a,message:r,url:c,source:f,associated_event_id:d}},type:"feedback",level:"info",tags:h},m=(n==null?void 0:n.getClient())||ye();return m&&m.emit("beforeSendFeedback",g,t),n.captureEvent(g,t)}function cs(e,t,n,r,a){Cf({level:e,message:t,attributes:n,severityNumber:a},r)}function p4(e,t,{scope:n}={}){cs("trace",e,t,n)}function m4(e,t,{scope:n}={}){cs("debug",e,t,n)}function g4(e,t,{scope:n}={}){cs("info",e,t,n)}function y4(e,t,{scope:n}={}){cs("warn",e,t,n)}function v4(e,t,{scope:n}={}){cs("error",e,t,n)}function _4(e,t,{scope:n}={}){cs("fatal",e,t,n)}const b4=Object.freeze(Object.defineProperty({__proto__:null,debug:m4,error:v4,fatal:_4,fmt:J3,info:g4,trace:p4,warn:y4},Symbol.toStringTag,{value:"Module"}));function Nm(e,t,n){return"util"in ke&&typeof ke.util.format=="function"?ke.util.format(...e):S4(e,t,n)}function S4(e,t,n){return e.map(r=>Zo(r)?String(r):JSON.stringify(ar(r,t,n))).join(" ")}function E4(e){return/%[sdifocO]/.test(e)}function T4(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((a,s)=>{n[`sentry.message.parameter.${s}`]=a}),n}const w4="ConsoleLogs",$E={[Ze]:"auto.console.logging"},C4=((e={})=>{const t=e.levels||Pp;return{name:w4,setup(n){const{enableLogs:r,normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=n.getOptions();if(!r){me&&Y.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}km(({args:c,level:f})=>{if(ye()!==n||!t.includes(f))return;const d=c[0],h=c.slice(1);if(f==="assert"){if(!d){const _=h.length>0?`Assertion failed: ${Nm(h,a,s)}`:"Assertion failed";Cf({level:"error",message:_,attributes:$E})}return}const g=f==="log",m=c.length>1&&typeof c[0]=="string"&&!E4(c[0]),v=A(A({},$E),m?T4(d,h):{});Cf({level:g?"info":f,message:Nm(c,a,s),severityNumber:g?10:void 0,attributes:v})})}}});function Lm(e,t,n,r){z3({type:e,name:t,value:n,unit:r==null?void 0:r.unit,attributes:r==null?void 0:r.attributes},{scope:r==null?void 0:r.scope})}function A4(e,t=1,n){Lm("counter",e,t,n)}function O4(e,t,n){Lm("gauge",e,t,n)}function R4(e,t,n){Lm("distribution",e,t,n)}const M4=Object.freeze(Object.defineProperty({__proto__:null,count:A4,distribution:R4,gauge:O4},Symbol.toStringTag,{value:"Module"})),x4=["trace","debug","info","warn","error","fatal"];function I4(e={}){var r;const t=new Set((r=e.levels)!=null?r:x4),n=e.client;return{log(a){const O=a,{type:s,level:c,message:f,args:d,tag:h,date:g}=O,m=no(O,["type","level","message","args","tag","date"]),v=n||ye();if(!v)return;const _=N4(s,c);if(!t.has(_))return;const{normalizeDepth:S=3,normalizeMaxBreadth:E=1e3}=v.getOptions(),w=[];f&&w.push(f),d&&d.length>0&&w.push(Nm(d,S,E));const T=w.join(" ");m["sentry.origin"]="auto.logging.consola",h&&(m["consola.tag"]=h),s&&(m["consola.type"]=s),c!=null&&typeof c=="number"&&(m["consola.level"]=c),Cf({level:_,message:T,attributes:m})}}}const k4={silent:"trace",fatal:"fatal",error:"error",warn:"warn",log:"info",info:"info",success:"info",fail:"error",ready:"info",start:"info",box:"info",debug:"debug",trace:"trace",verbose:"debug",critical:"fatal",notice:"info"},D4={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function N4(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=k4[e];if(n)return n}if(typeof t=="number"){const n=D4[t];if(n)return n}return"info"}function VE(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const ls=ke;function L4(){return"history"in ls&&!!ls.history}function z4(){if(!("fetch"in ls))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function zm(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function GE(){var n;if(typeof EdgeRuntime=="string")return!0;if(!z4())return!1;if(zm(ls.fetch))return!0;let e=!1;const t=ls.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),(n=r.contentWindow)!=null&&n.fetch&&(e=zm(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){me&&Y.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function U4(){return"ReportingObserver"in ls}function Um(e,t){const n="fetch";ra(n,e),ia(n,()=>QE(void 0,t))}function B4(e){const t="fetch-body-resolved";ra(t,e),ia(t,()=>QE(F4))}function QE(e,t=!1){t&&!GE()||Fn(ke,"fetch",function(n){return function(...r){const a=new Error,{method:s,url:c}=P4(r),f={args:r,fetchData:{method:s,url:c},startTimestamp:Bt()*1e3,virtualError:a,headers:j4(r)};return e||gr("fetch",A({},f)),n.apply(ke,r).then(d=>_e(null,null,function*(){return e?e(d):gr("fetch",ee(A({},f),{endTimestamp:Bt()*1e3,response:d})),d}),d=>{if(gr("fetch",ee(A({},f),{endTimestamp:Bt()*1e3,error:d})),Ti(d)&&d.stack===void 0&&(d.stack=a.stack,An(d,"framesToPop",1)),d instanceof TypeError&&(d.message==="Failed to fetch"||d.message==="Load failed"||d.message==="NetworkError when attempting to fetch resource."))try{const h=new URL(f.fetchData.url);d.message=`${d.message} (${h.host})`}catch(h){}throw d})}})}function H4(e,t){return _e(this,null,function*(){if(e!=null&&e.body){const n=e.body,r=n.getReader(),a=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let s=!0;for(;s;){let c;try{c=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:f}=yield r.read();clearTimeout(c),f&&(t(),s=!1)}catch(f){s=!1}finally{clearTimeout(c)}}clearTimeout(a),r.releaseLock(),n.cancel().then(null,()=>{})}})}function F4(e){let t;try{t=e.clone()}catch(n){return}H4(t,()=>{gr("fetch-body-resolved",{endTimestamp:Bt()*1e3,response:e})})}function Bm(e,t){return!!e&&typeof e=="object"&&!!e[t]}function WE(e){return typeof e=="string"?e:e?Bm(e,"url")?e.url:e.toString?e.toString():"":""}function P4(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:WE(n),method:Bm(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:WE(t),method:Bm(t,"method")?String(t.method).toUpperCase():"GET"}}function j4(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(U0(t))return new Headers(t.headers)}catch(r){}}function q4(){return typeof __SENTRY_BROWSER_BUNDLE__!="undefined"&&!!__SENTRY_BROWSER_BUNDLE__}function $4(){return"npm"}function V4(){return!q4()&&Object.prototype.toString.call(typeof process!="undefined"?process:0)==="[object process]"}function Hm(){return typeof window!="undefined"&&(!V4()||G4())}function G4(){const e=ke.process;return(e==null?void 0:e.type)==="renderer"}const $r=ke,xt=$r.document,sc=$r.navigator,YE="Report a Bug",Q4="Cancel",W4="Send Bug Report",Y4="Confirm",X4="Report a Bug",K4="your.email@example.org",J4="Email",Z4="What's the bug? What did you expect?",e6="Description",t6="Your Name",n6="Name",r6="Thank you for your report!",i6="(required)",a6="Add a screenshot",o6="Remove screenshot",s6="Highlight",u6="Hide",c6="Remove",l6="widget",f6="api",d6=5e3,XE=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=ye();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&Ue().setTags(e.tags);const r=qE(A({source:f6,url:oo()},e),t);return new Promise((a,s)=>{const c=setTimeout(()=>s("Unable to determine if Feedback was correctly sent."),3e4),f=n.on("afterSendEvent",(d,h)=>{if(d.event_id===r)return clearTimeout(c),f(),h!=null&&h.statusCode&&h.statusCode>=200&&h.statusCode<300?a(r):(h==null?void 0:h.statusCode)===403?s("Unable to send feedback. This could be because this domain is not in your list of allowed domains."):s("Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.")})})},Df=typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__;function h6(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(sc.userAgent)||/Macintosh/i.test(sc.userAgent)&&sc.maxTouchPoints&&sc.maxTouchPoints>1||!isSecureContext)}function Nf(e,t){return ee(A(A({},e),t),{tags:A(A({},e.tags),t.tags),onFormOpen:()=>{var n,r;(n=t.onFormOpen)==null||n.call(t),(r=e.onFormOpen)==null||r.call(e)},onFormClose:()=>{var n,r;(n=t.onFormClose)==null||n.call(t),(r=e.onFormClose)==null||r.call(e)},onSubmitSuccess:(n,r)=>{var a,s;(a=t.onSubmitSuccess)==null||a.call(t,n,r),(s=e.onSubmitSuccess)==null||s.call(e,n,r)},onSubmitError:n=>{var r,a;(r=t.onSubmitError)==null||r.call(t,n),(a=e.onSubmitError)==null||a.call(e,n)},onFormSubmitted:()=>{var n,r;(n=t.onFormSubmitted)==null||n.call(t),(r=e.onFormSubmitted)==null||r.call(e)},themeDark:A(A({},e.themeDark),t.themeDark),themeLight:A(A({},e.themeLight),t.themeLight)})}function p6(e){const t=xt.createElement("style");return t.textContent=` .widget__actor { position: fixed; z-index: var(--z-index); margin: var(--page-margin); inset: var(--actor-inset); display: flex; align-items: center; gap: 8px; padding: 16px; font-family: inherit; font-size: var(--font-size); font-weight: 600; line-height: 1.14em; text-decoration: none; background: var(--actor-background, var(--background)); border-radius: var(--actor-border-radius, 1.7em/50%); border: var(--actor-border, var(--border)); box-shadow: var(--actor-box-shadow, var(--box-shadow)); color: var(--actor-color, var(--foreground)); fill: var(--actor-color, var(--foreground)); cursor: pointer; opacity: 1; transition: transform 0.2s ease-in-out; transform: translate(0, 0) scale(1); } .widget__actor[aria-hidden="true"] { opacity: 0; pointer-events: none; visibility: hidden; transform: translate(0, 16px) scale(0.98); } .widget__actor:hover { background: var(--actor-hover-background, var(--background)); filter: var(--interactive-filter); } .widget__actor svg { width: 1.14em; height: 1.14em; } @media (max-width: 600px) { .widget__actor span { display: none; } } `,e&&t.setAttribute("nonce",e),t}function or(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const fs=20,m6="http://www.w3.org/2000/svg";function g6(){const e=f=>$r.document.createElementNS(m6,f),t=or(e("svg"),{width:`${fs}`,height:`${fs}`,viewBox:`0 0 ${fs} ${fs}`,fill:"var(--actor-color, var(--foreground))"}),n=or(e("g"),{clipPath:"url(#clip0_57_80)"}),r=or(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const a=e("defs"),s=or(e("clipPath"),{id:"clip0_57_80"}),c=or(e("rect"),{width:`${fs}`,height:`${fs}`,fill:"white"});return s.appendChild(c),a.appendChild(s),t.appendChild(a).appendChild(s).appendChild(c),t}function y6({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const a=xt.createElement("button");if(a.type="button",a.className="widget__actor",a.ariaHidden="false",a.ariaLabel=t||e||YE,a.appendChild(g6()),e){const c=xt.createElement("span");c.appendChild(xt.createTextNode(e)),a.appendChild(c)}const s=p6(r);return{el:a,appendToDom(){n.appendChild(s),n.appendChild(a)},removeFromDom(){a.remove(),s.remove()},show(){a.ariaHidden="false"},hide(){a.ariaHidden="true"}}}const KE="rgba(88, 74, 192, 1)",v6={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:KE,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},JE={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:KE,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function ZE(e){return` --foreground: ${e.foreground}; --background: ${e.background}; --accent-foreground: ${e.accentForeground}; --accent-background: ${e.accentBackground}; --success-color: ${e.successColor}; --error-color: ${e.errorColor}; --border: ${e.border}; --box-shadow: ${e.boxShadow}; --outline: ${e.outline}; --interactive-filter: ${e.interactiveFilter}; `}function _6({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const a=xt.createElement("style");return a.textContent=` :host { --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif; --font-size: 14px; --z-index: 100000; --page-margin: 16px; --inset: auto 0 0 auto; --actor-inset: var(--inset); font-family: var(--font-family); font-size: var(--font-size); ${e!=="system"?"color-scheme: only light;":""} ${ZE(e==="dark"?A(A({},JE),t):A(A({},v6),n))} } ${e==="system"?` @media (prefers-color-scheme: dark) { :host { ${ZE(A(A({},JE),t))} } }`:""} } `,r&&a.setAttribute("nonce",r),a}const e1=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:a="sentry-feedback",autoInject:s=!0,showBranding:c=!0,isEmailRequired:f=!1,isNameRequired:d=!1,showEmail:h=!0,showName:g=!0,enableScreenshot:m=!0,useSentryUser:v={email:"email",name:"username"},tags:_,styleNonce:S,scriptNonce:E,colorScheme:w="system",themeLight:T={},themeDark:O={},addScreenshotButtonLabel:x=a6,cancelButtonLabel:I=Q4,confirmButtonLabel:M=Y4,emailLabel:L=J4,emailPlaceholder:D=K4,formTitle:G=X4,isRequiredLabel:V=i6,messageLabel:ae=e6,messagePlaceholder:he=Z4,nameLabel:te=n6,namePlaceholder:X=t6,removeScreenshotButtonLabel:pe=o6,submitButtonLabel:ce=W4,successMessageText:H=r6,triggerLabel:P=YE,triggerAriaLabel:oe="",highlightToolText:re=s6,hideToolText:fe=u6,removeHighlightText:k=c6,onFormOpen:q,onFormClose:ue,onSubmitSuccess:se,onSubmitError:Te,onFormSubmitted:Oe}={})=>{const Re={id:a,autoInject:s,showBranding:c,isEmailRequired:f,isNameRequired:d,showEmail:h,showName:g,enableScreenshot:m,useSentryUser:v,tags:_,styleNonce:S,scriptNonce:E,colorScheme:w,themeDark:O,themeLight:T,triggerLabel:P,triggerAriaLabel:oe,cancelButtonLabel:I,submitButtonLabel:ce,confirmButtonLabel:M,formTitle:G,emailLabel:L,emailPlaceholder:D,messageLabel:ae,messagePlaceholder:he,nameLabel:te,namePlaceholder:X,successMessageText:H,isRequiredLabel:V,addScreenshotButtonLabel:x,removeScreenshotButtonLabel:pe,highlightToolText:re,hideToolText:fe,removeHighlightText:k,onFormClose:ue,onFormOpen:q,onSubmitError:Te,onSubmitSuccess:se,onFormSubmitted:Oe};let nt=null,Ye=[];const dn=Fe=>{if(!nt){const bt=xt.createElement("div");bt.id=String(Fe.id),xt.body.appendChild(bt),nt=bt.attachShadow({mode:"open"}),nt.appendChild(_6(Fe))}return nt},Gn=Fe=>_e(null,null,function*(){const bt=Fe.enableScreenshot&&h6();let $e,st;try{$e=(t?t():yield e("feedbackModalIntegration",E))(),Sm($e)}catch(ge){throw Df&&Y.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const ge=bt?n?n():yield e("feedbackScreenshotIntegration",E):void 0;ge&&(st=ge(),Sm(st))}catch(ge){Df&&Y.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const Xe=$e.createDialog({options:ee(A({},Fe),{onFormClose:()=>{var ge;Xe==null||Xe.close(),(ge=Fe.onFormClose)==null||ge.call(Fe)},onFormSubmitted:()=>{var ge;Xe==null||Xe.close(),(ge=Fe.onFormSubmitted)==null||ge.call(Fe)}}),screenshotIntegration:st,sendFeedback:XE,shadow:dn(Fe)});return Xe}),Tr=(Fe,bt={})=>{const $e=Nf(Re,bt),st=typeof Fe=="string"?xt.querySelector(Fe):typeof Fe.addEventListener=="function"?Fe:null;if(!st)throw Df&&Y.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let Xe=null;const ge=()=>_e(null,null,function*(){Xe||(Xe=yield Gn(ee(A({},$e),{onFormSubmitted:()=>{var Le;Xe==null||Xe.removeFromDom(),(Le=$e.onFormSubmitted)==null||Le.call($e)}}))),Xe.appendToDom(),Xe.open()});st.addEventListener("click",ge);const ct=()=>{Ye=Ye.filter(Le=>Le!==ct),Xe==null||Xe.removeFromDom(),Xe=null,st.removeEventListener("click",ge)};return Ye.push(ct),ct},wr=(Fe={})=>{const bt=Nf(Re,Fe),$e=dn(bt),st=y6({triggerLabel:bt.triggerLabel,triggerAriaLabel:bt.triggerAriaLabel,shadow:$e,styleNonce:S});return Tr(st.el,ee(A({},bt),{onFormOpen(){st.hide()},onFormClose(){st.show()},onFormSubmitted(){st.show()}})),st};return{name:"Feedback",setupOnce(){!Hm()||!Re.autoInject||(xt.readyState==="loading"?xt.addEventListener("DOMContentLoaded",()=>wr().appendToDom()):wr().appendToDom())},attachTo:Tr,createWidget(Fe={}){const bt=wr(Nf(Re,Fe));return bt.appendToDom(),bt},createForm(){return _e(this,arguments,function*(Fe={}){return Gn(Nf(Re,Fe))})},remove(){var Fe;nt&&((Fe=nt.parentElement)==null||Fe.remove(),nt=null),Ye.forEach(bt=>bt()),Ye=[]}}});function b6(){const e=ye();return e==null?void 0:e.getIntegrationByName("Feedback")}var Lf,It,t1,go,n1,r1,Fm,uc={},Pm=[],S6=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,jm=Array.isArray;function ca(e,t){for(var n in t)e[n]=t[n];return e}function i1(e){var t=e.parentNode;t&&t.removeChild(e)}function Ve(e,t,n){var r,a,s,c={};for(s in t)s=="key"?r=t[s]:s=="ref"?a=t[s]:c[s]=t[s];if(arguments.length>2&&(c.children=arguments.length>3?Lf.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)c[s]===void 0&&(c[s]=e.defaultProps[s]);return zf(e,c,r,a,null)}function zf(e,t,n,r,a){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:a==null?++t1:a,__i:-1,__u:0};return a==null&&It.vnode!=null&&It.vnode(s),s}function cc(e){return e.children}function Uf(e,t){this.props=e,this.context=t}function ds(e,t){if(t==null)return e.__?ds(e.__,e.__i+1):null;for(var n;tn?($m(r,t,a),a.length=r.length=0,t=void 0,go.sort(Fm)):t&&It.__c&&It.__c(t,Pm));t&&$m(r,t,a),Bf.__r=0}function s1(e,t,n,r,a,s,c,f,d,h,g){var m,v,_,S,E,w=r&&r.__k||Pm,T=t.length;for(n.__d=d,T6(n,t,w),d=n.__d,m=0;m0?zf(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a)!=null?(a.__=e,a.__b=e.__b+1,f=w6(a,n,c=r+m,g),a.__i=f,s=null,f!==-1&&(g--,(s=n[f])&&(s.__u|=131072)),s==null||s.__v===null?(f==-1&&m--,typeof a.type!="function"&&(a.__u|=65536)):f!==c&&(f===c+1?m++:f>c?g>d-c?m+=f-c:m--:m=f(d!=null&&(131072&d.__u)==0?1:0))for(;c>=0||f=0){if((d=t[c])&&(131072&d.__u)==0&&a==d.key&&s===d.type)return c;c--}if(f=n.__.length&&n.__.push({__V:Ff}),n.__[e]}function vo(e){return hs=1,b1(T1,e)}function b1(e,t,n){var r=yo(Ii++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):T1(void 0,t),function(f){var d=r.__N?r.__N[0]:r.__[0],h=r.t(d,f);d!==h&&(r.__N=[h,r.__[1]],r.__c.setState({}))}],r.__c=kt,!kt.u)){var a=function(f,d,h){if(!r.__c.__H)return!0;var g=r.__c.__H.__.filter(function(v){return!!v.__c});if(g.every(function(v){return!v.__N}))return!s||s.call(this,f,d,h);var m=!1;return g.forEach(function(v){if(v.__N){var _=v.__[0];v.__=v.__N,v.__N=void 0,_!==v.__[0]&&(m=!0)}}),!(!m&&r.__c.props===f)&&(!s||s.call(this,f,d,h))};kt.u=!0;var s=kt.shouldComponentUpdate,c=kt.componentWillUpdate;kt.componentWillUpdate=function(f,d,h){if(this.__e){var g=s;s=void 0,a(f,d,h),s=g}c&&c.call(this,f,d,h)},kt.shouldComponentUpdate=a}return r.__N||r.__}function R6(e,t){var n=yo(Ii++,3);!Wt.__s&&Ym(n.__H,t)&&(n.__=e,n.i=t,kt.__H.__h.push(n))}function S1(e,t){var n=yo(Ii++,4);!Wt.__s&&Ym(n.__H,t)&&(n.__=e,n.i=t,kt.__h.push(n))}function M6(e){return hs=5,lc(function(){return{current:e}},[])}function x6(e,t,n){hs=6,S1(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function lc(e,t){var n=yo(Ii++,7);return Ym(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ps(e,t){return hs=8,lc(function(){return e},t)}function I6(e){var t=kt.context[e.__c],n=yo(Ii++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(kt)),t.props.value):e.__}function k6(e,t){Wt.useDebugValue&&Wt.useDebugValue(t?t(e):e)}function D6(e){var t=yo(Ii++,10),n=vo();return t.__=e,kt.componentDidCatch||(kt.componentDidCatch=function(r,a){t.__&&t.__(r,a),n[1](r)}),[n[0],function(){n[1](void 0)}]}function N6(){var e=yo(Ii++,11);if(!e.__){for(var t=kt.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function L6(){for(var e;e=h1.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Pf),e.__H.__h.forEach(Wm),e.__H.__h=[]}catch(t){e.__H.__h=[],Wt.__e(t,e.__v)}}Wt.__b=function(e){kt=null,p1&&p1(e)},Wt.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_1&&_1(e,t)},Wt.__r=function(e){m1&&m1(e),Ii=0;var t=(kt=e.__c).__H;t&&(Qm===kt?(t.__h=[],kt.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Ff,n.__N=n.i=void 0})):(t.__h.forEach(Pf),t.__h.forEach(Wm),t.__h=[],Ii=0)),Qm=kt},Wt.diffed=function(e){g1&&g1(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(h1.push(t)!==1&&d1===Wt.requestAnimationFrame||((d1=Wt.requestAnimationFrame)||z6)(L6)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Ff&&(n.__=n.__V),n.i=void 0,n.__V=Ff})),Qm=kt=null},Wt.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Pf),n.__h=n.__h.filter(function(r){return!r.__||Wm(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],Wt.__e(r,n.__v)}}),y1&&y1(e,t)},Wt.unmount=function(e){v1&&v1(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Pf(r)}catch(a){t=a}}),n.__H=void 0,t&&Wt.__e(t,n.__v))};var E1=typeof requestAnimationFrame=="function";function z6(e){var t,n=function(){clearTimeout(r),E1&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);E1&&(t=requestAnimationFrame(n))}function Pf(e){var t=kt,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),kt=t}function Wm(e){var t=kt;e.__c=e.__(),kt=t}function Ym(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function T1(e,t){return typeof t=="function"?t(e):t}const U6=Object.defineProperty({__proto__:null,useCallback:ps,useContext:I6,useDebugValue:k6,useEffect:R6,useErrorBoundary:D6,useId:N6,useImperativeHandle:x6,useLayoutEffect:S1,useMemo:lc,useReducer:b1,useRef:M6,useState:vo},Symbol.toStringTag,{value:"Module"}),B6="http://www.w3.org/2000/svg";function H6(){const e=r=>xt.createElementNS(B6,r),t=or(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=or(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function F6({options:e}){const t=lc(()=>({__html:H6().outerHTML}),[]);return Ve("h2",{class:"dialog__header"},Ve("span",{class:"dialog__title"},e.formTitle),e.showBranding?Ve("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function P6(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function Xm(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function j6({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:a,onSubmitSuccess:s,onSubmitError:c,showEmail:f,showName:d,screenshotInput:h}){const{tags:g,addScreenshotButtonLabel:m,removeScreenshotButtonLabel:v,cancelButtonLabel:_,emailLabel:S,emailPlaceholder:E,isEmailRequired:w,isNameRequired:T,messageLabel:O,messagePlaceholder:x,nameLabel:I,namePlaceholder:M,submitButtonLabel:L,isRequiredLabel:D}=e,[G,V]=vo(!1),[ae,he]=vo(null),[te,X]=vo(!1),pe=h==null?void 0:h.input,[ce,H]=vo(null),P=ps(fe=>{H(fe),X(!1)},[]),oe=ps(fe=>{const k=P6(fe,{emailLabel:S,isEmailRequired:w,isNameRequired:T,messageLabel:O,nameLabel:I});return k.length>0?he(`Please enter in the following required fields: ${k.join(", ")}`):he(null),k.length===0},[S,w,T,O,I]),re=ps(fe=>_e(null,null,function*(){V(!0);try{if(fe.preventDefault(),!(fe.target instanceof HTMLFormElement))return;const k=new FormData(fe.target),q=yield h&&te?h.value():void 0,ue={name:Xm(k,"name"),email:Xm(k,"email"),message:Xm(k,"message"),attachments:q?[q]:void 0};if(!oe(ue))return;try{const se=yield a({name:ue.name,email:ue.email,message:ue.message,source:l6,tags:g},{attachments:ue.attachments});s(ue,se)}catch(se){Df&&Y.error(se),he(se),c(se)}}finally{V(!1)}}),[h&&te,s,c]);return Ve("form",{class:"form",onSubmit:re},pe&&te?Ve(pe,{onError:P}):null,Ve("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:G},Ve("div",{class:"form__top"},ae?Ve("div",{class:"form__error-container"},ae):null,d?Ve("label",{for:"name",class:"form__label"},Ve(Km,{label:I,isRequiredLabel:D,isRequired:T}),Ve("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:M,required:T,type:"text"})):Ve("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),f?Ve("label",{for:"email",class:"form__label"},Ve(Km,{label:S,isRequiredLabel:D,isRequired:w}),Ve("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:E,required:w,type:"email"})):Ve("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),Ve("label",{for:"message",class:"form__label"},Ve(Km,{label:O,isRequiredLabel:D,isRequired:!0}),Ve("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:x,required:!0,rows:5})),pe?Ve("label",{for:"screenshot",class:"form__label"},Ve("button",{class:"btn btn--default",disabled:G,type:"button",onClick:()=>{H(null),X(fe=>!fe)}},te?v:m),ce?Ve("div",{class:"form__error-container"},ce.message):null):null),Ve("div",{class:"btn-group"},Ve("button",{class:"btn btn--primary",disabled:G,type:"submit"},L),Ve("button",{class:"btn btn--default",disabled:G,type:"button",onClick:r},_))))}function Km({label:e,isRequired:t,isRequiredLabel:n}){return Ve("span",{class:"form__label__text"},e,t&&Ve("span",{class:"form__label__text--required"},n))}const jf=16,w1=17,q6="http://www.w3.org/2000/svg";function $6(){const e=d=>$r.document.createElementNS(q6,d),t=or(e("svg"),{width:`${jf}`,height:`${w1}`,viewBox:`0 0 ${jf} ${w1}`,fill:"inherit"}),n=or(e("g"),{clipPath:"url(#clip0_57_156)"}),r=or(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),a=or(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(a,r);const s=e("defs"),c=or(e("clipPath"),{id:"clip0_57_156"}),f=or(e("rect"),{width:`${jf}`,height:`${jf}`,fill:"white",transform:"translate(0 0.5)"});return c.appendChild(f),s.appendChild(c),t.appendChild(s).appendChild(c).appendChild(f),t}function V6(r){var a=r,{open:e,onFormSubmitted:t}=a,n=no(a,["open","onFormSubmitted"]);const s=n.options,c=lc(()=>({__html:$6().outerHTML}),[]),[f,d]=vo(null),h=ps(()=>{f&&(clearTimeout(f),d(null)),t()},[f]),g=ps((m,v)=>{n.onSubmitSuccess(m,v),d(setTimeout(()=>{t(),d(null)},d6))},[t]);return Ve(cc,null,f?Ve("div",{class:"success__position",onClick:h},Ve("div",{class:"success__content"},s.successMessageText,Ve("span",{class:"success__icon",dangerouslySetInnerHTML:c}))):Ve("dialog",{class:"dialog",onClick:s.onFormClose,open:e},Ve("div",{class:"dialog__position"},Ve("div",{class:"dialog__content",onClick:m=>{m.stopPropagation()}},Ve(F6,{options:s}),Ve(j6,ee(A({},n),{onSubmitSuccess:g}))))))}const G6=` .dialog { position: fixed; z-index: var(--z-index); margin: 0; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0; height: 100vh; width: 100vw; color: var(--dialog-color, var(--foreground)); fill: var(--dialog-color, var(--foreground)); line-height: 1.75em; background-color: rgba(0, 0, 0, 0.05); border: none; inset: 0; opacity: 1; transition: opacity 0.2s ease-in-out; } .dialog__position { position: fixed; z-index: var(--z-index); inset: var(--dialog-inset); padding: var(--page-margin); display: flex; max-height: calc(100vh - (2 * var(--page-margin))); } @media (max-width: 600px) { .dialog__position { inset: var(--page-margin); padding: 0; } } .dialog__position:has(.editor) { inset: var(--page-margin); padding: 0; } .dialog:not([open]) { opacity: 0; pointer-events: none; visibility: hidden; } .dialog:not([open]) .dialog__content { transform: translate(0, -16px) scale(0.98); } .dialog__content { display: flex; flex-direction: column; gap: 16px; padding: var(--dialog-padding, 24px); max-width: 100%; width: 100%; max-height: 100%; overflow: auto; background: var(--dialog-background, var(--background)); border-radius: var(--dialog-border-radius, 20px); border: var(--dialog-border, var(--border)); box-shadow: var(--dialog-box-shadow, var(--box-shadow)); transform: translate(0, 0) scale(1); transition: transform 0.2s ease-in-out; } `,Q6=` .dialog__header { display: flex; gap: 4px; justify-content: space-between; font-weight: var(--dialog-header-weight, 600); margin: 0; } .dialog__title { align-self: center; width: var(--form-width, 272px); } @media (max-width: 600px) { .dialog__title { width: auto; } } .dialog__position:has(.editor) .dialog__title { width: auto; } .brand-link { display: inline-flex; } .brand-link:focus-visible { outline: var(--outline); } `,W6=` .form { display: flex; overflow: auto; flex-direction: row; gap: 16px; flex: 1 0; } .form fieldset { border: none; margin: 0; padding: 0; } .form__right { flex: 0 0 auto; display: flex; overflow: auto; flex-direction: column; justify-content: space-between; gap: 20px; width: var(--form-width, 100%); } .dialog__position:has(.editor) .form__right { width: var(--form-width, 272px); } .form__top { display: flex; flex-direction: column; gap: 8px; } .form__error-container { color: var(--error-color); fill: var(--error-color); } .form__label { display: flex; flex-direction: column; gap: 4px; margin: 0px; } .form__label__text { display: flex; gap: 4px; align-items: center; } .form__label__text--required { font-size: 0.85em; } .form__input { font-family: inherit; line-height: inherit; background: transparent; box-sizing: border-box; border: var(--input-border, var(--border)); border-radius: var(--input-border-radius, 6px); color: var(--input-color, inherit); fill: var(--input-color, inherit); font-size: var(--input-font-size, inherit); font-weight: var(--input-font-weight, 500); padding: 6px 12px; } .form__input::placeholder { opacity: 0.65; color: var(--input-placeholder-color, inherit); filter: var(--interactive-filter); } .form__input:focus-visible { outline: var(--input-focus-outline, var(--outline)); } .form__input--textarea { font-family: inherit; resize: vertical; } .error { color: var(--error-color); fill: var(--error-color); } `,Y6=` .btn-group { display: grid; gap: 8px; } .btn { line-height: inherit; border: var(--button-border, var(--border)); border-radius: var(--button-border-radius, 6px); cursor: pointer; font-family: inherit; font-size: var(--button-font-size, inherit); font-weight: var(--button-font-weight, 600); padding: var(--button-padding, 6px 16px); } .btn[disabled] { opacity: 0.6; pointer-events: none; } .btn--primary { color: var(--button-primary-color, var(--accent-foreground)); fill: var(--button-primary-color, var(--accent-foreground)); background: var(--button-primary-background, var(--accent-background)); border: var(--button-primary-border, var(--border)); border-radius: var(--button-primary-border-radius, 6px); font-weight: var(--button-primary-font-weight, 500); } .btn--primary:hover { color: var(--button-primary-hover-color, var(--accent-foreground)); fill: var(--button-primary-hover-color, var(--accent-foreground)); background: var(--button-primary-hover-background, var(--accent-background)); filter: var(--interactive-filter); } .btn--primary:focus-visible { background: var(--button-primary-hover-background, var(--accent-background)); filter: var(--interactive-filter); outline: var(--button-primary-focus-outline, var(--outline)); } .btn--default { color: var(--button-color, var(--foreground)); fill: var(--button-color, var(--foreground)); background: var(--button-background, var(--background)); border: var(--button-border, var(--border)); border-radius: var(--button-border-radius, 6px); font-weight: var(--button-font-weight, 500); } .btn--default:hover { color: var(--button-color, var(--foreground)); fill: var(--button-color, var(--foreground)); background: var(--button-hover-background, var(--background)); filter: var(--interactive-filter); } .btn--default:focus-visible { background: var(--button-hover-background, var(--background)); filter: var(--interactive-filter); outline: var(--button-focus-outline, var(--outline)); } `,X6=` .success__position { position: fixed; inset: var(--dialog-inset); padding: var(--page-margin); z-index: var(--z-index); } .success__content { background: var(--success-background, var(--background)); border: var(--success-border, var(--border)); border-radius: var(--success-border-radius, 1.7em/50%); box-shadow: var(--success-box-shadow, var(--box-shadow)); font-weight: var(--success-font-weight, 600); color: var(--success-color); fill: var(--success-color); padding: 12px 24px; line-height: 1.75em; display: grid; align-items: center; grid-auto-flow: column; gap: 6px; cursor: default; } .success__icon { display: flex; } `;function K6(e){const t=xt.createElement("style");return t.textContent=` :host { --dialog-inset: var(--inset); } ${G6} ${Q6} ${W6} ${Y6} ${X6} `,e&&t.setAttribute("nonce",e),t}function J6(){const e=Ue().getUser(),t=cn().getUser(),n=is().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const Z6=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const a=r,s=e.useSentryUser,c=J6(),f=xt.createElement("div"),d=K6(e.styleNonce);let h="";const g={get el(){return f},appendToDom(){!a.contains(d)&&!a.contains(f)&&(a.appendChild(d),a.appendChild(f))},removeFromDom(){f.remove(),d.remove(),xt.body.style.overflow=h},open(){var _,S;v(!0),(_=e.onFormOpen)==null||_.call(e),(S=ye())==null||S.emit("openFeedbackWidget"),h=xt.body.style.overflow,xt.body.style.overflow="hidden"},close(){v(!1),xt.body.style.overflow=h}},m=t==null?void 0:t.createInput({h:Ve,hooks:U6,dialog:g,options:e}),v=_=>{O6(Ve(V6,{options:e,screenshotInput:m,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:s&&(c==null?void 0:c[s.name])||"",defaultEmail:s&&(c==null?void 0:c[s.email])||"",onFormClose:()=>{var S;v(!1),(S=e.onFormClose)==null||S.call(e)},onSubmit:n,onSubmitSuccess:(S,E)=>{var w;v(!1),(w=e.onSubmitSuccess)==null||w.call(e,S,E)},onSubmitError:S=>{var E;(E=e.onSubmitError)==null||E.call(e,S)},onFormSubmitted:()=>{var S;(S=e.onFormSubmitted)==null||S.call(e)},open:_}),f)};return g}}));function e7({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}function t7(e){const t=xt.createElement("style"),n="#1A141F",r="#302735";return t.textContent=` .editor { display: flex; flex-grow: 1; flex-direction: column; } .editor__image-container { justify-items: center; padding: 15px; position: relative; height: 100%; border-radius: var(--menu-border-radius, 6px); background-color: ${n}; background-image: repeating-linear-gradient( -145deg, transparent, transparent 8px, ${n} 8px, ${n} 11px ), repeating-linear-gradient( -45deg, transparent, transparent 15px, ${r} 15px, ${r} 16px ); } .editor__canvas-container { width: 100%; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; } .editor__canvas-container > * { object-fit: contain; position: absolute; } .editor__tool-container { padding-top: 8px; display: flex; justify-content: center; } .editor__tool-bar { display: flex; gap: 8px; } .editor__tool { display: flex; padding: 8px 12px; justify-content: center; align-items: center; border: var(--button-border, var(--border)); border-radius: var(--button-border-radius, 6px); background: var(--button-background, var(--background)); color: var(--button-color, var(--foreground)); } .editor__tool--active { background: var(--button-primary-background, var(--accent-background)); color: var(--button-primary-color, var(--accent-foreground)); } .editor__rect { position: absolute; z-index: 2; } .editor__rect button { opacity: 0; position: absolute; top: -12px; right: -12px; cursor: pointer; padding: 0; z-index: 3; border: none; background: none; } .editor__rect:hover button { opacity: 1; } `,e&&t.setAttribute("nonce",e),t}function n7({h:e}){return function({action:n,setAction:r,options:a}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},a.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},a.hideToolText)))}}function r7({hooks:e}){function t(){var a;const[n,r]=e.useState((a=$r.devicePixelRatio)!=null?a:1);return e.useEffect(()=>{const s=()=>{r($r.devicePixelRatio)},c=matchMedia(`(resolution: ${$r.devicePixelRatio}dppx)`);return c.addEventListener("change",s),()=>{c.removeEventListener("change",s)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:a,onAfterScreenshot:s,onError:c}){const f=t();e.useEffect(()=>{_e(null,null,function*(){r();const h=yield sc.mediaDevices.getDisplayMedia({video:{width:$r.innerWidth*f,height:$r.innerHeight*f},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),g=xt.createElement("video");yield new Promise((m,v)=>{g.srcObject=h,g.onloadedmetadata=()=>{a(g,f),h.getTracks().forEach(_=>_.stop()),m()},g.play().catch(v)}),s()}).catch(c)},[])}}function i7(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function la(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function Jm(e,t){la(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function Zm(e,t,n){la(e,{alpha:!0},(r,a)=>{n.length&&(a.fillStyle="rgba(0, 0, 0, 0.25)",a.fillRect(0,0,r.width,r.height)),n.forEach(s=>{i7(s,a,t)})})}function a7({h:e,hooks:t,outputBuffer:n,dialog:r,options:a}){const s=r7({hooks:t}),c=n7({h:e}),f=e7({h:e}),d={__html:t7(a.styleNonce).innerText},h=r.el.style,g=({screenshot:m})=>{const[v,_]=t.useState("highlight"),[S,E]=t.useState([]),w=t.useRef(null),T=t.useRef(null),O=t.useRef(null),x=t.useRef(null),[I,M]=t.useState(1),L=t.useMemo(()=>{const te=xt.getElementById(a.id);if(!te)return"white";const X=getComputedStyle(te);return X.getPropertyValue("--button-primary-background")||X.getPropertyValue("--accent-background")},[a.id]);t.useLayoutEffect(()=>{const te=()=>{const X=w.current;X&&(la(m.canvas,{alpha:!1},pe=>{const ce=Math.min(X.clientWidth/pe.width,X.clientHeight/pe.height);M(ce)}),(X.clientHeight===0||X.clientWidth===0)&&setTimeout(te,0))};return te(),$r.addEventListener("resize",te),()=>{$r.removeEventListener("resize",te)}},[m]);const D=t.useCallback((te,X)=>{la(te,{alpha:!0},(pe,ce)=>{ce.scale(X,X),pe.width=m.canvas.width,pe.height=m.canvas.height})},[m]);t.useEffect(()=>{D(T.current,m.dpi),Jm(T.current,m.canvas)},[m]),t.useEffect(()=>{D(O.current,m.dpi),la(O.current,{alpha:!0},(te,X)=>{X.clearRect(0,0,te.width,te.height)}),Zm(O.current,L,S)},[S,L]),t.useEffect(()=>{D(n,m.dpi),Jm(n,m.canvas),la(xt.createElement("canvas"),{alpha:!0},(te,X)=>{X.scale(m.dpi,m.dpi),te.width=m.canvas.width,te.height=m.canvas.height,Zm(te,L,S),Jm(n,te)})},[S,m,L]);const G=te=>{if(!v||!x.current)return;const X=x.current.getBoundingClientRect(),pe={type:v,x:te.offsetX/I,y:te.offsetY/I},ce=(oe,re)=>{const fe=(re.clientX-X.x)/I,k=(re.clientY-X.y)/I;return{type:oe.type,x:Math.min(oe.x,fe),y:Math.min(oe.y,k),w:Math.abs(fe-oe.x),h:Math.abs(k-oe.y)}},H=oe=>{la(O.current,{alpha:!0},(re,fe)=>{fe.clearRect(0,0,re.width,re.height)}),Zm(O.current,L,[...S,ce(pe,oe)])},P=oe=>{const re=ce(pe,oe);re.w*I>=1&&re.h*I>=1&&E(fe=>[...fe,re]),xt.removeEventListener("mousemove",H),xt.removeEventListener("mouseup",P)};xt.addEventListener("mousemove",H),xt.addEventListener("mouseup",P)},V=t.useCallback(te=>X=>{X.preventDefault(),X.stopPropagation(),E(pe=>{const ce=[...pe];return ce.splice(te,1),ce})},[]),ae={width:`${m.canvas.width*I}px`,height:`${m.canvas.height*I}px`},he=te=>{te.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:a.styleNonce,dangerouslySetInnerHTML:d}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:w},e("canvas",{ref:T,id:"background",style:ae}),e("canvas",{ref:O,id:"foreground",style:ae}),e("div",{ref:x,onMouseDown:G,style:ae},S.map((te,X)=>e("div",{key:X,class:"editor__rect",style:{top:`${te.y*I}px`,left:`${te.x*I}px`,width:`${te.w*I}px`,height:`${te.h*I}px`}},e("button",{"aria-label":a.removeHighlightText,onClick:V(X),onMouseDown:he,onMouseUp:he,type:"button"},e(f,null))))))),e(c,{options:a,action:v,setAction:_}))};return function({onError:v}){const[_,S]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{h.display="none"},[]),onScreenshot:t.useCallback((E,w)=>{la(xt.createElement("canvas"),{alpha:!1},(T,O)=>{O.scale(w,w),T.width=E.videoWidth,T.height=E.videoHeight,O.drawImage(E,0,0,T.width,T.height),S({canvas:T,dpi:w})}),n.width=E.videoWidth,n.height=E.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{h.display="block"},[]),onError:t.useCallback(E=>{h.display="block",v(E)},[])}),_?e(g,{screenshot:_}):e("div",null)}}const o7=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const a=xt.createElement("canvas");return{input:a7({h:e,hooks:t,outputBuffer:a,dialog:n,options:r}),value:()=>_e(null,null,function*(){const s=yield new Promise(c=>{a.toBlob(c,"image/png")});if(s)return{data:new Uint8Array(yield s.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}})}}})),Ee=ke;let eg=0;function C1(){return eg>0}function s7(){eg++,setTimeout(()=>{eg--})}function ms(e,t={}){function n(a){return typeof a=="function"}if(!n(e))return e;try{const a=e.__sentry_wrapped__;if(a)return typeof a=="function"?a:e;if(Xp(e))return e}catch(a){return e}const r=function(...a){try{const s=a.map(c=>ms(c,t));return e.apply(this,s)}catch(s){throw s7(),Wn(c=>{c.addEventProcessor(f=>(t.mechanism&&(Kp(f,void 0),Ai(f,t.mechanism)),f.extra=ee(A({},f.extra),{arguments:a}),f)),ua(s)}),s}};try{for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}catch(a){}H0(r,e),An(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch(a){}return r}function tg(){const e=oo(),{referrer:t}=Ee.document||{},{userAgent:n}=Ee.navigator||{},r=A(A({},t&&{Referer:t}),n&&{"User-Agent":n});return{url:e,headers:r}}const u7={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},A1=Ee;function O1(e,t){return _e(this,null,function*(){const n=u7[e],r=A1.Sentry=A1.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const a=r[e];if(typeof a=="function"&&!("_isShim"in a))return a;const s=c7(n),c=Ee.document.createElement("script");c.src=s,c.crossOrigin="anonymous",c.referrerPolicy="strict-origin",t&&c.setAttribute("nonce",t);const f=new Promise((m,v)=>{c.addEventListener("load",()=>m()),c.addEventListener("error",v)}),d=Ee.document.currentScript,h=Ee.document.body||Ee.document.head||(d==null?void 0:d.parentElement);if(h)h.appendChild(c);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{yield f}catch(m){throw new Error(`Error when loading integration: ${e}`)}const g=r[e];if(typeof g!="function")throw new Error(`Could not load integration: ${e}`);return g})}function c7(e){var r;const t=ye(),n=((r=t==null?void 0:t.getOptions())==null?void 0:r.cdnBaseUrl)||"https://browser.sentry-cdn.com";return new URL(`/${_i}/${e}.min.js`,n).toString()}const l7=e1({lazyLoadIntegration:O1}),R1=e1({getModalIntegration:()=>Z6,getScreenshotIntegration:()=>o7});function qf(e,t){const n=rg(e,t),r={type:m7(t),value:g7(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function f7(e,t,n,r){const a=ye(),s=a==null?void 0:a.getOptions().normalizeDepth,c=_7(t),f={__serialized__:SS(t,s)};if(c)return{exception:{values:[qf(e,c)]},extra:f};const d={exception:{values:[{type:rf(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:y7(t,{isUnhandledRejection:r})}]},extra:f};if(n){const h=rg(e,n);h.length&&(d.exception.values[0].stacktrace={frames:h})}return d}function ng(e,t){return{exception:{values:[qf(e,t)]}}}function rg(e,t){const n=t.stacktrace||t.stack||"",r=h7(t),a=p7(t);try{return e(n,r,a)}catch(s){}return[]}const d7=/Minified React error #\d+;/i;function h7(e){return e&&d7.test(e.message)?1:0}function p7(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function M1(e){return typeof WebAssembly!="undefined"&&typeof WebAssembly.Exception!="undefined"?e instanceof WebAssembly.Exception:!1}function m7(e){const t=e==null?void 0:e.name;return!t&&M1(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function g7(e){const t=e==null?void 0:e.message;return M1(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function x1(e,t,n,r){const a=(n==null?void 0:n.syntheticException)||void 0,s=ig(e,t,a,r);return Ai(s),s.level="error",n!=null&&n.event_id&&(s.event_id=n.event_id),_f(s)}function I1(e,t,n="info",r,a){const s=(r==null?void 0:r.syntheticException)||void 0,c=ag(e,t,s,a);return c.level=n,r!=null&&r.event_id&&(c.event_id=r.event_id),_f(c)}function ig(e,t,n,r,a){let s;if(N0(t)&&t.error)return ng(e,t.error);if(L0(t)||dN(t)){const c=t;if("stack"in t)s=ng(e,t);else{const f=c.name||(L0(c)?"DOMError":"DOMException"),d=c.message?`${f}: ${c.message}`:f;s=ag(e,d,n,r),Kp(s,d)}return"code"in c&&(s.tags=ee(A({},s.tags),{"DOMException.code":`${c.code}`})),s}return Ti(t)?ng(e,t):wi(t)||rf(t)?(s=f7(e,t,n,a),Ai(s,{synthetic:!0}),s):(s=ag(e,t,n,r),Kp(s,`${t}`),Ai(s,{synthetic:!0}),s)}function ag(e,t,n,r){const a={};if(r&&n){const s=rg(e,n);s.length&&(a.exception={values:[{value:t,stacktrace:{frames:s}}]}),Ai(a,{synthetic:!0})}if(nf(t)){const{__sentry_template_string__:s,__sentry_template_values__:c}=t;return a.logentry={message:s,params:c},a}return a.message=t,a}function y7(e,{isUnhandledRejection:t}){const n=vN(e),r=t?"promise rejection":"exception";return N0(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:rf(e)?`Event \`${v7(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function v7(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(t){}}function _7(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}const k1=5e3;class D1 extends S3{constructor(t){var d;const n=b7(t),r=Ee.SENTRY_SDK_SOURCE||$4();vE(n,"browser",["browser"],r),(d=n._metadata)!=null&&d.sdk&&(n._metadata.sdk.settings=A({infer_ip:n.sendDefaultPii?"auto":"never"},n._metadata.sdk.settings)),super(n);const{sendDefaultPii:a,sendClientReports:s,enableLogs:c,_experiments:f}=this._options;Ee.document&&(s||c||f!=null&&f.enableMetrics)&&Ee.document.addEventListener("visibilitychange",()=>{Ee.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),c&&Af(this),f!=null&&f.enableMetrics&&Of(this))}),c&&(this.on("flush",()=>{Af(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Af(this)},k1)})),f!=null&&f.enableMetrics&&(this.on("flush",()=>{Of(this)}),this.on("afterCaptureMetric",()=>{this._metricFlushIdleTimeout&&clearTimeout(this._metricFlushIdleTimeout),this._metricFlushIdleTimeout=setTimeout(()=>{Of(this)},k1)})),a&&this.on("beforeSendSession",Z3)}eventFromException(t,n){return x1(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return I1(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,a){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,a)}}function b7(e){var t;return A({release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(t=Ee.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},e)}const gs=typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__,ze=ke,S7=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",fc=(e,t,n,r)=>{let a,s;return c=>{t.value>=0&&(c||r)&&(s=t.value-(a!=null?a:0),(s||a===void 0)&&(a=t.value,t.delta=s,t.rating=S7(t.value,n),e(t)))}},E7=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,dc=(e=!0)=>{var n,r;const t=(r=(n=ze.performance)==null?void 0:n.getEntriesByType)==null?void 0:r.call(n,"navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart{var t;const e=dc();return(t=e==null?void 0:e.activationStart)!=null?t:0},hc=(e,t=-1)=>{var s,c;const n=dc();let r="navigate";return n&&((s=ze.document)!=null&&s.prerendering||ys()>0?r="prerender":(c=ze.document)!=null&&c.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:E7(),navigationType:r}},og=new WeakMap;function sg(e,t){return og.get(e)||og.set(e,new t),og.get(e)}class $f{constructor(){$f.prototype.__init.call(this),$f.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){var a;if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),(a=this._onAfterProcessingUnexpectedShift)==null||a.call(this,t)}}const vs=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(a=>{Promise.resolve().then(()=>{t(a.getEntries())})});return r.observe(A({type:e,buffered:!0},n)),r}}catch(r){}},ug=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let pc=-1;const T7=()=>{var e,t;return((e=ze.document)==null?void 0:e.visibilityState)==="hidden"&&!((t=ze.document)!=null&&t.prerendering)?0:1/0},Vf=e=>{ze.document.visibilityState==="hidden"&&pc>-1&&(pc=e.type==="visibilitychange"?e.timeStamp:0,C7())},w7=()=>{addEventListener("visibilitychange",Vf,!0),addEventListener("prerenderingchange",Vf,!0)},C7=()=>{removeEventListener("visibilitychange",Vf,!0),removeEventListener("prerenderingchange",Vf,!0)},cg=()=>{var e;if(ze.document&&pc<0){const t=ys(),n=ze.document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>t)[0])==null?void 0:e.startTime;pc=n!=null?n:T7(),w7()}return{get firstHiddenTime(){return pc}}},Gf=e=>{var t;(t=ze.document)!=null&&t.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},A7=[1800,3e3],O7=(e,t={})=>{Gf(()=>{const n=cg(),r=hc("FCP");let a;const c=vs("paint",f=>{for(const d of f)d.name==="first-contentful-paint"&&(c.disconnect(),d.startTime{O7(ug(()=>{var f,d;const n=hc("CLS",0);let r;const a=sg(t,$f),s=h=>{for(const g of h)a._processEntry(g);a._sessionValue>n.value&&(n.value=a._sessionValue,n.entries=a._sessionEntries,r())},c=vs("layout-shift",s);c&&(r=fc(e,n,R7,t.reportAllChanges),(f=ze.document)==null||f.addEventListener("visibilitychange",()=>{var h;((h=ze.document)==null?void 0:h.visibilityState)==="hidden"&&(s(c.takeRecords()),r(!0))}),(d=ze==null?void 0:ze.setTimeout)==null||d.call(ze,r))}))};let N1=0,lg=1/0,Qf=0;const x7=e=>{e.forEach(t=>{t.interactionId&&(lg=Math.min(lg,t.interactionId),Qf=Math.max(Qf,t.interactionId),N1=Qf?(Qf-lg)/7+1:0)})};let fg;const L1=()=>fg?N1:performance.interactionCount||0,I7=()=>{"interactionCount"in performance||fg||(fg=vs("event",x7,{type:"event",buffered:!0,durationThreshold:0}))},dg=10;let z1=0;const k7=()=>L1()-z1;class Wf{constructor(){Wf.prototype.__init.call(this),Wf.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){z1=L1(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(k7()/50));return this._longestInteractionList[t]}_processEntry(t){var a,s;if((a=this._onBeforeProcessingEntry)==null||a.call(this,t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.lengthn._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((c,f)=>f._latency-c._latency),this._longestInteractionList.length>dg){const c=this._longestInteractionList.splice(dg);for(const f of c)this._longestInteractionMap.delete(f.id)}(s=this._onAfterProcessingINPCandidate)==null||s.call(this,r)}}}const hg=e=>{const t=n=>{var r;(n.type==="pagehide"||((r=ze.document)==null?void 0:r.visibilityState)==="hidden")&&e(n)};ze.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},U1=e=>{var n;const t=ze.requestIdleCallback||ze.setTimeout;((n=ze.document)==null?void 0:n.visibilityState)==="hidden"?e():(e=ug(e),t(e),hg(e))},D7=[200,500],N7=40,L7=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Gf(()=>{var f;I7();const n=hc("INP");let r;const a=sg(t,Wf),s=d=>{U1(()=>{for(const g of d)a._processEntry(g);const h=a._estimateP98LongestInteraction();h&&h._latency!==n.value&&(n.value=h._latency,n.entries=h.entries,r())})},c=vs("event",s,{durationThreshold:(f=t.durationThreshold)!=null?f:N7});r=fc(e,n,D7,t.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),hg(()=>{s(c.takeRecords()),r(!0)}))})};class z7{_processEntry(t){var n;(n=this._onBeforeProcessingEntry)==null||n.call(this,t)}}const U7=[2500,4e3],B7=(e,t={})=>{Gf(()=>{const n=cg(),r=hc("LCP");let a;const s=sg(t,z7),c=d=>{t.reportAllChanges||(d=d.slice(-1));for(const h of d)s._processEntry(h),h.startTime{c(f.takeRecords()),f.disconnect(),a(!0)});for(const h of["keydown","click","visibilitychange"])ze.document&&addEventListener(h,()=>U1(d),{capture:!0,once:!0})}})},H7=[800,1800],pg=e=>{var t,n;(t=ze.document)!=null&&t.prerendering?Gf(()=>pg(e)):((n=ze.document)==null?void 0:n.readyState)!=="complete"?addEventListener("load",()=>pg(e),!0):setTimeout(e)},F7=(e,t={})=>{const n=hc("TTFB"),r=fc(e,n,H7,t.reportAllChanges);pg(()=>{const a=dc();a&&(n.value=Math.max(a.responseStart-ys(),0),n.entries=[a],r(!0))})},mc={},Yf={};let B1,H1,F1,P1;function mg(e,t=!1){return Xf("cls",e,j7,B1,t)}function gg(e,t=!1){return Xf("lcp",e,q7,H1,t)}function P7(e){return Xf("ttfb",e,$7,F1)}function j1(e){return Xf("inp",e,V7,P1)}function _o(e,t){return q1(e,t),Yf[e]||(G7(e),Yf[e]=!0),$1(e,t)}function gc(e,t){const n=mc[e];if(n!=null&&n.length)for(const r of n)try{r(t)}catch(a){gs&&Y.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${Ei(r)} Error:`,a)}}function j7(){return M7(e=>{gc("cls",{metric:e}),B1=e},{reportAllChanges:!0})}function q7(){return B7(e=>{gc("lcp",{metric:e}),H1=e},{reportAllChanges:!0})}function $7(){return F7(e=>{gc("ttfb",{metric:e}),F1=e})}function V7(){return L7(e=>{gc("inp",{metric:e}),P1=e})}function Xf(e,t,n,r,a=!1){q1(e,t);let s;return Yf[e]||(s=n(),Yf[e]=!0),r&&t({metric:r}),$1(e,t,a?s:void 0)}function G7(e){const t={};e==="event"&&(t.durationThreshold=0),vs(e,n=>{gc(e,{entries:n})},t)}function q1(e,t){mc[e]=mc[e]||[],mc[e].push(t)}function $1(e,t,n){return()=>{n&&n();const r=mc[e];if(!r)return;const a=r.indexOf(t);a!==-1&&r.splice(a,1)}}function Q7(e){return"duration"in e}function yg(e){return typeof e=="number"&&isFinite(e)}function fa(e,t,n,a){var r=no(a,[]);const s=Me(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),po(e,()=>{const c=vr(A({startTime:t},r));return c&&c.end(n),c})}function vg(e){var w;const t=ye();if(!t)return;const{name:n,transaction:r,attributes:a,startTime:s}=e,{release:c,environment:f,sendDefaultPii:d}=t.getOptions(),h=t.getIntegrationByName("Replay"),g=h==null?void 0:h.getReplayId(),m=Ue(),v=m.getUser(),_=v!==void 0?v.email||v.id||v.ip_address:void 0;let S;try{S=m.getScopeData().contexts.profile.profile_id}catch(T){}const E=A({release:c,environment:f,user:_||void 0,profile_id:S||void 0,replay_id:g||void 0,transaction:r,"user_agent.original":(w=ze.navigator)==null?void 0:w.userAgent,"client.address":d?"{{auto}}":void 0},a);return vr({name:n,attributes:E,startTime:s,experimental:{standalone:!0}})}function yc(){return ze.addEventListener&&ze.performance}function Kt(e){return e/1e3}function W7(e){let t="unknown",n="unknown",r="";for(const a of e){if(a==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(a))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=a}return r===e&&(t=r),{name:t,version:n}}function V1(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch(t){return!1}}function G1(e,t){let n,r=!1;function a(f){!r&&n&&t(f,n),r=!0}hg(()=>{a("pagehide")});const s=e.on("beforeStartNavigationSpan",(f,d)=>{d!=null&&d.isRedirect||(a("navigation"),s(),c())}),c=e.on("afterStartPageLoadSpan",f=>{n=f.spanContext().spanId,c()})}function Y7(e){let t=0,n;if(!V1("layout-shift"))return;const r=mg(({metric:a})=>{const s=a.entries[a.entries.length-1];s&&(t=a.value,n=s)},!0);G1(e,(a,s)=>{X7(t,n,s,a),r()})}function X7(e,t,n,r){var h;gs&&Y.log(`Sending CLS span (${e})`);const a=t?Kt((jn()||0)+t.startTime):Bt(),s=Ue().getScopeData().transactionName,c=t?yr((h=t.sources[0])==null?void 0:h.node):"Layout shift",f={[Ze]:"auto.http.browser.cls",[rn]:"ui.webvital.cls",[as]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t!=null&&t.sources&&t.sources.forEach((g,m)=>{f[`cls.source.${m+1}`]=yr(g.node)});const d=vg({name:c,transaction:s,attributes:f,startTime:a});d&&(d.addEvent("cls",{[Zu]:"",[ec]:e}),d.end(a))}function K7(e){let t=0,n;if(!V1("largest-contentful-paint"))return;const r=gg(({metric:a})=>{const s=a.entries[a.entries.length-1];s&&(t=a.value,n=s)},!0);G1(e,(a,s)=>{J7(t,n,s,a),r()})}function J7(e,t,n,r){gs&&Y.log(`Sending LCP span (${e})`);const a=Kt((jn()||0)+((t==null?void 0:t.startTime)||0)),s=Ue().getScopeData().transactionName,c=t?yr(t.element):"Largest contentful paint",f={[Ze]:"auto.http.browser.lcp",[rn]:"ui.webvital.lcp",[as]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(f["lcp.element"]=yr(t.element)),t.id&&(f["lcp.id"]=t.id),t.url&&(f["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(f["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(f["lcp.renderTime"]=t.renderTime),t.size!=null&&(f["lcp.size"]=t.size));const d=vg({name:c,transaction:s,attributes:f,startTime:a});d&&(d.addEvent("lcp",{[Zu]:"millisecond",[ec]:e}),d.end(a))}function _r(e){return e&&((jn()||performance.timeOrigin)+e)/1e3}function Q1(e){var n;const t={};if(e.nextHopProtocol!=null){const{name:r,version:a}=W7(e.nextHopProtocol);t["network.protocol.version"]=a,t["network.protocol.name"]=r}return jn()||(n=yc())!=null&&n.timeOrigin?Z7(ee(A({},t),{"http.request.redirect_start":_r(e.redirectStart),"http.request.redirect_end":_r(e.redirectEnd),"http.request.worker_start":_r(e.workerStart),"http.request.fetch_start":_r(e.fetchStart),"http.request.domain_lookup_start":_r(e.domainLookupStart),"http.request.domain_lookup_end":_r(e.domainLookupEnd),"http.request.connect_start":_r(e.connectStart),"http.request.secure_connection_start":_r(e.secureConnectionStart),"http.request.connection_end":_r(e.connectEnd),"http.request.request_start":_r(e.requestStart),"http.request.response_start":_r(e.responseStart),"http.request.response_end":_r(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0})):t}function Z7(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const e8=2147483647;let W1=0,Vr={},Yn,_s;function t8({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=yc();if(r&&jn()){r.mark&&ze.performance.mark("sentry-tracing-init");const a=t?K7(n):o8(),s=s8(),c=e?Y7(n):a8();return()=>{a==null||a(),s(),c==null||c()}}return()=>{}}function n8(){_o("longtask",({entries:e})=>{const t=Qt();if(!t)return;const{op:n,start_timestamp:r}=Me(t);for(const a of e){const s=Kt(jn()+a.startTime),c=Kt(a.duration);n==="navigation"&&r&&s{const n=Qt();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const a=Kt(jn()+r.startTime),{start_timestamp:s,op:c}=Me(n);if(c==="navigation"&&s&&a{const t=Qt();if(t){for(const n of e)if(n.name==="click"){const r=Kt(jn()+n.startTime),a=Kt(n.duration),s={name:yr(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[Ze]:"auto.ui.browser.metrics"}},c=B0(n.target);c&&(s.attributes["ui.component_name"]=c),fa(t,r,r+a,s)}}})}function a8(){return mg(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Vr.cls={value:e.value,unit:""},_s=t)},!0)}function o8(){return gg(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Vr.lcp={value:e.value,unit:"millisecond"},Yn=t)},!0)}function s8(){return P7(({metric:e})=>{e.entries[e.entries.length-1]&&(Vr.ttfb={value:e.value,unit:"millisecond"})})}function u8(e,t){const n=yc(),r=jn();if(!(n!=null&&n.getEntries)||!r)return;const a=Kt(r),s=n.getEntries(),{op:c,start_timestamp:f}=Me(e);s.slice(W1).forEach(d=>{const h=Kt(d.startTime),g=Kt(Math.max(0,d.duration));if(!(c==="navigation"&&f&&a+h{CS(d,h.value,h.unit)}),e.setAttribute("performance.timeOrigin",a),e.setAttribute("performance.activationStart",ys()),g8(e,t)),Yn=void 0,_s=void 0,Vr={}}function c8(e,t,n,r,a,s){if(["mark","measure"].includes(t.entryType)&&Hr(t.name,s))return;const c=dc(!1),f=Kt(c?c.requestStart:0),d=a+Math.max(n,f),h=a+n,g=h+r,m={[Ze]:"auto.resource.browser.metrics"};d!==h&&(m["sentry.browser.measure_happened_before_request"]=!0,m["sentry.browser.measure_start_time"]=d),l8(m,t),d<=g&&fa(e,d,g,{name:t.name,op:t.entryType,attributes:m})}function l8(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,a]of Object.entries(n))if(a&&Zo(a))e[`sentry.browser.measure.detail.${r}`]=a;else if(a!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(a)}catch(s){}return}if(Zo(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch(r){}}catch(n){}}function f8(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Kf(e,t,r,n)}),Kf(e,t,"secureConnection",n,"TLS/SSL"),Kf(e,t,"fetch",n,"cache"),Kf(e,t,"domainLookup",n,"DNS"),h8(e,t,n)}function Kf(e,t,n,r,a=n){const s=d8(n),c=t[s],f=t[`${n}Start`];!f||!c||fa(e,r+Kt(f),r+Kt(c),{op:`browser.${a}`,name:t.name,attributes:A({[Ze]:"auto.ui.browser.metrics"},n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{})})}function d8(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function h8(e,t,n){const r=n+Kt(t.requestStart),a=n+Kt(t.responseEnd),s=n+Kt(t.responseStart);t.responseEnd&&(fa(e,r,a,{op:"browser.request",name:t.name,attributes:{[Ze]:"auto.ui.browser.metrics"}}),fa(e,s,a,{op:"browser.response",name:t.name,attributes:{[Ze]:"auto.ui.browser.metrics"}}))}function p8(e,t,n,r,a,s,c){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const f=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(c!=null&&c.includes(f))return;const d={[Ze]:"auto.resource.browser.metrics"},h=mo(n);h.protocol&&(d["url.scheme"]=h.protocol.split(":").pop()),h.host&&(d["server.address"]=h.host),d["url.same_origin"]=n.includes(ze.location.origin),y8(t,d,[["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"]]);const g=A(A({},d),Q1(t)),m=s+r,v=m+a;fa(e,m,v,{name:n.replace(ze.location.origin,""),op:f,attributes:g})}function m8(e){const t=ze.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),yg(n.rtt)&&(Vr["connection.rtt"]={value:n.rtt,unit:"millisecond"})),yg(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),yg(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function g8(e,t){Yn&&t.recordLcpOnPageloadSpan&&(Yn.element&&e.setAttribute("lcp.element",yr(Yn.element)),Yn.id&&e.setAttribute("lcp.id",Yn.id),Yn.url&&e.setAttribute("lcp.url",Yn.url.trim().slice(0,200)),Yn.loadTime!=null&&e.setAttribute("lcp.loadTime",Yn.loadTime),Yn.renderTime!=null&&e.setAttribute("lcp.renderTime",Yn.renderTime),e.setAttribute("lcp.size",Yn.size)),_s!=null&&_s.sources&&t.recordClsOnPageloadSpan&&_s.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,yr(n.node)))}function y8(e,t,n){n.forEach(([r,a])=>{const s=e[r];s!=null&&(typeof s=="number"&&s{}}const b8=({entries:e})=>{const t=Qt(),n=t?an(t):void 0,r=n?Me(n).description:Ue().getScopeData().transactionName;e.forEach(a=>{var _,S;const s=a;if(!s.identifier)return;const c=s.name,f=s.renderTime,d=s.loadTime,[h,g]=d?[Kt(d),"load-time"]:f?[Kt(f),"render-time"]:[Bt(),"entry-emission"],m=c==="image-paint"?Kt(Math.max(0,(f!=null?f:0)-(d!=null?d:0))):0,v={[Ze]:"auto.ui.browser.elementtiming",[rn]:"ui.elementtiming",[jt]:"component","sentry.span_start_time_source":g,"sentry.transaction_name":r,"element.id":s.id,"element.type":((S=(_=s.element)==null?void 0:_.tagName)==null?void 0:S.toLowerCase())||"unknown","element.size":s.naturalWidth&&s.naturalHeight?`${s.naturalWidth}x${s.naturalHeight}`:void 0,"element.render_time":f,"element.load_time":d,"element.url":s.url||void 0,"element.identifier":s.identifier,"element.paint_type":c};yf({name:`element[${s.identifier}]`,attributes:v,startTime:h,onlyIfParent:!0},E=>{E.end(h+m)})})},S8=1e3;let Y1,_g,bg;function X1(e){ra("dom",e),ia("dom",E8)}function E8(){if(!ze.document)return;const e=gr.bind(null,"dom"),t=K1(e,!0);ze.document.addEventListener("click",t,!1),ze.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{var s,c;const a=(s=ze[n])==null?void 0:s.prototype;(c=a==null?void 0:a.hasOwnProperty)!=null&&c.call(a,"addEventListener")&&(Fn(a,"addEventListener",function(f){return function(d,h,g){if(d==="click"||d=="keypress")try{const m=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},v=m[d]=m[d]||{refCount:0};if(!v.handler){const _=K1(e);v.handler=_,f.call(this,d,_,g)}v.refCount++}catch(m){}return f.call(this,d,h,g)}}),Fn(a,"removeEventListener",function(f){return function(d,h,g){if(d==="click"||d=="keypress")try{const m=this.__sentry_instrumentation_handlers__||{},v=m[d];v&&(v.refCount--,v.refCount<=0&&(f.call(this,d,v.handler,g),v.handler=void 0,delete m[d]),Object.keys(m).length===0&&delete this.__sentry_instrumentation_handlers__)}catch(m){}return f.call(this,d,h,g)}}))})}function T8(e){if(e.type!==_g)return!1;try{if(!e.target||e.target._sentryId!==bg)return!1}catch(t){}return!0}function w8(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function K1(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=C8(n);if(w8(n.type,r))return;An(n,"_sentryCaptured",!0),r&&!r._sentryId&&An(r,"_sentryId",Pn());const a=n.type==="keypress"?"input":n.type;T8(n)||(e({event:n,name:a,global:t}),_g=n.type,bg=r?r._sentryId:void 0),clearTimeout(Y1),Y1=ze.setTimeout(()=>{bg=void 0,_g=void 0},S8)}}function C8(e){try{return e.target}catch(t){return null}}let Jf;function Zf(e){const t="history";ra(t,e),ia(t,A8)}function A8(){if(ze.addEventListener("popstate",()=>{const t=ze.location.href,n=Jf;if(Jf=t,n===t)return;gr("history",{from:n,to:t})}),!L4())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const a=Jf,s=O8(String(r));if(Jf=s,a===s)return t.apply(this,n);gr("history",{from:a,to:s})}return t.apply(this,n)}}Fn(ze.history,"pushState",e),Fn(ze.history,"replaceState",e)}function O8(e){try{return new URL(e,ze.location.origin).toString()}catch(t){return e}}const ed={};function Sg(e){const t=ed[e];if(t)return t;let n=ze[e];if(zm(n))return ed[e]=n.bind(ze);const r=ze.document;if(r&&typeof r.createElement=="function")try{const a=r.createElement("iframe");a.hidden=!0,r.head.appendChild(a);const s=a.contentWindow;s!=null&&s[e]&&(n=s[e]),r.head.removeChild(a)}catch(a){gs&&Y.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,a)}return n&&(ed[e]=n.bind(ze))}function R8(e){ed[e]=void 0}function vc(...e){return Sg("setTimeout")(...e)}const ki="__sentry_xhr_v3__";function Eg(e){ra("xhr",e),ia("xhr",M8)}function M8(){if(!ze.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const a=new Error,s=Bt()*1e3,c=Br(r[0])?r[0].toUpperCase():void 0,f=x8(r[1]);if(!c||!f)return t.apply(n,r);n[ki]={method:c,url:f,request_headers:{}},c==="POST"&&f.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const d=()=>{const h=n[ki];if(h&&n.readyState===4){try{h.status_code=n.status}catch(m){}const g={endTimestamp:Bt()*1e3,startTimestamp:s,xhr:n,virtualError:a};gr("xhr",g)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(h,g,m){return d(),h.apply(g,m)}}):n.addEventListener("readystatechange",d),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(h,g,m){const[v,_]=m,S=g[ki];return S&&Br(v)&&Br(_)&&(S.request_headers[v.toLowerCase()]=_),h.apply(g,m)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const a=n[ki];if(!a)return t.apply(n,r);r[0]!==void 0&&(a.body=r[0]);const s={startTimestamp:Bt()*1e3,xhr:n};return gr("xhr",s),t.apply(n,r)}})}function x8(e){if(Br(e))return e;try{return e.toString()}catch(t){}}function J1(e){return new URLSearchParams(e).toString()}function td(e,t=Y){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[J1(e)];if(!e)return[void 0]}catch(n){return gs&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return gs&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Tg(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}const wg=[],nd=new Map,I8=60;function k8(){if(yc()&&jn()){const t=D8();return()=>{t()}}return()=>{}}const Z1={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 D8(){return j1(N8)}const N8=({metric:e})=>{if(e.value==null)return;const t=Kt(e.value);if(t>I8)return;const n=e.entries.find(S=>S.duration===e.value&&Z1[S.name]);if(!n)return;const{interactionId:r}=n,a=Z1[n.name],s=Kt(jn()+n.startTime),c=Qt(),f=c?an(c):void 0,h=(r!=null?nd.get(r):void 0)||f,g=h?Me(h).description:Ue().getScopeData().transactionName,m=yr(n.target),v={[Ze]:"auto.http.browser.inp",[rn]:`ui.interaction.${a}`,[as]:n.duration},_=vg({name:m,transaction:g,attributes:v,startTime:s});_&&(_.addEvent("inp",{[Zu]:"millisecond",[ec]:e.value}),_.end(s+t))};function L8(){const e=({entries:t})=>{const n=Qt(),r=n&&an(n);t.forEach(a=>{if(!Q7(a)||!r)return;const s=a.interactionId;if(s!=null&&!nd.has(s)){if(wg.length>10){const c=wg.shift();nd.delete(c)}wg.push(s),nd.set(s,r)}})};_o("event",e),_o("first-input",e)}function Cg(e,t=Sg("fetch")){let n=0,r=0;function a(s){return _e(this,null,function*(){const c=s.body.length;n+=c,r++;const f=A({body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);try{const d=yield t(e.url,f);return{statusCode:d.status,headers:{"x-sentry-rate-limits":d.headers.get("X-Sentry-Rate-Limits"),"retry-after":d.headers.get("Retry-After")}}}catch(d){throw R8("fetch"),d}finally{n-=c,r--}})}return dE(e,a)}const z8=10,U8=20,B8=30,H8=40,F8=50;function bs(e,t,n,r){const a={filename:e,function:t===""?ri:t,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}const P8=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,j8=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,q8=/\((\S*)(?::(\d+))(?::(\d+))\)/,$8=/at (.+?) ?\(data:(.+?),/,eT=[B8,e=>{const t=e.match($8);if(t)return{filename:``,function:t[1]};const n=P8.exec(e);if(n){const[,a,s,c]=n;return bs(a,ri,+s,+c)}const r=j8.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const f=q8.exec(r[2]);f&&(r[2]=f[1],r[3]=f[2],r[4]=f[3])}const[s,c]=iT(r[1]||ri,r[2]);return bs(c,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],V8=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,G8=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,tT=[F8,e=>{const t=V8.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=G8.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],a=t[1]||ri;return[a,r]=iT(a,r),bs(r,a,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],Q8=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,W8=[H8,e=>{const t=Q8.exec(e);return t?bs(t[2],t[1]||ri,+t[3],t[4]?+t[4]:void 0):void 0}],Y8=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,X8=[z8,e=>{const t=Y8.exec(e);return t?bs(t[2],t[3]||ri,+t[1]):void 0}],K8=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,J8=[U8,e=>{const t=K8.exec(e);return t?bs(t[5],t[3]||t[4]||ri,+t[1],+t[2]):void 0}],nT=[eT,tT],rT=M0(...nT),iT=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:ri,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function Z8(e,{metadata:t,tunnel:n,dsn:r}){const a=A(A({event_id:e.event_id,sent_at:new Date().toISOString()},(t==null?void 0:t.sdk)&&{sdk:{name:t.sdk.name,version:t.sdk.version}}),!!n&&!!r&&{dsn:oa(r)}),s=ez(e);return ai(a,[s])}function ez(e){return[{type:"user_report"},e]}const Ge=typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__,rd=1024,tz="Breadcrumbs",aT=((e={})=>{const t=A({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:tz,setup(n){t.console&&km(iz(n)),t.dom&&X1(rz(n,t.dom)),t.xhr&&Eg(az(n)),t.fetch&&Um(oz(n)),t.history&&Zf(sz(n)),t.sentry&&n.on("beforeSendEvent",nz(n))}}});function nz(e){return function(n){ye()===e&&qr({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:so(n)},{event:n})}}function rz(e,t){return function(r){if(ye()!==e)return;let a,s,c=typeof t=="object"?t.serializeAttribute:void 0,f=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;f&&f>rd&&(Ge&&Y.warn(`\`dom.maxStringLength\` cannot exceed ${rd}, but a value of ${f} was configured. Sentry will use ${rd} instead.`),f=rd),typeof c=="string"&&(c=[c]);try{const h=r.event,g=uz(h)?h.target:h;a=yr(g,{keyAttrs:c,maxStringLength:f}),s=B0(g)}catch(h){a=""}if(a.length===0)return;const d={category:`ui.${r.name}`,message:a};s&&(d.data={"ui.component_name":s}),qr(d,{event:r.event,name:r.name,global:r.global})}}function iz(e){return function(n){if(ye()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Dm(n.level),message:af(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${af(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;qr(r,{input:n.args,level:n.level})}}function az(e){return function(n){if(ye()!==e)return;const{startTimestamp:r,endTimestamp:a}=n,s=n.xhr[ki];if(!r||!a||!s)return;const{method:c,url:f,status_code:d,body:h}=s,g={method:c,url:f,status_code:d},m={xhr:n.xhr,input:h,startTimestamp:r,endTimestamp:a},v={category:"xhr",data:g,type:"http",level:VE(d)};e.emit("beforeOutgoingRequestBreadcrumb",v,m),qr(v,m)}}function oz(e){return function(n){if(ye()!==e)return;const{startTimestamp:r,endTimestamp:a}=n;if(a&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const s=n.fetchData,c={data:n.error,input:n.args,startTimestamp:r,endTimestamp:a},f={category:"fetch",data:s,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",f,c),qr(f,c)}else{const s=n.response,c=ee(A({},n.fetchData),{status_code:s==null?void 0:s.status});n.fetchData.request_body_size,n.fetchData.response_body_size,s==null||s.status;const f={input:n.args,response:s,startTimestamp:r,endTimestamp:a},d={category:"fetch",data:c,type:"http",level:VE(c.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",d,f),qr(d,f)}}}function sz(e){return function(n){if(ye()!==e)return;let r=n.from,a=n.to;const s=mo(Ee.location.href);let c=r?mo(r):void 0;const f=mo(a);c!=null&&c.path||(c=s),s.protocol===f.protocol&&s.host===f.host&&(a=f.relative),s.protocol===c.protocol&&s.host===c.host&&(r=c.relative),qr({category:"navigation",data:{from:r,to:a}})}}function uz(e){return!!e&&!!e.target}const cz=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],lz="BrowserApiErrors",oT=((e={})=>{const t=A({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},e);return{name:lz,setupOnce(){t.setTimeout&&Fn(Ee,"setTimeout",sT),t.setInterval&&Fn(Ee,"setInterval",sT),t.requestAnimationFrame&&Fn(Ee,"requestAnimationFrame",fz),t.XMLHttpRequest&&"XMLHttpRequest"in Ee&&Fn(XMLHttpRequest.prototype,"send",dz);const n=t.eventTarget;n&&(Array.isArray(n)?n:cz).forEach(a=>hz(a,t))}}});function sT(e){return function(...t){const n=t[0];return t[0]=ms(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Ei(e)}`}}),e.apply(this,t)}}function fz(e){return function(t){return e.apply(this,[ms(t,{mechanism:{data:{handler:Ei(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function dz(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&Fn(n,a,function(s){const c={mechanism:{data:{handler:Ei(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${a}`}},f=Xp(s);return f&&(c.mechanism.data.handler=Ei(f)),ms(s,c)})}),e.apply(this,t)}}function hz(e,t){var a,s;const r=(a=Ee[e])==null?void 0:a.prototype;(s=r==null?void 0:r.hasOwnProperty)!=null&&s.call(r,"addEventListener")&&(Fn(r,"addEventListener",function(c){return function(f,d,h){try{pz(d)&&(d.handleEvent=ms(d.handleEvent,{mechanism:{data:{handler:Ei(d),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch(g){}return t.unregisterOriginalCallbacks&&mz(this,f,d),c.apply(this,[f,ms(d,{mechanism:{data:{handler:Ei(d),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),h])}}),Fn(r,"removeEventListener",function(c){return function(f,d,h){try{const g=d.__sentry_wrapped__;g&&c.call(this,f,g,h)}catch(g){}return c.call(this,f,d,h)}}))}function pz(e){return typeof e.handleEvent=="function"}function mz(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const uT=()=>({name:"BrowserSession",setupOnce(){if(typeof Ee.document=="undefined"){Ge&&Y.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}vm({ignoreDuration:!0}),bm(),Zf(({from:e,to:t})=>{e!==void 0&&e!==t&&(vm({ignoreDuration:!0}),bm())})}}),gz="GlobalHandlers",cT=((e={})=>{const t=A({onerror:!0,onunhandledrejection:!0},e);return{name:gz,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(yz(n),lT("onerror")),t.onunhandledrejection&&(vz(n),lT("onunhandledrejection"))}}});function yz(e){I0(t=>{const{stackParser:n,attachStacktrace:r}=fT();if(ye()!==e||C1())return;const{msg:a,url:s,line:c,column:f,error:d}=t,h=Sz(ig(n,d||a,void 0,r,!1),s,c,f);h.level="error",ac(h,{originalException:d,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function vz(e){k0(t=>{const{stackParser:n,attachStacktrace:r}=fT();if(ye()!==e||C1())return;const a=_z(t),s=Zo(a)?bz(a):ig(n,a,void 0,r,!0);s.level="error",ac(s,{originalException:a,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function _z(e){if(Zo(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(t){}return e}function bz(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Sz(e,t,n,r){var v;const a=e.exception=e.exception||{},s=a.values=a.values||[],c=s[0]=s[0]||{},f=c.stacktrace=c.stacktrace||{},d=f.frames=f.frames||[],h=r,g=n,m=(v=Ez(t))!=null?v:oo();return d.length===0&&d.push({colno:h,filename:m,function:ri,in_app:!0,lineno:g}),e}function lT(e){Ge&&Y.log(`Global Handler attached: ${e}`)}function fT(){const e=ye();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function Ez(e){if(!(!Br(e)||e.length===0)){if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/),n=t?t[1]:"text/javascript",r=e.includes("base64,");return``}return e.slice(0,1024)}}const dT=()=>({name:"HttpContext",preprocessEvent(e){var r;if(!Ee.navigator&&!Ee.location&&!Ee.document)return;const t=tg(),n=A(A({},t.headers),(r=e.request)==null?void 0:r.headers);e.request=ee(A(A({},t),e.request),{headers:n})}}),Tz="cause",wz=5,Cz="LinkedErrors",hT=((e={})=>{const t=e.limit||wz,n=e.key||Tz;return{name:Cz,preprocessEvent(r,a,s){const c=s.getOptions();pL(qf,c.stackParser,n,t,r,a)}}});function Az(){return Oz()?(Ge&&Si(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function Oz(){var s;if(typeof Ee.window=="undefined")return!1;const e=Ee;if(e.nw)return!1;const t=e.chrome||e.browser;if(!((s=t==null?void 0:t.runtime)!=null&&s.id))return!1;const n=oo(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Ee===Ee.top&&r.some(c=>n.startsWith(`${c}://`)))}function pT(e){return[TE(),SE(),oT(),aT(),cT(),hT(),IE(),dT(),uT()]}function Rz(e={}){const t=!e.skipBrowserExtensionCheck&&Az(),n=ee(A({},e),{enabled:t?!1:e.enabled,stackParser:uN(e.stackParser||rT),integrations:g3({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?pT():e.defaultIntegrations}),transport:e.transport||Cg});return B3(D1,n)}function Mz(){}function xz(e){e()}function Ag(e={}){const t=Ee.document,n=(t==null?void 0:t.head)||(t==null?void 0:t.body);if(!n){Ge&&Y.error("[showReportDialog] Global document not defined");return}const r=Ue(),a=ye(),s=a==null?void 0:a.getDsn();if(!s){Ge&&Y.error("[showReportDialog] DSN not configured");return}const c=ee(A({},e),{user:A(A({},r.getUser()),e.user),eventId:e.eventId||PS()}),f=Ee.document.createElement("script");f.async=!0,f.crossOrigin="anonymous",f.src=p3(s,c);const{onLoad:d,onClose:h}=c;if(d&&(f.onload=d),h){const g=m=>{if(m.data==="__sentry_reportdialog_closed__")try{h()}finally{Ee.removeEventListener("message",g)}};Ee.addEventListener("message",g)}n.appendChild(f)}const Iz=ke,kz="ReportingObserver",mT=new WeakMap,Dz=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(mT.has(ye()))for(const a of r)Wn(s=>{s.setExtra("url",a.url);const c=`ReportingObserver [${a.type}]`;let f="No details available";if(a.body){const d={};for(const h in a.body)d[h]=a.body[h];if(s.setExtra("body",d),a.type==="crash"){const h=a.body;f=[h.crashId||"",h.reason||""].join(" ").trim()||f}else f=a.body.message||f}Tf(`${c}: ${f}`)})}return{name:kz,setupOnce(){if(!U4())return;new Iz.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){mT.set(r,!0)}}}),Nz="HttpClient",Lz=((e={})=>{const t=A({failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/]},e);return{name:Nz,setup(n){qz(n,t),$z(n,t)}}});function zz(e,t,n,r,a){if(vT(e,n.status,n.url)){const s=Vz(t,r);let c,f,d,h;bT()&&([c,d]=gT("Cookie",s),[f,h]=gT("Set-Cookie",n));const g=_T({url:s.url,method:s.method,status:n.status,requestHeaders:c,responseHeaders:f,requestCookies:d,responseCookies:h,error:a,type:"fetch"});ac(g)}}function gT(e,t){const n=Hz(t.headers);let r;try{const a=n[e]||n[e.toLowerCase()]||void 0;a&&(r=yT(a))}catch(a){}return[n,r]}function Uz(e,t,n,r,a){if(vT(e,t.status,t.responseURL)){let s,c,f;if(bT()){try{const h=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;h&&(c=yT(h))}catch(h){}try{f=Fz(t)}catch(h){}s=r}const d=_T({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:f,responseCookies:c,error:a,type:"xhr"});ac(d)}}function Bz(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function yT(e){return e.split("; ").reduce((t,n)=>{const[r,a]=n.split("=");return r&&a&&(t[r]=a),t},{})}function Hz(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function Fz(e){const t=e.getAllResponseHeaders();return t?t.split(`\r `).reduce((n,r)=>{const[a,s]=r.split(": ");return a&&s&&(n[a]=s),n},{}):{}}function Pz(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function jz(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function qz(e,t){GE()&&Um(n=>{if(ye()!==e)return;const{response:r,args:a,error:s,virtualError:c}=n,[f,d]=a;r&&zz(t,f,r,d,s||c)},!1)}function $z(e,t){"XMLHttpRequest"in ke&&Eg(n=>{if(ye()!==e)return;const{error:r,virtualError:a}=n,s=n.xhr,c=s[ki];if(!c)return;const{method:f,request_headers:d}=c;try{Uz(t,s,f,d,r||a)}catch(h){Ge&&Y.warn("Error while extracting response event form XHR response",h)}})}function vT(e,t,n){return jz(e.failedRequestStatusCodes,t)&&Pz(e.failedRequestTargets,n)&&!mE(n,ye())}function _T(e){const t=ye(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,a=`HTTP Client Error with status code: ${e.status}`,s={message:a,exception:{values:[{type:"Error",value:a,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:Bz(e.responseHeaders)}}};return Ai(s,{type:`auto.http.client.${e.type}`,handled:!1}),s}function Vz(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function bT(){const e=ye();return e?!!e.getOptions().sendDefaultPii:!1}const Og=ke,Gz=7,Qz="ContextLines",Wz=((e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:Gz;return{name:Qz,processEvent(n){return Yz(n,t)}}});function Yz(e,t){var f;const n=Og.document,r=Og.location&&pE(Og.location.href);if(!n||!r)return e;const a=(f=e.exception)==null?void 0:f.values;if(!(a!=null&&a.length))return e;const s=n.documentElement.innerHTML;if(!s)return e;const c=["","",...s.split(` `),""];return a.forEach(d=>{const h=d.stacktrace;h!=null&&h.frames&&(h.frames=h.frames.map(g=>Xz(g,c,r,t)))}),e}function Xz(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||bN(t,e,r),e}const Kz="GraphQLClient",Jz=(e=>({name:Kz,setup(t){Zz(t,e),eU(t,e)}}));function Zz(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const s=Me(n).data||{};if(!(s[rn]==="http.client"))return;const d=s[zN]||s["http.url"],h=s[LN]||s["http.method"];if(!Br(d)||!Br(h))return;const{endpoints:g}=t,m=Hr(d,g),v=ET(r);if(m&&v){const _=TT(v);if(_){const S=ST(_);n.updateName(`${h} ${d} (${S})`),n.setAttribute("graphql.document",v)}}})}function eU(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:a,type:s,data:c}=n;if(s==="http"&&(a==="fetch"||a==="xhr")){const g=c==null?void 0:c.url,{endpoints:m}=t,v=Hr(g,m),_=ET(r);if(v&&c&&_){const S=TT(_);if(!c.graphql&&S){const E=ST(S);c["graphql.document"]=S.query,c["graphql.operation"]=E}}}})}function ST(e){const{query:t,operationName:n}=e,{operationName:r=n,operationType:a}=tU(t);return r?`${a} ${r}`:`${a}`}function ET(e){const t="xhr"in e;let n;if(t){const r=e.xhr[ki];n=r&&td(r.body)[0]}else{const r=Tg(e.input);n=td(r)[0]}return n}function tU(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const a=e.match(n);return a?{operationType:a[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function TT(e){let t;try{const n=JSON.parse(e);!!n.query&&(t=n)}finally{return t}}const nU=Jz,Ht=ke,Rg="sentryReplaySession",rU="replay_event",Mg="Unable to send Replay",iU=3e5,aU=9e5,oU=5e3,sU=5500,uU=6e4,cU=5e3,lU=3,wT=15e4,id=5e3,fU=3e3,dU=300,xg=2e7,hU=4999,pU=15e3,CT=36e5;var mU=Object.defineProperty,gU=(e,t,n)=>t in e?mU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AT=(e,t,n)=>gU(e,typeof t!="symbol"?t+"":t,n),ln=(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))(ln||{});function yU(e){return e.nodeType===e.ELEMENT_NODE}function _c(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function bc(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function vU(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 _U(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function ad(e){try{const t=e.rules||e.cssRules;return t?vU(Array.from(t,OT).join("")):null}catch(t){return null}}function bU(e){let t="";for(let n=0;nthis.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const a=this.nodeMetaMap.get(r);a&&this.nodeMetaMap.set(n,a)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function wU(){return new RT}function od({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 Sc({isMasked:e,element:t,value:n,maskInputFn:r}){let a=n||"";return e?(r&&(a=r(a,t)),"*".repeat(a.length)):a}function Ss(e){return e.toLowerCase()}function Ig(e){return e.toUpperCase()}const MT="__rrweb_original__";function CU(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;rd!==0))return!1}return!0}function kg(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ss(t):null}function sd(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function xT(e,t){var s;let n;try{n=new URL(e,t!=null?t:window.location.href)}catch(c){return null}const r=/\.([0-9a-z]+)(?:$)/i,a=n.pathname.match(r);return(s=a==null?void 0:a[1])!=null?s:null}const IT={};function kT(e){const t=IT[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const a=n.createElement("iframe");a.hidden=!0,n.head.appendChild(a);const s=a.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(a)}catch(a){}return IT[e]=r.bind(window)}function Dg(...e){return kT("setTimeout")(...e)}function DT(...e){return kT("clearTimeout")(...e)}function NT(e){try{return e.contentDocument}catch(t){}}let AU=1;const OU=new RegExp("[^a-z0-9-_:]"),Ec=-2;function Ng(){return AU++}function RU(e){if(e instanceof HTMLFormElement)return"form";const t=Ss(e.tagName);return OU.test(t)?"div":t}function MU(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Es,LT;const xU=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,IU=/^(?:[a-z+]+:)?\/\//i,kU=/^www\..*/i,DU=/^(data:)([^,]*),(.*)/i;function ud(e,t){return(e||"").replace(xU,(n,r,a,s,c,f)=>{const d=a||c||f,h=r||s||"";if(!d)return n;if(IU.test(d)||kU.test(d))return`url(${h}${d}${h})`;if(DU.test(d))return`url(${h}${d}${h})`;if(d[0]==="/")return`url(${h}${MU(t)+d}${h})`;const g=t.split("/"),m=d.split("/");g.pop();for(const v of m)v!=="."&&(v===".."?g.pop():g.push(v));return`url(${h}${g.join("/")}${h})`})}const NU=/^[^ \t\n\r\u000c]+/,LU=/^[, \t\n\r\u000c]+/;function zU(e,t){if(t.trim()==="")return t;let n=0;function r(s){let c;const f=s.exec(t.substring(n));return f?(c=f[0],n+=c.length,c):""}const a=[];for(;r(LU),!(n>=t.length);){let s=r(NU);if(s.slice(-1)===",")s=Ts(e,s.substring(0,s.length-1)),a.push(s);else{let c="";s=Ts(e,s);let f=!1;for(;;){const d=t.charAt(n);if(d===""){a.push((s+c).trim());break}else if(f)d===")"&&(f=!1);else if(d===","){n+=1,a.push((s+c).trim());break}else d==="("&&(f=!0);c+=d,n+=1}}}return a.join(", ")}const zT=new WeakMap;function Ts(e,t){return!t||t.trim()===""?t:cd(e,t)}function UU(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function cd(e,t){let n=zT.get(e);if(n||(n=e.createElement("a"),zT.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function UT(e,t,n,r,a,s){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Ts(e,r):n==="srcset"?zU(e,r):n==="style"?ud(r,cd(e)):t==="object"&&n==="data"?Ts(e,r):typeof s=="function"?s(n,r,a):r)}function BT(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function BU(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 a=e.classList.length;a--;){const s=e.classList[a];if(t.test(s))return!0}if(n)return e.matches(n)}catch(a){}return!1}function HU(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function bo(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:bo(e.parentNode,t,n,r+1)}function ws(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(HU(r,e))return!0}return!!(t&&r.matches(t))}catch(a){return!1}}}function Cs(e,t,n,r,a,s){try{const c=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(c===null)return!1;if(c.tagName==="INPUT"){const h=c.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(h))return!0}let f=-1,d=-1;if(s){if(d=bo(c,ws(r,a)),d<0)return!0;f=bo(c,ws(t,n),d>=0?d:1/0)}else{if(f=bo(c,ws(t,n)),f<0)return!1;d=bo(c,ws(r,a),f>=0?f:1/0)}return f>=0?d>=0?f<=d:!0:d>=0?!1:!!s}catch(c){}return!!s}function FU(e,t,n){const r=e.contentWindow;if(!r)return;let a=!1,s;try{s=r.document.readyState}catch(f){return}if(s!=="complete"){const f=Dg(()=>{a||(t(),a=!0)},n);e.addEventListener("load",()=>{DT(f),a=!0,t()});return}const c="about:blank";if(r.location.href!==c||e.src===c||e.src==="")return Dg(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function PU(e,t,n){let r=!1,a;try{a=e.sheet}catch(c){return}if(a)return;const s=Dg(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{DT(s),r=!0,t()})}function jU(e,t){const{doc:n,mirror:r,blockClass:a,blockSelector:s,unblockSelector:c,maskAllText:f,maskAttributeFn:d,maskTextClass:h,unmaskTextClass:g,maskTextSelector:m,unmaskTextSelector:v,inlineStylesheet:_,maskInputOptions:S={},maskTextFn:E,maskInputFn:w,dataURLOptions:T={},inlineImages:O,recordCanvas:x,keepIframeSrcFn:I,newlyAddedElement:M=!1}=t,L=qU(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ln.Document,childNodes:[],compatMode:e.compatMode}:{type:ln.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ln.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:L};case e.ELEMENT_NODE:return VU(e,{doc:n,blockClass:a,blockSelector:s,unblockSelector:c,inlineStylesheet:_,maskAttributeFn:d,maskInputOptions:S,maskInputFn:w,dataURLOptions:T,inlineImages:O,recordCanvas:x,keepIframeSrcFn:I,newlyAddedElement:M,rootId:L,maskTextClass:h,unmaskTextClass:g,maskTextSelector:m,unmaskTextSelector:v});case e.TEXT_NODE:return $U(e,{doc:n,maskAllText:f,maskTextClass:h,unmaskTextClass:g,maskTextSelector:m,unmaskTextSelector:v,maskTextFn:E,maskInputOptions:S,maskInputFn:w,rootId:L});case e.CDATA_SECTION_NODE:return{type:ln.CDATA,textContent:"",rootId:L};case e.COMMENT_NODE:return{type:ln.Comment,textContent:e.textContent||"",rootId:L};default:return!1}}function qU(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function $U(e,t){var T;const{maskAllText:n,maskTextClass:r,unmaskTextClass:a,maskTextSelector:s,unmaskTextSelector:c,maskTextFn:f,maskInputOptions:d,maskInputFn:h,rootId:g}=t,m=e.parentNode&&e.parentNode.tagName;let v=e.textContent;const _=m==="STYLE"?!0:void 0,S=m==="SCRIPT"?!0:void 0,E=m==="TEXTAREA"?!0:void 0;if(_&&v){try{e.nextSibling||e.previousSibling||(T=e.parentNode.sheet)!=null&&T.cssRules&&(v=ad(e.parentNode.sheet))}catch(O){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${O}`,e)}v=ud(v,cd(t.doc))}S&&(v="SCRIPT_PLACEHOLDER");const w=Cs(e,r,s,a,c,n);if(!_&&!S&&!E&&v&&w&&(v=f?f(v,e.parentElement):v.replace(/[\S]/g,"*")),E&&v&&(d.textarea||w)&&(v=h?h(v,e.parentNode):v.replace(/[\S]/g,"*")),m==="OPTION"&&v){const O=od({type:null,tagName:m,maskInputOptions:d});v=Sc({isMasked:Cs(e,r,s,a,c,O),element:e,value:v,maskInputFn:h})}return{type:ln.Text,textContent:v||"",isStyle:_,rootId:g}}function VU(e,t){const{doc:n,blockClass:r,blockSelector:a,unblockSelector:s,inlineStylesheet:c,maskInputOptions:f={},maskAttributeFn:d,maskInputFn:h,dataURLOptions:g={},inlineImages:m,recordCanvas:v,keepIframeSrcFn:_,newlyAddedElement:S=!1,rootId:E,maskTextClass:w,unmaskTextClass:T,maskTextSelector:O,unmaskTextSelector:x}=t,I=BU(e,r,a,s),M=RU(e);let L={};const D=e.attributes.length;for(let V=0;Vhe.href===e.href);let ae=null;V&&(ae=ad(V)),ae&&(L.rel=null,L.href=null,L.crossorigin=null,L._cssText=ud(ae,V.href))}if(M==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const V=ad(e.sheet);V&&(L._cssText=ud(V,cd(n)))}if(M==="input"||M==="textarea"||M==="select"||M==="option"){const V=e,ae=kg(V),he=sd(V,Ig(M),ae),te=V.checked;if(ae!=="submit"&&ae!=="button"&&he){const X=Cs(V,w,O,T,x,od({type:ae,tagName:Ig(M),maskInputOptions:f}));L.value=Sc({isMasked:X,element:V,value:he,maskInputFn:h})}te&&(L.checked=te)}if(M==="option"&&(e.selected&&!f.select?L.selected=!0:delete L.selected),M==="canvas"&&v){if(e.__context==="2d")CU(e)||(L.rr_dataURL=e.toDataURL(g.type,g.quality));else if(!("__context"in e)){const V=e.toDataURL(g.type,g.quality),ae=n.createElement("canvas");ae.width=e.width,ae.height=e.height;const he=ae.toDataURL(g.type,g.quality);V!==he&&(L.rr_dataURL=V)}}if(M==="img"&&m){Es||(Es=n.createElement("canvas"),LT=Es.getContext("2d"));const V=e,ae=V.currentSrc||V.getAttribute("src")||"",he=V.crossOrigin,te=()=>{V.removeEventListener("load",te);try{Es.width=V.naturalWidth,Es.height=V.naturalHeight,LT.drawImage(V,0,0),L.rr_dataURL=Es.toDataURL(g.type,g.quality)}catch(X){if(V.crossOrigin!=="anonymous"){V.crossOrigin="anonymous",V.complete&&V.naturalWidth!==0?te():V.addEventListener("load",te);return}else console.warn(`Cannot inline img src=${ae}! Error: ${X}`)}V.crossOrigin==="anonymous"&&(he?L.crossOrigin=he:V.removeAttribute("crossorigin"))};V.complete&&V.naturalWidth!==0?te():V.addEventListener("load",te)}if((M==="audio"||M==="video")&&(L.rr_mediaState=e.paused?"paused":"played",L.rr_mediaCurrentTime=e.currentTime),S||(e.scrollLeft&&(L.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(L.rr_scrollTop=e.scrollTop)),I){const{width:V,height:ae}=e.getBoundingClientRect();L={class:L.class,rr_width:`${V}px`,rr_height:`${ae}px`}}M==="iframe"&&!_(L.src)&&(!I&&!NT(e)&&(L.rr_src=L.src),delete L.src);let G;try{customElements.get(M)&&(G=!0)}catch(V){}return{type:ln.Element,tagName:M,attributes:L,childNodes:[],isSVG:UU(e)||void 0,needBlock:I,rootId:E,isCustom:G}}function Ft(e){return e==null?"":e.toLowerCase()}function GU(e,t){if(t.comment&&e.type===ln.Comment)return!0;if(e.type===ln.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&xT(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Ft(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Ft(e.attributes.name)==="application-name"||Ft(e.attributes.rel)==="icon"||Ft(e.attributes.rel)==="apple-touch-icon"||Ft(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Ft(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ft(e.attributes.property).match(/^(og|twitter|fb):/)||Ft(e.attributes.name).match(/^(og|twitter):/)||Ft(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Ft(e.attributes.name)==="robots"||Ft(e.attributes.name)==="googlebot"||Ft(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Ft(e.attributes.name)==="author"||Ft(e.attributes.name)==="generator"||Ft(e.attributes.name)==="framework"||Ft(e.attributes.name)==="publisher"||Ft(e.attributes.name)==="progid"||Ft(e.attributes.property).match(/^article:/)||Ft(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Ft(e.attributes.name)==="google-site-verification"||Ft(e.attributes.name)==="yandex-verification"||Ft(e.attributes.name)==="csrf-token"||Ft(e.attributes.name)==="p:domain_verify"||Ft(e.attributes.name)==="verify-v1"||Ft(e.attributes.name)==="verification"||Ft(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function As(e,t){const{doc:n,mirror:r,blockClass:a,blockSelector:s,unblockSelector:c,maskAllText:f,maskTextClass:d,unmaskTextClass:h,maskTextSelector:g,unmaskTextSelector:m,skipChild:v=!1,inlineStylesheet:_=!0,maskInputOptions:S={},maskAttributeFn:E,maskTextFn:w,maskInputFn:T,slimDOMOptions:O,dataURLOptions:x={},inlineImages:I=!1,recordCanvas:M=!1,onSerialize:L,onIframeLoad:D,iframeLoadTimeout:G=5e3,onBlockedImageLoad:V,onStylesheetLoad:ae,stylesheetLoadTimeout:he=5e3,keepIframeSrcFn:te=()=>!1,newlyAddedElement:X=!1}=t;let{preserveWhiteSpace:pe=!0}=t;const ce=jU(e,{doc:n,mirror:r,blockClass:a,blockSelector:s,maskAllText:f,unblockSelector:c,maskTextClass:d,unmaskTextClass:h,maskTextSelector:g,unmaskTextSelector:m,inlineStylesheet:_,maskInputOptions:S,maskAttributeFn:E,maskTextFn:w,maskInputFn:T,dataURLOptions:x,inlineImages:I,recordCanvas:M,keepIframeSrcFn:te,newlyAddedElement:X});if(!ce)return console.warn(e,"not serialized"),null;let H;r.hasNode(e)?H=r.getId(e):GU(ce,O)||!pe&&ce.type===ln.Text&&!ce.isStyle&&!ce.textContent.replace(/^\s+|\s+$/gm,"").length?H=Ec:H=Ng();const P=Object.assign(ce,{id:H});if(r.add(e,P),H===Ec)return null;L&&L(e);let oe=!v;if(P.type===ln.Element){oe=oe&&!P.needBlock;const re=e.shadowRoot;re&&bc(re)&&(P.isShadowHost=!0)}if((P.type===ln.Document||P.type===ln.Element)&&oe){O.headWhitespace&&P.type===ln.Element&&P.tagName==="head"&&(pe=!1);const re={doc:n,mirror:r,blockClass:a,blockSelector:s,maskAllText:f,unblockSelector:c,maskTextClass:d,unmaskTextClass:h,maskTextSelector:g,unmaskTextSelector:m,skipChild:v,inlineStylesheet:_,maskInputOptions:S,maskAttributeFn:E,maskTextFn:w,maskInputFn:T,slimDOMOptions:O,dataURLOptions:x,inlineImages:I,recordCanvas:M,preserveWhiteSpace:pe,onSerialize:L,onIframeLoad:D,iframeLoadTimeout:G,onBlockedImageLoad:V,onStylesheetLoad:ae,stylesheetLoadTimeout:he,keepIframeSrcFn:te},fe=e.childNodes?Array.from(e.childNodes):[];for(const k of fe){const q=As(k,re);q&&P.childNodes.push(q)}if(yU(e)&&e.shadowRoot)for(const k of Array.from(e.shadowRoot.childNodes)){const q=As(k,re);q&&(bc(e.shadowRoot)&&(q.isShadow=!0),P.childNodes.push(q))}}if(e.parentNode&&_c(e.parentNode)&&bc(e.parentNode)&&(P.isShadow=!0),P.type===ln.Element&&P.tagName==="iframe"&&!P.needBlock&&FU(e,()=>{const re=NT(e);if(re&&D){const fe=As(re,{doc:re,mirror:r,blockClass:a,blockSelector:s,unblockSelector:c,maskAllText:f,maskTextClass:d,unmaskTextClass:h,maskTextSelector:g,unmaskTextSelector:m,skipChild:!1,inlineStylesheet:_,maskInputOptions:S,maskAttributeFn:E,maskTextFn:w,maskInputFn:T,slimDOMOptions:O,dataURLOptions:x,inlineImages:I,recordCanvas:M,preserveWhiteSpace:pe,onSerialize:L,onIframeLoad:D,iframeLoadTimeout:G,onStylesheetLoad:ae,stylesheetLoadTimeout:he,keepIframeSrcFn:te});fe&&D(e,fe)}},G),P.type===ln.Element&&P.tagName==="img"&&!e.complete&&P.needBlock){const re=e,fe=()=>{if(re.isConnected&&!re.complete&&V)try{const k=re.getBoundingClientRect();k.width>0&&k.height>0&&V(re,P,k)}catch(k){}re.removeEventListener("load",fe)};re.isConnected&&re.addEventListener("load",fe)}return P.type===ln.Element&&P.tagName==="link"&&typeof P.attributes.rel=="string"&&(P.attributes.rel==="stylesheet"||P.attributes.rel==="preload"&&typeof P.attributes.href=="string"&&xT(P.attributes.href)==="css")&&PU(e,()=>{if(ae){const re=As(e,{doc:n,mirror:r,blockClass:a,blockSelector:s,unblockSelector:c,maskAllText:f,maskTextClass:d,unmaskTextClass:h,maskTextSelector:g,unmaskTextSelector:m,skipChild:!1,inlineStylesheet:_,maskInputOptions:S,maskAttributeFn:E,maskTextFn:w,maskInputFn:T,slimDOMOptions:O,dataURLOptions:x,inlineImages:I,recordCanvas:M,preserveWhiteSpace:pe,onSerialize:L,onIframeLoad:D,iframeLoadTimeout:G,onStylesheetLoad:ae,stylesheetLoadTimeout:he,keepIframeSrcFn:te});re&&ae(e,re)}},he),P.type===ln.Element&&delete P.needBlock,P}function QU(e,t){const{mirror:n=new RT,blockClass:r="rr-block",blockSelector:a=null,unblockSelector:s=null,maskAllText:c=!1,maskTextClass:f="rr-mask",unmaskTextClass:d=null,maskTextSelector:h=null,unmaskTextSelector:g=null,inlineStylesheet:m=!0,inlineImages:v=!1,recordCanvas:_=!1,maskAllInputs:S=!1,maskAttributeFn:E,maskTextFn:w,maskInputFn:T,slimDOM:O=!1,dataURLOptions:x,preserveWhiteSpace:I,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:D,onBlockedImageLoad:G,onStylesheetLoad:V,stylesheetLoadTimeout:ae,keepIframeSrcFn:he=()=>!1}=t||{};return As(e,{doc:e,mirror:n,blockClass:r,blockSelector:a,unblockSelector:s,maskAllText:c,maskTextClass:f,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:g,skipChild:!1,inlineStylesheet:m,maskInputOptions:S===!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}:S===!1?{}:S,maskAttributeFn:E,maskTextFn:w,maskInputFn:T,slimDOMOptions:O===!0||O==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:O==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:O===!1?{}:O,dataURLOptions:x,inlineImages:v,recordCanvas:_,preserveWhiteSpace:I,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:D,onBlockedImageLoad:G,onStylesheetLoad:V,stylesheetLoadTimeout:ae,keepIframeSrcFn:he,newlyAddedElement:!1})}function qn(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Os=`Please stop import mirror directly. Instead of that,\r now you can use replayer.getMirror() to access the mirror instance of a replayer,\r or you can use record.mirror to access the mirror instance during recording.`;let HT={map:{},getId(){return console.error(Os),-1},getNode(){return console.error(Os),null},removeNodeFromMap(){console.error(Os)},has(){return console.error(Os),!1},reset(){console.error(Os)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(HT=new Proxy(HT,{get(e,t,n){return t==="map"&&console.error(Os),Reflect.get(e,t,n)}}));function Tc(e,t,n={}){let r=null,a=0;return function(...s){const c=Date.now();!a&&n.leading===!1&&(a=c);const f=t-(c-a),d=this;f<=0||f>t?(r&&(e9(r),r=null),a=c,e.apply(d,s)):!r&&n.trailing!==!1&&(r=fd(()=>{a=n.leading===!1?0:Date.now(),r=null,e.apply(d,s)},f))}}function FT(e,t,n,r,a=window){const s=a.Object.getOwnPropertyDescriptor(e,t);return a.Object.defineProperty(e,t,r?n:{set(c){fd(()=>{n.set.call(this,c)},0),s&&s.set&&s.set.call(this,c)}}),()=>FT(e,t,s||{},!0)}function Lg(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],a=n(r);return typeof a=="function"&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=a,()=>{e[t]=r}}catch(r){return()=>{}}}let ld=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ld=()=>new Date().getTime());function PT(e){var n,r,a,s,c,f;const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:(t==null?void 0:t.documentElement.scrollLeft)||((r=(n=t==null?void 0:t.body)==null?void 0:n.parentElement)==null?void 0:r.scrollLeft)||((a=t==null?void 0:t.body)==null?void 0:a.scrollLeft)||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(t==null?void 0:t.documentElement.scrollTop)||((c=(s=t==null?void 0:t.body)==null?void 0:s.parentElement)==null?void 0:c.scrollTop)||((f=t==null?void 0:t.body)==null?void 0:f.scrollTop)||0}}function jT(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function qT(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function $T(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(t){return null}}function sr(e,t,n,r,a){if(!e)return!1;const s=$T(e);if(!s)return!1;const c=ws(t,n);if(!a){const h=r&&s.matches(r);return c(s)&&!h}const f=bo(s,c);let d=-1;return f<0?!1:(r&&(d=bo(s,ws(null,r))),f>-1&&d<0?!0:f{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function GT(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function QT(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Bg(e){return!!(e!=null&&e.shadowRoot)}class XU{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var n;return(n=this.styleIDMap.get(t))!=null?n:-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function WT(e){var n,r;let t=null;return((r=(n=e.getRootNode)==null?void 0:n.call(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function KU(e){let t=e,n;for(;n=WT(t);)t=n;return t}function JU(e){const t=e.ownerDocument;if(!t)return!1;const n=KU(e);return t.contains(n)}function YT(e){const t=e.ownerDocument;return t?t.contains(e)||JU(e):!1}const XT={};function Hg(e){const t=XT[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const a=n.createElement("iframe");a.hidden=!0,n.head.appendChild(a);const s=a.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(a)}catch(a){}return XT[e]=r.bind(window)}function ZU(...e){return Hg("requestAnimationFrame")(...e)}function fd(...e){return Hg("setTimeout")(...e)}function e9(...e){return Hg("clearTimeout")(...e)}var Qe=(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))(Qe||{}),Be=(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))(Be||{}),$n=(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))($n||{}),Di=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Di||{}),Rs=(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))(Rs||{});function Fg(e){try{return e.contentDocument}catch(t){}}function t9(e){try{return e.contentWindow}catch(t){}}function KT(e){return"__ln"in e}class n9{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r`${e}@${t}`;class r9{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new n9,a=d=>{let h=d,g=Ec;for(;g===Ec;)h=h&&h.nextSibling,g=h&&this.mirror.getId(h);return g},s=d=>{if(!d.parentNode||!YT(d))return;const h=_c(d.parentNode)?this.mirror.getId(WT(d)):this.mirror.getId(d.parentNode),g=a(d);if(h===-1||g===-1)return r.addNode(d);const m=As(d,{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:v=>{GT(v,this.mirror)&&!sr(v,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(v),QT(v,this.mirror)&&this.stylesheetManager.trackLinkElement(v),Bg(d)&&this.shadowDomManager.addShadowRoot(d.shadowRoot,this.doc)},onIframeLoad:(v,_)=>{sr(v,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(v,_),v.contentWindow&&this.canvasManager.addWindow(v.contentWindow),this.shadowDomManager.observeAttachShadow(v))},onStylesheetLoad:(v,_)=>{this.stylesheetManager.attachLinkElement(v,_)},onBlockedImageLoad:(v,_,{width:S,height:E})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:_.id,attributes:{style:{width:`${S}px`,height:`${E}px`}}}]})}});m&&(t.push({parentId:h,nextId:g,node:m}),n.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet)ZT(this.removes,d,this.mirror)&&!this.movedSet.has(d.parentNode)||s(d);for(const d of this.addedSet)!ew(this.droppedSet,d)&&!ZT(this.removes,d,this.mirror)||ew(this.movedSet,d)?s(d):this.droppedSet.add(d);let c=null;for(;r.length;){let d=null;if(c){const h=this.mirror.getId(c.value.parentNode),g=a(c.value);h!==-1&&g!==-1&&(d=c)}if(!d){let h=r.tail;for(;h;){const g=h;if(h=h.previous,g){const m=this.mirror.getId(g.value.parentNode);if(a(g.value)===-1)continue;if(m!==-1){d=g;break}else{const _=g.value;if(_.parentNode&&_.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const S=_.parentNode.host;if(this.mirror.getId(S)!==-1){d=g;break}}}}}}if(!d){for(;r.head;)r.removeNode(r.head.value);break}c=d.previous,r.removeNode(d.value),s(d.value)}const f={texts:this.texts.map(d=>({id:this.mirror.getId(d.node),value:d.value})).filter(d=>!n.has(d.id)).filter(d=>this.mirror.has(d.id)),attributes:this.attributes.map(d=>{const{attributes:h}=d;if(typeof h.style=="string"){const g=JSON.stringify(d.styleDiff),m=JSON.stringify(d._unchangedStyles);g.length!n.has(d.id)).filter(d=>this.mirror.has(d.id)),removes:this.removes,adds:t};!f.texts.length&&!f.attributes.length&&!f.removes.length&&!f.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(f))},this.processMutation=t=>{if(!zg(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!sr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Cs(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,$T(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,a=t.target.getAttribute(r);if(r==="value"){const c=kg(n),f=n.tagName;a=sd(n,f,c);const d=od({maskInputOptions:this.maskInputOptions,tagName:f,type:c}),h=Cs(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,d);a=Sc({isMasked:h,element:n,value:a,maskInputFn:this.maskInputFn})}if(sr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||a===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(a))if(!Fg(n))r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!BT(n.tagName,r)&&(s.attributes[r]=UT(this.doc,Ss(n.tagName),Ss(r),a,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(f){this.unattachedDoc=this.doc}const c=this.unattachedDoc.createElement("span");t.oldValue&&c.setAttribute("style",t.oldValue);for(const f of Array.from(n.style)){const d=n.style.getPropertyValue(f),h=n.style.getPropertyPriority(f);d!==c.style.getPropertyValue(f)||h!==c.style.getPropertyPriority(f)?h===""?s.styleDiff[f]=d:s.styleDiff[f]=[d,h]:s._unchangedStyles[f]=[d,h]}for(const f of Array.from(c.style))n.style.getPropertyValue(f)===""&&(s.styleDiff[f]=!1)}break}case"childList":{if(sr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),a=_c(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);sr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||zg(n,this.mirror)||!WU(n,this.mirror)||(this.addedSet.has(n)?(Pg(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||VT(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[JT(r,a)]?Pg(this.movedSet,n):this.removes.push({parentId:a,id:r,isShadow:_c(t.target)&&bc(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(zg(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[JT(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);sr(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),Bg(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Pg(e,t){var n;e.delete(t),(n=t.childNodes)==null||n.forEach(r=>Pg(e,r))}function ZT(e,t,n){return e.length===0?!1:i9(e,t,n)}function i9(e,t,n){let r=t.parentNode;for(;r;){const a=n.getId(r);if(e.some(s=>s.id===a))return!0;r=r.parentNode}return!1}function ew(e,t){return e.size===0?!1:tw(e,t)}function tw(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:tw(e,n):!1}let wc;function a9(e){wc=e}function o9(){wc=void 0}const ot=e=>wc?(...n)=>{try{return e(...n)}catch(r){if(wc&&wc(r)===!0)return()=>{};throw r}}:e,Ms=[];function Cc(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function nw(e,t){var c,f;const n=new r9;Ms.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const a=(f=(c=window==null?void 0:window.Zone)==null?void 0:c.__symbol__)==null?void 0:f.call(c,"MutationObserver");a&&window[a]&&(r=window[a]);const s=new r(ot(d=>{e.onMutation&&e.onMutation(d)===!1||n.processMutations.bind(n)(d)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function s9({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const a=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let c=[],f;const d=Tc(ot(m=>{const v=Date.now()-f;e(c.map(_=>(_.timeOffset-=v,_)),m),c=[],f=null}),s),h=ot(Tc(ot(m=>{const v=Cc(m),{clientX:_,clientY:S}=Ug(m)?m.changedTouches[0]:m;f||(f=ld()),c.push({x:_,y:S,id:r.getId(v),timeOffset:ld()-f}),d(typeof DragEvent!="undefined"&&m instanceof DragEvent?Be.Drag:m instanceof MouseEvent?Be.MouseMove:Be.TouchMove)}),a,{trailing:!1})),g=[qn("mousemove",h,n),qn("touchmove",h,n),qn("drag",h,n)];return ot(()=>{g.forEach(m=>m())})}function u9({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:a,unblockSelector:s,sampling:c}){if(c.mouseInteraction===!1)return()=>{};const f=c.mouseInteraction===!0||c.mouseInteraction===void 0?{}:c.mouseInteraction,d=[];let h=null;const g=m=>v=>{const _=Cc(v);if(sr(_,r,a,s,!0))return;let S=null,E=m;if("pointerType"in v){switch(v.pointerType){case"mouse":S=Di.Mouse;break;case"touch":S=Di.Touch;break;case"pen":S=Di.Pen;break}S===Di.Touch?$n[m]===$n.MouseDown?E="TouchStart":$n[m]===$n.MouseUp&&(E="TouchEnd"):Di.Pen}else Ug(v)&&(S=Di.Touch);S!==null?(h=S,(E.startsWith("Touch")&&S===Di.Touch||E.startsWith("Mouse")&&S===Di.Mouse)&&(S=null)):$n[m]===$n.Click&&(S=h,h=null);const w=Ug(v)?v.changedTouches[0]:v;if(!w)return;const T=n.getId(_),{clientX:O,clientY:x}=w;ot(e)(A({type:$n[E],id:T,x:O,y:x},S!==null&&{pointerType:S}))};return Object.keys($n).filter(m=>Number.isNaN(Number(m))&&!m.endsWith("_Departed")&&f[m]!==!1).forEach(m=>{let v=Ss(m);const _=g(m);if(window.PointerEvent)switch($n[m]){case $n.MouseDown:case $n.MouseUp:v=v.replace("mouse","pointer");break;case $n.TouchStart:case $n.TouchEnd:return}d.push(qn(v,_,t))}),ot(()=>{d.forEach(m=>m())})}function rw({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:a,unblockSelector:s,sampling:c}){const f=ot(Tc(ot(d=>{const h=Cc(d);if(!h||sr(h,r,a,s,!0))return;const g=n.getId(h);if(h===t&&t.defaultView){const m=PT(t.defaultView);e({id:g,x:m.left,y:m.top})}else e({id:g,x:h.scrollLeft,y:h.scrollTop})}),c.scroll||100));return qn("scroll",f,t)}function c9({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const a=ot(Tc(ot(()=>{const s=jT(),c=qT();(n!==s||r!==c)&&(e({width:Number(c),height:Number(s)}),n=s,r=c)}),200));return qn("resize",a,t)}const l9=["INPUT","TEXTAREA","SELECT"],iw=new WeakMap;function f9({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:a,unblockSelector:s,ignoreClass:c,ignoreSelector:f,maskInputOptions:d,maskInputFn:h,sampling:g,userTriggeredOnInput:m,maskTextClass:v,unmaskTextClass:_,maskTextSelector:S,unmaskTextSelector:E}){function w(D){let G=Cc(D);const V=D.isTrusted,ae=G&&Ig(G.tagName);if(ae==="OPTION"&&(G=G.parentElement),!G||!ae||l9.indexOf(ae)<0||sr(G,r,a,s,!0))return;const he=G;if(he.classList.contains(c)||f&&he.matches(f))return;const te=kg(G);let X=sd(he,ae,te),pe=!1;const ce=od({maskInputOptions:d,tagName:ae,type:te}),H=Cs(G,v,S,_,E,ce);(te==="radio"||te==="checkbox")&&(pe=G.checked),X=Sc({isMasked:H,element:G,value:X,maskInputFn:h}),T(G,m?{text:X,isChecked:pe,userTriggered:V}:{text:X,isChecked:pe});const P=G.name;te==="radio"&&P&&pe&&t.querySelectorAll(`input[type="radio"][name="${P}"]`).forEach(oe=>{if(oe!==G){const re=Sc({isMasked:H,element:oe,value:sd(oe,ae,te),maskInputFn:h});T(oe,m?{text:re,isChecked:!pe,userTriggered:!1}:{text:re,isChecked:!pe})}})}function T(D,G){const V=iw.get(D);if(!V||V.text!==G.text||V.isChecked!==G.isChecked){iw.set(D,G);const ae=n.getId(D);ot(e)(ee(A({},G),{id:ae}))}}const x=(g.input==="last"?["change"]:["input","change"]).map(D=>qn(D,ot(w),t)),I=t.defaultView;if(!I)return()=>{x.forEach(D=>D())};const M=I.Object.getOwnPropertyDescriptor(I.HTMLInputElement.prototype,"value"),L=[[I.HTMLInputElement.prototype,"value"],[I.HTMLInputElement.prototype,"checked"],[I.HTMLSelectElement.prototype,"value"],[I.HTMLTextAreaElement.prototype,"value"],[I.HTMLSelectElement.prototype,"selectedIndex"],[I.HTMLOptionElement.prototype,"selected"]];return M&&M.set&&x.push(...L.map(D=>FT(D[0],D[1],{set(){ot(w)({target:this,isTrusted:!1})}},!1,I))),ot(()=>{x.forEach(D=>D())})}function dd(e){const t=[];function n(r,a){if(hd("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||hd("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||hd("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||hd("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const c=Array.from(r.parentRule.cssRules).indexOf(r);a.unshift(c)}else if(r.parentStyleSheet){const c=Array.from(r.parentStyleSheet.cssRules).indexOf(r);a.unshift(c)}return a}return n(e,t)}function da(e,t,n){let r,a;return e?(e.ownerNode?r=t.getId(e.ownerNode):a=n.getId(e),{styleId:a,id:r}):{}}function d9({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const a=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:ot((g,m,v)=>{const[_,S]=v,{id:E,styleId:w}=da(m,t,n.styleMirror);return(E&&E!==-1||w&&w!==-1)&&e({id:E,styleId:w,adds:[{rule:_,index:S}]}),g.apply(m,v)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:ot((g,m,v)=>{const[_]=v,{id:S,styleId:E}=da(m,t,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&e({id:S,styleId:E,removes:[{index:_}]}),g.apply(m,v)})});let c;r.CSSStyleSheet.prototype.replace&&(c=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:ot((g,m,v)=>{const[_]=v,{id:S,styleId:E}=da(m,t,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&e({id:S,styleId:E,replace:_}),g.apply(m,v)})}));let f;r.CSSStyleSheet.prototype.replaceSync&&(f=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(f,{apply:ot((g,m,v)=>{const[_]=v,{id:S,styleId:E}=da(m,t,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&e({id:S,styleId:E,replaceSync:_}),g.apply(m,v)})}));const d={};pd("CSSGroupingRule")?d.CSSGroupingRule=r.CSSGroupingRule:(pd("CSSMediaRule")&&(d.CSSMediaRule=r.CSSMediaRule),pd("CSSConditionRule")&&(d.CSSConditionRule=r.CSSConditionRule),pd("CSSSupportsRule")&&(d.CSSSupportsRule=r.CSSSupportsRule));const h={};return Object.entries(d).forEach(([g,m])=>{h[g]={insertRule:m.prototype.insertRule,deleteRule:m.prototype.deleteRule},m.prototype.insertRule=new Proxy(h[g].insertRule,{apply:ot((v,_,S)=>{const[E,w]=S,{id:T,styleId:O}=da(_.parentStyleSheet,t,n.styleMirror);return(T&&T!==-1||O&&O!==-1)&&e({id:T,styleId:O,adds:[{rule:E,index:[...dd(_),w||0]}]}),v.apply(_,S)})}),m.prototype.deleteRule=new Proxy(h[g].deleteRule,{apply:ot((v,_,S)=>{const[E]=S,{id:w,styleId:T}=da(_.parentStyleSheet,t,n.styleMirror);return(w&&w!==-1||T&&T!==-1)&&e({id:w,styleId:T,removes:[{index:[...dd(_),E]}]}),v.apply(_,S)})})}),ot(()=>{r.CSSStyleSheet.prototype.insertRule=a,r.CSSStyleSheet.prototype.deleteRule=s,c&&(r.CSSStyleSheet.prototype.replace=c),f&&(r.CSSStyleSheet.prototype.replaceSync=f),Object.entries(d).forEach(([g,m])=>{m.prototype.insertRule=h[g].insertRule,m.prototype.deleteRule=h[g].deleteRule})})}function aw({mirror:e,stylesheetManager:t},n){var c,f,d;let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const a=n.nodeName==="#document"?(c=n.defaultView)==null?void 0:c.Document:(d=(f=n.ownerDocument)==null?void 0:f.defaultView)==null?void 0:d.ShadowRoot,s=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!a||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){var h;return(h=s.get)==null?void 0:h.call(this)},set(h){var m;const g=(m=s.set)==null?void 0:m.call(this,h);if(r!==null&&r!==-1)try{t.adoptStyleSheets(h,r)}catch(v){}return g}}),ot(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function h9({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:a}){const s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:ot((f,d,h)=>{var E;const[g,m,v]=h;if(n.has(g))return s.apply(d,[g,m,v]);const{id:_,styleId:S}=da((E=d.parentRule)==null?void 0:E.parentStyleSheet,t,r.styleMirror);return(_&&_!==-1||S&&S!==-1)&&e({id:_,styleId:S,set:{property:g,value:m,priority:v},index:dd(d.parentRule)}),f.apply(d,h)})});const c=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:ot((f,d,h)=>{var _;const[g]=h;if(n.has(g))return c.apply(d,[g]);const{id:m,styleId:v}=da((_=d.parentRule)==null?void 0:_.parentStyleSheet,t,r.styleMirror);return(m&&m!==-1||v&&v!==-1)&&e({id:m,styleId:v,remove:{property:g},index:dd(d.parentRule)}),f.apply(d,h)})}),ot(()=>{a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=c})}function p9({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:a,sampling:s,doc:c}){const f=ot(h=>Tc(ot(g=>{const m=Cc(g);if(!m||sr(m,t,n,r,!0))return;const{currentTime:v,volume:_,muted:S,playbackRate:E}=m;e({type:h,id:a.getId(m),currentTime:v,volume:_,muted:S,playbackRate:E})}),s.media||500)),d=[qn("play",f(Rs.Play),c),qn("pause",f(Rs.Pause),c),qn("seeked",f(Rs.Seeked),c),qn("volumechange",f(Rs.VolumeChange),c),qn("ratechange",f(Rs.RateChange),c)];return ot(()=>{d.forEach(h=>h())})}function m9({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],a=new WeakMap,s=n.FontFace;n.FontFace=function(d,h,g){const m=new s(d,h,g);return a.set(m,{family:d,buffer:typeof h!="string",descriptors:g,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),m};const c=Lg(t.fonts,"add",function(f){return function(d){return fd(ot(()=>{const h=a.get(d);h&&(e(h),a.delete(d))}),0),f.apply(this,[d])}});return r.push(()=>{n.FontFace=s}),r.push(c),ot(()=>{r.forEach(f=>f())})}function g9(e){const{doc:t,mirror:n,blockClass:r,blockSelector:a,unblockSelector:s,selectionCb:c}=e;let f=!0;const d=ot(()=>{const h=t.getSelection();if(!h||f&&(h!=null&&h.isCollapsed))return;f=h.isCollapsed||!1;const g=[],m=h.rangeCount||0;for(let v=0;v{}:Lg(n.customElements,"define",function(a){return function(s,c,f){try{t({define:{name:s}})}catch(d){}return a.apply(this,[s,c,f])}})}function v9(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=nw(e,e.doc));const a=s9(e),s=u9(e),c=rw(e),f=c9(e,{win:n}),d=f9(e),h=p9(e);let g=()=>{},m=()=>{},v=()=>{},_=()=>{};e.recordDOM&&(g=d9(e,{win:n}),m=aw(e,e.doc),v=h9(e,{win:n}),e.collectFonts&&(_=m9(e)));const S=g9(e),E=y9(e),w=[];for(const T of e.plugins)w.push(T.observer(T.callback,n,T.options));return ot(()=>{Ms.forEach(T=>T.reset()),r==null||r.disconnect(),a(),s(),c(),f(),d(),h(),g(),m(),v(),_(),S(),E(),w.forEach(T=>T())})}function hd(e){return typeof window[e]!="undefined"}function pd(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class jg{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,a){const s=r||this.getIdToRemoteIdMap(t),c=a||this.getRemoteIdToIdMap(t);let f=s.get(n);return f||(f=this.generateIdFn(),s.set(n,f),c.set(f,n)),f}getIds(t,n){const r=this.getIdToRemoteIdMap(t),a=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,a))}getRemoteId(t,n,r){const a=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=a.get(n);return s||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(a=>this.getRemoteId(t,a,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class _9{constructor(){this.crossOriginIframeMirror=new jg(Ng),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class b9{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new jg(Ng),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new jg(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var a,s;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((a=t.contentWindow)==null||a.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,t);const r=Fg(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const a=this.crossOriginIframeMap.get(t.source);if(!a)return;const s=this.transformCrossOriginEvent(a,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){var r;switch(n.type){case Qe.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const a=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,a),this.patchRootIdOnNode(n.data.node,a),{timestamp:n.timestamp,type:Qe.IncrementalSnapshot,data:{source:Be.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Qe.Meta:case Qe.Load:case Qe.DomContentLoaded:return!1;case Qe.Plugin:return n;case Qe.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case Qe.IncrementalSnapshot:switch(n.data.source){case Be.Mutation:return n.data.adds.forEach(a=>{this.replaceIds(a,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(a.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(a.node,s)}),n.data.removes.forEach(a=>{this.replaceIds(a,t,["parentId","id"])}),n.data.attributes.forEach(a=>{this.replaceIds(a,t,["id"])}),n.data.texts.forEach(a=>{this.replaceIds(a,t,["id"])}),n;case Be.Drag:case Be.TouchMove:case Be.MouseMove:return n.data.positions.forEach(a=>{this.replaceIds(a,t,["id"])}),n;case Be.ViewportResize:return!1;case Be.MediaInteraction:case Be.MouseInteraction:case Be.Scroll:case Be.CanvasMutation:case Be.Input:return this.replaceIds(n.data,t,["id"]),n;case Be.StyleSheetRule:case Be.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Be.Font:return n;case Be.Selection:return n.data.ranges.forEach(a=>{this.replaceIds(a,t,["start","end"])}),n;case Be.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)==null||r.forEach(a=>{this.replaceStyleIds(a,t,["styleId"])}),n}}return!1}replace(t,n,r,a){for(const s of a)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==ln.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class S9{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class E9{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!bc(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=nw(ee(A({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(rw(ee(A({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),fd(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(aw({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Fg(t),r=t9(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Lg(t.prototype,"attachShadow",function(a){return function(s){const c=a.call(this,s);return this.shadowRoot&&YT(this)&&r.addShadowRoot(this.shadowRoot,n),c}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(n){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var ow="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T9=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),md=0;md({rule:OT(f),index:d}))})),r.styleIds.push(c)}a.length>0&&(r.styles=a),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class C9{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(a=>a!==n)}add(t,n){this.active||(this.active=!0,ZU(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Jt,gd;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((EM=e.contentWindow)==null?void 0:EM.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Gr=wU();function Ni(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:a="rr-block",blockSelector:s=null,unblockSelector:c=null,ignoreClass:f="rr-ignore",ignoreSelector:d=null,maskAllText:h=!1,maskTextClass:g="rr-mask",unmaskTextClass:m=null,maskTextSelector:v=null,unmaskTextSelector:_=null,inlineStylesheet:S=!0,maskAllInputs:E,maskInputOptions:w,slimDOMOptions:T,maskAttributeFn:O,maskInputFn:x,maskTextFn:I,maxCanvasSize:M=null,packFn:L,sampling:D={},dataURLOptions:G={},mousemoveWait:V,recordDOM:ae=!0,recordCanvas:he=!1,recordCrossOriginIframes:te=!1,recordAfter:X=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:pe=!1,collectFonts:ce=!1,inlineImages:H=!1,plugins:P,keepIframeSrcFn:oe=()=>!1,ignoreCSSAttributes:re=new Set([]),errorHandler:fe,onMutation:k,getCanvasManager:q}=e;a9(fe);const ue=te?window.parent===window:!0;let se=!1;if(!ue)try{window.parent.document&&(se=!1)}catch(ge){se=!0}if(ue&&!t)throw new Error("emit function is required");if(!ue&&!se)return()=>{};V!==void 0&&D.mousemove===void 0&&(D.mousemove=V),Gr.reset();const Te=E===!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}:w!==void 0?w:{},Oe=T===!0||T==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:T==="all",headMetaDescKeywords:T==="all"}:T||{};YU();let Re,nt=0;const Ye=ge=>{for(const ct of P||[])ct.eventProcessor&&(ge=ct.eventProcessor(ge));return L&&!se&&(ge=L(ge)),ge};Jt=(ge,ct)=>{var En;const Le=ge;if(Le.timestamp=ld(),(En=Ms[0])!=null&&En.isFrozen()&&Le.type!==Qe.FullSnapshot&&!(Le.type===Qe.IncrementalSnapshot&&Le.data.source===Be.Mutation)&&Ms.forEach(At=>At.unfreeze()),ue)t==null||t(Ye(Le),ct);else if(se){const At={type:"rrweb",event:Ye(Le),origin:window.location.origin,isCheckout:ct};window.parent.postMessage(At,"*")}if(Le.type===Qe.FullSnapshot)Re=Le,nt=0;else if(Le.type===Qe.IncrementalSnapshot){if(Le.data.source===Be.Mutation&&Le.data.isAttachIframe)return;nt++;const At=r&&nt>=r,lt=n&&Re&&Le.timestamp-Re.timestamp>n;(At||lt)&&Xe(!0)}};const dn=ge=>{Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.Mutation},ge)})},Gn=ge=>Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.Scroll},ge)}),Tr=ge=>Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.CanvasMutation},ge)}),wr=ge=>Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.AdoptedStyleSheet},ge)}),hn=new w9({mutationCb:dn,adoptedStyleSheetCb:wr}),Fe=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new _9:new b9({mirror:Gr,mutationCb:dn,stylesheetManager:hn,recordCrossOriginIframes:te,wrappedEmit:Jt});for(const ge of P||[])ge.getMirror&&ge.getMirror({nodeMirror:Gr,crossOriginIframeMirror:Fe.crossOriginIframeMirror,crossOriginIframeStyleMirror:Fe.crossOriginIframeStyleMirror});const bt=new C9,$e=O9(q,{mirror:Gr,win:window,mutationCb:ge=>Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.CanvasMutation},ge)}),recordCanvas:he,blockClass:a,blockSelector:s,unblockSelector:c,maxCanvasSize:M,sampling:D.canvas,dataURLOptions:G,errorHandler:fe}),st=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new S9:new E9({mutationCb:dn,scrollCb:Gn,bypassOptions:{onMutation:k,blockClass:a,blockSelector:s,unblockSelector:c,maskAllText:h,maskTextClass:g,unmaskTextClass:m,maskTextSelector:v,unmaskTextSelector:_,inlineStylesheet:S,maskInputOptions:Te,dataURLOptions:G,maskAttributeFn:O,maskTextFn:I,maskInputFn:x,recordCanvas:he,inlineImages:H,sampling:D,slimDOMOptions:Oe,iframeManager:Fe,stylesheetManager:hn,canvasManager:$e,keepIframeSrcFn:oe,processedNodeManager:bt},mirror:Gr}),Xe=(ge=!1)=>{if(!ae)return;Jt({type:Qe.Meta,data:{href:window.location.href,width:qT(),height:jT()}},ge),hn.reset(),st.init(),Ms.forEach(Le=>Le.lock());const ct=QU(document,{mirror:Gr,blockClass:a,blockSelector:s,unblockSelector:c,maskAllText:h,maskTextClass:g,unmaskTextClass:m,maskTextSelector:v,unmaskTextSelector:_,inlineStylesheet:S,maskAllInputs:Te,maskAttributeFn:O,maskInputFn:x,maskTextFn:I,slimDOM:Oe,dataURLOptions:G,recordCanvas:he,inlineImages:H,onSerialize:Le=>{GT(Le,Gr)&&Fe.addIframe(Le),QT(Le,Gr)&&hn.trackLinkElement(Le),Bg(Le)&&st.addShadowRoot(Le.shadowRoot,document)},onIframeLoad:(Le,En)=>{Fe.attachIframe(Le,En),Le.contentWindow&&$e.addWindow(Le.contentWindow),st.observeAttachShadow(Le)},onStylesheetLoad:(Le,En)=>{hn.attachLinkElement(Le,En)},onBlockedImageLoad:(Le,En,{width:At,height:lt})=>{dn({adds:[],removes:[],texts:[],attributes:[{id:En.id,attributes:{style:{width:`${At}px`,height:`${lt}px`}}}]})},keepIframeSrcFn:oe});if(!ct)return console.warn("Failed to snapshot the document");Jt({type:Qe.FullSnapshot,data:{node:ct,initialOffset:PT(window)}}),Ms.forEach(Le=>Le.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&hn.adoptStyleSheets(document.adoptedStyleSheets,Gr.getId(document))};gd=Xe;try{const ge=[],ct=En=>{var At;return ot(v9)({onMutation:k,mutationCb:dn,mousemoveCb:(lt,Bi)=>Jt({type:Qe.IncrementalSnapshot,data:{source:Bi,positions:lt}}),mouseInteractionCb:lt=>Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.MouseInteraction},lt)}),scrollCb:Gn,viewportResizeCb:lt=>Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.ViewportResize},lt)}),inputCb:lt=>Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.Input},lt)}),mediaInteractionCb:lt=>Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.MediaInteraction},lt)}),styleSheetRuleCb:lt=>Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.StyleSheetRule},lt)}),styleDeclarationCb:lt=>Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.StyleDeclaration},lt)}),canvasMutationCb:Tr,fontCb:lt=>Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.Font},lt)}),selectionCb:lt=>{Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.Selection},lt)})},customElementCb:lt=>{Jt({type:Qe.IncrementalSnapshot,data:A({source:Be.CustomElement},lt)})},blockClass:a,ignoreClass:f,ignoreSelector:d,maskAllText:h,maskTextClass:g,unmaskTextClass:m,maskTextSelector:v,unmaskTextSelector:_,maskInputOptions:Te,inlineStylesheet:S,sampling:D,recordDOM:ae,recordCanvas:he,inlineImages:H,userTriggeredOnInput:pe,collectFonts:ce,doc:En,maskAttributeFn:O,maskInputFn:x,maskTextFn:I,keepIframeSrcFn:oe,blockSelector:s,unblockSelector:c,slimDOMOptions:Oe,dataURLOptions:G,mirror:Gr,iframeManager:Fe,stylesheetManager:hn,shadowDomManager:st,processedNodeManager:bt,canvasManager:$e,ignoreCSSAttributes:re,plugins:((At=P==null?void 0:P.filter(lt=>lt.observer))==null?void 0:At.map(lt=>({observer:lt.observer,options:lt.options,callback:Bi=>Jt({type:Qe.Plugin,data:{plugin:lt.name,payload:Bi}})})))||[]},{})};Fe.addLoadListener(En=>{try{ge.push(ct(En.contentDocument))}catch(At){console.warn(At)}});const Le=()=>{Xe(),ge.push(ct(document))};return document.readyState==="interactive"||document.readyState==="complete"?Le():(ge.push(qn("DOMContentLoaded",()=>{Jt({type:Qe.DomContentLoaded,data:{}}),X==="DOMContentLoaded"&&Le()})),ge.push(qn("load",()=>{Jt({type:Qe.Load,data:{}}),X==="load"&&Le()},window))),()=>{ge.forEach(En=>En()),bt.destroy(),gd=void 0,o9()}}catch(ge){console.warn(ge)}}function A9(e){if(!gd)throw new Error("please take full snapshot after start recording");gd(e)}Ni.mirror=Gr,Ni.takeFullSnapshot=A9;function O9(e,t){try{return e?e(t):new sw}catch(n){return console.warn("Unable to initialize CanvasManager"),new sw}}var uw;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(uw||(uw={}));const R9=3,M9=5;function qg(e){return e>9999999999?e:e*1e3}function $g(e){return e>9999999999?e/1e3:e}function Ac(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Qe.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:ar(t,10,1e3)}}),t.category==="console")))}const x9="button,a";function cw(e){return e.closest(x9)||e}function lw(e){const t=fw(e);return!t||!(t instanceof Element)?t:cw(t)}function fw(e){return I9(e)?e.target:e}function I9(e){return typeof e=="object"&&!!e&&"target"in e}let ha;function k9(e){return ha||(ha=[],D9()),ha.push(e),()=>{const t=ha?ha.indexOf(e):-1;t>-1&&ha.splice(t,1)}}function D9(){Fn(Ht,"open",function(e){return function(...t){if(ha)try{ha.forEach(n=>n())}catch(n){}return e.apply(Ht,t)}})}const N9=new Set([Be.Mutation,Be.StyleSheetRule,Be.StyleDeclaration,Be.AdoptedStyleSheet,Be.CanvasMutation,Be.Selection,Be.MediaInteraction]);function L9(e,t,n){e.handleClick(t,n)}class z9{constructor(t,n,r=Ac){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=k9(()=>{this._lastMutation=dw()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(B9(n,this._ignoreSelector)||!H9(t))return;const r={timestamp:$g(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(a=>a.node===r.node&&Math.abs(a.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=$g(t)}registerScroll(t=Date.now()){this._lastScroll=$g(t)}registerClick(t){const n=cw(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=dw();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const a=this._clicks.indexOf(r);a>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(a,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,a=t.mutationAfter&&t.mutationAfter<=this._threshold,s=!r&&!a,{clickCount:c,clickBreadcrumb:f}=t;if(s){const d=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,h=d1){const d={type:"default",message:f.message,timestamp:f.timestamp,category:"ui.multiClick",data:ee(A({},f.data),{url:Ht.location.href,route:n.getCurrentRoute(),clickCount:c,metric:!0})};this._addBreadcrumbEvent(n,d)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=vc(()=>this._checkClicks(),1e3)}}const U9=["A","BUTTON","INPUT"];function B9(e,t){return!!(!U9.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function H9(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function dw(){return Date.now()/1e3}function F9(e,t){try{if(!P9(t))return;const{source:n}=t.data;if(N9.has(n)&&e.registerMutation(t.timestamp),n===Be.Scroll&&e.registerScroll(t.timestamp),j9(t)){const{type:r,id:a}=t.data,s=Ni.mirror.getNode(a);s instanceof HTMLElement&&r===$n.Click&&e.registerClick(s)}}catch(n){}}function P9(e){return e.type===R9}function j9(e){return e.data.source===Be.MouseInteraction}function si(e){return A({timestamp:Date.now()/1e3,type:"default"},e)}var Vg=(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))(Vg||{});const q9=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function $9(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(q9.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const V9=e=>t=>{if(!e.isEnabled())return;const n=G9(t);if(!n)return;const r=t.name==="click",a=r?t.event:void 0;r&&e.clickDetector&&(a!=null&&a.target)&&!a.altKey&&!a.metaKey&&!a.ctrlKey&&!a.shiftKey&&L9(e.clickDetector,n,lw(t.event)),Ac(e,n)};function hw(e,t){const n=Ni.mirror.getId(e),r=n&&Ni.mirror.getNode(n),a=r&&Ni.mirror.getMeta(r),s=a&&W9(a)?a:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(c=>c.type===Vg.Text&&c.textContent).filter(Boolean).map(c=>c.trim()).join(""),attributes:$9(s.attributes)}}:{}}}function G9(e){const{target:t,message:n}=Q9(e);return si(A({category:`ui.${e.name}`},hw(t,n)))}function Q9(e){const t=e.name==="click";let n,r=null;try{r=t?lw(e.event):fw(e.event),n=yr(r,{maxStringLength:200})||""}catch(a){n=""}return{target:r,message:n}}function W9(e){return e.type===Vg.Element}function Y9(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=X9(t);n&&Ac(e,n)}function X9(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:a,key:s,target:c}=e;if(!c||K9(c)||!s)return null;const f=t||r||a,d=s.length===1;if(!f&&d)return null;const h=yr(c,{maxStringLength:200})||"",g=hw(c,h);return si({category:"ui.keyDown",message:h,data:ee(A({},g.data),{metaKey:t,shiftKey:n,ctrlKey:r,altKey:a,key:s})})}function K9(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const J9={resource:rB,paint:tB,navigation:nB};function Gg(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function Z9(e){return e.map(eB).filter(Boolean)}function eB(e){const t=J9[e.entryType];return t?t(e):null}function xs(e){return((jn()||Ht.performance.timeOrigin)+e)/1e3}function tB(e){const{duration:t,entryType:n,name:r,startTime:a}=e,s=xs(a);return{type:n,name:r,start:s,end:s+t,data:void 0}}function nB(e){const{entryType:t,name:n,decodedBodySize:r,duration:a,domComplete:s,encodedBodySize:c,domContentLoadedEventStart:f,domContentLoadedEventEnd:d,domInteractive:h,loadEventStart:g,loadEventEnd:m,redirectCount:v,startTime:_,transferSize:S,type:E}=e;return a===0?null:{type:`${t}.${E}`,start:xs(_),end:xs(s),name:n,data:{size:S,decodedBodySize:r,encodedBodySize:c,duration:a,domInteractive:h,domContentLoadedEventStart:f,domContentLoadedEventEnd:d,loadEventStart:g,loadEventEnd:m,domComplete:s,redirectCount:v}}}function rB(e){const{entryType:t,initiatorType:n,name:r,responseEnd:a,startTime:s,decodedBodySize:c,encodedBodySize:f,responseStatus:d,transferSize:h}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:xs(s),end:xs(a),name:r,data:{size:h,statusCode:d,decodedBodySize:c,encodedBodySize:f}}}function iB(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.element?[t.element]:void 0;return Qg(e,"largest-contentful-paint",n)}function aB(e){return e.sources!==void 0}function oB(e){const t=[],n=[];for(const r of e.entries)if(aB(r)){const a=[];for(const s of r.sources)if(s.node){n.push(s.node);const c=Ni.mirror.getId(s.node);c&&a.push(c)}t.push({value:r.value,nodeIds:a.length?a:void 0})}return Qg(e,"cumulative-layout-shift",n,t)}function sB(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return Qg(e,"interaction-to-next-paint",n)}function Qg(e,t,n,r){const a=e.value,s=e.rating,c=xs(a);return{type:"web-vital",name:t,start:c,end:c,data:{value:a,size:a,rating:s,nodeIds:n?n.map(f=>Ni.mirror.getId(f)):void 0,attributions:r}}}function uB(e){function t(a){e.performanceEntries.includes(a)||e.performanceEntries.push(a)}function n({entries:a}){a.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(a=>{r.push(_o(a,n))}),r.push(gg(Gg(iB,e)),mg(Gg(oB,e)),j1(Gg(sB,e))),()=>{r.forEach(a=>a())}}const De=typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__,cB='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<>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>f]=l}else for(o=new n(i),s=0;s>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;sd&&(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<e))break;w+=m-(1<>=y;w>0;){var M=o[s].s;p[M]=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>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s4&&!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+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B255){_(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>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<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;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(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&&(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>>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;oi.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{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function lB(){const e=new Blob([cB]);return URL.createObjectURL(e)}const pw=["log","warn","error"],yd="[Replay] ";function Wg(e,t="info"){qr({category:"console",data:{logger:"replay"},level:t,message:`${yd}${e}`},{level:t})}function fB(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return De?(pw.forEach(r=>{n[r]=(...a)=>{Y[r](yd,...a),t&&Wg(a.join(""),Dm(r))}}),n.exception=(r,...a)=>{a.length&&n.error&&n.error(...a),Y.error(yd,r),e?ua(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Wg(r,"error")},n.infoTick=(...r)=>{Y.log(yd,...r),t&&setTimeout(()=>Wg(r[0]),0)}):pw.forEach(r=>{n[r]=()=>{}}),n}const Ne=fB();class Yg extends Error{constructor(){super(`Event buffer exceeded maximum size of ${xg}.`)}}class mw{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=[]}addEvent(t){return _e(this,null,function*(){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>xg)throw new Yg;this.events.push(t)})}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?qg(t):null}}class dB{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){De&&Ne.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((a,s)=>{const c=({data:f})=>{const d=f;if(d.method===t&&d.id===r){if(this._worker.removeEventListener("message",c),!d.success){De&&Ne.error("Error in compression worker: ",d.response),s(new Error("Error in compression worker"));return}a(d.response)}};this._worker.addEventListener("message",c),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class hB{constructor(t){this._worker=new dB(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=qg(t.timestamp);(!this._earliestTimestamp||nxg?Promise.reject(new Yg):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{De&&Ne.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}_finishRequest(){return _e(this,null,function*(){const t=yield this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t})}}class pB{constructor(t){this._fallback=new mw,this._compression=new hB(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}finish(){return _e(this,null,function*(){return yield this.ensureWorkerIsLoaded(),this._used.finish()})}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}_ensureWorkerIsLoaded(){return _e(this,null,function*(){try{yield this._compression.ensureReady()}catch(t){De&&Ne.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}yield this._switchToCompressionWorker()})}_switchToCompressionWorker(){return _e(this,null,function*(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,a=[];for(const s of t)a.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{yield Promise.all(a),this._fallback.clear()}catch(s){De&&Ne.exception(s,"Failed to add events when switching buffers.")}})}}function mB({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=gB(t);if(n)return n}return De&&Ne.log("Using simple buffer"),new mw}function gB(e){try{const t=e||yB();if(!t)return;De&&Ne.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new pB(n)}catch(t){De&&Ne.exception(t,"Failed to create compression worker")}}function yB(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__=="undefined"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?lB():""}function Xg(){try{return"sessionStorage"in Ht&&!!Ht.sessionStorage}catch(e){return!1}}function vB(e){_B(),e.session=void 0}function _B(){if(Xg())try{Ht.sessionStorage.removeItem(Rg)}catch(e){}}function gw(e){return e===void 0?!1:Math.random()e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(De&&Ne.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function wB(e,t){try{if(typeof t=="function"&&EB(e))return t(e)}catch(n){return De&&Ne.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function ty(e){return!e.type}function ny(e){return e.type==="transaction"}function CB(e){return e.type==="replay_event"}function Tw(e){return e.type==="feedback"}function AB(e){return(t,n)=>{if(!e.isEnabled()||!ty(t)&&!ny(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(ny(t)){OB(e,t);return}RB(e,t)}}}function OB(e,t){var r,a;const n=e.getContext();(a=(r=t.contexts)==null?void 0:r.trace)!=null&&a.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function RB(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||vc(()=>_e(null,null,function*(){try{yield e.sendBufferedReplayOrFlush()}catch(a){e.handleException(a)}}))}function MB(e){return t=>{!e.isEnabled()||!ty(t)||xB(e,t)}}function xB(e,t){var r,a,s;const n=(s=(a=(r=t.exception)==null?void 0:r.values)==null?void 0:a[0])==null?void 0:s.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const c=si({category:"replay.hydrate-error",data:{url:oo()}});Ac(e,c)}}function IB(e){const t=ye();t&&t.on("beforeAddBreadcrumb",n=>kB(e,n))}function kB(e,t){if(!e.isEnabled()||!ww(t))return;const n=DB(t);n&&Ac(e,n)}function DB(e){return!ww(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?NB(e):si(e)}function NB(e){var a;const t=(a=e.data)==null?void 0:a.arguments;if(!Array.isArray(t)||t.length===0)return si(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>id?(n=!0,`${s.slice(0,id)}…`):s;if(typeof s=="object")try{const c=ar(s,7);return JSON.stringify(c).length>id?(n=!0,`${JSON.stringify(c,null,2).slice(0,id)}…`):c}catch(c){}return s});return si(ee(A({},e),{data:A(ee(A({},e.data),{arguments:r}),n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{})}))}function ww(e){return!!e.category}function LB(e,t){var n,r,a;return e.type||!((r=(n=e.exception)==null?void 0:n.values)!=null&&r.length)?!1:!!((a=t.originalException)!=null&&a.__rrweb__)}function Cw(){const e=Ue().getPropagationContext().dsc;e&&delete e.replay_id;const t=Qt();if(t){const n=jr(t);delete n.replay_id}}function zB(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Qe.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function UB(e,t){return e.recordingMode!=="buffer"||t.message===Mg||!t.exception||t.type?!1:gw(e.getOptions().errorSampleRate)}function BB(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:CB(t)?(delete t.breadcrumbs,t):!ty(t)&&!ny(t)&&!Tw(t)?t:e.checkAndHandleExpiredSession()?Tw(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),zB(e,t),t):LB(t,n)&&!e.getOptions()._experiments.captureExceptions?(De&&Ne.log("Ignoring error from rrweb internals",t),null):((UB(e,t)||e.recordingMode==="session")&&(t.tags=ee(A({},t.tags),{replayId:e.getSessionId()})),t):(Cw(),t),{id:"Replay"})}function vd(e,t){return t.map(({type:n,start:r,end:a,name:s,data:c})=>{const f=e.throttledAddEvent({type:Qe.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:a,data:c}}});return typeof f=="string"?Promise.resolve(null):f})}function HB(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function FB(e){return t=>{if(!e.isEnabled())return;const n=HB(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(vd(e,[n]),!1)))}}function PB(e,t){return De&&e.getOptions()._experiments.traceInternals?!1:mE(t,ye())}function Aw(e,t){e.isEnabled()&&t!==null&&(PB(e,t.name)||e.addUpdate(()=>(vd(e,[t]),!0)))}function _d(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=J1(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(n){}}function Ow(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function bd(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n=A({},e._meta),r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Rw(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:a,method:s,statusCode:c,request:f,response:d}=t;return{type:e,start:n/1e3,end:r/1e3,name:a,data:{method:s,statusCode:c,request:f,response:d}}}function Oc(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function pa(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:a,warnings:s}=jB(n);return r.body=a,s!=null&&s.length&&(r._meta={warnings:s}),r}function ry(e,t){return Object.entries(e).reduce((n,[r,a])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=a),n},{})}function jB(e){if(!e||typeof e!="string")return{body:e};const t=e.length>wT,n=qB(e);if(t){const r=e.slice(0,wT);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch(r){}return{body:e}}function qB(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Sd(e,t){const n=$B(e);return Hr(n,t)}function $B(e,t=Ht.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Ht.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}function VB(e,t,n){return _e(this,null,function*(){try{const r=yield QB(e,t,n),a=Rw("resource.fetch",r);Aw(n.replay,a)}catch(r){De&&Ne.exception(r,"Failed to capture fetch breadcrumb")}})}function GB(e,t){const{input:n,response:r}=t,a=n?Tg(n):void 0,s=_d(a),c=r?Ow(r.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),c!==void 0&&(e.data.response_body_size=c)}function QB(e,t,n){return _e(this,null,function*(){const r=Date.now(),{startTimestamp:a=r,endTimestamp:s=r}=t,{url:c,method:f,status_code:d=0,request_body_size:h,response_body_size:g}=e.data,m=Sd(c,n.networkDetailAllowUrls)&&!Sd(c,n.networkDetailDenyUrls),v=m?WB(n,t.input,h):Oc(h),_=yield YB(m,n,t.response,g);return{startTimestamp:a,endTimestamp:s,url:c,method:f,statusCode:d,request:v,response:_}})}function WB({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const a=n?JB(n,t):{};if(!e)return pa(a,r,void 0);const s=Tg(n),[c,f]=td(s,Ne),d=pa(a,r,c);return f?bd(d,f):d}function YB(s,c,f,d){return _e(this,arguments,function*(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,a){if(!e&&a!==void 0)return Oc(a);const h=r?Mw(r.headers,n):{};if(!r||!t&&a!==void 0)return pa(h,a,void 0);const[g,m]=yield KB(r),v=XB(g,{networkCaptureBodies:t,responseBodySize:a,captureDetails:e,headers:h});return m?bd(v,m):v})}function XB(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:a}){try{const s=e!=null&&e.length&&n===void 0?_d(e):n;return r?t?pa(a,s,e):pa(a,s,void 0):Oc(s)}catch(s){return De&&Ne.exception(s,"Failed to serialize response body"),pa(a,n,void 0)}}function KB(e){return _e(this,null,function*(){const t=ZB(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[yield eH(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(De&&Ne.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(De&&Ne.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}})}function Mw(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function JB(e,t){return e.length===1&&typeof e[0]!="string"?xw(e[0],t):e.length===2?xw(e[1],t):{}}function xw(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Mw(n,t):Array.isArray(n)?{}:ry(n,t):{}}function ZB(e){try{return e.clone()}catch(t){De&&Ne.exception(t,"Failed to clone response body")}}function eH(e){return new Promise((t,n)=>{const r=vc(()=>n(new Error("Timeout while trying to read response body")),500);tH(e).then(a=>t(a),a=>n(a)).finally(()=>clearTimeout(r))})}function tH(e){return _e(this,null,function*(){return yield e.text()})}function nH(e,t,n){return _e(this,null,function*(){try{const r=iH(e,t,n),a=Rw("resource.xhr",r);Aw(n.replay,a)}catch(r){De&&Ne.exception(r,"Failed to capture xhr breadcrumb")}})}function rH(e,t){const{xhr:n,input:r}=t;if(!n)return;const a=_d(r),s=n.getResponseHeader("content-length")?Ow(n.getResponseHeader("content-length")):uH(n.response,n.responseType);a!==void 0&&(e.data.request_body_size=a),s!==void 0&&(e.data.response_body_size=s)}function iH(e,t,n){const r=Date.now(),{startTimestamp:a=r,endTimestamp:s=r,input:c,xhr:f}=t,{url:d,method:h,status_code:g=0,request_body_size:m,response_body_size:v}=e.data;if(!d)return null;if(!f||!Sd(d,n.networkDetailAllowUrls)||Sd(d,n.networkDetailDenyUrls)){const L=Oc(m),D=Oc(v);return{startTimestamp:a,endTimestamp:s,url:d,method:h,statusCode:g,request:L,response:D}}const _=f[ki],S=_?ry(_.request_headers,n.networkRequestHeaders):{},E=ry(aH(f),n.networkResponseHeaders),[w,T]=n.networkCaptureBodies?td(c,Ne):[void 0],[O,x]=n.networkCaptureBodies?oH(f):[void 0],I=pa(S,m,w),M=pa(E,v,O);return{startTimestamp:a,endTimestamp:s,url:d,method:h,statusCode:g,request:T?bd(I,T):I,response:x?bd(M,x):M}}function aH(e){const t=e.getAllResponseHeaders();return t?t.split(`\r `).reduce((n,r)=>{const[a,s]=r.split(": ");return s&&(n[a.toLowerCase()]=s),n},{}):{}}function oH(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return sH(e.response,e.responseType)}catch(n){t.push(n)}return De&&Ne.warn("Failed to get xhr response body",...t),[void 0]}function sH(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return De&&Ne.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return De&&Ne.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function uH(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return _d(n)}catch(n){return}}function cH(e){const t=ye();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:a,networkRequestHeaders:s,networkResponseHeaders:c}=e.getOptions(),f={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:a,networkRequestHeaders:s,networkResponseHeaders:c};t&&t.on("beforeAddBreadcrumb",(d,h)=>lH(f,d,h))}catch(n){}}function lH(e,t,n){if(t.data)try{fH(t)&&hH(n)&&(rH(t,n),nH(t,n,e)),dH(t)&&pH(n)&&(GB(t,n),VB(t,n,e))}catch(r){De&&Ne.exception(r,"Error when enriching network breadcrumb")}}function fH(e){return e.category==="xhr"}function dH(e){return e.category==="fetch"}function hH(e){return e==null?void 0:e.xhr}function pH(e){return e==null?void 0:e.response}function mH(e){const t=ye();X1(V9(e)),Zf(FB(e)),IB(e),cH(e);const n=BB(e);qS(n),t&&(t.on("beforeSendEvent",MB(e)),t.on("afterSendEvent",AB(e)),t.on("createDsc",r=>{const a=e.getSessionId();a&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=a)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",(r,a)=>_e(null,null,function*(){var c;const s=e.getSessionId();a!=null&&a.includeReplay&&e.isEnabled()&&s&&((c=r.contexts)!=null&&c.feedback)&&(r.contexts.feedback.source==="api"&&(yield e.sendBufferedReplayOrFlush()),r.contexts.feedback.replay_id=s)})),t.on("openFeedbackWidget",()=>_e(null,null,function*(){yield e.sendBufferedReplayOrFlush()})))}function gH(e){return _e(this,null,function*(){try{return Promise.all(vd(e,[yH(Ht.performance.memory)]))}catch(t){return[]}})}function yH(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,a=Date.now()/1e3;return{type:"memory",name:"memory",start:a,end:a,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function vH(e,t,n){return nL(e,t,ee(A({},n),{setTimeoutImpl:vc}))}const br=ke.navigator;function _H(){var e,t;return/iPhone|iPad|iPod/i.test((e=br==null?void 0:br.userAgent)!=null?e:"")||/Macintosh/i.test((t=br==null?void 0:br.userAgent)!=null?t:"")&&(br!=null&&br.maxTouchPoints)&&(br==null?void 0:br.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function bH(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){De&&Ne.warn("Received replay event after session expired.");return}const a=r||!t;t=!0,e.clickDetector&&F9(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&a&&e.setInitialState(),!ey(e,n,a))return!0;if(!a)return!1;const s=e.session;if(EH(e,a),e.recordingMode==="buffer"&&s&&e.eventBuffer){const c=e.eventBuffer.getEarliestTimestamp();c&&(De&&Ne.log(`Updating session start time to earliest event in buffer to ${new Date(c)}`),s.started=c,e.getOptions().stickySession&&Kg(s))}return s!=null&&s.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function SH(e){const t=e.getOptions();return{type:Qe.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 EH(e,t){!t||!e.session||e.session.segmentId!==0||ey(e,SH(e),!1)}function TH(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(t){return null}}function wH(e,t,n,r){return ai(wS(e,lm(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function CH({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)} `;if(typeof e=="string")n=`${r}${e}`;else{const s=new TextEncoder().encode(r);n=new Uint8Array(s.length+e.length),n.set(s),n.set(e,s.length)}return n}function AH(a){return _e(this,arguments,function*({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,c={event_id:n,integrations:s};e.emit("preprocessEvent",r,c);const f=yield FS(e.getOptions(),r,c,t,e,cn());if(!f)return null;e.emit("postprocessEvent",f,c),f.platform=f.platform||"javascript";const d=e.getSdkMetadata(),{name:h,version:g,settings:m}=(d==null?void 0:d.sdk)||{};return f.sdk=ee(A({},f.sdk),{name:h||"sentry.javascript.unknown",version:g||"0.0.0",settings:m}),f})}function OH(c){return _e(this,arguments,function*({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:a,session:s}){const f=CH({recordingData:e,headers:{segment_id:n}}),{urls:d,errorIds:h,traceIds:g,initialTimestamp:m}=r,v=ye(),_=Ue(),S=v==null?void 0:v.getTransport(),E=v==null?void 0:v.getDsn();if(!v||!S||!E||!s.sampled)return Promise.resolve({});const w={type:rU,replay_start_timestamp:m/1e3,timestamp:a/1e3,error_ids:h,trace_ids:g,urls:d,replay_id:t,segment_id:n,replay_type:s.sampled},T=yield AH({scope:_,client:v,replayId:t,event:w});if(!T)return v.recordDroppedEvent("event_processor","replay"),De&&Ne.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete T.sdkProcessingMetadata;const O=wH(T,f,E,v.getOptions().tunnel);let x;try{x=yield S.send(O)}catch(M){const L=new Error(Mg);try{L.cause=M}catch(D){}throw L}if(typeof x.statusCode=="number"&&(x.statusCode<200||x.statusCode>=300))throw new Iw(x.statusCode);const I=fE({},x);if(lE(I,"replay"))throw new iy(I);return x})}class Iw extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class iy extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}function kw(n){return _e(this,arguments,function*(e,t={count:0,interval:cU}){const{recordingData:r,onError:a}=e;if(r.length)try{return yield OH(e),!0}catch(s){if(s instanceof Iw||s instanceof iy)throw s;if(ym("Replays",{_retryCount:t.count}),a&&a(s),t.count>=lU){const c=new Error(`${Mg} - max retries exceeded`);try{c.cause=s}catch(f){}throw c}return t.interval*=++t.count,new Promise((c,f)=>{vc(()=>_e(null,null,function*(){try{yield kw(e,t),c(!0)}catch(d){f(d)}}),t.interval)})}})}const Dw="__THROTTLED",RH="__SKIPPED";function MH(e,t,n){const r=new Map,a=f=>{const d=f-n;r.forEach((h,g)=>{g[...r.values()].reduce((f,d)=>f+d,0);let c=!1;return(...f)=>{const d=Math.floor(Date.now()/1e3);if(a(d),s()>=t){const g=c;return c=!0,g?RH:Dw}c=!1;const h=r.get(d)||0;return r.set(d,h+1),e(...f)}}class xH{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:iU,sessionIdleExpire:aU},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=vH(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=MH((c,f)=>TB(this,c,f),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:a}=this.getOptions(),s=r?{threshold:Math.min(fU,r),timeout:r,scrollTimeout:dU,ignoreSelector:a?a.join(","):""}:void 0;if(s&&(this.clickDetector=new z9(this,s)),De){const c=t._experiments;Ne.setConfig({captureExceptions:!!c.captureExceptions,traceInternals:!!c.traceInternals})}this._handleVisibilityChange=()=>{Ht.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const c=si({category:"ui.blur"});this._doChangeToBackgroundTasks(c)},this._handleWindowFocus=()=>{const c=si({category:"ui.focus"});this._doChangeToForegroundTasks(c)},this._handleKeyboardEvent=c=>{Y9(this,c)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){De&&Ne.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,a=n<=0&&r<=0;if(this._requiresManualStart=a,!a){if(this._initializeSessionForSampling(t),!this.session){De&&Ne.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",De&&Ne.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){De&&Ne.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){De&&Ne.log("Buffering is in progress, call `flush()` to save the replay");return}De&&Ne.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Zg({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){De&&Ne.log("Buffering is in progress, call `flush()` to save the replay");return}De&&Ne.infoTick("Starting replay in buffer mode");const t=Zg({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Ni(A(ee(A(ee(A(A({},this._recordingOptions),this.recordingMode==="buffer"?{checkoutEveryNms:uU}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)}),{emit:bH(this)}),_H()),{onMutation:this._onMutationHandler.bind(this)}),t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}))}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}stop(){return _e(this,arguments,function*({forceFlush:t=!1,reason:n}={}){var r;if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{De&&Ne.log(`Stopping Replay${n?` triggered by ${n}`:""}`),Cw(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&(yield this._flush({force:!0})),(r=this.eventBuffer)==null||r.destroy(),this.eventBuffer=null,vB(this)}catch(a){this.handleException(a)}}})}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),De&&Ne.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),De&&Ne.log("Resuming replay"))}sendBufferedReplayOrFlush(){return _e(this,arguments,function*({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();De&&Ne.log("Converting buffer to session"),yield this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())})}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){var n,r;if(!(t&&((n=this.session)==null?void 0:n.sampled)===!1))return(r=this.session)==null?void 0:r.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Jg(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Ht.location.pathname}${Ht.location.hash}${Ht.location.search}`,n=`${Ht.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===Dw){const a=si({category:"replay.throttled"});this.addUpdate(()=>!ey(this,{type:M9,timestamp:a.timestamp||0,data:{tag:"breadcrumb",payload:a,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Qt(),n=t&&an(t),a=(n&&Me(n).data||{})[jt];if(!(!n||!a||!["route","custom"].includes(a)))return Me(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=mB({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Zg({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return bw(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}_refreshSession(t){return _e(this,null,function*(){this._isEnabled&&(yield this.stop({reason:"refresh session"}),this.initializeSampling(t.id))})}_addListeners(){try{Ht.document.addEventListener("visibilitychange",this._handleVisibilityChange),Ht.addEventListener("blur",this._handleWindowBlur),Ht.addEventListener("focus",this._handleWindowFocus),Ht.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(mH(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=uB(this)}_removeListeners(){try{Ht.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Ht.removeEventListener("blur",this._handleWindowBlur),Ht.removeEventListener("focus",this._handleWindowFocus),Ht.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||_w(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){De&&Ne.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:Qe.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Z9(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(vd(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&rthis._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const a=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const c=yield this.eventBuffer.finish();yield kw({replayId:t,recordingData:c,segmentId:s,eventContext:a,session:this.session,timestamp:r,onError:f=>this.handleException(f)})}catch(r){this.handleException(r),this.stop({reason:"sendReplay"});const a=ye();if(a){const s=r instanceof iy?"ratelimit_backoff":"send_error";a.recordDroppedEvent(s,"replay")}}})}_flush(){return _e(this,arguments,function*({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){De&&Ne.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,a=Date.now()-n;this._debouncedFlush.cancel();const s=athis._options.maxReplayDuration+5e3;if(s||c){De&&Ne.log(`Session duration (${Math.floor(a/1e3)}s) is too ${s?"short":"long"}, not sending replay.`),s&&this._debouncedFlush();return}const f=this.eventBuffer;f&&this.session.segmentId===0&&!f.hasCheckout&&De&&Ne.log("Flushing initial segment without checkout.");const d=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{yield this._flushLock}catch(h){this.handleException(h)}finally{this._flushLock=void 0,d&&this._debouncedFlush()}})}_maybeSaveSession(){this.session&&this._options.stickySession&&Kg(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n!=null&&n.length&&t.some(f=>{const d=TH(f.target),h=n.join(",");return d==null?void 0:d.matches(h)}))return!1;const r=t.length,a=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,c=a&&r>a;if(r>s||c){const f=si({category:"replay.mutations",data:{count:r,limit:c}});this._createCustomBreadcrumb(f)}return c?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Rc(e,t){return[...e,...t].join(",")}function IH({mask:e,unmask:t,block:n,unblock:r,ignore:a}){const s=["base","iframe[srcdoc]:not([src])"],c=Rc(e,[".sentry-mask","[data-sentry-mask]"]),f=Rc(t,[]);return{maskTextSelector:c,unmaskTextSelector:f,blockSelector:Rc(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:Rc(r,[]),ignoreSelector:Rc(a,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function kH({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:a,value:s}){return!r||a.unmaskTextSelector&&e.matches(a.unmaskTextSelector)?s:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s}const Nw='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',DH=["content-length","content-type","accept"];let Lw=!1;const zw=(e=>new NH(e));class NH{constructor({flushMinDelay:t=oU,flushMaxDelay:n=sU,minReplayDuration:r=hU,maxReplayDuration:a=CT,stickySession:s=!0,useCompression:c=!0,workerUrl:f,_experiments:d={},maskAllText:h=!0,maskAllInputs:g=!0,blockAllMedia:m=!0,mutationBreadcrumbLimit:v=750,mutationLimit:_=1e4,slowClickTimeout:S=7e3,slowClickIgnoreSelectors:E=[],networkDetailAllowUrls:w=[],networkDetailDenyUrls:T=[],networkCaptureBodies:O=!0,networkRequestHeaders:x=[],networkResponseHeaders:I=[],mask:M=[],maskAttributes:L=["title","placeholder","aria-label"],unmask:D=[],block:G=[],unblock:V=[],ignore:ae=[],maskFn:he,beforeAddRecordingEvent:te,beforeErrorSampling:X,onError:pe}={}){this.name="Replay";const ce=IH({mask:M,unmask:D,block:G,unblock:V,ignore:ae});if(this._recordingOptions=ee(A({maskAllInputs:g,maskAllText:h,maskInputOptions:{password:!0},maskTextFn:he,maskInputFn:he,maskAttributeFn:(H,P,oe)=>kH({maskAttributes:L,maskAllText:h,privacyOptions:ce,key:H,value:P,el:oe})},ce),{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:H=>{try{H.__rrweb__=!0}catch(P){}},recordCrossOriginIframes:!!d.recordCrossOriginIframes}),this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,pU),maxReplayDuration:Math.min(a,CT),stickySession:s,useCompression:c,workerUrl:f,blockAllMedia:m,maskAllInputs:g,maskAllText:h,mutationBreadcrumbLimit:v,mutationLimit:_,slowClickTimeout:S,slowClickIgnoreSelectors:E,networkDetailAllowUrls:w,networkDetailDenyUrls:T,networkCaptureBodies:O,networkRequestHeaders:Uw(x),networkResponseHeaders:Uw(I),beforeAddRecordingEvent:te,beforeErrorSampling:X,onError:pe,_experiments:d},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Nw}`:Nw),this._isInitialized&&Hm())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Lw}set _isInitialized(t){Lw=t}afterAllSetup(t){!Hm()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){var n;if((n=this._replay)!=null&&n.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=LH(this._initialOptions,t);this._replay=new xH({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch(n){}}}function LH(e,t){const n=t.getOptions(),r=A({sessionSampleRate:0,errorSampleRate:0},e),a=co(n.replaysSessionSampleRate),s=co(n.replaysOnErrorSampleRate);return a==null&&s==null&&Si(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),a!=null&&(r.sessionSampleRate=a),s!=null&&(r.errorSampleRate=s),r}function Uw(e){return[...DH,...e.map(t=>t.toLowerCase())]}function zH(){const e=ye();return e==null?void 0:e.getIntegrationByName("Replay")}var UH=Object.defineProperty,BH=(e,t,n)=>t in e?UH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bw=(e,t,n)=>BH(e,typeof t!="symbol"?t+"":t,n);class HH{constructor(){Bw(this,"idNodeMap",new Map),Bw(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const n=(r=this.getMeta(t))==null?void 0:r.id;return n!=null?n:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const a=this.nodeMetaMap.get(r);a&&this.nodeMetaMap.set(n,a)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function FH(){return new HH}function PH(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function ay(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ay(e.parentNode,t,n,r+1)}function Hw(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(PH(r,e))return!0}return!!(t&&r.matches(t))}catch(a){return!1}}}const Is=`Please stop import mirror directly. Instead of that,\r now you can use replayer.getMirror() to access the mirror instance of a replayer,\r or you can use record.mirror to access the mirror instance during recording.`;let Fw={map:{},getId(){return console.error(Is),-1},getNode(){return console.error(Is),null},removeNodeFromMap(){console.error(Is)},has(){return console.error(Is),!1},reset(){console.error(Is)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Fw=new Proxy(Fw,{get(e,t,n){return t==="map"&&console.error(Is),Reflect.get(e,t,n)}}));function oy(e,t,n,r,a=window){const s=a.Object.getOwnPropertyDescriptor(e,t);return a.Object.defineProperty(e,t,r?n:{set(c){qw(()=>{n.set.call(this,c)},0),s&&s.set&&s.set.call(this,c)}}),()=>oy(e,t,s||{},!0)}function sy(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],a=n(r);return typeof a=="function"&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=a,()=>{e[t]=r}}catch(r){return()=>{}}}Date.now().toString();function jH(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(t){return null}}function Ed(e,t,n,r,a){if(!e)return!1;const s=jH(e);if(!s)return!1;const c=Hw(t,n),f=ay(s,c);let d=-1;return f<0?!1:(r&&(d=ay(s,Hw(null,r))),f>-1&&d<0?!0:f(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ks||{});let Td;function qH(e){Td=e}const uy=e=>Td?(...n)=>{try{return e(...n)}catch(r){if(Td&&Td(r)===!0)return()=>{};throw r}}:e;for(var Ds="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$H=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),wd=0;wd>2],a+=Ds[(t[n]&3)<<4|t[n+1]>>4],a+=Ds[(t[n+1]&15)<<2|t[n+2]>>6],a+=Ds[t[n+2]&63];return r%3===2?a=a.substring(0,a.length-1)+"=":r%3===1&&(a=a.substring(0,a.length-2)+"=="),a};const $w=new Map;function GH(e,t){let n=$w.get(e);return n||(n=new Map,$w.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const Vw=(e,t,n)=>{if(!e||!(Qw(e,t)||typeof e=="object"))return;const r=e.constructor.name,a=GH(n,r);let s=a.indexOf(e);return s===-1&&(s=a.length,a.push(e)),s};function Cd(e,t,n){if(e instanceof Array)return e.map(r=>Cd(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,a=VH(e);return{rr_type:r,base64:a}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Cd(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:a}=e;return{rr_type:r,src:a}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",a=e.toDataURL();return{rr_type:r,src:a}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Cd(e.data,t,n),e.width,e.height]};if(Qw(e,t)||typeof e=="object"){const r=e.constructor.name,a=Vw(e,t,n);return{rr_type:r,index:a}}}}return e}const Gw=(e,t,n)=>e.map(r=>Cd(r,t,n)),Qw=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(a=>typeof t[a]=="function").find(a=>e instanceof t[a]);function QH(e,t,n,r,a){const s=[],c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const f of c)try{if(typeof t.CanvasRenderingContext2D.prototype[f]!="function")continue;const d=sy(t.CanvasRenderingContext2D.prototype,f,function(h){return function(...g){return Ed(this.canvas,n,r,a,!0)||qw(()=>{const m=Gw(g,t,this);e(this.canvas,{type:ks["2D"],property:f,args:m})},0),h.apply(this,g)}});s.push(d)}catch(d){const h=oy(t.CanvasRenderingContext2D.prototype,f,{set(g){e(this.canvas,{type:ks["2D"],property:f,args:[g],setter:!0})}});s.push(h)}return()=>{s.forEach(f=>f())}}function WH(e){return e==="experimental-webgl"?"webgl":e}function Ww(e,t,n,r,a){const s=[];try{const c=sy(e.HTMLCanvasElement.prototype,"getContext",function(f){return function(d,...h){if(!Ed(this,t,n,r,!0)){const g=WH(d);if("__context"in this||(this.__context=g),a&&["webgl","webgl2"].includes(g))if(h[0]&&typeof h[0]=="object"){const m=h[0];m.preserveDrawingBuffer||(m.preserveDrawingBuffer=!0)}else h.splice(0,1,{preserveDrawingBuffer:!0})}return f.apply(this,[d,...h])}});s.push(c)}catch(c){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(c=>c())}}function Yw(e,t,n,r,a,s,c,f){const d=[],h=Object.getOwnPropertyNames(e);for(const g of h)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(g))try{if(typeof e[g]!="function")continue;const m=sy(e,g,function(v){return function(..._){const S=v.apply(this,_);if(Vw(S,f,this),"tagName"in this.canvas&&!Ed(this.canvas,r,a,s,!0)){const E=Gw(_,f,this),w={type:t,property:g,args:E};n(this.canvas,w)}return S}});d.push(m)}catch(m){const v=oy(e,g,{set(_){n(this.canvas,{type:t,property:g,args:[_],setter:!0})}});d.push(v)}return d}function YH(e,t,n,r,a,s){const c=[];return c.push(...Yw(t.WebGLRenderingContext.prototype,ks.WebGL,e,n,r,a,s,t)),typeof t.WebGL2RenderingContext!="undefined"&&c.push(...Yw(t.WebGL2RenderingContext.prototype,ks.WebGL2,e,n,r,a,s,t)),()=>{c.forEach(f=>f())}}const XH='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function KH(){const e=new Blob([XH]);return URL.createObjectURL(e)}class JH{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(f,d)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(f)||this.pendingCanvasMutations.set(f,[]),this.pendingCanvasMutations.get(f).push(d)};const{enableManualSnapshot:n,sampling:r="all",win:a,recordCanvas:s,errorHandler:c}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,c&&qH(c),(s&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(a),!n&&uy(()=>{s&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),s&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){var t;this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(n=>{try{n()}catch(r){}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,(t=this.worker)==null||t.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:a,unblockSelector:s,recordCanvas:c,enableManualSnapshot:f}=this.options;if(!this.windowsSet.has(t)){if(f){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}uy(()=>{if(c&&n==="all"&&this.initCanvasMutationObserver(t,r,a,s),c&&typeof n=="number"){const d=Ww(t,r,a,s,!0);this.restoreHandlers.push(()=>{d()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n!=null&&n.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}So(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(KH());return t.onmessage=n=>{const r=n.data,{id:a}=r;if(this.snapshotInProgressMap.set(a,!1),!("base64"in r))return;const{base64:s,type:c,width:f,height:d}=r;this.mutationCb({id:a,type:ks["2D"],commands:[{property:"clearRect",args:[0,0,f,d]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:c}]},0,0,f,d]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=So(n)};t=So(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,a){const s=Ww(t,n,r,a,!1),c=QH(this.processMutation.bind(this),t,n,r,a),f=YH(this.processMutation.bind(this),t,n,r,a,this.mirror);this.restoreHandlers.push(()=>{s(),c(),f()})}getCanvasElements(t,n,r){const a=[],s=c=>{c.querySelectorAll("canvas").forEach(f=>{Ed(f,t,n,r)||a.push(f)})};for(const c of this.windows){const f=c.deref();let d;try{d=f&&f.document}catch(h){}d&&s(d)}for(const c of this.shadowDoms){const f=c.deref();f&&s(f)}return a}takeSnapshot(t,n,r){const{sampling:a,blockClass:s,blockSelector:c,unblockSelector:f,dataURLOptions:d,maxCanvasSize:h}=this.options,m=1e3/(a==="all"?2:a||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime{var w;const E=this.mirror.getId(S);if(!(!this.mirror.hasNode(S)||!S.width||!S.height||this.snapshotInProgressMap.get(E))){if(this.snapshotInProgressMap.set(E,!0),!n&&["webgl","webgl2"].includes(S.__context)){const T=S.getContext(S.__context);((w=T==null?void 0:T.getContextAttributes())==null?void 0:w.preserveDrawingBuffer)===!1&&T.clear(T.COLOR_BUFFER_BIT)}createImageBitmap(S).then(T=>{var O;(O=this.worker)==null||O.postMessage({id:E,bitmap:T,width:S.width,height:S.height,dataURLOptions:d,maxCanvasSize:h},[T])}).catch(T=>{uy(()=>{throw this.snapshotInProgressMap.delete(E),T})()})}}),!0)}startPendingCanvasMutationFlusher(){So(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,So(t)};So(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),So(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const a=r.map(c=>{const h=c,{type:f}=h;return no(h,["type"])}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:a}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((TM=e.contentWindow)==null?void 0:TM.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}FH();var Xw;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Xw||(Xw={}));const Kw={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},ZH="ReplayCanvas",Ad=1280,eF=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Ad):Ad,n?Math.min(n,Ad):Ad]};let a;const s=new Promise(f=>a=f);return{name:ZH,getOptions(){const{quality:f,enableManualSnapshot:d,maxCanvasSize:h}=r;return A({enableManualSnapshot:d,recordCanvas:!0,getCanvasManager:g=>{const m=new JH(ee(A({},g),{enableManualSnapshot:d,maxCanvasSize:h,errorHandler:v=>{try{typeof v=="object"&&(v.__rrweb__=!0)}catch(_){}}}));return a(m),m}},Kw[f]||Kw.medium)},snapshot(f,d){return _e(this,null,function*(){(yield s).snapshot(f,d)})}}}),Jw=new WeakMap,cy=new Map,ly={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Zw(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:a,shouldCreateSpanForRequest:s,enableHTTPTimings:c,tracePropagationTargets:f,onRequestSpanStart:d}=A(A({},ly),t),h=typeof s=="function"?s:_=>!0,g=_=>nF(_,f),m={},v=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(_=>(_.type==="transaction"&&_.spans&&_.spans.forEach(S=>{if(S.op==="http.client"){const E=cy.get(S.span_id);E&&(S.timestamp=E/1e3,cy.delete(S.span_id))}}),_)),a&&B4(_=>{if(_.response){const S=Jw.get(_.response);S&&_.endTimestamp&&cy.set(S,_.endTimestamp)}}),Um(_=>{const S=u4(_,h,g,m,{propagateTraceparent:v});if(_.response&&_.fetchData.__span&&Jw.set(_.response,_.fetchData.__span),S){const E=tC(_.fetchData.url),w=E?mo(E).host:void 0;S.setAttributes({"http.url":E,"server.address":w}),c&&eC(S),d==null||d(S,{headers:_.headers})}})),r&&Eg(_=>{var E;const S=rF(_,h,g,m,v);if(S){c&&eC(S);let w;try{w=new Headers((E=_.xhr.__sentry_xhr_v3__)==null?void 0:E.request_headers)}catch(T){}d==null||d(S,{headers:w})}})}function tF(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function eC(e){const{url:t}=Me(e).data;if(!t||typeof t!="string")return;const n=_o("resource",({entries:r})=>{r.forEach(a=>{tF(a)&&a.name.endsWith(t)&&(e.setAttributes(Q1(a)),setTimeout(n))})})}function nF(e,t){const n=oo();if(n){let r,a;try{r=new URL(e,n),a=new URL(n).origin}catch(c){return!1}const s=r.origin===a;return t?Hr(r.toString(),t)||s&&Hr(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?Hr(e,t):r}}function rF(e,t,n,r,a){const s=e.xhr,c=s==null?void 0:s[ki];if(!s||s.__sentry_own_request__||!c)return;const{url:f,method:d}=c,h=Pr()&&t(f);if(e.endTimestamp&&h){const w=s.__sentry_xhr_span_id__;if(!w)return;const T=r[w];T&&c.status_code!==void 0&&(tc(T,c.status_code),T.end(),delete r[w]);return}const g=tC(f),m=mo(g||f),v=pE(f),_=!!Qt(),S=h&&_?vr({name:`${d} ${v}`,attributes:A(A({url:f,type:"xhr","http.method":d,"http.url":g,"server.address":m==null?void 0:m.host,[Ze]:"auto.http.browser",[rn]:"http.client"},(m==null?void 0:m.search)&&{"http.query":m==null?void 0:m.search}),(m==null?void 0:m.hash)&&{"http.fragment":m==null?void 0:m.hash})}):new Mi;s.__sentry_xhr_span_id__=S.spanContext().spanId,r[s.__sentry_xhr_span_id__]=S,n(f)&&iF(s,Pr()&&_?S:void 0,a);const E=ye();return E&&E.emit("beforeOutgoingRequestSpan",S,e),S}function iF(e,t,n){const{"sentry-trace":r,baggage:a,traceparent:s}=xm({span:t,propagateTraceparent:n});r&&aF(e,r,a,s)}function aF(e,t,n,r){var s;const a=(s=e.__sentry_xhr_v3__)==null?void 0:s.request_headers;if(!(a!=null&&a["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!(a!=null&&a.traceparent)&&e.setRequestHeader("traceparent",r),n){const c=a==null?void 0:a.baggage;(!c||!oF(c))&&e.setRequestHeader("baggage",n)}}catch(c){}}function oF(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function tC(e){try{return new URL(e,Ee.location.origin).href}catch(t){return}}function sF(){Ee.document?Ee.document.addEventListener("visibilitychange",()=>{const e=Qt();if(!e)return;const t=an(e);if(Ee.document.hidden&&t){const n="cancelled",{op:r,status:a}=Me(t);Ge&&Y.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),a||t.setStatus({code:Xt,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):Ge&&Y.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const uF=3600,nC="sentry_previous_trace",cF="sentry.previous_trace";function lF(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let a=r?hF():void 0;e.on("spanStart",c=>{if(an(c)!==c)return;const f=Ue().getPropagationContext();a=fF(a,c,f),r&&dF(a)});let s=!0;n&&e.on("beforeSampling",c=>{if(!a)return;const f=Ue(),d=f.getPropagationContext();if(s&&d.parentSpanId){s=!1;return}f.setPropagationContext(ee(A({},d),{dsc:ee(A({},d.dsc),{sample_rate:String(a.sampleRate),sampled:String(fy(a.spanContext))}),sampleRand:a.sampleRand})),c.parentSampled=fy(a.spanContext),c.parentSampleRate=a.sampleRate,c.spanAttributes=ee(A({},c.spanAttributes),{[W0]:a.sampleRate})})}function fF(e,t,n){const r=Me(t);function a(){var f,d,h;try{return(h=Number((f=n.dsc)==null?void 0:f.sample_rate))!=null?h:Number((d=r.data)==null?void 0:d[uf])}catch(g){return 0}}const s={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:a(),sampleRand:n.sampleRand};if(!e)return s;const c=e.spanContext;return c.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=uF&&(Ge&&Y.log(`Adding previous_trace ${c} link to span ${A({op:r.op},t.spanContext())}`),t.addLink({context:c,attributes:{[UN]:"previous_trace"}}),t.setAttribute(cF,`${c.traceId}-${c.spanId}-${fy(c)?1:0}`)),s)}function dF(e){try{Ee.sessionStorage.setItem(nC,JSON.stringify(e))}catch(t){Ge&&Y.warn("Could not store previous trace in sessionStorage",t)}}function hF(){var e;try{const t=(e=Ee.sessionStorage)==null?void 0:e.getItem(nC);return JSON.parse(t)}catch(t){return}}function fy(e){return e.traceFlags===1}const pF="BrowserTracing",mF=A(ee(A({},vf),{instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{}}),ly),Ns=((e={})=>{const t={name:void 0,source:void 0},n=Ee.document,{enableInp:r,enableElementTiming:a,enableLongTask:s,enableLongAnimationFrame:c,_experiments:{enableInteractions:f,enableStandaloneClsSpans:d,enableStandaloneLcpSpans:h},beforeStartSpan:g,idleTimeout:m,finalTimeout:v,childSpanTimeout:_,markBackgroundSpan:S,traceFetch:E,traceXHR:w,trackFetchStreamPerformance:T,shouldCreateSpanForRequest:O,enableHTTPTimings:x,ignoreResourceSpans:I,ignorePerformanceApiSpans:M,instrumentPageLoad:L,instrumentNavigation:D,detectRedirects:G,linkPreviousTrace:V,consistentTraceSampling:ae,enableReportPageLoaded:he,onRequestSpanStart:te}=A(A({},mF),e);let X,pe,ce;function H(P,oe,re=!0){const fe=oe.op==="pageload",k=oe.name,q=g?g(oe):oe,ue=q.attributes||{};if(k!==q.name&&(ue[jt]="custom",q.attributes=ue),!re){const Oe=uo();vr(ee(A({},q),{startTime:Oe})).end(Oe);return}t.name=q.name,t.source=ue[jt];const se=LS(q,{idleTimeout:m,finalTimeout:v,childSpanTimeout:_,disableAutoFinish:fe,beforeSpanEnd:Oe=>{X==null||X(),u8(Oe,{recordClsOnPageloadSpan:!d,recordLcpOnPageloadSpan:!h,ignoreResourceSpans:I,ignorePerformanceApiSpans:M}),aC(P,void 0);const Re=Ue(),nt=Re.getPropagationContext();Re.setPropagationContext(ee(A({},nt),{traceId:se.spanContext().traceId,sampled:sa(se),dsc:jr(Oe)})),fe&&(ce=void 0)},trimIdleSpanEndTimestamp:!he});fe&&he&&(ce=se),aC(P,se);function Te(){n&&["interactive","complete"].includes(n.readyState)&&P.emit("idleSpanEnableAutoFinish",se)}fe&&!he&&n&&(n.addEventListener("readystatechange",()=>{Te()}),Te())}return{name:pF,setup(P){if(yS(),X=t8({recordClsStandaloneSpans:d||!1,recordLcpStandaloneSpans:h||!1,client:P}),r&&k8(),a&&_8(),c&&ke.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?r8():s&&n8(),f&&i8(),G&&n){const re=()=>{pe=Bt()};addEventListener("click",re,{capture:!0}),addEventListener("keydown",re,{capture:!0,passive:!0})}function oe(){const re=Mc(P);re&&!Me(re).timestamp&&(Ge&&Y.log(`[Tracing] Finishing current active span with op: ${Me(re).op}`),re.setAttribute(Ju,"cancelled"),re.end())}P.on("startNavigationSpan",(re,fe)=>{if(ye()!==P)return;if(fe!=null&&fe.isRedirect){Ge&&Y.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),H(P,A({op:"navigation.redirect"},re),!1);return}pe=void 0,oe(),cn().setPropagationContext({traceId:ii(),sampleRand:Math.random(),propagationSpanId:Pr()?void 0:Oi()});const k=Ue();k.setPropagationContext({traceId:ii(),sampleRand:Math.random(),propagationSpanId:Pr()?void 0:Oi()}),k.setSDKProcessingMetadata({normalizedRequest:void 0}),H(P,ee(A({op:"navigation"},re),{parentSpan:null,forceTransaction:!0}))}),P.on("startPageLoadSpan",(re,fe={})=>{if(ye()!==P)return;oe();const k=fe.sentryTrace||rC("sentry-trace"),q=fe.baggage||rC("baggage"),ue=aS(k,q),se=Ue();se.setPropagationContext(ue),Pr()||(se.getPropagationContext().propagationSpanId=Oi()),se.setSDKProcessingMetadata({normalizedRequest:tg()}),H(P,A({op:"pageload"},re))}),P.on("endPageloadSpan",()=>{he&&ce&&(ce.setAttribute(Ju,"reportPageLoaded"),ce.end())})},afterAllSetup(P){let oe=oo();if(V!=="off"&&lF(P,{linkPreviousTrace:V,consistentTraceSampling:ae}),Ee.location){if(L){const re=jn();Ls(P,{name:Ee.location.pathname,startTime:re?re/1e3:void 0,attributes:{[jt]:"url",[Ze]:"auto.pageload.browser"}})}D&&Zf(({to:re,from:fe})=>{if(fe===void 0&&(oe==null?void 0:oe.indexOf(re))!==-1){oe=void 0;return}oe=void 0;const k=Mm(re),q=Mc(P),ue=q&&G&&yF(q,pe);zs(P,{name:(k==null?void 0:k.pathname)||Ee.location.pathname,attributes:{[jt]:"url",[Ze]:"auto.navigation.browser"}},{url:re,isRedirect:ue})})}S&&sF(),f&&gF(P,m,v,_,t),r&&L8(),Zw(P,{traceFetch:E,traceXHR:w,trackFetchStreamPerformance:T,tracePropagationTargets:P.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:O,enableHTTPTimings:x,onRequestSpanStart:te})}}});function Ls(e,t,n){e.emit("startPageLoadSpan",t,n),Ue().setTransactionName(t.name);const r=Mc(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function zs(e,t,n){const{url:r,isRedirect:a}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:a}),e.emit("startNavigationSpan",t,{isRedirect:a});const s=Ue();return s.setTransactionName(t.name),r&&!a&&s.setSDKProcessingMetadata({normalizedRequest:ee(A({},tg()),{url:r})}),Mc(e)}function rC(e){const t=Ee.document,n=t==null?void 0:t.querySelector(`meta[name=${e}]`);return(n==null?void 0:n.getAttribute("content"))||void 0}function gF(e,t,n,r,a){const s=Ee.document;let c;const f=()=>{const d="ui.action.click",h=Mc(e);if(h){const g=Me(h).op;if(["navigation","pageload"].includes(g)){Ge&&Y.warn(`[Tracing] Did not create ${d} span because a pageload or navigation span is in progress.`);return}}if(c&&(c.setAttribute(Ju,"interactionInterrupted"),c.end(),c=void 0),!a.name){Ge&&Y.warn(`[Tracing] Did not create ${d} transaction because _latestRouteName is missing.`);return}c=LS({name:a.name,op:d,attributes:{[jt]:a.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};s&&addEventListener("click",f,{capture:!0})}const iC="_sentry_idleSpan";function Mc(e){return e[iC]}function aC(e,t){An(e,iC,t)}const oC=1.5;function yF(e,t){const n=Me(e),r=uo(),a=n.start_timestamp;return!(r-a>oC||t&&r-t<=oC)}function vF(e=ye()){e==null||e.emit("endPageloadSpan")}function _F(e){const t=Qt();if(t===e)return;const n=Ue();e.end=new Proxy(e.end,{apply(r,a,s){return Ri(n,t),Reflect.apply(r,a,s)}}),Ri(n,e)}function Us(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function bF(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Us(n);return a=>r.then(s=>a(s.transaction(t,"readwrite").objectStore(t)))}function dy(e){return Us(e.getAllKeys())}function SF(e,t,n){return e(r=>dy(r).then(a=>{if(!(a.length>=n))return r.put(t,Math.max(...a,0)+1),Us(r.transaction)}))}function EF(e,t,n){return e(r=>dy(r).then(a=>{if(!(a.length>=n))return r.put(t,Math.min(...a,0)-1),Us(r.transaction)}))}function TF(e){return e(t=>dy(t).then(n=>{const r=n[0];if(r!=null)return Us(t.get(r)).then(a=>(t.delete(r),Us(t.transaction).then(()=>a)))}))}function wF(e){let t;function n(){return t==null&&(t=bF(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:r=>_e(null,null,function*(){try{const a=yield pf(r);yield SF(n(),a,e.maxQueueSize||30)}catch(a){}}),unshift:r=>_e(null,null,function*(){try{const a=yield pf(r);yield EF(n(),a,e.maxQueueSize||30)}catch(a){}}),shift:()=>_e(null,null,function*(){try{const r=yield TF(n());if(r)return y5(r)}catch(r){}})}}function CF(e){return t=>{const n=e(ee(A({},t),{createStore:wF}));return Ee.addEventListener("online",r=>_e(null,null,function*(){yield n.flush()})),n}}function AF(e=Cg){return CF($3(e))}const sC=1e6,Od=String(0),OF="main",Sr=Ee.navigator;let uC="",cC="",lC="",hy=(Sr==null?void 0:Sr.userAgent)||"",fC="";const RF=(Sr==null?void 0:Sr.language)||((wM=Sr==null?void 0:Sr.languages)==null?void 0:wM[0])||"";function MF(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const dC=Sr==null?void 0:Sr.userAgentData;MF(dC)&&dC.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{var t;if(uC=e.platform||"",lC=e.architecture||"",fC=e.model||"",cC=e.platformVersion||"",(t=e.fullVersionList)!=null&&t.length){const n=e.fullVersionList[e.fullVersionList.length-1];hy=`${n.brand} ${n.version}`}}).catch(e=>{});function xF(e){return!("thread_metadata"in e)}function IF(e){return xF(e)?NF(e):e}function kF(e){var n,r;const t=(r=(n=e.contexts)==null?void 0:n.trace)==null?void 0:r.trace_id;return typeof t=="string"&&t.length!==32&&Ge&&Y.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function DF(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const a=kF(r),s=IF(n),c=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Bt()*1e3),f=typeof r.timestamp=="number"?r.timestamp*1e3:Bt()*1e3;return{event_id:e,timestamp:new Date(c).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||ff,runtime:{name:"javascript",version:Ee.navigator.userAgent},os:{name:uC,version:cC,build_number:hy},device:{locale:RF,model:fC,manufacturer:hy,architecture:lC,is_emulator:!1},debug_meta:{images:UF(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||Pn(),trace_id:a,active_thread_id:Od,relative_start_ns:"0",relative_end_ns:((f-c)*1e6).toFixed(0)}]}}function hC(e){return Me(e).op==="pageload"}function NF(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Od]:{name:OF}}},a=e.samples[0];if(!a)return r;const s=a.timestamp,c=jn(),f=typeof performance.timeOrigin=="number"?performance.timeOrigin:c||0,d=f-(c||f);return e.samples.forEach((h,g)=>{if(h.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[g]={elapsed_since_start_ns:((h.timestamp+d-s)*sC).toFixed(0),stack_id:t,thread_id:Od};return}let m=e.stacks[h.stackId];const v=[];for(;m;){v.push(m.frameId);const S=e.frames[m.frameId];S&&r.frames[m.frameId]===void 0&&(r.frames[m.frameId]={function:S.name,abs_path:typeof S.resourceId=="number"?e.resources[S.resourceId]:void 0,lineno:S.line,colno:S.column}),m=m.parentId===void 0?void 0:e.stacks[m.parentId]}const _={elapsed_since_start_ns:((h.timestamp+d-s)*sC).toFixed(0),stack_id:n,thread_id:Od};r.stacks[n]=v,r.samples[g]=_,n++}),r}function LF(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function zF(e){const t=[];return ho(e,(n,r)=>{var a,s;if(r==="transaction")for(let c=1;c1?(Ge&&Y.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function HF(e){return e.samples.length<2?(Ge&&Y.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(Ge&&Y.log("[Profiling] Discarding profile because it contains no frames"),!1)}let pC=!1;const mC=3e4;function FF(e){return typeof e=="function"}function PF(){const e=Ee.Profiler;if(!FF(e)){Ge&&Y.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(mC/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch(r){Ge&&(Y.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),Y.log("[Profiling] Disabling profiling for current user session.")),pC=!0}}function gC(e){if(pC)return Ge&&Y.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return Ge&&Y.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const t=ye(),n=t==null?void 0:t.getOptions();if(!n)return Ge&&Y.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return BF(r)?r?(r===!0?!0:Math.random()30){const n=Eo.keys().next().value;Eo.delete(n)}}function yC(e){let t;hC(e)&&(t=Bt()*1e3);const n=PF();if(!n)return;Ge&&Y.log(`[Profiling] started profiling span: ${Me(e).description}`);const r=Pn();Ue().setContext("profile",{profile_id:r,start_timestamp:t});function a(){return _e(this,null,function*(){if(e&&n)return n.stop().then(d=>{if(s&&(Ee.clearTimeout(s),s=void 0),Ge&&Y.log(`[Profiling] stopped profiling of span: ${Me(e).description}`),!d){Ge&&Y.log(`[Profiling] profiler returned null profile for: ${Me(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}VF(r,d)}).catch(d=>{Ge&&Y.log("[Profiling] error while stopping profiler:",d)})})}let s=Ee.setTimeout(()=>{Ge&&Y.log("[Profiling] max profile duration elapsed, stopping profiling for:",Me(e).description),a()},mC);const c=e.end.bind(e);function f(){return e?(a().then(()=>{c()},()=>{c()}),e):c()}e.end=f}const GF="BrowserProfiling",QF=(()=>({name:GF,setup(e){const t=Qt(),n=t&&an(t);n&&hC(n)&&gC(n)&&yC(n),e.on("spanStart",r=>{r===an(r)&&gC(r)&&yC(r)}),e.on("beforeEnvelope",r=>{var c,f;if(!qF())return;const a=zF(r);if(!a.length)return;const s=[];for(const d of a){const h=d==null?void 0:d.contexts,g=(c=h==null?void 0:h.profile)==null?void 0:c.profile_id,m=(f=h==null?void 0:h.profile)==null?void 0:f.start_timestamp;if(typeof g!="string"){Ge&&Y.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!g){Ge&&Y.log("[Profiling] cannot find profile for a span without a profile context");continue}h!=null&&h.profile&&delete h.profile;const v=$F(g);if(!v){Ge&&Y.log(`[Profiling] Could not retrieve profile for span: ${g}`);continue}const _=jF(g,m,v,d);_&&s.push(_)}LF(r,s)})}})),WF="SpotlightBrowser",YF=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:WF,setup:()=>{Ge&&Y.log("Using Sidecar URL",t)},processEvent:n=>JF(n)?null:n,afterAllSetup:n=>{XF(n,t)}}});function XF(e,t){const n=Sg("fetch");let r=0;e.on("beforeEnvelope",a=>{if(r>3){Y.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:pf(a),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(s=>{s.status>=200&&s.status<400&&(r=0)},s=>{r++,Y.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",s)})})}const KF=YF;function JF(e){var t;return!!(e.type==="transaction"&&e.spans&&((t=e.contexts)!=null&&t.trace)&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:n})=>n==null?void 0:n.includes("#sentry-spotlight")))}const ZF=()=>({name:"LaunchDarkly",processEvent(e,t,n){return oc(e)}});function eP(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{ss(e,t.value),us(e,t.value)}}}const tP=()=>({name:"OpenFeature",processEvent(e,t,n){return oc(e)}});class nP{after(t,n){ss(n.flagKey,n.value),us(n.flagKey,n.value)}error(t,n,r){ss(t.flagKey,t.defaultValue),us(t.flagKey,t.defaultValue)}}const rP=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Fn(t,"isEnabled",iP)},processEvent(t,n,r){return oc(t)}});function iP(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(ss(n,r),us(n,r)):Ge&&Y.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const aP=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{ss(n.gate.name,n.gate.value),us(n.gate.name,n.gate.value)})},processEvent(t,n,r){return oc(t)}});function oP(){return _e(this,null,function*(){const e=ye();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";try{yield IS(()=>fetch("https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7",{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch(t){return"sentry-unreachable"}})}const sP="WebWorker",uP=({worker:e})=>({name:sP,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>vC(t))},addWorker:t=>vC(t)});function vC(e){e.addEventListener("message",t=>{lP(t.data)&&(t.stopImmediatePropagation(),Ge&&Y.log("Sentry debugId web worker message received",t.data),Ee._sentryDebugIds=A(A({},t.data._sentryDebugIds),Ee._sentryDebugIds))})}function cP({self:e}){var t;e.postMessage({_sentryMessage:!0,_sentryDebugIds:(t=e._sentryDebugIds)!=null?t:void 0})}function lP(e){return wi(e)&&e._sentryMessage===!0&&"_sentryDebugIds"in e&&(wi(e._sentryDebugIds)||e._sentryDebugIds===void 0)}function py(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var my={exports:{}},He={},_C;function fP(){if(_C)return He;_C=1;/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),v=Symbol.iterator;function _(k){return k===null||typeof k!="object"?null:(k=v&&k[v]||k["@@iterator"],typeof k=="function"?k:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,w={};function T(k,q,ue){this.props=k,this.context=q,this.refs=w,this.updater=ue||S}T.prototype.isReactComponent={},T.prototype.setState=function(k,q){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,q,"setState")},T.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function O(){}O.prototype=T.prototype;function x(k,q,ue){this.props=k,this.context=q,this.refs=w,this.updater=ue||S}var I=x.prototype=new O;I.constructor=x,E(I,T.prototype),I.isPureReactComponent=!0;var M=Array.isArray;function L(){}var D={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function V(k,q,ue){var se=ue.ref;return{$$typeof:e,type:k,key:q,ref:se!==void 0?se:null,props:ue}}function ae(k,q){return V(k.type,q,k.props)}function he(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function te(k){var q={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ue){return q[ue]})}var X=/\/+/g;function pe(k,q){return typeof k=="object"&&k!==null&&k.key!=null?te(""+k.key):q.toString(36)}function ce(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(L,L):(k.status="pending",k.then(function(q){k.status==="pending"&&(k.status="fulfilled",k.value=q)},function(q){k.status==="pending"&&(k.status="rejected",k.reason=q)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function H(k,q,ue,se,Te){var Oe=typeof k;(Oe==="undefined"||Oe==="boolean")&&(k=null);var Re=!1;if(k===null)Re=!0;else switch(Oe){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(k.$$typeof){case e:case t:Re=!0;break;case g:return Re=k._init,H(Re(k._payload),q,ue,se,Te)}}if(Re)return Te=Te(k),Re=se===""?"."+pe(k,0):se,M(Te)?(ue="",Re!=null&&(ue=Re.replace(X,"$&/")+"/"),H(Te,q,ue,"",function(dn){return dn})):Te!=null&&(he(Te)&&(Te=ae(Te,ue+(Te.key==null||k&&k.key===Te.key?"":(""+Te.key).replace(X,"$&/")+"/")+Re)),q.push(Te)),1;Re=0;var nt=se===""?".":se+":";if(M(k))for(var Ye=0;Ye=17}function hP(e,t){const n=new WeakSet;function r(a,s){if(!n.has(a)){if(a.cause)return n.add(a),r(a.cause,s);a.cause=s}}r(e,t)}function gy(e,{componentStack:t},n){if(dP(je.version)&&Ti(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,hP(e,r)}return Wn(r=>(r.setContext("react",{componentStack:t}),ua(e,n)))}function pP(e){return(t,n)=>{const r=!!e,a=gy(t,n,{mechanism:{handled:r,type:"auto.function.react.error_handler"}});r&&e(t,n,a)}}const TC="ui.react.render",mP="ui.react.update",wC="ui.react.mount";var yy={exports:{}},vt={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var CC;function gP(){if(CC)return vt;CC=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,S=e?Symbol.for("react.lazy"):60116,E=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function x(M){if(typeof M=="object"&&M!==null){var L=M.$$typeof;switch(L){case t:switch(M=M.type,M){case d:case h:case r:case s:case a:case m:return M;default:switch(M=M&&M.$$typeof,M){case f:case g:case S:case _:case c:return M;default:return L}}case n:return L}}}function I(M){return x(M)===h}return vt.AsyncMode=d,vt.ConcurrentMode=h,vt.ContextConsumer=f,vt.ContextProvider=c,vt.Element=t,vt.ForwardRef=g,vt.Fragment=r,vt.Lazy=S,vt.Memo=_,vt.Portal=n,vt.Profiler=s,vt.StrictMode=a,vt.Suspense=m,vt.isAsyncMode=function(M){return I(M)||x(M)===d},vt.isConcurrentMode=I,vt.isContextConsumer=function(M){return x(M)===f},vt.isContextProvider=function(M){return x(M)===c},vt.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===t},vt.isForwardRef=function(M){return x(M)===g},vt.isFragment=function(M){return x(M)===r},vt.isLazy=function(M){return x(M)===S},vt.isMemo=function(M){return x(M)===_},vt.isPortal=function(M){return x(M)===n},vt.isProfiler=function(M){return x(M)===s},vt.isStrictMode=function(M){return x(M)===a},vt.isSuspense=function(M){return x(M)===m},vt.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===r||M===h||M===s||M===a||M===m||M===v||typeof M=="object"&&M!==null&&(M.$$typeof===S||M.$$typeof===_||M.$$typeof===c||M.$$typeof===f||M.$$typeof===g||M.$$typeof===w||M.$$typeof===T||M.$$typeof===O||M.$$typeof===E)},vt.typeOf=x,vt}var AC;function yP(){return AC||(AC=1,yy.exports=gP()),yy.exports}var vy,OC;function vP(){if(OC)return vy;OC=1;var e=yP(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[e.ForwardRef]=r,s[e.Memo]=a;function c(S){return e.isMemo(S)?a:s[S.$$typeof]||t}var f=Object.defineProperty,d=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,g=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,v=Object.prototype;function _(S,E,w){if(typeof E!="string"){if(v){var T=m(E);T&&T!==v&&_(S,T,w)}var O=d(E);h&&(O=O.concat(h(E)));for(var x=c(S),I=c(E),M=0;M`,onlyIfParent:!0,op:wC,attributes:{[Ze]:"auto.ui.react.profiler","ui.component_name":n}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:t,includeUpdates:n=!0}){if(n&&this._mountSpan&&t!==this.props.updateProps){const r=Object.keys(t).filter(a=>t[a]!==this.props.updateProps[a]);if(r.length>0){const a=Bt();this._updateSpan=po(this._mountSpan,()=>vr({name:`<${this.props.name}>`,onlyIfParent:!0,op:mP,startTime:a,attributes:{[Ze]:"auto.ui.react.profiler","ui.component_name":this.props.name,"ui.react.changed_props":r}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const t=Bt(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const a=Me(this._mountSpan).timestamp;po(this._mountSpan,()=>{const s=vr({onlyIfParent:!0,name:`<${n}>`,op:TC,startTime:a,attributes:{[Ze]:"auto.ui.react.profiler","ui.component_name":n}});s&&s.end(t)})}}render(){return this.props.children}}Object.assign(_y,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function bP(e,t){const n=(t==null?void 0:t.name)||e.displayName||e.name||_P,r=a=>je.createElement(_y,ee(A({},t),{name:n,updateProps:a}),je.createElement(e,A({},a)));return r.displayName=`profiler(${n})`,Md(r,e),r}function SP(e,t={disabled:!1,hasRenderSpan:!0}){const[n]=je.useState(()=>{if(!(t!=null&&t.disabled))return vr({name:`<${e}>`,onlyIfParent:!0,op:wC,attributes:{[Ze]:"auto.ui.react.profiler","ui.component_name":e}})});je.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){const r=Me(n).timestamp,a=Bt(),s=vr({name:`<${e}>`,onlyIfParent:!0,op:TC,startTime:r,attributes:{[Ze]:"auto.ui.react.profiler","ui.component_name":e}});s&&s.end(a)}}),[])}const Bs=typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__,EP="unknown",by={componentStack:null,error:null,eventId:null};class xC extends je.Component{constructor(t){super(t),this.state=by,this._openFallbackReportDialog=!0;const n=ye();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&Ag(ee(A({},t.dialogOptions),{eventId:this._lastEventId}))}))}componentDidCatch(t,n){const{componentStack:r}=n,{beforeCapture:a,onError:s,showDialog:c,dialogOptions:f}=this.props;Wn(d=>{a&&a(d,t,r);const h=this.props.handled!=null?this.props.handled:!!this.props.fallback,g=gy(t,n,{mechanism:{handled:h,type:"auto.function.react.error_boundary"}});s&&s(t,r,g),c&&(this._lastEventId=g,this._openFallbackReportDialog&&Ag(ee(A({},f),{eventId:g}))),this.setState({error:t,componentStack:r,eventId:g})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:a}=this.props;a&&(this.state===by?a(null,null,null):a(t,n,r)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:t}=this.props,{error:n,componentStack:r,eventId:a}=this.state;t&&t(n,r,a),this.setState(by)}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.componentStack===null)return typeof n=="function"?n():n;const a=typeof t=="function"?je.createElement(t,{error:r.error,componentStack:r.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:r.eventId}):t;return je.isValidElement(a)?a:(t&&Bs&&Y.warn("fallback did not produce a valid ReactElement"),null)}}function TP(e,t){const n=e.displayName||e.name||EP,r=je.memo(a=>je.createElement(xC,A({},t),je.createElement(e,A({},a))));return r.displayName=`errorBoundary(${n})`,Md(r,e),r}const wP="redux.action",CP="info",AP={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function OP(e){const t=A(A({},AP),e);return n=>(r,a)=>{t.attachReduxState&&is().addEventProcessor((f,d)=>{try{f.type===void 0&&f.contexts.state.state.type==="redux"&&(d.attachments=[...d.attachments||[],{filename:"redux_state.json",data:JSON.stringify(f.contexts.state.state.value)}])}catch(h){}return f});function s(f){return(d,h)=>{const g=f(d,h),m=Ue(),v=t.actionTransformer(h);typeof v!="undefined"&&v!==null&&qr({category:wP,data:v,type:CP});const _=t.stateTransformer(g);if(typeof _!="undefined"&&_!==null){const E=ye(),w=E==null?void 0:E.getOptions(),T=(w==null?void 0:w.normalizeDepth)||3,O={state:{type:"redux",value:_}};An(O,"__sentry_override_normalization_depth__",3+T),m.setContext("state",O)}else m.setContext("state",null);const{configureScopeWithState:S}=t;return typeof S=="function"&&S(m,g),g}}const c=n(s(r),a);return c.replaceReducer=new Proxy(c.replaceReducer,{apply:function(f,d,h){f.apply(d,[s(h[0])])}}),c}}function RP(e){const t=Ns(ee(A({},e),{instrumentPageLoad:!1,instrumentNavigation:!1})),{history:n,routes:r,match:a,instrumentPageLoad:s=!0,instrumentNavigation:c=!0}=e;return ee(A({},t),{afterAllSetup(f){t.afterAllSetup(f),s&&Ee.location&&IC(r,Ee.location,a,(d,h="url")=>{Ls(f,{name:d,attributes:{[rn]:"pageload",[Ze]:"auto.pageload.react.reactrouter_v3",[jt]:h}})}),c&&n.listen&&n.listen(d=>{(d.action==="PUSH"||d.action==="POP")&&IC(r,d,a,(h,g="url")=>{zs(f,{name:h,attributes:{[rn]:"navigation",[Ze]:"auto.navigation.react.reactrouter_v3",[jt]:g}})})})}})}function IC(e,t,n,r){let a=t.pathname;n({location:t,routes:e},(s,c,f)=>{if(s||!f)return r(a);const d=MP(f.routes||[]);return d.length===0||d==="/*"?r(a):(a=d,r(a,"route"))})}function MP(e){var r;if(!Array.isArray(e)||e.length===0)return"";const t=e.filter(a=>!!a.path);let n=-1;for(let a=t.length-1;a>=0;a--)if((r=t[a].path)!=null&&r.startsWith("/")){n=a;break}return t.slice(n).reduce((a,{path:s})=>{const c=a==="/"||a===""?s:`/${s}`;return`${a}${c}`},"")}function xP(e,t={}){const n=e,r=Ns(ee(A({},t),{instrumentNavigation:!1,instrumentPageLoad:!1})),{instrumentPageLoad:a=!0,instrumentNavigation:s=!0}=t;return ee(A({},r),{afterAllSetup(c){r.afterAllSetup(c);const f=Ee.location;if(a&&f){const d=n.matchRoutes(f.pathname,n.options.parseSearch(f.search),{preload:!1,throwOnError:!1}),h=d[d.length-1];Ls(c,{name:h?h.routeId:f.pathname,attributes:A({[rn]:"pageload",[Ze]:"auto.pageload.react.tanstack_router",[jt]:h?"route":"url"},kC(h))})}s&&n.subscribe("onBeforeNavigate",d=>{var S;if(d.toLocation.state===((S=d.fromLocation)==null?void 0:S.state))return;const h=n.matchRoutes(d.toLocation.pathname,d.toLocation.search,{preload:!1,throwOnError:!1}),g=h[h.length-1],m=Ee.location,v=zs(c,{name:g?g.routeId:m.pathname,attributes:{[rn]:"navigation",[Ze]:"auto.navigation.react.tanstack_router",[jt]:g?"route":"url"}}),_=n.subscribe("onResolved",E=>{if(_(),v){const w=n.matchRoutes(E.toLocation.pathname,E.toLocation.search,{preload:!1,throwOnError:!1}),T=w[w.length-1];T&&(v.updateName(T.routeId),v.setAttribute(jt,"route"),v.setAttributes(kC(T)))}})})}})}function kC(e){if(!e)return{};const t={};return Object.entries(e.params).forEach(([n,r])=>{t[`url.path.params.${n}`]=r,t[`url.path.parameter.${n}`]=r,t[`params.${n}`]=r}),t}function IP(e){const t=Ns(ee(A({},e),{instrumentPageLoad:!1,instrumentNavigation:!1})),{history:n,routes:r,matchPath:a,instrumentPageLoad:s=!0,instrumentNavigation:c=!0}=e;return ee(A({},t),{afterAllSetup(f){t.afterAllSetup(f),DC(f,s,c,n,"reactrouter_v4",r,a)}})}function kP(e){const t=Ns(ee(A({},e),{instrumentPageLoad:!1,instrumentNavigation:!1})),{history:n,routes:r,matchPath:a,instrumentPageLoad:s=!0,instrumentNavigation:c=!0}=e;return ee(A({},t),{afterAllSetup(f){t.afterAllSetup(f),DC(f,s,c,n,"reactrouter_v5",r,a)}})}function DC(e,t,n,r,a,s=[],c){function f(){if(r.location)return r.location.pathname;if(Ee.location)return Ee.location.pathname}function d(h){if(s.length===0||!c)return[h,"url"];const g=NC(s,h,c);for(const m of g)if(m.match.isExact)return[m.match.path,"route"];return[h,"url"]}if(t){const h=f();if(h){const[g,m]=d(h);Ls(e,{name:g,attributes:{[rn]:"pageload",[Ze]:`auto.pageload.react.${a}`,[jt]:m}})}}n&&r.listen&&r.listen((h,g)=>{if(g&&(g==="PUSH"||g==="POP")){const[m,v]=d(h.pathname);zs(e,{name:m,attributes:{[rn]:"navigation",[Ze]:`auto.navigation.react.${a}`,[jt]:v}})}})}function NC(e,t,n,r=[]){return e.some(a=>{const s=a.path?n(t,a):r.length?r[r.length-1].match:DP(t);return s&&(r.push({route:a,match:s}),a.routes&&NC(a.routes,t,n,r)),!!s}),r}function DP(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function NP(e){const t=e.displayName||e.name,n=r=>{var a;if((a=r==null?void 0:r.computedMatch)!=null&&a.isExact){const s=r.computedMatch.path,c=LP();Ue().setTransactionName(s),c&&(c.updateName(s),c.setAttribute(jt,"route"))}return je.createElement(e,A({},r))};return n.displayName=`sentryRoute(${t})`,Md(n,e),n}function LP(){const e=Qt(),t=e&&an(e);if(!t)return;const n=Me(t).op;return n==="navigation"||n==="pageload"?t:void 0}function zP(e,t,n,r){const a=new Proxy(e,{apply(s,c,f){const d=s.apply(c,f);return UP(d,t,n,r),d}});return An(a,"__sentry_proxied__",!0),a}function UP(e,t,n,r){ao(e)?e.then(a=>{Array.isArray(a)&&r(a,t)}).catch(a=>{Bs&&Y.warn(`Error resolving async handler '${n}' for route`,t,a)}):Array.isArray(e)&&r(e,t)}function xd(e,t){if(e.handle&&typeof e.handle=="object")for(const n of Object.keys(e.handle)){const r=e.handle[n];typeof r=="function"&&!r.__sentry_proxied__&&(e.handle[n]=zP(r,e,n,t))}if(Array.isArray(e.children))for(const n of e.children)xd(n,t)}let Sy,Hs=!1;function BP(e,t=!1){Sy=e,Hs=t}function HP(e){return PP(e.route.path||"")}function FP(e){return e.params["*"]||""}function PP(e){return e[e.length-1]==="*"?e.slice(0,-1):e}function Fs(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function LC(e){return e.endsWith("*")}function zC(e,t){var n;return LC(e)&&!!((n=t.route.children)!=null&&n.length)||!1}function jP(e){var t;return!!(!e.children&&e.element&&((t=e.path)!=null&&t.endsWith("/*")))}function qP(e,t,n){const r=e||Hs?Id(t,n):t;return[r[r.length-1]==="/"||r.slice(-2)==="/*"?r.slice(0,-1):r,"route"]}function UC(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function Id(e,t){if(!t||t==="/"||!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?e:e.slice(n)||"/"}function xc(e){return e[0]==="/"?e:`/${e}`}function Ey(e,t){const n=Sy(e,t);if(!n||n.length===0)return"";for(const r of n)if(r.route.path&&r.route.path!=="*"){const a=HP(r),s=Id(t.pathname,xc(r.pathnameBase));return t.pathname===s?Fs(s):Fs(Fs(a||"")+xc(Ey(e.filter(c=>c!==r.route),{pathname:s})))}return""}function BC(e,t){const n=Sy(t,e);if(n){for(const r of n)if(jP(r.route)&&FP(r))return!0}return!1}function HC(e,t,n,r=""){if(!e||e.length===0)return[Hs?Id(t.pathname,r):t.pathname,"url"];let a="";if(n)for(const c of n){const f=c.route;if(f){if(f.index)return qP(a,c.pathname,r);const d=f.path;if(d&&!zC(d,c)){const h=d[0]==="/"||a[a.length-1]==="/"?d:`/${d}`;if(a=Fs(a)+xc(h),Fs(t.pathname)===Fs(r+c.pathname))return UC(a)!==UC(c.pathname)&&!LC(a)?[(Hs?"":r)+h,"route"]:(zC(a,c)&&(a=a.slice(0,-1)),[(Hs?"":r)+a,"route"])}}}return[Hs?Id(t.pathname,r):t.pathname||"","url"]}function FC(e,t,n,r,a=""){let s,c="url";const f=BC(e,n);return f&&(s=xc(Ey(n,e)),c="route"),(!f||!s)&&([s,c]=HC(t,e,r,a)),[s||e.pathname,c]}let ma,ga,ya,kd,Qr,Dd=!1;const PC=new WeakSet;function $P(e,t){const n=t.children||[],r=e.filter(a=>!n.some(s=>s===a||a.path&&s.path===a.path||a.id&&s.id===a.id));r.length>0&&(t.children=[...n,...r])}const Ln=new Set;function Ty(e,t,n=null){e.forEach(a=>{Ln.add(a),Dd&&xd(a,Ty)}),t&&$P(e,t);const r=va();if(r){const a=Me(r).op;let s=n;if(!s&&typeof Ee!="undefined"){const c=Ee.location;c&&(s={pathname:c.pathname})}s&&(a==="pageload"?Dc({activeRootSpan:r,location:{pathname:s.pathname},routes:Array.from(Ln),allRoutes:Array.from(Ln)}):a==="navigation"&&wy(r,s,Array.from(Ln),!1,Qr))}}function wy(e,t,n,r=!1,a){if(!(!r&&(e==null?void 0:e.__sentry_navigation_name_set__))){const c=a(n,t),[f,d]=FC(t,n,n,c||[],""),h=Me(e);f&&!h.timestamp&&(e.updateName(f),e.setAttribute(jt,d),An(e,"__sentry_navigation_name_set__",!0))}}function jC(e,t){return!ma||!ga||!ya||!Qr?(Bs&&Y.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`),e):function(n,r){if(kc(n),Dd)for(const d of n)xd(d,Ty);const a=GC(r),s=e(n,a),c=r==null?void 0:r.basename,f=va();return s.state.historyAction==="POP"&&f&&Dc({activeRootSpan:f,location:s.state.location,routes:n,basename:c,allRoutes:Array.from(Ln)}),s.subscribe(d=>{(d.historyAction==="PUSH"||d.historyAction==="POP")&&(d.navigation.state!=="idle"?requestAnimationFrame(()=>{Ic({location:d.location,routes:n,navigationType:d.historyAction,version:t,basename:c,allRoutes:Array.from(Ln)})}):Ic({location:d.location,routes:n,navigationType:d.historyAction,version:t,basename:c,allRoutes:Array.from(Ln)}))}),s}}function qC(e,t){return!ma||!ga||!ya||!Qr?(Bs&&Y.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createMemoryRouter\` function because of one or more missing parameters.`),e):function(n,r){if(kc(n),Dd)for(const S of n)xd(S,Ty);const a=GC(r,!0),s=e(n,a),c=r==null?void 0:r.basename,f=va();let d;const h=r==null?void 0:r.initialEntries,g=r==null?void 0:r.initialIndex,m=h&&h.length===1,v=g!==void 0&&h&&h[g];d=m?h[0]:v?h[g]:void 0;const _=d?typeof d=="string"?{pathname:d}:d:s.state.location;return s.state.historyAction==="POP"&&f&&Dc({activeRootSpan:f,location:_,routes:n,basename:c,allRoutes:Array.from(Ln)}),s.subscribe(S=>{const E=S.location;(S.historyAction==="PUSH"||S.historyAction==="POP")&&Ic({location:E,routes:n,navigationType:S.historyAction,version:t,basename:c,allRoutes:Array.from(Ln)})}),s}}function $C(e,t){const n=Ns(ee(A({},e),{instrumentPageLoad:!1,instrumentNavigation:!1})),{useEffect:r,useLocation:a,useNavigationType:s,createRoutesFromChildren:c,matchRoutes:f,stripBasename:d,enableAsyncRouteHandlers:h=!1,instrumentPageLoad:g=!0,instrumentNavigation:m=!0}=e;return ee(A({},n),{setup(v){n.setup(v),ma=r,ga=a,ya=s,Qr=f,kd=c,Dd=h,BP(f,d||!1)},afterAllSetup(v){var S;n.afterAllSetup(v);const _=(S=Ee.location)==null?void 0:S.pathname;g&&_&&Ls(v,{name:_,attributes:{[jt]:"url",[rn]:"pageload",[Ze]:`auto.pageload.react.reactrouter_v${t}`}}),m&&PC.add(v)}})}function VC(e,t){if(!ma||!ga||!ya||!Qr)return Bs&&Y.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),e;const n=r=>{const a=je.useRef(!0),{routes:s,locationArg:c}=r,f=e(s,c),d=ga(),h=ya(),g=typeof c=="string"||c!=null&&c.pathname?c:d;return ma(()=>{const m=typeof g=="string"?{pathname:g}:g;a.current?(kc(s),Dc({activeRootSpan:va(),location:m,routes:s,allRoutes:Array.from(Ln)}),a.current=!1):Ic({location:m,routes:s,navigationType:h,version:t,allRoutes:Array.from(Ln)})},[h,g]),f};return(r,a)=>je.createElement(n,{routes:r,locationArg:a})}function GC(e,t=!1){if(!e||!("patchRoutesOnNavigation"in e)||typeof e.patchRoutesOnNavigation!="function")return e||{};const n=e.patchRoutesOnNavigation;return ee(A({},e),{patchRoutesOnNavigation:r=>_e(null,null,function*(){var f;const a=r==null?void 0:r.path;if(!t){const d=r==null?void 0:r.patch;d&&(r.patch=(h,g)=>{kc(g);const m=va();return m&&Me(m).op==="navigation"&&wy(m,{pathname:a,search:"",hash:"",state:null,key:"default"},Array.from(Ln),!0,Qr),d(h,g)})}const s=yield n(r),c=va();if(c&&Me(c).op==="navigation"){const d=t?a:a||((f=Ee.location)==null?void 0:f.pathname);d&&wy(c,{pathname:d,search:"",hash:"",state:null,key:"default"},Array.from(Ln),!1,Qr)}return s})})}function Ic(e){const{location:t,routes:n,navigationType:r,version:a,matches:s,basename:c,allRoutes:f}=e,d=Array.isArray(s)?s:Qr(n,t,c),h=ye();if(!h||!PC.has(h))return;const g=va();if(!(g&&Me(g).op==="pageload"&&r==="POP")&&(r==="PUSH"||r==="POP")&&d){const[m,v]=FC(t,n,f||n,d,c),_=Qt(),S=_&&Me(_);(S==null?void 0:S.op)==="navigation"||zs(h,{name:m,attributes:{[jt]:v,[rn]:"navigation",[Ze]:`auto.navigation.react.reactrouter_v${a}`}})}}function kc(e){e.forEach(t=>{QC(t).forEach(r=>{Ln.add(r)})})}function QC(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(n=>{QC(n,t).forEach(a=>{t.add(a)})})),t}function Dc({activeRootSpan:e,location:t,routes:n,matches:r,basename:a,allRoutes:s}){const c=Array.isArray(r)?r:Qr(s||n,t,a);if(c){let f,d="url";const h=BC(t,s||n);h&&(f=xc(Ey(s||n,t)),d="route"),(!h||!f)&&([f,d]=HC(n,t,c,a)),Ue().setTransactionName(f||"/"),e&&(e.updateName(f),e.setAttribute(jt,d))}}function WC(e,t){if(!ma||!ga||!ya||!kd||!Qr)return Bs&&Y.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters. useEffect: ${ma}. useLocation: ${ga}. useNavigationType: ${ya}. createRoutesFromChildren: ${kd}. matchRoutes: ${Qr}.`),e;const n=r=>{const a=je.useRef(!0),s=ga(),c=ya();return ma(()=>{const f=kd(r.children);a.current?(kc(f),Dc({activeRootSpan:va(),location:s,routes:f,allRoutes:Array.from(Ln)}),a.current=!1):Ic({location:s,routes:f,navigationType:c,version:t,allRoutes:Array.from(Ln)})},[s,c]),je.createElement(e,A({},r))};return Md(n,e),n}function va(){const e=Qt(),t=e?an(e):void 0;if(!t)return;const n=Me(t).op;return n==="navigation"||n==="pageload"?t:void 0}function VP(e){return $C(e,"6")}function GP(e){return VC(e,"6")}function QP(e){return jC(e,"6")}function WP(e){return qC(e,"6")}function YP(e){return WC(e,"6")}function XP(e){return $C(e,"7")}function KP(e){return WC(e,"7")}function JP(e){return jC(e,"7")}function ZP(e){return qC(e,"7")}function ej(e){return VC(e,"7")}const tj=Object.freeze(Object.defineProperty({__proto__:null,BrowserClient:D1,ErrorBoundary:xC,OpenFeatureIntegrationHook:nP,Profiler:_y,SDK_VERSION:_i,SEMANTIC_ATTRIBUTE_SENTRY_OP:rn,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:Ze,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:uf,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:jt,Scope:Fr,WINDOW:Ee,addBreadcrumb:qr,addEventProcessor:qS,addIntegration:Sm,breadcrumbsIntegration:aT,browserApiErrorsIntegration:oT,browserProfilingIntegration:QF,browserSessionIntegration:uT,browserTracingIntegration:Ns,buildLaunchDarklyFlagUsedHandler:eP,captureConsoleIntegration:bL,captureEvent:ac,captureException:ua,captureFeedback:qE,captureMessage:Tf,captureReactException:gy,captureSession:bm,chromeStackLineParser:eT,close:c3,consoleLoggingIntegration:C4,contextLinesIntegration:Wz,continueTrace:k5,createConsolaReporter:I4,createReduxEnhancer:OP,createTransport:dE,createUserFeedbackEnvelope:Z8,dedupeIntegration:IE,defaultRequestInstrumentationOptions:ly,defaultStackLineParsers:nT,defaultStackParser:rT,diagnoseSdkConnectivity:oP,endSession:_m,eventFiltersIntegration:EE,eventFromException:x1,eventFromMessage:I1,exceptionFromError:qf,extraErrorDataIntegration:OL,featureFlagsIntegration:s4,feedbackAsyncIntegration:l7,feedbackIntegration:R1,feedbackSyncIntegration:R1,flush:u3,forceLoad:Mz,functionToStringIntegration:SE,geckoStackLineParser:tT,getActiveSpan:Qt,getClient:ye,getCurrentScope:Ue,getDefaultIntegrations:pT,getFeedback:b6,getGlobalScope:is,getIsolationScope:cn,getReplay:zH,getRootSpan:an,getSpanDescendants:nc,getSpanStatusFromHttpCode:Y0,getTraceData:xm,globalHandlersIntegration:cT,graphqlClientIntegration:nU,httpClientIntegration:Lz,httpContextIntegration:dT,inboundFiltersIntegration:TE,init:EC,instrumentOutgoingRequests:Zw,instrumentSupabaseClient:FE,isEnabled:jS,isInitialized:l3,lastEventId:PS,launchDarklyIntegration:ZF,lazyLoadIntegration:O1,linkedErrorsIntegration:hT,logger:b4,makeBrowserOfflineTransport:AF,makeFetchTransport:Cg,makeMultiplexedTransport:Q3,metrics:M4,moduleMetadataIntegration:yL,onLoad:xz,openFeatureIntegration:tP,opera10StackLineParser:X8,opera11StackLineParser:J8,parameterize:yE,reactErrorHandler:pP,reactRouterV3BrowserTracingIntegration:RP,reactRouterV4BrowserTracingIntegration:IP,reactRouterV5BrowserTracingIntegration:kP,reactRouterV6BrowserTracingIntegration:VP,reactRouterV7BrowserTracingIntegration:XP,registerSpanErrorInstrumentation:yS,registerWebWorker:cP,replayCanvasIntegration:eF,replayIntegration:zw,reportPageLoaded:vF,reportingObserverIntegration:Dz,rewriteFramesIntegration:LL,sendFeedback:XE,setActiveSpanInBrowser:_F,setContext:ym,setCurrentClient:sE,setExtra:i3,setExtras:r3,setHttpStatus:tc,setMeasurement:CS,setTag:o3,setTags:a3,setUser:s3,showReportDialog:Ag,spanToBaggageHeader:u5,spanToJSON:Me,spanToTraceHeader:fS,spotlightBrowserIntegration:KF,startBrowserTracingNavigationSpan:zs,startBrowserTracingPageLoadSpan:Ls,startInactiveSpan:vr,startNewTrace:kS,startSession:vm,startSpan:yf,startSpanManual:I5,statsigIntegration:aP,supabaseIntegration:WL,suppressTracing:IS,tanstackRouterBrowserTracingIntegration:xP,thirdPartyErrorFilterIntegration:PE,unleashIntegration:rP,updateSpanName:a5,useProfiler:SP,webWorkerIntegration:uP,winjsStackLineParser:W8,withActiveSpan:po,withErrorBoundary:TP,withIsolationScope:NN,withProfiler:bP,withScope:Wn,withSentryReactRouterV6Routing:YP,withSentryReactRouterV7Routing:KP,withSentryRouting:NP,wrapCreateBrowserRouterV6:QP,wrapCreateBrowserRouterV7:JP,wrapCreateMemoryRouterV6:WP,wrapCreateMemoryRouterV7:ZP,wrapUseRoutesV6:GP,wrapUseRoutesV7:ej,zodErrorsIntegration:n4},Symbol.toStringTag,{value:"Module"})),nj="nutshell-peanut",rj="https://306524c3f600710eb262cd9d121a5383@o4509242520240129.ingest.us.sentry.io/4510008189255681",ij=[nj];function aj(){try{if(document.referrer)return document.referrer}catch(e){}try{if(window.parent&&window.parent!==window&&window.parent.location)return window.parent.location.href}catch(e){}try{if(window.top&&window.top!==window&&window.top.location)return window.top.location.href}catch(e){}try{return window.location.href}catch(e){}}EC({dsn:rj,environment:"production",sampleRate:.5,replaysOnErrorSampleRate:.1,integrations:[zw(),PE({filterKeys:ij,behaviour:"drop-error-if-contains-third-party-frames"})],beforeSend(e){const t=aj();if(t){e.request=e.request||{};const n=e.request.url;(!n||n==="about:blank"||n.startsWith("data:"))&&(e.request.url=t),e.tags=Object.assign({},e.tags,{embedding_url:t})}return e}});const oj=Object.freeze(Object.defineProperty({__proto__:null,default:tj},Symbol.toStringTag,{value:"Module"}));var Cy=function(e,t){return Cy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},Cy(e,t)};function Wr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Cy(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var B=function(){return B=Object.assign||function(t){for(var n,r=1,a=arguments.length;r0&&s[s.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!s||h[1]>s[0]&&h[1]=uj){var t=console[e]||console.log;return t.apply(console,arguments)}}}(function(e){e.debug=Nd("debug"),e.log=Nd("log"),e.warn=Nd("warn"),e.error=Nd("error")})(To||(To={}));var Oy="3.14.0";function Xr(e){try{return e()}catch(t){}}const Ld=Xr(function(){return globalThis})||Xr(function(){return window})||Xr(function(){return self})||Xr(function(){return global})||Xr(function(){return Xr.constructor("return this")()});var JC=new Map;function Ry(e){var t=JC.get(e)||1;return JC.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function ZC(e,t){t===void 0&&(t=0);var n=Ry("stringifyForDisplay");return JSON.stringify(e,function(r,a){return a===void 0?n:a},t).split(JSON.stringify(n)).join("")}function zd(e){return function(t){for(var n=[],r=1;r"}}function My(e,t){if(t===void 0&&(t=[]),!!e)return Ld[eA]&&Ld[eA](e,t.map(tA))}function xy(e,t){if(t===void 0&&(t=[]),!!e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:Oy,message:e,args:t.map(tA)})))}function cj(e,t){if(!!!e)throw new Error(t)}const nA={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},lj=new Set(Object.keys(nA));function rA(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&lj.has(t)}var iA;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(iA||(iA={}));var Pt;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(Pt||(Pt={}));function aA(e){return e===9||e===32}function fj(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),a=r.length===1,s=r.length>1&&r.slice(1).every(_=>_.length===0||aA(_.charCodeAt(0))),c=n.endsWith('\\"""'),f=e.endsWith('"')&&!c,d=e.endsWith("\\"),h=f||d,g=!a||e.length>70||h||s||c;let m="";const v=a&&aA(e.charCodeAt(0));return(g&&!v||s)&&(m+=` `),m+=n,(g||h)&&(m+=` `),'"""'+m+'"""'}const dj=10,oA=2;function hj(e){return Ud(e,[])}function Ud(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return pj(e,t);default:return String(e)}}function pj(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(mj(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:Ud(r,n)}else if(Array.isArray(e))return yj(e,n);return gj(e,n)}function mj(e){return typeof e.toJSON=="function"}function gj(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>oA?"["+vj(e)+"]":"{ "+n.map(([a,s])=>a+": "+Ud(s,t)).join(", ")+" }"}function yj(e,t){if(e.length===0)return"[]";if(t.length>oA)return"[Array]";const n=Math.min(dj,e.length),r=e.length-n,a=[];for(let s=0;s1&&a.push(`... ${r} more items`),"["+a.join(", ")+"]"}function vj(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}function _j(e){return`"${e.replace(bj,Sj)}"`}const bj=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Sj(e){return Ej[e.charCodeAt(0)]}const Ej=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],Bd=Object.freeze({});function Kr(e,t,n=nA){const r=new Map;for(const T of Object.values(Pt))r.set(T,Tj(t,T));let a,s=Array.isArray(e),c=[e],f=-1,d=[],h=e,g,m;const v=[],_=[];do{f++;const T=f===c.length,O=T&&d.length!==0;if(T){if(g=_.length===0?void 0:v[v.length-1],h=m,m=_.pop(),O)if(s){h=h.slice();let I=0;for(const[M,L]of d){const D=M-I;L===null?(h.splice(D,1),I++):h[D]=L}}else{h=A({},h);for(const[I,M]of d)h[I]=M}f=a.index,c=a.keys,d=a.edits,s=a.inArray,a=a.prev}else if(m){if(g=s?f:c[f],h=m[g],h==null)continue;v.push(g)}let x;if(!Array.isArray(h)){var S,E;rA(h)||cj(!1,`Invalid AST Node: ${hj(h)}.`);const I=T?(S=r.get(h.kind))===null||S===void 0?void 0:S.leave:(E=r.get(h.kind))===null||E===void 0?void 0:E.enter;if(x=I==null?void 0:I.call(t,h,g,m,v,_),x===Bd)break;if(x===!1){if(!T){v.pop();continue}}else if(x!==void 0&&(d.push([g,x]),!T))if(rA(x))h=x;else{v.pop();continue}}if(x===void 0&&O&&d.push([g,h]),T)v.pop();else{var w;a={inArray:s,index:f,keys:c,edits:d,prev:a},s=Array.isArray(h),c=s?h:(w=n[h.kind])!==null&&w!==void 0?w:[],f=-1,d=[],m&&_.push(m),m=h}}while(a!==void 0);return d.length!==0?d[d.length-1][1]:e}function Tj(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function wj(e){return Kr(e,Aj)}const Cj=80,Aj={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>be(e.definitions,` `)},OperationDefinition:{leave(e){const t=et("(",be(e.variableDefinitions,", "),")"),n=be([e.operation,be([e.name,t]),be(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+et(" = ",n)+et(" ",be(r," "))},SelectionSet:{leave:({selections:e})=>Jr(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:a}){const s=et("",e,": ")+t;let c=s+et("(",be(n,", "),")");return c.length>Cj&&(c=s+et(`( `,Hd(be(n,` `)),` )`)),be([c,be(r," "),a]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+et(" ",be(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>be(["...",et("on ",e),be(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:a})=>`fragment ${e}${et("(",be(n,", "),")")} on ${t} ${et("",be(r," ")," ")}`+a},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?fj(e):_j(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+be(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+be(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+et("(",be(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>et("",e,` `)+be(["schema",be(t," "),Jr(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>et("",e,` `)+be(["scalar",t,be(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:a})=>et("",e,` `)+be(["type",t,et("implements ",be(n," & ")),be(r," "),Jr(a)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:a})=>et("",e,` `)+t+(sA(n)?et(`( `,Hd(be(n,` `)),` )`):et("(",be(n,", "),")"))+": "+r+et(" ",be(a," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:a})=>et("",e,` `)+be([t+": "+n,et("= ",r),be(a," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:a})=>et("",e,` `)+be(["interface",t,et("implements ",be(n," & ")),be(r," "),Jr(a)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>et("",e,` `)+be(["union",t,be(n," "),et("= ",be(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>et("",e,` `)+be(["enum",t,be(n," "),Jr(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>et("",e,` `)+be([t,be(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>et("",e,` `)+be(["input",t,be(n," "),Jr(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:a})=>et("",e,` `)+"directive @"+t+(sA(n)?et(`( `,Hd(be(n,` `)),` )`):et("(",be(n,", "),")"))+(r?" repeatable":"")+" on "+be(a," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>be(["extend schema",be(e," "),Jr(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>be(["extend scalar",e,be(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>be(["extend type",e,et("implements ",be(t," & ")),be(n," "),Jr(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>be(["extend interface",e,et("implements ",be(t," & ")),be(n," "),Jr(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>be(["extend union",e,be(t," "),et("= ",be(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>be(["extend enum",e,be(t," "),Jr(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>be(["extend input",e,be(t," "),Jr(n)]," ")}};function be(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function Jr(e){return et(`{ `,Hd(be(e,` `)),` }`)}function et(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Hd(e){return et(" ",e.replace(/\n/g,` `))}function sA(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` `)))!==null&&t!==void 0?t:!1}function uA(e){return e.kind===Pt.FIELD||e.kind===Pt.FRAGMENT_SPREAD||e.kind===Pt.INLINE_FRAGMENT}function Nc(e,t){var n=e.directives;return!n||!n.length?!0:Mj(n).every(function(r){var a=r.directive,s=r.ifArgument,c=!1;return s.value.kind==="Variable"?(c=t&&t[s.value.name.value],de(c!==void 0,106,a.name.value)):c=s.value.value,a.name.value==="skip"?!c:c})}function Lc(e,t,n){var r=new Set(e),a=r.size;return Kr(t,{Directive:function(s){if(r.delete(s.name.value)&&(!n||!r.size))return Bd}}),n?!r.size:r.sizeObject.create(null),{forEach:kj,slice:cA}=Array.prototype,{hasOwnProperty:Dj}=Object.prototype;class Li{constructor(t=!0,n=Ij){this.weakness=t,this.makeData=n}lookup(){return this.lookupArray(arguments)}lookupArray(t){let n=this;return kj.call(t,r=>n=n.getChildTrie(r)),Dj.call(n,"data")?n.data:n.data=this.makeData(cA.call(t))}peek(){return this.peekArray(arguments)}peekArray(t){let n=this;for(let r=0,a=t.length;n&&r=0})||!1,zj=(fA||lA)&&!Lj;function Zt(e){return e!==null&&typeof e=="object"}function Uj(e,t){var n=t,r=[];e.definitions.forEach(function(s){if(s.kind==="OperationDefinition")throw Vn(113,s.operation,s.name?" named '".concat(s.name.value,"'"):"");s.kind==="FragmentDefinition"&&r.push(s)}),typeof n=="undefined"&&(de(r.length===1,114,r.length),n=r[0].name.value);var a=B(B({},e),{definitions:On([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)});return a}function Ps(e){e===void 0&&(e=[]);var t={};return e.forEach(function(n){t[n.name.value]=n}),t}function Pd(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{var n=e.name.value;if(typeof t=="function")return t(n);var r=t&&t[n];return de(r,115,n),r||null}default:return null}}function Bj(e){var t=!0;return Kr(e,{FragmentSpread:function(n){if(t=!!n.directives&&n.directives.some(function(r){return r.name.value==="unmask"}),!t)return Bd}}),t}function Hj(){}class Dy{constructor(t=1/0,n=Hj){this.max=t,this.dispose=n,this.map=new Map,this.newest=null,this.oldest=null}has(t){return this.map.has(t)}get(t){const n=this.getNode(t);return n&&n.value}get size(){return this.map.size}getNode(t){const n=this.map.get(t);if(n&&n!==this.newest){const{older:r,newer:a}=n;a&&(a.older=r),r&&(r.newer=a),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=a)}return n}set(t,n){let r=this.getNode(t);return r?r.value=n:(r={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(t,r),r.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(t){const n=this.map.get(t);return n?(n===this.newest&&(this.newest=n.older),n===this.oldest&&(this.oldest=n.newer),n.newer&&(n.newer.older=n.older),n.older&&(n.older.newer=n.newer),this.map.delete(t),this.dispose(n.value,t),!0):!1}}function Ny(){}const Fj=Ny,Pj=typeof WeakRef!="undefined"?WeakRef:function(e){return{deref:()=>e}},jj=typeof WeakMap!="undefined"?WeakMap:Map,qj=typeof FinalizationRegistry!="undefined"?FinalizationRegistry:function(){return{register:Ny,unregister:Ny}},$j=10024;class jd{constructor(t=1/0,n=Fj){this.max=t,this.dispose=n,this.map=new jj,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const r=this.unfinalizedNodes.values();for(let a=0;a<$j;a++){const s=r.next().value;if(!s)break;this.unfinalizedNodes.delete(s);const c=s.key;delete s.key,s.keyRef=new Pj(c),this.registry.register(c,s,s)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new qj(this.deleteNode.bind(this))}has(t){return this.map.has(t)}get(t){const n=this.getNode(t);return n&&n.value}getNode(t){const n=this.map.get(t);if(n&&n!==this.newest){const{older:r,newer:a}=n;a&&(a.older=r),r&&(r.newer=a),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=a)}return n}set(t,n){let r=this.getNode(t);return r?r.value=n:(r={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.scheduleFinalization(r),this.map.set(t,r),this.size++,r.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(t){t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.size--;const n=t.key||t.keyRef&&t.keyRef.deref();this.dispose(t.value,n),t.keyRef?this.registry.unregister(t):this.unfinalizedNodes.delete(t),n&&this.map.delete(n)}delete(t){const n=this.map.get(t);return n?(this.deleteNode(n),!0):!1}scheduleFinalization(t){this.unfinalizedNodes.add(t),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var Ly=new WeakSet;function dA(e){e.size<=(e.max||-1)||Ly.has(e)||(Ly.add(e),setTimeout(function(){e.clean(),Ly.delete(e)},100))}var zy=function(e,t){var n=new jd(e,t);return n.set=function(r,a){var s=jd.prototype.set.call(this,r,a);return dA(this),s},n},Vj=function(e,t){var n=new Dy(e,t);return n.set=function(r,a){var s=Dy.prototype.set.call(this,r,a);return dA(this),s},n},Gj=Symbol.for("apollo.cacheSize"),ui=B({},Ld[Gj]),Co={};function Uy(e,t){Co[e]=t}var Qj=globalThis.__DEV__!==!1?Kj:void 0,Wj=globalThis.__DEV__!==!1?Jj:void 0,Yj=globalThis.__DEV__!==!1?hA:void 0;function Xj(){var e={parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4};return Object.fromEntries(Object.entries(e).map(function(t){var n=t[0],r=t[1];return[n,ui[n]||r]}))}function Kj(){var e,t,n,r,a;if(globalThis.__DEV__===!1)throw new Error("only supported in development mode");return{limits:Xj(),sizes:B({print:(e=Co.print)===null||e===void 0?void 0:e.call(Co),parser:(t=Co.parser)===null||t===void 0?void 0:t.call(Co),canonicalStringify:(n=Co.canonicalStringify)===null||n===void 0?void 0:n.call(Co),links:Hy(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:mA(this.queryManager.documentTransform)}},(a=(r=this.cache).getMemoryInternals)===null||a===void 0?void 0:a.call(r))}}function hA(){return{cache:{fragmentQueryDocuments:Sa(this.getFragmentDoc)}}}function Jj(){var e=this.config.fragments;return B(B({},hA.apply(this)),{addTypenameDocumentTransform:mA(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:Sa(this.storeReader.executeSelectionSet),executeSubSelectedArray:Sa(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:Sa(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:Sa(e==null?void 0:e.findFragmentSpreads),lookup:Sa(e==null?void 0:e.lookup),transform:Sa(e==null?void 0:e.transform)}})}function Zj(e){return!!e&&"dirtyKey"in e}function Sa(e){return Zj(e)?e.size:void 0}function pA(e){return e!=null}function mA(e){return By(e).map(function(t){return{cache:t}})}function By(e){return e?On(On([Sa(e==null?void 0:e.performWork)],By(e==null?void 0:e.left),!0),By(e==null?void 0:e.right),!0).filter(pA):[]}function Hy(e){var t;return e?On(On([(t=e==null?void 0:e.getMemoryInternals)===null||t===void 0?void 0:t.call(e)],Hy(e==null?void 0:e.left),!0),Hy(e==null?void 0:e.right),!0).filter(pA):[]}var Ea=Object.assign(function(t){return JSON.stringify(t,eq)},{reset:function(){js=new Vj(ui.canonicalStringify||1e3)}});globalThis.__DEV__!==!1&&Uy("canonicalStringify",function(){return js.size});var js;Ea.reset();function eq(e,t){if(t&&typeof t=="object"){var n=Object.getPrototypeOf(t);if(n===Object.prototype||n===null){var r=Object.keys(t);if(r.every(tq))return t;var a=JSON.stringify(r),s=js.get(a);if(!s){r.sort();var c=JSON.stringify(r);s=js.get(c)||r,js.set(a,s),js.set(c,s)}var f=Object.create(n);return s.forEach(function(d){f[d]=t[d]}),f}}return t}function tq(e,t,n){return t===0||n[t-1]<=e}function qs(e){return{__ref:String(e)}}function _t(e){return!!(e&&typeof e=="object"&&typeof e.__ref=="string")}function nq(e){return Zt(e)&&e.kind==="Document"&&Array.isArray(e.definitions)}function rq(e){return e.kind==="StringValue"}function iq(e){return e.kind==="BooleanValue"}function aq(e){return e.kind==="IntValue"}function oq(e){return e.kind==="FloatValue"}function sq(e){return e.kind==="Variable"}function uq(e){return e.kind==="ObjectValue"}function cq(e){return e.kind==="ListValue"}function lq(e){return e.kind==="EnumValue"}function fq(e){return e.kind==="NullValue"}function $s(e,t,n,r){if(aq(n)||oq(n))e[t.value]=Number(n.value);else if(iq(n)||rq(n))e[t.value]=n.value;else if(uq(n)){var a={};n.fields.map(function(c){return $s(a,c.name,c.value,r)}),e[t.value]=a}else if(sq(n)){var s=(r||{})[n.name.value];e[t.value]=s}else if(cq(n))e[t.value]=n.values.map(function(c){var f={};return $s(f,t,c,r),f[t.value]});else if(lq(n))e[t.value]=n.value;else if(fq(n))e[t.value]=null;else throw Vn(124,t.value,n.kind)}function dq(e,t){var n=null;e.directives&&(n={},e.directives.forEach(function(a){n[a.name.value]={},a.arguments&&a.arguments.forEach(function(s){var c=s.name,f=s.value;return $s(n[a.name.value],c,f,t)})}));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach(function(a){var s=a.name,c=a.value;return $s(r,s,c,t)})),gA(e.name.value,r,n)}var hq=["connection","include","skip","client","rest","export","nonreactive"],zc=Ea,gA=Object.assign(function(e,t,n){if(t&&n&&n.connection&&n.connection.key)if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var a={};return r.forEach(function(f){a[f]=t[f]}),"".concat(n.connection.key,"(").concat(zc(a),")")}else return n.connection.key;var s=e;if(t){var c=zc(t);s+="(".concat(c,")")}return n&&Object.keys(n).forEach(function(f){hq.indexOf(f)===-1&&(n[f]&&Object.keys(n[f]).length?s+="@".concat(f,"(").concat(zc(n[f]),")"):s+="@".concat(f))}),s},{setStringify:function(e){var t=zc;return zc=e,t}});function qd(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach(function(r){var a=r.name,s=r.value;return $s(n,a,s,t)}),n}return null}function zi(e){return e.alias?e.alias.value:e.name.value}function Fy(e,t,n){for(var r,a=0,s=t.selections;aclass{constructor(){this.id=["slot",mq++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let t=Rn;t;t=t.parent)if(this.id in t.slots){const n=t.slots[this.id];if(n===_A)break;return t!==Rn&&(Rn.slots[this.id]=n),!0}return Rn&&(Rn.slots[this.id]=_A),!1}getValue(){if(this.hasValue())return Rn.slots[this.id]}withValue(t,n,r,a){const s={__proto__:null,[this.id]:t},c=Rn;Rn={parent:c,slots:s};try{return n.apply(a,r)}finally{Rn=c}}static bind(t){const n=Rn;return function(){const r=Rn;try{return Rn=n,t.apply(this,arguments)}finally{Rn=r}}}static noContext(t,n,r){if(Rn){const a=Rn;try{return Rn=null,t.apply(r,n)}finally{Rn=a}}else return t.apply(r,n)}};function bA(e){try{return e()}catch(t){}}const jy="@wry/context:Slot",SA=bA(()=>globalThis)||bA(()=>global)||Object.create(null),Qs=SA[jy]||Array[jy]||(function(e){try{Object.defineProperty(SA,jy,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}})(gq()),{bind:lX,noContext:fX}=Qs,$d=new Qs,{hasOwnProperty:yq}=Object.prototype,qy=Array.from||function(e){const t=[];return e.forEach(n=>t.push(n)),t};function $y(e){const{unsubscribe:t}=e;typeof t=="function"&&(e.unsubscribe=void 0,t())}const Hc=[],vq=100;function Ws(e,t){if(!e)throw new Error(t||"assertion failure")}function EA(e,t){const n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function TA(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function wA(e){return e.slice(0)}class Vd{constructor(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++Vd.count}peek(){if(this.value.length===1&&!wa(this))return CA(this),this.value[0]}recompute(t){return Ws(!this.recomputing,"already recomputing"),CA(this),wa(this)?_q(this,t):TA(this.value)}setDirty(){this.dirty||(this.dirty=!0,AA(this),$y(this))}dispose(){this.setDirty(),IA(this),Vy(this,(t,n)=>{t.setDirty(),kA(t,this)})}forget(){this.dispose()}dependOn(t){t.add(this),this.deps||(this.deps=Hc.pop()||new Set),this.deps.add(t)}forgetDeps(){this.deps&&(qy(this.deps).forEach(t=>t.delete(this)),this.deps.clear(),Hc.push(this.deps),this.deps=null)}}Vd.count=0;function CA(e){const t=$d.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),wa(e)?RA(t,e):MA(t,e),t}function _q(e,t){return IA(e),$d.withValue(e,bq,[e,t]),Eq(e,t)&&Sq(e),TA(e.value)}function bq(e,t){e.recomputing=!0;const{normalizeResult:n}=e;let r;n&&e.value.length===1&&(r=wA(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),n&&r&&!EA(r,e.value))try{e.value[0]=n(e.value[0],r[0])}catch(a){}}catch(a){e.value[1]=a}e.recomputing=!1}function wa(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function Sq(e){e.dirty=!1,!wa(e)&&OA(e)}function AA(e){Vy(e,RA)}function OA(e){Vy(e,MA)}function Vy(e,t){const n=e.parents.size;if(n){const r=qy(e.parents);for(let a=0;a0&&e.childValues.forEach((t,n)=>{kA(e,n)}),e.forgetDeps(),Ws(e.dirtyChildren===null)}function kA(e,t){t.parents.delete(e),e.childValues.delete(t),xA(e,t)}function Eq(e,t){if(typeof e.subscribe=="function")try{$y(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(n){return e.setDirty(),!1}return!0}const Tq={setDirty:!0,dispose:!0,forget:!0};function DA(e){const t=new Map;function n(r){const a=$d.getValue();if(a){let s=t.get(r);s||t.set(r,s=new Set),a.dependOn(s)}}return n.dirty=function(a,s){const c=t.get(a);if(c){const f=s&&yq.call(Tq,s)?s:"setDirty";qy(c).forEach(d=>d[f]()),t.delete(a),$y(c)}},n}let NA;function wq(...e){return(NA||(NA=new Li(typeof WeakMap=="function"))).lookupArray(e)}const Gy=new Set;function Fc(e,{max:t=Math.pow(2,16),keyArgs:n,makeCacheKey:r=wq,normalizeResult:a,subscribe:s,cache:c=Dy}=Object.create(null)){const f=typeof c=="function"?new c(t,v=>v.dispose()):c,d=function(){const v=r.apply(null,n?n.apply(null,arguments):arguments);if(v===void 0)return e.apply(null,arguments);let _=f.get(v);_||(f.set(v,_=new Vd(e)),_.normalizeResult=a,_.subscribe=s,_.forget=()=>f.delete(v));const S=_.recompute(Array.prototype.slice.call(arguments));return f.set(v,_),Gy.add(f),$d.hasValue()||(Gy.forEach(E=>E.clean()),Gy.clear()),S};Object.defineProperty(d,"size",{get:()=>f.size,configurable:!1,enumerable:!1}),Object.freeze(d.options={max:t,keyArgs:n,makeCacheKey:r,normalizeResult:a,subscribe:s,cache:f});function h(v){const _=v&&f.get(v);_&&_.setDirty()}d.dirtyKey=h,d.dirty=function(){h(r.apply(null,arguments))};function g(v){const _=v&&f.get(v);if(_)return _.peek()}d.peekKey=g,d.peek=function(){return g(r.apply(null,arguments))};function m(v){return v?f.delete(v):!1}return d.forgetKey=m,d.forget=function(){return m(r.apply(null,arguments))},d.makeCacheKey=r,d.getKey=n?function(){return r.apply(null,n.apply(null,arguments))}:r,Object.freeze(d)}function Cq(e){return e}var LA=(function(){function e(t,n){n===void 0&&(n=Object.create(null)),this.resultCache=Iy?new WeakSet:new Set,this.transform=t,n.getCacheKey&&(this.getCacheKey=n.getCacheKey),this.cached=n.cache!==!1,this.resetCache()}return e.prototype.getCacheKey=function(t){return[t]},e.identity=function(){return new e(Cq,{cache:!1})},e.split=function(t,n,r){return r===void 0&&(r=e.identity()),Object.assign(new e(function(a){var s=t(a)?n:r;return s.transformDocument(a)},{cache:!1}),{left:n,right:r})},e.prototype.resetCache=function(){var t=this;if(this.cached){var n=new Li(wo);this.performWork=Fc(e.prototype.performWork.bind(this),{makeCacheKey:function(r){var a=t.getCacheKey(r);if(a)return de(Array.isArray(a),105),n.lookupArray(a)},max:ui["documentTransform.cache"],cache:jd})}},e.prototype.performWork=function(t){return Vs(t),this.transform(t)},e.prototype.transformDocument=function(t){if(this.resultCache.has(t))return t;var n=this.performWork(t);return this.resultCache.add(n),n},e.prototype.concat=function(t){var n=this;return Object.assign(new e(function(r){return t.transformDocument(n.transformDocument(r))},{cache:!1}),{left:this,right:t})},e})(),Pc,Oo=Object.assign(function(e){var t=Pc.get(e);return t||(t=wj(e),Pc.set(e,t)),t},{reset:function(){Pc=new zy(ui.print||2e3)}});Oo.reset(),globalThis.__DEV__!==!1&&Uy("print",function(){return Pc?Pc.size:0});var en=Array.isArray;function Er(e){return Array.isArray(e)&&e.length>0}var zA={kind:Pt.FIELD,name:{kind:Pt.NAME,value:"__typename"}};function UA(e,t){return!e||e.selectionSet.selections.every(function(n){return n.kind===Pt.FRAGMENT_SPREAD&&UA(t[n.name.value],t)})}function Aq(e){return UA(Ao(e)||vA(e),Ps(Gs(e)))?null:e}function Oq(e){var t=new Map,n=new Map;return e.forEach(function(r){r&&(r.name?t.set(r.name,r):r.test&&n.set(r.test,r))}),function(r){var a=t.get(r.name.value);return!a&&n.size&&n.forEach(function(s,c){c(r)&&(a=s)}),a}}function BA(e){var t=new Map;return function(r){r===void 0&&(r=e);var a=t.get(r);return a||t.set(r,a={variables:new Set,fragmentSpreads:new Set}),a}}function HA(e,t){Vs(t);for(var n=BA(""),r=BA(""),a=function(T){for(var O=0,x=void 0;O=0;--c)t.definitions[c].kind===Pt.OPERATION_DEFINITION&&++s;var f=Oq(e),d=function(T){return Er(T)&&T.map(f).some(function(O){return O&&O.remove})},h=new Map,g=!1,m={enter:function(T){if(d(T.directives))return g=!0,null}},v=Kr(t,{Field:m,InlineFragment:m,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(T,O,x,I,M){var L=a(M);L&&L.variables.add(T.name.value)}},FragmentSpread:{enter:function(T,O,x,I,M){if(d(T.directives))return g=!0,null;var L=a(M);L&&L.fragmentSpreads.add(T.name.value)}},FragmentDefinition:{enter:function(T,O,x,I){h.set(JSON.stringify(I),T)},leave:function(T,O,x,I){var M=h.get(JSON.stringify(I));if(T===M)return T;if(s>0&&T.selectionSet.selections.every(function(L){return L.kind===Pt.FIELD&&L.name.value==="__typename"}))return r(T.name.value).removed=!0,g=!0,null}},Directive:{leave:function(T){if(f(T))return g=!0,null}}});if(!g)return t;var _=function(T){return T.transitiveVars||(T.transitiveVars=new Set(T.variables),T.removed||T.fragmentSpreads.forEach(function(O){_(r(O)).transitiveVars.forEach(function(x){T.transitiveVars.add(x)})})),T},S=new Set;v.definitions.forEach(function(T){T.kind===Pt.OPERATION_DEFINITION?_(n(T.name&&T.name.value)).fragmentSpreads.forEach(function(O){S.add(O)}):T.kind===Pt.FRAGMENT_DEFINITION&&s===0&&!r(T.name.value).removed&&S.add(T.name.value)}),S.forEach(function(T){_(r(T)).fragmentSpreads.forEach(function(O){S.add(O)})});var E=function(T){return!!(!S.has(T)||r(T).removed)},w={enter:function(T){if(E(T.name.value))return null}};return Aq(Kr(v,{FragmentSpread:w,FragmentDefinition:w,OperationDefinition:{leave:function(T){if(T.variableDefinitions){var O=_(n(T.name&&T.name.value)).transitiveVars;if(O.size1)for(var r=new Ca,a=1;a=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dq(e,t){if(e){if(typeof e=="string")return jA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jA(e,t)}}function jA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1,f=!1,d=arguments[1],h=d;return new s(function(g){return a.subscribe({next:function(m){var v=!f;if(f=!0,!v||c)try{h=r(h,m)}catch(_){return g.error(_)}else h=m},error:function(m){g.error(m)},complete:function(){if(!f&&!c)return g.error(new TypeError("Cannot reduce an empty sequence"));g.next(h),g.complete()}})})},t.concat=function(){for(var r=this,a=arguments.length,s=new Array(a),c=0;c=0&&f.splice(v,1),h()}});f.push(m)},error:function(g){c.error(g)},complete:function(){h()}});function h(){d.closed&&f.length===0&&c.complete()}return function(){f.forEach(function(g){return g.unsubscribe()}),d.unsubscribe()}})},t[Jy]=function(){return this},e.from=function(r){var a=typeof this=="function"?this:e;if(r==null)throw new TypeError(r+" is not an object");var s=Qd(r,Jy);if(s){var c=s.call(r);if(Object(c)!==c)throw new TypeError(c+" is not an object");return Lq(c)&&c.constructor===a?c:new a(function(f){return c.subscribe(f)})}if(Xy("iterator")&&(s=Qd(r,Nq),s))return new a(function(f){Wd(function(){if(!f.closed){for(var d=kq(s.call(r)),h;!(h=d()).done;){var g=h.value;if(f.next(g),f.closed)return}f.complete()}})});if(Array.isArray(r))return new a(function(f){Wd(function(){if(!f.closed){for(var d=0;d=0;--f){var d=c[f],h=!isNaN(+d),g=h?[]:{};g[d]=s,s=g}n=r.merge(n,s)}),n}function Yd(e){var t=rv(e);return Er(t)}function rv(e){var t=Er(e.errors)?e.errors.slice(0):[];return Zs(e)&&Er(e.incremental)&&e.incremental.forEach(function(n){n.errors&&t.push.apply(t,n.errors)}),t}function Ro(){for(var e=[],t=0;t-1;){if(w=void 0,D=[f.slice(0,E),f.slice(E+c.length)],w=D[0],f=D[1],T=w.indexOf(`\r \r `),O=h$(w.slice(0,T)),x=O["content-type"],x&&x.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");if(I=w.slice(T),I){if(M=aO(e,I),Object.keys(M).length>1||"data"in M||"incremental"in M||"errors"in M||"payload"in M)if(Gq(M)){if(L={},"payload"in M){if(Object.keys(M).length===1&&M.payload===null)return[2];L=B({},M.payload)}"errors"in M&&(L=B(B({},L),{extensions:B(B({},"extensions"in L?L.extensions:null),(G={},G[Kd]=M.errors,G))})),t(L)}else t(M);else if(Object.keys(M).length===1&&"hasNext"in M&&!M.hasNext)return[2]}E=f.indexOf(c)}return[3,1];case 3:return[2]}})})}function h$(e){var t={};return e.split(` `).forEach(function(n){var r=n.indexOf(":");if(r>-1){var a=n.slice(0,r).trim().toLowerCase(),s=n.slice(r+1).trim();t[a]=s}}),t}function aO(e,t){if(e.status>=300){var n=function(){try{return JSON.parse(t)}catch(a){return t}};ZA(e,n(),"Response not successful: Received status code ".concat(e.status))}try{return JSON.parse(t)}catch(a){var r=a;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function p$(e,t){e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}function m$(e){return function(t){return t.text().then(function(n){return aO(t,n)}).then(function(n){return!Array.isArray(n)&&!iO.call(n,"data")&&!iO.call(n,"errors")&&ZA(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(r){return r.operationName}):e.operationName,"'.")),n})}}var sv=function(e,t){var n;try{n=JSON.stringify(e)}catch(a){var r=Vn(54,t,a.message);throw r.parseError=a,r}return n},g$={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},y$={accept:"*/*","content-type":"application/json"},v$={method:"POST"},_$={http:g$,headers:y$,options:v$},b$=function(e,t){return t(e)};function S$(e,t){for(var n=[],r=2;r=0&&e.indexOf(t,n)===n}function fO(e,t){let n=uv.get(e);if(n){if(n.has(t))return!0}else uv.set(e,n=new Set);return n.add(t),!1}function dO(e,t,n,r){var a=t.data,s=Yr(t,["data"]),c=n.data,f=Yr(n,["data"]);return pt(s,f)&&Jd(Bc(e).selectionSet,a,c,{fragmentMap:Ps(Gs(e)),variables:r})}function Jd(e,t,n,r){if(t===n)return!0;var a=new Set;return e.selections.every(function(s){if(a.has(s)||(a.add(s),!Nc(s,r.variables))||hO(s))return!0;if(Ta(s)){var c=zi(s),f=t&&t[c],d=n&&n[c],h=s.selectionSet;if(!h)return pt(f,d);var g=Array.isArray(f),m=Array.isArray(d);if(g!==m)return!1;if(g&&m){var v=f.length;if(d.length!==v)return!1;for(var _=0;_=0;--d)f.missing=(c={},c[f.path[d]]=f.missing,c)}else f.missing=f.path;return f.__proto__=t.prototype,f}return t})(Error),bn=Object.prototype.hasOwnProperty;function Qc(e){return e==null}function EO(e,t){var n=e.__typename,r=e.id,a=e._id;if(typeof n=="string"&&(t&&(t.keyObject=Qc(r)?Qc(a)?void 0:{_id:a}:{id:r}),Qc(r)&&!Qc(a)&&(r=a),!Qc(r)))return"".concat(n,":").concat(typeof r=="number"||typeof r=="string"?r:JSON.stringify(r))}var TO={dataIdFromObject:EO,addTypename:!0,resultCaching:!0,canonizeResults:!1};function L$(e){return Ro(TO,e)}function wO(e){var t=e.canonizeResults;return t===void 0?TO.canonizeResults:t}function z$(e,t){return _t(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var CO=/^[_a-z][_0-9a-z]*/i;function Ra(e){var t=e.match(CO);return t?t[0]:e}function fv(e,t,n){return Zt(t)?en(t)?t.every(function(r){return fv(e,r,n)}):e.selections.every(function(r){if(Ta(r)&&Nc(r,n)){var a=zi(r);return bn.call(t,a)&&(!r.selectionSet||fv(r.selectionSet,t[a],n))}return!0}):!1}function eu(e){return Zt(e)&&!_t(e)&&!en(e)}function U$(){return new Ca}function AO(e,t){var n=Ps(Gs(e));return{fragmentMap:n,lookupFragment:function(r){var a=n[r];return!a&&t&&(a=t.lookup(r)),a||null}}}var Zd=Object.create(null),dv=function(){return Zd},OO=Object.create(null),Wc=(function(){function e(t,n){var r=this;this.policies=t,this.group=n,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(a,s){return Ks(_t(a)?r.get(a.__ref,s):a&&a[s])},this.canRead=function(a){return _t(a)?r.has(a.__ref):typeof a=="object"},this.toReference=function(a,s){if(typeof a=="string")return qs(a);if(_t(a))return a;var c=r.policies.identify(a)[0];if(c){var f=qs(c);return s&&r.merge(c,a),f}}}return e.prototype.toObject=function(){return B({},this.data)},e.prototype.has=function(t){return this.lookup(t,!0)!==void 0},e.prototype.get=function(t,n){if(this.group.depend(t,n),bn.call(this.data,t)){var r=this.data[t];if(r&&bn.call(r,n))return r[n]}if(n==="__typename"&&bn.call(this.policies.rootTypenamesById,t))return this.policies.rootTypenamesById[t];if(this instanceof Ma)return this.parent.get(t,n)},e.prototype.lookup=function(t,n){if(n&&this.group.depend(t,"__exists"),bn.call(this.data,t))return this.data[t];if(this instanceof Ma)return this.parent.lookup(t,n);if(this.policies.rootTypenamesById[t])return Object.create(null)},e.prototype.merge=function(t,n){var r=this,a;_t(t)&&(t=t.__ref),_t(n)&&(n=n.__ref);var s=typeof t=="string"?this.lookup(a=t):t,c=typeof n=="string"?this.lookup(a=n):n;if(c){de(typeof a=="string",2);var f=new Ca(H$).merge(s,c);if(this.data[a]=f,f!==s&&(delete this.refs[a],this.group.caching)){var d=Object.create(null);s||(d.__exists=1),Object.keys(c).forEach(function(h){if(!s||s[h]!==f[h]){d[h]=1;var g=Ra(h);g!==h&&!r.policies.hasKeyArgs(f.__typename,g)&&(d[g]=1),f[h]===void 0&&!(r instanceof Ma)&&delete f[h]}}),d.__typename&&!(s&&s.__typename)&&this.policies.rootTypenamesById[a]===f.__typename&&delete d.__typename,Object.keys(d).forEach(function(h){return r.group.dirty(a,h)})}}},e.prototype.modify=function(t,n){var r=this,a=this.lookup(t);if(a){var s=Object.create(null),c=!1,f=!0,d={DELETE:Zd,INVALIDATE:OO,isReference:_t,toReference:this.toReference,canRead:this.canRead,readField:function(h,g){return r.policies.readField(typeof h=="string"?{fieldName:h,from:g||qs(t)}:h,{store:r})}};if(Object.keys(a).forEach(function(h){var g=Ra(h),m=a[h];if(m!==void 0){var v=typeof n=="function"?n:n[h]||n[g];if(v){var _=v===dv?Zd:v(Ks(m),B(B({},d),{fieldName:g,storeFieldName:h,storage:r.getStorage(t,h)}));if(_===OO)r.group.dirty(t,h);else if(_===Zd&&(_=void 0),_!==m&&(s[h]=_,c=!0,m=_,globalThis.__DEV__!==!1)){var S=function(M){if(r.lookup(M.__ref)===void 0)return globalThis.__DEV__!==!1&&de.warn(3,M),!0};if(_t(_))S(_);else if(Array.isArray(_))for(var E=!1,w=void 0,T=0,O=_;T0){var n=--this.rootIds[t];return n||delete this.rootIds[t],n}return 0},e.prototype.getRootIdSet=function(t){return t===void 0&&(t=new Set),Object.keys(this.rootIds).forEach(t.add,t),this instanceof Ma?this.parent.getRootIdSet(t):Object.keys(this.policies.rootTypenamesById).forEach(t.add,t),t},e.prototype.gc=function(){var t=this,n=this.getRootIdSet(),r=this.toObject();n.forEach(function(c){bn.call(r,c)&&(Object.keys(t.findChildRefIds(c)).forEach(n.add,n),delete r[c])});var a=Object.keys(r);if(a.length){for(var s=this;s instanceof Ma;)s=s.parent;a.forEach(function(c){return s.delete(c)})}return a},e.prototype.findChildRefIds=function(t){if(!bn.call(this.refs,t)){var n=this.refs[t]=Object.create(null),r=this.data[t];if(!r)return n;var a=new Set([r]);a.forEach(function(s){_t(s)&&(n[s.__ref]=!0),Zt(s)&&Object.keys(s).forEach(function(c){var f=s[c];Zt(f)&&a.add(f)})})}return this.refs[t]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e})(),RO=(function(){function e(t,n){n===void 0&&(n=null),this.caching=t,this.parent=n,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?DA():null,this.keyMaker=new Li(wo)},e.prototype.depend=function(t,n){if(this.d){this.d(hv(t,n));var r=Ra(n);r!==n&&this.d(hv(t,r)),this.parent&&this.parent.depend(t,n)}},e.prototype.dirty=function(t,n){this.d&&this.d.dirty(hv(t,n),n==="__exists"?"forget":"setDirty")},e})();function hv(e,t){return t+"#"+e}function MO(e,t){Yc(e)&&e.group.depend(t,"__exists")}(function(e){var t=(function(n){Wr(r,n);function r(a){var s=a.policies,c=a.resultCaching,f=c===void 0?!0:c,d=a.seed,h=n.call(this,s,new RO(f))||this;return h.stump=new B$(h),h.storageTrie=new Li(wo),d&&h.replace(d),h}return r.prototype.addLayer=function(a,s){return this.stump.addLayer(a,s)},r.prototype.removeLayer=function(){return this},r.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},r})(e);e.Root=t})(Wc||(Wc={}));var Ma=(function(e){Wr(t,e);function t(n,r,a,s){var c=e.call(this,r.policies,s)||this;return c.id=n,c.parent=r,c.replay=a,c.group=s,a(c),c}return t.prototype.addLayer=function(n,r){return new t(n,this,r,this.group)},t.prototype.removeLayer=function(n){var r=this,a=this.parent.removeLayer(n);return n===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(s){var c=r.data[s],f=a.lookup(s);f?c?c!==f&&Object.keys(c).forEach(function(d){pt(c[d],f[d])||r.group.dirty(s,d)}):(r.group.dirty(s,"__exists"),Object.keys(f).forEach(function(d){r.group.dirty(s,d)})):r.delete(s)}),a):a===this.parent?this:a.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return B(B({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(n){var r=this.parent.findChildRefIds(n);return bn.call(this.data,n)?B(B({},r),e.prototype.findChildRefIds.call(this,n)):r},t.prototype.getStorage=function(){for(var n=this.parent;n.parent;)n=n.parent;return n.getStorage.apply(n,arguments)},t})(Wc),B$=(function(e){Wr(t,e);function t(n){return e.call(this,"EntityStore.Stump",n,function(){},new RO(n.group.caching,n.group))||this}return t.prototype.removeLayer=function(){return this},t.prototype.merge=function(n,r){return this.parent.merge(n,r)},t})(Ma);function H$(e,t,n){var r=e[n],a=t[n];return pt(r,a)?r:a}function Yc(e){return!!(e instanceof Wc&&e.group.caching)}function F$(e){return Zt(e)?en(e)?e.slice(0):B({__proto__:Object.getPrototypeOf(e)},e):e}var xO=(function(){function e(){this.known=new(Iy?WeakSet:Set),this.pool=new Li(wo),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(t){return Zt(t)&&this.known.has(t)},e.prototype.pass=function(t){if(Zt(t)){var n=F$(t);return this.passes.set(n,t),n}return t},e.prototype.admit=function(t){var n=this;if(Zt(t)){var r=this.passes.get(t);if(r)return r;var a=Object.getPrototypeOf(t);switch(a){case Array.prototype:{if(this.known.has(t))return t;var s=t.map(this.admit,this),c=this.pool.lookupArray(s);return c.array||(this.known.add(c.array=s),globalThis.__DEV__!==!1&&Object.freeze(s)),c.array}case null:case Object.prototype:{if(this.known.has(t))return t;var f=Object.getPrototypeOf(t),d=[f],h=this.sortedKeys(t);d.push(h.json);var g=d.length;h.sorted.forEach(function(_){d.push(n.admit(t[_]))});var c=this.pool.lookupArray(d);if(!c.object){var m=c.object=Object.create(f);this.known.add(m),h.sorted.forEach(function(_,S){m[_]=d[g+S]}),globalThis.__DEV__!==!1&&Object.freeze(m)}return c.object}}}return t},e.prototype.sortedKeys=function(t){var n=Object.keys(t),r=this.pool.lookupArray(n);if(!r.keys){n.sort();var a=JSON.stringify(n);(r.keys=this.keysByJSON.get(a))||this.keysByJSON.set(a,r.keys={sorted:n,json:a})}return r.keys},e})();function IO(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var P$=(function(){function e(t){var n=this;this.knownResults=new(wo?WeakMap:Map),this.config=Ro(t,{addTypename:t.addTypename!==!1,canonizeResults:wO(t)}),this.canon=t.canon||new xO,this.executeSelectionSet=Fc(function(r){var a,s=r.context.canonizeResults,c=IO(r);c[3]=!s;var f=(a=n.executeSelectionSet).peek.apply(a,c);return f?s?B(B({},f),{result:n.canon.admit(f.result)}):f:(MO(r.context.store,r.enclosingRef.__ref),n.execSelectionSetImpl(r))},{max:this.config.resultCacheMaxSize||ui["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:IO,makeCacheKey:function(r,a,s,c){if(Yc(s.store))return s.store.makeCacheKey(r,_t(a)?a.__ref:a,s.varString,c)}}),this.executeSubSelectedArray=Fc(function(r){return MO(r.context.store,r.enclosingRef.__ref),n.execSubSelectedArrayImpl(r)},{max:this.config.resultCacheMaxSize||ui["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(r){var a=r.field,s=r.array,c=r.context;if(Yc(c.store))return c.store.makeCacheKey(a,s,c.varString)}})}return e.prototype.resetCanon=function(){this.canon=new xO},e.prototype.diffQueryAgainstStore=function(t){var n=t.store,r=t.query,a=t.rootId,s=a===void 0?"ROOT_QUERY":a,c=t.variables,f=t.returnPartialData,d=f===void 0?!0:f,h=t.canonizeResults,g=h===void 0?this.config.canonizeResults:h,m=this.config.cache.policies;c=B(B({},Py(yA(r))),c);var v=qs(s),_=this.executeSelectionSet({selectionSet:Bc(r).selectionSet,objectOrReference:v,enclosingRef:v,context:B({store:n,query:r,policies:m,variables:c,varString:Ea(c),canonizeResults:g},AO(r,this.config.fragments))}),S;if(_.missing&&(S=[new SO(j$(_.missing),_.missing,r,c)],!d))throw S[0];return{result:_.result,complete:!S,missing:S}},e.prototype.isFresh=function(t,n,r,a){if(Yc(a.store)&&this.knownResults.get(t)===r){var s=this.executeSelectionSet.peek(r,n,a,this.canon.isKnown(t));if(s&&t===s.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(t){var n=this,r=t.selectionSet,a=t.objectOrReference,s=t.enclosingRef,c=t.context;if(_t(a)&&!c.policies.rootTypenamesById[a.__ref]&&!c.store.has(a.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(a.__ref," object")};var f=c.variables,d=c.policies,h=c.store,g=h.getFieldValue(a,"__typename"),m=[],v,_=new Ca;this.config.addTypename&&typeof g=="string"&&!d.rootIdsByTypename[g]&&m.push({__typename:g});function S(x,I){var M;return x.missing&&(v=_.merge(v,(M={},M[I]=x.missing,M))),x.result}var E=new Set(r.selections);E.forEach(function(x){var I,M;if(Nc(x,f))if(Ta(x)){var L=d.readField({fieldName:x.name.value,field:x,variables:c.variables,from:a},c),D=zi(x);L===void 0?Qy.added(x)||(v=_.merge(v,(I={},I[D]="Can't find field '".concat(x.name.value,"' on ").concat(_t(a)?a.__ref+" object":"object "+JSON.stringify(a,null,2)),I))):en(L)?L.length>0&&(L=S(n.executeSubSelectedArray({field:x,array:L,enclosingRef:s,context:c}),D)):x.selectionSet?L!=null&&(L=S(n.executeSelectionSet({selectionSet:x.selectionSet,objectOrReference:L,enclosingRef:_t(L)?L:s,context:c}),D)):c.canonizeResults&&(L=n.canon.pass(L)),L!==void 0&&m.push((M={},M[D]=L,M))}else{var G=Pd(x,c.lookupFragment);if(!G&&x.kind===Pt.FRAGMENT_SPREAD)throw Vn(10,x.name.value);G&&d.fragmentMatches(G,g)&&G.selectionSet.selections.forEach(E.add,E)}});var w=Gd(m),T={result:w,missing:v},O=c.canonizeResults?this.canon.admit(T):Ks(T);return O.result&&this.knownResults.set(O.result,r),O},e.prototype.execSubSelectedArrayImpl=function(t){var n=this,r=t.field,a=t.array,s=t.enclosingRef,c=t.context,f,d=new Ca;function h(g,m){var v;return g.missing&&(f=d.merge(f,(v={},v[m]=g.missing,v))),g.result}return r.selectionSet&&(a=a.filter(c.store.canRead)),a=a.map(function(g,m){return g===null?null:en(g)?h(n.executeSubSelectedArray({field:r,array:g,enclosingRef:s,context:c}),m):r.selectionSet?h(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:g,enclosingRef:_t(g)?g:s,context:c}),m):(globalThis.__DEV__!==!1&&q$(c.store,r,g),g)}),{result:c.canonizeResults?this.canon.admit(a):a,missing:f}},e})();function j$(e){try{JSON.stringify(e,function(t,n){if(typeof n=="string")throw n;return n})}catch(t){return t}}function q$(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach(function(a){Zt(a)&&(de(!_t(a),11,z$(e,a),t.name.value),Object.values(a).forEach(r.add,r))})}}var pv=new Qs,kO=new WeakMap;function Xc(e){var t=kO.get(e);return t||kO.set(e,t={vars:new Set,dep:DA()}),t}function DO(e){Xc(e).vars.forEach(function(t){return t.forgetCache(e)})}function $$(e){Xc(e).vars.forEach(function(t){return t.attachCache(e)})}function V$(e){var t=new Set,n=new Set,r=function(s){if(arguments.length>0){if(e!==s){e=s,t.forEach(function(d){Xc(d).dep.dirty(r),G$(d)});var c=Array.from(n);n.clear(),c.forEach(function(d){return d(e)})}}else{var f=pv.getValue();f&&(a(f),Xc(f).dep(r))}return e};r.onNextChange=function(s){return n.add(s),function(){n.delete(s)}};var a=r.attachCache=function(s){return t.add(s),Xc(s).vars.add(r),r};return r.forgetCache=function(s){return t.delete(s)},r}function G$(e){e.broadcastWatches&&e.broadcastWatches()}var NO=Object.create(null);function mv(e){var t=JSON.stringify(e);return NO[t]||(NO[t]=Object.create(null))}function LO(e){var t=mv(e);return t.keyFieldsFn||(t.keyFieldsFn=function(n,r){var a=function(c,f){return r.readField(f,c)},s=r.keyObject=gv(e,function(c){var f=tu(r.storeObject,c,a);return f===void 0&&n!==r.storeObject&&bn.call(n,c[0])&&(f=tu(n,c,BO)),de(f!==void 0,5,c.join("."),n),f});return"".concat(r.typename,":").concat(JSON.stringify(s))})}function zO(e){var t=mv(e);return t.keyArgsFn||(t.keyArgsFn=function(n,r){var a=r.field,s=r.variables,c=r.fieldName,f=gv(e,function(h){var g=h[0],m=g.charAt(0);if(m==="@"){if(a&&Er(a.directives)){var v=g.slice(1),_=a.directives.find(function(T){return T.name.value===v}),S=_&&qd(_,s);return S&&tu(S,h.slice(1))}return}if(m==="$"){var E=g.slice(1);if(s&&bn.call(s,E)){var w=h.slice(0);return w[0]=E,tu(s,w)}return}if(n)return tu(n,h)}),d=JSON.stringify(f);return(n||d!=="{}")&&(c+=":"+d),c})}function gv(e,t){var n=new Ca;return UO(e).reduce(function(r,a){var s,c=t(a);if(c!==void 0){for(var f=a.length-1;f>=0;--f)c=(s={},s[a[f]]=c,s);r=n.merge(r,c)}return r},Object.create(null))}function UO(e){var t=mv(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach(function(a,s){en(a)?(UO(a).forEach(function(c){return n.push(r.concat(c))}),r.length=0):(r.push(a),en(e[s+1])||(n.push(r.slice(0)),r.length=0))})}return t.paths}function BO(e,t){return e[t]}function tu(e,t,n){return n=n||BO,HO(t.reduce(function r(a,s){return en(a)?a.map(function(c){return r(c,s)}):a&&n(a,s)},e))}function HO(e){return Zt(e)?en(e)?e.map(HO):gv(Object.keys(e).sort(),function(t){return tu(e,t)}):e}function yv(e){return e.args!==void 0?e.args:e.field?qd(e.field,e.variables):null}var Q$=function(){},FO=function(e,t){return t.fieldName},PO=function(e,t,n){var r=n.mergeObjects;return r(e,t)},jO=function(e,t){return t},W$=(function(){function e(t){this.config=t,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=B({dataIdFromObject:EO},t),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),t.possibleTypes&&this.addPossibleTypes(t.possibleTypes),t.typePolicies&&this.addTypePolicies(t.typePolicies)}return e.prototype.identify=function(t,n){var r,a=this,s=n&&(n.typename||((r=n.storeObject)===null||r===void 0?void 0:r.__typename))||t.__typename;if(s===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];var c=n&&n.storeObject||t,f=B(B({},n),{typename:s,storeObject:c,readField:n&&n.readField||function(){var m=vv(arguments,c);return a.readField(m,{store:a.cache.data,variables:m.variables})}}),d,h=s&&this.getTypePolicy(s),g=h&&h.keyFn||this.config.dataIdFromObject;return lv.withValue(!0,function(){for(;g;){var m=g(B(B({},t),c),f);if(en(m))g=LO(m);else{d=m;break}}}),d=d?String(d):void 0,f.keyObject?[d,f.keyObject]:[d]},e.prototype.addTypePolicies=function(t){var n=this;Object.keys(t).forEach(function(r){var a=t[r],s=a.queryType,c=a.mutationType,f=a.subscriptionType,d=Yr(a,["queryType","mutationType","subscriptionType"]);s&&n.setRootTypename("Query",r),c&&n.setRootTypename("Mutation",r),f&&n.setRootTypename("Subscription",r),bn.call(n.toBeAdded,r)?n.toBeAdded[r].push(d):n.toBeAdded[r]=[d]})},e.prototype.updateTypePolicy=function(t,n,r){var a=this.getTypePolicy(t),s=n.keyFields,c=n.fields;function f(d,h){d.merge=typeof h=="function"?h:h===!0?PO:h===!1?jO:d.merge}f(a,n.merge),a.keyFn=s===!1?Q$:en(s)?LO(s):typeof s=="function"?s:a.keyFn,c&&Object.keys(c).forEach(function(d){var h=r[d];(!h||(h==null?void 0:h.typename)!==t)&&(h=r[d]={typename:t});var g=c[d];if(typeof g=="function")h.read=g;else{var m=g.keyArgs,v=g.read,_=g.merge;h.keyFn=m===!1?FO:en(m)?zO(m):typeof m=="function"?m:h.keyFn,typeof v=="function"&&(h.read=v),f(h,_)}h.read&&h.merge&&(h.keyFn=h.keyFn||FO)})},e.prototype.setRootTypename=function(t,n){n===void 0&&(n=t);var r="ROOT_"+t.toUpperCase(),a=this.rootTypenamesById[r];n!==a&&(de(!a||a===t,6,t),a&&delete this.rootIdsByTypename[a],this.rootIdsByTypename[n]=r,this.rootTypenamesById[r]=n)},e.prototype.addPossibleTypes=function(t){var n=this;this.usingPossibleTypes=!0,Object.keys(t).forEach(function(r){n.getSupertypeSet(r,!0),t[r].forEach(function(a){n.getSupertypeSet(a,!0).add(r);var s=a.match(CO);(!s||s[0]!==a)&&n.fuzzySubtypes.set(a,new RegExp(a))})})},e.prototype.getTypePolicy=function(t){var n=this;if(!bn.call(this.typePolicies,t)){var r=this.typePolicies[t]=Object.create(null);r.fields=Object.create(null);var a=this.supertypeMap.get(t);!a&&this.fuzzySubtypes.size&&(a=this.getSupertypeSet(t,!0),this.fuzzySubtypes.forEach(function(c,f){if(c.test(t)){var d=n.supertypeMap.get(f);d&&d.forEach(function(h){return a.add(h)})}})),a&&a.size&&a.forEach(function(c){var f=n.getTypePolicy(c),d=f.fields,h=Yr(f,["fields"]);Object.assign(r,h),Object.assign(r.fields,d)})}var s=this.toBeAdded[t];return s&&s.length&&s.splice(0).forEach(function(c){n.updateTypePolicy(t,c,n.typePolicies[t].fields)}),this.typePolicies[t]},e.prototype.getFieldPolicy=function(t,n){if(t)return this.getTypePolicy(t).fields[n]},e.prototype.getSupertypeSet=function(t,n){var r=this.supertypeMap.get(t);return!r&&n&&this.supertypeMap.set(t,r=new Set),r},e.prototype.fragmentMatches=function(t,n,r,a){var s=this;if(!t.typeCondition)return!0;if(!n)return!1;var c=t.typeCondition.name.value;if(n===c)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(c))for(var f=this.getSupertypeSet(n,!0),d=[f],h=function(S){var E=s.getSupertypeSet(S,!1);E&&E.size&&d.indexOf(E)<0&&d.push(E)},g=!!(r&&this.fuzzySubtypes.size),m=!1,v=0;v1?a:t}:(c=B({},r),bn.call(c,"from")||(c.from=t)),globalThis.__DEV__!==!1&&c.from===void 0&&globalThis.__DEV__!==!1&&de.warn(8,ZC(Array.from(e))),c.variables===void 0&&(c.variables=n),c}function $O(e){return function(n,r){if(en(n)||en(r))throw Vn(9);if(Zt(n)&&Zt(r)){var a=e.getFieldValue(n,"__typename"),s=e.getFieldValue(r,"__typename"),c=a&&s&&a!==s;if(c)return r;if(_t(n)&&eu(r))return e.merge(n.__ref,r),n;if(eu(n)&&_t(r))return e.merge(n,r.__ref),r;if(eu(n)&&eu(r))return B(B({},n),r)}return r}}function _v(e,t,n){var r="".concat(t).concat(n),a=e.flavors.get(r);return a||e.flavors.set(r,a=e.clientOnly===t&&e.deferred===n?e:B(B({},e),{clientOnly:t,deferred:n})),a}var Y$=(function(){function e(t,n,r){this.cache=t,this.reader=n,this.fragments=r}return e.prototype.writeToStore=function(t,n){var r=this,a=n.query,s=n.result,c=n.dataId,f=n.variables,d=n.overwrite,h=Ao(a),g=U$();f=B(B({},Py(h)),f);var m=B(B({store:t,written:Object.create(null),merge:function(_,S){return g.merge(_,S)},variables:f,varString:Ea(f)},AO(a,this.fragments)),{overwrite:!!d,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),v=this.processSelectionSet({result:s||Object.create(null),dataId:c,selectionSet:h.selectionSet,mergeTree:{map:new Map},context:m});if(!_t(v))throw Vn(12,s);return m.incomingById.forEach(function(_,S){var E=_.storeObject,w=_.mergeTree,T=_.fieldNodeSet,O=qs(S);if(w&&w.map.size){var x=r.applyMerges(w,O,E,m);if(_t(x))return;E=x}if(globalThis.__DEV__!==!1&&!m.overwrite){var I=Object.create(null);T.forEach(function(D){D.selectionSet&&(I[D.name.value]=!0)});var M=function(D){return I[Ra(D)]===!0},L=function(D){var G=w&&w.map.get(D);return!!(G&&G.info&&G.info.merge)};Object.keys(E).forEach(function(D){M(D)&&!L(D)&&X$(O,E,D,m.store)})}t.merge(S,E)}),t.retain(v.__ref),v},e.prototype.processSelectionSet=function(t){var n=this,r=t.dataId,a=t.result,s=t.selectionSet,c=t.context,f=t.mergeTree,d=this.cache.policies,h=Object.create(null),g=r&&d.rootTypenamesById[r]||Fy(a,s,c.fragmentMap)||r&&c.store.get(r,"__typename");typeof g=="string"&&(h.__typename=g);var m=function(){var x=vv(arguments,h,c.variables);if(_t(x.from)){var I=c.incomingById.get(x.from.__ref);if(I){var M=d.readField(B(B({},x),{from:I.storeObject}),c);if(M!==void 0)return M}}return d.readField(x,c)},v=new Set;this.flattenFields(s,a,c,g).forEach(function(x,I){var M,L=zi(I),D=a[L];if(v.add(I),D!==void 0){var G=d.getStoreFieldName({typename:g,fieldName:I.name.value,field:I,variables:x.variables}),V=GO(f,G),ae=n.processFieldValue(D,I,I.selectionSet?_v(x,!1,!1):x,V),he=void 0;I.selectionSet&&(_t(ae)||eu(ae))&&(he=m("__typename",ae));var te=d.getMergeFunction(g,I.name.value,he);te?V.info={field:I,typename:g,merge:te}:QO(f,G),h=x.merge(h,(M={},M[G]=ae,M))}else globalThis.__DEV__!==!1&&!x.clientOnly&&!x.deferred&&!Qy.added(I)&&!d.getReadFunction(g,I.name.value)&&globalThis.__DEV__!==!1&&de.error(13,zi(I),a)});try{var _=d.identify(a,{typename:g,selectionSet:s,fragmentMap:c.fragmentMap,storeObject:h,readField:m}),S=_[0],E=_[1];r=r||S,E&&(h=c.merge(h,E))}catch(x){if(!r)throw x}if(typeof r=="string"){var w=qs(r),T=c.written[r]||(c.written[r]=[]);if(T.indexOf(s)>=0||(T.push(s),this.reader&&this.reader.isFresh(a,w,s,c)))return w;var O=c.incomingById.get(r);return O?(O.storeObject=c.merge(O.storeObject,h),O.mergeTree=bv(O.mergeTree,f),v.forEach(function(x){return O.fieldNodeSet.add(x)})):c.incomingById.set(r,{storeObject:h,mergeTree:eh(f)?void 0:f,fieldNodeSet:v}),w}return h},e.prototype.processFieldValue=function(t,n,r,a){var s=this;return!n.selectionSet||t===null?globalThis.__DEV__!==!1?YA(t):t:en(t)?t.map(function(c,f){var d=s.processFieldValue(c,n,r,GO(a,f));return QO(a,f),d}):this.processSelectionSet({result:t,selectionSet:n.selectionSet,context:r,mergeTree:a})},e.prototype.flattenFields=function(t,n,r,a){a===void 0&&(a=Fy(n,t,r.fragmentMap));var s=new Map,c=this.cache.policies,f=new Li(!1);return(function d(h,g){var m=f.lookup(h,g.clientOnly,g.deferred);m.visited||(m.visited=!0,h.selections.forEach(function(v){if(Nc(v,r.variables)){var _=g.clientOnly,S=g.deferred;if(!(_&&S)&&Er(v.directives)&&v.directives.forEach(function(T){var O=T.name.value;if(O==="client"&&(_=!0),O==="defer"){var x=qd(T,r.variables);(!x||x.if!==!1)&&(S=!0)}}),Ta(v)){var E=s.get(v);E&&(_=_&&E.clientOnly,S=S&&E.deferred),s.set(v,_v(r,_,S))}else{var w=Pd(v,r.lookupFragment);if(!w&&v.kind===Pt.FRAGMENT_SPREAD)throw Vn(14,v.name.value);w&&c.fragmentMatches(w,a,n,r.variables)&&d(w.selectionSet,_v(r,_,S))}}}))})(t,r),s},e.prototype.applyMerges=function(t,n,r,a,s){var c,f=this;if(t.map.size&&!_t(r)){var d=!en(r)&&(_t(n)||eu(n))?n:void 0,h=r;d&&!s&&(s=[_t(d)?d.__ref:d]);var g,m=function(v,_){return en(v)?typeof _=="number"?v[_]:void 0:a.store.getFieldValue(v,String(_))};t.map.forEach(function(v,_){var S=m(d,_),E=m(h,_);if(E!==void 0){s&&s.push(_);var w=f.applyMerges(v,S,E,a,s);w!==E&&(g=g||new Map,g.set(_,w)),s&&de(s.pop()===_)}}),g&&(r=en(h)?h.slice(0):B({},h),g.forEach(function(v,_){r[_]=v}))}return t.info?this.cache.policies.runMergeFunction(n,r,t.info,a,s&&(c=a.store).getStorage.apply(c,s)):r},e})(),VO=[];function GO(e,t){var n=e.map;return n.has(t)||n.set(t,VO.pop()||{map:new Map}),n.get(t)}function bv(e,t){if(e===t||!t||eh(t))return e;if(!e||eh(e))return t;var n=e.info&&t.info?B(B({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,a=r?new Map:e.map.size?e.map:t.map,s={info:n,map:a};if(r){var c=new Set(t.map.keys());e.map.forEach(function(f,d){s.map.set(d,bv(f,t.map.get(d))),c.delete(d)}),c.forEach(function(f){s.map.set(f,bv(t.map.get(f),e.map.get(f)))})}return s}function eh(e){return!e||!(e.info||e.map.size)}function QO(e,t){var n=e.map,r=n.get(t);r&&eh(r)&&(VO.push(r),n.delete(t))}var WO=new Set;function X$(e,t,n,r){var a=function(m){var v=r.getFieldValue(m,n);return typeof v=="object"&&v},s=a(e);if(s){var c=a(t);if(c&&!_t(s)&&!pt(s,c)&&!Object.keys(s).every(function(m){return r.getFieldValue(c,m)!==void 0})){var f=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),d=Ra(n),h="".concat(f,".").concat(d);if(!WO.has(h)){WO.add(h);var g=[];!en(s)&&!en(c)&&[s,c].forEach(function(m){var v=r.getFieldValue(m,"__typename");typeof v=="string"&&!g.includes(v)&&g.push(v)}),globalThis.__DEV__!==!1&&de.warn(15,d,f,g.length?"either ensure all objects of type "+g.join(" and ")+" have an ID or a custom merge function, or ":"",h,B({},s),B({},c))}}}}var YO=(function(e){Wr(t,e);function t(n){n===void 0&&(n={});var r=e.call(this)||this;return r.watches=new Set,r.addTypenameTransform=new LA(Qy),r.assumeImmutableResults=!0,r.makeVar=V$,r.txCount=0,globalThis.__DEV__!==!1&&(on(n,"addTypename","InMemoryCache","Please remove the `addTypename` option when initializing `InMemoryCache`."),on(n,"canonizeResults","InMemoryCache","Please remove the `canonizeResults` option when initializing `InMemoryCache`.")),r.config=L$(n),r.addTypename=!!r.config.addTypename,r.policies=new W$({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return t.prototype.init=function(){var n=this.data=new Wc.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=n.stump,this.resetResultCache()},t.prototype.resetResultCache=function(n){var r=this,a=this.storeReader,s=this.config.fragments;this.addTypenameTransform.resetCache(),s==null||s.resetCaches(),this.storeWriter=new Y$(this,this.storeReader=new P$({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:wO(this.config),canon:n?void 0:a&&a.canon,fragments:s}),s),this.maybeBroadcastWatch=Fc(function(c,f){return r.broadcastWatch(c,f)},{max:this.config.resultCacheMaxSize||ui["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(c){var f=c.optimistic?r.optimisticData:r.data;if(Yc(f)){var d=c.optimistic,h=c.id,g=c.variables;return f.makeCacheKey(c.query,c.callback,Ea({optimistic:d,id:h,variables:g}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(c){return c.resetCaching()})},t.prototype.restore=function(n){return this.init(),n&&this.data.replace(n),this},t.prototype.extract=function(n){return n===void 0&&(n=!1),(n?this.optimisticData:this.data).extract()},t.prototype.read=function(n){globalThis.__DEV__!==!1&&on(n,"canonizeResults","cache.read");var r=n.returnPartialData,a=r===void 0?!1:r;try{return this.storeReader.diffQueryAgainstStore(B(B({},n),{store:n.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:a})).result||null}catch(s){if(s instanceof SO)return null;throw s}},t.prototype.write=function(n){try{return++this.txCount,this.storeWriter.writeToStore(this.data,n)}finally{!--this.txCount&&n.broadcast!==!1&&this.broadcastWatches()}},t.prototype.modify=function(n){if(bn.call(n,"id")&&!n.id)return!1;var r=n.optimistic?this.optimisticData:this.data;try{return++this.txCount,r.modify(n.id||"ROOT_QUERY",n.fields)}finally{!--this.txCount&&n.broadcast!==!1&&this.broadcastWatches()}},t.prototype.diff=function(n){return globalThis.__DEV__!==!1&&on(n,"canonizeResults","cache.diff"),this.storeReader.diffQueryAgainstStore(B(B({},n),{store:n.optimistic?this.optimisticData:this.data,rootId:n.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(n){var r=this;return this.watches.size||$$(this),this.watches.add(n),n.immediate&&this.maybeBroadcastWatch(n),function(){r.watches.delete(n)&&!r.watches.size&&DO(r),r.maybeBroadcastWatch.forget(n)}},t.prototype.gc=function(n){globalThis.__DEV__!==!1&&on(n||{},"resetResultIdentities","cache.gc","First ensure all usages of `canonizeResults` are removed, then remove this option."),Ea.reset(),Oo.reset();var r=this.optimisticData.gc();return n&&!this.txCount&&(n.resetResultCache?this.resetResultCache(n.resetResultIdentities):n.resetResultIdentities&&this.storeReader.resetCanon()),r},t.prototype.retain=function(n,r){return(r?this.optimisticData:this.data).retain(n)},t.prototype.release=function(n,r){return(r?this.optimisticData:this.data).release(n)},t.prototype.identify=function(n){if(_t(n))return n.__ref;try{return this.policies.identify(n)[0]}catch(r){globalThis.__DEV__!==!1&&de.warn(r)}},t.prototype.evict=function(n){if(!n.id){if(bn.call(n,"id"))return!1;n=B(B({},n),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(n,this.data)}finally{!--this.txCount&&n.broadcast!==!1&&this.broadcastWatches()}},t.prototype.reset=function(n){var r=this;return this.init(),Ea.reset(),n&&n.discardWatches?(this.watches.forEach(function(a){return r.maybeBroadcastWatch.forget(a)}),this.watches.clear(),DO(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(n){var r=this.optimisticData.removeLayer(n);r!==this.optimisticData&&(this.optimisticData=r,this.broadcastWatches())},t.prototype.batch=function(n){var r=this,a=n.update,s=n.optimistic,c=s===void 0?!0:s,f=n.removeOptimistic,d=n.onWatchUpdated,h,g=function(v){var _=r,S=_.data,E=_.optimisticData;++r.txCount,v&&(r.data=r.optimisticData=v);try{return h=a(r)}finally{--r.txCount,r.data=S,r.optimisticData=E}},m=new Set;return d&&!this.txCount&&this.broadcastWatches(B(B({},n),{onWatchUpdated:function(v){return m.add(v),!1}})),typeof c=="string"?this.optimisticData=this.optimisticData.addLayer(c,g):c===!1?g(this.data):g(),typeof f=="string"&&(this.optimisticData=this.optimisticData.removeLayer(f)),d&&m.size?(this.broadcastWatches(B(B({},n),{onWatchUpdated:function(v,_){var S=d.call(this,v,_);return S!==!1&&m.delete(v),S}})),m.size&&m.forEach(function(v){return r.maybeBroadcastWatch.dirty(v)})):this.broadcastWatches(n),h},t.prototype.performTransaction=function(n,r){return this.batch({update:n,optimistic:r||r!==null})},t.prototype.transformDocument=function(n){return this.addTypenameToDocument(this.addFragmentsToDocument(n))},t.prototype.fragmentMatches=function(n,r){return this.policies.fragmentMatches(n,r)},t.prototype.lookupFragment=function(n){var r;return((r=this.config.fragments)===null||r===void 0?void 0:r.lookup(n))||null},t.prototype.broadcastWatches=function(n){var r=this;this.txCount||this.watches.forEach(function(a){return r.maybeBroadcastWatch(a,n)})},t.prototype.addFragmentsToDocument=function(n){var r=this.config.fragments;return r?r.transform(n):n},t.prototype.addTypenameToDocument=function(n){return this.addTypename?this.addTypenameTransform.transformDocument(n):n},t.prototype.broadcastWatch=function(n,r){var a=this,s=n.lastDiff,c=_n("canonizeResults",function(){return a.diff(n)});r&&(n.optimistic&&typeof r.optimistic=="string"&&(c.fromOptimisticTransaction=!0),r.onWatchUpdated&&r.onWatchUpdated.call(this,n,c,s)===!1)||(!s||!pt(s.result,c.result))&&n.callback(n.lastDiff=c,s)},t})(bO);globalThis.__DEV__!==!1&&(YO.prototype.getMemoryInternals=Wj);var tt;(function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"})(tt||(tt={}));function nu(e){return e?e<7:!1}var XO=Object.assign,K$=Object.hasOwnProperty,Kc=(function(e){Wr(t,e);function t(n){var r=n.queryManager,a=n.queryInfo,s=n.options,c=this,f=t.inactiveOnCreation.getValue();c=e.call(this,function(T){c._getOrCreateQuery();try{var O=T._subscription._observer;O&&!O.error&&(O.error=J$)}catch(M){}var x=!c.observers.size;c.observers.add(T);var I=c.last;return I&&I.error?T.error&&T.error(I.error):I&&I.result&&T.next&&T.next(c.maskResult(I.result)),x&&c.reobserve().catch(function(){}),function(){c.observers.delete(T)&&!c.observers.size&&c.tearDownQuery()}})||this,c.observers=new Set,c.subscriptions=new Set,c.dirty=!1,c._getOrCreateQuery=function(){return f&&(r.queries.set(c.queryId,a),f=!1),c.queryManager.getOrCreateQuery(c.queryId)},c.queryInfo=a,c.queryManager=r,c.waitForOwnResult=Sv(s.fetchPolicy),c.isTornDown=!1,c.subscribeToMore=c.subscribeToMore.bind(c),c.maskResult=c.maskResult.bind(c);var d=r.defaultOptions.watchQuery,h=d===void 0?{}:d,g=h.fetchPolicy,m=g===void 0?"cache-first":g,v=s.fetchPolicy,_=v===void 0?m:v,S=s.initialFetchPolicy,E=S===void 0?_==="standby"?m:_:S;c.options=B(B({},s),{initialFetchPolicy:E,fetchPolicy:_}),c.queryId=a.queryId||r.generateQueryId();var w=Ao(c.query);return c.queryName=w&&w.name&&w.name.value,c}return Object.defineProperty(t.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var n=this;return globalThis.__DEV__!==!1&&Aa("observableQuery.result",function(){globalThis.__DEV__!==!1&&de.warn(23)}),new Promise(function(r,a){var s={next:function(f){r(f),n.observers.delete(s),n.observers.size||n.queryManager.removeQuery(n.queryId),setTimeout(function(){c.unsubscribe()},0)},error:a},c=n.subscribe(s)})},t.prototype.resetDiff=function(){this.queryInfo.resetDiff()},t.prototype.getCurrentFullResult=function(n){var r=this;n===void 0&&(n=!0);var a=_n("getLastResult",function(){return r.getLastResult(!0)}),s=this.queryInfo.networkStatus||a&&a.networkStatus||tt.ready,c=B(B({},a),{loading:nu(s),networkStatus:s}),f=this.options.fetchPolicy,d=f===void 0?"cache-first":f;if(!(Sv(d)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var h=this.queryInfo.getDiff();(h.complete||this.options.returnPartialData)&&(c.data=h.result),pt(c.data,{})&&(c.data=void 0),h.complete?(delete c.partial,h.complete&&c.networkStatus===tt.loading&&(d==="cache-first"||d==="cache-only")&&(c.networkStatus=tt.ready,c.loading=!1)):c.partial=!0,c.networkStatus===tt.ready&&(c.error||c.errors)&&(c.networkStatus=tt.error),globalThis.__DEV__!==!1&&!h.complete&&!this.options.partialRefetch&&!c.loading&&!c.data&&!c.error&&KO(h.missing)}return n&&this.updateLastResult(c),c},t.prototype.getCurrentResult=function(n){return n===void 0&&(n=!0),this.maskResult(this.getCurrentFullResult(n))},t.prototype.isDifferentFromLastResult=function(n,r){if(!this.last)return!0;var a=this.queryManager.getDocumentInfo(this.query),s=this.queryManager.dataMasking,c=s?a.nonReactiveQuery:this.query,f=s||a.hasNonreactiveDirective?!dO(c,this.last.result,n,this.variables):!pt(this.last.result,n);return f||r&&!pt(this.last.variables,r)},t.prototype.getLast=function(n,r){var a=this.last;if(a&&a[n]&&(!r||pt(a.variables,this.variables)))return a[n]},t.prototype.getLastResult=function(n){return globalThis.__DEV__!==!1&&Aa("getLastResult",function(){globalThis.__DEV__!==!1&&de.warn(24)}),this.getLast("result",n)},t.prototype.getLastError=function(n){return globalThis.__DEV__!==!1&&Aa("getLastError",function(){globalThis.__DEV__!==!1&&de.warn(25)}),this.getLast("error",n)},t.prototype.resetLastResults=function(){globalThis.__DEV__!==!1&&Aa("resetLastResults",function(){globalThis.__DEV__!==!1&&de.warn(26)}),delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){globalThis.__DEV__!==!1&&globalThis.__DEV__!==!1&&de.warn(27),this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(n){var r,a={pollInterval:0},s=this.options.fetchPolicy;if(s==="no-cache"?a.fetchPolicy="no-cache":a.fetchPolicy="network-only",globalThis.__DEV__!==!1&&n&&K$.call(n,"variables")){var c=yA(this.query),f=c.variableDefinitions;(!f||!f.some(function(d){return d.variable.name.value==="variables"}))&&globalThis.__DEV__!==!1&&de.warn(28,n,((r=c.name)===null||r===void 0?void 0:r.value)||c)}return n&&!pt(this.options.variables,n)&&(a.variables=this.options.variables=B(B({},this.options.variables),n)),this.queryInfo.resetLastWrite(),this.reobserve(a,tt.refetch)},t.prototype.fetchMore=function(n){var r=this,a=B(B({},n.query?n:B(B(B(B({},this.options),{query:this.options.query}),n),{variables:B(B({},this.options.variables),n.variables)})),{fetchPolicy:"no-cache"});a.query=this.transformDocument(a.query);var s=this.queryManager.generateQueryId();this.lastQuery=n.query?this.transformDocument(this.options.query):a.query;var c=this.queryInfo,f=c.networkStatus;c.networkStatus=tt.fetchMore,a.notifyOnNetworkStatusChange&&this.observe();var d=new Set,h=n==null?void 0:n.updateQuery,g=this.options.fetchPolicy!=="no-cache";return g||de(h,29),this.queryManager.fetchQuery(s,a,tt.fetchMore).then(function(m){if(r.queryManager.removeQuery(s),c.networkStatus===tt.fetchMore&&(c.networkStatus=f),g)r.queryManager.cache.batch({update:function(S){var E=n.updateQuery;E?S.updateQuery({query:r.query,variables:r.variables,returnPartialData:!0,optimistic:!1},function(w){return E(w,{fetchMoreResult:m.data,variables:a.variables})}):S.writeQuery({query:a.query,variables:a.variables,data:m.data})},onWatchUpdated:function(S){d.add(S.query)}});else{var v=r.getLast("result"),_=h(v.data,{fetchMoreResult:m.data,variables:a.variables});r.reportResult(B(B({},v),{networkStatus:f,loading:nu(f),data:_}),r.variables)}return r.maskResult(m)}).finally(function(){g&&!d.has(r.query)&&r.reobserveCacheFirst()})},t.prototype.subscribeToMore=function(n){var r=this,a=this.queryManager.startGraphQLSubscription({query:n.document,variables:n.variables,context:n.context}).subscribe({next:function(s){var c=n.updateQuery;c&&r.updateQuery(function(f,d){return c(f,B({subscriptionData:s},d))})},error:function(s){if(n.onError){n.onError(s);return}globalThis.__DEV__!==!1&&de.error(30,s)}});return this.subscriptions.add(a),function(){r.subscriptions.delete(a)&&a.unsubscribe()}},t.prototype.setOptions=function(n){return globalThis.__DEV__!==!1&&(on(n,"canonizeResults","setOptions"),Aa("setOptions",function(){globalThis.__DEV__!==!1&&de.warn(31)})),this.reobserve(n)},t.prototype.silentSetOptions=function(n){var r=Ro(this.options,n||{});XO(this.options,r)},t.prototype.setVariables=function(n){var r=this;return pt(this.variables,n)?this.observers.size?_n("observableQuery.result",function(){return r.result()}):Promise.resolve():(this.options.variables=n,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:n},tt.setVariables):Promise.resolve())},t.prototype.updateQuery=function(n){var r=this.queryManager,a=r.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}),s=a.result,c=a.complete,f=n(s,{variables:this.variables,complete:!!c,previousData:s});f&&(r.cache.writeQuery({query:this.options.query,data:f,variables:this.variables}),r.broadcastQueries())},t.prototype.startPolling=function(n){this.options.pollInterval=n,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(n,r){if(r.nextFetchPolicy){var a=r.fetchPolicy,s=a===void 0?"cache-first":a,c=r.initialFetchPolicy,f=c===void 0?s:c;s==="standby"||(typeof r.nextFetchPolicy=="function"?r.fetchPolicy=r.nextFetchPolicy(s,{reason:n,options:r,observable:this,initialFetchPolicy:f}):n==="variables-changed"?r.fetchPolicy=f:r.fetchPolicy=r.nextFetchPolicy)}return r.fetchPolicy},t.prototype.fetch=function(n,r,a){var s=this._getOrCreateQuery();return s.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(s,n,r,a)},t.prototype.updatePolling=function(){var n=this;if(!this.queryManager.ssrMode){var r=this,a=r.pollingInfo,s=r.options.pollInterval;if(!s||!this.hasObservers()){a&&(clearTimeout(a.timeout),delete this.pollingInfo);return}if(!(a&&a.interval===s)){de(s,32);var c=a||(this.pollingInfo={});c.interval=s;var f=function(){var h,g;n.pollingInfo&&(!nu(n.queryInfo.networkStatus)&&!(!((g=(h=n.options).skipPollAttempt)===null||g===void 0)&&g.call(h))?n.reobserve({fetchPolicy:n.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},tt.poll).then(d,d):d())},d=function(){var h=n.pollingInfo;h&&(clearTimeout(h.timeout),h.timeout=setTimeout(f,h.interval))};d()}}},t.prototype.updateLastResult=function(n,r){var a=this;r===void 0&&(r=this.variables);var s=_n("getLastError",function(){return a.getLastError()});return s&&this.last&&!pt(r,this.last.variables)&&(s=void 0),this.last=B({result:this.queryManager.assumeImmutableResults?n:YA(n),variables:r},s?{error:s}:null)},t.prototype.reobserveAsConcast=function(n,r){var a=this;this.isTornDown=!1;var s=r===tt.refetch||r===tt.fetchMore||r===tt.poll,c=this.options.variables,f=this.options.fetchPolicy,d=Ro(this.options,n||{}),h=s?d:XO(this.options,d),g=this.transformDocument(h.query);this.lastQuery=g,s||(this.updatePolling(),n&&n.variables&&!pt(n.variables,c)&&h.fetchPolicy!=="standby"&&(h.fetchPolicy===f||typeof h.nextFetchPolicy=="function")&&(this.applyNextFetchPolicy("variables-changed",h),r===void 0&&(r=tt.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=Sv(h.fetchPolicy));var m=function(){a.concast===S&&(a.waitForOwnResult=!1)},v=h.variables&&B({},h.variables),_=this.fetch(h,r,g),S=_.concast,E=_.fromLink,w={next:function(T){pt(a.variables,v)&&(m(),a.reportResult(T,v))},error:function(T){pt(a.variables,v)&&(rO(T)||(T=new ci({networkError:T})),m(),a.reportError(T,v))}};return!s&&(E||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=S,this.observer=w),S.addObserver(w),S},t.prototype.reobserve=function(n,r){return Fq(this.reobserveAsConcast(n,r).promise.then(this.maskResult))},t.prototype.resubscribeAfterError=function(){for(var n=this,r=[],a=0;a0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(n){return n.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(n){return this.queryManager.transform(n)},t.prototype.maskResult=function(n){return n&&"data"in n?B(B({},n),{data:this.queryManager.maskOperation({document:this.query,data:n.data,fetchPolicy:this.options.fetchPolicy,id:this.queryId})}):n},t.prototype.resetNotifications=function(){this.cancelNotifyTimeout(),this.dirty=!1},t.prototype.cancelNotifyTimeout=function(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0)},t.prototype.scheduleNotify=function(){var n=this;this.dirty||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return n.notify()},0)))},t.prototype.notify=function(){if(this.cancelNotifyTimeout(),this.dirty&&(this.options.fetchPolicy=="cache-only"||this.options.fetchPolicy=="cache-and-network"||!nu(this.queryInfo.networkStatus))){var n=this.queryInfo.getDiff();n.fromOptimisticTransaction?this.observe():this.reobserveCacheFirst()}this.dirty=!1},t.prototype.reobserveCacheFirst=function(){var n=this.options,r=n.fetchPolicy,a=n.nextFetchPolicy;return r==="cache-and-network"||r==="network-only"?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(s,c){return this.nextFetchPolicy=a,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(s,c):r}}):this.reobserve()},t.inactiveOnCreation=new Qs,t})(Dt);XA(Kc);function J$(e){globalThis.__DEV__!==!1&&de.error(33,e.message,e.stack)}function KO(e){globalThis.__DEV__!==!1&&e&&globalThis.__DEV__!==!1&&de.debug(34,e)}function Sv(e){return e==="network-only"||e==="no-cache"||e==="standby"}var ru=new(wo?WeakMap:Map);function Ev(e,t){var n=e[t];typeof n=="function"&&(e[t]=function(){return ru.set(e,(ru.get(e)+1)%1e15),n.apply(this,arguments)})}var Tv=(function(){function e(t,n){n===void 0&&(n=t.generateQueryId()),this.queryId=n,this.document=null,this.lastRequestId=1,this.stopped=!1,this.observableQuery=null;var r=this.cache=t.cache;ru.has(r)||(ru.set(r,0),Ev(r,"evict"),Ev(r,"modify"),Ev(r,"reset"))}return e.prototype.init=function(t){var n=t.networkStatus||tt.loading;return this.variables&&this.networkStatus!==tt.loading&&!pt(this.variables,t.variables)&&(n=tt.setVariables),pt(t.variables,this.variables)||(this.lastDiff=void 0,this.cancel()),Object.assign(this,{document:t.document,variables:t.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:n}),t.observableQuery&&this.setObservableQuery(t.observableQuery),t.lastRequestId&&(this.lastRequestId=t.lastRequestId),this},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var t=this,n=this.getDiffOptions();if(this.lastDiff&&pt(n,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var r=this.observableQuery;if(r&&r.options.fetchPolicy==="no-cache")return{complete:!1};var a=_n("canonizeResults",function(){return t.cache.diff(n)});return this.updateLastDiff(a,n),a},e.prototype.updateLastDiff=function(t,n){this.lastDiff=t?{diff:t,options:n||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(t){var n;return t===void 0&&(t=this.variables),{query:this.document,variables:t,returnPartialData:!0,optimistic:!0,canonizeResults:(n=this.observableQuery)===null||n===void 0?void 0:n.options.canonizeResults}},e.prototype.setDiff=function(t){var n=this,r,a=this.lastDiff&&this.lastDiff.diff;t&&!t.complete&&_n("getLastError",function(){var s;return(s=n.observableQuery)===null||s===void 0?void 0:s.getLastError()})||(this.updateLastDiff(t),pt(a&&a.result,t&&t.result)||(r=this.observableQuery)===null||r===void 0||r.scheduleNotify())},e.prototype.setObservableQuery=function(t){t!==this.observableQuery&&(this.observableQuery=t,t&&(t.queryInfo=this))},e.prototype.stop=function(){var t;if(!this.stopped){this.stopped=!0,(t=this.observableQuery)===null||t===void 0||t.resetNotifications(),this.cancel();var n=this.observableQuery;n&&n.stopPolling()}},e.prototype.cancel=function(){var t;(t=this.cancelWatch)===null||t===void 0||t.call(this),this.cancelWatch=void 0},e.prototype.updateWatch=function(t){var n=this;t===void 0&&(t=this.variables);var r=this.observableQuery;if(!(r&&r.options.fetchPolicy==="no-cache")){var a=B(B({},this.getDiffOptions(t)),{watcher:this,callback:function(s){return n.setDiff(s)}});(!this.lastWatch||!pt(a,this.lastWatch))&&(this.cancel(),this.cancelWatch=this.cache.watch(this.lastWatch=a))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(t,n){var r=this.lastWrite;return!(r&&r.dmCount===ru.get(this.cache)&&pt(n,r.variables)&&pt(t.data,r.result.data))},e.prototype.markResult=function(t,n,r,a){var s=this,c,f=new Ca,d=Er(t.errors)?t.errors.slice(0):[];if((c=this.observableQuery)===null||c===void 0||c.resetNotifications(),"incremental"in t&&Er(t.incremental)){var h=JA(this.getDiff().result,t);t.data=h}else if("hasNext"in t&&t.hasNext){var g=this.getDiff();t.data=f.merge(g.result,t.data)}this.graphQLErrors=d,r.fetchPolicy==="no-cache"?this.updateLastDiff({result:t.data,complete:!0},this.getDiffOptions(r.variables)):a!==0&&(wv(t,r.errorPolicy)?this.cache.performTransaction(function(m){if(s.shouldWrite(t,r.variables))m.writeQuery({query:n,data:t.data,variables:r.variables,overwrite:a===1}),s.lastWrite={result:t,variables:r.variables,dmCount:ru.get(s.cache)};else if(s.lastDiff&&s.lastDiff.diff.complete){t.data=s.lastDiff.diff.result;return}var v=s.getDiffOptions(r.variables),_=_n("canonizeResults",function(){return m.diff(v)});!s.stopped&&pt(s.variables,r.variables)&&s.updateWatch(r.variables),s.updateLastDiff(_,v),_.complete&&(t.data=_.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=tt.ready},e.prototype.markError=function(t){var n;return this.networkStatus=tt.error,this.lastWrite=void 0,(n=this.observableQuery)===null||n===void 0||n.resetNotifications(),t.graphQLErrors&&(this.graphQLErrors=t.graphQLErrors),t.networkError&&(this.networkError=t.networkError),t},e})();function wv(e,t){t===void 0&&(t="none");var n=t==="ignore"||t==="all",r=!Yd(e);return!r&&n&&e.data&&(r=!0),r}var Z$=Object.prototype.hasOwnProperty,JO=Object.create(null),eV=(function(){function e(t){var n=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new zy(ui["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Li(!1),this.noCacheWarningsByQueryId=new Set;var r=new LA(function(s){return n.cache.transformDocument(s)},{cache:!1});this.cache=t.cache,this.link=t.link,this.defaultOptions=t.defaultOptions,this.queryDeduplication=t.queryDeduplication,this.clientAwareness=t.clientAwareness,this.localState=t.localState,this.ssrMode=t.ssrMode,this.assumeImmutableResults=t.assumeImmutableResults,this.dataMasking=t.dataMasking;var a=t.documentTransform;this.documentTransform=a?r.concat(a).concat(r):r,this.defaultContext=t.defaultContext||Object.create(null),(this.onBroadcast=t.onBroadcast)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var t=this;this.queries.forEach(function(n,r){t.stopQueryNoBroadcast(r)}),this.cancelPendingFetches(Vn(35))},e.prototype.cancelPendingFetches=function(t){this.fetchCancelFns.forEach(function(n){return n(t)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(t){return _a(this,arguments,void 0,function(n){var r,a,s,c,f,d,h,g=n.mutation,m=n.variables,v=n.optimisticResponse,_=n.updateQueries,S=n.refetchQueries,E=S===void 0?[]:S,w=n.awaitRefetchQueries,T=w===void 0?!1:w,O=n.update,x=n.onQueryUpdated,I=n.fetchPolicy,M=I===void 0?((d=this.defaultOptions.mutate)===null||d===void 0?void 0:d.fetchPolicy)||"network-only":I,L=n.errorPolicy,D=L===void 0?((h=this.defaultOptions.mutate)===null||h===void 0?void 0:h.errorPolicy)||"none":L,G=n.keepRootFields,V=n.context;return ba(this,function(ae){switch(ae.label){case 0:return de(g,36),de(M==="network-only"||M==="no-cache",37),r=this.generateMutationId(),g=this.cache.transformForLink(this.transform(g)),a=this.getDocumentInfo(g).hasClientExports,m=this.getVariables(g,m),a?[4,this.localState.addExportedVariables(g,m,V)]:[3,2];case 1:m=ae.sent(),ae.label=2;case 2:return s=this.mutationStore&&(this.mutationStore[r]={mutation:g,variables:m,loading:!0,error:null}),c=v&&this.markMutationOptimistic(v,{mutationId:r,document:g,variables:m,fetchPolicy:M,errorPolicy:D,context:V,updateQueries:_,update:O,keepRootFields:G}),this.broadcastQueries(),f=this,[2,new Promise(function(he,te){return nv(f.getObservableFromLink(g,B(B({},V),{optimisticResponse:c?v:void 0}),m,{},!1),function(X){if(Yd(X)&&D==="none")throw new ci({graphQLErrors:rv(X)});s&&(s.loading=!1,s.error=null);var pe=B({},X);return typeof E=="function"&&(E=E(pe)),D==="ignore"&&Yd(pe)&&delete pe.errors,f.markMutationResult({mutationId:r,result:pe,document:g,variables:m,fetchPolicy:M,errorPolicy:D,context:V,update:O,updateQueries:_,awaitRefetchQueries:T,refetchQueries:E,removeOptimistic:c?r:void 0,onQueryUpdated:x,keepRootFields:G})}).subscribe({next:function(X){f.broadcastQueries(),(!("hasNext"in X)||X.hasNext===!1)&&he(B(B({},X),{data:f.maskOperation({document:g,data:X.data,fetchPolicy:M,id:r})}))},error:function(X){s&&(s.loading=!1,s.error=X),c&&f.cache.removeOptimistic(r),f.broadcastQueries(),te(X instanceof ci?X:new ci({networkError:X}))}})})]}})})},e.prototype.markMutationResult=function(t,n){var r=this;n===void 0&&(n=this.cache);var a=t.result,s=[],c=t.fetchPolicy==="no-cache";if(!c&&wv(a,t.errorPolicy)){if(Zs(a)||s.push({result:a.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}),Zs(a)&&Er(a.incremental)){var f=n.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}),d=void 0;f.result&&(d=JA(f.result,a)),typeof d!="undefined"&&(a.data=d,s.push({result:d,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}))}var h=t.updateQueries;h&&this.queries.forEach(function(m,v){var _=m.observableQuery,S=_&&_.queryName;if(!(!S||!Z$.call(h,S))){var E=h[S],w=r.queries.get(v),T=w.document,O=w.variables,x=n.diff({query:T,variables:O,returnPartialData:!0,optimistic:!1}),I=x.result,M=x.complete;if(M&&I){var L=E(I,{mutationResult:a,queryName:T&&Uc(T)||void 0,queryVariables:O});L&&s.push({result:L,dataId:"ROOT_QUERY",query:T,variables:O})}}})}if(s.length>0||(t.refetchQueries||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){var g=[];if(this.refetchQueries({updateCache:function(m){c||s.forEach(function(E){return m.write(E)});var v=t.update,_=!Vq(a)||Zs(a)&&!a.hasNext;if(v){if(!c){var S=m.diff({id:"ROOT_MUTATION",query:r.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});S.complete&&(a=B(B({},a),{data:S.result}),"incremental"in a&&delete a.incremental,"hasNext"in a&&delete a.hasNext)}_&&v(m,a,{context:t.context,variables:t.variables})}!c&&!t.keepRootFields&&_&&m.modify({id:"ROOT_MUTATION",fields:function(E,w){var T=w.fieldName,O=w.DELETE;return T==="__typename"?E:O}})},include:t.refetchQueries,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(function(m){return g.push(m)}),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(g).then(function(){return a})}return Promise.resolve(a)},e.prototype.markMutationOptimistic=function(t,n){var r=this,a=typeof t=="function"?t(n.variables,{IGNORE:JO}):t;return a===JO?!1:(this.cache.recordOptimisticTransaction(function(s){try{r.markMutationResult(B(B({},n),{result:{data:a}}),s)}catch(c){globalThis.__DEV__!==!1&&de.error(c)}},n.mutationId),!0)},e.prototype.fetchQuery=function(t,n,r){return this.fetchConcastWithInfo(this.getOrCreateQuery(t),n,r).concast.promise},e.prototype.getQueryStore=function(){var t=Object.create(null);return this.queries.forEach(function(n,r){t[r]={variables:n.variables,networkStatus:n.networkStatus,networkError:n.networkError,graphQLErrors:n.graphQLErrors}}),t},e.prototype.resetErrors=function(t){var n=this.queries.get(t);n&&(n.networkError=void 0,n.graphQLErrors=[])},e.prototype.transform=function(t){return this.documentTransform.transformDocument(t)},e.prototype.getDocumentInfo=function(t){var n=this.transformCache;if(!n.has(t)){var r={hasClientExports:Oj(t),hasForcedResolvers:this.localState.shouldForceResolvers(t),hasNonreactiveDirective:Lc(["nonreactive"],t),nonReactiveQuery:Mq(t),clientQuery:this.localState.clientQuery(t),serverQuery:HA([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],t),defaultVars:Py(Ao(t)),asQuery:B(B({},t),{definitions:t.definitions.map(function(a){return a.kind==="OperationDefinition"&&a.operation!=="query"?B(B({},a),{operation:"query"}):a})})};n.set(t,r)}return n.get(t)},e.prototype.getVariables=function(t,n){return B(B({},this.getDocumentInfo(t).defaultVars),n)},e.prototype.watchQuery=function(t){var n=this.transform(t.query);t=B(B({},t),{variables:this.getVariables(n,t.variables)}),typeof t.notifyOnNetworkStatusChange=="undefined"&&(t.notifyOnNetworkStatusChange=!1);var r=new Tv(this),a=new Kc({queryManager:this,queryInfo:r,options:t});return a.lastQuery=n,Kc.inactiveOnCreation.getValue()||this.queries.set(a.queryId,r),r.init({document:n,observableQuery:a,variables:a.variables}),a},e.prototype.query=function(t,n){var r=this;n===void 0&&(n=this.generateQueryId()),de(t.query,38),de(t.query.kind==="Document",39),de(!t.returnPartialData,40),de(!t.pollInterval,41);var a=this.transform(t.query);return this.fetchQuery(n,B(B({},t),{query:a})).then(function(s){return s&&B(B({},s),{data:r.maskOperation({document:a,data:s.data,fetchPolicy:t.fetchPolicy,id:n})})}).finally(function(){return r.stopQuery(n)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(t){this.stopQueryInStoreNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(t){var n=this.queries.get(t);n&&n.stop()},e.prototype.clearStore=function(t){return t===void 0&&(t={discardWatches:!0}),this.cancelPendingFetches(Vn(42)),this.queries.forEach(function(n){n.observableQuery?n.networkStatus=tt.loading:n.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(t)},e.prototype.getObservableQueries=function(t){var n=this;t===void 0&&(t="active");var r=new Map,a=new Map,s=new Map,c=new Set;return Array.isArray(t)&&t.forEach(function(f){if(typeof f=="string")a.set(f,f),s.set(f,!1);else if(nq(f)){var d=Oo(n.transform(f));a.set(d,Uc(f)),s.set(d,!1)}else Zt(f)&&f.query&&c.add(f)}),this.queries.forEach(function(f,d){var h=f.observableQuery,g=f.document;if(h){if(t==="all"){r.set(d,h);return}var m=h.queryName,v=h.options.fetchPolicy;if(v==="standby"||t==="active"&&!h.hasObservers())return;(t==="active"||m&&s.has(m)||g&&s.has(Oo(g)))&&(r.set(d,h),m&&s.set(m,!0),g&&s.set(Oo(g),!0))}}),c.size&&c.forEach(function(f){var d=Ry("legacyOneTimeQuery"),h=n.getOrCreateQuery(d).init({document:f.query,variables:f.variables}),g=new Kc({queryManager:n,queryInfo:h,options:B(B({},f),{fetchPolicy:"network-only"})});de(g.queryId===d),h.setObservableQuery(g),r.set(d,g)}),globalThis.__DEV__!==!1&&s.size&&s.forEach(function(f,d){if(!f){var h=a.get(d);h?globalThis.__DEV__!==!1&&de.warn(43,h):globalThis.__DEV__!==!1&&de.warn(44)}}),r},e.prototype.reFetchObservableQueries=function(t){var n=this;t===void 0&&(t=!1);var r=[];return this.getObservableQueries(t?"all":"active").forEach(function(a,s){var c=a.options.fetchPolicy;_n("resetLastResults",function(){return a.resetLastResults()}),(t||c!=="standby"&&c!=="cache-only")&&r.push(a.refetch()),(n.queries.get(s)||a.queryInfo).setDiff(null)}),this.broadcastQueries(),Promise.all(r)},e.prototype.startGraphQLSubscription=function(t){var n=this,r=t.query,a=t.variables,s=t.fetchPolicy,c=t.errorPolicy,f=c===void 0?"none":c,d=t.context,h=d===void 0?{}:d,g=t.extensions,m=g===void 0?{}:g;r=this.transform(r),a=this.getVariables(r,a);var v=function(S){return n.getObservableFromLink(r,h,S,m).map(function(E){s!=="no-cache"&&(wv(E,f)&&n.cache.write({query:r,result:E.data,dataId:"ROOT_SUBSCRIPTION",variables:S}),n.broadcastQueries());var w=Yd(E),T=nO(E);if(w||T){var O={};if(w&&(O.graphQLErrors=E.errors),T&&(O.protocolErrors=E.extensions[Kd]),f==="none"||T)throw new ci(O)}return f==="ignore"&&delete E.errors,E})};if(this.getDocumentInfo(r).hasClientExports){var _=this.localState.addExportedVariables(r,a,h).then(v);return new Dt(function(S){var E=null;return _.then(function(w){return E=w.subscribe(S)},S.error),function(){return E&&E.unsubscribe()}})}return v(a)},e.prototype.stopQuery=function(t){this.stopQueryNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(t){this.stopQueryInStoreNoBroadcast(t),this.removeQuery(t)},e.prototype.removeQuery=function(t){var n;this.fetchCancelFns.delete(t),this.queries.has(t)&&((n=this.queries.get(t))===null||n===void 0||n.stop(),this.queries.delete(t))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(t){var n;return(n=t.observableQuery)===null||n===void 0?void 0:n.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(t,n,r,a,s){var c=this,f;s===void 0&&(s=(f=n==null?void 0:n.queryDeduplication)!==null&&f!==void 0?f:this.queryDeduplication);var d,h=this.getDocumentInfo(t),g=h.serverQuery,m=h.clientQuery;if(g){var v=this,_=v.inFlightLinkObservables,S=v.link,E={query:g,variables:r,operationName:Uc(g)||void 0,context:this.prepareContext(B(B({},n),{forceFetch:!s})),extensions:a};if(n=E.context,s){var w=Oo(g),T=Ea(r),O=_.lookup(w,T);if(d=O.observable,!d){var x=new Js([ov(S,E)]);d=O.observable=x,x.beforeNext(function I(M,L){M==="next"&&"hasNext"in L&&L.hasNext?x.beforeNext(I):_.remove(w,T)})}}else d=new Js([ov(S,E)])}else d=new Js([Dt.of({data:{}})]),n=this.prepareContext(n);return m&&(d=nv(d,function(I){return c.localState.runResolvers({document:m,remoteResult:I,context:n,variables:r})})),d},e.prototype.getResultsFromLink=function(t,n,r){var a=t.lastRequestId=this.generateRequestId(),s=this.cache.transformForLink(r.query);return nv(this.getObservableFromLink(s,r.context,r.variables),function(c){var f=rv(c),d=f.length>0,h=r.errorPolicy;if(a>=t.lastRequestId){if(d&&h==="none")throw t.markError(new ci({graphQLErrors:f}));t.markResult(c,s,r,n),t.markReady()}var g={data:c.data,loading:!1,networkStatus:tt.ready};return d&&h==="none"&&(g.data=void 0),d&&h!=="ignore"&&(g.errors=f,g.networkStatus=tt.error),g},function(c){var f=rO(c)?c:new ci({networkError:c});throw a>=t.lastRequestId&&t.markError(f),f})},e.prototype.fetchConcastWithInfo=function(t,n,r,a){var s=this;r===void 0&&(r=tt.loading),a===void 0&&(a=n.query);var c=this.getVariables(a,n.variables),f=this.defaultOptions.watchQuery,d=n.fetchPolicy,h=d===void 0?f&&f.fetchPolicy||"cache-first":d,g=n.errorPolicy,m=g===void 0?f&&f.errorPolicy||"none":g,v=n.returnPartialData,_=v===void 0?!1:v,S=n.notifyOnNetworkStatusChange,E=S===void 0?!1:S,w=n.context,T=w===void 0?{}:w,O=Object.assign({},n,{query:a,variables:c,fetchPolicy:h,errorPolicy:m,returnPartialData:_,notifyOnNetworkStatusChange:E,context:T}),x=function(G){O.variables=G;var V=s.fetchQueryByPolicy(t,O,r);return O.fetchPolicy!=="standby"&&V.sources.length>0&&t.observableQuery&&t.observableQuery.applyNextFetchPolicy("after-fetch",n),V},I=function(){return s.fetchCancelFns.delete(t.queryId)};this.fetchCancelFns.set(t.queryId,function(G){I(),setTimeout(function(){return M.cancel(G)})});var M,L;if(this.getDocumentInfo(O.query).hasClientExports)M=new Js(this.localState.addExportedVariables(O.query,O.variables,O.context).then(x).then(function(G){return G.sources})),L=!0;else{var D=x(O.variables);L=D.fromLink,M=new Js(D.sources)}return M.promise.then(I,I),{concast:M,fromLink:L}},e.prototype.refetchQueries=function(t){var n=this,r=t.updateCache,a=t.include,s=t.optimistic,c=s===void 0?!1:s,f=t.removeOptimistic,d=f===void 0?c?Ry("refetchQueries"):void 0:f,h=t.onQueryUpdated,g=new Map;a&&this.getObservableQueries(a).forEach(function(v,_){g.set(_,{oq:v,lastDiff:(n.queries.get(_)||v.queryInfo).getDiff()})});var m=new Map;return r&&this.cache.batch({update:r,optimistic:c&&d||!1,removeOptimistic:d,onWatchUpdated:function(v,_,S){var E=v.watcher instanceof Tv&&v.watcher.observableQuery;if(E){if(h){g.delete(E.queryId);var w=h(E,_,S);return w===!0&&(w=E.refetch()),w!==!1&&m.set(E,w),w}h!==null&&g.set(E.queryId,{oq:E,lastDiff:S,diff:_})}}}),g.size&&g.forEach(function(v,_){var S=v.oq,E=v.lastDiff,w=v.diff,T;h&&(w||(w=_n("canonizeResults",function(){return n.cache.diff(S.queryInfo.getDiffOptions())})),T=h(S,w,E)),(!h||T===!0)&&(T=S.refetch()),T!==!1&&m.set(S,T),_.indexOf("legacyOneTimeQuery")>=0&&n.stopQueryNoBroadcast(_)}),d&&this.cache.removeOptimistic(d),m},e.prototype.maskOperation=function(t){var n,r,a,s=t.document,c=t.data;if(globalThis.__DEV__!==!1){var f=t.fetchPolicy,d=t.id,h=(n=Ao(s))===null||n===void 0?void 0:n.operation,g=((r=h==null?void 0:h[0])!==null&&r!==void 0?r:"o")+d;this.dataMasking&&f==="no-cache"&&!Bj(s)&&!this.noCacheWarningsByQueryId.has(g)&&(this.noCacheWarningsByQueryId.add(g),globalThis.__DEV__!==!1&&de.warn(45,(a=Uc(s))!==null&&a!==void 0?a:"Unnamed ".concat(h!=null?h:"operation")))}return this.dataMasking?N$(c,s,this.cache):c},e.prototype.maskFragment=function(t){var n=t.data,r=t.fragment,a=t.fragmentName;return this.dataMasking?_O(n,r,this.cache,a):n},e.prototype.fetchQueryByPolicy=function(t,n,r){var a=this,s=n.query,c=n.variables,f=n.fetchPolicy,d=n.refetchWritePolicy,h=n.errorPolicy,g=n.returnPartialData,m=n.context,v=n.notifyOnNetworkStatusChange,_=t.networkStatus;t.init({document:s,variables:c,networkStatus:r});var S=function(){return t.getDiff()},E=function(I,M){M===void 0&&(M=t.networkStatus||tt.loading);var L=I.result;globalThis.__DEV__!==!1&&!g&&!pt(L,{})&&KO(I.missing);var D=function(G){return Dt.of(B({data:G,loading:nu(M),networkStatus:M},I.complete?null:{partial:!0}))};return L&&a.getDocumentInfo(s).hasForcedResolvers?a.localState.runResolvers({document:s,remoteResult:{data:L},context:m,variables:c,onlyRunForcedResolvers:!0}).then(function(G){return D(G.data||void 0)}):h==="none"&&M===tt.refetch&&Array.isArray(I.missing)?D(void 0):D(L)},w=f==="no-cache"?0:r===tt.refetch&&d!=="merge"?1:2,T=function(){return a.getResultsFromLink(t,w,{query:s,variables:c,context:m,fetchPolicy:f,errorPolicy:h})},O=v&&typeof _=="number"&&_!==r&&nu(r);switch(f){default:case"cache-first":{var x=S();return x.complete?{fromLink:!1,sources:[E(x,t.markReady())]}:g||O?{fromLink:!0,sources:[E(x),T()]}:{fromLink:!0,sources:[T()]}}case"cache-and-network":{var x=S();return x.complete||g||O?{fromLink:!0,sources:[E(x),T()]}:{fromLink:!0,sources:[T()]}}case"cache-only":return{fromLink:!1,sources:[E(S(),t.markReady())]};case"network-only":return O?{fromLink:!0,sources:[E(S()),T()]}:{fromLink:!0,sources:[T()]};case"no-cache":return O?{fromLink:!0,sources:[E(t.getDiff()),T()]}:{fromLink:!0,sources:[T()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getOrCreateQuery=function(t){return t&&!this.queries.has(t)&&this.queries.set(t,new Tv(this,t)),this.queries.get(t)},e.prototype.prepareContext=function(t){t===void 0&&(t={});var n=this.localState.prepareContext(t);return B(B(B({},this.defaultContext),n),{clientAwareness:this.clientAwareness})},e})(),tV=(function(){function e(t){var n=t.cache,r=t.client,a=t.resolvers,s=t.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=n,r&&(this.client=r),a&&this.addResolvers(a),s&&this.setFragmentMatcher(s)}return e.prototype.addResolvers=function(t){var n=this;this.resolvers=this.resolvers||{},Array.isArray(t)?t.forEach(function(r){n.resolvers=PA(n.resolvers,r)}):this.resolvers=PA(this.resolvers,t)},e.prototype.setResolvers=function(t){this.resolvers={},this.addResolvers(t)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(t){return _a(this,arguments,void 0,function(n){var r=n.document,a=n.remoteResult,s=n.context,c=n.variables,f=n.onlyRunForcedResolvers,d=f===void 0?!1:f;return ba(this,function(h){return r?[2,this.resolveDocument(r,a.data,s,c,this.fragmentMatcher,d).then(function(g){return B(B({},a),{data:g.result})})]:[2,a]})})},e.prototype.setFragmentMatcher=function(t){this.fragmentMatcher=t},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(t){return Lc(["client"],t)&&this.resolvers?t:null},e.prototype.serverQuery=function(t){return FA(t)},e.prototype.prepareContext=function(t){var n=this.cache;return B(B({},t),{cache:n,getCacheKey:function(r){return n.identify(r)}})},e.prototype.addExportedVariables=function(t){return _a(this,arguments,void 0,function(n,r,a){return r===void 0&&(r={}),a===void 0&&(a={}),ba(this,function(s){return n?[2,this.resolveDocument(n,this.buildRootValueFromCache(n,r)||{},this.prepareContext(a),r).then(function(c){return B(B({},r),c.exportedVariables)})]:[2,B({},r)]})})},e.prototype.shouldForceResolvers=function(t){var n=!1;return Kr(t,{Directive:{enter:function(r){if(r.name.value==="client"&&r.arguments&&(n=r.arguments.some(function(a){return a.name.value==="always"&&a.value.kind==="BooleanValue"&&a.value.value===!0}),n))return Bd}}}),n},e.prototype.buildRootValueFromCache=function(t,n){return this.cache.diff({query:Rq(t),variables:n,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(t,n){return _a(this,arguments,void 0,function(r,a,s,c,f,d){var h,g,m,v,_,S,E,w,T,O,x;return s===void 0&&(s={}),c===void 0&&(c={}),f===void 0&&(f=function(){return!0}),d===void 0&&(d=!1),ba(this,function(I){return h=Bc(r),g=Gs(r),m=Ps(g),v=this.collectSelectionsToResolve(h,m),_=h.operation,S=_?_.charAt(0).toUpperCase()+_.slice(1):"Query",E=this,w=E.cache,T=E.client,O={fragmentMap:m,context:B(B({},s),{cache:w,client:T}),variables:c,fragmentMatcher:f,defaultOperationType:S,exportedVariables:{},selectionsToResolve:v,onlyRunForcedResolvers:d},x=!1,[2,this.resolveSelectionSet(h.selectionSet,x,a,O).then(function(M){return{result:M,exportedVariables:O.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(t,n,r,a){return _a(this,void 0,void 0,function(){var s,c,f,d,h,g=this;return ba(this,function(m){return s=a.fragmentMap,c=a.context,f=a.variables,d=[r],h=function(v){return _a(g,void 0,void 0,function(){var _,S;return ba(this,function(E){return!n&&!a.selectionsToResolve.has(v)?[2]:Nc(v,f)?Ta(v)?[2,this.resolveField(v,n,r,a).then(function(w){var T;typeof w!="undefined"&&d.push((T={},T[zi(v)]=w,T))})]:(pq(v)?_=v:(_=s[v.name.value],de(_,21,v.name.value)),_&&_.typeCondition&&(S=_.typeCondition.name.value,a.fragmentMatcher(r,S,c))?[2,this.resolveSelectionSet(_.selectionSet,n,r,a).then(function(w){d.push(w)})]:[2]):[2]})})},[2,Promise.all(t.selections.map(h)).then(function(){return Gd(d)})]})})},e.prototype.resolveField=function(t,n,r,a){return _a(this,void 0,void 0,function(){var s,c,f,d,h,g,m,v,_,S=this;return ba(this,function(E){return r?(s=a.variables,c=t.name.value,f=zi(t),d=c!==f,h=r[f]||r[c],g=Promise.resolve(h),(!a.onlyRunForcedResolvers||this.shouldForceResolvers(t))&&(m=r.__typename||a.defaultOperationType,v=this.resolvers&&this.resolvers[m],v&&(_=v[d?c:f],_&&(g=Promise.resolve(pv.withValue(this.cache,_,[r,qd(t,s),a.context,{field:t,fragmentMap:a.fragmentMap}]))))),[2,g.then(function(w){var T,O;if(w===void 0&&(w=h),t.directives&&t.directives.forEach(function(I){I.name.value==="export"&&I.arguments&&I.arguments.forEach(function(M){M.name.value==="as"&&M.value.kind==="StringValue"&&(a.exportedVariables[M.value.value]=w)})}),!t.selectionSet||w==null)return w;var x=(O=(T=t.directives)===null||T===void 0?void 0:T.some(function(I){return I.name.value==="client"}))!==null&&O!==void 0?O:!1;if(Array.isArray(w))return S.resolveSubSelectedArray(t,n||x,w,a);if(t.selectionSet)return S.resolveSelectionSet(t.selectionSet,n||x,w,a)})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(t,n,r,a){var s=this;return Promise.all(r.map(function(c){if(c===null)return null;if(Array.isArray(c))return s.resolveSubSelectedArray(t,n,c,a);if(t.selectionSet)return s.resolveSelectionSet(t.selectionSet,n,c,a)}))},e.prototype.collectSelectionsToResolve=function(t,n){var r=function(c){return!Array.isArray(c)},a=this.selectionsToResolveCache;function s(c){if(!a.has(c)){var f=new Set;a.set(c,f),Kr(c,{Directive:function(d,h,g,m,v){d.name.value==="client"&&v.forEach(function(_){r(_)&&uA(_)&&f.add(_)})},FragmentSpread:function(d,h,g,m,v){var _=n[d.name.value];de(_,22,d.name.value);var S=s(_);S.size>0&&(v.forEach(function(E){r(E)&&uA(E)&&f.add(E)}),f.add(d),S.forEach(function(E){f.add(E)}))}})}return a.get(c)}return s(t)},e})(),ZO=!1,eR=(function(){function e(t){var n=this,r,a,s;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!t.cache)throw Vn(16);var c=t.uri,f=t.credentials,d=t.headers,h=t.cache,g=t.documentTransform,m=t.ssrMode,v=m===void 0?!1:m,_=t.ssrForceFetchDelay,S=_===void 0?0:_,E=t.connectToDevTools,w=t.queryDeduplication,T=w===void 0?!0:w,O=t.defaultOptions,x=t.defaultContext,I=t.assumeImmutableResults,M=I===void 0?h.assumeImmutableResults:I,L=t.resolvers,D=t.typeDefs,G=t.fragmentMatcher,V=t.clientAwareness,ae=t.name,he=t.version,te=t.devtools,X=t.dataMasking;globalThis.__DEV__!==!1&&(on(t,"connectToDevTools","ApolloClient","Please use `devtools.enabled` instead."),on(t,"uri","ApolloClient","Please initialize an instance of `HttpLink` with `uri` instead."),on(t,"credentials","ApolloClient","Please initialize an instance of `HttpLink` with `credentials` instead."),on(t,"headers","ApolloClient","Please initialize an instance of `HttpLink` with `headers` instead."),on(t,"name","ApolloClient","Please use the `clientAwareness.name` option instead."),on(t,"version","ApolloClient","Please use the `clientAwareness.version` option instead."),on(t,"typeDefs","ApolloClient"),t.link||globalThis.__DEV__!==!1&&de.warn(17));var pe=t.link;pe||(pe=c?new sO({uri:c,credentials:f,headers:d}):Oa.empty()),this.link=pe,this.cache=h,this.disableNetworkFetches=v||S>0,this.queryDeduplication=T,this.defaultOptions=O||Object.create(null),this.typeDefs=D,this.devtoolsConfig=B(B({},te),{enabled:(r=te==null?void 0:te.enabled)!==null&&r!==void 0?r:E}),this.devtoolsConfig.enabled===void 0&&(this.devtoolsConfig.enabled=globalThis.__DEV__!==!1),S&&setTimeout(function(){return n.disableNetworkFetches=!1},S),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=Oy,this.localState=new tV({cache:h,client:this,resolvers:L,fragmentMatcher:G}),this.queryManager=new eV({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:x,documentTransform:g,queryDeduplication:T,ssrMode:v,dataMasking:!!X,clientAwareness:{name:(a=V==null?void 0:V.name)!==null&&a!==void 0?a:ae,version:(s=V==null?void 0:V.version)!==null&&s!==void 0?s:he},localState:this.localState,assumeImmutableResults:M,onBroadcast:this.devtoolsConfig.enabled?function(){n.devToolsHookCb&&n.devToolsHookCb({action:{},state:{queries:n.queryManager.getQueryStore(),mutations:n.queryManager.mutationStore||{}},dataWithOptimisticResults:n.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return Object.defineProperty(e.prototype,"prioritizeCacheValues",{get:function(){return this.disableNetworkFetches},set:function(t){this.disableNetworkFetches=t},enumerable:!1,configurable:!0}),e.prototype.connectToDevTools=function(){if(typeof window!="undefined"){var t=window,n=Symbol.for("apollo.devtools");(t[n]=t[n]||[]).push(this),t.__APOLLO_CLIENT__=this,!ZO&&globalThis.__DEV__!==!1&&(ZO=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout(function(){if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var r=window.navigator,a=r&&r.userAgent,s=void 0;typeof a=="string"&&(a.indexOf("Chrome/")>-1?s="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":a.indexOf("Firefox/")>-1&&(s="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),s&&globalThis.__DEV__!==!1&&de.log("Download the Apollo DevTools for a better development experience: %s",s)}},1e4))}},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(t){return this.defaultOptions.watchQuery&&(t=$c(this.defaultOptions.watchQuery,t)),this.disableNetworkFetches&&(t.fetchPolicy==="network-only"||t.fetchPolicy==="cache-and-network")&&(t=B(B({},t),{fetchPolicy:"cache-first"})),globalThis.__DEV__!==!1&&(on(t,"canonizeResults","client.watchQuery"),on(t,"partialRefetch","client.watchQuery")),this.queryManager.watchQuery(t)},e.prototype.query=function(t){return this.defaultOptions.query&&(t=$c(this.defaultOptions.query,t)),de(t.fetchPolicy!=="cache-and-network",18),this.disableNetworkFetches&&t.fetchPolicy==="network-only"&&(t=B(B({},t),{fetchPolicy:"cache-first"})),globalThis.__DEV__!==!1&&(on(t,"canonizeResults","client.query"),on(t,"notifyOnNetworkStatusChange","client.query","This option does not affect `client.query` and can be safely removed."),t.fetchPolicy==="standby"&&globalThis.__DEV__!==!1&&de.warn(19)),this.queryManager.query(t)},e.prototype.mutate=function(t){return this.defaultOptions.mutate&&(t=$c(this.defaultOptions.mutate,t)),this.queryManager.mutate(t)},e.prototype.subscribe=function(t){var n=this,r=this.queryManager.generateQueryId();return this.queryManager.startGraphQLSubscription(t).map(function(a){return B(B({},a),{data:n.queryManager.maskOperation({document:t.query,data:a.data,fetchPolicy:t.fetchPolicy,id:r})})})},e.prototype.readQuery=function(t,n){return n===void 0&&(n=!1),this.cache.readQuery(t,n)},e.prototype.watchFragment=function(t){var n;return this.cache.watchFragment(B(B({},t),(n={},n[Symbol.for("apollo.dataMasking")]=this.queryManager.dataMasking,n)))},e.prototype.readFragment=function(t,n){return n===void 0&&(n=!1),this.cache.readFragment(t,n)},e.prototype.writeQuery=function(t){var n=this.cache.writeQuery(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),n},e.prototype.writeFragment=function(t){var n=this.cache.writeFragment(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),n},e.prototype.__actionHookForDevTools=function(t){this.devToolsHookCb=t},e.prototype.__requestRaw=function(t){return ov(this.link,t)},e.prototype.resetStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(t.resetStoreCallbacks.map(function(n){return n()}))}).then(function(){return t.reFetchObservableQueries()})},e.prototype.clearStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(t.clearStoreCallbacks.map(function(n){return n()}))})},e.prototype.onResetStore=function(t){var n=this;return this.resetStoreCallbacks.push(t),function(){n.resetStoreCallbacks=n.resetStoreCallbacks.filter(function(r){return r!==t})}},e.prototype.onClearStore=function(t){var n=this;return this.clearStoreCallbacks.push(t),function(){n.clearStoreCallbacks=n.clearStoreCallbacks.filter(function(r){return r!==t})}},e.prototype.reFetchObservableQueries=function(t){return this.queryManager.reFetchObservableQueries(t)},e.prototype.refetchQueries=function(t){var n=this.queryManager.refetchQueries(t),r=[],a=[];n.forEach(function(c,f){r.push(f),a.push(c)});var s=Promise.all(a);return s.queries=r,s.results=a,s.catch(function(c){globalThis.__DEV__!==!1&&de.debug(20,c)}),s},e.prototype.getObservableQueries=function(t){return t===void 0&&(t="active"),this.queryManager.getObservableQueries(t)},e.prototype.extract=function(t){return this.cache.extract(t)},e.prototype.restore=function(t){return this.cache.restore(t)},e.prototype.addResolvers=function(t){this.localState.addResolvers(t)},e.prototype.setResolvers=function(t){this.localState.setResolvers(t)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(t){this.localState.setFragmentMatcher(t)},e.prototype.setLink=function(t){this.link=this.queryManager.link=t},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e})();globalThis.__DEV__!==!1&&(eR.prototype.getMemoryInternals=Qj);var Cv={exports:{}},tR;function nV(){return tR||(tR=1,(function(e){e.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,e.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,e.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(e.exports,Rd())})(Cv)),Cv.exports}var Tt=nV();const nR=We({__proto__:null,default:py(Tt)},[Tt]);var rR=ky?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function Av(){de("createContext"in nR,69);var e=Tt.createContext[rR];return e||(Object.defineProperty(Tt.createContext,rR,{value:e=Tt.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}var rV=function(e){var t=e.client,n=e.children,r=Av(),a=Tt.useContext(r),s=Tt.useMemo(function(){return B(B({},a),{client:t||a.client})},[a,t]);return de(s.client,71),Tt.createElement(r.Provider,{value:s},n)};function Ov(e){var t=Tt.useContext(Av()),n=e||t.client;return de(!!n,79),n}var iR=!1,iV="useSyncExternalStore",aV=nR[iV],oV=aV||(function(e,t,n){var r=t();globalThis.__DEV__!==!1&&!iR&&r!==t()&&(iR=!0,globalThis.__DEV__!==!1&&de.error(92));var a=Tt.useState({inst:{value:r,getSnapshot:t}}),s=a[0].inst,c=a[1];return zj?Tt.useLayoutEffect(function(){Object.assign(s,{value:r,getSnapshot:t}),Rv(s)&&c({inst:s})},[e,r,t]):Object.assign(s,{value:r,getSnapshot:t}),Tt.useEffect(function(){return Rv(s)&&c({inst:s}),e(function(){Rv(s)&&c({inst:s})})},[e]),r});function Rv(e){var t=e.value,n=e.getSnapshot;try{return t!==n()}catch(r){return!0}}var li;(function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"})(li||(li={}));var Mo;function aR(e){var t;switch(e){case li.Query:t="Query";break;case li.Mutation:t="Mutation";break;case li.Subscription:t="Subscription";break}return t}function oR(e){Aa("parser",function(){globalThis.__DEV__!==!1&&de.warn(94)}),Mo||(Mo=new zy(ui.parser||1e3));var t=Mo.get(e);if(t)return t;var n,r,a;de(!!e&&!!e.kind,95,e);for(var s=[],c=[],f=[],d=[],h=0,g=e.definitions;h0?new ci({graphQLErrors:M}):void 0,D=h.onError||((O=c.current.options)===null||O===void 0?void 0:O.onError);if(L&&D&&D(L,w),E===c.current.mutationId&&!w.ignoreResults){var G={called:!0,loading:!1,data:I,error:L,client:S};c.current.isMounted&&!pt(c.current.result,G)&&s(c.current.result=G)}var V=h.onCompleted||((x=c.current.options)===null||x===void 0?void 0:x.onCompleted);return L||V==null||V(T.data,w),T},function(T){var O;if(E===c.current.mutationId&&c.current.isMounted){var x={loading:!1,error:T,data:void 0,called:!0,client:S};pt(c.current.result,x)||s(c.current.result=x)}var I=h.onError||((O=c.current.options)===null||O===void 0?void 0:O.onError);if(I)return I(T,w),{data:void 0,errors:T};throw T})},[]),d=Tt.useCallback(function(){if(c.current.isMounted){var h={called:!1,loading:!1,client:c.current.client};Object.assign(c.current,{mutationId:0,result:h}),s(h)}},[]);return Tt.useEffect(function(){var h=c.current;return h.isMounted=!0,function(){h.isMounted=!1}},[]),[f,B({reset:d},a)]}var xv={exports:{}},Jc={},Iv={exports:{}},kv={};/** * @license React * scheduler.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var gR;function TV(){return gR||(gR=1,(function(e){function t(H,P){var oe=H.length;H.push(P);e:for(;0>>1,fe=H[re];if(0>>1;rea(ue,oe))sea(Te,ue)?(H[re]=Te,H[se]=oe,re=se):(H[re]=ue,H[q]=oe,re=q);else if(sea(Te,oe))H[re]=Te,H[se]=oe,re=se;else break e}}return P}function a(H,P){var oe=H.sortIndex-P.sortIndex;return oe!==0?oe:H.id-P.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],h=[],g=1,m=null,v=3,_=!1,S=!1,E=!1,w=!1,T=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate!="undefined"?setImmediate:null;function I(H){for(var P=n(h);P!==null;){if(P.callback===null)r(h);else if(P.startTime<=H)r(h),P.sortIndex=P.expirationTime,t(d,P);else break;P=n(h)}}function M(H){if(E=!1,I(H),!S)if(n(d)!==null)S=!0,L||(L=!0,te());else{var P=n(h);P!==null&&ce(M,P.startTime-H)}}var L=!1,D=-1,G=5,V=-1;function ae(){return w?!0:!(e.unstable_now()-VH&&ae());){var re=m.callback;if(typeof re=="function"){m.callback=null,v=m.priorityLevel;var fe=re(m.expirationTime<=H);if(H=e.unstable_now(),typeof fe=="function"){m.callback=fe,I(H),P=!0;break t}m===n(d)&&r(d),I(H)}else r(d);m=n(d)}if(m!==null)P=!0;else{var k=n(h);k!==null&&ce(M,k.startTime-H),P=!1}}break e}finally{m=null,v=oe,_=!1}P=void 0}}finally{P?te():L=!1}}}var te;if(typeof x=="function")te=function(){x(he)};else if(typeof MessageChannel!="undefined"){var X=new MessageChannel,pe=X.port2;X.port1.onmessage=he,te=function(){pe.postMessage(null)}}else te=function(){T(he,0)};function ce(H,P){D=T(function(){H(e.unstable_now())},P)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125re?(H.sortIndex=oe,t(h,H),n(d)===null&&H===n(h)&&(E?(O(D),D=-1):E=!0,ce(M,oe-re))):(H.sortIndex=fe,t(d,H),S||_||(S=!0,L||(L=!0,te()))),H},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(H){var P=v;return function(){var oe=v;v=P;try{return H.apply(this,arguments)}finally{v=oe}}}})(kv)),kv}var yR;function wV(){return yR||(yR=1,Iv.exports=TV()),Iv.exports}var Dv={exports:{}},zn={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var vR;function CV(){if(vR)return zn;vR=1;var e=Rd();function t(d){var h="https://react.dev/errors/"+d;if(1fe||(i.current=re[fe],re[fe]=null,fe--)}function ue(i,o){fe++,re[fe]=i.current,i.current=o}var se=k(null),Te=k(null),Oe=k(null),Re=k(null);function nt(i,o){switch(ue(Oe,o),ue(Te,i),ue(se,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?$k(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=$k(o),i=Vk(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}q(se),ue(se,i)}function Ye(){q(se),q(Te),q(Oe)}function dn(i){i.memoizedState!==null&&ue(Re,i);var o=se.current,u=Vk(o,i.type);o!==u&&(ue(Te,i),ue(se,u))}function Gn(i){Te.current===i&&(q(se),q(Te)),Re.current===i&&(q(Re),Vl._currentValue=oe)}var Tr,wr;function hn(i){if(Tr===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);Tr=o&&o[1]||"",wr=-1)":-1p||N[l]!==$[p]){var K=` `+N[l].replace(" at new "," at ");return i.displayName&&K.includes("")&&(K=K.replace("",i.displayName)),K}while(1<=l&&0<=p);break}}}finally{Fe=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?hn(u):""}function $e(i,o){switch(i.tag){case 26:case 27:case 5:return hn(i.type);case 16:return hn("Lazy");case 13:return i.child!==o&&o!==null?hn("Suspense Fallback"):hn("Suspense");case 19:return hn("SuspenseList");case 0:case 15:return bt(i.type,!1);case 11:return bt(i.type.render,!1);case 1:return bt(i.type,!0);case 31:return hn("Activity");default:return""}}function st(i){try{var o="",u=null;do o+=$e(i,u),u=i,i=i.return;while(i);return o}catch(l){return` Error generating stack: `+l.message+` `+l.stack}}var Xe=Object.prototype.hasOwnProperty,ge=e.unstable_scheduleCallback,ct=e.unstable_cancelCallback,Le=e.unstable_shouldYield,En=e.unstable_requestPaint,At=e.unstable_now,lt=e.unstable_getCurrentPriorityLevel,Bi=e.unstable_ImmediatePriority,bh=e.unstable_UserBlockingPriority,xo=e.unstable_NormalPriority,Sh=e.unstable_LowPriority,Zr=e.unstable_IdlePriority,Eh=e.log,R=e.unstable_setDisableYieldValue,U=null,Z=null;function J(i){if(typeof Eh=="function"&&R(i),Z&&typeof Z.setStrictMode=="function")try{Z.setStrictMode(U,i)}catch(o){}}var le=Math.clz32?Math.clz32:ft,Ce=Math.log,xe=Math.LN2;function ft(i){return i>>>=0,i===0?32:31-(Ce(i)/xe|0)|0}var ut=256,Nt=262144,Lt=4194304;function Yt(i){var o=i&42;if(o!==0)return o;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Hn(i,o,u){var l=i.pendingLanes;if(l===0)return 0;var p=0,y=i.suspendedLanes,b=i.pingedLanes;i=i.warmLanes;var C=l&134217727;return C!==0?(l=C&~y,l!==0?p=Yt(l):(b&=C,b!==0?p=Yt(b):u||(u=C&~i,u!==0&&(p=Yt(u))))):(C=l&~y,C!==0?p=Yt(C):b!==0?p=Yt(b):u||(u=l&~i,u!==0&&(p=Yt(u)))),p===0?0:o!==0&&o!==p&&(o&y)===0&&(y=p&-p,u=o&-o,y>=u||y===32&&(u&4194048)!==0)?o:p}function Cr(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function n_(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function CM(){var i=Lt;return Lt<<=1,(Lt&62914560)===0&&(Lt=4194304),i}function r_(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function al(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function A2(i,o,u,l,p,y){var b=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var C=i.entanglements,N=i.expirationTimes,$=i.hiddenUpdates;for(u=b&~u;0=dl),KM=" ",JM=!1;function ZM(i,o){switch(i){case"keyup":return oW.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ex(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var bu=!1;function uW(i,o){switch(i){case"compositionend":return ex(o);case"keypress":return o.which!==32?null:(JM=!0,KM);case"textInput":return i=o.data,i===KM&&JM?null:i;default:return null}}function cW(i,o){if(bu)return i==="compositionend"||!S_&&ZM(i,o)?(i=VM(),Oh=g_=Da=null,bu=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1=o)return{node:u,offset:o-i};i=l}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=ux(u)}}function lx(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?lx(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function fx(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=Ch(i.document);o instanceof i.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch(l){u=!1}if(u)i=o.contentWindow;else break;o=Ch(i.document)}return o}function w_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}var yW=Pi&&"documentMode"in document&&11>=document.documentMode,Su=null,C_=null,gl=null,A_=!1;function dx(i,o,u){var l=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;A_||Su==null||Su!==Ch(l)||(l=Su,"selectionStart"in l&&w_(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),gl&&ml(gl,l)||(gl=l,l=bp(C_,"onSelect"),0>=b,p-=b,mi=1<<32-le(o)+p|u<qe?(it=we,we=null):it=we.sibling;var ht=Q(F,we,j[qe],ne);if(ht===null){we===null&&(we=it);break}i&&we&&ht.alternate===null&&o(F,we),z=y(ht,z,qe),dt===null?Ae=ht:dt.sibling=ht,dt=ht,we=it}if(qe===j.length)return u(F,we),at&&qi(F,qe),Ae;if(we===null){for(;qeqe?(it=we,we=null):it=we.sibling;var to=Q(F,we,ht.value,ne);if(to===null){we===null&&(we=it);break}i&&we&&to.alternate===null&&o(F,we),z=y(to,z,qe),dt===null?Ae=to:dt.sibling=to,dt=to,we=it}if(ht.done)return u(F,we),at&&qi(F,qe),Ae;if(we===null){for(;!ht.done;qe++,ht=j.next())ht=ie(F,ht.value,ne),ht!==null&&(z=y(ht,z,qe),dt===null?Ae=ht:dt.sibling=ht,dt=ht);return at&&qi(F,qe),Ae}for(we=l(we);!ht.done;qe++,ht=j.next())ht=W(we,F,qe,ht.value,ne),ht!==null&&(i&&ht.alternate!==null&&we.delete(ht.key===null?qe:ht.key),z=y(ht,z,qe),dt===null?Ae=ht:dt.sibling=ht,dt=ht);return i&&we.forEach(function(UY){return o(F,UY)}),at&&qi(F,qe),Ae}function Mt(F,z,j,ne){if(typeof j=="object"&&j!==null&&j.type===E&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case _:e:{for(var Ae=j.key;z!==null;){if(z.key===Ae){if(Ae=j.type,Ae===E){if(z.tag===7){u(F,z.sibling),ne=p(z,j.props.children),ne.return=F,F=ne;break e}}else if(z.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===G&&Po(Ae)===z.type){u(F,z.sibling),ne=p(z,j.props),El(ne,j),ne.return=F,F=ne;break e}u(F,z);break}else o(F,z);z=z.sibling}j.type===E?(ne=zo(j.props.children,F.mode,ne,j.key),ne.return=F,F=ne):(ne=Uh(j.type,j.key,j.props,null,F.mode,ne),El(ne,j),ne.return=F,F=ne)}return b(F);case S:e:{for(Ae=j.key;z!==null;){if(z.key===Ae)if(z.tag===4&&z.stateNode.containerInfo===j.containerInfo&&z.stateNode.implementation===j.implementation){u(F,z.sibling),ne=p(z,j.children||[]),ne.return=F,F=ne;break e}else{u(F,z);break}else o(F,z);z=z.sibling}ne=D_(j,F.mode,ne),ne.return=F,F=ne}return b(F);case G:return j=Po(j),Mt(F,z,j,ne)}if(ce(j))return ve(F,z,j,ne);if(te(j)){if(Ae=te(j),typeof Ae!="function")throw Error(r(150));return j=Ae.call(j),Ie(F,z,j,ne)}if(typeof j.then=="function")return Mt(F,z,$h(j),ne);if(j.$$typeof===x)return Mt(F,z,Fh(F,j),ne);Vh(F,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,z!==null&&z.tag===6?(u(F,z.sibling),ne=p(z,j),ne.return=F,F=ne):(u(F,z),ne=k_(j,F.mode,ne),ne.return=F,F=ne),b(F)):u(F,z)}return function(F,z,j,ne){try{Sl=0;var Ae=Mt(F,z,j,ne);return ku=null,Ae}catch(we){if(we===Iu||we===jh)throw we;var dt=lr(29,we,null,F.mode);return dt.lanes=ne,dt.return=F,dt}finally{}}}var qo=Lx(!0),zx=Lx(!1),Ba=!1;function V_(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function G_(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Ha(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Fa(i,o,u){var l=i.updateQueue;if(l===null)return null;if(l=l.shared,(yt&2)!==0){var p=l.pending;return p===null?o.next=o:(o.next=p.next,p.next=o),l.pending=o,o=zh(i),_x(i,null,u),o}return Lh(i,l,o,u),zh(i)}function Tl(i,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var l=o.lanes;l&=i.pendingLanes,u|=l,o.lanes=u,OM(i,u)}}function Q_(i,o){var u=i.updateQueue,l=i.alternate;if(l!==null&&(l=l.updateQueue,u===l)){var p=null,y=null;if(u=u.firstBaseUpdate,u!==null){do{var b={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};y===null?p=y=b:y=y.next=b,u=u.next}while(u!==null);y===null?p=y=o:y=y.next=o}else p=y=o;u={baseState:l.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:l.shared,callbacks:l.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=o:i.next=o,u.lastBaseUpdate=o}var W_=!1;function wl(){if(W_){var i=xu;if(i!==null)throw i}}function Cl(i,o,u,l){W_=!1;var p=i.updateQueue;Ba=!1;var y=p.firstBaseUpdate,b=p.lastBaseUpdate,C=p.shared.pending;if(C!==null){p.shared.pending=null;var N=C,$=N.next;N.next=null,b===null?y=$:b.next=$,b=N;var K=i.alternate;K!==null&&(K=K.updateQueue,C=K.lastBaseUpdate,C!==b&&(C===null?K.firstBaseUpdate=$:C.next=$,K.lastBaseUpdate=N))}if(y!==null){var ie=p.baseState;b=0,K=$=N=null,C=y;do{var Q=C.lane&-536870913,W=Q!==C.lane;if(W?(rt&Q)===Q:(l&Q)===Q){Q!==0&&Q===Mu&&(W_=!0),K!==null&&(K=K.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{var ve=i,Ie=C;Q=o;var Mt=u;switch(Ie.tag){case 1:if(ve=Ie.payload,typeof ve=="function"){ie=ve.call(Mt,ie,Q);break e}ie=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Ie.payload,Q=typeof ve=="function"?ve.call(Mt,ie,Q):ve,Q==null)break e;ie=m({},ie,Q);break e;case 2:Ba=!0}}Q=C.callback,Q!==null&&(i.flags|=64,W&&(i.flags|=8192),W=p.callbacks,W===null?p.callbacks=[Q]:W.push(Q))}else W={lane:Q,tag:C.tag,payload:C.payload,callback:C.callback,next:null},K===null?($=K=W,N=ie):K=K.next=W,b|=Q;if(C=C.next,C===null){if(C=p.shared.pending,C===null)break;W=C,C=W.next,W.next=null,p.lastBaseUpdate=W,p.shared.pending=null}}while(!0);K===null&&(N=ie),p.baseState=N,p.firstBaseUpdate=$,p.lastBaseUpdate=K,y===null&&(p.shared.lanes=0),Va|=b,i.lanes=b,i.memoizedState=ie}}function Ux(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function Bx(i,o){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;iy?y:8;var b=H.T,C={};H.T=C,hb(i,!1,o,u);try{var N=p(),$=H.S;if($!==null&&$(C,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var K=AW(N,l);Rl(i,o,K,mr(i))}else Rl(i,o,l,mr(i))}catch(ie){Rl(i,o,{then:function(){},status:"rejected",reason:ie},mr())}finally{P.p=y,b!==null&&C.types!==null&&(b.types=C.types),H.T=b}}function kW(){}function fb(i,o,u,l){if(i.tag!==5)throw Error(r(476));var p=gI(i).queue;mI(i,p,o,oe,u===null?kW:function(){return yI(i),u(l)})}function gI(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qi,lastRenderedState:oe},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qi,lastRenderedState:u},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function yI(i){var o=gI(i);o.next===null&&(o=i.alternate.memoizedState),Rl(i,o.next.queue,{},mr())}function db(){return kn(Vl)}function vI(){return un().memoizedState}function _I(){return un().memoizedState}function DW(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var u=mr();i=Ha(u);var l=Fa(o,i,u);l!==null&&(ir(l,o,u),Tl(l,o,u)),o={cache:P_()},i.payload=o;return}o=o.return}}function NW(i,o,u){var l=mr();u={lane:l,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},tp(i)?SI(o,u):(u=x_(i,o,u,l),u!==null&&(ir(u,i,l),EI(u,o,l)))}function bI(i,o,u){var l=mr();Rl(i,o,u,l)}function Rl(i,o,u,l){var p={lane:l,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(tp(i))SI(o,p);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=o.lastRenderedReducer,y!==null))try{var b=o.lastRenderedState,C=y(b,u);if(p.hasEagerState=!0,p.eagerState=C,cr(C,b))return Lh(i,o,p,0),zt===null&&Nh(),!1}catch(N){}finally{}if(u=x_(i,o,p,l),u!==null)return ir(u,i,l),EI(u,o,l),!0}return!1}function hb(i,o,u,l){if(l={lane:2,revertLane:Vb(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},tp(i)){if(o)throw Error(r(479))}else o=x_(i,u,l,2),o!==null&&ir(o,i,2)}function tp(i){var o=i.alternate;return i===Pe||o!==null&&o===Pe}function SI(i,o){Nu=Wh=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function EI(i,o,u){if((u&4194048)!==0){var l=o.lanes;l&=i.pendingLanes,u|=l,o.lanes=u,OM(i,u)}}var Ml={readContext:kn,use:Kh,useCallback:tn,useContext:tn,useEffect:tn,useImperativeHandle:tn,useLayoutEffect:tn,useInsertionEffect:tn,useMemo:tn,useReducer:tn,useRef:tn,useState:tn,useDebugValue:tn,useDeferredValue:tn,useTransition:tn,useSyncExternalStore:tn,useId:tn,useHostTransitionStatus:tn,useFormState:tn,useActionState:tn,useOptimistic:tn,useMemoCache:tn,useCacheRefresh:tn};Ml.useEffectEvent=tn;var TI={readContext:kn,use:Kh,useCallback:function(i,o){return Qn().memoizedState=[i,o===void 0?null:o],i},useContext:kn,useEffect:oI,useImperativeHandle:function(i,o,u){u=u!=null?u.concat([i]):null,Zh(4194308,4,lI.bind(null,o,i),u)},useLayoutEffect:function(i,o){return Zh(4194308,4,i,o)},useInsertionEffect:function(i,o){Zh(4,2,i,o)},useMemo:function(i,o){var u=Qn();o=o===void 0?null:o;var l=i();if($o){J(!0);try{i()}finally{J(!1)}}return u.memoizedState=[l,o],l},useReducer:function(i,o,u){var l=Qn();if(u!==void 0){var p=u(o);if($o){J(!0);try{u(o)}finally{J(!1)}}}else p=o;return l.memoizedState=l.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},l.queue=i,i=i.dispatch=NW.bind(null,Pe,i),[l.memoizedState,i]},useRef:function(i){var o=Qn();return i={current:i},o.memoizedState=i},useState:function(i){i=ob(i);var o=i.queue,u=bI.bind(null,Pe,o);return o.dispatch=u,[i.memoizedState,u]},useDebugValue:cb,useDeferredValue:function(i,o){var u=Qn();return lb(u,i,o)},useTransition:function(){var i=ob(!1);return i=mI.bind(null,Pe,i.queue,!0,!1),Qn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,u){var l=Pe,p=Qn();if(at){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),zt===null)throw Error(r(349));(rt&127)!==0||$x(l,o,u)}p.memoizedState=u;var y={value:u,getSnapshot:o};return p.queue=y,oI(Gx.bind(null,l,y,i),[i]),l.flags|=2048,zu(9,{destroy:void 0},Vx.bind(null,l,y,u,o),null),u},useId:function(){var i=Qn(),o=zt.identifierPrefix;if(at){var u=gi,l=mi;u=(l&~(1<<32-le(l)-1)).toString(32)+u,o="_"+o+"R_"+u,u=Yh++,0<\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?y.multiple=!0:l.size&&(y.size=l.size);break;default:y=typeof l.is=="string"?b.createElement(p,{is:l.is}):b.createElement(p)}}y[xn]=o,y[Jn]=l;e:for(b=o.child;b!==null;){if(b.tag===5||b.tag===6)y.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===o)break e;for(;b.sibling===null;){if(b.return===null||b.return===o)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}o.stateNode=y;e:switch(Nn(y,p,l),p){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Yi(o)}}return $t(o),Ob(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,u),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==l&&Yi(o);else{if(typeof l!="string"&&o.stateNode===null)throw Error(r(166));if(i=Oe.current,Ou(o)){if(i=o.stateNode,u=o.memoizedProps,l=null,p=In,p!==null)switch(p.tag){case 27:case 5:l=p.memoizedProps}i[xn]=o,i=!!(i.nodeValue===u||l!==null&&l.suppressHydrationWarning===!0||jk(i.nodeValue,u)),i||za(o,!0)}else i=Sp(i).createTextNode(l),i[xn]=o,o.stateNode=i}return $t(o),null;case 31:if(u=o.memoizedState,i===null||i.memoizedState!==null){if(l=Ou(o),u!==null){if(i===null){if(!l)throw Error(r(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[xn]=o}else Uo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;$t(o),i=!1}else u=U_(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return o.flags&256?(dr(o),o):(dr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return $t(o),null;case 13:if(l=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(p=Ou(o),l!==null&&l.dehydrated!==null){if(i===null){if(!p)throw Error(r(318));if(p=o.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[xn]=o}else Uo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;$t(o),p=!1}else p=U_(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),p=!0;if(!p)return o.flags&256?(dr(o),o):(dr(o),null)}return dr(o),(o.flags&128)!==0?(o.lanes=u,o):(u=l!==null,i=i!==null&&i.memoizedState!==null,u&&(l=o.child,p=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(p=l.alternate.memoizedState.cachePool.pool),y=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(y=l.memoizedState.cachePool.pool),y!==p&&(l.flags|=2048)),u!==i&&u&&(o.child.flags|=8192),op(o,o.updateQueue),$t(o),null);case 4:return Ye(),i===null&&Yb(o.stateNode.containerInfo),$t(o),null;case 10:return Vi(o.type),$t(o),null;case 19:if(q(sn),l=o.memoizedState,l===null)return $t(o),null;if(p=(o.flags&128)!==0,y=l.rendering,y===null)if(p)Il(l,!1);else{if(nn!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(y=Qh(i),y!==null){for(o.flags|=128,Il(l,!1),i=y.updateQueue,o.updateQueue=i,op(o,i),o.subtreeFlags=0,i=u,u=o.child;u!==null;)bx(u,i),u=u.sibling;return ue(sn,sn.current&1|2),at&&qi(o,l.treeForkCount),o.child}i=i.sibling}l.tail!==null&&At()>fp&&(o.flags|=128,p=!0,Il(l,!1),o.lanes=4194304)}else{if(!p)if(i=Qh(y),i!==null){if(o.flags|=128,p=!0,i=i.updateQueue,o.updateQueue=i,op(o,i),Il(l,!0),l.tail===null&&l.tailMode==="hidden"&&!y.alternate&&!at)return $t(o),null}else 2*At()-l.renderingStartTime>fp&&u!==536870912&&(o.flags|=128,p=!0,Il(l,!1),o.lanes=4194304);l.isBackwards?(y.sibling=o.child,o.child=y):(i=l.last,i!==null?i.sibling=y:o.child=y,l.last=y)}return l.tail!==null?(i=l.tail,l.rendering=i,l.tail=i.sibling,l.renderingStartTime=At(),i.sibling=null,u=sn.current,ue(sn,p?u&1|2:u&1),at&&qi(o,l.treeForkCount),i):($t(o),null);case 22:case 23:return dr(o),X_(),l=o.memoizedState!==null,i!==null?i.memoizedState!==null!==l&&(o.flags|=8192):l&&(o.flags|=8192),l?(u&536870912)!==0&&(o.flags&128)===0&&($t(o),o.subtreeFlags&6&&(o.flags|=8192)):$t(o),u=o.updateQueue,u!==null&&op(o,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),l=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(l=o.memoizedState.cachePool.pool),l!==u&&(o.flags|=2048),i!==null&&q(Fo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),Vi(pn),$t(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function HW(i,o){switch(L_(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Vi(pn),Ye(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return Gn(o),null;case 31:if(o.memoizedState!==null){if(dr(o),o.alternate===null)throw Error(r(340));Uo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(dr(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Uo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return q(sn),null;case 4:return Ye(),null;case 10:return Vi(o.type),null;case 22:case 23:return dr(o),X_(),i!==null&&q(Fo),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return Vi(pn),null;case 25:return null;default:return null}}function QI(i,o){switch(L_(o),o.tag){case 3:Vi(pn),Ye();break;case 26:case 27:case 5:Gn(o);break;case 4:Ye();break;case 31:o.memoizedState!==null&&dr(o);break;case 13:dr(o);break;case 19:q(sn);break;case 10:Vi(o.type);break;case 22:case 23:dr(o),X_(),i!==null&&q(Fo);break;case 24:Vi(pn)}}function kl(i,o){try{var u=o.updateQueue,l=u!==null?u.lastEffect:null;if(l!==null){var p=l.next;u=p;do{if((u.tag&i)===i){l=void 0;var y=u.create,b=u.inst;l=y(),b.destroy=l}u=u.next}while(u!==p)}}catch(C){Et(o,o.return,C)}}function qa(i,o,u){try{var l=o.updateQueue,p=l!==null?l.lastEffect:null;if(p!==null){var y=p.next;l=y;do{if((l.tag&i)===i){var b=l.inst,C=b.destroy;if(C!==void 0){b.destroy=void 0,p=o;var N=u,$=C;try{$()}catch(K){Et(p,N,K)}}}l=l.next}while(l!==y)}}catch(K){Et(o,o.return,K)}}function WI(i){var o=i.updateQueue;if(o!==null){var u=i.stateNode;try{Bx(o,u)}catch(l){Et(i,i.return,l)}}}function YI(i,o,u){u.props=Vo(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(l){Et(i,o,l)}}function Dl(i,o){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var l=i.stateNode;break;case 30:l=i.stateNode;break;default:l=i.stateNode}typeof u=="function"?i.refCleanup=u(l):u.current=l}}catch(p){Et(i,o,p)}}function yi(i,o){var u=i.ref,l=i.refCleanup;if(u!==null)if(typeof l=="function")try{l()}catch(p){Et(i,o,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(p){Et(i,o,p)}else u.current=null}function XI(i){var o=i.type,u=i.memoizedProps,l=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&l.focus();break e;case"img":u.src?l.src=u.src:u.srcSet&&(l.srcset=u.srcSet)}}catch(p){Et(i,i.return,p)}}function Rb(i,o,u){try{var l=i.stateNode;sY(l,i.type,u,o),l[Jn]=o}catch(p){Et(i,i.return,p)}}function KI(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Xa(i.type)||i.tag===4}function Mb(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||KI(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Xa(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function xb(i,o,u){var l=i.tag;if(l===5||l===6)i=i.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(i),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Fi));else if(l!==4&&(l===27&&Xa(i.type)&&(u=i.stateNode,o=null),i=i.child,i!==null))for(xb(i,o,u),i=i.sibling;i!==null;)xb(i,o,u),i=i.sibling}function sp(i,o,u){var l=i.tag;if(l===5||l===6)i=i.stateNode,o?u.insertBefore(i,o):u.appendChild(i);else if(l!==4&&(l===27&&Xa(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(sp(i,o,u),i=i.sibling;i!==null;)sp(i,o,u),i=i.sibling}function JI(i){var o=i.stateNode,u=i.memoizedProps;try{for(var l=i.type,p=o.attributes;p.length;)o.removeAttributeNode(p[0]);Nn(o,l,u),o[xn]=i,o[Jn]=u}catch(y){Et(i,i.return,y)}}var Xi=!1,yn=!1,Ib=!1,ZI=typeof WeakSet=="function"?WeakSet:Set,wn=null;function FW(i,o){if(i=i.containerInfo,Jb=Rp,i=fx(i),w_(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var l=u.getSelection&&u.getSelection();if(l&&l.rangeCount!==0){u=l.anchorNode;var p=l.anchorOffset,y=l.focusNode;l=l.focusOffset;try{u.nodeType,y.nodeType}catch(Ie){u=null;break e}var b=0,C=-1,N=-1,$=0,K=0,ie=i,Q=null;t:for(;;){for(var W;ie!==u||p!==0&&ie.nodeType!==3||(C=b+p),ie!==y||l!==0&&ie.nodeType!==3||(N=b+l),ie.nodeType===3&&(b+=ie.nodeValue.length),(W=ie.firstChild)!==null;)Q=ie,ie=W;for(;;){if(ie===i)break t;if(Q===u&&++$===p&&(C=b),Q===y&&++K===l&&(N=b),(W=ie.nextSibling)!==null)break;ie=Q,Q=ie.parentNode}ie=W}u=C===-1||N===-1?null:{start:C,end:N}}else u=null}u=u||{start:0,end:0}}else u=null;for(Zb={focusedElem:i,selectionRange:u},Rp=!1,wn=o;wn!==null;)if(o=wn,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,wn=i;else for(;wn!==null;){switch(o=wn,y=o.alternate,i=o.flags,o.tag){case 0:if((i&4)!==0&&(i=o.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u title"))),Nn(y,l,u),y[xn]=i,Tn(y),l=y;break e;case"link":var b=aD("link","href",p).get(l+(u.href||""));if(b){for(var C=0;CMt&&(b=Mt,Mt=Ie,Ie=b);var F=cx(C,Ie),z=cx(C,Mt);if(F&&z&&(W.rangeCount!==1||W.anchorNode!==F.node||W.anchorOffset!==F.offset||W.focusNode!==z.node||W.focusOffset!==z.offset)){var j=ie.createRange();j.setStart(F.node,F.offset),W.removeAllRanges(),Ie>Mt?(W.addRange(j),W.extend(z.node,z.offset)):(j.setEnd(z.node,z.offset),W.addRange(j))}}}}for(ie=[],W=C;W=W.parentNode;)W.nodeType===1&&ie.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;Cu?32:u,H.T=null,u=Bb,Bb=null;var y=Qa,b=ta;if(vn=0,Pu=Qa=null,ta=0,(yt&6)!==0)throw Error(r(331));var C=yt;if(yt|=4,lk(y.current),sk(y,y.current,b,u),yt=C,Hl(0,!1),Z&&typeof Z.onPostCommitFiberRoot=="function")try{Z.onPostCommitFiberRoot(U,y)}catch(N){}return!0}finally{P.p=p,H.T=l,Rk(i,o)}}function xk(i,o,u){o=Mr(u,o),o=yb(i.stateNode,o,2),i=Fa(i,o,2),i!==null&&(al(i,2),vi(i))}function Et(i,o,u){if(i.tag===3)xk(i,i,u);else for(;o!==null;){if(o.tag===3){xk(o,i,u);break}else if(o.tag===1){var l=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ga===null||!Ga.has(l))){i=Mr(u,i),u=II(2),l=Fa(o,u,2),l!==null&&(kI(u,l,o,i),al(l,2),vi(l));break}}o=o.return}}function jb(i,o,u){var l=i.pingCache;if(l===null){l=i.pingCache=new qW;var p=new Set;l.set(o,p)}else p=l.get(o),p===void 0&&(p=new Set,l.set(o,p));p.has(u)||(Nb=!0,p.add(u),i=WW.bind(null,i,o,u),o.then(i,i))}function WW(i,o,u){var l=i.pingCache;l!==null&&l.delete(o),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,zt===i&&(rt&u)===u&&(nn===4||nn===3&&(rt&62914560)===rt&&300>At()-lp?(yt&2)===0&&ju(i,0):Lb|=u,Fu===rt&&(Fu=0)),vi(i)}function Ik(i,o){o===0&&(o=CM()),i=Lo(i,o),i!==null&&(al(i,o),vi(i))}function YW(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),Ik(i,u)}function XW(i,o){var u=0;switch(i.tag){case 31:case 13:var l=i.stateNode,p=i.memoizedState;p!==null&&(u=p.retryLane);break;case 19:l=i.stateNode;break;case 22:l=i.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(o),Ik(i,u)}function KW(i,o){return ge(i,o)}var yp=null,$u=null,qb=!1,vp=!1,$b=!1,Ya=0;function vi(i){i!==$u&&i.next===null&&($u===null?yp=$u=i:$u=$u.next=i),vp=!0,qb||(qb=!0,ZW())}function Hl(i,o){if(!$b&&vp){$b=!0;do for(var u=!1,l=yp;l!==null;){if(i!==0){var p=l.pendingLanes;if(p===0)var y=0;else{var b=l.suspendedLanes,C=l.pingedLanes;y=(1<<31-le(42|i)+1)-1,y&=p&~(b&~C),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(u=!0,Lk(l,y))}else y=rt,y=Hn(l,l===zt?y:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(y&3)===0||Cr(l,y)||(u=!0,Lk(l,y));l=l.next}while(u);$b=!1}}function JW(){kk()}function kk(){vp=qb=!1;var i=0;Ya!==0&&cY()&&(i=Ya);for(var o=At(),u=null,l=yp;l!==null;){var p=l.next,y=Dk(l,o);y===0?(l.next=null,u===null?yp=p:u.next=p,p===null&&($u=u)):(u=l,(i!==0||(y&3)!==0)&&(vp=!0)),l=p}vn!==0&&vn!==5||Hl(i),Ya!==0&&(Ya=0)}function Dk(i,o){for(var u=i.suspendedLanes,l=i.pingedLanes,p=i.expirationTimes,y=i.pendingLanes&-62914561;0C)break;var K=N.transferSize,ie=N.initiatorType;K&&qk(ie)&&(N=N.responseEnd,b+=K*(N title"):null)}function AY(i,o,u){if(u===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return i=o.disabled,typeof o.precedence=="string"&&i==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function sD(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function OY(i,o,u,l){if(u.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var p=Gu(l.href),y=o.querySelector(ql(p));if(y){o=y._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=Cp.bind(i),o.then(i,i)),u.state.loading|=4,u.instance=y,Tn(y);return}y=o.ownerDocument||o,l=rD(l),(p=Lr.get(p))&&o0(l,p),y=y.createElement("link"),Tn(y);var b=y;b._p=new Promise(function(C,N){b.onload=C,b.onerror=N}),Nn(y,"link",l),u.instance=y}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=Cp.bind(i),o.addEventListener("load",u),o.addEventListener("error",u))}}var u0=0;function RY(i,o){return i.stylesheets&&i.count===0&&Op(i,i.stylesheets),0u0?50:800)+o);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(l),clearTimeout(p)}}:null}function Cp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Op(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Ap=null;function Op(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Ap=new Map,o.forEach(MY,i),Ap=null,Cp.call(i))}function MY(i,o){if(!(o.state.loading&4)){var u=Ap.get(i);if(u)var l=u.get(null);else{u=new Map,Ap.set(i,u);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y0?Mn(ou,--Xn):0,au--,fn===10&&(au=1,ah--),fn}function ur(){return fn=Xn2||nl(fn)>3?"":" "}function qV(e,t){for(;--t&&ur()&&!(fn<48||fn>102||fn>57&&fn<65||fn>70&&fn<97););return tl(e,sh()+(t<6&&di()==32&&ur()==32))}function Bv(e){for(;ur();)switch(fn){case e:return Xn;case 34:case 39:e!==34&&e!==39&&Bv(fn);break;case 40:e===41&&Bv(e);break;case 92:ur();break}return Xn}function $V(e,t){for(;ur()&&e+fn!==57;)if(e+fn===84&&di()===47)break;return"/*"+tl(t,Xn-1)+"*"+rh(e===47?e:ur())}function VV(e){for(;!nl(di());)ur();return tl(e,Xn)}function GV(e){return OR(ch("",null,null,null,[""],e=AR(e),0,[0],e))}function ch(e,t,n,r,a,s,c,f,d){for(var h=0,g=0,m=c,v=0,_=0,S=0,E=1,w=1,T=1,O=0,x="",I=a,M=s,L=r,D=x;w;)switch(S=O,O=ur()){case 40:if(S!=108&&Mn(D,m-1)==58){zv(D+=gt(uh(O),"&","&\f"),"&\f")!=-1&&(T=-1);break}case 34:case 39:case 91:D+=uh(O);break;case 9:case 10:case 13:case 32:D+=jV(S);break;case 92:D+=qV(sh()-1,7);continue;case 47:switch(di()){case 42:case 47:ih(QV($V(ur(),sh()),t,n),d);break;default:D+="/"}break;case 123*E:f[h++]=fi(D)*T;case 125*E:case 59:case 0:switch(O){case 0:case 125:w=0;case 59+g:T==-1&&(D=gt(D,/\f/g,"")),_>0&&fi(D)-m&&ih(_>32?MR(D+";",r,n,m-1):MR(gt(D," ","")+";",r,n,m-2),d);break;case 59:D+=";";default:if(ih(L=RR(D,t,n,h,g,a,f,x,I=[],M=[],m),s),O===123)if(g===0)ch(D,t,L,L,I,s,m,f,M);else switch(v===99&&Mn(D,3)===110?100:v){case 100:case 108:case 109:case 115:ch(e,L,L,r&&ih(RR(e,L,L,0,0,a,f,x,a,I=[],m),M),a,M,m,f,r?I:M);break;default:ch(D,L,L,L,[""],M,0,f,M)}}h=g=_=0,E=T=1,x=D="",m=c;break;case 58:m=1+fi(D),_=S;default:if(E<1){if(O==123)--E;else if(O==125&&E++==0&&PV()==125)continue}switch(D+=rh(O),O*E){case 38:T=g>0?1:(D+="\f",-1);break;case 44:f[h++]=(fi(D)-1)*T,T=1;break;case 64:di()===45&&(D+=uh(ur())),v=di(),g=m=fi(x=D+=VV(sh())),O++;break;case 45:S===45&&fi(D)==2&&(E=0)}}return s}function RR(e,t,n,r,a,s,c,f,d,h,g){for(var m=a-1,v=a===0?s:[""],_=Uv(v),S=0,E=0,w=0;S0?v[T]+" "+O:gt(O,/&\f/g,v[T])))&&(d[w++]=x);return oh(e,t,n,a===0?Nv:f,d,h,g)}function QV(e,t,n){return oh(e,t,n,ER,rh(FV()),Zc(e,2,-2),0)}function MR(e,t,n,r){return oh(e,t,n,Lv,Zc(e,0,r),Zc(e,r+1,-1),r)}function su(e,t){for(var n="",r=Uv(e),a=0;a6)switch(Mn(e,t+1)){case 109:if(Mn(e,t+4)!==45)break;case 102:return gt(e,/(.+:)(.+)-([^]+)/,"$1"+mt+"$2-$3$1"+nh+(Mn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~zv(e,"stretch")?IR(gt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Mn(e,t+1)!==115)break;case 6444:switch(Mn(e,fi(e)-3-(~zv(e,"!important")&&10))){case 107:return gt(e,":",":"+mt)+e;case 101:return gt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+mt+(Mn(e,14)===45?"inline-":"")+"box$3$1"+mt+"$2$3$1"+Un+"$2box$3")+e}break;case 5936:switch(Mn(e,t+11)){case 114:return mt+e+Un+gt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return mt+e+Un+gt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return mt+e+Un+gt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return mt+e+Un+e+e}return e}var rG=function(t,n,r,a){if(t.length>-1&&!t.return)switch(t.type){case Lv:t.return=IR(t.value,t.length);break;case TR:return su([el(t,{value:gt(t.value,"@","@"+mt)})],a);case Nv:if(t.length)return HV(t.props,function(s){switch(BV(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return su([el(t,{props:[gt(s,/:(read-\w+)/,":"+nh+"$1")]})],a);case"::placeholder":return su([el(t,{props:[gt(s,/:(plac\w+)/,":"+mt+"input-$1")]}),el(t,{props:[gt(s,/:(plac\w+)/,":"+nh+"$1")]}),el(t,{props:[gt(s,/:(plac\w+)/,Un+"input-$1")]})],a)}return""})}},iG=[rG],aG=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(E){var w=E.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(E),E.setAttribute("data-s",""))})}var a=t.stylisPlugins||iG,s={},c,f=[];c=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(E){for(var w=E.getAttribute("data-emotion").split(" "),T=1;T=4;++r,a-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var sG={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},uG=/[A-Z]|^ms/g,cG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,kR=function(t){return t.charCodeAt(1)===45},DR=function(t){return t!=null&&typeof t!="boolean"},Hv=KV(function(e){return kR(e)?e:e.replace(uG,"-$&").toLowerCase()}),NR=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(cG,function(r,a,s){return xa={name:a,styles:s,next:xa},a})}return sG[t]!==1&&!kR(t)&&typeof n=="number"&&n!==0?n+"px":n};function lh(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var a=n;if(a.anim===1)return xa={name:a.name,styles:a.styles,next:xa},a.name;var s=n;if(s.styles!==void 0){var c=s.next;if(c!==void 0)for(;c!==void 0;)xa={name:c.name,styles:c.styles,next:xa},c=c.next;var f=s.styles+";";return f}return lG(e,t,n)}}var d=n;if(t==null)return d;var h=t[d];return h!==void 0?h:d}function lG(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a{e&&e.forEach(({message:n,locations:r,path:a})=>console.log(`[GraphQL error]: Message: ${n}, Location: ${r}, Path: ${a}`)),t&&console.log(`[Network error]: ${t}`)}),yG=e=>{const t=Jl(),n=new sO({uri:r=>`${t}/nutshell-chat/graphql/${e}?${r.operationName}`,headers:Bp(),fetchOptions:{mode:"cors"},fetch:(r,a)=>fetch(r,a).then(s=>s.status===500?s.text().then(c=>{try{return JSON.parse(c).errors?new Response(c,{status:200,statusText:"OK",headers:s.headers}):s}catch(f){}return s}):s)});return new eR({link:e$([gG,n]),cache:new YO,devtools:{enabled:!0}})},rl=()=>window.innerWidth<=768||/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),jR=()=>/iPhone|iPad|iPod/i.test(navigator.userAgent),Ct={white:"#ffffff",black:"#000000",offWhiteDk:"#ebe8e8",grey:"#4d4540",greyDk:"#211712",greyLt:"#7a7370",greyXlt:"#d4d1cf",greyHover:"#A6A3A1",blue:"#3b9ed7",rose:"#ff2e47",green:"#33c252"},vG=Ct.offWhiteDk,_G=Ct.grey,bG=Ct.greyDk,qR=Ct.rose,SG=Ct.green,EG=Ct.white,Pv=28,TG="360px",wG="480px",CG="410px",AG="600px",OG="480px",RG="640px",MG="410px",xG="640px",$R=800,jv=1920,qv=2560,IG={all:"unset",fontFamily:xD,display:"flex",flexDirection:"column",alignItems:"flex-end",position:"fixed",bottom:"20px",right:"30px",zIndex:"2147483647"},kG={all:"unset",borderRadius:"8px",width:"56px",height:"56px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 4px 8px rgba(0, 0, 0, 0.8)",zIndex:"2147483647",margin:"0 !important"},DG={bottom:"102px",right:"44px"},NG={bottom:"20px",right:"44px"},fh={display:"block",border:"none",position:"fixed",bottom:"80px !important",right:"20px !important",left:"auto !important",top:"auto !important",zIndex:"2147483647",borderRadius:"8px",overflow:"hidden",marginBottom:"auto !important"},LG={bottom:"162px",right:"44px"},zG={bottom:"80px",right:"44px"},$v={opacity:"0",transform:"scale(0)",pointerEvents:"none",visibility:"hidden"},VR={opacity:"1",transform:"scale(1)",pointerEvents:"all",visibility:"visible"},GR={width:"100% !important",height:"100% !important",top:"0",left:"0",right:"0",bottom:"0",borderRadius:"0"};wt({marginTop:0,"&:last-child":{marginBottom:0}}),wt({padding:"0 0 0 24px","& > li":{marginBottom:"16px"}}),wt({color:EG}),wt({color:bG});const Vv=()=>window.innerHeight<$R?TG:window.innerWidthwindow.innerHeight<$R?wG:window.innerWidthwindow.innerHeight<900&&e?.75:window.innerWidth{e.style.setProperty("width",`${Vv()}`,"important"),e.style.setProperty("height",`${QR()}`,"important"),e.style.transform=`scale(${uu(!1)})`},YR=e=>{e.style.setProperty("width","100%","important"),e.style.setProperty("height","100%","important")},XR="nutshell_chat_widget_state",UG="nutshell_chat_widget_active_tab",KR="closed",dh=e=>{try{localStorage.setItem(XR,e),window.dispatchEvent(new CustomEvent("chat_widget_state_change",{detail:{state:e}}))}catch(t){console.error("Failed to save chat state to localStorage:",t)}},Gv=()=>{try{return localStorage.getItem(XR)||KR}catch(e){return console.error("Failed to get chat state from localStorage:",e),KR}},BG=()=>{try{return localStorage.getItem(UG)}catch(e){return console.error("Failed to get active tab from localStorage:",e),null}},HG=()=>{if(document.getElementById("nutshell-chat-widget-styles"))return;const e=document.createElement("style");e.id="nutshell-chat-widget-styles",e.textContent=` #chat-iframe { width: ${Vv()} !important; height: ${QR()} !important; border-radius: 8px !important; overflow: hidden !important; z-index: 2147483647 !important; } @media (max-width: 768px) { #chat-iframe[data-mobile-view="true"] { width: 100% !important; height: 100% !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; border-radius: 0 !important; } body.keyboard-open { position: fixed; width: 100%; height: 100%; overflow: hidden; } body.input-focused #chat-iframe[data-mobile-view="true"] { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; height: var(--keyboard-safe-area, 100%) !important; z-index: 2147483647 !important; } } `,document.head.appendChild(e)},Ia={BOOKING:"BOOKING",CALL:"CALL",CHAT:"CHAT",EMAIL:"EMAIL",QUOTE:"QUOTE",TEXT:"TEXT"},Qv={NUDGE_CLICK:"NUDGE_CLICK",OPEN:"OPEN"};var Wv={exports:{}},il={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var JR;function FG(){if(JR)return il;JR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var c=null;if(s!==void 0&&(c=""+s),a.key!==void 0&&(c=""+a.key),"key"in a){s={};for(var f in a)f!=="key"&&(s[f]=a[f])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:c,ref:a!==void 0?a:null,props:s}}return il.Fragment=t,il.jsx=n,il.jsxs=n,il}var ZR;function PG(){return ZR||(ZR=1,Wv.exports=FG()),Wv.exports}var Se=PG();function hi(e){const{size:t=15}=e;return Se.jsx("span",{className:wt({width:t,height:t,display:"flex","> svg":{width:t,height:t,fill:e.color||"currentColor"}}),children:e.children})}function jG(e){return Se.jsx(hi,ee(A({size:e.size},e),{children:Se.jsx("svg",{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:Se.jsx("path",{d:"M6.503 2.75a.75.75 0 0 0-.75-.75.75.75 0 0 0-.75.75V4h-1c-1.103 0-2 .897-2 2v9c0 1.103.897 2 2 2h4.769l.14-.703c.057-.275.144-.544.263-.797H4.003a.5.5 0 0 1-.5-.5V6c0-.275.225-.5.5-.5h10c.275 0 .5.225.5.5v3.875l.69-.69c.245-.244.52-.444.81-.594V6c0-1.103-.897-2-2-2h-1V2.75a.75.75 0 0 0-.75-.75.75.75 0 0 0-.75.75V4h-5zm-1.5 7c0 .416.335.75.75.75h4.5c.416 0 .75-.334.75-.75a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0-.75.75m.75 2.25a.75.75 0 0 0-.75.75c0 .416.335.75.75.75h2.5c.416 0 .75-.334.75-.75a.75.75 0 0 0-.75-.75zm4.631 4.59-.372 1.863a.457.457 0 0 0 .538.538l1.862-.372a2 2 0 0 0 1.022-.547l3.716-3.716-2.5-2.5-3.716 3.716a2 2 0 0 0-.546 1.022zm8.37-3.843a1.767 1.767 0 1 0-2.5-2.5l-.9.9 2.5 2.5z"})})}))}function qG(e){return Se.jsx(hi,ee(A({size:e.size},e),{children:Se.jsx("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:Se.jsx("path",{d:"M5.4 16.1q.5-1.1-.3-2.3-1-1.5-1.1-3.4C4 7.1 7 4 11.2 4s7.2 3 7.2 6.4c0 3.3-3 6.4-7.2 6.4l-2.3-.3q-.7-.2-1.5 0l-2.6 1zm-3.8-5.7q0 2.8 1.6 4.8L1.7 19l-.1.5a1.3 1.3 0 0 0 1.8 1.2l4.9-2q1.4.5 2.9.5c5.3 0 9.6-4 9.6-8.8s-4.3-8.8-9.6-8.8-9.6 4-9.6 8.8m19.2 18.4q1.5 0 3-.4l4.8 2h.5a1.3 1.3 0 0 0 1.2-1.8l-1.5-3.8q1.5-2 1.6-4.8a9 9 0 0 0-7.2-8.5q-.2 1.2-.6 2.3c3.2.8 5.4 3.4 5.4 6.2q0 2-1.1 3.4-.7 1.2-.3 2.3l.6 1.5-2.6-1q-.7-.3-1.5-.1l-2.3.3c-3.6 0-6.3-2.3-7-5l-2.4.2c.8 4.1 4.7 7.2 9.4 7.2"})})}))}function $G(e){return Se.jsx(hi,ee(A({size:e.size},e),{children:Se.jsx("svg",{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:Se.jsx("path",{d:"M8.366 18.028 11.238 16H15a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H5a3 3 0 0 0-3 3v7a3 3 0 0 0 3 3h1v2.25a.75.75 0 0 0 1.184.613zm2.872-3.528c-.31 0-.613.097-.866.275q-1.342.946-2.872 2.028V15.25a.75.75 0 0 0-.75-.75H5A1.5 1.5 0 0 1 3.5 13V6A1.5 1.5 0 0 1 5 4.5h10A1.5 1.5 0 0 1 16.5 6v7a1.5 1.5 0 0 1-1.5 1.5zm-4.488-7a.75.75 0 0 0-.75.75c0 .416.334.75.75.75h6.5c.416 0 .75-.334.75-.75a.75.75 0 0 0-.75-.75zm0 3a.75.75 0 0 0-.75.75c0 .416.334.75.75.75h3.5c.416 0 .75-.334.75-.75a.75.75 0 0 0-.75-.75z"})})}))}function VG(e){return Se.jsx(hi,ee(A({size:e.size},e),{children:Se.jsx("svg",{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:Se.jsx("path",{d:"M3.919 4a1.92 1.92 0 0 0-1.916 2H2v8c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V6h-.003L18 5.919A1.92 1.92 0 0 0 16.081 4zM16.5 8.01V14c0 .275-.225.5-.5.5H4a.5.5 0 0 1-.5-.5V8.01l4.838 3.668c.98.747 2.34.747 3.325 0zm-13-2.091a.42.42 0 0 1 .419-.419H16.08a.419.419 0 0 1 .253.753l-5.578 4.231a1.256 1.256 0 0 1-1.512 0l-5.578-4.23a.42.42 0 0 1-.166-.335"})})}))}function GG(e){return Se.jsx(hi,ee(A({size:e.size},e),{children:Se.jsx("svg",{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:Se.jsx("path",{d:"M5.525 2.34a1.756 1.756 0 0 1 2.153.938l1.24 2.729a1.76 1.76 0 0 1-.5 2.096l-.755.604a8.9 8.9 0 0 0 3.575 3.712l.662-.831a1.75 1.75 0 0 1 2.097-.5l2.728 1.24c.819.372 1.222 1.3.938 2.154-.647 1.946-2.616 3.63-5.029 3.206-5.428-.956-9.362-4.89-10.318-10.319-.425-2.412 1.262-4.378 3.206-5.028zm.788 1.56A.255.255 0 0 0 6 3.763c-1.412.472-2.472 1.831-2.203 3.344.847 4.806 4.294 8.256 9.1 9.103 1.512.265 2.872-.79 3.344-2.203a.255.255 0 0 0-.138-.313l-2.728-1.244a.255.255 0 0 0-.303.072l-1.047 1.31a.75.75 0 0 1-.906.209 10.38 10.38 0 0 1-5.075-5.256.75.75 0 0 1 .219-.882l1.215-.971a.25.25 0 0 0 .072-.304l-1.24-2.73z"})})}))}function QG(e){return Se.jsx(hi,ee(A({size:e.size},e),{children:Se.jsx("svg",{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:Se.jsx("path",{d:"M9.5 3.5H6c-.275 0-.5.225-.5.5v12c0 .275.225.5.5.5h8c.275 0 .5-.225.5-.5V8.5h-2.75A2.25 2.25 0 0 1 9.5 6.25zM13.878 7 11 4.122V6.25c0 .416.334.75.75.75zM4 4c0-1.103.897-2 2-2h4.172a2 2 0 0 1 1.415.584l3.829 3.832A2 2 0 0 1 16 7.83V16c0 1.103-.897 2-2 2H6c-1.103 0-2-.897-2-2zm2.5 1.25c0-.416.334-.75.75-.75h.5c.416 0 .75.334.75.75S8.166 6 7.75 6h-.5a.75.75 0 0 1-.75-.75m0 2.5c0-.416.334-.75.75-.75h.5c.416 0 .75.334.75.75s-.334.75-.75.75h-.5a.75.75 0 0 1-.75-.75M12 13.5v-2H8v2zm-5.5.25v-2.5c0-.69.56-1.25 1.25-1.25h4.5c.69 0 1.25.56 1.25 1.25v2.5c0 .69-.56 1.25-1.25 1.25h-4.5c-.69 0-1.25-.56-1.25-1.25"})})}))}const hh="chatAction",eM="bookingAction",tM="emailAction",nM="textAction",rM="quoteAction",Yv="callAction",WG={chatAction:{action:hh,label:"Chat",icon:qG,shouldToggle:!0},bookingAction:{action:eM,label:"Book",icon:jG},emailAction:{action:tM,label:"Email",icon:VG},callAction:{action:Yv,label:"Contact",icon:GG},textAction:{action:nM,label:"Text",icon:$G},quoteAction:{action:rM,label:"Quote",icon:QG}},YG=(e,t)=>{switch(t){case hh:return e.chatAction.label;case eM:return e.bookingAction.label;case tM:return e.emailAction.label;case Yv:return e.callAction.label;case nM:return e.textAction.label;case rM:return e.quoteAction.label}},XG=(e,t,n,r,a,s)=>t!=null&&t.length?t.map(f=>{const d=WG[f],h=YG(e,f);return ee(A({},d),{label:h,onClick:()=>{d.action===r?(s&&a(),n(null)):(s||a(),n(d.action))}})}):[],KG={chatAction:Ia.CHAT,bookingAction:Ia.BOOKING,emailAction:Ia.EMAIL,callAction:Ia.CALL,textAction:Ia.TEXT,quoteAction:Ia.QUOTE};function JG(e){var t;return(t=KG[e])!=null?t:null}function ZG(e){return e.sort((t,n)=>t.content.length-n.content.length)}function eQ(e,t,n,r,a,s,c,f,d){return e||t?n:n&&!r&&!a&&!s&&c&&tQ(f,d.map(h=>h.content))}function tQ(e,t){return e&&e.length>0||t&&t.length>0}function nQ(e,t){return!!(e.responseTiming==="never"||e.responseTiming==="offline"&&t)}function rQ(e,t,n){return e==="none"&&!t&&nQ(n,t)}function iM(e){return e.filter(t=>t!==hh)}function iQ(e,t){return e!=="actions"?!1:iM(t).length>0}const aQ={TRACK_PEANUT_CHAT_WIDGET_SEEN:"chat_widget_seen",TRACK_PEANUT_CHAT_WIDGET_OPENED:"chat_widget_opened",TRACK_PEANUT_CHAT_NUDGE_CLICKED:"chat_nudge_clicked",TRACK_PEANUT_CHAT_ACTION_BAR_TAB_CLICKED:"chat_action_bar_tab_clicked",TRACK_PEANUT_CHAT_BOOKING_COMPLETED:"chat_booking_completed",TRACK_PEANUT_CHAT_FORM_SUBMITTED:"chat_form_submitted",TRACK_PEANUT_CHAT_ACTIONABLE_BUTTON_CLICKED:"chat_actionable_button_clicked",TRACK_PEANUT_GOOGLE_ANALYTICS_SENT:"google_analytics_sent"};class oQ{constructor(t){this.instanceId=t,this.EVENTS=aQ}track(r){return _e(this,arguments,function*(t,n={}){const s=`${Jl()}/boot/analytics?instanceId=${this.instanceId}`;try{yield fetch(s,{method:"POST",headers:A({"Content-Type":"application/json"},Bp()),body:JSON.stringify({event:t,properties:n})});return}catch(c){return}})}trackSampled(a,s){return _e(this,arguments,function*(t,n,r={}){const c=Math.max(0,Math.min(100,Math.floor(n)));if(c!==0&&!(Math.random()*100>=c))return this.track(t,r)})}}function Xv(e){return new oQ(e)}const sQ=e=>{const t=e,n=t&&t.modules?t.modules.calltracking:null;return n&&typeof n.getReplacementNumber=="function"?n:e&&typeof e.getReplacementNumber=="function"?e:null},aM=()=>{const e=window.tracker,t=sQ(e);return t||null},uQ=e=>_e(null,null,function*(){const t=aM();return t||(yield new Promise(n=>{const r=Date.now();let a=!1;const s=f=>{a||(a=!0,n(f))},c=()=>{const f=aM();if(f){s(f);return}if(Date.now()-r>=e){s(null);return}window.setTimeout(c,100)};c()}))}),cQ=(e,t=3e3)=>_e(null,null,function*(){const n=e.callAction.linkNumberConfig;if(!n||n.type==="custom")return e;try{const r=yield uQ(t);if(r){const a=yield r.getReplacementNumber(n.callTrackerNumber||"");if(a)return ee(A({},e),{callAction:ee(A({},e.callAction),{linkNumberConfig:ee(A({},n),{displayedNumber:a})})})}}catch(r){}return n.callTrackerNumber?ee(A({},e),{callAction:ee(A({},e.callAction),{linkNumberConfig:ee(A({},n),{displayedNumber:n.callTrackerNumber})})}):e}),lQ={definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ChatInteractionFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatInteraction"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"action"},arguments:[],directives:[]}]}}]},ph={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateChatInteraction"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ChatInteractionCreateInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"chatInteractionCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"interaction"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ChatInteractionFragment"},directives:[]}]}}]}}]}}],loc:{start:0,end:288,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`#import "../fragments/chat-interaction-fragment.graphql" mutation CreateChatInteraction($input: ChatInteractionCreateInput!) { chatInteractionCreate(input: $input) { interaction { ...ChatInteractionFragment } } } `}}},fQ=e=>{const t={};return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;const r=n.name.value;return t[r]?!1:(t[r]=!0,!0)})};ph.definitions=fQ(ph.definitions.concat(lQ.definitions)),((e,t)=>{const n=(g,m)=>{if(g.kind==="FragmentSpread")m.add(g.name.value);else if(g.kind==="VariableDefinition"){const v=g.type;v.kind==="NamedType"&&m.add(v.name.value)}return g&&"selectionSet"in g&&g.selectionSet&&g.selectionSet.selections.forEach(v=>{n(v,m)}),g&&"variableDefinitions"in g&&g.variableDefinitions&&g.variableDefinitions.forEach(v=>{n(v,m)}),g&&"definitions"in g&&g.definitions&&g.definitions.forEach(v=>{n(v,m)}),m},r=g=>{const m={};return g.definitions.forEach(function(v){"name"in v&&v.name&&(m[v.name.value]=n(v,new Set))}),m},a=(g,m)=>{for(let v=0;v{h.add(g)});h.size>0;){const g=h;h=new Set,g.forEach(m=>{d.has(m)||(d.add(m),(s[m]||new Set).forEach(_=>{h.add(_)}))})}return d.forEach(g=>{const m=a(e,g);m&&c.definitions.push(m)}),c})(ph,"CreateChatInteraction");const oM=()=>{const[e,{loading:t,error:n}]=EV(ph);return{createChatInteraction:(r,a,s,c)=>e({variables:{input:A(A({sessionId:r,interactionType:a,actionType:s},(c==null?void 0:c.aiSuggestionId)!=null&&{aiSuggestionId:c.aiSuggestionId}),(c==null?void 0:c.url)!=null&&{url:c.url})}}),error:n==null?void 0:n.message,isLoading:t}};var dQ=Object.defineProperty,hQ=Object.defineProperties,pQ=Object.getOwnPropertyDescriptors,mh=Object.getOwnPropertySymbols,sM=Object.prototype.hasOwnProperty,uM=Object.prototype.propertyIsEnumerable,Kv=(e,t,n)=>t in e?dQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pi=(e,t)=>{for(var n in t||(t={}))sM.call(t,n)&&Kv(e,n,t[n]);if(mh)for(var n of mh(t))uM.call(t,n)&&Kv(e,n,t[n]);return e},mQ=(e,t)=>hQ(e,pQ(t)),gQ=(e,t)=>{var n={};for(var r in e)sM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&mh)for(var r of mh(e))t.indexOf(r)<0&&uM.call(e,r)&&(n[r]=e[r]);return n},Sn=(e,t,n)=>(Kv(e,typeof t!="symbol"?t+"":t,n),n),Jv=(e,t,n)=>new Promise((r,a)=>{var s=d=>{try{f(n.next(d))}catch(h){a(h)}},c=d=>{try{f(n.throw(d))}catch(h){a(h)}},f=d=>d.done?r(d.value):Promise.resolve(d.value).then(s,c);f((n=n.apply(e,t)).next())}),yQ=class wD{constructor(t){Sn(this,"_parent"),Sn(this,"breadcrumbs",[]),Sn(this,"context",{}),Sn(this,"extra",{}),Sn(this,"tags",{}),Sn(this,"request"),Sn(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new wD(this)}setRequest(t){return this.request=t,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(t){return typeof t.timestamp>"u"&&(t.timestamp=new Date().toISOString()),this.breadcrumbs.push(t),this}setExtra(t,n){return this.extra[t]=n,this}removeExtra(t){return delete this.extra[t],this}setContext(t,n){return typeof n.type>"u"&&(n.type=t),this.context[t]=n,this}removeContext(t){return delete this.context[t],this}setTags(t){return this.tags=pi(pi({},this.tags),t),this}setTag(t,n){return this.tags[t]=n,this}removeTag(t){return delete this.tags[t],this}setUser(t){return this.user=t,this}removeUser(){return this.user=void 0,this}toBody(){let t=[],n=this;for(;n;)t.push(n),n=n.parent;return t.reverse().reduce((r,a)=>{var s;return r.breadcrumbs=[...(s=r.breadcrumbs)!=null?s:[],...a.breadcrumbs],r.extra=pi(pi({},r.extra),a.extra),r.contexts=pi(pi({},r.contexts),a.context),r.tags=pi(pi({},r.tags),a.tags),a.user&&(r.user=a.user),a.request&&(r.request=a.request),r},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},vQ=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,_Q=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,bQ=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,SQ=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,gh="?",cM="An unknown error occurred",EQ="0.0.4";function TQ(e){for(let t=0;t0&&(s[0].column=e.columnNumber+1),d={filename:h[3],function:h[1]||gh,lineno:h[4]?+h[4]:null,colno:h[5]?+h[5]:null};else continue;!d.function&&d.lineno&&(d.function=gh),s.push(d)}}return s.length?s.reverse():null}function OQ(e){let t=AQ(e);return{type:e.name,value:e.message,stacktrace:{frames:t!=null?t:[]}}}function RQ(e){let t=SQ.exec(e),n=t?t.slice(1):[];if(n.length!==6)throw new Error("Invalid DSN");let r=n[5].split("/"),a=r.slice(0,-1).join("/");return n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(a?"/"+a:"")+"/api/"+r.pop()+"/envelope/?sentry_version=7&sentry_key="+n[1]+(n[2]?"&sentry_secret="+n[2]:"")}function MQ(e,t,n){var r,a;let s=pi({event_id:wQ().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:EQ},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if(e.type==="exception"){s.message=(a=(r=e.error)==null?void 0:r.message)!=null?a:"Unknown error",s.fingerprint=[s.message];let c=[],f=e.error;for(let d=0;d<5&&f&&(c.push(OQ(f)),!(!f.cause||!(f.cause instanceof Error)));d++)f=f.cause;s.exception={values:c.reverse()}}return e.type==="message"&&(s.message=e.message,s.level=e.level),s}function xQ(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let n=e,{message:r}=n,a=gQ(n,["message"]),s=new Error(typeof r=="string"?r:cM);return Object.assign(s,a)}let t=new Error(cM);return Object.assign(t,{cause:e})}function IQ(e,t,n){return Jv(this,null,function*(){var r,a;try{if(typeof fetch<"u"&&typeof AbortSignal<"u"){let s;if(n){let d=new AbortController;s=d.signal,setTimeout(()=>d.abort(),n)}let c=yield fetch(e,mQ(pi({},t),{signal:s})),f=yield c.text();return{status:c.status,body:f}}return yield new Promise((s,c)=>{var f,d;let h=new XMLHttpRequest;if(h.open((f=t==null?void 0:t.method)!=null?f:"GET",e),h.onload=()=>s({status:h.status,body:h.responseText}),h.onerror=()=>c(new Error("XHR Network Error")),t==null?void 0:t.headers)for(let[g,m]of Object.entries(t.headers))h.setRequestHeader(g,m);if(n){let g=setTimeout(()=>{h.abort(),c(new Error("Request timed out"))},n);h.onloadend=()=>{clearTimeout(g)}}h.send((d=t==null?void 0:t.body)==null?void 0:d.toString())})}catch(s){return{status:0,body:(a=(r=s==null?void 0:s.toString)==null?void 0:r.call(s))!=null?a:"Unknown error"}}})}var Kn;Kn=class{constructor(e){Sn(this,"apiURL"),Sn(this,"dsn"),Sn(this,"environment"),Sn(this,"release"),Sn(this,"sampleRate"),Sn(this,"debug"),Sn(this,"_scope"),Sn(this,"shouldBuffer",!1),Sn(this,"bufferlimit",20),Sn(this,"buffer",[]);var t,n,r,a,s;this.environment=e.environment,this.release=e.release,this.sampleRate=(t=e.sampleRate)!=null?t:1,this.debug=(n=e.debug)!=null?n:!1,this._scope=(r=e.scope)!=null?r:new yQ,this.apiURL=RQ(e.dsn),this.dsn=e.dsn,this.shouldBuffer=(a=e.buffer)!=null?a:!1,this.bufferlimit=(s=e.bufferLimit)!=null?s:20}static init(e){Kn._instance||(Kn._instance=new Kn(e))}static get instance(){if(!Kn._instance)throw new Error("Sentry has not been initialized");return Kn._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return Kn.instance.scope}withScope(e){let t=this._scope.child();e(t)}static withScope(e){Kn.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:xQ(e),scope:t!=null?t:this._scope})}static captureException(e,t){Kn.instance.captureException(e,t)}captureMessage(e,t="info",n){this.captureEvent({type:"message",level:t,message:e,scope:n!=null?n:this._scope})}static captureMessage(e,t="info",n){Kn.instance.captureMessage(e,t,n)}captureEvent(e){if(Math.random()>=this.sampleRate){this.log("Dropped event due to sample rate");return}if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(e)}else this.sendEvent(e)}sendEvent(e,t=5e3){return Jv(this,null,function*(){try{this.log("Sending sentry event",e);let n=MQ(e,this.environment,this.release),r={event_id:n.event_id,dsn:this.dsn},a={type:"event"},s=JSON.stringify(r)+` `+JSON.stringify(a)+` `+JSON.stringify(n),c=yield IQ(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:s},t);this.log("Sentry response",c.status),c.status!==200&&(console.log(c.body),console.error("Failed to send event to Sentry",c))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return Jv(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(n=>this.sendEvent(n,e));yield Promise.all(t),this.log("Flushed all events")}catch(t){console.error("Failed to flush events",t)}})}static flush(e=5e3){return Kn.instance.flush(e)}static reset(){Kn._instance=void 0}},Sn(Kn,"_instance");function lM(e,t){if(!t)return;const n=Xv(t);n.track(n.EVENTS.TRACK_PEANUT_GOOGLE_ANALYTICS_SENT,{type:e})}function Zv(e,t,n){typeof window.gtag=="function"?(window.gtag("event",e,t),lM(e,n)):typeof window.ga=="function"&&(window.ga("send","event","Nutshell",e),lM(e,n))}var e_={exports:{}},fM;function kQ(){return fM||(fM=1,(function(e){(function(){function t(R,U,Z){return R.call.apply(R.bind,arguments)}function n(R,U,Z){if(!R)throw Error();if(2=U.f?ft():R.fonts.load(M(U.a),U.h).then(function(Nt){1<=Nt.length?xe():setTimeout(ut,25)},function(){ft()})}ut()}),le=null,Ce=new Promise(function(xe,ft){le=setTimeout(ft,U.f)});Promise.race([Ce,J]).then(function(){le&&(clearTimeout(le),le=null),U.g(U.a)},function(){U.j(U.a)})};function fe(R,U,Z,J,le,Ce,xe){this.v=R,this.B=U,this.c=Z,this.a=J,this.s=xe||"BESbswy",this.f={},this.w=le||3e3,this.u=Ce||null,this.m=this.j=this.h=this.g=null,this.g=new H(this.c,this.s),this.h=new H(this.c,this.s),this.j=new H(this.c,this.s),this.m=new H(this.c,this.s),R=new I(this.a.c+",serif",D(this.a)),R=oe(R),this.g.a.style.cssText=R,R=new I(this.a.c+",sans-serif",D(this.a)),R=oe(R),this.h.a.style.cssText=R,R=new I("serif",D(this.a)),R=oe(R),this.j.a.style.cssText=R,R=new I("sans-serif",D(this.a)),R=oe(R),this.m.a.style.cssText=R,P(this.g),P(this.h),P(this.j),P(this.m)}var k={D:"serif",C:"sans-serif"},q=null;function ue(){if(q===null){var R=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);q=!!R&&(536>parseInt(R[1],10)||parseInt(R[1],10)===536&&11>=parseInt(R[2],10))}return q}fe.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=a(),Te(this)};function se(R,U,Z){for(var J in k)if(k.hasOwnProperty(J)&&U===R.f[k[J]]&&Z===R.f[k[J]])return!0;return!1}function Te(R){var U=R.g.a.offsetWidth,Z=R.h.a.offsetWidth,J;(J=U===R.f.serif&&Z===R.f["sans-serif"])||(J=ue()&&se(R,U,Z)),J?a()-R.A>=R.w?ue()&&se(R,U,Z)&&(R.u===null||R.u.hasOwnProperty(R.a.c))?Re(R,R.v):Re(R,R.B):Oe(R):Re(R,R.v)}function Oe(R){setTimeout(r(function(){Te(this)},R),50)}function Re(R,U){setTimeout(r(function(){h(this.g.a),h(this.h.a),h(this.j.a),h(this.m.a),U(this.a)},R),0)}function nt(R,U,Z){this.c=R,this.a=U,this.f=0,this.m=this.j=!1,this.s=Z}var Ye=null;nt.prototype.g=function(R){var U=this.a;U.g&&g(U.f,[U.a.c("wf",R.c,D(R).toString(),"active")],[U.a.c("wf",R.c,D(R).toString(),"loading"),U.a.c("wf",R.c,D(R).toString(),"inactive")]),X(U,"fontactive",R),this.m=!0,dn(this)},nt.prototype.h=function(R){var U=this.a;if(U.g){var Z=m(U.f,U.a.c("wf",R.c,D(R).toString(),"active")),J=[],le=[U.a.c("wf",R.c,D(R).toString(),"loading")];Z||J.push(U.a.c("wf",R.c,D(R).toString(),"inactive")),g(U.f,J,le)}X(U,"fontinactive",R),dn(this)};function dn(R){--R.f==0&&R.j&&(R.m?(R=R.a,R.g&&g(R.f,[R.a.c("wf","active")],[R.a.c("wf","loading"),R.a.c("wf","inactive")]),X(R,"active")):te(R.a))}function Gn(R){this.j=R,this.a=new pe,this.h=0,this.f=this.g=!0}Gn.prototype.load=function(R){this.c=new s(this.j,R.context||this.j),this.g=R.events!==!1,this.f=R.classes!==!1,wr(this,new ae(this.c,R),R)};function Tr(R,U,Z,J,le){var Ce=--R.h==0;(R.f||R.g)&&setTimeout(function(){var xe=le||null,ft=J||null||{};if(Z.length===0&&Ce)te(U.a);else{U.f+=Z.length,Ce&&(U.j=Ce);var ut,Nt=[];for(ut=0;ut{window.parent.dispatchEvent(new CustomEvent(t,{detail:{action:e}}))},LQ=()=>{window.parent.dispatchEvent(new CustomEvent(DQ))},zQ=e=>{e&&window.parent.dispatchEvent(new CustomEvent(NQ,{detail:{number:e}}))};function UQ(e){return Se.jsx(hi,ee(A({size:e.size},e),{children:Se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 3",fill:"currentColor",children:Se.jsx("path",{d:"M2 1.5H24",stroke:"white",strokeWidth:"3",strokeLinecap:"round"})})}))}const dM={chatBubble:"💬",wave:"👋",smileyFace:"😀"};function BQ(e){return!1}const vh=FR` from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0%); opacity: 1; } `,HQ=FR` 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1) rotate(-25deg); } `,FQ=t=>{var e=no(t,[]);const n=()=>e.isOpen?Se.jsx(UQ,{size:Pv}):Object.keys(dM).includes(e.chatConfig.widgetIconEnum)?Se.jsx("div",{style:{fontSize:`${Pv}px`},dangerouslySetInnerHTML:{__html:dM[e.chatConfig.widgetIconEnum]}}):Se.jsx("img",{src:`${Jl()}/${e.chatConfig.widgetIconUrl||""}`,style:{height:`${Pv+4}px`},alt:"Chat"});return Se.jsx("button",{type:"button",onClick:e.handleClick,"data-target":e.target,"data-tooltip-id":"chat-widget-tooltip",className:wt(ee(A({},kG),{backgroundColor:e.chatConfig.appearanceColor,transition:"all 0.3s cubic-bez ier(0.4, 0, 0.2, 1)","&:hover":{boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},"&:active":{transform:"scale(0.95)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},animation:BQ(e.hasAnimated)?`${vh} 0.5s ease, ${HQ} 0.6s ease 0.5s`:{}})),children:n()})},PQ=e=>{const t=e.icon;return Se.jsxs("button",{onClick:e.onClick,className:wt({all:"unset",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",backgroundColor:"transparent !important",width:"76px",height:"56px",fontSize:"15px",cursor:"pointer",margin:"0 !important",opacity:e.isSelected?1:.7,"&:hover":{opacity:1}}),children:[Se.jsx(t,{size:18,color:Ct.white}),e.label]})},jQ=e=>{const{actionsConfig:t}=e,[n,r]=je.useState(BG()),[a,s]=je.useState(!1),c=Xv(e.instanceId),{createChatInteraction:f}=oM(),d=()=>{a||(s(!0),LQ())},h=e.chatConfig.actionBarShownActions;je.useEffect(()=>{yh(n,cu)},[n]),je.useEffect(()=>{h.includes(Yv)&&cQ(t).then(m=>{setTimeout(()=>{zQ(m.callAction.linkNumberConfig.displayedNumber)},1e3)})},[h,t]);const g=je.useMemo(()=>XG(e.actionsConfig,h,m=>{if(r(m),m){c.track(c.EVENTS.TRACK_PEANUT_CHAT_ACTION_BAR_TAB_CLICKED,{action_type:m});const v=JG(m);v&&f(e.sessionId,Qv.OPEN,v)}},n,e.toggleWidget,e.isOpen),[n,e.toggleWidget,e.isOpen,h,c,e.actionsConfig,f,e.sessionId]);return je.useEffect(()=>{const m=v=>{const _=v.detail.action;r(_)};return window.addEventListener(cu,m),()=>{window.removeEventListener(cu,m)}},[]),g?Se.jsx("div",{onMouseEnter:d,className:wt({display:"flex",borderRadius:"8px",marginTop:"8px",paddingLeft:"4px",paddingRight:"4px",color:Ct.white,backgroundColor:e.chatConfig.appearanceColor,animation:`${vh} 0.5s ease`}),children:g.map(m=>Se.jsx(PQ,{label:m.label,icon:m.icon,onClick:m.onClick,isSelected:n===m.action}))}):null};function qQ(e){return Se.jsx(hi,ee(A({size:e.size},e),{children:Se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:Se.jsx("path",{d:"M327.5 85.2c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L384 128l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L448 128l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L448 64 426.8 7.5C425.1 3 420.8 0 416 0s-9.1 3-10.8 7.5L384 64l-56.5 21.2zM205.1 73.3c-2.6-5.7-8.3-9.3-14.5-9.3s-11.9 3.6-14.5 9.3l-52.8 114L9.3 240c-5.7 2.6-9.3 8.3-9.3 14.6s3.6 11.9 9.3 14.5l114.1 52.7 52.6 114c2.6 5.7 8.3 9.3 14.5 9.3s11.9-3.6 14.5-9.3l52.7-114.1L371.8 269c5.7-2.6 9.3-8.3 9.3-14.5s-3.6-11.9-9.3-14.5l-114-52.6-52.7-114.1zM384 384l-56.5 21.2c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L384 448l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L448 448l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L448 384l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L384 384z"})})}))}const $Q=(e,t,n)=>e?`1.25px solid ${n}`:t?`1.25px solid ${Ct.greyHover}`:`1.25px solid ${Ct.greyXlt}`;function hM(e,t){let n=0,r=0,a=0;return e.length===7&&(n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),a=parseInt(e.slice(5,7),16)),e.length===4&&(n=parseInt(e.slice(1,2),16),r=parseInt(e.slice(2,3),16),a=parseInt(e.slice(3,4),16)),t?`rgba(${n}, ${r}, ${a}, ${t})`:`rgb(${n}, ${r}, ${a})`}function VQ(e){let t=0,n=0,r=0;e.length===7?(t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255):e.length===4&&(t=parseInt(e.slice(1,2)+e.slice(1,2),16)/255,n=parseInt(e.slice(2,3)+e.slice(2,3),16)/255,r=parseInt(e.slice(3,4)+e.slice(3,4),16)/255);const a=d=>d<=.03928?d/12.92:Math.pow((d+.055)/1.055,2.4),s=a(t),c=a(n),f=a(r);return .2126*s+.7152*c+.0722*f}function GQ(e,t=.1){if(VQ(e)>.9)return"rgba(0, 0, 0, 0.08)";const r=Math.min(t*2,1);return hM(e,r)}function pM(e){return e.toLowerCase()===Ct.white?Ct.black:e}const QQ=e=>{const t=()=>{e.onSelect(e.suggestion.content,e.suggestion.id)};return Se.jsx("div",{className:wt({display:"flex",width:"fit-content",backgroundColor:Ct.white,borderRadius:"8px"}),children:Se.jsx("li",{className:wt({all:"unset",display:"flex",maxWidth:"320px",height:"100%",justifyContent:"flex-end",fontSize:"13px",textAlign:"left",lineHeight:"17px",border:`1px solid ${pM(e.chatConfig.appearanceSecondaryColor)}`,borderRadius:"8px",paddingLeft:"12px",paddingRight:"12px",paddingTop:"8px",paddingBottom:"8px",backgroundColor:hM(e.chatConfig.appearanceSecondaryColor,.04),color:pM(e.chatConfig.appearanceSecondaryColor),cursor:"pointer",transition:"background-color 0.2s",boxSizing:"border-box","&:hover":{backgroundColor:GQ(e.chatConfig.appearanceSecondaryColor,.1)},"&::before":{all:"unset"},"&::after":{all:"unset"}}),onClick:t,children:e.suggestion.content})})},WQ=3,YQ=e=>{const t=ZG(e.suggestions).slice(0,WQ);return Se.jsx("ul",{className:wt({display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"8px",listStyleType:"none",marginTop:"8px",marginBottom:"8px",cursor:"pointer",animation:`${vh} 0.3s ease-out`}),children:t.map(n=>Se.jsx(QQ,{chatConfig:e.chatConfig,suggestion:n,onSelect:e.onSelect},n.id))})},XQ="desktopOnly",KQ="always";function JQ(e){return Se.jsx(hi,ee(A({size:e.size},e),{children:Se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:Se.jsx("path",{xmlns:"http://www.w3.org/2000/svg",d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"})})}))}const ZQ=e=>Se.jsx("button",{type:"button",onClick:e.handleNudgeClose,className:wt({all:"unset",display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",cursor:"pointer",borderRadius:"50%",backgroundColor:`${Ct.white} !important`,transition:"all 0.2s ease",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.25)",border:`1px solid ${Ct.greyXlt}`,margin:"0 !important","&:hover":{boxShadow:"0 1px 3px rgba(0, 0, 0, 0.25)",transform:"translateY(-1px)",border:`1px solid ${Ct.greyHover}`},animation:`${vh} 0.3s ease-out`}),children:Se.jsx(JQ,{size:16,color:_G})}),e2={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AiSuggestions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"url"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"aiSuggestions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"url"},value:{kind:"Variable",name:{kind:"Name",value:"url"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:141,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`query AiSuggestions($url: String!) { aiSuggestions(url: $url) { id content } } `}}},t2=e=>{var s;const{data:t,error:n,loading:r,refetch:a}=cR(e2,{variables:{url:e}});return{error:n==null?void 0:n.message,isLoading:r&&!t,aiSuggestions:(s=t==null?void 0:t.aiSuggestions)!=null?s:[],fetchAiSuggestions:a}},n2={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetThreadStatus"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sessionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sourceUrl"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isPreview"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"chatDetails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sessionId"},value:{kind:"Variable",name:{kind:"Name",value:"sessionId"}}},{kind:"Argument",name:{kind:"Name",value:"sourceUrl"},value:{kind:"Variable",name:{kind:"Name",value:"sourceUrl"}}},{kind:"Argument",name:{kind:"Name",value:"isPreview"},value:{kind:"Variable",name:{kind:"Name",value:"isPreview"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasOpenThread"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:241,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`query GetThreadStatus($sessionId: String!, $sourceUrl: String, $isPreview: Boolean) { chatDetails(sessionId: $sessionId, sourceUrl: $sourceUrl, isPreview: $isPreview) { hasOpenThread } } `}}},r2=(e,t,n)=>{var f,d;const{data:r,loading:a,refetch:s,networkStatus:c}=cR(n2,{variables:{sessionId:e,sourceUrl:t,isPreview:n},notifyOnNetworkStatusChange:!0});return{hasOpenThread:(d=(f=r==null?void 0:r.chatDetails)==null?void 0:f.hasOpenThread)!=null?d:!1,isLoading:a,isRefetching:c===tt.refetch,refetch:s}};function lu(){return{color:"#a6a3a1",textTransform:"none !important"}}const mM={"&::-webkit-input-placeholder":lu(),":-moz-placeholder":lu(),"&::-moz-placeholder":lu(),"&:-ms-input-placeholder":lu(),"&::placeholder":lu()};function i2(ae){var he=ae,{uncontrolled:e,value:t="",type:n,onChange:r,multiline:a,rows:s,min:c,max:f,textFieldRef:d,autocomplete:h,onEnter:g,onEscape:m,focusOnMount:v,selectOnFocus:_,blinkSuccess:S,hasError:E,noBorder:w,errorMessage:T,placeholder:O,size:x="normal",onFocus:I,onBlur:M,isDisabled:L,placeholderPrefixIcon:D,customDimensions:G}=he,V=no(he,["uncontrolled","value","type","onChange","multiline","rows","min","max","textFieldRef","autocomplete","onEnter","onEscape","focusOnMount","selectOnFocus","blinkSuccess","hasError","noBorder","errorMessage","placeholder","size","onFocus","onBlur","isDisabled","placeholderPrefixIcon","customDimensions"]);const te=je.useRef(null),X=typeof d=="object"&&Object.prototype.hasOwnProperty.call(d,"current")?d:te;je.useEffect(()=>{v&&X.current&&X.current.focus()},[v]);const pe=se=>{_&&X.current&&X.current.select(),I&&I(se)},ce=se=>{M&&M(se)},H=se=>{const Te=se.target.value;if(t!==Te&&r){if(n==="number"&&(typeof f!="undefined"&&Number(Te)>Number(f)||typeof c!="undefined"&&Number(Te){if(se.key==="Enter"){if(a){if(se.shiftKey)return;se.preventDefault()}g&&g(se)}},oe=se=>{se.key==="Escape"&&m&&m(se)},re=A({all:"unset",color:Ct.grey,fontSize:"16px",fontFamily:"inherit",padding:"4px 8px",width:"100%",height:"34px",boxSizing:"border-box",outline:"none",transition:"color 200ms linear","&:not(:disabled):focus":{boxShadow:"none"},"&:hover":{borderColor:Ct.greyLt},"&:disabled":{backgroundColor:"#f7f7f7",opacity:.6},'&[type="number"]':{textAlign:"right"}},mM),fe=wt(A(A(A(A(A(A(A(A(A(A(A({},re),w?{border:"none !important"}:{border:`1px solid ${vG} !important`,borderRadius:"3px !important","&:not(:disabled):hover":{borderColor:Ct.greyLt},"&:not(:disabled):focus, &:not(:disabled):active":{borderColor:Ct.blue}}),a?{padding:"8px !important",height:"96px",resize:"none",lineHeight:"1.5"}:{}),S?{color:SG}:{}),E?{borderColor:qR}:{}),x==="big"?{fontSize:"18px",padding:"4px 12px !important",height:"51px"}:{}),x==="small"?{height:"31px",fontSize:"13px"}:{}),T?{"&::placeholder":{color:qR,opacity:1}}:{}),a&&s?{height:`${s*26}px`}:{}),D?ee(A({},mM),{"&::placeholder":ee(A({},lu()),{paddingLeft:D.size+8+"px !important"})}):{}),G?{height:G.height,width:G.width||"100%"}:{})),k=a?"textarea":"input",q=e?{value:void 0}:{value:t,onChange:H},ue=Se.jsx(k,A(A({className:fe,ref:X,autoComplete:h?"on":"off",onKeyDown:P,onKeyUp:oe,onFocus:pe,onBlur:ce,placeholder:T||O,autoFocus:v,disabled:L,type:n},V),q));return D?Se.jsxs("div",{className:wt({display:"flex",alignItems:"center",position:"relative",width:"100%"}),children:[Se.jsx("div",{className:wt({position:"absolute",paddingLeft:"8px !important",paddingRight:"8px !important",visibility:D.isHidden?"hidden":"visible"}),children:D.icon}),ue]}):ue}function a2(e){return Se.jsx(hi,ee(A({size:e.size},e),{children:Se.jsx("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:Se.jsx("path",{d:"M3.56775 0.266743C1.45577 -0.788877 -0.786213 1.45232 0.269778 3.56555L6.48972 15.9971L0.269778 28.4286C-0.786213 30.5418 1.45577 32.783 3.56975 31.7274L30.6395 18.1963C32.4535 17.2886 32.4535 14.7055 30.6395 13.7979L3.56775 0.266743ZM9.0477 14.5216L3.56775 3.56555L28.4415 15.9971L3.56775 28.4286L9.0477 17.4725H16.0056C16.3971 17.4725 16.7725 17.3171 17.0493 17.0404C17.3261 16.7637 17.4816 16.3884 17.4816 15.9971C17.4816 15.6058 17.3261 15.2305 17.0493 14.9538C16.7725 14.6771 16.3971 14.5216 16.0056 14.5216H9.0477Z",fill:"currentColor"})})}))}const o2=e=>({icon:Se.jsx(qQ,{color:Ct.greyXlt,size:16}),size:16,isHidden:e}),gM={display:"flex",alignItems:"center",gap:"4px",backgroundColor:Ct.white,height:"56px",borderRadius:"8px",paddingLeft:"8px",animation:{}},s2=e=>ee(A({},gM),{position:"relative",width:242,zIndex:0,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:"8px",padding:"1.25px",background:`linear-gradient(90deg, ${Ct.greyXlt}, ${Ct.greyXlt}, ${Ct.greyXlt}, ${e}, ${Ct.greyXlt}, ${Ct.greyXlt}, ${Ct.greyXlt})`,backgroundSize:"400% 100%",animation:"animatedBorder 5s ease-in-out infinite",zIndex:-1,WebkitMask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",WebkitMaskComposite:"destination-out",maskComposite:"exclude",boxSizing:"border-box"},"@keyframes animatedBorder":{"0%":{backgroundPosition:"100% 50%"},"50%":{backgroundPosition:"0% 50%"},"100%":{backgroundPosition:"100% 50%"}}}),u2=(e,t,n)=>ee(A({},gM),{border:$Q(e,t,n),maxHeight:"54px",width:240}),c2=({chatConfig:e,onSubmit:t})=>{const[n,r]=je.useState(""),[a,s]=je.useState(!1),[c,f]=je.useState(!1),d=je.useRef(null),h=n.length<3,g=()=>{h||(t(n),r(""))},m=!a&&!c;return Se.jsxs("div",{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:wt(m?s2(e.appearanceColor):u2(a,c,e.appearanceColor)),children:[Se.jsx(i2,{value:n,onChange:r,onFocus:()=>s(!0),onBlur:()=>s(!1),onEscape:()=>{var v;s(!1),(v=d.current)==null||v.blur()},onEnter:g,textFieldRef:d,placeholder:e.appearanceCallToAction||"Ask anything!",noBorder:!0,placeholderPrefixIcon:o2(n.length>0),multiline:!0,rows:2,customDimensions:{height:"40px"}}),n.length>0&&Se.jsx("button",{className:wt({all:"unset",backgroundColor:"transparent !important",padding:"8px",paddingRight:"16px",opacity:h?.6:1,cursor:h?"not-allowed":"pointer",marginLeft:"auto",marginTop:"0 !important",marginBottom:"0 !important"}),disabled:h,onClick:g,children:Se.jsx(a2,{size:16,color:e.appearanceSecondaryColor})})]})},_h="nutshell_chat_widget_state",Ui="open",t_="closed",l2=({chatConfig:e,actionsConfig:t,target:n,onClick:r,isPreview:a,isOnboarding:s,isTest:c,isMobile:f,instanceId:d,defaultNudges:h,chatAgentsOnline:g,chatbotConfig:m})=>{const[v,_]=je.useState(()=>{try{return localStorage.getItem(_h)===Ui}catch($e){return!1}}),[S,E]=je.useState(!1),[w,T]=je.useState(!1);je.useEffect(()=>{setTimeout(()=>{E(!0)},1600)});const[O,x]=je.useState(null),[I,M]=je.useState(()=>{try{const st=localStorage.getItem(_h)===Ui,Xe=localStorage.getItem(Yu)==="true";return s?!st:a?!st&&e.appearanceNudgeEnabled:!st&&!Xe&&e.appearanceNudgeEnabled}catch($e){return!1}}),L=Up(),{aiSuggestions:D,isLoading:G}=t2(L.href),V=D,ae=h!=null?h:[],he=d+"_sessionId",te=localStorage.getItem(he)||"",{hasOpenThread:X,isLoading:pe,isRefetching:ce,refetch:H}=r2(te,L.href,a),{createChatInteraction:P}=oM();je.useEffect(()=>{try{const ge=localStorage.getItem(_h)||t_,ct=window.document.getElementById("chat-iframe");if(ge===Ui&&ct){const Le=ct.style.visibility==="visible"||ct.style.opacity==="1"||ct.getAttribute("isOpen")==="true";_(Le),Le&&M(!1)}else _(!1)}catch(ge){console.error("Failed to get chat state from localStorage:",ge)}const $e=ge=>{ge.key===_h&&setTimeout(()=>{const ct=ge.newValue===Ui;_(ct),ct&&M(!1)},50),ge.key===Yu&&ge.newValue==="true"&&M(!1)},st=ge=>{ge.data&&ge.data.type==="CHAT_OPENED"?setTimeout(()=>{_(!0),M(!1),X||H()},50):ge.data&&ge.data.type==="CLOSE_CHAT_WIDGET"&&(_(!1),yh(null,cu),X||H())},Xe=ge=>{setTimeout(()=>{const ct=ge.detail.state===Ui;_(ct),ct?(M(!1),X||H()):(yh(null,cu),X||H())},50)};return window.addEventListener("storage",$e),window.addEventListener("message",st),window.addEventListener("chat_widget_state_change",Xe),()=>{window.removeEventListener("storage",$e),window.removeEventListener("message",st),window.removeEventListener("chat_widget_state_change",Xe)}},[e.appearanceNudgeEnabled,X,H]);const oe=Xv(d),re=()=>{I&&(localStorage.setItem(Yu,"true"),M(!1)),r(),v||(oe.track(oe.EVENTS.TRACK_PEANUT_CHAT_WIDGET_OPENED,{is_preview:a}),P(te,Qv.OPEN,Ia.CHAT))},fe=$e=>{$e.preventDefault(),$e.stopPropagation(),localStorage.setItem(Yu,"true"),M(!1)};je.useEffect(()=>{const $e=st=>{var Xe;((Xe=st.data)==null?void 0:Xe.type)==="CHAT_IFRAME_READY"&&T(!0)};return window.addEventListener("message",$e),()=>window.removeEventListener("message",$e)},[]),je.useEffect(()=>{if(O&&w){const $e=window.document.getElementById("chat-iframe");$e&&$e.contentWindow&&($e.contentWindow.postMessage({type:"SEND_CHAT_MESSAGE_FROM_NUDGE",nudgeInput:O},"*"),x(null))}},[O,w]);const k=($e,st)=>{x($e),oe.track(oe.EVENTS.TRACK_PEANUT_CHAT_NUDGE_CLICKED),P(te,Qv.NUDGE_CLICK,Ia.CHAT,{aiSuggestionId:st,url:L.href}),yh(hh,cu),re()},q=window.innerWidth<1800,ue=q&&a,se=eQ(s,a,I,G,X,pe,S,V,ae),Te=e.appearanceChatVariant,Oe=Te==="actions",Re=rQ(e.offlineFormType,g,m),nt=iM(e.actionBarShownActions),Ye=nt.length>0,dn=e.appearanceNudgeDeviceVisibility,Gn=dn===KQ||dn===XQ&&!f;if(Re&&(!Ye||!Oe))return null;const Tr=!Re&&Te==="chat",wr=!Re&&se&&Gn,hn=!Re&&!v&&!pe&&!ce&&!X,Fe=Oe&&(Ye||!Re),bt=Re?ee(A({},e),{actionBarShownActions:nt}):e;return Se.jsxs("div",{className:wt(A(A(A(A(A({},IG),s&&DG),c&&NG),ue&&{transform:"scale(0.75)",transformOrigin:"bottom right"}),f&&{right:"10px"})),children:[wr&&Se.jsxs(Se.Fragment,{children:[Se.jsx(ZQ,{handleNudgeClose:fe}),Se.jsx(YQ,{suggestions:V.length===0?ae:V.map($e=>({content:$e.content,id:$e.id})),chatConfig:e,onSelect:k})]}),Se.jsxs("div",{className:wt({display:"flex",alignItems:"center",gap:"8px"}),children:[hn&&Se.jsx(c2,{chatConfig:e,onSubmit:k}),Tr&&Se.jsx(FQ,{chatConfig:e,handleClick:re,target:n,isOnboarding:s,isTest:c,isPreview:a,isSmallScreen:q,shouldScaleForPreview:ue,isOpen:v,hasAnimated:S})]}),Fe&&Se.jsx(jQ,{chatConfig:bt,actionsConfig:t,toggleWidget:r,isOpen:v,instanceId:d,sessionId:te})]})},f2="closed",yM=e=>{var t;return(t=e==null?void 0:e.match(/\.([\w-]+)/))==null?void 0:t[1]},d2=()=>{const e=Array.from(document.styleSheets).flatMap(r=>{try{return Array.from(r.cssRules)}catch(a){return[]}}),t=e.find(r=>r.cssText&&r.cssText.includes("opacity: 0")&&r.cssText.includes("transform: scale(0)")),n=e.find(r=>r.cssText&&r.cssText.includes("opacity: 1")&&r.cssText.includes("transform: scale(1)"));return{hidden:yM(t==null?void 0:t.cssText),visible:yM(n==null?void 0:n.cssText)}},h2=()=>{const e=document.getElementById("chat-iframe");if(!e)return;dh(f2);const{hidden:t,visible:n}=d2();e.style.opacity="0",e.style.transform="translateY(20px)",e.style.pointerEvents="none",e.style.visibility="hidden",n&&t&&(e.classList.remove(n),e.classList.add(t)),e.setAttribute("isOpen","false");const r=document.getElementById("chat-widget-button-container");r&&(r.style.display="")},p2=(e,t)=>e==="scheduler_book"||e==="scheduler_reschedule"||e==="scheduler_cancel"||t.formType==="scheduler"||!!(t.fields&&(t.fields.fxSchedulerForm==="1"||t.fields.fxschedulerform==="1")),m2=(e,t,n)=>{const r=`submission-id-wffield-${t}`,a=document.createElement("input");a.setAttribute("type","text"),a.setAttribute("id",r),a.setAttribute("name",r),a.value=n,e.appendChild(a)},g2=(e,t)=>{try{const n=document.createElement("form"),r=t.formSlug||t.meetingId||"nutshell-form";if(n.setAttribute("id",r),n.setAttribute("name",t.formSlug||r),n.setAttribute("class","nutshell-peanut-embed"),p2(e,t))n.setAttribute("data-form-type","scheduler");else{const c=`nutshell-${r}`;n.setAttribute("data-fx-id",c)}const a=t.fields||{};Object.keys(a).forEach(c=>{const f=document.createElement("input");f.setAttribute("type","text"),f.setAttribute("id",c),f.setAttribute("name",c);try{const d=a[c];f.value=typeof d=="string"?d:String(d)}catch(d){f.value=""}n.appendChild(f)}),t.submissionId&&t.formVersionId&&m2(n,t.formVersionId,t.submissionId),n.style.position="absolute",n.style.left="-9999px",n.style.top="0",document.body.appendChild(n);const s=new Event("submit",{bubbles:!0,cancelable:!0});n.dispatchEvent(s),setTimeout(()=>{try{n.remove()}catch(c){}},50)}catch(n){}},y2=e=>{try{const t=e.name||"event",n=e.payload||{};(t==="form_submit"||t==="scheduler_book"||t==="scheduler_reschedule")&&(g2(t,n),n.formType==="intake"?Zv("nutshell_chat_intake_form_submitted",{},n.instanceId):Zv("nutshell_engagement_bar_form_submitted",{},n.instanceId)),t==="chat_message_sent"&&Zv("nutshell_chat_started",{},n.instanceId)}catch(t){console.error("[handlePeanutTrack] Error:",t)}},v2=()=>{window.__nutshellHandlersSetup||(window.__nutshellHandlersSetup=!0,window.addEventListener("message",function(e){if(e.data&&(e.data.type==="CLOSE_CHAT_WIDGET"&&h2(),e.data.type==="PEANUT_TRACK")){const t=window===window.top,n=e.source&&e.source!==window&&e.source!==window.parent;t&&n&&y2(e.data)}}))},_2="nutshell_cache_",b2=1800*1e3,vM=(e,t,n)=>[_2,e,t].join("_"),S2=(e,t,n)=>{try{const r=vM(e,t,n),a=sessionStorage.getItem(r);if(!a)return null;const s=JSON.parse(a);return Date.now()-s.timestamp>b2?(sessionStorage.removeItem(r),null):s.data}catch(r){return null}},E2=(e,t,n,r)=>{try{const a=vM(e,t,r),s={data:n,timestamp:Date.now()};sessionStorage.setItem(a,JSON.stringify(s))}catch(a){}},_M=e=>{const{instanceId:t,loadedModules:n}=e,r=HD(Number(t));document.body.appendChild(r),io(n,UD)},T2=e=>{const{chatConfig:t,isPreview:n,chatAgentsOnline:r,shouldInitWithEngagementBar:a,excludedModules:s,isChatAlreadyLoaded:c,currentPath:f}=e;if(!t||!(t.chatEnabled||n)||!(r||t.offlineFormEnabled||a)||s.includes("chat")||c)return!1;if(f&&t.disabledPaths&&t.disabledPaths.length>0){const g=S=>{const E=S.split("?")[0].split("#")[0].trim();try{return new URL(E).pathname}catch(w){try{return new URL("http://"+E).pathname}catch(T){return"/"}}},m=S=>S==="/"?"/":S.replace(/\/$/,""),v=m(g(f));if(t.disabledPaths.some(S=>{const E=m(g(S.trim()));return v===E||v.startsWith(E+"/")}))return!1}return!0},w2=(e,t,n)=>{const r=document.createElement("iframe");r.setAttribute("id","chat-iframe");const a=rl();a?(r.setAttribute("class",wt(ee(A(A({},fh),GR),{opacity:"0",transform:"translateY(20px)",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"}))),r.setAttribute("data-mobile-view","true")):r.setAttribute("class",wt(ee(A(A(A({},fh),n&&LG),t&&!n&&zG),{opacity:"0",transform:window.innerHeight<900&&t?"scale(0.75) translateY(20px)":"translateY(20px)",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"}))),r.classList.add(wt($v)),r.setAttribute("isOpen","false"),a?YR(r):(WR(r),t||(r.style.transformOrigin="bottom right"));const s=()=>{if(rl())YR(r),r.getAttribute("data-mobile-view")||(r.setAttribute("data-mobile-view","true"),r.className=wt(ee(A(A({},fh),GR),{opacity:r.style.opacity,transform:r.style.transform,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"})),r.getAttribute("isOpen")==="true"?r.classList.add(wt(VR)):r.classList.add(wt($v)));else{r.getAttribute("data-mobile-view")&&(r.removeAttribute("data-mobile-view"),r.className=wt(ee(A({},fh),{opacity:r.style.opacity,transform:r.style.transform,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"})),r.getAttribute("isOpen")==="true"?r.classList.add(wt(VR)):r.classList.add(wt($v)));const f=window.innerWidth,d=window.innerHeight;f<600?r.style.setProperty("width",`${Math.max(200,f*.95)}px`,"important"):r.style.setProperty("width",`${Vv()}`,"important"),d<600?r.style.setProperty("height",`${Math.max(200,d*.95)}px`,"important"):(WR(r),t||(r.style.transformOrigin="bottom right")),t&&(d<900?r.style.transform=`scale(${uu(!0)})`:(r.style.transform=`scale(${uu(!1)})`,r.style.bottom=n?"162px":"80px",r.style.right="44px"))}};return s(),window.addEventListener("resize",s),rl()&&zr(()=>Promise.resolve().then(()=>SM),void 0).then(c=>{c.setupMobileKeyboardHandlers(r),c.setupIOSInputHandlers(r)}),r.onerror=()=>{Xo({instanceId:e,peanutType:Kl,errorDescription:"Error loading iframe"})},r},bM=e=>_e(null,null,function*(){const{chatConfig:t,target:n,instanceId:r,pusherConfig:a,chatbotConfig:s,actionsConfig:c,defaultNudges:f,isPreview:d,isOnboarding:h,isTest:g,loadedModules:m,chatAgentsOnline:v,useEsm:_}=e,S=!1;v2(),io(m,b0);const E=w2(r,d,h),w=rl();E.onload=()=>{var I;try{const M=E.contentDocument||((I=E.contentWindow)==null?void 0:I.document),L=VD(S,"https://static.nlcdn.com/st-11053",document,_);L.setAttribute("target",n),L.setAttribute("instance-id",r),L.setAttribute("chat-config",JSON.stringify(t)),L.setAttribute("pusher-config",JSON.stringify(a)),L.setAttribute("chatbot-config",JSON.stringify(s)),L.setAttribute("actions-config",JSON.stringify(c)),L.setAttribute("default-nudges",JSON.stringify(f)),L.setAttribute("is-preview-thread",h?"true":"false"),w&&L.setAttribute("is-mobile","true");const D=document.createElement("div");if(D.setAttribute("id",n),D.setAttribute("style","width: 100%; height: 100%;"),M&&(GD(S,M),M.body.appendChild(D),M.body.appendChild(L),M.body.style.fontFamily='IBM Plex Sans, "Helvetica Neue", sans-serif',w)){const V=M.createElement("meta");V.name="viewport",V.content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no",M.head.appendChild(V),zr(()=>Promise.resolve().then(()=>SM),void 0).then(ae=>{ae.injectMobileKeyboardScript(M)})}if(Gv()===Ui){dh(t_);try{localStorage.setItem(Yu,"true")}catch(V){console.error("Failed to hide nudge in localStorage:",V)}setTimeout(()=>{x()},100)}}catch(M){Xo({instanceId:r,peanutType:Kl,errorDescription:"Error initializing chat in iframe"})}};const T=document.getElementById(n);if(!T){Xo({instanceId:r,peanutType:Kl,errorDescription:"Iframe render target not found"});return}T.appendChild(E);const O=document.createElement("div");O.setAttribute("id","chat-widget-button-container"),T.appendChild(O);const x=()=>{var V,ae,he,te,X,pe;const I=document.getElementById("chat-iframe");if(!I)return;const L=Gv()===Ui,D=(he=(ae=(V=Array.from(document.styleSheets).flatMap(ce=>{try{return Array.from(ce.cssRules)}catch(H){return[]}}).find(ce=>ce.cssText&&ce.cssText.includes("opacity: 0")&&ce.cssText.includes("transform: scale(0)")))==null?void 0:V.cssText)==null?void 0:ae.match(/\.([\w-]+)/))==null?void 0:he[1],G=(pe=(X=(te=Array.from(document.styleSheets).flatMap(ce=>{try{return Array.from(ce.cssRules)}catch(H){return[]}}).find(ce=>ce.cssText&&ce.cssText.includes("opacity: 1")&&ce.cssText.includes("transform: scale(1)")))==null?void 0:te.cssText)==null?void 0:X.match(/\.([\w-]+)/))==null?void 0:pe[1];if(L){I.style.opacity="0",I.style.transform=`scale(${uu(d)}) translateY(20px)`,I.style.transformOrigin="bottom right",dh(t_),setTimeout(()=>{G&&D&&(I.classList.remove(G),I.classList.add(D)),I.style.pointerEvents="none",I.style.visibility="hidden",I.setAttribute("isOpen","false")},300);const ce=document.getElementById("chat-widget-button-container");ce&&(ce.style.display="")}else{if(dh(Ui),G&&D&&(I.classList.remove(D),I.classList.add(G)),I.style.opacity="1",I.style.transform=`scale(${uu(d)}) translateY(0)`,I.style.transformOrigin="bottom right",I.style.pointerEvents="all",I.style.visibility="visible",I.setAttribute("isOpen","true"),rl()){const ce=document.getElementById("chat-widget-button-container");ce&&(ce.style.display="none")}setTimeout(()=>{const ce=document.getElementById("chat-iframe");ce instanceof HTMLIFrameElement&&ce.contentWindow&&ce.contentWindow.postMessage({type:"CHAT_OPENED"},"*")},100)}setTimeout(()=>{const ce=document.getElementById("chat-iframe");ce&&Gv()===Ui&&ce.getAttribute("isOpen")==="true"&&(ce.style.opacity!=="1"||ce.style.visibility!=="visible")&&(ce.style.opacity="1",ce.style.transform=`translateY(0) scale(${uu(d)})`,ce.style.pointerEvents="all",ce.style.visibility="visible")},500)};MV.createRoot(O).render(SC.createElement(rV,{client:yG(r),children:SC.createElement(l2,{chatConfig:t,actionsConfig:c,target:n,onClick:x,isPreview:d,isOnboarding:h,isTest:g,isMobile:w,instanceId:r,defaultNudges:f,chatAgentsOnline:v,chatbotConfig:s})})),window.addEventListener("message",I=>{I.data.type==="TOGGLE_CHAT_WIDGET"&&x()}),HG()}),C2=Object.freeze(Object.defineProperty({__proto__:null,initializeBoot:e=>_e(null,null,function*(){var O;const{instanceId:t,siteId:n,target:r,excludedModules:a,loadedModules:s}=e;let c=t;io(s,kD);const f=FD(a),d=Up(),h=d.hostname,g=encodeURIComponent(d.href),m=(O=document.querySelector(`#nutshell-boot-${t}`)||document.querySelector(`#nutshell-boot-${n}`))==null?void 0:O.getAttribute("previewType"),v=m==="preview-onboarding",_=m==="preview-test",S=v||_,w=yield _e(null,null,function*(){const x=t||n||"";if(!S&&x){const I=S2("boot_config",x);if(I){const M=I.config&&I.config.instanceId;return M&&!c&&(c=String(M)),I}}try{const I=t?`https://app.nutshell.com/boot/config/${t}?origin=${f}&domain=${h}&pageUrl=${g}`:`https://app.nutshell.com/boot/config-by-site-id?siteId=${n}&origin=${f}&domain=${h}&pageUrl=${g}`,M=yield fetch(I);if(!M.ok)throw new Error(`HTTP error! status: ${M.status}`);const L=yield M.json();try{const D=L&&L.config&&L.config.instanceId;D&&!c&&(c=String(D))}catch(D){}return!S&&x&&E2("boot_config",x,L),L}catch(I){Xo({instanceId:c||t||n||"",peanutType:Xl,errorDescription:"Error fetching boot config",exception:I instanceof Error?I:new Error(String(I))})}});if(w){const{chatConfig:x,chatbotConfig:I,actionsConfig:M,pusherConfig:L,chatAgentsOnline:D,defaultNudges:G,useEsm:V}=w.config;typeof V=="boolean"&&PD(V);const ae=s.includes(b0),he=iQ((x==null?void 0:x.appearanceChatVariant)||"chat",(x==null?void 0:x.actionBarShownActions)||[]),te=typeof window!="undefined"?window.location.href:void 0;T2({chatConfig:x,isPreview:S,chatAgentsOnline:D,shouldInitWithEngagementBar:he,excludedModules:a,isChatAlreadyLoaded:ae,currentPath:te})&&(yield bM({chatConfig:x,target:r,instanceId:c||t||"",pusherConfig:L,chatbotConfig:I,actionsConfig:M,isPreview:S,isOnboarding:v,isTest:_,loadedModules:s,defaultNudges:G,chatAgentsOnline:D,useEsm:V}))}!a.includes("analytics")&&!S&&("requestIdleCallback"in window?requestIdleCallback(()=>{_M({instanceId:c||t||"",loadedModules:s})}):setTimeout(()=>{_M({instanceId:c||t||"",loadedModules:s})},100))}),initializeChat:bM},Symbol.toStringTag,{value:"Module"})),SM=Object.freeze(Object.defineProperty({__proto__:null,injectMobileKeyboardScript:e=>{const t=e.createElement("script");t.textContent=` window.addEventListener('message', (event) => { if (event.data && event.data.type === 'KEYBOARD_HEIGHT_CHANGE') { const chatContent = document.querySelector('.chat-content'); if (chatContent) { const keyboardHeight = event.data.windowHeight - event.data.visibleHeight; if (keyboardHeight > 100) { // Keyboard is likely open chatContent.style.height = \`calc(100% - \${keyboardHeight}px)\`; } else { // Keyboard is likely closed chatContent.style.height = '100%'; } } } }); `,e.head.appendChild(t)},setupIOSInputHandlers:e=>{e.addEventListener("load",()=>{var r;const n=e.contentDocument||((r=e.contentWindow)==null?void 0:r.document);if(n){const a=n.createElement("script");a.textContent=` document.addEventListener('focusin', function(e) { if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') { window.parent.postMessage({ type: 'INPUT_FOCUSED' }, '*'); // Scroll element into view with a slight delay to account for keyboard setTimeout(() => { e.target.scrollIntoView({ behavior: 'smooth', block: 'center' }); }, 300); } }); document.addEventListener('focusout', function(e) { if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') { window.parent.postMessage({ type: 'INPUT_BLURRED' }, '*'); } }); `,n.head.appendChild(a)}});const t=n=>{n.data&&n.data.type==="INPUT_FOCUSED"?(document.body.classList.add("input-focused"),window.scrollTo(0,0)):n.data&&n.data.type==="INPUT_BLURRED"&&document.body.classList.remove("input-focused")};window.addEventListener("message",t)},setupMobileKeyboardHandlers:e=>{const t=window.innerHeight,n=()=>{const r=window.innerHeight;if(t-r>100){const a=t-r;e.contentWindow&&e.contentWindow.postMessage({type:"KEYBOARD_HEIGHT_CHANGE",visibleHeight:r,windowHeight:t,keyboardHeight:a},"*"),document.body.classList.add("keyboard-open"),jR()&&(e.style.height=`${r}px`,e.contentDocument&&(e.contentDocument.documentElement.style.height="100%",e.contentDocument.body.style.height="100%"))}else e.contentWindow&&e.contentWindow.postMessage({type:"KEYBOARD_HEIGHT_CHANGE",visibleHeight:r,windowHeight:t,keyboardHeight:0},"*"),document.body.classList.remove("keyboard-open"),jR()&&(e.style.height="100%")};window.addEventListener("resize",n)}},Symbol.toStringTag,{value:"Module"}))})(); //# sourceMappingURL=nutsheller.js.map