PageSourceSearch

https://certbox.app/assets/index-DN5F4pPB.js

js certbox.app collected 2026-09-24 14:07:43 UTC 637,752 bytes, 34 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CfUw_bXj.js","assets/users-CH8-g1AO.js","assets/followups-CUK0Bej_.js","assets/cis-f8keyiNg.js","assets/price-lists-6qQ0QDHt.js","assets/time-entries-BGWV58SO.js","assets/subcontractors-BYsPuTmU.js","assets/org-members-DnIgV0f-.js","assets/vendor-tanstack-D3Q9Yyxk.js","assets/vendor-react-DrSAzhxl.js","assets/vendor-helmet-CqRzfjPa.js","assets/vendor-supabase-DpwOtkOU.js","assets/vendor-icons-DsBP5CwP.js","assets/dashboard-i_OcaXGr.js","assets/expenses-WvZlsuzr.js","assets/qualification-documents-BqyxEPJS.js","assets/certificate-rebuilds-C-eUY_K7.js","assets/certificate-withdrawals-BPdUL4ik.js","assets/sync-manager-DkQHfIkx.js","assets/photo-store-B42IiEZB.js","assets/intent-store-skKVvrkE.js","assets/countries-CqY4GNqI.js","assets/write-queue-CyJtOmy1.js","assets/hash-KHuahJZW.js","assets/AppShell-C-RheLBE.js","assets/role-utils-Bxbsxa0G.js","assets/CertBoxMark-FzqeIGEx.js","assets/Card-Cc55VNJo.js","assets/CoachTip-TI1RrfFS.js","assets/welcome-flow-CX8GzhEl.js","assets/InvoiceIcon-DTMdlc_2.js","assets/company-BQPOImA8.js","assets/GoogleOneTap-DT9DEqVw.js","assets/LoginPage-D8tX3XjC.js","assets/Input-BXVqRzhd.js","assets/FieldError-BBnxkCNW.js","assets/useAuthProviders-Dmri9oxl.js","assets/usePageSEO-BDLDJIJV.js","assets/SignUpPage-CIj_hh-u.js","assets/locale-content-CeCwYUpZ.js","assets/trades-DmuIFtHb.js","assets/selection-classes-BwQyLCKd.js","assets/sample-images-But4zn-_.js","assets/AuthContinuePage-gKXcUvk3.js","assets/ResetPasswordPage-Baag0I7z.js","assets/DashboardPage-DUJNAFtw.js","assets/query-invalidation-BpzzJaxF.js","assets/PageMasthead-BTC-WB5x.js","assets/useLoadingTimeout-CFIdGxK7.js","assets/engineer-registration-DSntjKvH.js","assets/certificate-types-BXk5-b-k.js","assets/draft-sync-CxU48EPY.js","assets/en-US-DXmYlTrO.js","assets/StatusText-D0Z-THRP.js","assets/invoice-utils-Cdky1NFw.js","assets/DpaAcceptancePrompt-gRd23KIl.js","assets/ResumeProCheckout-B7W3SFgU.js","assets/PropertiesPage-DaO6aeEm.js","assets/useProperties-Dw97HyRf.js","assets/Badge-DNTKMUdD.js","assets/EmptyState-DxGp26ML.js","assets/useFocusTrap-Cy67k12b.js","assets/csv-parser-DANoKi4A.js","assets/RequireDpaForWrite-CVeDQ4Wl.js","assets/AddPropertyPage-BAsIKnfr.js","assets/offline-error-D_8LXzfZ.js","assets/usePropertyMutations-BpxM9XWh.js","assets/Select-CZEvaud3.js","assets/UpgradePrompt-BX-Ki2xz.js","assets/PropertyDetailPage-BRNEBANQ.js","assets/useProperty-gepSXXCm.js","assets/useJobs-D23Cu9UH.js","assets/CertificatesPage-Bzr4AC6f.js","assets/certificate-replacement-BZ3rCGHj.js","assets/DeliveryPaywall-DlU9Mo1X.js","assets/AddCertificatePage-Sdx-wVXV.js","assets/useCertificates-CfmCIAWB.js","assets/useCertificateMutations-DlZbcKDy.js","assets/certificate-seo-data-82Tn1wmd.js","assets/CertCreationClosedNotice-C5xTUT3J.js","assets/CertificateDetailPage-CF14Ex_S.js","assets/useCertificate-BtLl8QL0.js","assets/evaluate-compliance-C48Bg607.js","assets/get-by-path-NvbZYNtT.js","assets/option-labels-sdrJ37f-.js","assets/pdf-safe-text-DQNQu3Sn.js","assets/fetch-image-data-url-DOBMFpYj.js","assets/canonical-DoE6CGnv.js","assets/PhotoLightbox-C9KOGVwF.js","assets/image-compression-BHnf7QJa.js","assets/browser-image-compression-BCyOZMTt.js","assets/tradesman-identity-CN8TEbDP.js","assets/SearchPage-vXyg-Iax.js","assets/AccountPage-CAqV4iS7.js","assets/useStripe-BMCD92ny.js","assets/quickbooks-GMoroQw9.js","assets/xero-Cm7IaJ-z.js","assets/SharedCertificatePage-CaHL0OgJ.js","assets/repeating-title-CCSXITej.js","assets/VerifyPropertyPage-Cox4TKWU.js","assets/LapsedAnswerPage-CQV8LsUg.js","assets/LandingPage--Aoofp8D.js","assets/content-hMrDsBV0.js","assets/PublicPageHeader-B6zP_aNr.js","assets/PublicPageFooter-BHb3HvFq.js","assets/PricingPage-C8KJNe_m.js","assets/PublicShell-sGXMqJTV.js","assets/CertificateInfoPage-CAfK-gUV.js","assets/Breadcrumbs-nxSvTDpg.js","assets/LettingAgentsPage-gPzn1If9.js","assets/FAQItem-_7jld5QG.js","assets/LandlordsPage-V_FXK-os.js","assets/LandlordLegalRequirementsPage-qGf5YSds.js","assets/HolidayLetsPage-DGf3B5SU.js","assets/CampervansPage-DJxUAa0q.js","assets/LegionellaPage--QO9wzov.js","assets/GasEngineersPage-DSrOL9TY.js","assets/PlumbersPage-Bgm5inJ_.js","assets/ElectriciansPage-D-7fZn96.js","assets/FireSafetyPage-D1k3lxkl.js","assets/HowItWorksPage-CQ7YztLj.js","assets/ComparisonPage-D75bS9qY.js","assets/comparison-content-HJiSz2kv.js","assets/ComparisonsIndexPage-CXz7aj0L.js","assets/FeaturesIndexPage-BXcAMg75.js","assets/feature-seo-data-1gZQd5tL.js","assets/FeatureInfoPage-BD--7nWK.js","assets/NotFoundPage-BZHNGl9O.js","assets/YourDataPage-BakQBJOk.js","assets/WhatsNewPage-DKpr8qnk.js","assets/AcsPortfolioGuidePage-BSjO9AXy.js","assets/GuideCtaBlock-CtYOyaYZ.js","assets/WhatsAppShareButton-BOL7LYfl.js","assets/GuidesListingPage-C99XMXRz.js","assets/AiFutureTradeCareersBlogPost-CLG67b9R.js","assets/CertificateDirectoryPage-Ul0dU-iT.js","assets/PortfolioPage-BFzF3Bnx.js","assets/DownloadsPage-L2em0-mr.js","assets/UsReferenceListingPage-DfJwB_cF.js","assets/us-reference-guides-D4AiB_bY.js","assets/UsReferenceGuidePage-CPT5ys1s.js","assets/TradeSymbolsListingPage-BD04zc0_.js","assets/TradeSymbolGuidePage-CcxUKgjh.js","assets/RefrigerantReferencePage-BTYOEuok.js","assets/RefrigerantReadout-CzQ-Mb2G.js","assets/refrigerant-data-CW5RztJC.js","assets/FGasTimeline-D8L0-gdK.js","assets/RefrigerantDetailPage-CqBSANNT.js","assets/RefrigerantReplacementFinderPage-lxfBggaV.js","assets/FGasTimelinePage-B4QTtvnG.js","assets/HeatPumpRoutePage-Dc-iJzt9.js","assets/ToolsIndexPage-DmbYAcam.js","assets/registry-lORDnjFD.js","assets/GasRateCalculatorPage-CqNxadWO.js","assets/GasRateCalculator-BHOoHFYy.js","assets/CalculatorResultActions-Uj2PDMZw.js","assets/handoff-CbXHdGEz.js","assets/pdf-utils-DN6MdDBf.js","assets/currency-Bj3_WE_V.js","assets/CalculatorToolPage-CDSXJ6ks.js","assets/AdminMetricsPage-DZbr3Zga.js","assets/AdminArticlesPage-C9IgDiWL.js","assets/TermsPage-B7enApTG.js","assets/PrivacyPage-D7cdKeYJ.js","assets/DpaPage-C-b89F13.js","assets/DeleteDataPage-BptLr_oa.js","assets/GenericCertFormPage-B4vdBxUx.js","assets/harvest-client-DG2biH7D.js","assets/useClients-D0UwbUkS.js","assets/JobsPage-DTB1calS.js","assets/CreateJobPage-DQpKQp-H.js","assets/useJobMutations-4Wxqr-zW.js","assets/useClientMutations-febVvKyb.js","assets/ClientPicker-jq8gAbqL.js","assets/JobDetailPage-2Ca9dMoH.js","assets/useQuotes-12d_JbWH.js","assets/useInvoices-A9zzVhcm.js","assets/useExpenses-CC5IDJPw.js","assets/useTimeEntries-CRBt6hVA.js","assets/useSubcontractorMutations-FR0SNchb.js","assets/ClientsPage-Dabj2tKE.js","assets/AddClientPage-D-C7eaMf.js","assets/ClientDetailPage-Cb1j1xWD.js","assets/QuotesPage-DaFzyJrP.js","assets/usePendingIntents-CBYU83sv.js","assets/QuoteBuilderPage-Dp7GfCDd.js","assets/PriceListPicker-CobCUxxn.js","assets/usePriceLists-m0dXNC3S.js","assets/useQuoteMutations-D6NNMIP6.js","assets/LineItemEditor-CJVuh1Z7.js","assets/PendingQuotePage-Cq2FSJ5M.js","assets/QuoteDetailPage-CbExcDQ5.js","assets/FollowupPanel-BXQdxGuL.js","assets/QuoteEditPage-CNUSJ70Q.js","assets/QuoteAcceptPage-d7AnkRhs.js","assets/InvoiceViewPage-CGckGfXu.js","assets/TimesheetsPage-CZPFuue2.js","assets/SchedulePage-BmKDlVKI.js","assets/SubcontractorsPage-F-0otqoE.js","assets/useEnsureOrg-D6H4vp3F.js","assets/PriceListPage-Bd_6rhYb.js","assets/InvoicesPage-DgXQmcIE.js","assets/InvoiceBuilderPage-BxFvFCjD.js","assets/useInvoiceMutations-BDEAjKvj.js","assets/PendingCertificatePage-DF1uCF5f.js","assets/PendingInvoicePage-BzJMEY6M.js","assets/InvoiceDetailPage-CbeNraxv.js","assets/InvoiceEditPage-uGQk8kDp.js","assets/QbCallbackPage-CBznZd1Q.js","assets/XeroCallbackPage-DhN5ylbo.js","assets/StripeCallbackPage-B4jv5ypb.js","assets/CertificateVerifyPage-s-kE9065.js","assets/TeamPage-
1DMm8EUeO.js","assets/AcceptInvitePage-BGFcpNsk.js","assets/ExpensesPage-CqDgBDD8.js","assets/AddExpensePage-BA7pddJ7.js","assets/index-Dv7UZaVN.js"])))=>i.map(i=>d[i]);
2import{a as sO,r as Q,o as Ji,b as Um,j as S,u as t0,Q as oO,P as cO}from"./vendor-tanstack-D3Q9Yyxk.js";import{e as uO,L as lO,N as Hn,a as n0,B as dO,R as fO,f as V,b as pO}from"./vendor-react-DrSAzhxl.js";import{a as mO}from"./vendor-helmet-CqRzfjPa.js";import{c as _O}from"./vendor-supabase-DpwOtkOU.js";import{ax as hO,X as jm,T as gO,av as yO}from"./vendor-icons-DsBP5CwP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"8bad1ef1d1baf20043d4024cccb275075dbee4da"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9e135b3b-cd0a-48ab-9460-b7a8e5f738de",e._sentryDebugIdIdentifier="sentry-dbid-9e135b3b-cd0a-48ab-9460-b7a8e5f738de")}catch{}})();(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))a(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&a(f)}).observe(document,{childList:!0,subtree:!0});function i(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function a(c){if(c.ep)return;c.ep=!0;const u=i(c);fetch(c.href,u)}})();function vO(e){const t=this.length,i=Math.trunc(Number(e))||0,a=i<0?t+i:i;return a<0||a>=t?void 0:this[a]}Array.prototype.at||Object.defineProperty(Array.prototype,"at",{value:vO,writable:!0,configurable:!0,enumerable:!1});var pp={exports:{}},go={},mp={exports:{}},_p={};var Kv;function EO(){return Kv||(Kv=1,(function(e){function t(M,q){var H=M.length;M.push(q);e:for(;0<H;){var te=H-1>>>1,W=M[te];if(0<c(W,q))M[te]=q,M[H]=W,H=te;else break e}}function i(M){return M.length===0?null:M[0]}function a(M){if(M.length===0)return null;var q=M[0],H=M.pop();if(H!==q){M[0]=H;e:for(var te=0,W=M.length,ce=W>>>1;te<ce;){var B=2*(te+1)-1,X=M[B],ie=B+1,_e=M[ie];if(0>c(X,H))ie<W&&0>c(_e,X)?(M[te]=_e,M[ie]=H,te=ie):(M[te]=X,M[B]=H,te=B);else if(ie<W&&0>c(_e,H))M[te]=_e,M[ie]=H,te=ie;else break e}}return q}function c(M,q){var H=M.sortIndex-q.sortIndex;return H!==0?H:M.id-q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var f=Date,p=f.now();e.unstable_now=function(){return f.now()-p}}var m=[],h=[],v=1,g=null,b=3,T=!1,R=!1,x=!1,P=!1,$=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,le=typeof setImmediate<"u"?setImmediate:null;function de(M){for(var q=i(h);q!==null;){if(q.callback===null)a(h);else if(q.startTime<=M)a(h),q.sortIndex=q.expirationTime,t(m,q);else break;q=i(h)}}function he(M){if(x=!1,de(M),!R)if(i(m)!==null)R=!0,re||(re=!0,fe());else{var q=i(h);q!==null&&He(he,q.startTime-M)}}var re=!1,z=-1,Z=5,Ie=-1;function J(){return P?!0:!(e.unstable_now()-Ie<Z)}function ne(){if(P=!1,re){var M=e.unstable_now();Ie=M;var q=!0;try{e:{R=!1,x&&(x=!1,K(z),z=-1),T=!0;var H=b;try{t:{for(de(M),g=i(m);g!==null&&!(g.expirationTime>M&&J());){var te=g.callback;if(typeof te=="function"){g.callback=null,b=g.priorityLevel;var W=te(g.expirationTime<=M);if(M=e.unstable_now(),typeof W=="function"){g.callback=W,de(M),q=!0;break t}g===i(m)&&a(m),de(M)}else a(m);g=i(m)}if(g!==null)q=!0;else{var ce=i(h);ce!==null&&He(he,ce.startTime-M),q=!1}}break e}finally{g=null,b=H,T=!1}q=void 0}}finally{q?fe():re=!1}}}var fe;if(typeof le=="function")fe=function(){le(ne)};else if(typeof MessageChannel<"u"){var De=new MessageChannel,me=De.port2;De.port1.onmessage=ne,fe=function(){me.postMessage(null)}}else fe=function(){$(ne,0)};function He(M,q){z=$(function(){M(e.unstable_now())},q)}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(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(M){switch(b){case 1:case 2:case 3:var q=3;break;default:q=b}var H=b;b=q;try{return M()}finally{b=H}},e.unstable_requestPaint=function(){P=!0},e.unstable_runWithPriority=function(M,q){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var H=b;b=M;try{return q()}finally{b=H}},e.unstable_scheduleCallback=function(M,q,H){var te=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?te+H:te):H=te,M){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=H+W,M={id:v++,callback:q,priorityLevel:M,startTime:H,expirationTime:W,sortIndex:-1},H>te?(M.sortIndex=H,t(h,M),i(m)===null&&M===i(h)&&(x?(K(z),z=-1):x=!0,He(he,H-te))):(M.sortIndex=W,t(m,M),R||T||(R=!0,re||(re=!0,fe()))),M},e.unstable_shouldYield=J,e.unstable_wrapCallback=function(M){var q=b;return function(){var H=b;b=q;try{return M.apply(this,arguments)}finally{b=H}}}})(_p)),_p}var Jv;function SO(){return Jv||(Jv=1,mp.exports=EO()),mp.exports}var Wv;function bO(){if(Wv)return go;Wv=1;var e=SO(),t=sO(),i=uO();function a(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)r+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function u(n){var r=n,s=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(s=r.return),n=r.return;while(n)}return r.tag===3?s:null}function f(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function p(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function m(n){if(u(n)!==n)throw Error(a(188))}function h(n){var r=n.alternate;if(!r){if(r=u(n),r===null)throw Error(a(188));return r!==n?null:n}for(var s=n,o=r;;){var l=s.return;if(l===null)break;var d=l.alternate;if(d===null){if(o=l.return,o!==null){s=o;continue}break}if(l.child===d.child){for(d=l.child;d;){if(d===s)return m(l),n;if(d===o)return m(l),r;d=d.sibling}throw Error(a(188))}if(s.return!==o.return)s=l,o=d;else{for(var _=!1,E=l.child;E;){if(E===s){_=!0,s=l,o=d;break}if(E===o){_=!0,o=l,s=d;break}E=E.sibling}if(!_){for(E=d.child;E;){if(E===s){_=!0,s=d,o=l;break}if(E===o){_=!0,o=d,s=l;break}E=E.sibling}if(!_)throw Error(a(189))}}if(s.alternate!==o)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?n:r}function v(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=v(n),r!==null)return r;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),le=Symbol.for("react.context"),de=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),Ie=Symbol.for("react.activity"),J=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function fe(n){return n===null||typeof n!="object"?null:(n=ne&&n[ne]||n["@@iterator"],typeof n=="function"?n:null)}var De=Symbol.for("react.client.reference");function me(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===De?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case x:return"Fragment";case $:return"Profiler";case P:return"StrictMode";case he:return"Suspense";case re:return"SuspenseList";case Ie:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case R:return"Portal";case le:return n.displayName||"Context";case K:return(n._context.displayName||"Context")+".Consumer";case de:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case z:return r=n.displayName||null,r!==null?r:me(n.type)||"Memo";case Z:r=n._payload,n=n._init;try{return me(n(r))}catch{}}return null}var He=Array.isArray,M=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},te=[],W=-1;function ce(n){return{current:n}}function B(n){0>W||(n.current=te[W],te[W]=null,W--)}function X(n,r){W++,te[W]=n.current,n.current=r}var ie=ce(null),_e=ce(null),Re=ce(null),se=ce(null);function Ee(n,r){switch(X(Re,r),X(_e,n),X(ie,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?vv(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=vv(r),n=Ev(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}B(ie),X(ie,n)}function ge(){B(ie),B(_e),B(Re)}function We(n){n.memoizedState!==null&&X(se,n);var r=ie.current,s=Ev(r,n.type);r!==s&&(X(_e,n),X(ie,s))}function ot(n){_e.current===n&&(B(ie),B(_e)),se.current===n&&(B(se),po._currentValue=H)}var at,ra;function Tt(n){if(at===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);at=r&&r[1]||"",ra=-1<s.stack.indexOf(`
3    at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
4`+at+n+ra}var ft=!1;function nt(n,r){if(!n||ft)return"";ft=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(r){var j=function(){throw Error()};if(Object.defineProperty(j.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(j,[])}catch(N){var L=N}Reflect.construct(n,[],j)}
vendor: 13,371 bytes, lines 4-9
4else{try{j.call()}catch(N){L=N}n.call(j.prototype)}}else{try{throw Error()}catch(N){L=N}(j=n())&&typeof j.catch=="function"&&j.catch(function(){})}}catch(N){if(N&&L&&typeof N.stack=="string")return[N.stack,L.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),_=d[0],E=d[1];if(_&&E){var A=_.split(`
5`),C=E.split(`
6`);for(l=o=0;o<A.length&&!A[o].includes("DetermineComponentFrameRoot");)o++;for(;l<C.length&&!C[l].includes("DetermineComponentFrameRoot");)l++;if(o===A.length||l===C.length)for(o=A.length-1,l=C.length-1;1<=o&&0<=l&&A[o]!==C[l];)l--;for(;1<=o&&0<=l;o--,l--)if(A[o]!==C[l]){if(o!==1||l!==1)do if(o--,l--,0>l||A[o]!==C[l]){var k=`
7`+A[o].replace(" at new "," at ");return n.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",n.displayName)),k}while(1<=o&&0<=l);break}}}finally{ft=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?Tt(s):""}function qt(n,r){switch(n.tag){case 26:case 27:case 5:return Tt(n.type);case 16:return Tt("Lazy");case 13:return n.child!==r&&r!==null?Tt("Suspense Fallback"):Tt("Suspense");case 19:return Tt("SuspenseList");case 0:case 15:return nt(n.type,!1);case 11:return nt(n.type.render,!1);case 1:return nt(n.type,!0);case 31:return Tt("Activity");default:return""}}function bi(n){try{var r="",s=null;do r+=qt(n,s),s=n,n=n.return;while(n);return r}catch(o){return`
8Error generating stack: `+o.message+`
9`+o.stack}}var Ti=Object.prototype.hasOwnProperty,je=e.unstable_scheduleCallback,Ut=e.unstable_cancelCallback,Ce=e.unstable_shouldYield,At=e.unstable_requestPaint,Se=e.unstable_now,Ai=e.unstable_getCurrentPriorityLevel,J_=e.unstable_ImmediatePriority,W_=e.unstable_UserBlockingPriority,oc=e.unstable_NormalPriority,VA=e.unstable_LowPriority,Z_=e.unstable_IdlePriority,qA=e.log,HA=e.unstable_setDisableYieldValue,As=null,tn=null;function Lr(n){if(typeof qA=="function"&&HA(n),tn&&typeof tn.setStrictMode=="function")try{tn.setStrictMode(As,n)}catch{}}var nn=Math.clz32?Math.clz32:YA,FA=Math.log,GA=Math.LN2;function YA(n){return n>>>=0,n===0?32:31-(FA(n)/GA|0)|0}var cc=256,uc=262144,lc=4194304;function Ri(n){var r=n&42;if(r!==0)return r;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function dc(n,r,s){var o=n.pendingLanes;if(o===0)return 0;var l=0,d=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var E=o&134217727;return E!==0?(o=E&~d,o!==0?l=Ri(o):(_&=E,_!==0?l=Ri(_):s||(s=E&~n,s!==0&&(l=Ri(s))))):(E=o&~d,E!==0?l=Ri(E):_!==0?l=Ri(_):s||(s=o&~n,s!==0&&(l=Ri(s)))),l===0?0:r!==0&&r!==l&&(r&d)===0&&(d=l&-l,s=r&-r,d>=s||d===32&&(s&4194048)!==0)?r:l}function Rs(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function $A(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 eh(){var n=lc;return lc<<=1,(lc&62914560)===0&&(lc=4194304),n}function ed(n){for(var r=[],s=0;31>s;s++)r.push(n);return r}function Os(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function XA(n,r,s,o,l,d){var _=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var E=n.entanglements,A=n.expirationTimes,C=n.hiddenUpdates;for(s=_&~s;0<s;){var k=31-nn(s),j=1<<k;E[k]=0,A[k]=-1;var L=C[k];if(L!==null)for(C[k]=null,k=0;k<L.length;k++){var N=L[k];N!==null&&(N.lane&=-536870913)}s&=~j}o!==0&&th(n,o,0),d!==0&&l===0&&n.tag!==0&&(n.suspendedLanes|=d&~(_&~r))}function th(n,r,s){n.pendingLanes|=r,n.suspendedLanes&=~r;var o=31-nn(r);n.entangledLanes|=r,n.entanglements[o]=n.entanglements[o]|1073741824|s&261930}function nh(n,r){var s=n.entangledLanes|=r;for(n=n.entanglements;s;){var o=31-nn(s),l=1<<o;l&r|n[o]&r&&(n[o]|=r),s&=~l}}function rh(n,r){var s=r&-r;return s=(s&42)!==0?1:td(s),(s&(n.suspendedLanes|r))!==0?0:s}function td(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function nd(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function ih(){var n=q.p;return n!==0?n:(n=window.event,n===void 0?32:Hv(n.type))}function ah(n,r){var s=q.p;try{return q.p=n,r()}finally{q.p=s}}var Mr=Math.random().toString(36).slice(2),It="__reactFiber$"+Mr,Ht="__reactProps$"+Mr,ia="__reactContainer$"+Mr,rd="__reactEvents$"+Mr,QA="__reactListeners$"+Mr,KA="__reactHandles$"+Mr,sh="__reactResources$"+Mr,Ds="__reactMarker$"+Mr;function id(n){delete n[It],delete n[Ht],delete n[rd],delete n[QA],delete n[KA]}function aa(n){var r=n[It];if(r)return r;for(var s=n.parentNode;s;){if(r=s[ia]||s[It]){if(s=r.alternate,r.child!==null||s!==null&&s.child!==null)for(n=Dv(n);n!==null;){if(s=n[It])return s;n=Dv(n)}return r}n=s,s=n.parentNode}return null}function sa(n){if(n=n[It]||n[ia]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function ws(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function oa(n){var r=n[sh];return r||(r=n[sh]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function wt(n){n[Ds]=!0}var oh=new Set,ch={};function Oi(n,r){ca(n,r),ca(n+"Capture",r)}function ca(n,r){for(ch[n]=r,n=0;n<r.length;n++)oh.add(r[n])}var JA=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),uh={},lh={};function WA(n){return Ti.call(lh,n)?!0:Ti.call(uh,n)?!1:JA.test(n)?lh[n]=!0:(uh[n]=!0,!1)}function fc(n,r,s){if(WA(r))if(s===null)n.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var o=r.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+s)}}function pc(n,r,s){if(s===null)n.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+s)}}function Kn(n,r,s,o){if(o===null)n.removeAttribute(s);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(r,s,""+o)}}function mn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function dh(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function ZA(n,r,s){var o=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var l=o.get,d=o.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return l.call(this)},set:function(_){s=""+_,d.call(this,_)}}),Object.defineProperty(n,r,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(_){s=""+_},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function ad(n){if(!n._valueTracker){var r=dh(n)?"checked":"value";n._valueTracker=ZA(n,r,""+n[r])}}function fh(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var s=r.getValue(),o="";return n&&(o=dh(n)?n.checked?"true":"false":n.value),n=o,n!==s?(r.setValue(n),!0):!1}function mc(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var eR=/[\n"\\]/g;function _n(n){return n.replace(eR,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function sd(n,r,s,o,l,d,_,E){n.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?n.type=_:n.removeAttribute("type"),r!=null?_==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+mn(r)):n.value!==""+mn(r)&&(n.value=""+mn(r)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),r!=null?od(n,_,mn(r)):s!=null?od(n,_,mn(s)):o!=null&&n.removeAttribute("value"),l==null&&d!=null&&(n.defaultChecked=!!d),l!=null&&(n.checked=l&&typeof l!="function"&&typeof l!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.name=""+mn(E):n.removeAttribute("name")}function ph(n,r,s,o,l,d,_,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(n.type=d),r!=null||s!=null){if(!(d!=="submit"&&d!=="reset"||r!=null)){ad(n);return}s=s!=null?""+mn(s):"",r=r!=null?""+mn(r):s,E||r===n.value||(n.value=r),n.defaultValue=r}o=o??l,o=typeof o!="function"&&typeof o!="symbol"&&!!o,n.checked=E?n.checked:!!o,n.defaultChecked=!!o,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(n.name=_),ad(n)}function od(n,r,s){r==="number"&&mc(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function ua(n,r,s,o){if(n=n.options,r){r={};for(var l=0;l<s.length;l++)r["$"+s[l]]=!0;for(s=0;s<n.length;s++)l=r.hasOwnProperty("$"+n[s].value),n[s].selected!==l&&(n[s].selected=l),l&&o&&(n[s].defaultSelected=!0)}else{for(s=""+mn(s),r=null,l=0;l<n.length;l++){if(n[l].value===s){n[l].selected=!0,o&&(n[l].defaultSelected=!0);return}r!==null||n[l].disabled||(r=n[l])}r!==null&&(r.selected=!0)}}function mh(n,r,s){if(r!=null&&(r=""+mn(r),r!==n.value&&(n.value=r),s==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=s!=null?""+mn(s):""}function _h(n,r,s,o){if(r==null){if(o!=null){if(s!=null)throw Error(a(92));if(He(o)){if(1<o.length)throw Error(a(93));o=o[0]}s=o}s==null&&(s=""),r=s}s=mn(r),n.defaultValue=s,o=n.textContent,o===s&&o!==""&&o!==null&&(n.value=o),ad(n)}function la(n,r){if(r){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=r;return}}n.textContent=r}var tR=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function hh(n,r,s){var o=r.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?o?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":o?n.setProperty(r,s):typeof s!="number"||s===0||tR.has(r)?r==="float"?n.cssFloat=s:n[r]=(""+s).trim():n[r]=s+"px"}function gh(n,r,s){if(r!=null&&typeof r!="object")throw Error(a(62));if(n=n.style,s!=null){for(var o in s)!s.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="");for(var l in r)o=r[l],r.hasOwnProperty(l)&&s[l]!==o&&hh(n,l,o)}else for(var d in r)r.hasOwnProperty(d)&&hh(n,d,r[d])}function cd(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var nR=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
9dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),rR=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function _c(n){return rR.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Jn(){}var ud=null;function ld(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var da=null,fa=null;function yh(n){var r=sa(n);if(r&&(n=r.stateNode)){var s=n[Ht]||null;e:switch(n=r.stateNode,r.type){case"input":if(sd(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),r=s.name,s.type==="radio"&&r!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+_n(""+r)+'"][type="radio"]'),r=0;r<s.length;r++){var o=s[r];if(o!==n&&o.form===n.form){var l=o[Ht]||null;if(!l)throw Error(a(90));sd(o,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(r=0;r<s.length;r++)o=s[r],o.form===n.form&&fh(o)}break e;case"textarea":mh(n,s.value,s.defaultValue);break e;case"select":r=s.value,r!=null&&ua(n,!!s.multiple,r,!1)}}}var dd=!1;function vh(n,r,s){if(dd)return n(r,s);dd=!0;try{var o=n(r);return o}finally{if(dd=!1,(da!==null||fa!==null)&&(nu(),da&&(r=da,n=fa,fa=da=null,yh(r),n)))for(r=0;r<n.length;r++)yh(n[r])}}function xs(n,r){var s=n.stateNode;if(s===null)return null;var o=s[Ht]||null;if(o===null)return null;s=o[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(n=n.type,o=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!o;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(a(231,r,typeof s));return s}var Wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fd=!1;if(Wn)try{var Is={};Object.defineProperty(Is,"passive",{get:function(){fd=!0}}),window.addEventListener("test",Is,Is),window.removeEventListener("test",Is,Is)}catch{fd=!1}var Nr=null,pd=null,hc=null;function Eh(){if(hc)return hc;var n,r=pd,s=r.length,o,l="value"in Nr?Nr.value:Nr.textContent,d=l.length;for(n=0;n<s&&r[n]===l[n];n++);var _=s-n;for(o=1;o<=_&&r[s-o]===l[d-o];o++);return hc=l.slice(n,1<o?1-o:void 0)}function gc(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function yc(){return!0}function Sh(){return!1}function Ft(n){function r(s,o,l,d,_){this._reactName=s,this._targetInst=l,this.type=o,this.nativeEvent=d,this.target=_,this.currentTarget=null;for(var E in n)n.hasOwnProperty(E)&&(s=n[E],this[E]=s?s(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?yc:Sh,this.isPropagationStopped=Sh,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=yc)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=yc)},persist:function(){},isPersistent:yc}),r}var Di={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vc=Ft(Di),Cs=g({},Di,{view:0,detail:0}),iR=Ft(Cs),md,_d,Ls,Ec=g({},Cs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gd,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Ls&&(Ls&&n.type==="mousemove"?(md=n.screenX-Ls.screenX,_d=n.screenY-Ls.screenY):_d=md=0,Ls=n),md)},movementY:function(n){return"movementY"in n?n.movementY:_d}}),bh=Ft(Ec),aR=g({},Ec,{dataTransfer:0}),sR=Ft(aR),oR=g({},Cs,{relatedTarget:0}),hd=Ft(oR),cR=g({},Di,{animationName:0,elapsedTime:0,pseudoElement:0}),uR=Ft(cR),lR=g({},Di,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),dR=Ft(lR),fR=g({},Di,{data:0}),Th=Ft(fR),pR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mR={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_R={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hR(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=_R[n])?!!r[n]:!1}function gd(){return hR}var gR=g({},Cs,{key:function(n){if(n.key){var r=pR[n.key]||n.key;if(r!=="Unidentified")return r}
vendor: 117,212 bytes, lines 9-10
9return n.type==="keypress"?(n=gc(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?mR[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gd,charCode:function(n){return n.type==="keypress"?gc(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?gc(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),yR=Ft(gR),vR=g({},Ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ah=Ft(vR),ER=g({},Cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gd}),SR=Ft(ER),bR=g({},Di,{propertyName:0,elapsedTime:0,pseudoElement:0}),TR=Ft(bR),AR=g({},Ec,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),RR=Ft(AR),OR=g({},Di,{newState:0,oldState:0}),DR=Ft(OR),wR=[9,13,27,32],yd=Wn&&"CompositionEvent"in window,Ms=null;Wn&&"documentMode"in document&&(Ms=document.documentMode);var xR=Wn&&"TextEvent"in window&&!Ms,Rh=Wn&&(!yd||Ms&&8<Ms&&11>=Ms),Oh=" ",Dh=!1;function wh(n,r){switch(n){case"keyup":return wR.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xh(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var pa=!1;function IR(n,r){switch(n){case"compositionend":return xh(r);case"keypress":return r.which!==32?null:(Dh=!0,Oh);case"textInput":return n=r.data,n===Oh&&Dh?null:n;default:return null}}function CR(n,r){if(pa)return n==="compositionend"||!yd&&wh(n,r)?(n=Eh(),hc=pd=Nr=null,pa=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Rh&&r.locale!=="ko"?null:r.data;default:return null}}var LR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ih(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!LR[n.type]:r==="textarea"}function Ch(n,r,s,o){da?fa?fa.push(o):fa=[o]:da=o,r=uu(r,"onChange"),0<r.length&&(s=new vc("onChange","change",null,s,o),n.push({event:s,listeners:r}))}var Ns=null,ks=null;function MR(n){pv(n,0)}function Sc(n){var r=ws(n);if(fh(r))return n}function Lh(n,r){if(n==="change")return r}var Mh=!1;if(Wn){var vd;if(Wn){var Ed="oninput"in document;if(!Ed){var Nh=document.createElement("div");Nh.setAttribute("oninput","return;"),Ed=typeof Nh.oninput=="function"}vd=Ed}else vd=!1;Mh=vd&&(!document.documentMode||9<document.documentMode)}function kh(){Ns&&(Ns.detachEvent("onpropertychange",Ph),ks=Ns=null)}function Ph(n){if(n.propertyName==="value"&&Sc(ks)){var r=[];Ch(r,ks,n,ld(n)),vh(MR,r)}}function NR(n,r,s){n==="focusin"?(kh(),Ns=r,ks=s,Ns.attachEvent("onpropertychange",Ph)):n==="focusout"&&kh()}function kR(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Sc(ks)}function PR(n,r){if(n==="click")return Sc(r)}function UR(n,r){if(n==="input"||n==="change")return Sc(r)}function jR(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var rn=typeof Object.is=="function"?Object.is:jR;function Ps(n,r){if(rn(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var s=Object.keys(n),o=Object.keys(r);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var l=s[o];if(!Ti.call(r,l)||!rn(n[l],r[l]))return!1}return!0}function Uh(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function jh(n,r){var s=Uh(n);n=0;for(var o;s;){if(s.nodeType===3){if(o=n+s.textContent.length,n<=r&&o>=r)return{node:s,offset:r-n};n=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Uh(s)}}function zh(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?zh(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Bh(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=mc(n.document);r instanceof n.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch{s=!1}if(s)n=r.contentWindow;else break;r=mc(n.document)}return r}function Sd(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var zR=Wn&&"documentMode"in document&&11>=document.documentMode,ma=null,bd=null,Us=null,Td=!1;function Vh(n,r,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Td||ma==null||ma!==mc(o)||(o=ma,"selectionStart"in o&&Sd(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Us&&Ps(Us,o)||(Us=o,o=uu(bd,"onSelect"),0<o.length&&(r=new vc("onSelect","select",null,r,s),n.push({event:r,listeners:o}),r.target=ma)))}function wi(n,r){var s={};return s[n.toLowerCase()]=r.toLowerCase(),s["Webkit"+n]="webkit"+r,s["Moz"+n]="moz"+r,s}var _a={animationend:wi("Animation","AnimationEnd"),animationiteration:wi("Animation","AnimationIteration"),animationstart:wi("Animation","AnimationStart"),transitionrun:wi("Transition","TransitionRun"),transitionstart:wi("Transition","TransitionStart"),transitioncancel:wi("Transition","TransitionCancel"),transitionend:wi("Transition","TransitionEnd")},Ad={},qh={};Wn&&(qh=document.createElement("div").style,"AnimationEvent"in window||(delete _a.animationend.animation,delete _a.animationiteration.animation,delete _a.animationstart.animation),"TransitionEvent"in window||delete _a.transitionend.transition);function xi(n){if(Ad[n])return Ad[n];if(!_a[n])return n;var r=_a[n],s;for(s in r)if(r.hasOwnProperty(s)&&s in qh)return Ad[n]=r[s];return n}var Hh=xi("animationend"),Fh=xi("animationiteration"),Gh=xi("animationstart"),BR=xi("transitionrun"),VR=xi("transitionstart"),qR=xi("transitioncancel"),Yh=xi("transitionend"),$h=new Map,Rd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Rd.push("scrollEnd");function wn(n,r){$h.set(n,r),Oi(r,[n])}var bc=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},hn=[],ha=0,Od=0;function Tc(){for(var n=ha,r=Od=ha=0;r<n;){var s=hn[r];hn[r++]=null;var o=hn[r];hn[r++]=null;var l=hn[r];hn[r++]=null;var d=hn[r];if(hn[r++]=null,o!==null&&l!==null){var _=o.pending;_===null?l.next=l:(l.next=_.next,_.next=l),o.pending=l}d!==0&&Xh(s,l,d)}}function Ac(n,r,s,o){hn[ha++]=n,hn[ha++]=r,hn[ha++]=s,hn[ha++]=o,Od|=o,n.lanes|=o,n=n.alternate,n!==null&&(n.lanes|=o)}function Dd(n,r,s,o){return Ac(n,r,s,o),Rc(n)}function Ii(n,r){return Ac(n,null,null,r),Rc(n)}function Xh(n,r,s){n.lanes|=s;var o=n.alternate;o!==null&&(o.lanes|=s);for(var l=!1,d=n.return;d!==null;)d.childLanes|=s,o=d.alternate,o!==null&&(o.childLanes|=s),d.tag===22&&(n=d.stateNode,n===null||n._visibility&1||(l=!0)),n=d,d=d.return;return n.tag===3?(d=n.stateNode,l&&r!==null&&(l=31-nn(s),n=d.hiddenUpdates,o=n[l],o===null?n[l]=[r]:o.push(r),r.lane=s|536870912),d):null}function Rc(n){if(50<ao)throw ao=0,Uf=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var ga={};function HR(n,r,s,o){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(n,r,s,o){return new HR(n,r,s,o)}function wd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Zn(n,r){var s=n.alternate;return s===null?(s=an(n.tag,r,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=r,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&65011712,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,r=n.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s}function Qh(n,r){n.flags&=65011714;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,r=s.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Oc(n,r,s,o,l,d){var _=0;if(o=n,typeof n=="function")wd(n)&&(_=1);else if(typeof n=="string")_=X1(n,s,ie.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case Ie:return n=an(31,s,r,l),n.elementType=Ie,n.lanes=d,n;case x:return Ci(s.children,l,d,r);case P:_=8,l|=24;break;case $:return n=an(12,s,r,l|2),n.elementType=$,n.lanes=d,n;case he:return n=an(13,s,r,l),n.elementType=he,n.lanes=d,n;case re:return n=an(19,s,r,l),n.elementType=re,n.lanes=d,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case le:_=10;break e;case K:_=9;break e;case de:_=11;break e;case z:_=14;break e;case Z:_=16,o=null;break e}_=29,s=Error(a(130,n===null?"null":typeof n,"")),o=null}return r=an(_,s,r,l),r.elementType=n,r.type=o,r.lanes=d,r}function Ci(n,r,s,o){return n=an(7,n,o,r),n.lanes=s,n}function xd(n,r,s){return n=an(6,n,null,r),n.lanes=s,n}function Kh(n){var r=an(18,null,null,0);return r.stateNode=n,r}function Id(n,r,s){return r=an(4,n.children!==null?n.children:[],n.key,r),r.lanes=s,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Jh=new WeakMap;function gn(n,r){if(typeof n=="object"&&n!==null){var s=Jh.get(n);return s!==void 0?s:(r={value:n,source:r,stack:bi(r)},Jh.set(n,r),r)}return{value:n,source:r,stack:bi(r)}}var ya=[],va=0,Dc=null,js=0,yn=[],vn=0,kr=null,jn=1,zn="";function er(n,r){ya[va++]=js,ya[va++]=Dc,Dc=n,js=r}function Wh(n,r,s){yn[vn++]=jn,yn[vn++]=zn,yn[vn++]=kr,kr=n;var o=jn;n=zn;var l=32-nn(o)-1;o&=~(1<<l),s+=1;var d=32-nn(r)+l;if(30<d){var _=l-l%5;d=(o&(1<<_)-1).toString(32),o>>=_,l-=_,jn=1<<32-nn(r)+l|s<<l|o,zn=d+n}else jn=1<<d|s<<l|o,zn=n}function Cd(n){n.return!==null&&(er(n,1),Wh(n,1,0))}function Ld(n){for(;n===Dc;)Dc=ya[--va],ya[va]=null,js=ya[--va],ya[va]=null;for(;n===kr;)kr=yn[--vn],yn[vn]=null,zn=yn[--vn],yn[vn]=null,jn=yn[--vn],yn[vn]=null}function Zh(n,r){yn[vn++]=jn,yn[vn++]=zn,yn[vn++]=kr,jn=r.id,zn=r.overflow,kr=n}var Ct=null,rt=null,ze=!1,Pr=null,En=!1,Md=Error(a(519));function Ur(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zs(gn(r,n)),Md}function eg(n){var r=n.stateNode,s=n.type,o=n.memoizedProps;switch(r[It]=n,r[Ht]=o,s){case"dialog":Me("cancel",r),Me("close",r);break;case"iframe":case"object":case"embed":Me("load",r);break;case"video":case"audio":for(s=0;s<oo.length;s++)Me(oo[s],r);break;case"source":Me("error",r);break;case"img":case"image":case"link":Me("error",r),Me("load",r);break;case"details":Me("toggle",r);break;case"input":Me("invalid",r),ph(r,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Me("invalid",r);break;case"textarea":Me("invalid",r),_h(r,o.value,o.defaultValue,o.children)}s=o.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||r.textContent===""+s||o.suppressHydrationWarning===!0||gv(r.textContent,s)?(o.popover!=null&&(Me("beforetoggle",r),Me("toggle",r)),o.onScroll!=null&&Me("scroll",r),o.onScrollEnd!=null&&Me("scrollend",r),o.onClick!=null&&(r.onclick=Jn),r=!0):r=!1,r||Ur(n,!0)}function tg(n){for(Ct=n.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:En=!1;return;case 27:case 3:En=!0;return;default:Ct=Ct.return}}function Ea(n){if(n!==Ct)return!1;if(!ze)return tg(n),ze=!0,!1;var r=n.tag,s;if((s=r!==3&&r!==27)&&((s=r===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||Wf(n.type,n.memoizedProps)),s=!s),s&&rt&&Ur(n),tg(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));rt=Ov(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));rt=Ov(n)}else r===27?(r=rt,Jr(n.type)?(n=rp,rp=null,rt=n):rt=r):rt=Ct?bn(n.stateNode.nextSibling):null;return!0}function Li(){rt=Ct=null,ze=!1}function Nd(){var n=Pr;return n!==null&&(Xt===null?Xt=n:Xt.push.apply(Xt,n),Pr=null),n}function zs(n){Pr===null?Pr=[n]:Pr.push(n)}var kd=ce(null),Mi=null,tr=null;function jr(n,r,s){X(kd,r._currentValue),r._currentValue=s}function nr(n){n._currentValue=kd.current,B(kd)}function Pd(n,r,s){for(;n!==null;){var o=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,o!==null&&(o.childLanes|=r)):o!==null&&(o.childLanes&r)!==r&&(o.childLanes|=r),n===s)break;n=n.return}}function Ud(n,r,s,o){var l=n.child;for(l!==null&&(l.return=n);l!==null;){var d=l.dependencies;if(d!==null){var _=l.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=l;for(var A=0;A<r.length;A++)if(E.context===r[A]){d.lanes|=s,E=d.alternate,E!==null&&(E.lanes|=s),Pd(d.return,s,n),o||(_=null);break e}d=E.next}}else if(l.tag===18){if(_=l.return,_===null)throw Error(a(341));_.lanes|=s,d=_.alternate,d!==null&&(d.lanes|=s),Pd(_,s,n),_=null}else _=l.child;if(_!==null)_.return=l;else for(_=l;_!==null;){if(_===n){_=null;break}if(l=_.sibling,l!==null){l.return=_.return,_=l;break}_=_.return}l=_}}function Sa(n,r,s,o){n=null;for(var l=r,d=!1;l!==null;){if(!d){if((l.flags&524288)!==0)d=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var _=l.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var E=l.type;rn(l.pendingProps.value,_.value)||(n!==null?n.push(E):n=[E])}}else if(l===se.current){if(_=l.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(n!==null?n.push(po):n=[po])}l=l.return}n!==null&&Ud(r,n,s,o),r.flags|=262144}function wc(n){for(n=n.firstContext;n!==null;){if(!rn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Ni(n){Mi=n,tr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Lt(n){return ng(Mi,n)}function xc(n,r){return Mi===null&&Ni(n),ng(n,r)}function ng(n,r){var s=r._currentValue;if(r={context:r,memoizedValue:s,next:null},tr===null){if(n===null)throw Error(a(308));tr=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else tr=tr.next=r;return s}var FR=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(s,o){n.push(o)}};this.abort=function(){r.aborted=!0,n.forEach(function(s){return s()})}},GR=e.unstable_scheduleCallback,YR=e.unstable_NormalPriority,ht={$$typeof:le,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function jd(){return{controller:new FR,data:new Map,refCount:0}}function Bs(n){n.refCount--,n.refCount===0&&GR(YR,function(){n.controller.abort()})}var Vs=null,zd=0,ba=0,Ta=null;function $R(n,r){if(Vs===null){var s=Vs=[];zd=0,ba=Hf(),Ta={status:"pending",value:void 0,then:function(o){s.push(o)}}}return zd++,r.then(rg,rg),r}function rg(){if(--zd===0&&Vs!==null){Ta!==null&&(Ta.status="fulfilled");var n=Vs;Vs=null,ba=0,Ta=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function XR(n,r){var s=[],o={status:"pending",value:null,reason:null,then:function(l){s.push(l)}};return n.then(function(){o.status="fulfilled",o.value=r;for(var l=0;l<s.length;l++)(0,s[l])(r)},function(l){for(o.status="rejected",o.reason=l,l=0;l<s.length;l++)(0,s[l])(void 0)}),o}var ig=M.S;M.S=function(n,r){Vy=Se(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&$R(n,r),ig!==null&&ig(n,r)};var ki=ce(null);function Bd(){var n=ki.current;return n!==null?n:Ze.pooledCache}function Ic(n,r){r===null?X(ki,ki.current):X(ki,r.pool)}function ag(){var n=Bd();return n===null?null:{parent:ht._currentValue,pool:n}}var Aa=Error(a(460)),Vd=Error(a(474)),Cc=Error(a(542)),Lc={then:function(){}};function sg(n){return n=n.status,n==="fulfilled"||n==="rejected"}function og(n,r,s){switch(s=n[s],s===void 0?n.push(r):s!==r&&(r.then(Jn,Jn),r=s),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,ug(n),n;default:if(typeof r.status=="string")r.then(Jn,Jn);else{if(n=Ze,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(o){if(r.status==="pending"){var l=r;l.status="fulfilled",l.value=o}},function(o){if(r.status==="pending"){var l=r;l.status="rejected",l.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,ug(n),n}throw Ui=r,Aa}}function Pi(n){try{var r=n._init;return r(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Ui=s,Aa):s}}var Ui=null;function cg(){if(Ui===null)throw Error(a(459));var n=Ui;return Ui=null,n}function ug(n){if(n===Aa||n===Cc)throw Error(a(483))}var Ra=null,qs=0;function Mc(n){var r=qs;return qs+=1,Ra===null&&(Ra=[]),og(Ra,n,r)}function Hs(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function Nc(n,r){throw r.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function lg(n){function r(w,O){if(n){var I=w.deletions;I===null?(w.deletions=[O],w.flags|=16):I.push(O)}}function s(w,O){if(!n)return null;for(;O!==null;)r(w,O),O=O.sibling;return null}function o(w){for(var O=new Map;w!==null;)w.key!==null?O.set(w.key,w):O.set(w.index,w),w=w.sibling;return O}function l(w,O){return w=Zn(w,O),w.index=0,w.sibling=null,w}function d(w,O,I){return w.index=I,n?(I=w.alternate,I!==null?(I=I.index,I<O?(w.flags|=67108866,O):I):(w.flags|=67108866,O)):(w.flags|=1048576,O)}function _(w){return n&&w.alternate===null&&(w.flags|=67108866),w}function E(w,O,I,U){return O===null||O.tag!==6?(O=xd(I,w.mode,U),O.return=w,O):(O=l(O,I),O.return=w,O)}function A(w,O,I,U){var ue=I.type;return ue===x?k(w,O,I.props.children,U,I.key):O!==null&&(O.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Z&&Pi(ue)===O.type)?(O=l(O,I.props),Hs(O,I),O.return=w,O):(O=Oc(I.type,I.key,I.props,null,w.mode,U),Hs(O,I),O.return=w,O)}function C(w,O,I,U){return O===null||O.tag!==4||O.stateNode.containerInfo!==I.containerInfo||O.stateNode.implementation!==I.implementation?(O=Id(I,w.mode,U),O.return=w,O):(O=l(O,I.children||[]),O.return=w,O)}function k(w,O,I,U,ue){return O===null||O.tag!==7?(O=Ci(I,w.mode,U,ue),O.return=w,O):(O=l(O,I),O.return=w,O)}function j(w,O,I){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=xd(""+O,w.mode,I),O.return=w,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case T:return I=Oc(O.type,O.key,O.props,null,w.mode,I),Hs(I,O),I.return=w,I;case R:return O=Id(O,w.mode,I),O.return=w,O;case Z:return O=Pi(O),j(w,O,I)}if(He(O)||fe(O))return O=Ci(O,w.mode,I,null),O.return=w,O;if(typeof O.then=="function")return j(w,Mc(O),I);if(O.$$typeof===le)return j(w,xc(w,O),I);Nc(w,O)}return null}function L(w,O,I,U){var ue=O!==null?O.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return ue!==null?null:E(w,O,""+I,U);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case T:return I.key===ue?A(w,O,I,U):null;case R:return I.key===ue?C(w,O,I,U):null;case Z:return I=Pi(I),L(w,O,I,U)}if(He(I)||fe(I))return ue!==null?null:k(w,O,I,U,null);if(typeof I.then=="function")return L(w,O,Mc(I),U);if(I.$$typeof===le)return L(w,O,xc(w,I),U);Nc(w,I)}return null}function N(w,O,I,U,ue){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return w=w.get(I)||null,E(O,w,""+U,ue);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case T:return w=w.get(U.key===null?I:U.key)||null,A(O,w,U,ue);case R:return w=w.get(U.key===null?I:U.key)||null,C(O,w,U,ue);case Z:return U=Pi(U),N(w,O,I,U,ue)}if(He(U)||fe(U))return w=w.get(I)||null,k(O,w,U,ue,null);if(typeof U.then=="function")return N(w,O,I,Mc(U),ue);if(U.$$typeof===le)return N(w,O,I,xc(O,U),ue);Nc(O,U)}return null}function ae(w,O,I,U){for(var ue=null,Fe=null,oe=O,we=O=0,Pe=null;oe!==null&&we<I.length;we++){oe.index>we?(Pe=oe,oe=null):Pe=oe.sibling;var Ge=L(w,oe,I[we],U);if(Ge===null){oe===null&&(oe=Pe);break}n&&oe&&Ge.alternate===null&&r(w,oe),O=d(Ge,O,we),Fe===null?ue=Ge:Fe.sibling=Ge,Fe=Ge,oe=Pe}if(we===I.length)return s(w,oe),ze&&er(w,we),ue;if(oe===null){for(;we<I.length;we++)oe=j(w,I[we],U),oe!==null&&(O=d(oe,O,we),Fe===null?ue=oe:Fe.sibling=oe,Fe=oe);return ze&&er(w,we),ue}for(oe=o(oe);we<I.length;we++)Pe=N(oe,w,we,I[we],U),Pe!==null&&(n&&Pe.alternate!==null&&oe.delete(Pe.key===null?we:Pe.key),O=d(Pe,O,we),Fe===null?ue=Pe:Fe.sibling=Pe,Fe=Pe);return n&&oe.forEach(function(ni){return r(w,ni)}),ze&&er(w,we),ue}function pe(w,O,I,U){if(I==null)throw Error(a(151));for(var ue=null,Fe=null,oe=O,we=O=0,Pe=null,Ge=I.next();oe!==null&&!Ge.done;we++,Ge=I.next()){oe.index>we?(Pe=oe,oe=null):Pe=oe.sibling;var ni=L(w,oe,Ge.value,U);if(ni===null){oe===null&&(oe=Pe);break}n&&oe&&ni.alternate===null&&r(w,oe),O=d(ni,O,we),Fe===null?ue=ni:Fe.sibling=ni,Fe=ni,oe=Pe}if(Ge.done)return s(w,oe),ze&&er(w,we),ue;if(oe===null){for(;!Ge.done;we++,Ge=I.next())Ge=j(w,Ge.value,U),Ge!==null&&(O=d(Ge,O,we),Fe===null?ue=Ge:Fe.sibling=Ge,Fe=Ge);return ze&&er(w,we),ue}for(oe=o(oe);!Ge.done;we++,Ge=I.next())Ge=N(oe,w,we,Ge.value,U),Ge!==null&&(n&&Ge.alternate!==null&&oe.delete(Ge.key===null?we:Ge.key),O=d(Ge,O,we),Fe===null?ue=Ge:Fe.sibling=Ge,Fe=Ge);return n&&oe.forEach(function(aO){return r(w,aO)}),ze&&er(w,we),ue}function Je(w,O,I,U){if(typeof I=="object"&&I!==null&&I.type===x&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case T:e:{for(var ue=I.key;O!==null;){if(O.key===ue){if(ue=I.type,ue===x){if(O.tag===7){s(w,O.sibling),U=l(O,I.props.children),U.return=w,w=U;break e}}else if(O.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Z&&Pi(ue)===O.type){s(w,O.sibling),U=l(O,I.props),Hs(U,I),U.return=w,w=U;break e}s(w,O);break}else r(w,O);O=O.sibling}I.type===x?(U=Ci(I.props.children,w.mode,U,I.key),U.return=w,w=U):(U=Oc(I.type,I.key,I.props,null,w.mode,U),Hs(U,I),U.return=w,w=U)}return _(w);case R:e:{for(ue=I.key;O!==null;){if(O.key===ue)if(O.tag===4&&O.stateNode.containerInfo===I.containerInfo&&O.stateNode.implementation===I.implementation){s(w,O.sibling),U=l(O,I.children||[]),U.return=w,w=U;break e}else{s(w,O);break}else r(w,O);O=O.sibling}U=Id(I,w.mode,U),U.return=w,w=U}return _(w);case Z:return I=Pi(I),Je(w,O,I,U)}if(He(I))return ae(w,O,I,U);if(fe(I)){if(ue=fe(I),typeof ue!="function")throw Error(a(150));return I=ue.call(I),pe(w,O,I,U)}if(typeof I.then=="function")return Je(w,O,Mc(I),U);if(I.$$typeof===le)return Je(w,O,xc(w,I),U);Nc(w,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,O!==null&&O.tag===6?(s(w,O.sibling),U=l(O,I),U.return=w,w=U):(s(w,O),U=xd(I,w.mode,U),U.return=w,w=U),_(w)):s(w,O)}return function(w,O,I,U){try{qs=0;var ue=Je(w,O,I,U);return Ra=null,ue}catch(oe){if(oe===Aa||oe===Cc)throw oe;var Fe=an(29,oe,null,w.mode);return Fe.lanes=U,Fe.return=w,Fe}}}var ji=lg(!0),dg=lg(!1),zr=!1;function qd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hd(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Br(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Vr(n,r,s){var o=n.updateQueue;if(o===null)return null;if(o=o.shared,(Ye&2)!==0){var l=o.pending;return l===null?r.next=r:(r.next=l.next,l.next=r),o.pending=r,r=Rc(n),Xh(n,null,s),r}return Ac(n,o,r,s),Rc(n)}function Fs(n,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194048)!==0)){var o=r.lanes;o&=n.pendingLanes,s|=o,r.lanes=s,nh(n,s)}}function Fd(n,r){var s=n.updateQueue,o=n.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var l=null,d=null;if(s=s.firstBaseUpdate,s!==null){do{var _={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};d===null?l=d=_:d=d.next=_,s=s.next}while(s!==null);d===null?l=d=r:d=d.next=r}else l=d=r;s={baseState:o.baseState,firstBaseUpdate:l,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=r:n.next=r,s.lastBaseUpdate=r}var Gd=!1;function Gs(){if(Gd){var n=Ta;if(n!==null)throw n}}function Ys(n,r,s,o){Gd=!1;var l=n.updateQueue;zr=!1;var d=l.firstBaseUpdate,_=l.lastBaseUpdate,E=l.shared.pending;if(E!==null){l.shared.pending=null;var A=E,C=A.next;A.next=null,_===null?d=C:_.next=C,_=A;var k=n.alternate;k!==null&&(k=k.updateQueue,E=k.lastBaseUpdate,E!==_&&(E===null?k.firstBaseUpdate=C:E.next=C,k.lastBaseUpdate=A))}if(d!==null){var j=l.baseState;_=0,k=C=A=null,E=d;do{var L=E.lane&-536870913,N=L!==E.lane;if(N?(ke&L)===L:(o&L)===L){L!==0&&L===ba&&(Gd=!0),k!==null&&(k=k.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ae=n,pe=E;L=r;var Je=s;switch(pe.tag){case 1:if(ae=pe.payload,typeof ae=="function"){j=ae.call(Je,j,L);break e}j=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=pe.payload,L=typeof ae=="function"?ae.call(Je,j,L):ae,L==null)break e;j=g({},j,L);break e;case 2:zr=!0}}L=E.callback,L!==null&&(n.flags|=64,N&&(n.flags|=8192),N=l.callbacks,N===null?l.callbacks=[L]:N.push(L))}else N={lane:L,tag:E.tag,payload:E.payload,callback:E.callback,next:null},k===null?(C=k=N,A=j):k=k.next=N,_|=L;if(E=E.next,E===null){if(E=l.shared.pending,E===null)break;N=E,E=N.next,N.next=null,l.lastBaseUpdate=N,l.shared.pending=null}}while(!0);k===null&&(A=j),l.baseState=A,l.firstBaseUpdate=C,l.lastBaseUpdate=k,d===null&&(l.shared.lanes=0),Yr|=_,n.lanes=_,n.memoizedState=j}}function fg(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function pg(n,r){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)fg(s[n],r)}var Oa=ce(null),kc=ce(0);function mg(n,r){n=dr,X(kc,n),X(Oa,r),dr=n|r.baseLanes}function Yd(){X(kc,dr),X(Oa,Oa.current)}function $d(){dr=kc.current,B(Oa),B(kc)}var sn=ce(null),Sn=null;function qr(n){var r=n.alternate;X(pt,pt.current&1),X(sn,n),Sn===null&&(r===null||Oa.current!==null||r.memoizedState!==null)&&(Sn=n)}function Xd(n){X(pt,pt.current),X(sn,n),Sn===null&&(Sn=n)}function _g(n){n.tag===22?(X(pt,pt.current),X(sn,n),Sn===null&&(Sn=n)):Hr()}function Hr(){X(pt,pt.current),X(sn,sn.current)}function on(n){B(sn),Sn===n&&(Sn=null),B(pt)}var pt=ce(0);function Pc(n){for(var r=n;r!==null;){if(r.tag===13){var s=r.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||tp(s)||np(s)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var rr=0,Oe=null,Qe=null,gt=null,Uc=!1,Da=!1,zi=!1,jc=0,$s=0,wa=null,QR=0;function ct(){throw Error(a(321))}function Qd(n,r){if(r===null)return!1;for(var s=0;s<r.length&&s<n.length;s++)if(!rn(n[s],r[s]))return!1;return!0}function Kd(n,r,s,o,l,d){return rr=d,Oe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,M.H=n===null||n.memoizedState===null?Wg:ff,zi=!1,d=s(o,l),zi=!1,Da&&(d=gg(r,s,o,l)),hg(n),d}function hg(n){M.H=Ks;var r=Qe!==null&&Qe.next!==null;if(rr=0,gt=Qe=Oe=null,Uc=!1,$s=0,wa=null,r)throw Error(a(300));n===null||yt||(n=n.dependencies,n!==null&&wc(n)&&(yt=!0))}function gg(n,r,s,o){Oe=n;var l=0;do{if(Da&&(wa=null),$s=0,Da=!1,25<=l)throw Error(a(301));if(l+=1,gt=Qe=null,n.updateQueue!=null){var d=n.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}M.H=Zg,d=r(s,o)}while(Da);return d}function KR(){var n=M.H,r=n.useState()[0];return r=typeof r.then=="function"?Xs(r):r,n=n.useState()[0],(Qe!==null?Qe.memoizedState:null)!==n&&(Oe.flags|=1024),r}function Jd(){var n=jc!==0;return jc=0,n}function Wd(n,r,s){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~s}function Zd(n){if(Uc){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Uc=!1}rr=0,gt=Qe=Oe=null,Da=!1,$s=jc=0,wa=null}function jt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?Oe.memoizedState=gt=n:gt=gt.next=n,gt}function mt(){if(Qe===null){var n=Oe.alternate;n=n!==null?n.memoizedState:null}else n=Qe.next;var r=gt===null?Oe.memoizedState:gt.next;if(r!==null)gt=r,Qe=n;else{if(n===null)throw Oe.alternate===null?Error(a(467)):Error(a(310));Qe=n,n={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},gt===null?Oe.memoizedState=gt=n:gt=gt.next=n}return gt}function zc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xs(n){var r=$s;return $s+=1,wa===null&&(wa=[]),n=og(wa,n,r),r=Oe,(gt===null?r.memoizedState:gt.next)===null&&(r=r.alternate,M.H=r===null||r.memoizedState===null?Wg:ff),n}function Bc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Xs(n);if(n.$$typeof===le)return Lt(n)}throw Error(a(438,String(n)))}function ef(n){var r=null,s=Oe.updateQueue;if(s!==null&&(r=s.memoCache),r==null){var o=Oe.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(l){return l.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),s===null&&(s=zc(),Oe.updateQueue=s),s.memoCache=r,s=r.data[r.index],s===void 0)for(s=r.data[r.index]=Array(n),o=0;o<n;o++)s[o]=J;return r.index++,s}function ir(n,r){return typeof r=="function"?r(n):r}function Vc(n){var r=mt();return tf(r,Qe,n)}function tf(n,r,s){var o=n.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=s;var l=n.baseQueue,d=o.pending;if(d!==null){if(l!==null){var _=l.next;l.next=d.next,d.next=_}r.baseQueue=l=d,o.pending=null}if(d=n.baseState,l===null)n.memoizedState=d;else{r=l.next;var E=_=null,A=null,C=r,k=!1;do{var j=C.lane&-536870913;if(j!==C.lane?(ke&j)===j:(rr&j)===j){var L=C.revertLane;if(L===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null}),j===ba&&(k=!0);else if((rr&L)===L){C=C.next,L===ba&&(k=!0);continue}else j={lane:0,revertLane:C.revertLane,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},A===null?(E=A=j,_=d):A=A.next=j,Oe.lanes|=L,Yr|=L;j=C.action,zi&&s(d,j),d=C.hasEagerState?C.eagerState:s(d,j)}else L={lane:j,revertLane:C.revertLane,gesture:C.gesture,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},A===null?(E=A=L,_=d):A=A.next=L,Oe.lanes|=j,Yr|=j;C=C.next}while(C!==null&&C!==r);if(A===null?_=d:A.next=E,!rn(d,n.memoizedState)&&(yt=!0,k&&(s=Ta,s!==null)))throw s;n.memoizedState=d,n.baseState=_,n.baseQueue=A,o.lastRenderedState=d}return l===null&&(o.lanes=0),[n.memoizedState,o.dispatch]}function nf(n){var r=mt(),s=r.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=n;var o=s.dispatch,l=s.pending,d=r.memoizedState;if(l!==null){s.pending=null;var _=l=l.next;do d=n(d,_.action),_=_.next;while(_!==l);rn(d,r.memoizedState)||(yt=!0),r.memoizedState=d,r.baseQueue===null&&(r.baseState=d),s.lastRenderedState=d}return[d,o]}function yg(n,r,s){var o=Oe,l=mt(),d=ze;if(d){if(s===void 0)throw Error(a(407));s=s()}else s=r();var _=!rn((Qe||l).memoizedState,s);if(_&&(l.memoizedState=s,yt=!0),l=l.queue,sf(Sg.bind(null,o,l,n),[n]),l.getSnapshot!==r||_||gt!==null&&gt.memoizedState.tag&1){if(o.flags|=2048,xa(9,{destroy:void 0},Eg.bind(null,o,l,s,r),null),Ze===null)throw Error(a(349));d||(rr&127)!==0||vg(o,r,s)}return s}function vg(n,r,s){n.flags|=16384,n={getSnapshot:r,value:s},r=Oe.updateQueue,r===null?(r=zc(),Oe.updateQueue=r,r.stores=[n]):(s=r.stores,s===null?r.stores=[n]:s.push(n))}function Eg(n,r,s,o){r.value=s,r.getSnapshot=o,bg(r)&&Tg(n)}function Sg(n,r,s){return s(function(){bg(r)&&Tg(n)})}function bg(n){var r=n.getSnapshot;n=n.value;try{var s=r();return!rn(n,s)}catch{return!0}}function Tg(n){var r=Ii(n,2);r!==null&&Qt(r,n,2)}function rf(n){var r=jt();if(typeof n=="function"){var s=n;if(n=s(),zi){Lr(!0);try{s()}finally{Lr(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ir,lastRenderedState:n},r}function Ag(n,r,s,o){return n.baseState=s,tf(n,Qe,typeof o=="function"?o:ir)}function JR(n,r,s,o,l){if(Fc(n))throw Error(a(485));if(n=r.action,n!==null){var d={payload:l,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){d.listeners.push(_)}};M.T!==null?s(!0):d.isTransition=!1,o(d),s=r.pending,s===null?(d.next=r.pending=d,Rg(r,d)):(d.next=s.next,r.pending=s.next=d)}}function Rg(n,r){var s=r.action,o=r.payload,l=n.state;if(r.isTransition){var d=M.T,_={};M.T=_;try{var E=s(l,o),A=M.S;A!==null&&A(_,E),Og(n,r,E)}catch(C){af(n,r,C)}finally{d!==null&&_.types!==null&&(d.types=_.types),M.T=d}}else try{d=s(l,o),Og(n,r,d)}catch(C){af(n,r,C)}}function Og(n,r,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(o){Dg(n,r,o)},function(o){return af(n,r,o)}):Dg(n,r,s)}function Dg(n,r,s){r.status="fulfilled",r.value=s,wg(r),n.state=s,r=n.pending,r!==null&&(s=r.next,s===r?n.pending=null:(s=s.next,r.next=s,Rg(n,s)))}function af(n,r,s){var o=n.pending;if(n.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=s,wg(r),r=r.next;while(r!==o)}n.action=null}function wg(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function xg(n,r){return r}function Ig(n,r){if(ze){var s=Ze.formState;if(s!==null){e:{var o=Oe;if(ze){if(rt){t:{for(var l=rt,d=En;l.nodeType!==8;){if(!d){l=null;break t}if(l=bn(l.nextSibling),l===null){l=null;break t}}d=l.data,l=d==="F!"||d==="F"?l:null}if(l){rt=bn(l.nextSibling),o=l.data==="F!";break e}}Ur(o)}o=!1}o&&(r=s[0])}}return s=jt(),s.memoizedState=s.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xg,lastRenderedState:r},s.queue=o,s=Qg.bind(null,Oe,o),o.dispatch=s,o=rf(!1),d=df.bind(null,Oe,!1,o.queue),o=jt(),l={state:r,dispatch:null,action:n,pending:null},o.queue=l,s=JR.bind(null,Oe,l,d,s),l.dispatch=s,o.memoizedState=n,[r,s,!1]}function Cg(n){var r=mt();return Lg(r,Qe,n)}function Lg(n,r,s){if(r=tf(n,r,xg)[0],n=Vc(ir)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=Xs(r)}catch(_){throw _===Aa?Cc:_}else o=r;r=mt();var l=r.queue,d=l.dispatch;return s!==r.memoizedState&&(Oe.flags|=2048,xa(9,{destroy:void 0},WR.bind(null,l,s),null)),[o,d,n]}function WR(n,r){n.action=r}function Mg(n){var r=mt(),s=Qe;if(s!==null)return Lg(r,s,n);mt(),r=r.memoizedState,s=mt();var o=s.queue.dispatch;return s.memoizedState=n,[r,o,!1]}function xa(n,r,s,o){return n={tag:n,create:s,deps:o,inst:r,next:null},r=Oe.updateQueue,r===null&&(r=zc(),Oe.updateQueue=r),s=r.lastEffect,s===null?r.lastEffect=n.next=n:(o=s.next,s.next=n,n.next=o,r.lastEffect=n),n}function Ng(){return mt().memoizedState}function qc(n,r,s,o){var l=jt();Oe.flags|=n,l.memoizedState=xa(1|r,{destroy:void 0},s,o===void 0?null:o)}function Hc(n,r,s,o){var l=mt();o=o===void 0?null:o;var d=l.memoizedState.inst;Qe!==null&&o!==null&&Qd(o,Qe.memoizedState.deps)?l.memoizedState=xa(r,d,s,o):(Oe.flags|=n,l.memoizedState=xa(1|r,d,s,o))}function kg(n,r){qc(8390656,8,n,r)}function sf(n,r){Hc(2048,8,n,r)}function ZR(n){Oe.flags|=4;var r=Oe.updateQueue;if(r===null)r=zc(),Oe.updateQueue=r,r.events=[n];else{var s=r.events;s===null?r.events=[n]:s.push(n)}}function Pg(n){var r=mt().memoizedState;return ZR({ref:r,nextImpl:n}),function(){if((Ye&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Ug(n,r){return Hc(4,2,n,r)}function jg(n,r){return Hc(4,4,n,r)}function zg(n,r){if(typeof r=="function"){n=n();var s=r(n);return function(){typeof s=="function"?s():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Bg(n,r,s){s=s!=null?s.concat([n]):null,Hc(4,4,zg.bind(null,r,n),s)}function of(){}function Vg(n,r){var s=mt();r=r===void 0?null:r;var o=s.memoizedState;return r!==null&&Qd(r,o[1])?o[0]:(s.memoizedState=[n,r],n)}function qg(n,r){var s=mt();r=r===void 0?null:r;var o=s.memoizedState;if(r!==null&&Qd(r,o[1]))return o[0];if(o=n(),zi){Lr(!0);try{n()}finally{Lr(!1)}}return s.memoizedState=[o,r],o}function cf(n,r,s){return s===void 0||(rr&1073741824)!==0&&(ke&261930)===0?n.memoizedState=r:(n.memoizedState=s,n=Hy(),Oe.lanes|=n,Yr|=n,s)}function Hg(n,r,s,o){return rn(s,r)?s:Oa.current!==null?(n=cf(n,s,o),rn(n,r)||(yt=!0),n):(rr&42)===0||(rr&1073741824)!==0&&(ke&261930)===0?(yt=!0,n.memoizedState=s):(n=Hy(),Oe.lanes|=n,Yr|=n,r)}function Fg(n,r,s,o,l){var d=q.p;q.p=d!==0&&8>d?d:8;var _=M.T,E={};M.T=E,df(n,!1,r,s);try{var A=l(),C=M.S;if(C!==null&&C(E,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var k=XR(A,o);Qs(n,r,k,ln(n))}else Qs(n,r,o,ln(n))}catch(j){Qs(n,r,{then:function(){},status:"rejected",reason:j},ln())}finally{q.p=d,_!==null&&E.types!==null&&(_.types=E.types),M.T=_}}function e1(){}function uf(n,r,s,o){if(n.tag!==5)throw Error(a(476));var l=Gg(n).queue;Fg(n,l,r,H,s===null?e1:function(){return Yg(n),s(o)})}function Gg(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ir,lastRenderedState:H},next:null};var s={};return r.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ir,lastRenderedState:s},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Yg(n){var r=Gg(n);r.next===null&&(r=n.alternate.memoizedState),Qs(n,r.next.queue,{},ln())}function lf(){return Lt(po)}function $g(){return mt().memoizedState}function Xg(){return mt().memoizedState}function t1(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var s=ln();n=Br(s);var o=Vr(r,n,s);o!==null&&(Qt(o,r,s),Fs(o,r,s)),r={cache:jd()},n.payload=r;return}r=r.return}}function n1(n,r,s){var o=ln();s={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Fc(n)?Kg(r,s):(s=Dd(n,r,s,o),s!==null&&(Qt(s,n,o),Jg(s,r,o)))}function Qg(n,r,s){var o=ln();Qs(n,r,s,o)}function Qs(n,r,s,o){var l={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Fc(n))Kg(r,l);else{var d=n.alternate;if(n.lanes===0&&(d===null||d.lanes===0)&&(d=r.lastRenderedReducer,d!==null))try{var _=r.lastRenderedState,E=d(_,s);if(l.hasEagerState=!0,l.eagerState=E,rn(E,_))return Ac(n,r,l,0),Ze===null&&Tc(),!1}catch{}if(s=Dd(n,r,l,o),s!==null)return Qt(s,n,o),Jg(s,r,o),!0}return!1}function df(n,r,s,o){if(o={lane:2,revertLane:Hf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Fc(n)){if(r)throw Error(a(479))}else r=Dd(n,s,o,2),r!==null&&Qt(r,n,2)}function Fc(n){var r=n.alternate;return n===Oe||r!==null&&r===Oe}function Kg(n,r){Da=Uc=!0;var s=n.pending;s===null?r.next=r:(r.next=s.next,s.next=r),n.pending=r}function Jg(n,r,s){if((s&4194048)!==0){var o=r.lanes;o&=n.pendingLanes,s|=o,r.lanes=s,nh(n,s)}}var Ks={readContext:Lt,use:Bc,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct};Ks.useEffectEvent=ct;var Wg={readContext:Lt,use:Bc,useCallback:function(n,r){return jt().memoizedState=[n,r===void 0?null:r],n},useContext:Lt,useEffect:kg,useImperativeHandle:function(n,r,s){s=s!=null?s.concat([n]):null,qc(4194308,4,zg.bind(null,r,n),s)},useLayoutEffect:function(n,r){return qc(4194308,4,n,r)},useInsertionEffect:function(n,r){qc(4,2,n,r)},useMemo:function(n,r){var s=jt();r=r===void 0?null:r;var o=n();if(zi){Lr(!0);try{n()}finally{Lr(!1)}}return s.memoizedState=[o,r],o},useReducer:function(n,r,s){var o=jt();if(s!==void 0){var l=s(r);if(zi){Lr(!0);try{s(r)}finally{Lr(!1)}}}else l=r;return o.memoizedState=o.baseState=l,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:l},o.queue=n,n=n.dispatch=n1.bind(null,Oe,n),[o.memoizedState,n]},useRef:function(n){var r=jt();return n={current:n},r.memoizedState=n},useState:function(n){n=rf(n);var r=n.queue,s=Qg.bind(null,Oe,r);return r.dispatch=s,[n.memoizedState,s]},useDebugValue:of,useDeferredValue:function(n,r){var s=jt();return cf(s,n,r)},useTransition:function(){var n=rf(!1);return n=Fg.bind(null,Oe,n.queue,!0,!1),jt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,s){var o=Oe,l=jt();if(ze){if(s===void 0)throw Error(a(407));s=s()}else{if(s=r(),Ze===null)throw Error(a(349));(ke&127)!==0||vg(o,r,s)}l.memoizedState=s;var d={value:s,getSnapshot:r};return l.queue=d,kg(Sg.bind(null,o,d,n),[n]),o.flags|=2048,xa(9,{destroy:void 0},Eg.bind(null,o,d,s,r),null),s},useId:function(){var n=jt(),r=Ze.identifierPrefix;if(ze){var s=zn,o=jn;s=(o&~(1<<32-nn(o)-1)).toString(32)+s,r="_"+r+"R_"+s,s=jc++,0<s&&(r+="H"+s.toString(32)),r+="_"}else s=QR++,r="_"+r+"r_"+s.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:lf,useFormState:Ig,useActionState:Ig,useOptimistic:function(n){var r=jt();r.memoizedState=r.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=s,r=df.bind(null,Oe,!0,s),s.dispatch=r,[n,r]},useMemoCache:ef,useCacheRefresh:function(){return jt().memoizedState=t1.bind(null,Oe)},useEffectEvent:function(n){var r=jt(),s={impl:n};return r.memoizedState=s,function(){if((Ye&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},ff={readContext:Lt,use:Bc,useCallback:Vg,useContext:Lt,useEffect:sf,useImperativeHandle:Bg,useInsertionEffect:Ug,useLayoutEffect:jg,useMemo:qg,useReducer:Vc,useRef:Ng,useState:function(){return Vc(ir)},useDebugValue:of,useDeferredValue:function(n,r){var s=mt();return Hg(s,Qe.memoizedState,n,r)},useTransition:function(){var n=Vc(ir)[0],r=mt().memoizedState;return[typeof n=="boolean"?n:Xs(n),r]},useSyncExternalStore:yg,useId:$g,useHostTransitionStatus:lf,useFormState:Cg,useActionState:Cg,useOptimistic:function(n,r){var s=mt();return Ag(s,Qe,n,r)},useMemoCache:ef,useCacheRefresh:Xg};ff.useEffectEvent=Pg;var Zg={readContext:Lt,use:Bc,useCallback:Vg,useContext:Lt,useEffect:sf,useImperativeHandle:Bg,useInsertionEffect:Ug,useLayoutEffect:jg,useMemo:qg,useReducer:nf,useRef:Ng,useState:function(){return nf(ir)},useDebugValue:of,useDeferredValue:function(n,r){var s=mt();return Qe===null?cf(s,n,r):Hg(s,Qe.memoizedState,n,r)},useTransition:function(){var n=nf(ir)[0],r=mt().memoizedState;return[typeof n=="boolean"?n:Xs(n),r]},useSyncExternalStore:yg,useId:$g,useHostTransitionStatus:lf,useFormState:Mg,useActionState:Mg,useOptimistic:function(n,r){var s=mt();return Qe!==null?Ag(s,Qe,n,r):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:ef,useCacheRefresh:Xg};Zg.useEffectEvent=Pg;function pf(n,r,s,o){r=n.memoizedState,s=s(o,r),s=s==null?r:g({},r,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var mf={enqueueSetState:function(n,r,s){n=n._reactInternals;var o=ln(),l=Br(o);l.payload=r,s!=null&&(l.callback=s),r=Vr(n,l,o),r!==null&&(Qt(r,n,o),Fs(r,n,o))},enqueueReplaceState:function(n,r,s){n=n._reactInternals;var o=ln(),l=Br(o);l.tag=1,l.payload=r,s!=null&&(l.callback=s),r=Vr(n,l,o),r!==null&&(Qt(r,n,o),Fs(r,n,o))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var s=ln(),o=Br(s);o.tag=2,r!=null&&(o.callback=r),r=Vr(n,o,s),r!==null&&(Qt(r,n,s),Fs(r,n,s))}};function ey(n,r,s,o,l,d,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(o,d,_):r.prototype&&r.prototype.isPureReactComponent?!Ps(s,o)||!Ps(l,d):!0}function ty(n,r,s,o){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(s,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(s,o),r.state!==n&&mf.enqueueReplaceState(r,r.state,null)}function Bi(n,r){var s=r;if("ref"in r){s={};for(var o in r)o!=="ref"&&(s[o]=r[o])}if(n=n.defaultProps){s===r&&(s=g({},s));for(var l in n)s[l]===void 0&&(s[l]=n[l])}return s}function ny(n){bc(n)}function ry(n){console.error(n)}function iy(n){bc(n)}function Gc(n,r){try{var s=n.onUncaughtError;s(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function ay(n,r,s){try{var o=n.onCaughtError;o(s.value,{componentStack:s.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function _f(n,r,s){return s=Br(s),s.tag=3,s.payload={element:null},s.callback=function(){Gc(n,r)},s}function sy(n){return n=Br(n),n.tag=3,n}function oy(n,r,s,o){var l=s.type.getDerivedStateFromError;if(typeof l=="function"){var d=o.value;n.payload=function(){return l(d)},n.callback=function(){ay(r,s,o)}}var _=s.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){ay(r,s,o),typeof l!="function"&&($r===null?$r=new Set([this]):$r.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})})}function r1(n,r,s,o,l){if(s.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=s.alternate,r!==null&&Sa(r,s,l,!0),s=sn.current,s!==null){switch(s.tag){case 31:case 13:return Sn===null?ru():s.alternate===null&&ut===0&&(ut=3),s.flags&=-257,s.flags|=65536,s.lanes=l,o===Lc?s.flags|=16384:(r=s.updateQueue,r===null?s.updateQueue=new Set([o]):r.add(o),Bf(n,o,l)),!1;case 22:return s.flags|=65536,o===Lc?s.flags|=16384:(r=s.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},s.updateQueue=r):(s=r.retryQueue,s===null?r.retryQueue=new Set([o]):s.add(o)),Bf(n,o,l)),!1}throw Error(a(435,s.tag))}return Bf(n,o,l),ru(),!1}if(ze)return r=sn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=l,o!==Md&&(n=Error(a(422),{cause:o}),zs(gn(n,s)))):(o!==Md&&(r=Error(a(423),{cause:o}),zs(gn(r,s))),n=n.current.alternate,n.flags|=65536,l&=-l,n.lanes|=l,o=gn(o,s),l=_f(n.stateNode,o,l),Fd(n,l),ut!==4&&(ut=2)),!1;var d=Error(a(520),{cause:o});if(d=gn(d,s),io===null?io=[d]:io.push(d),ut!==4&&(ut=2),r===null)return!0;o=gn(o,s),s=r;do{switch(s.tag){case 3:return s.flags|=65536,n=l&-l,s.lanes|=n,n=_f(s.stateNode,o,n),Fd(s,n),!1;case 1:if(r=s.type,d=s.stateNode,(s.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&($r===null||!$r.has(d))))return s.flags|=65536,l&=-l,s.lanes|=l,l=sy(l),oy(l,n,s,o),Fd(s,l),!1}s=s.return}while(s!==null);return!1}var hf=Error(a(461)),yt=!1;function Mt(n,r,s,o){r.child=n===null?dg(r,null,s,o):ji(r,n.child,s,o)}function cy(n,r,s,o,l){s=s.render;var d=r.ref;if("ref"in o){var _={};for(var E in o)E!=="ref"&&(_[E]=o[E])}else _=o;return Ni(r),o=Kd(n,r,s,_,d,l),E=Jd(),n!==null&&!yt?(Wd(n,r,l),ar(n,r,l)):(ze&&E&&Cd(r),r.flags|=1,Mt(n,r,o,l),r.child)}function uy(n,r,s,o,l){if(n===null){var d=s.type;return typeof d=="function"&&!wd(d)&&d.defaultProps===void 0&&s.compare===null?(r.tag=15,r.type=d,ly(n,r,d,o,l)):(n=Oc(s.type,null,o,r,r.mode,l),n.ref=r.ref,n.return=r,r.child=n)}if(d=n.child,!Af(n,l)){var _=d.memoizedProps;if(s=s.compare,s=s!==null?s:Ps,s(_,o)&&n.ref===r.ref)return ar(n,r,l)}return r.flags|=1,n=Zn(d,o),n.ref=r.ref,n.return=r,r.child=n}function ly(n,r,s,o,l){if(n!==null){var d=n.memoizedProps;if(Ps(d,o)&&n.ref===r.ref)if(yt=!1,r.pendingProps=o=d,Af(n,l))(n.flags&131072)!==0&&(yt=!0);else return r.lanes=n.lanes,ar(n,r,l)}return gf(n,r,s,o,l)}function dy(n,r,s,o){var l=o.children,d=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((r.flags&128)!==0){if(d=d!==null?d.baseLanes|s:s,n!==null){for(o=r.child=n.child,l=0;o!==null;)l=l|o.lanes|o.childLanes,o=o.sibling;o=l&~d}else o=0,r.child=null;return fy(n,r,d,s,o)}if((s&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ic(r,d!==null?d.cachePool:null),d!==null?mg(r,d):Yd(),_g(r);else return o=r.lanes=536870912,fy(n,r,d!==null?d.baseLanes|s:s,s,o)}else d!==null?(Ic(r,d.cachePool),mg(r,d),Hr(),r.memoizedState=null):(n!==null&&Ic(r,null),Yd(),Hr());return Mt(n,r,l,s),r.child}function Js(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function fy(n,r,s,o,l){var d=Bd();return d=d===null?null:{parent:ht._currentValue,pool:d},r.memoizedState={baseLanes:s,cachePool:d},n!==null&&Ic(r,null),Yd(),_g(r),n!==null&&Sa(n,r,o,!0),r.childLanes=l,null}function Yc(n,r){return r=Xc({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function py(n,r,s){return ji(r,n.child,null,s),n=Yc(r,r.pendingProps),n.flags|=2,on(r),r.memoizedState=null,n}function i1(n,r,s){var o=r.pendingProps,l=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(ze){if(o.mode==="hidden")return n=Yc(r,o),r.lanes=536870912,Js(null,n);if(Xd(r),(n=rt)?(n=Rv(n,En),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:kr!==null?{id:jn,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},s=Kh(n),s.return=r,r.child=s,Ct=r,rt=null)):n=null,n===null)throw Ur(r);return r.lanes=536870912,null}return Yc(r,o)}var d=n.memoizedState;if(d!==null){var _=d.dehydrated;if(Xd(r),l)if(r.flags&256)r.flags&=-257,r=py(n,r,s);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(yt||Sa(n,r,s,!1),l=(s&n.childLanes)!==0,yt||l){if(o=Ze,o!==null&&(_=rh(o,s),_!==0&&_!==d.retryLane))throw d.retryLane=_,Ii(n,_),Qt(o,n,_),hf;ru(),r=py(n,r,s)}else n=d.treeContext,rt=bn(_.nextSibling),Ct=r,ze=!0,Pr=null,En=!1,n!==null&&Zh(r,n),r=Yc(r,o),r.flags|=4096;return r}return n=Zn(n.child,{mode:o.mode,children:o.children}),n.ref=r.ref,r.child=n,n.return=r,n}function $c(n,r){var s=r.ref;if(s===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(n===null||n.ref!==s)&&(r.flags|=4194816)}}function gf(n,r,s,o,l){return Ni(r),s=Kd(n,r,s,o,void 0,l),o=Jd(),n!==null&&!yt?(Wd(n,r,l),ar(n,r,l)):(ze&&o&&Cd(r),r.flags|=1,Mt(n,r,s,l),r.child)}function my(n,r,s,o,l,d){return Ni(r),r.updateQueue=null,s=gg(r,o,s,l),hg(n),o=Jd(),n!==null&&!yt?(Wd(n,r,d),ar(n,r,d)):(ze&&o&&Cd(r),r.flags|=1,Mt(n,r,s,d),r.child)}function _y(n,r,s,o,l){if(Ni(r),r.stateNode===null){var d=ga,_=s.contextType;typeof _=="object"&&_!==null&&(d=Lt(_)),d=new s(o,d),r.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=mf,r.stateNode=d,d._reactInternals=r,d=r.stateNode,d.props=o,d.state=r.memoizedState,d.refs={},qd(r),_=s.contextType,d.context=typeof _=="object"&&_!==null?Lt(_):ga,d.state=r.memoizedState,_=s.getDerivedStateFromProps,typeof _=="function"&&(pf(r,s,_,o),d.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(_=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),_!==d.state&&mf.enqueueReplaceState(d,d.state,null),Ys(r,o,d,l),Gs(),d.state=r.memoizedState),typeof d.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(n===null){d=r.stateNode;var E=r.memoizedProps,A=Bi(s,E);d.props=A;var C=d.context,k=s.contextType;_=ga,typeof k=="object"&&k!==null&&(_=Lt(k));var j=s.getDerivedStateFromProps;k=typeof j=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,k||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||C!==_)&&ty(r,d,o,_),zr=!1;var L=r.memoizedState;d.state=L,Ys(r,o,d,l),Gs(),C=r.memoizedState,E||L!==C||zr?(typeof j=="function"&&(pf(r,s,j,o),C=r.memoizedState),(A=zr||ey(r,s,A,o,L,C,_))?(k||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(r.flags|=4194308)):(typeof d.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=C),d.props=o,d.state=C,d.context=_,o=A):(typeof d.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{d=r.stateNode,Hd(n,r),_=r.memoizedProps,k=Bi(s,_),d.props=k,j=r.pendingProps,L=d.context,C=s.contextType,A=ga,typeof C=="object"&&C!==null&&(A=Lt(C)),E=s.getDerivedStateFromProps,(C=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(_!==j||L!==A)&&ty(r,d,o,A),zr=!1,L=r.memoizedState,d.state=L,Ys(r,o,d,l),Gs();var N=r.memoizedState;_!==j||L!==N||zr||n!==null&&n.dependencies!==null&&wc(n.dependencies)?(typeof E=="function"&&(pf(r,s,E,o),N=r.memoizedState),(k=zr||ey(r,s,k,o,L,N,A)||n!==null&&n.dependencies!==null&&wc(n.dependencies))?(C||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,N,A),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,N,A)),typeof d.componentDidUpdate=="function"&&(r.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof d.componentDidUpdate!="function"||_===n.memoizedProps&&L===n.memoizedState||(r.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&L===n.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=N),d.props=o,d.state=N,d.context=A,o=k):(typeof d.componentDidUpdate!="function"||_===n.memoizedProps&&L===n.memoizedState||(r.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&L===n.memoizedState||(r.flags|=1024),o=!1)}return d=o,$c(n,r),o=(r.flags&128)!==0,d||o?(d=r.stateNode,s=o&&typeof s.getDerivedStateFromError!="function"?null:d.render(),r.flags|=1,n!==null&&o?(r.child=ji(r,n.child,null,l),r.child=ji(r,null,s,l)):Mt(n,r,s,l),r.memoizedState=d.state,n=r.child):n=ar(n,r,l),n}function hy(n,r,s,o){return Li(),r.flags|=256,Mt(n,r,s,o),r.child}var yf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vf(n){return{baseLanes:n,cachePool:ag()}}function Ef(n,r,s){return n=n!==null?n.childLanes&~s:0,r&&(n|=un),n}function gy(n,r,s){var o=r.pendingProps,l=!1,d=(r.flags&128)!==0,_;if((_=d)||(_=n!==null&&n.memoizedState===null?!1:(pt.current&2)!==0),_&&(l=!0,r.flags&=-129),_=(r.flags&32)!==0,r.flags&=-33,n===null){if(ze){if(l?qr(r):Hr(),(n=rt)?(n=Rv(n,En),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:kr!==null?{id:jn,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},s=Kh(n),s.return=r,r.child=s,Ct=r,rt=null)):n=null,n===null)throw Ur(r);return np(n)?r.lanes=32:r.lanes=536870912,null}var E=o.children;return o=o.fallback,l?(Hr(),l=r.mode,E=Xc({mode:"hidden",children:E},l),o=Ci(o,l,s,null),E.return=r,o.return=r,E.sibling=o,r.child=E,o=r.child,o.memoizedState=vf(s),o.childLanes=Ef(n,_,s),r.memoizedState=yf,Js(null,o)):(qr(r),Sf(r,E))}var A=n.memoizedState;if(A!==null&&(E=A.dehydrated,E!==null)){if(d)r.flags&256?(qr(r),r.flags&=-257,r=bf(n,r,s)):r.memoizedState!==null?(Hr(),r.child=n.child,r.flags|=128,r=null):(Hr(),E=o.fallback,l=r.mode,o=Xc({mode:"visible",children:o.children},l),E=Ci(E,l,s,null),E.flags|=2,o.return=r,E.return=r,o.sibling=E,r.child=o,ji(r,n.child,null,s),o=r.child,o.memoizedState=vf(s),o.childLanes=Ef(n,_,s),r.memoizedState=yf,r=Js(null,o));else if(qr(r),np(E)){if(_=E.nextSibling&&E.nextSibling.dataset,_)var C=_.dgst;_=C,o=Error(a(419)),o.stack="",o.digest=_,zs({value:o,source:null,stack:null}),r=bf(n,r,s)}else if(yt||Sa(n,r,s,!1),_=(s&n.childLanes)!==0,yt||_){if(_=Ze,_!==null&&(o=rh(_,s),o!==0&&o!==A.retryLane))throw A.retryLane=o,Ii(n,o),Qt(_,n,o),hf;tp(E)||ru(),r=bf(n,r,s)}else tp(E)?(r.flags|=192,r.child=n.child,r=null):(n=A.treeContext,rt=bn(E.nextSibling),Ct=r,ze=!0,Pr=null,En=!1,n!==null&&Zh(r,n),r=Sf(r,o.children),r.flags|=4096);return r}return l?(Hr(),E=o.fallback,l=r.mode,A=n.child,C=A.sibling,o=Zn(A,{mode:"hidden",children:o.children}),o.subtreeFlags=A.subtreeFlags&65011712,C!==null?E=Zn(C,E):(E=Ci(E,l,s,null),E.flags|=2),E.return=r,o.return=r,o.sibling=E,r.child=o,Js(null,o),o=r.child,E=n.child.memoizedState,E===null?E=vf(s):(l=E.cachePool,l!==null?(A=ht._currentValue,l=l.parent!==A?{parent:A,pool:A}:l):l=ag(),E={baseLanes:E.baseLanes|s,cachePool:l}),o.memoizedState=E,o.childLanes=Ef(n,_,s),r.memoizedState=yf,Js(n.child,o)):(qr(r),s=n.child,n=s.sibling,s=Zn(s,{mode:"visible",children:o.children}),s.return=r,s.sibling=null,n!==null&&(_=r.deletions,_===null?(r.deletions=[n],r.flags|=16):_.push(n)),r.child=s,r.memoizedState=null,s)}function Sf(n,r){return r=Xc({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function Xc(n,r){return n=an(22,n,null,r),n.lanes=0,n}function bf(n,r,s){return ji(r,n.child,null,s),n=Sf(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function yy(n,r,s){n.lanes|=r;var o=n.alternate;o!==null&&(o.lanes|=r),Pd(n.return,r,s)}function Tf(n,r,s,o,l,d){var _=n.memoizedState;_===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:l,treeForkCount:d}:(_.isBackwards=r,_.rendering=null,_.renderingStartTime=0,_.last=o,_.tail=s,_.tailMode=l,_.treeForkCount=d)}function vy(n,r,s){var o=r.pendingProps,l=o.revealOrder,d=o.tail;o=o.children;var _=pt.current,E=(_&2)!==0;if(E?(_=_&1|2,r.flags|=128):_&=1,X(pt,_),Mt(n,r,o,s),o=ze?js:0,!E&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&yy(n,s,r);else if(n.tag===19)yy(n,s,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(l){case"forwards":for(s=r.child,l=null;s!==null;)n=s.alternate,n!==null&&Pc(n)===null&&(l=s),s=s.sibling;s=l,s===null?(l=r.child,r.child=null):(l=s.sibling,s.sibling=null),Tf(r,!1,l,s,d,o);break;case"backwards":case"unstable_legacy-backwards":for(s=null,l=r.child,r.child=null;l!==null;){if(n=l.alternate,n!==null&&Pc(n)===null){r.child=l;break}n=l.sibling,l.sibling=s,s=l,l=n}Tf(r,!0,s,null,d,o);break;case"together":Tf(r,!1,null,null,void 0,o);break;default:r.memoizedState=null}return r.child}function ar(n,r,s){if(n!==null&&(r.dependencies=n.dependencies),Yr|=r.lanes,(s&r.childLanes)===0)if(n!==null){if(Sa(n,r,s,!1),(s&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(a(153));if(r.child!==null){for(n=r.child,s=Zn(n,n.pendingProps),r.child=s,s.return=r;n.sibling!==null;)n=n.sibling,s=s.sibling=Zn(n,n.pendingProps),s.return=r;s.sibling=null}return r.child}function Af(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&wc(n)))}function a1(n,r,s){switch(r.tag){case 3:Ee(r,r.stateNode.containerInfo),jr(r,ht,n.memoizedState.cache),Li();break;case 27:case 5:We(r);break;case 4:Ee(r,r.stateNode.containerInfo);break;case 10:jr(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Xd(r),null;break;case 13:var o=r.memoizedState;if(o!==null)return o.dehydrated!==null?(qr(r),r.flags|=128,null):(s&r.child.childLanes)!==0?gy(n,r,s):(qr(r),n=ar(n,r,s),n!==null?n.sibling:null);qr(r);break;case 19:var l=(n.flags&128)!==0;if(o=(s&r.childLanes)!==0,o||(Sa(n,r,s,!1),o=(s&r.childLanes)!==0),l){if(o)return vy(n,r,s);r.flags|=128}if(l=r.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),X(pt,pt.current),o)break;return null;case 22:return r.lanes=0,dy(n,r,s,r.pendingProps);case 24:jr(r,ht,n.memoizedState.cache)}return ar(n,r,s)}function Ey(n,r,s){if(n!==null)if(n.memoizedProps!==r.pendingProps)yt=!0;else{if(!Af(n,s)&&(r.flags&128)===0)return yt=!1,a1(n,r,s);yt=(n.flags&131072)!==0}else yt=!1,ze&&(r.flags&1048576)!==0&&Wh(r,js,r.index);switch(r.lanes=0,r.tag){case 16:e:{var o=r.pendingProps;if(n=Pi(r.elementType),r.type=n,typeof n=="function")wd(n)?(o=Bi(n,o),r.tag=1,r=_y(null,r,n,o,s)):(r.tag=0,r=gf(null,r,n,o,s));else{if(n!=null){var l=n.$$typeof;if(l===de){r.tag=11,r=cy(null,r,n,o,s);break e}else if(l===z){r.tag=14,r=uy(null,r,n,o,s);break e}}throw r=me(n)||n,Error(a(306,r,""))}}return r;case 0:return gf(n,r,r.type,r.pendingProps,s);case 1:return o=r.type,l=Bi(o,r.pendingProps),_y(n,r,o,l,s);case 3:e:{if(Ee(r,r.stateNode.containerInfo),n===null)throw Error(a(387));o=r.pendingProps;var d=r.memoizedState;l=d.element,Hd(n,r),Ys(r,o,null,s);var _=r.memoizedState;if(o=_.cache,jr(r,ht,o),o!==d.cache&&Ud(r,[ht],s,!0),Gs(),o=_.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:_.cache},r.updateQueue.baseState=d,r.memoizedState=d,r.flags&256){r=hy(n,r,o,s);break e}else if(o!==l){l=gn(Error(a(424)),r),zs(l),r=hy(n,r,o,s);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,rt=bn(n.firstChild),Ct=r,ze=!0,Pr=null,En=!0,s=dg(r,null,o,s),r.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Li(),o===l){r=ar(n,r,s);break e}Mt(n,r,o,s)}r=r.child}return r;case 26:return $c(n,r),n===null?(s=Cv(r.type,null,r.pendingProps,null))?r.memoizedState=s:ze||(s=r.type,n=r.pendingProps,o=lu(Re.current).createElement(s),o[It]=r,o[Ht]=n,Nt(o,s,n),wt(o),r.stateNode=o):r.memoizedState=Cv(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return We(r),n===null&&ze&&(o=r.stateNode=wv(r.type,r.pendingProps,Re.current),Ct=r,En=!0,l=rt,Jr(r.type)?(rp=l,rt=bn(o.firstChild)):rt=l),Mt(n,r,r.pendingProps.children,s),$c(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&ze&&((l=o=rt)&&(o=k1(o,r.type,r.pendingProps,En),o!==null?(r.stateNode=o,Ct=r,rt=bn(o.firstChild),En=!1,l=!0):l=!1),l||Ur(r)),We(r),l=r.type,d=r.pendingProps,_=n!==null?n.memoizedProps:null,o=d.children,Wf(l,d)?o=null:_!==null&&Wf(l,_)&&(r.flags|=32),r.memoizedState!==null&&(l=Kd(n,r,KR,null,null,s),po._currentValue=l),$c(n,r),Mt(n,r,o,s),r.child;case 6:return n===null&&ze&&((n=s=rt)&&(s=P1(s,r.pendingProps,En),s!==null?(r.stateNode=s,Ct=r,rt=null,n=!0):n=!1),n||Ur(r)),null;case 13:return gy(n,r,s);case 4:return Ee(r,r.stateNode.containerInfo),o=r.pendingProps,n===null?r.child=ji(r,null,o,s):Mt(n,r,o,s),r.child;case 11:return cy(n,r,r.type,r.pendingProps,s);case 7:return Mt(n,r,r.pendingProps,s),r.child;case 8:return Mt(n,r,r.pendingProps.children,s),r.child;case 12:return Mt(n,r,r.pendingProps.children,s),r.child;case 10:return o=r.pendingProps,jr(r,r.type,o.value),Mt(n,r,o.children,s),r.child;case 9:return l=r.type._context,o=r.pendingProps.children,Ni(r),l=Lt(l),o=o(l),r.flags|=1,Mt(n,r,o,s),r.child;case 14:return uy(n,r,r.type,r.pendingProps,s);case 15:return ly(n,r,r.type,r.pendingProps,s);case 19:return vy(n,r,s);case 31:return i1(n,r,s);case 22:return dy(n,r,s,r.pendingProps);case 24:return Ni(r),o=Lt(ht),n===null?(l=Bd(),l===null&&(l=Ze,d=jd(),l.pooledCache=d,d.refCount++,d!==null&&(l.pooledCacheLanes|=s),l=d),r.memoizedState={parent:o,cache:l},qd(r),jr(r,ht,l)):((n.lanes&s)!==0&&(Hd(n,r),Ys(r,null,null,s),Gs()),l=n.memoizedState,d=r.memoizedState,l.parent!==o?(l={parent:o,cache:o},r.memoizedState=l,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=l),jr(r,ht,o)):(o=d.cache,jr(r,ht,o),o!==l.cache&&Ud(r,[ht],s,!0))),Mt(n,r,r.pendingProps.children,s),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function sr(n){n.flags|=4}function Rf(n,r,s,o,l){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(l&335544128)===l)if(n.stateNode.complete)n.flags|=8192;else if($y())n.flags|=8192;else throw Ui=Lc,Vd}else n.flags&=-16777217}function Sy(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Pv(r))if($y())n.flags|=8192;else throw Ui=Lc,Vd}function Qc(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?eh():536870912,n.lanes|=r,Ma|=r)}function Ws(n,r){if(!ze)switch(n.tailMode){case"hidden":r=n.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:o.sibling=null}}function it(n){var r=n.alternate!==null&&n.alternate.child===n.child,s=0,o=0;if(r)for(var l=n.child;l!==null;)s|=l.lanes|l.childLanes,o|=l.subtreeFlags&65011712,o|=l.flags&65011712,l.return=n,l=l.sibling;else for(l=n.child;l!==null;)s|=l.lanes|l.childLanes,o|=l.subtreeFlags,o|=l.flags,l.return=n,l=l.sibling;return n.subtreeFlags|=o,n.childLanes=s,r}function s1(n,r,s){var o=r.pendingProps;switch(Ld(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(r),null;case 1:return it(r),null;case 3:return s=r.stateNode,o=null,n!==null&&(o=n.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),nr(ht),ge(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(Ea(r)?sr(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Nd())),it(r),null;case 26:var l=r.type,d=r.memoizedState;return n===null?(sr(r),d!==null?(it(r),Sy(r,d)):(it(r),Rf(r,l,null,o,s))):d?d!==n.memoizedState?(sr(r),it(r),Sy(r,d)):(it(r),r.flags&=-16777217):(n=n.memoizedProps,n!==o&&sr(r),it(r),Rf(r,l,n,o,s)),null;case 27:if(ot(r),s=Re.current,l=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&sr(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return it(r),null}n=ie.current,Ea(r)?eg(r):(n=wv(l,o,s),r.stateNode=n,sr(r))}return it(r),null;case 5:if(ot(r),l=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&sr(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return it(r),null}if(d=ie.current,Ea(r))eg(r);else{var _=lu(Re.current);switch(d){case 1:d=_.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:d=_.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":d=_.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":d=_.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":d=_.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof o.is=="string"?_.createElement("select",{is:o.is}):_.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?_.createElement(l,{is:o.is}):_.createElement(l)}}d[It]=r,d[Ht]=o;e:for(_=r.child;_!==null;){if(_.tag===5||_.tag===6)d.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===r)break e;for(;_.sibling===null;){if(_.return===null||_.return===r)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}r.stateNode=d;e:switch(Nt(d,l,o),l){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&sr(r)}}return it(r),Rf(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,s),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==o&&sr(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(a(166));if(n=Re.current,Ea(r)){if(n=r.stateNode,s=r.memoizedProps,o=null,l=Ct,l!==null)switch(l.tag){case 27:case 5:o=l.memoizedProps}n[It]=r,n=!!(n.nodeValue===s||o!==null&&o.suppressHydrationWarning===!0||gv(n.nodeValue,s)),n||Ur(r,!0)}else n=lu(n).createTextNode(o),n[It]=r,r.stateNode=n}return it(r),null;case 31:if(s=r.memoizedState,n===null||n.memoizedState!==null){if(o=Ea(r),s!==null){if(n===null){if(!o)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[It]=r}else Li(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;it(r),n=!1}else s=Nd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return r.flags&256?(on(r),r):(on(r),null);if((r.flags&128)!==0)throw Error(a(558))}return it(r),null;case 13:if(o=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(l=Ea(r),o!==null&&o.dehydrated!==null){if(n===null){if(!l)throw Error(a(318));if(l=r.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(a(317));l[It]=r}else Li(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;it(r),l=!1}else l=Nd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),l=!0;if(!l)return r.flags&256?(on(r),r):(on(r),null)}return on(r),(r.flags&128)!==0?(r.lanes=s,r):(s=o!==null,n=n!==null&&n.memoizedState!==null,s&&(o=r.child,l=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(l=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==l&&(o.flags|=2048)),s!==n&&s&&(r.child.flags|=8192),Qc(r,r.updateQueue),it(r),null);case 4:return ge(),n===null&&$f(r.stateNode.containerInfo),it(r),null;case 10:return nr(r.type),it(r),null;case 19:if(B(pt),o=r.memoizedState,o===null)return it(r),null;if(l=(r.flags&128)!==0,d=o.rendering,d===null)if(l)Ws(o,!1);else{if(ut!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(d=Pc(n),d!==null){for(r.flags|=128,Ws(o,!1),n=d.updateQueue,r.updateQueue=n,Qc(r,n),r.subtreeFlags=0,n=s,s=r.child;s!==null;)Qh(s,n),s=s.sibling;return X(pt,pt.current&1|2),ze&&er(r,o.treeForkCount),r.child}n=n.sibling}o.tail!==null&&Se()>eu&&(r.flags|=128,l=!0,Ws(o,!1),r.lanes=4194304)}else{if(!l)if(n=Pc(d),n!==null){if(r.flags|=128,l=!0,n=n.updateQueue,r.updateQueue=n,Qc(r,n),Ws(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!ze)return it(r),null}else 2*Se()-o.renderingStartTime>eu&&s!==536870912&&(r.flags|=128,l=!0,Ws(o,!1),r.lanes=4194304);o.isBackwards?(d.sibling=r.child,r.child=d):(n=o.last,n!==null?n.sibling=d:r.child=d,o.last=d)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=Se(),n.sibling=null,s=pt.current,X(pt,l?s&1|2:s&1),ze&&er(r,o.treeForkCount),n):(it(r),null);case 22:case 23:return on(r),$d(),o=r.memoizedState!==null,n!==null?n.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(s&536870912)!==0&&(r.flags&128)===0&&(it(r),r.subtreeFlags&6&&(r.flags|=8192)):it(r),s=r.updateQueue,s!==null&&Qc(r,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==s&&(r.flags|=2048),n!==null&&B(ki),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),r.memoizedState.cache!==s&&(r.flags|=2048),nr(ht),it(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function o1(n,r){switch(Ld(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return nr(ht),ge(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return ot(r),null;case 31:if(r.memoizedState!==null){if(on(r),r.alternate===null)throw Error(a(340));Li()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(on(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Li()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return B(pt),null;case 4:return ge(),null;case 10:return nr(r.type),null;case 22:case 23:return on(r),$d(),n!==null&&B(ki),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return nr(ht),null;case 25:return null;default:return null}}function by(n,r){switch(Ld(r),r.tag){case 3:nr(ht),ge();break;case 26:case 27:case 5:ot(r);break;case 4:ge();break;case 31:r.memoizedState!==null&&on(r);break;case 13:on(r);break;case 19:B(pt);break;case 10:nr(r.type);break;case 22:case 23:on(r),$d(),n!==null&&B(ki);break;case 24:nr(ht)}}function Zs(n,r){try{var s=r.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var l=o.next;s=l;do{if((s.tag&n)===n){o=void 0;var d=s.create,_=s.inst;o=d(),_.destroy=o}s=s.next}while(s!==l)}}catch(E){Xe(r,r.return,E)}}function Fr(n,r,s){try{var o=r.updateQueue,l=o!==null?o.lastEffect:null;if(l!==null){var d=l.next;o=d;do{if((o.tag&n)===n){var _=o.inst,E=_.destroy;if(E!==void 0){_.destroy=void 0,l=r;var A=s,C=E;try{C()}catch(k){Xe(l,A,k)}}}o=o.next}while(o!==d)}}catch(k){Xe(r,r.return,k)}}function Ty(n){var r=n.updateQueue;if(r!==null){var s=n.stateNode;try{pg(r,s)}catch(o){Xe(n,n.return,o)}}}function Ay(n,r,s){s.props=Bi(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(o){Xe(n,r,o)}}function eo(n,r){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var o=n.stateNode;break;case 30:o=n.stateNode;break;default:o=n.stateNode}typeof s=="function"?n.refCleanup=s(o):s.current=o}}catch(l){Xe(n,r,l)}}function Bn(n,r){var s=n.ref,o=n.refCleanup;if(s!==null)if(typeof o=="function")try{o()}catch(l){Xe(n,r,l)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(l){Xe(n,r,l)}else s.current=null}function Ry(n){var r=n.type,s=n.memoizedProps,o=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":s.autoFocus&&o.focus();break e;case"img":s.src?o.src=s.src:s.srcSet&&(o.srcset=s.srcSet)}}catch(l){Xe(n,n.return,l)}}function Of(n,r,s){try{var o=n.stateNode;x1(o,n.type,s,r),o[Ht]=r}catch(l){Xe(n,n.return,l)}}function Oy(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Jr(n.type)||n.tag===4}function Df(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Oy(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Jr(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function wf(n,r,s){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,r):(r=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,r.appendChild(n),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=Jn));else if(o!==4&&(o===27&&Jr(n.type)&&(s=n.stateNode,r=null),n=n.child,n!==null))for(wf(n,r,s),n=n.sibling;n!==null;)wf(n,r,s),n=n.sibling}function Kc(n,r,s){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?s.insertBefore(n,r):s.appendChild(n);else if(o!==4&&(o===27&&Jr(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(Kc(n,r,s),n=n.sibling;n!==null;)Kc(n,r,s),n=n.sibling}function Dy(n){var r=n.stateNode,s=n.memoizedProps;try{for(var o=n.type,l=r.attributes;l.length;)r.removeAttributeNode(l[0]);Nt(r,o,s),r[It]=n,r[Ht]=s}catch(d){Xe(n,n.return,d)}}var or=!1,vt=!1,xf=!1,wy=typeof WeakSet=="function"?WeakSet:Set,xt=null;function c1(n,r){if(n=n.containerInfo,Kf=gu,n=Bh(n),Sd(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var l=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{s.nodeType,d.nodeType}catch{s=null;break e}var _=0,E=-1,A=-1,C=0,k=0,j=n,L=null;t:for(;;){for(var N;j!==s||l!==0&&j.nodeType!==3||(E=_+l),j!==d||o!==0&&j.nodeType!==3||(A=_+o),j.nodeType===3&&(_+=j.nodeValue.length),(N=j.firstChild)!==null;)L=j,j=N;for(;;){if(j===n)break t;if(L===s&&++C===l&&(E=_),L===d&&++k===o&&(A=_),(N=j.nextSibling)!==null)break;j=L,L=j.parentNode}j=N}s=E===-1||A===-1?null:{start:E,end:A}}else s=null}s=s||{start:0,end:0}}else s=null;for(Jf={focusedElem:n,selectionRange:s},gu=!1,xt=r;xt!==null;)if(r=xt,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,xt=n;else for(;xt!==null;){switch(r=xt,d=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(s=0;s<n.length;s++)l=n[s],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&d!==null){n=void 0,s=r,l=d.memoizedProps,d=d.memoizedState,o=s.stateNode;try{var ae=Bi(s.type,l);n=o.getSnapshotBeforeUpdate(ae,d),o.__reactInternalSnapshotBeforeUpdate=n}catch(pe){Xe(s,s.return,pe)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,s=n.nodeType,s===9)ep(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":ep(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=r.sibling,n!==null){n.return=r.return,xt=n;break}xt=r.return}}function xy(n,r,s){var o=s.flags;switch(s.tag){case 0:case 11:case 15:ur(n,s),o&4&&Zs(5,s);break;case 1:if(ur(n,s),o&4)if(n=s.stateNode,r===null)try{n.componentDidMount()}catch(_){Xe(s,s.return,_)}else{var l=Bi(s.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(l,r,n.__reactInternalSnapshotBeforeUpdate)}catch(_){Xe(s,s.return,_)}}o&64&&Ty(s),o&512&&eo(s,s.return);break;case 3:if(ur(n,s),o&64&&(n=s.updateQueue,n!==null)){if(r=null,s.child!==null)switch(s.child.tag){case 27:case 5:r=s.child.stateNode;break;case 1:r=s.child.stateNode}try{pg(n,r)}catch(_){Xe(s,s.return,_)}}break;case 27:r===null&&o&4&&Dy(s);case 26:case 5:ur(n,s),r===null&&o&4&&Ry(s),o&512&&eo(s,s.return);break;case 12:ur(n,s);break;case 31:ur(n,s),o&4&&Ly(n,s);break;case 13:ur(n,s),o&4&&My(n,s),o&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=g1.bind(null,s),U1(n,s))));break;case 22:if(o=s.memoizedState!==null||or,!o){r=r!==null&&r.memoizedState!==null||vt,l=or;var d=vt;or=o,(vt=r)&&!d?lr(n,s,(s.subtreeFlags&8772)!==0):ur(n,s),or=l,vt=d}break;case 30:break;default:ur(n,s)}}function Iy(n){var r=n.alternate;r!==null&&(n.alternate=null,Iy(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&id(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var st=null,Gt=!1;function cr(n,r,s){for(s=s.child;s!==null;)Cy(n,r,s),s=s.sibling}function Cy(n,r,s){if(tn&&typeof tn.onCommitFiberUnmount=="function")try{tn.onCommitFiberUnmount(As,s)}catch{}switch(s.tag){case 26:vt||Bn(s,r),cr(n,r,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:vt||Bn(s,r);var o=st,l=Gt;Jr(s.type)&&(st=s.stateNode,Gt=!1),cr(n,r,s),uo(s.stateNode),st=o,Gt=l;break;case 5:vt||Bn(s,r);case 6:if(o=st,l=Gt,st=null,cr(n,r,s),st=o,Gt=l,st!==null)if(Gt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(s.stateNode)}catch(d){Xe(s,r,d)}else try{st.removeChild(s.stateNode)}catch(d){Xe(s,r,d)}break;case 18:st!==null&&(Gt?(n=st,Tv(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),Va(n)):Tv(st,s.stateNode));break;case 4:o=st,l=Gt,st=s.stateNode.containerInfo,Gt=!0,cr(n,r,s),st=o,Gt=l;break;case 0:case 11:case 14:case 15:Fr(2,s,r),vt||Fr(4,s,r),cr(n,r,s);break;case 1:vt||(Bn(s,r),o=s.stateNode,typeof o.componentWillUnmount=="function"&&Ay(s,r,o)),cr(n,r,s);break;case 21:cr(n,r,s);break;case 22:vt=(o=vt)||s.memoizedState!==null,cr(n,r,s),vt=o;break;default:cr(n,r,s)}}function Ly(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Va(n)}catch(s){Xe(r,r.return,s)}}}function My(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Va(n)}catch(s){Xe(r,r.return,s)}}function u1(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new wy),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new wy),r;default:throw Error(a(435,n.tag))}}function Jc(n,r){var s=u1(n);r.forEach(function(o){if(!s.has(o)){s.add(o);var l=y1.bind(null,n,o);o.then(l,l)}})}function Yt(n,r){var s=r.deletions;if(s!==null)for(var o=0;o<s.length;o++){var l=s[o],d=n,_=r,E=_;e:for(;E!==null;){switch(E.tag){case 27:if(Jr(E.type)){st=E.stateNode,Gt=!1;break e}break;case 5:st=E.stateNode,Gt=!1;break e;case 3:case 4:st=E.stateNode.containerInfo,Gt=!0;break e}E=E.return}if(st===null)throw Error(a(160));Cy(d,_,l),st=null,Gt=!1,d=l.alternate,d!==null&&(d.return=null),l.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Ny(r,n),r=r.sibling}var xn=null;function Ny(n,r){var s=n.alternate,o=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Yt(r,n),$t(n),o&4&&(Fr(3,n,n.return),Zs(3,n),Fr(5,n,n.return));break;case 1:Yt(r,n),$t(n),o&512&&(vt||s===null||Bn(s,s.return)),o&64&&or&&(n=n.updateQueue,n!==null&&(o=n.callbacks,o!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?o:s.concat(o))));break;case 26:var l=xn;if(Yt(r,n),$t(n),o&512&&(vt||s===null||Bn(s,s.return)),o&4){var d=s!==null?s.memoizedState:null;if(o=n.memoizedState,s===null)if(o===null)if(n.stateNode===null){e:{o=n.type,s=n.memoizedProps,l=l.ownerDocument||l;t:switch(o){case"title":d=l.getElementsByTagName("title")[0],(!d||d[Ds]||d[It]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=l.createElement(o),l.head.insertBefore(d,l.querySelector("head > title"))),Nt(d,o,s),d[It]=n,wt(d),o=d;break e;case"link":var _=Nv("link","href",l).get(o+(s.href||""));if(_){for(var E=0;E<_.length;E++)if(d=_[E],d.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&d.getAttribute("rel")===(s.rel==null?null:s.rel)&&d.getAttribute("title")===(s.title==null?null:s.title)&&d.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){_.splice(E,1);break t}}d=l.createElement(o),Nt(d,o,s),l.head.appendChild(d);break;case"meta":if(_=Nv("meta","content",l).get(o+(s.content||""))){for(E=0;E<_.length;E++)if(d=_[E],d.getAttribute("content")===(s.content==null?null:""+s.content)&&d.getAttribute("name")===(s.name==null?null:s.name)&&d.getAttribute("property")===(s.property==null?null:s.property)&&d.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&d.getAttribute("charset")===(s.charSet==null?null:s.charSet)){_.splice(E,1);break t}}d=l.createElement(o),Nt(d,o,s),l.head.appendChild(d);break;default:throw Error(a(468,o))}d[It]=n,wt(d),o=d}n.stateNode=o}else kv(l,n.type,n.stateNode);else n.stateNode=Mv(l,o,n.memoizedProps);else d!==o?(d===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):d.count--,o===null?kv(l,n.type,n.stateNode):Mv(l,o,n.memoizedProps)):o===null&&n.stateNode!==null&&Of(n,n.memoizedProps,s.memoizedProps)}break;case 27:Yt(r,n),$t(n),o&512&&(vt||s===null||Bn(s,s.return)),s!==null&&o&4&&Of(n,n.memoizedProps,s.memoizedProps);break;case 5:if(Yt(r,n),$t(n),o&512&&(vt||s===null||Bn(s,s.return)),n.flags&32){l=n.stateNode;try{la(l,"")}catch(ae){Xe(n,n.return,ae)}}o&4&&n.stateNode!=null&&(l=n.memoizedProps,Of(n,l,s!==null?s.memoizedProps:l)),o&1024&&(xf=!0);break;case 6:if(Yt(r,n),$t(n),o&4){if(n.stateNode===null)throw Error(a(162));o=n.memoizedProps,s=n.stateNode;try{s.nodeValue=o}catch(ae){Xe(n,n.return,ae)}}break;case 3:if(pu=null,l=xn,xn=du(r.containerInfo),Yt(r,n),xn=l,$t(n),o&4&&s!==null&&s.memoizedState.isDehydrated)try{Va(r.containerInfo)}catch(ae){Xe(n,n.return,ae)}xf&&(xf=!1,ky(n));break;case 4:o=xn,xn=du(n.stateNode.containerInfo),Yt(r,n),$t(n),xn=o;break;case 12:Yt(r,n),$t(n);break;case 31:Yt(r,n),$t(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,Jc(n,o)));break;case 13:Yt(r,n),$t(n),n.child.flags&8192&&n.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Zc=Se()),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,Jc(n,o)));break;case 22:l=n.memoizedState!==null;var A=s!==null&&s.memoizedState!==null,C=or,k=vt;if(or=C||l,vt=k||A,Yt(r,n),vt=k,or=C,$t(n),o&8192)e:for(r=n.stateNode,r._visibility=l?r._visibility&-2:r._visibility|1,l&&(s===null||A||or||vt||Vi(n)),s=null,r=n;;){if(r.tag===5||r.tag===26){if(s===null){A=s=r;try{if(d=A.stateNode,l)_=d.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{E=A.stateNode;var j=A.memoizedProps.style,L=j!=null&&j.hasOwnProperty("display")?j.display:null;E.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(ae){Xe(A,A.return,ae)}}}else if(r.tag===6){if(s===null){A=r;try{A.stateNode.nodeValue=l?"":A.memoizedProps}catch(ae){Xe(A,A.return,ae)}}}else if(r.tag===18){if(s===null){A=r;try{var N=A.stateNode;l?Av(N,!0):Av(A.stateNode,!1)}catch(ae){Xe(A,A.return,ae)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;s===r&&(s=null),r=r.return}s===r&&(s=null),r.sibling.return=r.return,r=r.sibling}o&4&&(o=n.updateQueue,o!==null&&(s=o.retryQueue,s!==null&&(o.retryQueue=null,Jc(n,s))));break;case 19:Yt(r,n),$t(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,Jc(n,o)));break;case 30:break;case 21:break;default:Yt(r,n),$t(n)}}function $t(n){var r=n.flags;if(r&2){try{for(var s,o=n.return;o!==null;){if(Oy(o)){s=o;break}o=o.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var l=s.stateNode,d=Df(n);Kc(n,d,l);break;case 5:var _=s.stateNode;s.flags&32&&(la(_,""),s.flags&=-33);var E=Df(n);Kc(n,E,_);break;case 3:case 4:var A=s.stateNode.containerInfo,C=Df(n);wf(n,C,A);break;default:throw Error(a(161))}}catch(k){Xe(n,n.return,k)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function ky(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;ky(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function ur(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)xy(n,r.alternate,r),r=r.sibling}function Vi(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:Fr(4,r,r.return),Vi(r);break;case 1:Bn(r,r.return);var s=r.stateNode;typeof s.componentWillUnmount=="function"&&Ay(r,r.return,s),Vi(r);break;case 27:uo(r.stateNode);case 26:case 5:Bn(r,r.return),Vi(r);break;case 22:r.memoizedState===null&&Vi(r);break;case 30:Vi(r);break;default:Vi(r)}n=n.sibling}}function lr(n,r,s){for(s=s&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,l=n,d=r,_=d.flags;switch(d.tag){case 0:case 11:case 15:lr(l,d,s),Zs(4,d);break;case 1:if(lr(l,d,s),o=d,l=o.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(C){Xe(o,o.return,C)}if(o=d,l=o.updateQueue,l!==null){var E=o.stateNode;try{var A=l.shared.hiddenCallbacks;if(A!==null)for(l.shared.hiddenCallbacks=null,l=0;l<A.length;l++)fg(A[l],E)}catch(C){Xe(o,o.return,C)}}s&&_&64&&Ty(d),eo(d,d.return);break;case 27:Dy(d);case 26:case 5:lr(l,d,s),s&&o===null&&_&4&&Ry(d),eo(d,d.return);break;case 12:lr(l,d,s);break;case 31:lr(l,d,s),s&&_&4&&Ly(l,d);break;case 13:lr(l,d,s),s&&_&4&&My(l,d);break;case 22:d.memoizedState===null&&lr(l,d,s),eo(d,d.return);break;case 30:break;default:lr(l,d,s)}r=r.sibling}}function If(n,r){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==s&&(n!=null&&n.refCount++,s!=null&&Bs(s))}function Cf(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Bs(n))}function In(n,r,s,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Py(n,r,s,o),r=r.sibling}function Py(n,r,s,o){var l=r.flags;switch(r.tag){case 0:case 11:case 15:In(n,r,s,o),l&2048&&Zs(9,r);break;case 1:In(n,r,s,o);break;case 3:In(n,r,s,o),l&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Bs(n)));break;case 12:if(l&2048){In(n,r,s,o),n=r.stateNode;try{var d=r.memoizedProps,_=d.id,E=d.onPostCommit;typeof E=="function"&&E(_,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(A){Xe(r,r.return,A)}}else In(n,r,s,o);break;case 31:In(n,r,s,o);break;case 13:In(n,r,s,o);break;case 23:break;case 22:d=r.stateNode,_=r.alternate,r.memoizedState!==null?d._visibility&2?In(n,r,s,o):to(n,r):d._visibility&2?In(n,r,s,o):(d._visibility|=2,Ia(n,r,s,o,(r.subtreeFlags&10256)!==0||!1)),l&2048&&If(_,r);break;case 24:In(n,r,s,o),l&2048&&Cf(r.alternate,r);break;default:In(n,r,s,o)}}function Ia(n,r,s,o,l){for(l=l&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var d=n,_=r,E=s,A=o,C=_.flags;switch(_.tag){case 0:case 11:case 15:Ia(d,_,E,A,l),Zs(8,_);break;case 23:break;case 22:var k=_.stateNode;_.memoizedState!==null?k._visibility&2?Ia(d,_,E,A,l):to(d,_):(k._visibility|=2,Ia(d,_,E,A,l)),l&&C&2048&&If(_.alternate,_);break;case 24:Ia(d,_,E,A,l),l&&C&2048&&Cf(_.alternate,_);break;default:Ia(d,_,E,A,l)}r=r.sibling}}function to(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var s=n,o=r,l=o.flags;switch(o.tag){case 22:to(s,o),l&2048&&If(o.alternate,o);break;case 24:to(s,o),l&2048&&Cf(o.alternate,o);break;default:to(s,o)}r=r.sibling}}var no=8192;function Ca(n,r,s){if(n.subtreeFlags&no)for(n=n.child;n!==null;)Uy(n,r,s),n=n.sibling}function Uy(n,r,s){switch(n.tag){case 26:Ca(n,r,s),n.flags&no&&n.memoizedState!==null&&Q1(s,xn,n.memoizedState,n.memoizedProps);break;case 5:Ca(n,r,s);break;case 3:case 4:var o=xn;xn=du(n.stateNode.containerInfo),Ca(n,r,s),xn=o;break;case 22:n.memoizedState===null&&(o=n.alternate,o!==null&&o.memoizedState!==null?(o=no,no=16777216,Ca(n,r,s),no=o):Ca(n,r,s));break;default:Ca(n,r,s)}}function jy(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function ro(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var o=r[s];xt=o,By(o,n)}jy(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)zy(n),n=n.sibling}function zy(n){switch(n.tag){case 0:case 11:case 15:ro(n),n.flags&2048&&Fr(9,n,n.return);break;case 3:ro(n);break;case 12:ro(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Wc(n)):ro(n);break;default:ro(n)}}function Wc(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var o=r[s];xt=o,By(o,n)}jy(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Fr(8,r,r.return),Wc(r);break;case 22:s=r.stateNode,s._visibility&2&&(s._visibility&=-3,Wc(r));break;default:Wc(r)}n=n.sibling}}function By(n,r){for(;xt!==null;){var s=xt;switch(s.tag){case 0:case 11:case 15:Fr(8,s,r);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var o=s.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Bs(s.memoizedState.cache)}if(o=s.child,o!==null)o.return=s,xt=o;else e:for(s=n;xt!==null;){o=xt;var l=o.sibling,d=o.return;if(Iy(o),o===s){xt=null;break e}if(l!==null){l.return=d,xt=l;break e}xt=d}}}var l1={getCacheForType:function(n){var r=Lt(ht),s=r.data.get(n);return s===void 0&&(s=n(),r.data.set(n,s)),s},cacheSignal:function(){return Lt(ht).controller.signal}},d1=typeof WeakMap=="function"?WeakMap:Map,Ye=0,Ze=null,Le=null,ke=0,$e=0,cn=null,Gr=!1,La=!1,Lf=!1,dr=0,ut=0,Yr=0,qi=0,Mf=0,un=0,Ma=0,io=null,Xt=null,Nf=!1,Zc=0,Vy=0,eu=1/0,tu=null,$r=null,Rt=0,Xr=null,Na=null,fr=0,kf=0,Pf=null,qy=null,ao=0,Uf=null;function ln(){return(Ye&2)!==0&&ke!==0?ke&-ke:M.T!==null?Hf():ih()}function Hy(){if(un===0)if((ke&536870912)===0||ze){var n=uc;uc<<=1,(uc&3932160)===0&&(uc=262144),un=n}else un=536870912;return n=sn.current,n!==null&&(n.flags|=32),un}function Qt(n,r,s){(n===Ze&&($e===2||$e===9)||n.cancelPendingCommit!==null)&&(ka(n,0),Qr(n,ke,un,!1)),Os(n,s),((Ye&2)===0||n!==Ze)&&(n===Ze&&((Ye&2)===0&&(qi|=s),ut===4&&Qr(n,ke,un,!1)),Vn(n))}function Fy(n,r,s){if((Ye&6)!==0)throw Error(a(327));var o=!s&&(r&127)===0&&(r&n.expiredLanes)===0||Rs(n,r),l=o?m1(n,r):zf(n,r,!0),d=o;do{if(l===0){La&&!o&&Qr(n,r,0,!1);break}else{if(s=n.current.alternate,d&&!f1(s)){l=zf(n,r,!1),d=!1;continue}if(l===2){if(d=r,n.errorRecoveryDisabledLanes&d)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){r=_;e:{var E=n;l=io;var A=E.current.memoizedState.isDehydrated;if(A&&(ka(E,_).flags|=256),_=zf(E,_,!1),_!==2){if(Lf&&!A){E.errorRecoveryDisabledLanes|=d,qi|=d,l=4;break e}d=Xt,Xt=l,d!==null&&(Xt===null?Xt=d:Xt.push.apply(Xt,d))}l=_}if(d=!1,l!==2)continue}}if(l===1){ka(n,0),Qr(n,r,0,!0);break}e:{switch(o=n,d=l,d){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Qr(o,r,un,!Gr);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(l=Zc+300-Se(),10<l)){if(Qr(o,r,un,!Gr),dc(o,0,!0)!==0)break e;fr=r,o.timeoutHandle=Sv(Gy.bind(null,o,s,Xt,tu,Nf,r,un,qi,Ma,Gr,d,"Throttled",-0,0),l);break e}Gy(o,s,Xt,tu,Nf,r,un,qi,Ma,Gr,d,null,-0,0)}}break}while(!0);Vn(n)}function Gy(n,r,s,o,l,d,_,E,A,C,k,j,L,N){if(n.timeoutHandle=-1,j=r.subtreeFlags,j&8192||(j&16785408)===16785408){j={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Jn},Uy(r,d,j);var ae=(d&62914560)===d?Zc-Se():(d&4194048)===d?Vy-Se():0;if(ae=K1(j,ae),ae!==null){fr=d,n.cancelPendingCommit=ae(Zy.bind(null,n,r,d,s,o,l,_,E,A,k,j,null,L,N)),Qr(n,d,_,!C);return}}Zy(n,r,d,s,o,l,_,E,A)}function f1(n){for(var r=n;;){var s=r.tag;if((s===0||s===11||s===15)&&r.flags&16384&&(s=r.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var o=0;o<s.length;o++){var l=s[o],d=l.getSnapshot;l=l.value;try{if(!rn(d(),l))return!1}catch{return!1}}if(s=r.child,r.subtreeFlags&16384&&s!==null)s.return=r,r=s;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Qr(n,r,s,o){r&=~Mf,r&=~qi,n.suspendedLanes|=r,n.pingedLanes&=~r,o&&(n.warmLanes|=r),o=n.expirationTimes;for(var l=r;0<l;){var d=31-nn(l),_=1<<d;o[d]=-1,l&=~_}s!==0&&th(n,s,r)}function nu(){return(Ye&6)===0?(so(0),!1):!0}function jf(){if(Le!==null){if($e===0)var n=Le.return;else n=Le,tr=Mi=null,Zd(n),Ra=null,qs=0,n=Le;for(;n!==null;)by(n.alternate,n),n=n.return;Le=null}}function ka(n,r){var s=n.timeoutHandle;s!==-1&&(n.timeoutHandle=-1,L1(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),fr=0,jf(),Ze=n,Le=s=Zn(n.current,null),ke=r,$e=0,cn=null,Gr=!1,La=Rs(n,r),Lf=!1,Ma=un=Mf=qi=Yr=ut=0,Xt=io=null,Nf=!1,(r&8)!==0&&(r|=r&32);var o=n.entangledLanes;if(o!==0)for(n=n.entanglements,o&=r;0<o;){var l=31-nn(o),d=1<<l;r|=n[l],o&=~d}return dr=r,Tc(),s}function Yy(n,r){Oe=null,M.H=Ks,r===Aa||r===Cc?(r=cg(),$e=3):r===Vd?(r=cg(),$e=4):$e=r===hf?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,cn=r,Le===null&&(ut=1,Gc(n,gn(r,n.current)))}function $y(){var n=sn.current;return n===null?!0:(ke&4194048)===ke?Sn===null:(ke&62914560)===ke||(ke&536870912)!==0?n===Sn:!1}function Xy(){var n=M.H;return M.H=Ks,n===null?Ks:n}function Qy(){var n=M.A;return M.A=l1,n}function ru(){ut=4,Gr||(ke&4194048)!==ke&&sn.current!==null||(La=!0),(Yr&134217727)===0&&(qi&134217727)===0||Ze===null||Qr(Ze,ke,un,!1)}function zf(n,r,s){var o=Ye;Ye|=2;var l=Xy(),d=Qy();(Ze!==n||ke!==r)&&(tu=null,ka(n,r)),r=!1;var _=ut;e:do try{if($e!==0&&Le!==null){var E=Le,A=cn;switch($e){case 8:jf(),_=6;break e;case 3:case 2:case 9:case 6:sn.current===null&&(r=!0);var C=$e;if($e=0,cn=null,Pa(n,E,A,C),s&&La){_=0;break e}break;default:C=$e,$e=0,cn=null,Pa(n,E,A,C)}}p1(),_=ut;break}catch(k){Yy(n,k)}while(!0);return r&&n.shellSuspendCounter++,tr=Mi=null,Ye=o,M.H=l,M.A=d,Le===null&&(Ze=null,ke=0,Tc()),_}function p1(){for(;Le!==null;)Ky(Le)}function m1(n,r){var s=Ye;Ye|=2;var o=Xy(),l=Qy();Ze!==n||ke!==r?(tu=null,eu=Se()+500,ka(n,r)):La=Rs(n,r);e:do try{if($e!==0&&Le!==null){r=Le;var d=cn;t:switch($e){case 1:$e=0,cn=null,Pa(n,r,d,1);break;case 2:case 9:if(sg(d)){$e=0,cn=null,Jy(r);break}r=function(){$e!==2&&$e!==9||Ze!==n||($e=7),Vn(n)},d.then(r,r);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:sg(d)?($e=0,cn=null,Jy(r)):($e=0,cn=null,Pa(n,r,d,7));break;case 5:var _=null;switch(Le.tag){case 26:_=Le.memoizedState;case 5:case 27:var E=Le;if(_?Pv(_):E.stateNode.complete){$e=0,cn=null;var A=E.sibling;if(A!==null)Le=A;else{var C=E.return;C!==null?(Le=C,iu(C)):Le=null}break t}}$e=0,cn=null,Pa(n,r,d,5);break;case 6:$e=0,cn=null,Pa(n,r,d,6);break;case 8:jf(),ut=6;break e;default:throw Error(a(462))}}_1();break}catch(k){Yy(n,k)}while(!0);return tr=Mi=null,M.H=o,M.A=l,Ye=s,Le!==null?0:(Ze=null,ke=0,Tc(),ut)}function _1(){for(;Le!==null&&!Ce();)Ky(Le)}function Ky(n){var r=Ey(n.alternate,n,dr);n.memoizedProps=n.pendingProps,r===null?iu(n):Le=r}function Jy(n){var r=n,s=r.alternate;switch(r.tag){case 15:case 0:r=my(s,r,r.pendingProps,r.type,void 0,ke);break;case 11:r=my(s,r,r.pendingProps,r.type.render,r.ref,ke);break;case 5:Zd(r);default:by(s,r),r=Le=Qh(r,dr),r=Ey(s,r,dr)}n.memoizedProps=n.pendingProps,r===null?iu(n):Le=r}function Pa(n,r,s,o){tr=Mi=null,Zd(r),Ra=null,qs=0;var l=r.return;try{if(r1(n,l,r,s,ke)){ut=1,Gc(n,gn(s,n.current)),Le=null;return}}catch(d){if(l!==null)throw Le=l,d;ut=1,Gc(n,gn(s,n.current)),Le=null;return}r.flags&32768?(ze||o===1?n=!0:La||(ke&536870912)!==0?n=!1:(Gr=n=!0,(o===2||o===9||o===3||o===6)&&(o=sn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Wy(r,n)):iu(r)}function iu(n){var r=n;do{if((r.flags&32768)!==0){Wy(r,Gr);return}n=r.return;var s=s1(r.alternate,r,dr);if(s!==null){Le=s;return}if(r=r.sibling,r!==null){Le=r;return}Le=r=n}while(r!==null);ut===0&&(ut=5)}function Wy(n,r){do{var s=o1(n.alternate,n);if(s!==null){s.flags&=32767,Le=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!r&&(n=n.sibling,n!==null)){Le=n;return}Le=n=s}while(n!==null);ut=6,Le=null}function Zy(n,r,s,o,l,d,_,E,A){n.cancelPendingCommit=null;do au();while(Rt!==0);if((Ye&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(d=r.lanes|r.childLanes,d|=Od,XA(n,s,d,_,E,A),n===Ze&&(Le=Ze=null,ke=0),Na=r,Xr=n,fr=s,kf=d,Pf=l,qy=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,v1(oc,function(){return iv(),null})):(n.callbackNode=null,n.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=M.T,M.T=null,l=q.p,q.p=2,_=Ye,Ye|=4;try{c1(n,r,s)}finally{Ye=_,q.p=l,M.T=o}}Rt=1,ev(),tv(),nv()}}function ev(){if(Rt===1){Rt=0;var n=Xr,r=Na,s=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||s){s=M.T,M.T=null;var o=q.p;q.p=2;var l=Ye;Ye|=4;try{Ny(r,n);var d=Jf,_=Bh(n.containerInfo),E=d.focusedElem,A=d.selectionRange;if(_!==E&&E&&E.ownerDocument&&zh(E.ownerDocument.documentElement,E)){if(A!==null&&Sd(E)){var C=A.start,k=A.end;if(k===void 0&&(k=C),"selectionStart"in E)E.selectionStart=C,E.selectionEnd=Math.min(k,E.value.length);else{var j=E.ownerDocument||document,L=j&&j.defaultView||window;if(L.getSelection){var N=L.getSelection(),ae=E.textContent.length,pe=Math.min(A.start,ae),Je=A.end===void 0?pe:Math.min(A.end,ae);!N.extend&&pe>Je&&(_=Je,Je=pe,pe=_);var w=jh(E,pe),O=jh(E,Je);if(w&&O&&(N.rangeCount!==1||N.anchorNode!==w.node||N.anchorOffset!==w.offset||N.focusNode!==O.node||N.focusOffset!==O.offset)){var I=j.createRange();I.setStart(w.node,w.offset),N.removeAllRanges(),pe>Je?(N.addRange(I),N.extend(O.node,O.offset)):(I.setEnd(O.node,O.offset),N.addRange(I))}}}}for(j=[],N=E;N=N.parentNode;)N.nodeType===1&&j.push({element:N,left:N.scrollLeft,top:N.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<j.length;E++){var U=j[E];U.element.scrollLeft=U.left,U.element.scrollTop=U.top}}gu=!!Kf,Jf=Kf=null}finally{Ye=l,q.p=o,M.T=s}}n.current=r,Rt=2}}function tv(){if(Rt===2){Rt=0;var n=Xr,r=Na,s=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||s){s=M.T,M.T=null;var o=q.p;q.p=2;var l=Ye;Ye|=4;try{xy(n,r.alternate,r)}finally{Ye=l,q.p=o,M.T=s}}Rt=3}}function nv(){if(Rt===4||Rt===3){Rt=0,At();var n=Xr,r=Na,s=fr,o=qy;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Rt=5:(Rt=0,Na=Xr=null,rv(n,n.pendingLanes));var l=n.pendingLanes;if(l===0&&($r=null),nd(s),r=r.stateNode,tn&&typeof tn.onCommitFiberRoot=="function")try{tn.onCommitFiberRoot(As,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=M.T,l=q.p,q.p=2,M.T=null;try{for(var d=n.onRecoverableError,_=0;_<o.length;_++){var E=o[_];d(E.value,{componentStack:E.stack})}}finally{M.T=r,q.p=l}}(fr&3)!==0&&au(),Vn(n),l=n.pendingLanes,(s&261930)!==0&&(l&42)!==0?n===Uf?ao++:(ao=0,Uf=n):ao=0,so(0)}}function rv(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,Bs(r)))}function au(){return ev(),tv(),nv(),iv()}function iv(){if(Rt!==5)return!1;var n=Xr,r=kf;kf=0;var s=nd(fr),o=M.T,l=q.p;try{q.p=32>s?32:s,M.T=null,s=Pf,Pf=null;var d=Xr,_=fr;if(Rt=0,Na=Xr=null,fr=0,(Ye&6)!==0)throw Error(a(331));var E=Ye;if(Ye|=4,zy(d.current),Py(d,d.current,_,s),Ye=E,so(0,!1),tn&&typeof tn.onPostCommitFiberRoot=="function")try{tn.onPostCommitFiberRoot(As,d)}catch{}return!0}finally{q.p=l,M.T=o,rv(n,r)}}function av(n,r,s){r=gn(s,r),r=_f(n.stateNode,r,2),n=Vr(n,r,2),n!==null&&(Os(n,2),Vn(n))}function Xe(n,r,s){if(n.tag===3)av(n,n,s);else for(;r!==null;){if(r.tag===3){av(r,n,s);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&($r===null||!$r.has(o))){n=gn(s,n),s=sy(2),o=Vr(r,s,2),o!==null&&(oy(s,o,r,n),Os(o,2),Vn(o));break}}r=r.return}}function Bf(n,r,s){var o=n.pingCache;if(o===null){o=n.pingCache=new d1;var l=new Set;o.set(r,l)}else l=o.get(r),l===void 0&&(l=new Set,o.set(r,l));l.has(s)||(Lf=!0,l.add(s),n=h1.bind(null,n,r,s),r.then(n,n))}function h1(n,r,s){var o=n.pingCache;o!==null&&o.delete(r),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,Ze===n&&(ke&s)===s&&(ut===4||ut===3&&(ke&62914560)===ke&&300>Se()-Zc?(Ye&2)===0&&ka(n,0):Mf|=s,Ma===ke&&(Ma=0)),Vn(n)}function sv(n,r){r===0&&(r=eh()),n=Ii(n,r),n!==null&&(Os(n,r),Vn(n))}function g1(n){var r=n.memoizedState,s=0;r!==null&&(s=r.retryLane),sv(n,s)}function y1(n,r){var s=0;switch(n.tag){case 31:case 13:var o=n.stateNode,l=n.memoizedState;l!==null&&(s=l.retryLane);break;case 19:o=n.stateNode;break;case 22:o=n.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(r),sv(n,s)}function v1(n,r){return je(n,r)}var su=null,Ua=null,Vf=!1,ou=!1,qf=!1,Kr=0;function Vn(n){n!==Ua&&n.next===null&&(Ua===null?su=Ua=n:Ua=Ua.next=n),ou=!0,Vf||(Vf=!0,S1())}function so(n,r){if(!qf&&ou){qf=!0;do for(var s=!1,o=su;o!==null;){if(n!==0){var l=o.pendingLanes;if(l===0)var d=0;else{var _=o.suspendedLanes,E=o.pingedLanes;d=(1<<31-nn(42|n)+1)-1,d&=l&~(_&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(s=!0,lv(o,d))}else d=ke,d=dc(o,o===Ze?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||Rs(o,d)||(s=!0,lv(o,d));o=o.next}while(s);qf=!1}}function E1(){ov()}function ov(){ou=Vf=!1;var n=0;Kr!==0&&C1()&&(n=Kr);for(var r=Se(),s=null,o=su;o!==null;){var l=o.next,d=cv(o,r);d===0?(o.next=null,s===null?su=l:s.next=l,l===null&&(Ua=s)):(s=o,(n!==0||(d&3)!==0)&&(ou=!0)),o=l}Rt!==0&&Rt!==5||so(n),Kr!==0&&(Kr=0)}function cv(n,r){for(var s=n.suspendedLanes,o=n.pingedLanes,l=n.expirationTimes,d=n.pendingLanes&-62914561;0<d;){var _=31-nn(d),E=1<<_,A=l[_];A===-1?((E&s)===0||(E&o)!==0)&&(l[_]=$A(E,r)):A<=r&&(n.expiredLanes|=E),d&=~E}if(r=Ze,s=ke,s=dc(n,n===r?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o=n.callbackNode,s===0||n===r&&($e===2||$e===9)||n.cancelPendingCommit!==null)return o!==null&&o!==null&&Ut(o),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||Rs(n,s)){if(r=s&-s,r===n.callbackPriority)return r;switch(o!==null&&Ut(o),nd(s)){case 2:case 8:s=W_;break;case 32:s=oc;break;case 268435456:s=Z_;break;default:s=oc}return o=uv.bind(null,n),s=je(s,o),n.callbackPriority=r,n.callbackNode=s,r}return o!==null&&o!==null&&Ut(o),n.callbackPriority=2,n.callbackNode=null,2}function uv(n,r){if(Rt!==0&&Rt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(au()&&n.callbackNode!==s)return null;var o=ke;return o=dc(n,n===Ze?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o===0?null:(Fy(n,o,r),cv(n,Se()),n.callbackNode!=null&&n.callbackNode===s?uv.bind(null,n):null)}function lv(n,r){if(au())return null;Fy(n,r,!0)}function S1(){M1(function(){(Ye&6)!==0?je(J_,E1):ov()})}function Hf(){if(Kr===0){var n=ba;n===0&&(n=cc,cc<<=1,(cc&261888)===0&&(cc=256)),Kr=n}return Kr}function dv(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:_c(""+n)}function fv(n,r){var s=r.ownerDocument.createElement("input");return s.name=r.name,s.value=r.value,n.id&&s.setAttribute("form",n.id),r.parentNode.insertBefore(s,r),n=new FormData(n),s.parentNode.removeChild(s),n}function b1(n,r,s,o,l){if(r==="submit"&&s&&s.stateNode===l){var d=dv((l[Ht]||null).action),_=o.submitter;_&&(r=(r=_[Ht]||null)?dv(r.formAction):_.getAttribute("formAction"),r!==null&&(d=r,_=null));var E=new vc("action","action",null,o,l);n.push({event:E,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Kr!==0){var A=_?fv(l,_):new FormData(l);uf(s,{pending:!0,data:A,method:l.method,action:d},null,A)}}else typeof d=="function"&&(E.preventDefault(),A=_?fv(l,_):new FormData(l),uf(s,{pending:!0,data:A,method:l.method,action:d},d,A))},currentTarget:l}]})}}for(var Ff=0;Ff<Rd.length;Ff++){var Gf=Rd[Ff],T1=Gf.toLowerCase(),A1=Gf[0].toUpperCase()+Gf.slice(1);wn(T1,"on"+A1)}wn(Hh,"onAnimationEnd"),wn(Fh,"onAnimationIteration"),wn(Gh,"onAnimationStart"),wn("dblclick","onDoubleClick"),wn("focusin","onFocus"),wn("focusout","onBlur"),wn(BR,"onTransitionRun"),wn(VR,"onTransitionStart"),wn(qR,"onTransitionCancel"),wn(Yh,"onTransitionEnd"),ca("onMouseEnter",["mouseout","mouseover"]),ca("onMouseLeave",["mouseout","mouseover"]),ca("onPointerEnter",["pointerout","pointerover"]),ca("onPointerLeave",["pointerout","pointerover"]),Oi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Oi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Oi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Oi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Oi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Oi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var oo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),R1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(oo));function pv(n,r){r=(r&4)!==0;for(var s=0;s<n.length;s++){var o=n[s],l=o.event;o=o.listeners;e:{var d=void 0;if(r)for(var _=o.length-1;0<=_;_--){var E=o[_],A=E.instance,C=E.currentTarget;if(E=E.listener,A!==d&&l.isPropagationStopped())break e;d=E,l.currentTarget=C;try{d(l)}catch(k){bc(k)}l.currentTarget=null,d=A}else for(_=0;_<o.length;_++){if(E=o[_],A=E.instance,C=E.currentTarget,E=E.listener,A!==d&&l.isPropagationStopped())break e;d=E,l.currentTarget=C;try{d(l)}catch(k){bc(k)}l.currentTarget=null,d=A}}}}function Me(n,r){var s=r[rd];s===void 0&&(s=r[rd]=new Set);var o=n+"__bubble";s.has(o)||(mv(r,n,2,!1),s.add(o))}function Yf(n,r,s){var o=0;r&&(o|=4),mv(s,n,o,r)}var cu="_reactListening"+Math.random().toString(36).slice(2);function $f(n){if(!n[cu]){n[cu]=!0,oh.forEach(function(s){s!=="selectionchange"&&(R1.has(s)||Yf(s,!1,n),Yf(s,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[cu]||(r[cu]=!0,Yf("selectionchange",!1,r))}}function mv(n,r,s,o){switch(Hv(r)){case 2:var l=Z1;break;case 8:l=eO;break;default:l=cp}s=l.bind(null,r,s,n),l=void 0,!fd||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(l=!0),o?l!==void 0?n.addEventListener(r,s,{capture:!0,passive:l}):n.addEventListener(r,s,!0):l!==void 0?n.addEventListener(r,s,{passive:l}):n.addEventListener(r,s,!1)}function Xf(n,r,s,o,l){var d=o;if((r&1)===0&&(r&2)===0&&o!==null)e:for(;;){if(o===null)return;var _=o.tag;if(_===3||_===4){var E=o.stateNode.containerInfo;if(E===l)break;if(_===4)for(_=o.return;_!==null;){var A=_.tag;if((A===3||A===4)&&_.stateNode.containerInfo===l)return;_=_.return}for(;E!==null;){if(_=aa(E),_===null)return;if(A=_.tag,A===5||A===6||A===26||A===27){o=d=_;continue e}E=E.parentNode}}o=o.return}vh(function(){var C=d,k=ld(s),j=[];e:{var L=$h.get(n);if(L!==void 0){var N=vc,ae=n;switch(n){case"keypress":if(gc(s)===0)break e;case"keydown":case"keyup":N=yR;break;case"focusin":ae="focus",N=hd;break;case"focusout":ae="blur",N=hd;break;case"beforeblur":case"afterblur":N=hd;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":N=bh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":N=sR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":N=SR;break;case Hh:case Fh:case Gh:N=uR;break;case Yh:N=TR;break;case"scroll":case"scrollend":N=iR;break;case"wheel":N=RR;break;case"copy":case"cut":case"paste":N=dR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":N=Ah;break;case"toggle":case"beforetoggle":N=DR}var pe=(r&4)!==0,Je=!pe&&(n==="scroll"||n==="scrollend"),w=pe?L!==null?L+"Capture":null:L;pe=[];for(var O=C,I;O!==null;){var U=O;if(I=U.stateNode,U=U.tag,U!==5&&U!==26&&U!==27||I===null||w===null||(U=xs(O,w),U!=null&&pe.push(co(O,U,I))),Je)break;O=O.return}0<pe.length&&(L=new N(L,ae,null,s,k),j.push({event:L,listeners:pe}))}}if((r&7)===0){e:{if(L=n==="mouseover"||n==="pointerover",N=n==="mouseout"||n==="pointerout",L&&s!==ud&&(ae=s.relatedTarget||s.fromElement)&&(aa(ae)||ae[ia]))break e;if((N||L)&&(L=k.window===k?k:(L=k.ownerDocument)?L.defaultView||L.parentWindow:window,N?(ae=s.relatedTarget||s.toElement,N=C,ae=ae?aa(ae):null,ae!==null&&(Je=u(ae),pe=ae.tag,ae!==Je||pe!==5&&pe!==27&&pe!==6)&&(ae=null)):(N=null,ae=C),N!==ae)){if(pe=bh,U="onMouseLeave",w="onMouseEnter",O="mouse",(n==="pointerout"||n==="pointerover")&&(pe=Ah,U="onPointerLeave",w="onPointerEnter",O="pointer"),Je=N==null?L:ws(N),I=ae==null?L:ws(ae),L=new pe(U,O+"leave",N,s,k),L.target=Je,L.relatedTarget=I,U=null,aa(k)===C&&(pe=new pe(w,O+"enter",ae,s,k),pe.target=I,pe.relatedTarget=Je,U=pe),Je=U,N&&ae)t:{for(pe=O1,w=N,O=ae,I=0,U=w;U;U=pe(U))I++;U=0;for(var ue=O;ue;ue=pe(ue))U++;for(;0<I-U;)w=pe(w),I--;for(;0<U-I;)O=pe(O),U--;for(;I--;){if(w===O||O!==null&&w===O.alternate){pe=w;break t}w=pe(w),O=pe(O)}pe=null}else pe=null;N!==null&&_v(j,L,N,pe,!1),ae!==null&&Je!==null&&_v(j,Je,ae,pe,!0)}}e:{if(L=C?ws(C):window,N=L.nodeName&&L.nodeName.toLowerCase(),N==="select"||N==="input"&&L.type==="file")var Fe=Lh;else if(Ih(L))if(Mh)Fe=UR;else{Fe=kR;var oe=NR}else N=L.nodeName,!N||N.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?C&&cd(C.elementType)&&(Fe=Lh):Fe=PR;if(Fe&&(Fe=Fe(n,C))){Ch(j,Fe,s,k);break e}oe&&oe(n,L,C),n==="focusout"&&C&&L.type==="number"&&C.memoizedProps.value!=null&&od(L,"number",L.value)}switch(oe=C?ws(C):window,n){case"focusin":(Ih(oe)||oe.contentEditable==="true")&&(ma=oe,bd=C,Us=null);break;case"focusout":Us=bd=ma=null;break;case"mousedown":Td=!0;break;case"contextmenu":case"mouseup":case"dragend":Td=!1,Vh(j,s,k);break;case"selectionchange":if(zR)break;case"keydown":case"keyup":Vh(j,s,k)}var we;if(yd)e:{switch(n){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else pa?wh(n,s)&&(Pe="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(Pe="onCompositionStart");Pe&&(Rh&&s.locale!=="ko"&&(pa||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&pa&&(we=Eh()):(Nr=k,pd="value"in Nr?Nr.value:Nr.textContent,pa=!0)),oe=uu(C,Pe),0<oe.length&&(Pe=new Th(Pe,n,null,s,k),j.push({event:Pe,listeners:oe}),we?Pe.data=we:(we=xh(s),we!==null&&(Pe.data=we)))),(we=xR?IR(n,s):CR(n,s))&&(Pe=uu(C,"onBeforeInput"),0<Pe.length&&(oe=new Th("onBeforeInput","beforeinput",null,s,k),j.push({event:oe,listeners:Pe}),oe.data=we)),b1(j,n,C,s,k)}pv(j,r)})}function co(n,r,s){return{instance:n,listener:r,currentTarget:s}}function uu(n,r){for(var s=r+"Capture",o=[];n!==null;){var l=n,d=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||d===null||(l=xs(n,s),l!=null&&o.unshift(co(n,l,d)),l=xs(n,r),l!=null&&o.push(co(n,l,d))),n.tag===3)return o;n=n.return}return[]}function O1(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function _v(n,r,s,o,l){for(var d=r._reactName,_=[];s!==null&&s!==o;){var E=s,A=E.alternate,C=E.stateNode;if(E=E.tag,A!==null&&A===o)break;E!==5&&E!==26&&E!==27||C===null||(A=C,l?(C=xs(s,d),C!=null&&_.unshift(co(s,C,A))):l||(C=xs(s,d),C!=null&&_.push(co(s,C,A)))),s=s.return}_.length!==0&&n.push({event:r,listeners:_})}var D1=/\r\n?/g,w1=/\u0000|\uFFFD/g;function hv(n){return(typeof n=="string"?n:""+n).replace(D1,`
10`).replace(w1,"")}function gv(n,r){return r=hv(r),hv(n)===r}function Ke(n,r,s,o,l,d){switch(s){case"children":typeof o=="string"?r==="body"||r==="textarea"&&o===""||la(n,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&la(n,""+o);break;case"className":pc(n,"class",o);break;case"tabIndex":pc(n,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":pc(n,s,o);break;case"style":gh(n,o,d);break;case"data":if(r!=="object"){pc(n,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||s!=="href")){n.removeAttribute(s);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(s);break}o=_c(""+o),n.setAttribute(s,o);break;case"action":case"formAction":if(typeof o=="function"){n.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(s==="formAction"?(r!=="input"&&Ke(n,r,"name",l.name,l,null),Ke(n,r,"formEncType",l.formEncType,l,null),Ke(n,r,"formMethod",l.formMethod,l,null),Ke(n,r,"formTarget",l.formTarget,l,null)):(Ke(n,r,"encType",l.encType,l,null),Ke(n,r,"method",l.method,l,null),Ke(n,r,"target",l.target,l,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(s);break}o=_c(""+o),n.setAttribute(s,o);break;case"onClick":o!=null&&(n.onclick=Jn);break;case"onScroll":o!=null&&Me("scroll",n);break;case"onScrollEnd":o!=null&&Me("scrollend",n);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(s=o.__html,s!=null){if(l.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"multiple":n.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":n.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){n.removeAttribute("xlink:href");break}s=_c(""+o),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(s,""+o):n.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":o===!0?n.setAttribute(s,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(s,o):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?n.setAttribute(s,o):n.removeAttribute(s);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?n.removeAttribute(s):n.setAttribute(s,o);break;case"popover":Me("beforetoggle",n),Me("toggle",n),fc(n,"popover",o);break;case"xlinkActuate":Kn(n,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Kn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Kn(n,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Kn(n,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Kn(n,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Kn(n,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Kn(n,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Kn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Kn(n,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":fc(n,"is",o);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=nR.get(s)||s,fc(n,s,o))}}function Qf(n,r,s,o,l,d){switch(s){case"style":gh(n,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(s=o.__html,s!=null){if(l.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"children":typeof o=="string"?la(n,o):(typeof o=="number"||typeof o=="bigint")&&la(n,""+o);break;case"onScroll":o!=null&&Me("scroll",n);break;case"onScrollEnd":o!=null&&Me("scrollend",n);break;case"onClick":o!=null&&(n.onclick=Jn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ch.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(l=s.endsWith("Capture"),r=s.slice(2,l?s.length-7:void 0),d=n[Ht]||null,d=d!=null?d[s]:null,typeof d=="function"&&n.removeEventListener(r,d,l),typeof o=="function")){typeof d!="function"&&d!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(r,o,l);break e}s in n?n[s]=o:o===!0?n.setAttribute(s,""):fc(n,s,o)}}}function Nt(n,r,s){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",n),Me("load",n);var o=!1,l=!1,d;for(d in s)if(s.hasOwnProperty(d)){var _=s[d];if(_!=null)switch(d){case"src":o=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Ke(n,r,d,_,s,null)}}l&&Ke(n,r,"srcSet",s.srcSet,s,null),o&&Ke(n,r,"src",s.src,s,null);return;case"input":Me("invalid",n);var E=d=_=l=null,A=null,C=null;for(o in s)if(s.hasOwnProperty(o)){var k=s[o];if(k!=null)switch(o){case"name":l=k;break;case"type":_=k;break;case"checked":A=k;break;case"defaultChecked":C=k;break;case"value":d=k;break;case"defaultValue":E=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(a(137,r));break;default:Ke(n,r,o,k,s,null)}}ph(n,d,E,A,C,_,l,!1);return;case"select":Me("invalid",n),o=_=d=null;for(l in s)if(s.hasOwnProperty(l)&&(E=s[l],E!=null))switch(l){case"value":d=E;break;case"defaultValue":_=E;break;case"multiple":o=E;default:Ke(n,r,l,E,s,null)}r=d,s=_,n.multiple=!!o,r!=null?ua(n,!!o,r,!1):s!=null&&ua(n,!!o,s,!0);return;case"textarea":Me("invalid",n),d=l=o=null;for(_ in s)if(s.hasOwnProperty(_)&&(E=s[_],E!=null))switch(_){case"value":o=E;break;case"defaultValue":l=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(a(91));break;default:Ke(n,r,_,E,s,null)}_h(n,o,l,d);return;case"option":for(A in s)s.hasOwnProperty(A)&&(o=s[A],o!=null)&&(A==="selected"?n.selected=o&&typeof o!="function"&&typeof o!="symbol":Ke(n,r,A,o,s,null));return;case"dialog":Me("beforetoggle",n),Me("toggle",n),Me("cancel",n),Me("close",n);break;case"iframe":case"object":Me("load",n);break;case"video":case"audio":for(o=0;o<oo.length;o++)Me(oo[o],n);break;case"image":Me("error",n),Me("load",n);break;case"details":Me("toggle",n);break;case"embed":case"source":case"link":Me("error",n),Me("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(C in s)if(s.hasOwnProperty(C)&&(o=s[C],o!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Ke(n,r,C,o,s,null)}return;default:if(cd(r)){for(k in s)s.hasOwnProperty(k)&&(o=s[k],o!==void 0&&Qf(n,r,k,o,s,void 0));return}}for(E in s)s.hasOwnProperty(E)&&(o=s[E],o!=null&&Ke(n,r,E,o,s,null))}function x1(n,r,s,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,d=null,_=null,E=null,A=null,C=null,k=null;for(N in s){var j=s[N];if(s.hasOwnProperty(N)&&j!=null)switch(N){case"checked":break;case"value":break;case"defaultValue":A=j;default:o.hasOwnProperty(N)||Ke(n,r,N,null,o,j)}}for(var L in o){var N=o[L];if(j=s[L],o.hasOwnProperty(L)&&(N!=null||j!=null))switch(L){case"type":d=N;break;case"name":l=N;break;case"checked":C=N;break;case"defaultChecked":k=N;break;case"value":_=N;break;case"defaultValue":E=N;break;case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(a(137,r));break;default:N!==j&&Ke(n,r,L,N,o,j)}}sd(n,_,E,A,C,k,d,l);return;case"select":N=_=E=L=null;for(d in s)if(A=s[d],s.hasOwnProperty(d)&&A!=null)switch(d){case"value":break;case"multiple":N=A;default:o.hasOwnProperty(d)||Ke(n,r,d,null,o,A)}for(l in o)if(d=o[l],A=s[l],o.hasOwnProperty(l)&&(d!=null||A!=null))switch(l){case"value":L=d;break;case"defaultValue":E=d;break;case"multiple":_=d;default:d!==A&&Ke(n,r,l,d,o,A)}r=E,s=_,o=N,L!=null?ua(n,!!s,L,!1):!!o!=!!s&&(r!=null?ua(n,!!s,r,!0):ua(n,!!s,s?[]:"",!1));return;case"textarea":N=L=null;for(E in s)if(l=s[E],s.hasOwnProperty(E)&&l!=null&&!o.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Ke(n,r,E,null,o,l)}for(_ in o)if(l=o[_],d=s[_],o.hasOwnProperty(_)&&(l!=null||d!=null))switch(_){case"value":L=l;break;case"defaultValue":N=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(a(91));break;default:l!==d&&Ke(n,r,_,l,o,d)}mh(n,L,N);return;case"option":for(var ae in s)L=s[ae],s.hasOwnProperty(ae)&&L!=null&&!o.hasOwnProperty(ae)&&(ae==="selected"?n.selected=!1:Ke(n,r,ae,null,o,L));for(A in o)L=o[A],N=s[A],o.hasOwnProperty(A)&&L!==N&&(L!=null||N!=null)&&(A==="selected"?n.selected=L&&typeof L!="function"&&typeof L!="symbol":Ke(n,r,A,L,o,N));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var pe in s)L=s[pe],s.hasOwnProperty(pe)&&L!=null&&!o.hasOwnProperty(pe)&&Ke(n,r,pe,null,o,L);for(C in o)if(L=o[C],N=s[C],o.hasOwnProperty(C)&&L!==N&&(L!=null||N!=null))switch(C){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(a(137,r));break;default:Ke(n,r,C,L,o,N)}return;default:if(cd(r)){for(var Je in s)L=s[Je],s.hasOwnProperty(Je)&&L!==void 0&&!o.hasOwnProperty(Je)&&Qf(n,r,Je,void 0,o,L);for(k in o)L=o[k],N=s[k],!o.hasOwnProperty(k)||L===N||L===void 0&&N===void 0||Qf(n,r,k,L,o,N);return}}for(var w in s)L=s[w],s.hasOwnProperty(w)&&L!=null&&!o.hasOwnProperty(w)&&Ke(n,r,w,null,o,L);for(j in o)L=o[j],N=s[j],!o.hasOwnProperty(j)||L===N||L==null&&N==null||Ke(n,r,j,L,o,N)}function yv(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function I1(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,s=performance.getEntriesByType("resource"),o=0;o<s.length;o++){var l=s[o],d=l.transferSize,_=l.initiatorType,E=l.duration;if(d&&E&&yv(_)){for(_=0,E=l.responseEnd,o+=1;o<s.length;o++){var A=s[o],C=A.startTime;if(C>E)break;var k=A.transferSize,j=A.initiatorType;k&&yv(j)&&(A=A.responseEnd,_+=k*(A<E?1:(E-C)/(A-C)))}if(--o,r+=8*(d+_)/(l.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 18,285 bytes, line 10
10n:5}var Kf=null,Jf=null;function lu(n){return n.nodeType===9?n:n.ownerDocument}function vv(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ev(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function Wf(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Zf=null;function C1(){var n=window.event;return n&&n.type==="popstate"?n===Zf?!1:(Zf=n,!0):(Zf=null,!1)}var Sv=typeof setTimeout=="function"?setTimeout:void 0,L1=typeof clearTimeout=="function"?clearTimeout:void 0,bv=typeof Promise=="function"?Promise:void 0,M1=typeof queueMicrotask=="function"?queueMicrotask:typeof bv<"u"?function(n){return bv.resolve(null).then(n).catch(N1)}:Sv;function N1(n){setTimeout(function(){throw n})}function Jr(n){return n==="head"}function Tv(n,r){var s=r,o=0;do{var l=s.nextSibling;if(n.removeChild(s),l&&l.nodeType===8)if(s=l.data,s==="/$"||s==="/&"){if(o===0){n.removeChild(l),Va(r);return}o--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")o++;else if(s==="html")uo(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,uo(s);for(var d=s.firstChild;d;){var _=d.nextSibling,E=d.nodeName;d[Ds]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&d.rel.toLowerCase()==="stylesheet"||s.removeChild(d),d=_}}else s==="body"&&uo(n.ownerDocument.body);s=l}while(s);Va(r)}function Av(n,r){var s=n;n=0;do{var o=s.nextSibling;if(s.nodeType===1?r?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(r?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),o&&o.nodeType===8)if(s=o.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=o}while(s)}function ep(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var s=r;switch(r=r.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":ep(s),id(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function k1(n,r,s,o){for(;n.nodeType===1;){var l=s;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(o){if(!n[Ds])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(d=n.getAttribute("rel"),d==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(d!==l.rel||n.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||n.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||n.getAttribute("title")!==(l.title==null?null:l.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(d=n.getAttribute("src"),(d!==(l.src==null?null:l.src)||n.getAttribute("type")!==(l.type==null?null:l.type)||n.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&d&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var d=l.name==null?null:""+l.name;if(l.type==="hidden"&&n.getAttribute("name")===d)return n}else return n;if(n=bn(n.nextSibling),n===null)break}return null}function P1(n,r,s){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=bn(n.nextSibling),n===null))return null;return n}function Rv(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=bn(n.nextSibling),n===null))return null;return n}function tp(n){return n.data==="$?"||n.data==="$~"}function np(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function U1(n,r){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||s.readyState!=="loading")r();else{var o=function(){r(),s.removeEventListener("DOMContentLoaded",o)};s.addEventListener("DOMContentLoaded",o),n._reactRetry=o}}function bn(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var rp=null;function Ov(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(r===0)return bn(n.nextSibling);r--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||r++}n=n.nextSibling}return null}function Dv(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(r===0)return n;r--}else s!=="/$"&&s!=="/&"||r++}n=n.previousSibling}return null}function wv(n,r,s){switch(r=lu(s),n){case"html":if(n=r.documentElement,!n)throw Error(a(452));return n;case"head":if(n=r.head,!n)throw Error(a(453));return n;case"body":if(n=r.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function uo(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);id(n)}var Tn=new Map,xv=new Set;function du(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var pr=q.d;q.d={f:j1,r:z1,D:B1,C:V1,L:q1,m:H1,X:G1,S:F1,M:Y1};function j1(){var n=pr.f(),r=nu();return n||r}function z1(n){var r=sa(n);r!==null&&r.tag===5&&r.type==="form"?Yg(r):pr.r(n)}var ja=typeof document>"u"?null:document;function Iv(n,r,s){var o=ja;if(o&&typeof r=="string"&&r){var l=_n(r);l='link[rel="'+n+'"][href="'+l+'"]',typeof s=="string"&&(l+='[crossorigin="'+s+'"]'),xv.has(l)||(xv.add(l),n={rel:n,crossOrigin:s,href:r},o.querySelector(l)===null&&(r=o.createElement("link"),Nt(r,"link",n),wt(r),o.head.appendChild(r)))}}function B1(n){pr.D(n),Iv("dns-prefetch",n,null)}function V1(n,r){pr.C(n,r),Iv("preconnect",n,r)}function q1(n,r,s){pr.L(n,r,s);var o=ja;if(o&&n&&r){var l='link[rel="preload"][as="'+_n(r)+'"]';r==="image"&&s&&s.imageSrcSet?(l+='[imagesrcset="'+_n(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(l+='[imagesizes="'+_n(s.imageSizes)+'"]')):l+='[href="'+_n(n)+'"]';var d=l;switch(r){case"style":d=za(n);break;case"script":d=Ba(n)}Tn.has(d)||(n=g({rel:"preload",href:r==="image"&&s&&s.imageSrcSet?void 0:n,as:r},s),Tn.set(d,n),o.querySelector(l)!==null||r==="style"&&o.querySelector(lo(d))||r==="script"&&o.querySelector(fo(d))||(r=o.createElement("link"),Nt(r,"link",n),wt(r),o.head.appendChild(r)))}}function H1(n,r){pr.m(n,r);var s=ja;if(s&&n){var o=r&&typeof r.as=="string"?r.as:"script",l='link[rel="modulepreload"][as="'+_n(o)+'"][href="'+_n(n)+'"]',d=l;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Ba(n)}if(!Tn.has(d)&&(n=g({rel:"modulepreload",href:n},r),Tn.set(d,n),s.querySelector(l)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(fo(d)))return}o=s.createElement("link"),Nt(o,"link",n),wt(o),s.head.appendChild(o)}}}function F1(n,r,s){pr.S(n,r,s);var o=ja;if(o&&n){var l=oa(o).hoistableStyles,d=za(n);r=r||"default";var _=l.get(d);if(!_){var E={loading:0,preload:null};if(_=o.querySelector(lo(d)))E.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":r},s),(s=Tn.get(d))&&ip(n,s);var A=_=o.createElement("link");wt(A),Nt(A,"link",n),A._p=new Promise(function(C,k){A.onload=C,A.onerror=k}),A.addEventListener("load",function(){E.loading|=1}),A.addEventListener("error",function(){E.loading|=2}),E.loading|=4,fu(_,r,o)}_={type:"stylesheet",instance:_,count:1,state:E},l.set(d,_)}}}function G1(n,r){pr.X(n,r);var s=ja;if(s&&n){var o=oa(s).hoistableScripts,l=Ba(n),d=o.get(l);d||(d=s.querySelector(fo(l)),d||(n=g({src:n,async:!0},r),(r=Tn.get(l))&&ap(n,r),d=s.createElement("script"),wt(d),Nt(d,"link",n),s.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(l,d))}}function Y1(n,r){pr.M(n,r);var s=ja;if(s&&n){var o=oa(s).hoistableScripts,l=Ba(n),d=o.get(l);d||(d=s.querySelector(fo(l)),d||(n=g({src:n,async:!0,type:"module"},r),(r=Tn.get(l))&&ap(n,r),d=s.createElement("script"),wt(d),Nt(d,"link",n),s.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(l,d))}}function Cv(n,r,s,o){var l=(l=Re.current)?du(l):null;if(!l)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(r=za(s.href),s=oa(l).hoistableStyles,o=s.get(r),o||(o={type:"style",instance:null,count:0,state:null},s.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=za(s.href);var d=oa(l).hoistableStyles,_=d.get(n);if(_||(l=l.ownerDocument||l,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(n,_),(d=l.querySelector(lo(n)))&&!d._p&&(_.instance=d,_.state.loading=5),Tn.has(n)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Tn.set(n,s),d||$1(l,n,s,_.state))),r&&o===null)throw Error(a(528,""));return _}if(r&&o!==null)throw Error(a(529,""));return null;case"script":return r=s.async,s=s.src,typeof s=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Ba(s),s=oa(l).hoistableScripts,o=s.get(r),o||(o={type:"script",instance:null,count:0,state:null},s.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function za(n){return'href="'+_n(n)+'"'}function lo(n){return'link[rel="stylesheet"]['+n+"]"}function Lv(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function $1(n,r,s,o){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?o.loading=1:(r=n.createElement("link"),o.preload=r,r.addEventListener("load",function(){return o.loading|=1}),r.addEventListener("error",function(){return o.loading|=2}),Nt(r,"link",s),wt(r),n.head.appendChild(r))}function Ba(n){return'[src="'+_n(n)+'"]'}function fo(n){return"script[async]"+n}function Mv(n,r,s){if(r.count++,r.instance===null)switch(r.type){case"style":var o=n.querySelector('style[data-href~="'+_n(s.href)+'"]');if(o)return r.instance=o,wt(o),o;var l=g({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return o=(n.ownerDocument||n).createElement("style"),wt(o),Nt(o,"style",l),fu(o,s.precedence,n),r.instance=o;case"stylesheet":l=za(s.href);var d=n.querySelector(lo(l));if(d)return r.state.loading|=4,r.instance=d,wt(d),d;o=Lv(s),(l=Tn.get(l))&&ip(o,l),d=(n.ownerDocument||n).createElement("link"),wt(d);var _=d;return _._p=new Promise(function(E,A){_.onload=E,_.onerror=A}),Nt(d,"link",o),r.state.loading|=4,fu(d,s.precedence,n),r.instance=d;case"script":return d=Ba(s.src),(l=n.querySelector(fo(d)))?(r.instance=l,wt(l),l):(o=s,(l=Tn.get(d))&&(o=g({},s),ap(o,l)),n=n.ownerDocument||n,l=n.createElement("script"),wt(l),Nt(l,"link",o),n.head.appendChild(l),r.instance=l);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,fu(o,s.precedence,n));return r.instance}function fu(n,r,s){for(var o=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=o.length?o[o.length-1]:null,d=l,_=0;_<o.length;_++){var E=o[_];if(E.dataset.precedence===r)d=E;else if(d!==l)break}d?d.parentNode.insertBefore(n,d.nextSibling):(r=s.nodeType===9?s.head:s,r.insertBefore(n,r.firstChild))}function ip(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function ap(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var pu=null;function Nv(n,r,s){if(pu===null){var o=new Map,l=pu=new Map;l.set(s,o)}else l=pu,o=l.get(s),o||(o=new Map,l.set(s,o));if(o.has(n))return o;for(o.set(n,null),s=s.getElementsByTagName(n),l=0;l<s.length;l++){var d=s[l];if(!(d[Ds]||d[It]||n==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var _=d.getAttribute(r)||"";_=n+_;var E=o.get(_);E?E.push(d):o.set(_,[d])}}return o}function kv(n,r,s){n=n.ownerDocument||n,n.head.insertBefore(s,r==="title"?n.querySelector("head > title"):null)}function X1(n,r,s){if(s===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Pv(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function Q1(n,r,s,o){if(s.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var l=za(o.href),d=r.querySelector(lo(l));if(d){r=d._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=mu.bind(n),r.then(n,n)),s.state.loading|=4,s.instance=d,wt(d);return}d=r.ownerDocument||r,o=Lv(o),(l=Tn.get(l))&&ip(o,l),d=d.createElement("link"),wt(d);var _=d;_._p=new Promise(function(E,A){_.onload=E,_.onerror=A}),Nt(d,"link",o),s.instance=d}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,r),(r=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=mu.bind(n),r.addEventListener("load",s),r.addEventListener("error",s))}}var sp=0;function K1(n,r){return n.stylesheets&&n.count===0&&hu(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var o=setTimeout(function(){if(n.stylesheets&&hu(n,n.stylesheets),n.unsuspend){var d=n.unsuspend;n.unsuspend=null,d()}},6e4+r);0<n.imgBytes&&sp===0&&(sp=62500*I1());var l=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&hu(n,n.stylesheets),n.unsuspend)){var d=n.unsuspend;n.unsuspend=null,d()}},(n.imgBytes>sp?50:800)+r);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(o),clearTimeout(l)}}:null}function mu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var _u=null;function hu(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,_u=new Map,r.forEach(J1,n),_u=null,mu.call(n))}function J1(n,r){if(!(r.state.loading&4)){var s=_u.get(n);if(s)var o=s.get(null);else{s=new Map,_u.set(n,s);for(var l=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<l.length;d++){var _=l[d];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(s.set(_.dataset.precedence,_),o=_)}o&&s.set(null,o)}l=r.instance,_=l.getAttribute("data-precedence"),d=s.get(_)||o,d===o&&s.set(null,l),s.set(_,l),this.count++,o=mu.bind(this),l.addEventListener("load",o),l.addEventListener("error",o),d?d.parentNode.insertBefore(l,d.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(l,n.firstChild)),r.state.loading|=4}}var po={$$typeof:le,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function W1(n,r,s,o,l,d,_,E,A){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ed(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ed(0),this.hiddenUpdates=ed(null),this.identifierPrefix=o,this.onUncaughtError=l,this.onCaughtError=d,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function Uv(n,r,s,o,l,d,_,E,A,C,k,j){return n=new W1(n,r,s,_,A,C,k,j,E),r=1,d===!0&&(r|=24),d=an(3,null,null,r),n.current=d,d.stateNode=n,r=jd(),r.refCount++,n.pooledCache=r,r.refCount++,d.memoizedState={element:o,isDehydrated:s,cache:r},qd(d),n}function jv(n){return n?(n=ga,n):ga}function zv(n,r,s,o,l,d){l=jv(l),o.context===null?o.context=l:o.pendingContext=l,o=Br(r),o.payload={element:s},d=d===void 0?null:d,d!==null&&(o.callback=d),s=Vr(n,o,r),s!==null&&(Qt(s,n,r),Fs(s,n,r))}function Bv(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<r?s:r}}function op(n,r){Bv(n,r),(n=n.alternate)&&Bv(n,r)}function Vv(n){if(n.tag===13||n.tag===31){var r=Ii(n,67108864);r!==null&&Qt(r,n,67108864),op(n,67108864)}}function qv(n){if(n.tag===13||n.tag===31){var r=ln();r=td(r);var s=Ii(n,r);s!==null&&Qt(s,n,r),op(n,r)}}var gu=!0;function Z1(n,r,s,o){var l=M.T;M.T=null;var d=q.p;try{q.p=2,cp(n,r,s,o)}finally{q.p=d,M.T=l}}function eO(n,r,s,o){var l=M.T;M.T=null;var d=q.p;try{q.p=8,cp(n,r,s,o)}finally{q.p=d,M.T=l}}function cp(n,r,s,o){if(gu){var l=up(o);if(l===null)Xf(n,r,o,yu,s),Fv(n,o);else if(nO(l,n,r,s,o))o.stopPropagation();else if(Fv(n,o),r&4&&-1<tO.indexOf(n)){for(;l!==null;){var d=sa(l);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var _=Ri(d.pendingLanes);if(_!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;_;){var A=1<<31-nn(_);E.entanglements[1]|=A,_&=~A}Vn(d),(Ye&6)===0&&(eu=Se()+500,so(0))}}break;case 31:case 13:E=Ii(d,2),E!==null&&Qt(E,d,2),nu(),op(d,2)}if(d=up(o),d===null&&Xf(n,r,o,yu,s),d===l)break;l=d}l!==null&&o.stopPropagation()}else Xf(n,r,o,null,s)}}function up(n){return n=ld(n),lp(n)}var yu=null;function lp(n){if(yu=null,n=aa(n),n!==null){var r=u(n);if(r===null)n=null;else{var s=r.tag;if(s===13){if(n=f(r),n!==null)return n;n=null}else if(s===31){if(n=p(r),n!==null)return n;n=null}else if(s===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return yu=n,null}function Hv(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close"
vendor: 5,565 bytes, line 10
10:case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ai()){case J_:return 2;case W_:return 8;case oc:case VA:return 32;case Z_:return 268435456;default:return 32}default:return 32}}var dp=!1,Wr=null,Zr=null,ei=null,mo=new Map,_o=new Map,ti=[],tO="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Fv(n,r){switch(n){case"focusin":case"focusout":Wr=null;break;case"dragenter":case"dragleave":Zr=null;break;case"mouseover":case"mouseout":ei=null;break;case"pointerover":case"pointerout":mo.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":_o.delete(r.pointerId)}}function ho(n,r,s,o,l,d){return n===null||n.nativeEvent!==d?(n={blockedOn:r,domEventName:s,eventSystemFlags:o,nativeEvent:d,targetContainers:[l]},r!==null&&(r=sa(r),r!==null&&Vv(r)),n):(n.eventSystemFlags|=o,r=n.targetContainers,l!==null&&r.indexOf(l)===-1&&r.push(l),n)}function nO(n,r,s,o,l){switch(r){case"focusin":return Wr=ho(Wr,n,r,s,o,l),!0;case"dragenter":return Zr=ho(Zr,n,r,s,o,l),!0;case"mouseover":return ei=ho(ei,n,r,s,o,l),!0;case"pointerover":var d=l.pointerId;return mo.set(d,ho(mo.get(d)||null,n,r,s,o,l)),!0;case"gotpointercapture":return d=l.pointerId,_o.set(d,ho(_o.get(d)||null,n,r,s,o,l)),!0}return!1}function Gv(n){var r=aa(n.target);if(r!==null){var s=u(r);if(s!==null){if(r=s.tag,r===13){if(r=f(s),r!==null){n.blockedOn=r,ah(n.priority,function(){qv(s)});return}}else if(r===31){if(r=p(s),r!==null){n.blockedOn=r,ah(n.priority,function(){qv(s)});return}}else if(r===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function vu(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var s=up(n.nativeEvent);if(s===null){s=n.nativeEvent;var o=new s.constructor(s.type,s);ud=o,s.target.dispatchEvent(o),ud=null}else return r=sa(s),r!==null&&Vv(r),n.blockedOn=s,!1;r.shift()}return!0}function Yv(n,r,s){vu(n)&&s.delete(r)}function rO(){dp=!1,Wr!==null&&vu(Wr)&&(Wr=null),Zr!==null&&vu(Zr)&&(Zr=null),ei!==null&&vu(ei)&&(ei=null),mo.forEach(Yv),_o.forEach(Yv)}function Eu(n,r){n.blockedOn===r&&(n.blockedOn=null,dp||(dp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,rO)))}var Su=null;function $v(n){Su!==n&&(Su=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Su===n&&(Su=null);for(var r=0;r<n.length;r+=3){var s=n[r],o=n[r+1],l=n[r+2];if(typeof o!="function"){if(lp(o||s)===null)continue;break}var d=sa(s);d!==null&&(n.splice(r,3),r-=3,uf(d,{pending:!0,data:l,method:s.method,action:o},o,l))}}))}function Va(n){function r(A){return Eu(A,n)}Wr!==null&&Eu(Wr,n),Zr!==null&&Eu(Zr,n),ei!==null&&Eu(ei,n),mo.forEach(r),_o.forEach(r);for(var s=0;s<ti.length;s++){var o=ti[s];o.blockedOn===n&&(o.blockedOn=null)}for(;0<ti.length&&(s=ti[0],s.blockedOn===null);)Gv(s),s.blockedOn===null&&ti.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(o=0;o<s.length;o+=3){var l=s[o],d=s[o+1],_=l[Ht]||null;if(typeof d=="function")_||$v(s);else if(_){var E=null;if(d&&d.hasAttribute("formAction")){if(l=d,_=d[Ht]||null)E=_.formAction;else if(lp(l)!==null)continue}else E=_.action;typeof E=="function"?s[o+1]=E:(s.splice(o,3),o-=3),$v(s)}}}function Xv(){function n(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(_){return l=_})},focusReset:"manual",scroll:"manual"})}function r(){l!==null&&(l(),l=null),o||setTimeout(s,20)}function s(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,l=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(s,100),function(){o=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),l!==null&&(l(),l=null)}}}function fp(n){this._internalRoot=n}bu.prototype.render=fp.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var s=r.current,o=ln();zv(s,o,n,r,null,null)},bu.prototype.unmount=fp.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;
10zv(n.current,2,null,n,null,null),nu(),r[ia]=null}};function bu(n){this._internalRoot=n}bu.prototype.unstable_scheduleHydration=function(n){if(n){var r=ih();n={blockedOn:null,target:n,priority:r};for(var s=0;s<ti.length&&r!==0&&r<ti[s].priority;s++);ti.splice(s,0,n),s===0&&Gv(n)}};var Qv=t.version;if(Qv!=="19.2.4")throw Error(a(527,Qv,"19.2.4"));q.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=h(r),n=n!==null?v(n):null,n=n===null?null:n.stateNode,n};var iO={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tu.isDisabled&&Tu.supportsFiber)try{As=Tu.inject(iO),tn=Tu}catch{}}return go.createRoot=function(n,r){if(!c(n))throw Error(a(299));var s=!1,o="",l=ny,d=ry,_=iy;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(l=r.onUncaughtError),r.onCaughtError!==void 0&&(d=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError)),r=Uv(n,1,!1,null,null,s,o,null,l,d,_,Xv),n[ia]=r.current,$f(n),new fp(r)},go.hydrateRoot=function(n,r,s){if(!c(n))throw Error(a(299));var o=!1,l="",d=ny,_=ry,E=iy,A=null;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(l=s.identifierPrefix),s.onUncaughtError!==void 0&&(d=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(E=s.onRecoverableError),s.formState!==void 0&&(A=s.formState)),r=Uv(n,1,!0,r,s??null,o,l,A,d,_,E,Xv),r.context=jv(null),s=r.current,o=ln(),o=td(o),l=Br(o),l.callback=null,Vr(s,l,o),s=o,r.current.lanes=s,Os(r,s),Vn(r),n[ia]=r.current,$f(n),new bu(r)},go.version="19.2.4",go}var Zv;function TO(){if(Zv)return pp.exports;Zv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),pp.exports=bO(),pp.exports}var AO=TO();function Vt(e){return new Promise((t,i)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>i(e.error)})}function r0(e,t){let i;const a=()=>{if(i)return i;const c=indexedDB.open(e);return c.onupgradeneeded=()=>c.result.createObjectStore(t),i=Vt(c),i.then(u=>{u.onclose=()=>i=void 0},()=>{}),i};return(c,u)=>a().then(f=>u(f.transaction(t,c).objectStore(t)))}let hp;function Un(){return hp||(hp=r0("keyval-store","keyval")),hp}function zm(e,t=Un()){return t("readonly",i=>Vt(i.get(e)))}function Bm(e,t,i=Un()){return i("readwrite",a=>(a.put(t,e),Vt(a.transaction)))}function RO(e,t=Un()){return t("readwrite",i=>(e.forEach(a=>i.put(a[1],a[0])),Vt(i.transaction)))}function OO(e,t=Un()){return t("readonly",i=>Promise.all(e.map(a=>Vt(i.get(a)))))}function DO(e,t,i=Un()){return i("readwrite",a=>new Promise((c,u)=>{a.get(e).onsuccess=function(){try{a.put(t(this.result),e),c(Vt(a.transaction))}catch(f){u(f)}}}))}function Ml(e,t=Un()){return t("readwrite",i=>(i.delete(e),Vt(i.transaction)))}function wO(e,t=Un()){return t("readwrite",i=>(e.forEach(a=>i.delete(a)),Vt(i.transaction)))}function xO(e=Un()){return e("readwrite",t=>(t.clear(),Vt(t.transaction)))}function Vm(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},Vt(e.transaction)}function IO(e=Un()){return e("readonly",t=>{if(t.getAllKeys)return Vt(t.getAllKeys());const i=[];return Vm(t,a=>i.push(a.key)).then(()=>i)})}function CO(e=Un()){return e("readonly",t=>{if(t.getAll)return Vt(t.getAll());const i=[];return Vm(t,a=>i.push(a.value)).then(()=>i)})}function LO(e=Un()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([Vt(t.getAllKeys()),Vt(t.getAll())]).then(([a,c])=>a.map((u,f)=>[u,c[f]]));const i=[];return e("readonly",a=>Vm(a,c=>i.push([c.key,c.value])).then(()=>i))})}const i0=Object.freeze(Object.defineProperty({__proto__:null,clear:xO,createStore:r0,del:Ml,delMany:wO,entries:LO,get:zm,getMany:OO,keys:IO,promisifyRequest:Vt,set:Bm,setMany:RO,update:DO,values:CO},Symbol.toStringTag,{value:"Module"})),So="rq-cache-v1",MO=3e3,eE=5e3;function gp(e,t,i){return new Promise(a=>{let c=!1;const u=p=>{c||(c=!0,clearTimeout(f),a(p))},f=setTimeout(()=>u(i),t);e.then(p=>u(p)).catch(()=>u(i))})}function NO(){return{persistClient:async e=>{await gp(Bm(So,e),eE,void 0)},restoreClient:async()=>await gp(zm(So),MO,void 0),removeClient:async()=>{await gp(Ml(So),eE,void 0)}}}function kO(e){if(e==null)return!0;
10if(Array.isArray(e))return e.length===0;if(typeof e=="object"){const t=e;if("pages"in t){const a=t.pages;return Array.isArray(a)&&a.every(c=>Array.isArray(c)?c.length===0:c==null)}const i=Object.values(t);if(i.length>0&&i.every(a=>Array.isArray(a)))return i.every(a=>a.length===0)}return!1}const PO="modulepreload",UO=function(e){return"/"+e},tE={},y=function(t,i,a){let c=Promise.resolve();if(i&&i.length>0){let m=function(h){return Promise.all(h.map(v=>Promise.resolve(v).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),p=f?.nonce||f?.getAttribute("nonce");c=m(i.map(h=>{if(h=UO(h),h in tE)return;tE[h]=!0;const v=h.endsWith(".css"),g=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const b=document.createElement("link");if(b.rel=v?"stylesheet":PO,v||(b.as="script"),b.crossOrigin="",b.href=h,p&&b.setAttribute("nonce",p),document.head.appendChild(b),v)return new Promise((T,R)=>{b.addEventListener("load",T),b.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${h}`)))})}))}function u(f){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=f,window.dispatchEvent(p),!p.defaultPrevented)throw f}return c.then(f=>{for(const p of f||[])p.status==="rejected"&&u(p.reason);return t().catch(u)})},nE="https://api.certbox.app/telemetry",jO=3e4,zO=50;let bo=[],rE=!1;function a0(e){return e.replace(/((?:https?:\/\/|\/)[^\s?#]*)[?#][^\s]*/g,"$1?…").replace(/\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]+/g,"eyJ…").replace(/\b[\w.%+-]+@[\w.-]+\.[A-Za-z]{2,}\b/g,"…@…")}function xr(e,t,i){bo.length>=zO||bo.push({t:e,m:a0(t).slice(0,200),u:location.pathname,ts:Math.floor(Date.now()/1e3),b:"muflez73",...i!=null?{v:i}:{}})}function iE(){if(bo.length===0)return;const e=JSON.stringify(bo);bo=[],navigator.sendBeacon?navigator.sendBeacon(nE,e):fetch(nE,{method:"POST",body:e,keepalive:!0}).catch(()=>{})}function rl(e){xr("js_error",e)}function BO(e,t){xr("react_error",`${e.message}${t?.componentStack?` @ ${t.componentStack.split(`
11`)[1]?.trim()}`:""}`)}function VO(e){xr("not_found",e)}function qO(e,t){const i=t instanceof Error?t.message:String(t);xr("api_error",`${e} ${i}`)}function s0(e){const t=e instanceof Error?e.message:String(e);xr("sw_error",t)}function o0(e){xr("resource_error",e)}function Vu(e,t){xr("web_vital",e,t)}function c0(e){xr("long_task","",e)}function u0(){if(!rE){if(rE=!0,window.addEventListener("error",e=>{e.filename&&rl(`${e.message} at ${e.filename}:${e.lineno}`)}),window.addEventListener("unhandledrejection",e=>{const t=e.reason instanceof Error?e.reason.message:String(e.reason);xr("unhandled_rejection",t)}),window.addEventListener("error",e=>{const t=e.target;t instanceof HTMLElement&&"src"in t&&o0(t.src||"")},!0),typeof PerformanceObserver<"u")try{new PerformanceObserver(t=>{for(const i of t.getEntries())i.duration>200&&c0(Math.round(i.duration))}).observe({type:"longtask",buffered:!0})}catch{}y(async()=>{const{onLCP:e,onINP:t,onCLS:i}=await import("./web-vitals-BgfeM99E.js");return{onLCP:e,onINP:t,onCLS:i}},[]).then(({onLCP:e,onINP:t,onCLS:i})=>{e(a=>Vu("LCP",Math.round(a.value))),t(a=>Vu("INP",Math.round(a.value))),i(a=>Vu("CLS",Math.round(a.value*1e3)))}).catch(()=>{}),setInterval(iE,jO),document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&iE()})}}const l0=Object.freeze(Object.defineProperty({__proto__:null,initTelemetry:u0,redact:a0,trackApiError:qO,trackError:rl,trackLongTask:c0,trackNotFound:VO,trackReactError:BO,trackResourceError:o0,trackSwError:s0,trackWebVital:Vu},Symbol.toStringTag,{value:"Module"})),ee=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ne=globalThis,$i="10.45.0";function Ir(){return qo(Ne),Ne}function qo(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||$i,t[$i]=t[$i]||{}}function ms(e,t,i=Ne){const a=i.__SENTRY__=i.__SENTRY__||{},c=a[$i]=a[$i]||{};return c[e]||(c[e]=t())}const HO=["debug","info","warn","error","log","assert","trace"],FO="Sentry Logger ",il={};function _i(e){if(!("console"in Ne))return e();const t=Ne.console,i={},a=Object.keys(il);a.forEach(c=>{const u=il[c];i[c]=t[c],t[c]=u});try{return e()}finally{a.forEach(c=>{t[c]=i[c]})}}function GO(){Hm().enabled=!0}function YO(){Hm().enabled=!1}function d0(){return Hm().enabled}function $O(...e){qm("log",...e)}function XO(...e){qm("warn",...e)}function QO(...e){qm("error",...e)}function qm(e,...t){ee&&d0()&&_i(()=>{Ne.console[e](`${FO}[${e}]:`,...t)})}function Hm(){return ee?ms("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const G={enable:GO,disable:YO,isEnabled:d0,log:$O,warn:XO,error:QO},f0=50,Gn="?",aE=/\(error: (.*)\)/,sE=/captureMessage|captureException/;function p0(...e){const t=e.sort((i,a)=>i[0]-a[0]).map(i=>i[1]);
11return(i,a=0,c=0)=>{const u=[],f=i.split(`
12`);for(let p=a;p<f.length;p++){let m=f[p];m.length>1024&&(m=m.slice(0,1024));const h=aE.test(m)?m.replace(aE,"$1"):m;if(!h.match(/\S*Error: /)){for(const v of t){const g=v(h);if(g){u.push(g);break}}if(u.length>=f0+c)break}}return JO(u.slice(c))}}function KO(e){return Array.isArray(e)?p0(...e):e}function JO(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Au(t).function||"")&&t.pop(),t.reverse(),sE.test(Au(t).function||"")&&(t.pop(),sE.test(Au(t).function||"")&&t.pop()),t.slice(0,f0).map(i=>({...i,filename:i.filename||Au(t).filename,function:i.function||Gn}))}function Au(e){return e[e.length-1]||{}}const yp="<anonymous>";function Tr(e){try{return!e||typeof e!="function"?yp:e.name||yp}catch{return yp}}function oE(e){const t=e.exception;if(t){const i=[];try{return t.values.forEach(a=>{a.stacktrace.frames&&i.push(...a.stacktrace.frames)}),i}catch{return}}}function m0(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function WO(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}const qu={},cE={};function hi(e,t){qu[e]=qu[e]||[],qu[e].push(t)}function gi(e,t){if(!cE[e]){cE[e]=!0;try{t()}catch(i){ee&&G.error(`Error while instrumenting ${e}`,i)}}}function On(e,t){const i=e&&qu[e];if(i)for(const a of i)try{a(t)}catch(c){ee&&G.error(`Error while triggering instrumentation handler.
13Type: ${e}
14Name: ${Tr(a)}
15Error:`,c)}}let vp=null;function _0(e){const t="error";hi(t,e),gi(t,ZO)}function ZO(){vp=Ne.onerror,Ne.onerror=function(e,t,i,a,c){return On("error",{column:a,error:c,line:i,msg:e,url:t}),vp?vp.apply(this,arguments):!1},Ne.onerror.__SENTRY_INSTRUMENTED__=!0}let Ep=null;function h0(e){const t="unhandledrejection";hi(t,e),gi(t,eD)}function eD(){Ep=Ne.onunhandledrejection,Ne.onunhandledrejection=function(e){return On("unhandledrejection",e),Ep?Ep.apply(this,arguments):!0},Ne.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const g0=Object.prototype.toString;function Nl(e){switch(g0.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ar(e,Error)}}function _s(e,t){return g0.call(e)===`[object ${t}]`}function y0(e){return _s(e,"ErrorEvent")}function uE(e){return _s(e,"DOMError")}function tD(e){return _s(e,"DOMException")}function gr(e){return _s(e,"String")}function kl(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ts(e){return e===null||kl(e)||typeof e!="object"&&typeof e!="function"}function Io(e){return _s(e,"Object")}function Pl(e){return typeof Event<"u"&&Ar(e,Event)}function nD(e){return typeof Element<"u"&&Ar(e,Element)}function rD(e){return _s(e,"RegExp")}function hs(e){return!!(e?.then&&typeof e.then=="function")}function iD(e){return Io(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Ar(e,t){try{return e instanceof t}catch{return!1}}function v0(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function Fm(e){return typeof Request<"u"&&Ar(e,Request)}const Gm=Ne,aD=80;function Wt(e,t={}){if(!e)return"<unknown>";try{let i=e;const a=5,c=[];let u=0,f=0;const p=" > ",m=p.length;let h;const v=Array.isArray(t)?t:t.keyAttrs,g=!Array.isArray(t)&&t.maxStringLength||aD;for(;i&&u++<a&&(h=sD(i,v),!(h==="html"||u>1&&f+c.length*m+h.length>=g));)c.push(h),f+=h.length,i=i.parentNode;return c.reverse().join(p)}catch{return"<unknown>"}}function sD(e,t){const i=e,a=[];if(!i?.tagName)return"";if(Gm.HTMLElement&&i instanceof HTMLElement&&i.dataset){if(i.dataset.sentryComponent)return i.dataset.sentryComponent;if(i.dataset.sentryElement)return i.dataset.sentryElement}a.push(i.tagName.toLowerCase());const c=t?.length?t.filter(u=>i.getAttribute(u)).map(u=>[u,i.getAttribute(u)]):null;if(c?.length)c.forEach(u=>{a.push(`[${u[0]}="${u[1]}"]`)});else{i.id&&a.push(`#${i.id}`);const u=i.className;if(u&&gr(u)){const f=u.split(/\s+/);for(const p of f)a.push(`.${p}`)}}for(const u of["aria-label","type","name","title","alt"]){const f=i.getAttribute(u);f&&a.push(`[${u}="${f}"]`)}return a.join("")}function gs(){try{return Gm.document.location.href}catch{return""}}function E0(e){if(!Gm.HTMLElement)return null;let t=e;const i=5;for(let a=0;a<i;a++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Jt(e,t,i){if(!(t in e))return;const a=e[t];if(typeof a!="function")return;const c=i(a);typeof c=="function"&&S0(c,a);try{e[t]=c}catch{ee&&G.log(`Failed to replace method "${t}" in object`,e)}}function Zt(e,t,i){try{Object.defineProperty(e,t,{value:i,writable:!0,configurable:!0})}catch{ee&&G.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function S0(e,t){try{const i=t.prototype||{};e.prototype=t.prototype=i,Zt(e,"__sentry_original__",t)}catch{}}function Ym(e){return e.__sentry_original__}function b0(e){if(Nl(e))return{message:e.message,name:e.name,stack:e.stack,...dE(e)};if(Pl(e)){const t={type:e.type,target:lE(e.target),currentTarget:lE(e.currentTarget),...dE(e)};return typeof CustomEvent<"u"&&Ar(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function lE(e){try{return nD(e)?Wt(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}
15function dE(e){return typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e)):{}}function oD(e){const t=Object.keys(b0(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let qa;function Ho(e){if(qa!==void 0)return qa?qa(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),i=Ne;return t in i&&typeof i[t]=="function"?(qa=i[t],qa(e)):(qa=null,e())}function yr(){return Ho(()=>Math.random())}function Fo(){return Ho(()=>Date.now())}function Yp(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Sp(e,t){let i=e;const a=i.length;if(a<=150)return i;t>a&&(t=a);let c=Math.max(t-60,0);c<5&&(c=0);let u=Math.min(c+140,a);return u>a-5&&(u=a),u===a&&(c=Math.max(u-140,0)),i=i.slice(c,u),c>0&&(i=`'{snip} ${i}`),u<a&&(i+=" {snip}"),i}function fE(e,t){if(!Array.isArray(e))return"";const i=[];for(let a=0;a<e.length;a++){const c=e[a];try{v0(c)?i.push(m0(c)):i.push(String(c))}catch{i.push("[value cannot be serialized]")}}return i.join(t)}function Hu(e,t,i=!1){return gr(e)?rD(t)?t.test(e):gr(t)?i?e===t:e.includes(t):!1:!1}function vr(e,t=[],i=!1){return t.some(a=>Hu(e,a,i))}function cD(){const e=Ne;return e.crypto||e.msCrypto}let bp;function uD(){return yr()*16}function fn(e=cD()){try{if(e?.randomUUID)return Ho(()=>e.randomUUID()).replace(/-/g,"")}catch{}return bp||(bp="10000000100040008000"+1e11),bp.replace(/[018]/g,t=>(t^(uD()&15)>>t/4).toString(16))}function T0(e){return e.exception?.values?.[0]}function Fi(e){const{message:t,event_id:i}=e;if(t)return t;const a=T0(e);return a?a.type&&a.value?`${a.type}: ${a.value}`:a.type||a.value||i||"<unknown>":i||"<unknown>"}function $p(e,t,i){const a=e.exception=e.exception||{},c=a.values=a.values||[],u=c[0]=c[0]||{};u.value||(u.value=t||""),u.type||(u.type="Error")}function ns(e,t){const i=T0(e);if(!i)return;const a={type:"generic",handled:!0},c=i.mechanism;if(i.mechanism={...a,...c,...t},t&&"data"in t){const u={...c?.data,...t.data};i.mechanism.data=u}}function hB(e,t,i=5){if(t.lineno===void 0)return;const a=e.length,c=Math.max(Math.min(a-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,c-i),c).map(f=>Sp(f,0));const u=Math.min(a-1,c);t.context_line=Sp(e[u],t.colno||0),t.post_context=e.slice(Math.min(c+1,a),c+1+i).map(f=>Sp(f,0))}function pE(e){if(lD(e))return!0;try{Zt(e,"__sentry_captured__",!0)}catch{}return!1}function lD(e){try{return e.__sentry_captured__}catch{}}const A0=1e3;function ta(){return Fo()/A0}function dD(){const{performance:e}=Ne;if(!e?.now||!e.timeOrigin)return ta;const t=e.timeOrigin;return()=>(t+Ho(()=>e.now()))/A0}let mE;function bt(){return(mE??(mE=dD()))()}let Tp=null;function fD(){const{performance:e}=Ne;if(!e?.now)return;const t=3e5,i=Ho(()=>e.now()),a=Fo(),c=e.timeOrigin;if(typeof c=="number"&&Math.abs(c+i-a)<t)return c;const u=e.timing?.navigationStart;return typeof u=="number"&&Math.abs(u+i-a)<t?u:a-i}function en(){return Tp===null&&(Tp=fD()),Tp}function pD(e){const t=bt(),i={sid:fn(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>_D(i)};return e&&rs(i,e),i}function rs(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:fn()),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 i=e.timestamp-e.started;e.duration=i>=0?i: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 mD(e,t){let i={};e.status==="ok"&&(i={status:"exited"}),rs(e,i)}function _D(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 Go(e,t,i=2){if(!t||typeof t!="object"||i<=0)return t;if(e&&Object.keys(t).length===0)return e;const a={...e};for(const c in t)Object.prototype.hasOwnProperty.call(t,c)&&(a[c]=Go(a[c],t[c],i-1));return a}function Yn(){return fn()}function Er(){return fn().substring(16)}const Xp="_sentrySpan";function di(e,t){t?Zt(e,Xp,t):delete e[Xp]}function is(e){return e[Xp]}const hD=100;class $n{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Yn(),sampleRand:yr()}}clone(){const t=new $n;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,di(t,is(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&&rs(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,i){return this.setTags({[t]:i})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,i){return this.setAttributes({[t]:i})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,i){return this._extra={...this._extra,[t]:i},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,i){return i===null?delete this._contexts[t]:this._contexts[t]=i,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 i=typeof t=="function"?t(this):t,a=i instanceof $n?i.getScopeData():Io(i)?t:void 0,{tags:c,attributes:u,extra:f,user:p,contexts:m,level:h,fingerprint:v=[],propagationContext:g,conversationId:b}=a||{};return this._tags={...this._tags,...c},this._attributes={...this._attributes,...u},this._extra={...this._extra,...f},this._contexts={...this._contexts,...m},p&&Object.keys(p).length&&(this._user=p),h&&(this._level=h),v.length&&(this._fingerprint=v),g&&(this._propagationContext=g),b&&(this._conversationId=b),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,di(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Yn(),sampleRand:yr()}),this._notifyScopeListeners(),this}addBreadcrumb(t,i){const a=typeof i=="number"?i:hD;if(a<=0)return this;const c={timestamp:ta(),...t,message:t.message?Yp(t.message,2048):t.message};return this._breadcrumbs.push(c),this._breadcrumbs.length>a&&(this._breadcrumbs=this._breadcrumbs.slice(-a),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:is(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Go(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,i){const a=i?.event_id||fn();if(!this._client)return ee&&G.warn("No client configured on scope - will not capture exception!"),a;const c=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:c,...i,event_id:a},this),a}captureMessage(t,i,a){const c=a?.event_id||fn();if(!this._client)return ee&&G.warn("No client configured on scope - will not capture message!"),c;const u=a?.syntheticException??new Error(t);return this._client.captureMessage(t,i,{originalException:t,syntheticException:u,...a,event_id:c},this),c}captureEvent(t,i){const a=t.event_id||i?.event_id||fn();return this._client?(this._client.captureEvent(t,{...i,event_id:a},this),a):(ee&&G.warn("No client configured on scope - will not capture event!"),a)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
15h(t=>{t(this)}),this._notifyingListeners=!1)}}function gD(){return ms("defaultCurrentScope",()=>new $n)}function yD(){return ms("defaultIsolationScope",()=>new $n)}class vD{constructor(t,i){let a;t?a=t:a=new $n;let c;i?c=i:c=new $n,this._stack=[{scope:a}],this._isolationScope=c}withScope(t){const i=this._pushScope();let a;try{a=t(i)}catch(c){throw this._popScope(),c}return hs(a)?a.then(c=>(this._popScope(),c),c=>{throw this._popScope(),c}):(this._popScope(),a)}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 as(){const e=Ir(),t=qo(e);return t.stack=t.stack||new vD(gD(),yD())}function ED(e){return as().withScope(e)}function SD(e,t){const i=as();return i.withScope(()=>(i.getStackTop().scope=e,t(e)))}function _E(e){return as().withScope(()=>e(as().getIsolationScope()))}function bD(){return{withIsolationScope:_E,withScope:ED,withSetScope:SD,withSetIsolationScope:(e,t)=>_E(t),getCurrentScope:()=>as().getScope(),getIsolationScope:()=>as().getIsolationScope()}}function yi(e){const t=qo(e);return t.acs?t.acs:bD()}function qe(){const e=Ir();return yi(e).getCurrentScope()}function _t(){const e=Ir();return yi(e).getIsolationScope()}function TD(){return ms("globalScope",()=>new $n)}function Cr(...e){const t=Ir(),i=yi(t);if(e.length===2){const[a,c]=e;return a?i.withSetScope(a,c):i.withScope(c)}return i.withScope(e[0])}function gB(...e){const t=Ir(),i=yi(t);if(e.length===2){const[a,c]=e;return a?i.withSetIsolationScope(a,c):i.withIsolationScope(c)}return i.withIsolationScope(e[0])}function Te(){return qe().getClient()}function R0(e){const t=e.getPropagationContext(),{traceId:i,parentSpanId:a,propagationSpanId:c}=t,u={trace_id:i,span_id:c||Er()};return a&&(u.parent_span_id=a),u}const Rn="sentry.source",$m="sentry.sample_rate",O0="sentry.previous_trace_sample_rate",Rr="sentry.op",Dt="sentry.origin",Co="sentry.idle_span_finish_reason",Yo="sentry.measurement_unit",$o="sentry.measurement_value",Qp="sentry.custom_span_name",Xm="sentry.profile_id",ys="sentry.exclusive_time",yB="http.request.method",vB="url.full",AD="sentry.link.type",RD="gen_ai.conversation.id",OD=0,Qm=1,Et=2;function DD(e){if(e<400&&e>=100)return{code:Qm};if(e>=400&&e<500)switch(e){case 401:return{code:Et,message:"unauthenticated"};case 403:return{code:Et,message:"permission_denied"};case 404:return{code:Et,message:"not_found"};case 409:return{code:Et,message:"already_exists"};case 413:return{code:Et,message:"failed_precondition"};case 429:return{code:Et,message:"resource_exhausted"};case 499:return{code:Et,message:"cancelled"};default:return{code:Et,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Et,message:"unimplemented"};case 503:return{code:Et,message:"unavailable"};case 504:return{code:Et,message:"deadline_exceeded"};default:return{code:Et,message:"internal_error"}}return{code:Et,message:"internal_error"}}function D0(e,t){e.setAttribute("http.response.status_code",t);const i=DD(t);i.message!=="unknown_error"&&e.setStatus(i)}const w0="_sentryScope",x0="_sentryIsolationScope";function wD(e){try{const t=Ne.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function xD(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function ID(e,t,i){e&&(Zt(e,x0,wD(i)),Zt(e,w0,t))}function al(e){const t=e;return{scope:t[w0],isolationScope:xD(t[x0])}}const sl="sentry-",CD=8192;function Km(e){const t=LD(e);if(!t)return;const i=Object.entries(t).reduce((a,[c,u])=>{if(c.startsWith(sl)){const f=c.slice(sl.length);a[f]=u}return a},{});if(Object.keys(i).length>0)return i}function I0(e){if(!e)return;const t=Object.entries(e).reduce((i,[a,c])=>(c&&(i[`${sl}${a}`]=c),i),{});return MD(t)}function LD(e){if(!(!e||!gr(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,i)=>{const a=hE(i);
15return Object.entries(a).forEach(([c,u])=>{t[c]=u}),t},{}):hE(e)}function hE(e){return e.split(",").map(t=>{const i=t.indexOf("=");if(i===-1)return[];const a=t.slice(0,i),c=t.slice(i+1);return[a,c].map(u=>{try{return decodeURIComponent(u.trim())}catch{return}})}).reduce((t,[i,a])=>(i&&a&&(t[i]=a),t),{})}function MD(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[i,a],c)=>{const u=`${encodeURIComponent(i)}=${encodeURIComponent(a)}`,f=c===0?u:`${t},${u}`;return f.length>CD?(ee&&G.warn(`Not adding key: ${i} with val: ${a} to baggage header due to exceeding baggage size limits.`),t):f},"")}const ND=/^o(\d+)\./,kD=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function PD(e){return e==="http"||e==="https"}function na(e,t=!1){const{host:i,path:a,pass:c,port:u,projectId:f,protocol:p,publicKey:m}=e;return`${p}://${m}${t&&c?`:${c}`:""}@${i}${u?`:${u}`:""}/${a&&`${a}/`}${f}`}function UD(e){const t=kD.exec(e);if(!t){_i(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[i,a,c="",u="",f="",p=""]=t.slice(1);let m="",h=p;const v=h.split("/");if(v.length>1&&(m=v.slice(0,-1).join("/"),h=v.pop()),h){const g=h.match(/^\d+/);g&&(h=g[0])}return C0({host:u,pass:c,path:m,projectId:h,port:f,protocol:i,publicKey:a})}function C0(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function jD(e){if(!ee)return!0;const{port:t,projectId:i,protocol:a}=e;return["protocol","publicKey","host","projectId"].find(f=>e[f]?!1:(G.error(`Invalid Sentry Dsn: ${f} missing`),!0))?!1:i.match(/^\d+$/)?PD(a)?t&&isNaN(parseInt(t,10))?(G.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(G.error(`Invalid Sentry Dsn: Invalid protocol ${a}`),!1):(G.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),!1)}function zD(e){return e.match(ND)?.[1]}function L0(e){const t=e.getOptions(),{host:i}=e.getDsn()||{};let a;return t.orgId?a=String(t.orgId):i&&(a=zD(i)),a}function M0(e){const t=typeof e=="string"?UD(e):C0(e);if(!(!t||!jD(t)))return t}function Wi(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 N0=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function BD(e){if(!e)return;const t=e.match(N0);if(!t)return;let i;return t[3]==="1"?i=!0:t[3]==="0"&&(i=!1),{traceId:t[1],parentSampled:i,parentSpanId:t[2]}}function k0(e,t){const i=BD(e),a=Km(t);if(!i?.traceId)return{traceId:Yn(),sampleRand:yr()};const c=VD(i,a);a&&(a.sample_rand=c.toString());const{traceId:u,parentSpanId:f,parentSampled:p}=i;return{traceId:u,parentSpanId:f,sampled:p,dsc:a||{},sampleRand:c}}function P0(e=Yn(),t=Er(),i){let a="";return i!==void 0&&(a=i?"-1":"-0"),`${e}-${t}${a}`}function U0(e=Yn(),t=Er(),i){return`00-${e}-${t}-${i?"01":"00"}`}function VD(e,t){const i=Wi(t?.sample_rand);if(i!==void 0)return i;const a=Wi(t?.sample_rate);return a&&e?.parentSampled!==void 0?e.parentSampled?yr()*a:a+yr()*(1-a):yr()}function qD(e,t){const i=L0(e);return t&&i&&t!==i?(G.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${i})`),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!i||!t&&i)?(G.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${i})`),!1):!0}const j0=0,Jm=1;let gE=!1;function HD(e){const{spanId:t,traceId:i}=e.spanContext(),{data:a,op:c,parent_span_id:u,status:f,origin:p,links:m}=Ve(e);return{parent_span_id:u,span_id:t,trace_id:i,data:a,op:c,status:f,origin:p,links:m}}function z0(e){const{spanId:t,traceId:i,isRemote:a}=e.spanContext(),c=a?t:Ve(e).parent_span_id,u=al(e).scope,f=a?u?.getPropagationContext().propagationSpanId||Er():t;return{parent_span_id:c,span_id:f,trace_id:i}}function FD(e){const{traceId:t,spanId:i}=e.spanContext(),a=vi(e);return P0(t,i,a)}function GD(e){const{traceId:t,spanId:i}=e.spanContext(),a=vi(e);return U0(t,i,a)}function B0(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:i,traceFlags:a,...c},attributes:u})=>({span_id:t,trace_id:i,sampled:a===Jm,attributes:u,...c}))}function Xi(e){return typeof e=="number"?yE(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?yE(e.getTime()):bt()}function yE(e){return e>9999999999?e/1e3:e}function Ve(e){if($D(e))return e.getSpanJSON();const{spanId:t,traceId:i}=e.spanContext();if(YD(e)){const{attributes:a,startTime:c,name:u,endTime:f,status:p,links:m}=e,h="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:i,data:a,description:u,parent_span_id:h,start_timestamp:Xi(c),timestamp:Xi(f)||void 0,status:V0(p),op:a[Rr],origin:a[Dt],links:B0(m)}}return{span_id:t,trace_id:i,start_timestamp:0,data:{}}}function YD(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function $D(e){return typeof e.getSpanJSON=="function"}function vi(e){const{traceFlags:t}=e.spanContext();return t===Jm}function V0(e){if(!(!e||e.code===OD))return e.code===Qm?"ok":e.message||"internal_error"}const Qi="_sentryChildSpans",Kp="_sentryRootSpan";function q0(e,t){const i=e[Kp]||e;Zt(t,Kp,i),e[Qi]?e[Qi].add(t):Zt(e,Qi,new Set([t]))}function XD(e,t){e[Qi]&&e[Qi].delete(t)}function Fu(e){const t=new Set;function i(a){if(!t.has(a)&&vi(a)){t.add(a);const c=a[Qi]?Array.from(a[Qi]):[];for(const u of c)i(u)}}return i(e),Array.from(t)}function kt(e){return e[Kp]||e}function Pt(){const e=Ir(),t=yi(e);return t.getActiveSpan?t.getActiveSpan():is(qe())}function Jp(){gE||(_i(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),gE=!0)}function EB(e,t){e.updateName(t),e.setAttributes({[Rn]:"custom",[Qp]:t})}let vE=!1;function QD(){if(vE)return;function e(){const t=Pt(),i=t&&kt(t);if(i){const a="internal_error";ee&&G.log(`[Tracing] Root span: ${a} -> Global error occurred`),i.setStatus({code:Et,message:a})}}e.tag="sentry_tracingErrorCallback",vE=!0,_0(e),h0(e)}function Nn(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||Te()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function EE(e){G.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function ol(e,t){if(!t?.length||!e.description)return!1;for(const i of t){if(JD(i)){if(Hu(e.description,i))return ee&&EE(e),!0;continue}if(!i.name&&!i.op)continue;const a=i.name?Hu(e.description,i.name):!0,c=i.op?e.op&&Hu(e.op,i.op):!0;if(a&&c)return ee&&EE(e),!0}return!1}function KD(e,t){const i=t.parent_span_id,a=t.span_id;if(i)for(const c of e)c.parent_span_id===a&&(c.parent_span_id=i)}function JD(e){return typeof e=="string"||e instanceof RegExp}const Wm="production",H0="_frozenDsc";function Gu(e,t){Zt(e,H0,t)}function F0(e,t){const i=t.getOptions(),{publicKey:a}=t.getDsn()||{},c={environment:i.environment||Wm,release:i.release,public_key:a,trace_id:e,org_id:L0(t)};return t.emit("createDsc",c),c}function Zm(e,t){const i=t.getPropagationContext();return i.dsc||F0(i.traceId,e)}function Pn(e){const t=Te();if(!t)return{};const i=kt(e),a=Ve(i),c=a.data,u=i.spanContext().traceState,f=u?.get("sentry.sample_rate")??c[$m]??c[O0];function p(R){return(typeof f=="number"||typeof f=="string")&&(R.sample_rate=`${f}`),R}const m=i[H0];if(m)return p(m);const h=u?.get("sentry.dsc"),v=h&&Km(h);if(v)return p(v);const g=F0(e.spanContext().traceId,t),b=c[Rn],T=a.description;return b!=="url"&&T&&(g.transaction=T),Nn()&&(g.sampled=String(vi(i)),g.sample_rand=u?.get("sentry.sample_rand")??al(i).scope?.getPropagationContext().sampleRand.toString()),p(g),t.emit("createDsc",g,i),g}function SB(e){const t=Pn(e);return I0(t)}class Or{constructor(t={}){this._traceId=t.traceId||Yn(),this._spanId=t.spanId||Er()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:j0}}end(t){}setAttribute(t,i){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}
15addEvent(t,i,a){return this}addLink(t){return this}addLinks(t){return this}recordException(t,i){}}function Ln(e,t=100,i=1/0){try{return Wp("",e,t,i)}catch(a){return{ERROR:`**non-serializable** (${a})`}}}function G0(e,t=3,i=100*1024){const a=Ln(e,t);return tw(a)>i?G0(e,t-1,i):a}function Wp(e,t,i=1/0,a=1/0,c=nw()){const[u,f]=c;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const p=WD(e,t);if(!p.startsWith("[object "))return p;if(t.__sentry_skip_normalization__)return t;const m=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:i;if(m===0)return p.replace("object ","");if(u(t))return"[Circular ~]";const h=t;if(h&&typeof h.toJSON=="function")try{const T=h.toJSON();return Wp("",T,m-1,a,c)}catch{}const v=Array.isArray(t)?[]:{};let g=0;const b=b0(t);for(const T in b){if(!Object.prototype.hasOwnProperty.call(b,T))continue;if(g>=a){v[T]="[MaxProperties ~]";break}const R=b[T];v[T]=Wp(T,R,m-1,a,c),g++}return f(t),v}function WD(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(v0(t))return m0(t);if(iD(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Tr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const i=ZD(t);return/^HTML(\w*)Element$/.test(i)?`[HTMLElement: ${i}]`:`[object ${i}]`}catch(i){return`**non-serializable** (${i})`}}function ZD(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function ew(e){return~-encodeURI(e).split(/%..|./).length}function tw(e){return ew(JSON.stringify(e))}function nw(){const e=new WeakSet;function t(a){return e.has(a)?!0:(e.add(a),!1)}function i(a){e.delete(a)}return[t,i]}function Ei(e,t=[]){return[e,t]}function rw(e,t){const[i,a]=e;return[i,[...a,t]]}function Zp(e,t){const i=e[1];for(const a of i){const c=a[0].type;if(t(a,c))return!0}return!1}function iw(e,t){return Zp(e,(i,a)=>t.includes(a))}function cl(e){const t=qo(Ne);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function aw(e){const t=qo(Ne);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function sw(e){const[t,i]=e;let a=JSON.stringify(t);function c(u){typeof a=="string"?a=typeof u=="string"?a+u:[cl(a),u]:a.push(typeof u=="string"?cl(u):u)}for(const u of i){const[f,p]=u;if(c(`
16${JSON.stringify(f)}
17`),typeof p=="string"||p instanceof Uint8Array)c(p);else{let m;try{m=JSON.stringify(p)}catch{m=JSON.stringify(Ln(p))}c(m)}}return typeof a=="string"?a:ow(a)}function ow(e){const t=e.reduce((c,u)=>c+u.length,0),i=new Uint8Array(t);let a=0;for(const c of e)i.set(c,a),a+=c.length;return i}function bB(e){let t=typeof e=="string"?cl(e):e;function i(f){const p=t.subarray(0,f);return t=t.subarray(f+1),p}function a(){let f=t.indexOf(10);return f<0&&(f=t.length),JSON.parse(aw(i(f)))}const c=a(),u=[];for(;t.length;){const f=a(),p=typeof f.length=="number"?f.length:void 0;u.push([f,p?i(p):a()])}return[c,u]}function cw(e){return[{type:"span"},e]}function uw(e){const t=typeof e.data=="string"?cl(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Y0={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function lw(e){return e in Y0}function SE(e){return lw(e)?Y0[e]:e}function e_(e){if(!e?.sdk)return;const{name:t,version:i}=e.sdk;return{name:t,version:i}}function $0(e,t,i,a){const c=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!i&&a&&{dsn:na(a)},...c&&{trace:c}}}function dw(e,t){if(!t)return e;const i=e.sdk||{};return e.sdk={...i,name:i.name||t.name,version:i.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function fw(e,t,i,a){const c=e_(i),u={sent_at:new Date().toISOString(),...c&&{sdk:c},...!!a&&t&&{dsn:na(t)}},f="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Ei(u,[f])}function pw(e,t,i,a){const c=e_(i),u=e.type&&e.type!=="replay_event"?e.type:"event";dw(e,i?.sdk);const f=$0(e,c,a,t);return delete e.sdkProcessingMetadata,Ei(f,[[{type:u},e]])}function mw(e,t){function i(T){return!!T.trace_id&&!!T.public_key}const a=Pn(e[0]),c=t?.getDsn(),u=t?.getOptions().tunnel,f={sent_at:new Date().toISOString(),...i(a)&&{trace:a},...!!u&&c&&{dsn:na(c)}},{beforeSendSpan:p,ignoreSpans:m}=t?.getOptions()||{},h=m?.length?e.filter(T=>!ol(Ve(T),m)):e,v=e.length-h.length;v&&t?.recordDroppedEvent("before_send","span",v);const g=p?T=>{const R=Ve(T),x=p(R);return x||(Jp(),R)}:Ve,b=[];for(const T of h){const R=g(T);R&&b.push(cw(R))}return Ei(f,b)}function _w(e){if(!ee)return;const{description:t="< unknown name >",op:i="< unknown op >",parent_span_id:a}=Ve(e),{spanId:c}=e.spanContext(),u=vi(e),f=kt(e),p=f===e,m=`[Tracing] Starting ${u?"sampled":"unsampled"} ${p?"root ":""}span`,h=[`op: ${i}`,`name: ${t}`,`ID: ${c}`];if(a&&h.push(`parent ID: ${a}`),!p){const{op:v,description:g}=Ve(f);h.push(`root ID: ${f.spanContext().spanId}`),v&&h.push(`root op: ${v}`),g&&h.push(`root description: ${g}`)}G.log(`${m}
18  ${h.join(`
19  `)}`)}function hw(e){if(!ee)return;const{description:t="< unknown name >",op:i="< unknown op >"}=Ve(e),{spanId:a}=e.spanContext(),u=kt(e)===e,f=`[Tracing] Finishing "${i}" ${u?"root ":""}span "${t}" with ID ${a}`;G.log(f)}function gw(e,t,i,a=Pt()){const c=a&&kt(a);c&&(ee&&G.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${i}`),c.addEvent(e,{[$o]:t,[Yo]:i}))}function bE(e){if(!e||e.length===0)return;const t={};return e.forEach(i=>
19{const a=i.attributes||{},c=a[Yo],u=a[$o];typeof c=="string"&&typeof u=="number"&&(t[i.name]={value:u,unit:c})}),t}const TE=1e3;class Ul{constructor(t={}){this._traceId=t.traceId||Yn(),this._spanId=t.spanId||Er(),this._startTime=t.startTimestamp||bt(),this._links=t.links,this._attributes={},this.setAttributes({[Dt]:"manual",[Rr]: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,i){}spanContext(){const{_spanId:t,_traceId:i,_sampled:a}=this;return{spanId:t,traceId:i,traceFlags:a?Jm:j0}}setAttribute(t,i){return i===void 0?delete this._attributes[t]:this._attributes[t]=i,this}setAttributes(t){return Object.keys(t).forEach(i=>this.setAttribute(i,t[i])),this}updateStartTime(t){this._startTime=Xi(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Rn,"custom"),this}end(t){this._endTime||(this._endTime=Xi(t),hw(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Rr],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:V0(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Dt],profile_id:this._attributes[Xm],exclusive_time:this._attributes[ys],measurements:bE(this._events),is_segment:this._isStandaloneSpan&&kt(this)===this||void 0,segment_id:this._isStandaloneSpan?kt(this).spanContext().spanId:void 0,links:B0(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,i,a){ee&&G.log("[Tracing] Adding an event to span:",t);const c=AE(i)?i:a||bt(),u=AE(i)?{}:i||{},f={name:t,time:Xi(c),attributes:u};return this._events.push(f),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Te();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===kt(this)))return;if(this._isStandaloneSpan){this._sampled?vw(mw([this],t)):(ee&&G.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const a=this._convertSpanToTransaction();a&&(al(this).scope||qe()).captureEvent(a)}_convertSpanToTransaction(){if(!RE(Ve(this)))return;this._name||(ee&&G.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:i}=al(this),a=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const u=Fu(this).filter(v=>v!==this&&!yw(v)).map(v=>Ve(v)).filter(RE),f=this._attributes[Rn];delete this._attributes[Qp],u.forEach(v=>{delete v.data[Qp]});const p={contexts:{trace:HD(this)},spans:u.length>TE?u.sort((v,g)=>v.start_timestamp-g.start_timestamp).slice(0,TE):u,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:i,dynamicSamplingContext:Pn(this)},request:a,...f&&{transaction_info:{source:f}}},m=bE(this._events);return m&&Object.keys(m).length&&(ee&&G.log("[Measurements] Adding measurements to transaction event",JSON.stringify(m,void 0,2)),p.measurements=m),p}}function AE(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function RE(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function yw(e){return e instanceof Ul&&e.isStandaloneSpan()}function vw(e){const t=Te();if(!t)return;const i=e[1];if(!i||i.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function X0(e,t,i=()=>{},a=()=>{}){let c;try{c=e()}catch(u){throw t(u),i(),u}return Ew(c,t,i,a)}function Ew(e,t,i,a){return hs(e)?e.then(c=>(i(),a(c),c),c=>{throw t(c),i(),c}):(i(),a(e),e)}function Sw(e,t,i){if(!Nn(e))return[!1];let a,c;typeof e.tracesSampler=="function"?(c=e.tracesSampler({...t,inheritOrSampleWith:p=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):p}),a=!0):t.parentSampled!==void 0?c=t.parentSampled:typeof e.tracesSampleRate<"u"&&(c=e.tracesSampleRate,a=!0);const u=Wi(c);if(u===void 0)return ee&&G.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(c)} of type ${JSON.stringify(typeof c)}.`),[!1];if(!u)return ee&&G.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,u,a];const f=i<u;return f||ee&&G.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(c)})`),[f,u,a]}const ul="__SENTRY_SUPPRESS_TRACING__";function bw(e,t){const i=Xo();if(i.startSpan)return i.startSpan(e,t);const a=n_(e),{forceTransaction:c,parentSpan:u,scope:f}=e,p=f?.clone();return Cr(p,()=>Q0(u)(()=>{const h=qe(),v=r_(h,u),b=e.onlyIfParent&&!v?new Or:t_({parentSpan:v,spanArguments:a,forceTransaction:c,scope:h});return di(h,b),X0(()=>t(b),()=>{const{status:T}=Ve(b);b.isRecording()&&(!T||T==="ok")&&b.setStatus({code:Et,message:"internal_error"})},()=>{b.end()})}))}function TB(e,t){const i=Xo();if(i.startSpanManual)return i.startSpanManual(e,t);const a=n_(e),{forceTransaction:c,parentSpan:u,scope:f}=e,p=f?.clone();return Cr(p,()=>Q0(u)(()=>{const h=qe(),v=r_(h,u),b=e.onlyIfParent&&!v?new Or:t_({parentSpan:v,spanArguments:a,forceTransaction:c,scope:h});return di(h,b),X0(()=>t(b,()=>b.end()),()=>{const{status:T}=Ve(b);b.isRecording()&&(!T||T==="ok")&&b.setStatus({code:Et,message:"internal_error"})})}))}function vs(e){const t=Xo();if(t.startInactiveSpan)return t.startInactiveSpan(e);const i=n_(e),{forceTransaction:a,parentSpan:c}=e;return(e.scope?f=>Cr(e.scope,f):c!==void 0?f=>jl(c,f):f=>f())(()=>{const f=qe(),p=r_(f,c);return e.onlyIfParent&&!p?new Or:t_({parentSpan:p,spanArguments:i,forceTransaction:a,scope:f})})}const AB=(e,t)=>{const i=Ir(),a=yi(i);if(a.continueTrace)return a.continueTrace(e,t);const{sentryTrace:c,baggage:u}=e,f=Te(),p=Km(u);return f&&!qD(f,p?.org_id)?Tw(t):Cr(m=>{const h=k0(c,u);return m.setPropagationContext(h),di(m,void 0),t()})};function jl(e,t){const i=Xo();return i.withActiveSpan?i.withActiveSpan(e,t):Cr(a=>(di(a,e||void 0),t(a)))}function RB(e){const t=Xo();return t.suppressTracing?t.suppressTracing(e):Cr(i=>{i.setSDKProcessingMetadata({[ul]:!0});const a=e();return i.setSDKProcessingMetadata({[ul]:void 0}),a})}function Tw(e){return Cr(t=>(t.setPropagationContext({traceId:Yn(),sampleRand:yr()}
19),ee&&G.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),jl(null,e)))}function t_({parentSpan:e,spanArguments:t,forceTransaction:i,scope:a}){if(!Nn()){const f=new Or;if(i||!e){const p={sampled:"false",sample_rate:"0",transaction:t.name,...Pn(f)};Gu(f,p)}return f}const c=_t();let u;if(e&&!i)u=Aw(e,a,t),q0(e,u);else if(e){const f=Pn(e),{traceId:p,spanId:m}=e.spanContext(),h=vi(e);u=OE({traceId:p,parentSpanId:m,...t},a,h),Gu(u,f)}else{const{traceId:f,dsc:p,parentSpanId:m,sampled:h}={...c.getPropagationContext(),...a.getPropagationContext()};u=OE({traceId:f,parentSpanId:m,...t},a,h),p&&Gu(u,p)}return _w(u),ID(u,a,c),u}function n_(e){const i={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const a={...i};return a.startTimestamp=Xi(e.startTime),delete a.startTime,a}return i}function Xo(){const e=Ir();return yi(e)}function OE(e,t,i){const a=Te(),c=a?.getOptions()||{},{name:u=""}=e,f={spanAttributes:{...e.attributes},spanName:u,parentSampled:i};a?.emit("beforeSampling",f,{decision:!1});const p=f.parentSampled??i,m=f.spanAttributes,h=t.getPropagationContext(),[v,g,b]=t.getScopeData().sdkProcessingMetadata[ul]?[!1]:Sw(c,{name:u,parentSampled:p,attributes:m,parentSampleRate:Wi(h.dsc?.sample_rate)},h.sampleRand),T=new Ul({...e,attributes:{[Rn]:"custom",[$m]:g!==void 0&&b?g:void 0,...m},sampled:v});return!v&&a&&(ee&&G.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),a.recordDroppedEvent("sample_rate","transaction")),a&&a.emit("spanStart",T),T}function Aw(e,t,i){const{spanId:a,traceId:c}=e.spanContext(),u=t.getScopeData().sdkProcessingMetadata[ul]?!1:vi(e),f=u?new Ul({...i,parentSpanId:a,traceId:c,sampled:u}):new Or({traceId:c});q0(e,f);const p=Te();return p&&(p.emit("spanStart",f),i.endTimestamp&&p.emit("spanEnd",f)),f}function r_(e,t){if(t)return t;if(t===null)return;const i=is(e);if(!i)return;const a=Te();return(a?a.getOptions():{}).parentSpanIsAlwaysRootSpan?kt(i):i}function Q0(e){return e!==void 0?t=>jl(e,t):t=>t()}const Yu={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Rw="heartbeatFailed",Ow="idleTimeout",Dw="finalTimeout",ww="externalFinish";function K0(e,t={}){const i=new Map;let a=!1,c,u=ww,f=!t.disableAutoFinish;const p=[],{idleTimeout:m=Yu.idleTimeout,finalTimeout:h=Yu.finalTimeout,childSpanTimeout:v=Yu.childSpanTimeout,beforeSpanEnd:g,trimIdleSpanEndTimestamp:b=!0}=t,T=Te();if(!T||!Nn()){const z=new Or,Z={sample_rate:"0",sampled:"false",...Pn(z)};return Gu(z,Z),z}const R=qe(),x=Pt(),P=xw(e);P.end=new Proxy(P.end,{apply(z,Z,Ie){if(g&&g(P),Z instanceof Or)return;const[J,...ne]=Ie,fe=J||bt(),De=Xi(fe),me=Fu(P).filter(W=>W!==P),He=Ve(P);if(!me.length||!b)return re(De),Reflect.apply(z,Z,[De,...ne]);const M=T.getOptions().ignoreSpans,q=me?.reduce((W,ce)=>{const B=Ve(ce);return!B.timestamp||M&&ol(B,M)?W:W?Math.max(W,B.timestamp):B.timestamp},void 0),H=He.start_timestamp,te=Math.min(H?H+h/1e3:1/0,Math.max(H||-1/0,Math.min(De,q||1/0)));return re(te),Reflect.apply(z,Z,[te,...ne])}});function $(){c&&(clearTimeout(c),c=void 0)}function K(z){$(),c=setTimeout(()=>{!a&&i.size===0&&f&&(u=Ow,P.end(z))},m)}function le(z){c=setTimeout(()=>{!a&&f&&(u=Rw,P.end(z))},v)}function de(z){$(),i.set(z,!0);const Z=bt();le(Z+v/1e3)}function he(z){if(i.has(z)&&i.delete(z),i.size===0){const Z=bt();K(Z+m/1e3)}}function re(z){a=!0,i.clear(),p.forEach(me=>me()),di(R,x);const Z=Ve(P),{start_timestamp:Ie}=Z;if(!Ie)return;Z.data[Co]||P.setAttribute(Co,u);const ne=Z.status;(!ne||ne==="unknown")&&P.setStatus({code:Qm}),G.log(`[Tracing] Idle span "${Z.op}" finished`);const fe=Fu(P).filter(me=>me!==P);let De=0;fe.forEach(me=>{me.isRecording()&&(me.setStatus({code:Et,message:"cancelled"}),me.end(z),ee&&G.log("[Tracing] Cancelling span since span ended early",JSON.stringify(me,void 0,2)));const He=Ve(me),{timestamp:M=0,start_timestamp:q=0}=He,H=q<=z,te=(h+m)/1e3,W=M-q<=te;if(ee){const ce=JSON.stringify(me,void 0,2);H?W||G.log("[Tracing] Discarding span since it finished after idle span final timeout",ce):G.log("[Tracing] Discarding span since it happened after idle span was finished",ce)}(!W||!H)&&(XD(P,me),De++)}),De>0&&P.setAttribute("sentry.idle_span_discarded_spans",De)}return p.push(T.on("spanStart",z=>{if(a||z===P||Ve(z).timestamp||z instanceof Ul&&z.isStandaloneSpan())return;Fu(P).includes(z)&&de(z.spanContext().spanId)})),p.push(T.on("spanEnd",z=>{a||he(z.spanContext().spanId)})),p.push(T.on("idleSpanEnableAutoFinish",z=>{z===P&&(f=!0,K(),i.size&&le())})),t.disableAutoFinish||K(),setTimeout(()=>{a||(P.setStatus({code:Et,message:"deadline_exceeded"}),u=Dw,P.end())},h),P}function xw(e){const t=vs(e);
19return di(qe(),t),ee&&G.log("[Tracing] Started span is an idle span"),t}const Ap=0,DE=1,wE=2;function Qo(e){return new Lo(t=>{t(e)})}function i_(e){return new Lo((t,i)=>{i(e)})}class Lo{constructor(t){this._state=Ap,this._handlers=[],this._runExecutor(t)}then(t,i){return new Lo((a,c)=>{this._handlers.push([!1,u=>{if(!t)a(u);else try{a(t(u))}catch(f){c(f)}},u=>{if(!i)c(u);else try{a(i(u))}catch(f){c(f)}}]),this._executeHandlers()})}catch(t){return this.then(i=>i,t)}finally(t){return new Lo((i,a)=>{let c,u;return this.then(f=>{u=!1,c=f,t&&t()},f=>{u=!0,c=f,t&&t()}).then(()=>{if(u){a(c);return}i(c)})})}_executeHandlers(){if(this._state===Ap)return;const t=this._handlers.slice();this._handlers=[],t.forEach(i=>{i[0]||(this._state===DE&&i[1](this._value),this._state===wE&&i[2](this._value),i[0]=!0)})}_runExecutor(t){const i=(u,f)=>{if(this._state===Ap){if(hs(f)){f.then(a,c);return}this._state=u,this._value=f,this._executeHandlers()}},a=u=>{i(DE,u)},c=u=>{i(wE,u)};try{t(a,c)}catch(u){c(u)}}}function Iw(e,t,i,a=0){try{const c=em(t,i,e,a);return hs(c)?c:Qo(c)}catch(c){return i_(c)}}function em(e,t,i,a){const c=i[a];if(!e||!c)return e;const u=c({...e},t);return ee&&u===null&&G.log(`Event processor "${c.id||"?"}" dropped event`),hs(u)?u.then(f=>em(f,t,i,a+1)):em(u,t,i,a+1)}let Hi,xE,IE,ri;function J0(e){const t=Ne._sentryDebugIds,i=Ne._debugIds;if(!t&&!i)return{};const a=t?Object.keys(t):[],c=i?Object.keys(i):[];if(ri&&a.length===xE&&c.length===IE)return ri;xE=a.length,IE=c.length,ri={},Hi||(Hi={});const u=(f,p)=>{for(const m of f){const h=p[m],v=Hi?.[m];if(v&&ri&&h)ri[v[0]]=h,Hi&&(Hi[m]=[v[0],h]);else if(h){const g=e(m);for(let b=g.length-1;b>=0;b--){const R=g[b]?.filename;if(R&&ri&&Hi){ri[R]=h,Hi[m]=[R,h];break}}}}};return t&&u(a,t),i&&u(c,i),ri}function OB(e,t){const i=J0(e);if(!i)return[];const a=[];for(const c of t){const u=WO(c);u&&i[u]&&a.push({type:"sourcemap",code_file:c,debug_id:i[u]})}return a}function Cw(e,t){const{fingerprint:i,span:a,breadcrumbs:c,sdkProcessingMetadata:u}=t;Lw(e,t),a&&kw(e,a),Pw(e,i),Mw(e,c),Nw(e,u)}function CE(e,t){const{extra:i,tags:a,attributes:c,user:u,contexts:f,level:p,sdkProcessingMetadata:m,breadcrumbs:h,fingerprint:v,eventProcessors:g,attachments:b,propagationContext:T,transactionName:R,span:x}=t;yo(e,"extra",i),yo(e,"tags",a),yo(e,"attributes",c),yo(e,"user",u),yo(e,"contexts",f),e.sdkProcessingMetadata=Go(e.sdkProcessingMetadata,m,2),p&&(e.level=p),R&&(e.transactionName=R),x&&(e.span=x),h.length&&(e.breadcrumbs=[...e.breadcrumbs,...h]),v.length&&(e.fingerprint=[...e.fingerprint,...v]),g.length&&(e.eventProcessors=[...e.eventProcessors,...g]),b.length&&(e.attachments=[...e.attachments,...b]),e.propagationContext={...e.propagationContext,...T}}
19function yo(e,t,i){e[t]=Go(e[t],i,1)}function zl(e,t){const i=TD().getScopeData();return e&&CE(i,e.getScopeData()),t&&CE(i,t.getScopeData()),i}function Lw(e,t){const{extra:i,tags:a,user:c,contexts:u,level:f,transactionName:p}=t;Object.keys(i).length&&(e.extra={...i,...e.extra}),Object.keys(a).length&&(e.tags={...a,...e.tags}),Object.keys(c).length&&(e.user={...c,...e.user}),Object.keys(u).length&&(e.contexts={...u,...e.contexts}),f&&(e.level=f),p&&e.type!=="transaction"&&(e.transaction=p)}function Mw(e,t){const i=[...e.breadcrumbs||[],...t];e.breadcrumbs=i.length?i:void 0}function Nw(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function kw(e,t){e.contexts={trace:z0(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Pn(t),...e.sdkProcessingMetadata};const i=kt(t),a=Ve(i).description;a&&!e.transaction&&e.type==="transaction"&&(e.transaction=a)}function Pw(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}function W0(e,t,i,a,c,u){const{normalizeDepth:f=3,normalizeMaxBreadth:p=1e3}=e,m={...t,event_id:t.event_id||i.event_id||fn(),timestamp:t.timestamp||ta()},h=i.integrations||e.integrations.map($=>$.name);Uw(m,e),Bw(m,h),c&&c.emit("applyFrameMetadata",t),t.type===void 0&&jw(m,e.stackParser);const v=qw(a,i.captureContext);i.mechanism&&ns(m,i.mechanism);const g=c?c.getEventProcessors():[],b=zl(u,v),T=[...i.attachments||[],...b.attachments];T.length&&(i.attachments=T),Cw(m,b);const R=[...g,...b.eventProcessors];return(i.data&&i.data.__sentry__===!0?Qo(m):Iw(R,m,i)).then($=>($&&zw($),typeof f=="number"&&f>0?Vw($,f,p):$))}function Uw(e,t){const{environment:i,release:a,dist:c,maxValueLength:u}=t;e.environment=e.environment||i||Wm,!e.release&&a&&(e.release=a),!e.dist&&c&&(e.dist=c);const f=e.request;f?.url&&u&&(f.url=Yp(f.url,u)),u&&e.exception?.values?.forEach(p=>{p.value&&(p.value=Yp(p.value,u))})}function jw(e,t){const i=J0(t);e.exception?.values?.forEach(a=>{a.stacktrace?.frames?.forEach(c=>{c.filename&&(c.debug_id=i[c.filename])})})}function zw(e){const t={};if(e.exception?.values?.forEach(a=>{a.stacktrace?.frames?.forEach(c=>{c.debug_id&&(c.abs_path?t[c.abs_path]=c.debug_id:c.filename&&(t[c.filename]=c.debug_id),delete c.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const i=e.debug_meta.images;Object.entries(t).forEach(([a,c])=>{i.push({type:"sourcemap",code_file:a,debug_id:c})})}function Bw(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Vw(e,t,i){if(!e)return null;const a={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(c=>({...c,...c.data&&{data:Ln(c.data,t,i)}}))},...e.user&&{user:Ln(e.user,t,i)},...e.contexts&&{contexts:Ln(e.contexts,t,i)},...e.extra&&{extra:Ln(e.extra,t,i)}};return e.contexts?.trace&&a.contexts&&(a.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(a.contexts.trace.data=Ln(e.contexts.trace.data,t,i))),e.spans&&(a.spans=e.spans.map(c=>({...c,...c.data&&{data:Ln(c.data,t,i)}}))),e.contexts?.flags&&a.contexts&&(a.contexts.flags=Ln(e.contexts.flags,3,i)),a}function qw(e,t){if(!t)return e;const i=e?e.clone():new $n;return i.update(t),i}function Hw(e){if(e)return Fw(e)?{captureContext:e}:Yw(e)?{captureContext:e}:e}function Fw(e){return e instanceof $n||typeof e=="function"}const Gw=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Yw(e){return Object.keys(e).some(t=>Gw.includes(t))}function a_(e,t){return qe().captureException(e,Hw(t))}function DB(e,t){const i=typeof t=="string"?t:void 0,a=typeof t!="string"?{captureContext:t}:void 0;return qe().captureMessage(e,i,a)}function Z0(e,t){return qe().captureEvent(e,t)}function eb(e,t){_t().setContext(e,t)}function wB(e){_t().setExtras(e)}function xB(e,t){_t().setExtra(e,t)}function IB(e){_t().setTags(e)}function CB(e,t){_t().setTag(e,t)}function tb(e){_t().setUser(e)}function LB(e){_t().setConversationId(e)}function MB(){return _t().lastEventId()}async function NB(e){const t=Te();return t?t.flush(e):(ee&&G.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function kB(e){const t=Te();return t?t.close(e):(ee&&G.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function PB(){return!!Te()}function $w(){const e=Te();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Xw(e){_t().addEventProcessor(e)}function LE(e){const t=_t(),{user:i}=zl(t,qe()),{userAgent:a}=Ne.navigator||{},c=pD({user:i,...a&&{userAgent:a},...e}),u=t.getSession();return u?.status==="ok"&&rs(u,{status:"exited"}),nb(),t.setSession(c),c}function nb(){const e=_t(),i=qe().getSession()||e.getSession();i&&mD(i),rb(),e.setSession()}function rb(){const e=_t(),t=Te(),i=e.getSession();i&&t&&t.captureSession(i)}function Rp(e=!1){if(e){nb();return}rb()}const Qw="7";function ib(e){const t=e.protocol?`${e.protocol}:`:"",i=e.port?`:${e.port}`:"";return`${t}//${e.host}${i}${e.path?`/${e.path}`:""}/api/`}function Kw(e){return`${ib(e)}${e.projectId}/envelope/`}function Jw(e,t){const i={sentry_version:Qw};return e.publicKey&&(i.sentry_key=e.publicKey),t&&(i.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(i).toString()}function Ww(e,t,i){return t||`${Kw(e)}?${Jw(e,i)}`}function UB(e,t){const i=M0(e);if(!i)return"";const a=`${ib(i)}embed/error-page/`;let c=`dsn=${na(i)}`;for(const u in t)if(u!=="dsn"&&u!=="onClose")if(u==="user"){const f=t.user;if(!f)continue;
19f.name&&(c+=`&name=${encodeURIComponent(f.name)}`),f.email&&(c+=`&email=${encodeURIComponent(f.email)}`)}else c+=`&${encodeURIComponent(u)}=${encodeURIComponent(t[u])}`;return`${a}?${c}`}const ME=[];function Zw(e){const t={};return e.forEach(i=>{const{name:a}=i,c=t[a];c&&!c.isDefaultInstance&&i.isDefaultInstance||(t[a]=i)}),Object.values(t)}function ex(e){const t=e.defaultIntegrations||[],i=e.integrations;t.forEach(c=>{c.isDefaultInstance=!0});let a;if(Array.isArray(i))a=[...t,...i];else if(typeof i=="function"){const c=i(t);a=Array.isArray(c)?c:[c]}else a=t;return Zw(a)}function tx(e,t){const i={};return t.forEach(a=>{a&&ab(e,a,i)}),i}function NE(e,t){for(const i of t)i?.afterAllSetup&&i.afterAllSetup(e)}function ab(e,t,i){if(i[t.name]){ee&&G.log(`Integration skipped because it was already installed: ${t.name}`);return}if(i[t.name]=t,!ME.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),ME.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const a=t.preprocessEvent.bind(t);e.on("preprocessEvent",(c,u)=>a(c,u,e))}if(typeof t.processEvent=="function"){const a=t.processEvent.bind(t),c=Object.assign((u,f)=>a(u,f,e),{id:t.name});e.addEventProcessor(c)}ee&&G.log(`Integration installed: ${t.name}`)}function jB(e){const t=Te();if(!t){ee&&G.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function zB(e){return e}function nx(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function rx(e,t){const{value:i,unit:a}=nx(e)?e:{value:e,unit:void 0},c=ix(i),u=a&&typeof a=="string"?{unit:a}:{};if(c)return{...c,...u};if(!t||t==="skip-undefined"&&i===void 0)return;let f="";try{f=JSON.stringify(i)??""}catch{}return{value:f,type:"string",...u}}function ll(e,t=!1){const i={};for(const[a,c]of Object.entries(e??{})){const u=rx(c,t);u&&(i[a]=u)}return i}function ix(e){const t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}const ax="sentry.timestamp.sequence";let Op=0,Dp;function sb(e){const t=Math.floor(e*1e3);Dp!==void 0&&t!==Dp&&(Op=0);const i=Op;return Op++,Dp=t,{key:ax,value:{value:i,type:"integer"}}}function ob(e,t){return t?Cr(t,()=>{const i=Pt(),a=i?z0(i):R0(t);return[i?Pn(i):Zm(e,t),a]}):[void 0,void 0]}const sx={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function ox(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function cx(e,t,i,a){const c={};return t?.sdk&&(c.sdk={name:t.sdk.name,version:t.sdk.version}),i&&a&&(c.dsn=na(a)),Ei(c,[ox(e)])}const ux=100;function qn(e,t,i,a=!0){i&&(!e[t]||a)&&(e[t]=i)}function lx(e,t){const i=s_(),a=cb(e);a===void 0?i.set(e,[t]):a.length>=ux?(dl(e,a),i.set(e,[t])):i.set(e,[...a,t])}function BB(e,t=qe(),i=lx){const a=t?.getClient()??Te();if(!a){ee&&G.warn("No client available to capture log.");return}const{release:c,environment:u,enableLogs:f=!1,beforeSendLog:p}=a.getOptions();if(!f){ee&&G.warn("logging option not enabled, log will not be captured.");return}const[,m]=ob(a,t),h={...e.attributes},{user:{id:v,email:g,username:b},attributes:T={}}=zl(_t(),t);qn(h,"user.id",v,!1),qn(h,"user.email",g,!1),qn(h,"user.name",b,!1),qn(h,"sentry.release",c),qn(h,"sentry.environment",u);const{name:R,version:x}=a.getSdkMetadata()?.sdk??{};qn(h,"sentry.sdk.name",R),qn(h,"sentry.sdk.version",x);const P=a.getIntegrationByName("Replay"),$=P?.getReplayId(!0);qn(h,"sentry.replay_id",$),$&&P?.getRecordingMode()==="buffer"&&qn(h,"sentry._internal.replay_is_buffering",!0);const K=e.message;if(kl(K)){const{__sentry_template_string__:De,__sentry_template_values__:me=[]}=K;me?.length&&(h["sentry.message.template"]=De),me.forEach((He,M)=>{h[`sentry.message.parameter.${M}`]=He})}const le=is(t);qn(h,"sentry.trace.parent_span_id",le?.spanContext().spanId);const de={...e,attributes:h};a.emit("beforeCaptureLog",de);const he=p?_i(()=>p(de)):de;if(!he){a.recordDroppedEvent("before_send","log_item",1),ee&&G.warn("beforeSendLog returned null, log will not be captured.");return}const{level:re,message:z,attributes:Z={},severityNumber:Ie}=he,J=bt(),ne=sb(J),fe={timestamp:J,level:re,body:z,trace_id:m?.trace_id,severity_number:Ie??sx[re],attributes:{...ll(T),...ll(Z,!0),[ne.key]:ne.value}};i(a,fe),a.emit("afterCaptureLog",he)}function dl(e,t){const i=t??cb(e)??[];if(i.length===0)return;const a=e.getOptions(),c=cx(i,a._metadata,a.tunnel,e.getDsn());s_().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(c)}function cb(e){return s_().get(e)}function s_(){return ms("clientToLogBufferMap",()=>new WeakMap)}function dx(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function fx(e,t,i,a){const c={};return t?.sdk&&(c.sdk={name:t.sdk.name,version:t.sdk.version}),i&&a&&(c.dsn=na(a)),Ei(c,[dx(e)])}const px=1e3;function mr(e,t,i,a=!0){i&&(a||!(t in e))&&(e[t]=i)}function mx(e,t){const i=c_(),a=ub(e);a===void 0?i.set(e,[t]):a.length>=px?(o_(e,a),i.set(e,[t])):i.set(e,[...a,t])}function _x(e,t,i){const{release:a,environment:c}=t.getOptions(),u={...e.attributes};mr(u,"user.id",i.id,!1),mr(u,"user.email",i.email,!1),mr(u,"user.name",i.username,!1),mr(u,"sentry.release",a),mr(u,"sentry.environment",c);const{name:f,version:p}=t.getSdkMetadata()?.sdk??{};mr(u,"sentry.sdk.name",f),mr(u,"sentry.sdk.version",p);const m=t.getIntegrationByName("Replay"),h=m?.getReplayId(!0);return mr(u,"sentry.replay_id",h),h&&m?.getRecordingMode()==="buffer"&&mr(u,"sentry._internal.replay_is_buffering",!0),{...e,attributes:u}}function hx(e,t,i,a){const[,c]=ob(t,i),u=is(i),f=u?u.spanContext().traceId:c?.trace_id,p=u?u.spanContext().spanId:void 0,m=bt(),h=sb(m);return{timestamp:m,trace_id:f??"",span_id:p,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...ll(a),...ll(e.attributes,"skip-undefined"),[h.key]:h.value}}}function VB(e,t){const i=t?.scope??qe(),a=t?.captureSerializedMetric??mx,c=i?.getClient()??Te();if(!c){ee&&G.warn("No client available to capture metric.");return}const{_experiments:u,enableMetrics:f,beforeSendMetric:p}=c.getOptions();if(!(f??u?.enableMetrics??!0)){ee&&G.warn("metrics option not enabled, metric will not be captured.");return}const{user:h,attributes:v}=zl(_t(),i),g=_x(e,c,h);c.emit("processMetric",g);const b=p||u?.beforeSendMetric,T=b?b(g):g;if(!T){ee&&G.log("`beforeSendMetric` returned `null`, will not send metric.");return}const R=hx(T,c,i,v);ee&&G.log("[Metric]",R),a(c,R),c.emit("afterCaptureMetric",T)}function o_(e,t){const i=t??ub(e)??[];if(i.length===0)return;const a=e.getOptions(),c=fx(i,a._metadata,a.tunnel,e.getDsn());c_().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(c)}function ub(e){return c_().get(e)}function c_(){return ms("clientToMetricBufferMap",()=>new WeakMap)}function lb(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const u_=Symbol.for("SentryBufferFullError");function l_(e=100){const t=new Set;function i(){return t.size<e}function a(f){t.delete(f)}function c(f){if(!i())return i_(u_);const p=f();return t.add(p),p.then(()=>a(p),()=>a(p)),p}function u(f){if(!t.size)return Qo(!0);const p=Promise.allSettled(Array.from(t)).then(()=>!0);if(!f)return p;const m=[p,new Promise(h=>lb(setTimeout(()=>h(!1),f)))];return Promise.race(m)}return{get $(){return Array.from(t)},add:c,drain:u}}const gx=60*1e3;function yx(e,t=Fo()){const i=parseInt(`${e}`,10);if(!isNaN(i))return i*1e3;const a=Date.parse(`${e}`);return isNaN(a)?gx:a-t}function vx(e,t){return e[t]||e.all||0}function db(e,t,i=Fo()){return vx(e,t)>i}function fb(e,{statusCode:t,headers:i},a=Fo()){const c={...e},u=i?.["x-sentry-rate-limits"],f=i?.["retry-after"];if(u)for(const p of u.trim().split(",")){const[m,h,,,v]=p.split(":",5),g=parseInt(m,10),b=(isNaN(g)?60:g)*1e3;if(!h)c.all=a+b;else for(const T of h.split(";"))T==="metric_bucket"?(!v||v.split(";").includes("custom"))&&(c[T]=a+b):c[T]=a+b}else f?c.all=a+yx(f,a):t===429&&(c.all=a+60*1e3);return c}const pb=64;function Ex(e,t,i=l_(e.bufferSize||pb)){let a={};const c=f=>i.drain(f);function u(f){const p=[];if(Zp(f,(g,b)=>{const T=SE(b);db(a,T)?e.recordDroppedEvent("ratelimit_backoff",T):p.push(g)}),p.length===0)return Promise.resolve({});const m=Ei(f[0],p),h=g=>{if(iw(m,["client_report"])){ee&&G.warn(`Dropping client report. Will not send outcomes (reason: ${g}).`);return}Zp(m,(b,T)=>{e.recordDroppedEvent(g,SE(T))})},v=()=>t({body:sw(m)}).then(g=>g.statusCode===413?(ee&&G.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),h("send_error"),g):(ee&&g.statusCode!==void 0&&(g.statusCode<200||g.statusCode>=300)&&G.warn(`Sentry responded with status code ${g.statusCode} to sent event.`),a=fb(a,g),g),g=>{throw h("network_error"),ee&&G.error("Encountered error running transport request:",g),g});return i.add(v).then(g=>g,g=>{if(g===u_)return ee&&G.error("Skipped sending event because buffer is full."),h("queue_overflow"),Promise.resolve({});throw g})}return{send:u,flush:c}}function Sx(e,t,i){const a=[{type:"client_report"},{timestamp:ta(),discarded_events:e}];return Ei(t?{dsn:t}:{},[a])}function mb(e){const t=[];e.message&&t.push(e.message);try{const i=e.exception.values[e.exception.values.length-1];i?.value&&(t.push(i.value),i.type&&t.push(`${i.type}: ${i.value}`))}catch{}return t}function bx(e){const{trace_id:t,parent_span_id:i,span_id:a,status:c,origin:u,data:f,op:p}=e.contexts?.trace??{};return{data:f??{},description:e.transaction,op:p,parent_span_id:i,span_id:a??"",start_timestamp:e.start_timestamp??0,status:c,timestamp:e.timestamp,trace_id:t??"",origin:u,profile_id:f?.[Xm],exclusive_time:f?.[ys],measurements:e.measurements,is_segment:!0}}function Tx(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[Xm]:e.profile_id},...e.exclusive_time&&{[ys]:e.exclusive_time}}}},measurements:e.measurements}}const kE="Not capturing exception because it's already been captured.",PE="Discarded session because of missing or non-string release",_b=Symbol.for("SentryInternalError"),hb=Symbol.for("SentryDoNotSendEventError"),Ax=5e3;function $u(e){return{message:e,[_b]:!0}}function wp(e){return{message:e,[hb]:!0}}function UE(e){return!!e&&typeof e=="object"&&_b in e}function jE(e){return!!e&&typeof e=="object"&&hb in e}function zE(e,t,i,a,c){let u=0,f,p=!1;e.on(i,()=>{u=0,clearTimeout(f),p=!1}),e.on(t,m=>{u+=a(m),u>=8e5?c(e):p||(p=!0,f=lb(setTimeout(()=>{c(e)},Ax)))}),e.on("flush",()=>{c(e)})}class Rx{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=l_(t.transportOptions?.bufferSize??pb),t.dsn?this._dsn=M0(t.dsn):ee&&G.warn("No DSN provided, client will not send events."),this._dsn){const a=Ww(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:a})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&zE(this,"afterCaptureLog","flushLogs",xx,dl),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&zE(this,"afterCaptureMetric","flushMetrics",wx,o_)}captureException(t,i,a){const c=fn();if(pE(t))return ee&&G.log(kE),c;const u={event_id:c,...i};return this._process(()=>this.eventFromException(t,u).then(f=>this._captureEvent(f,u,a)).then(f=>f),"error"),u.event_id}captureMessage(t,i,a,c){const u={event_id:fn(),...a},f=kl(t)?t:String(t),p=ts(t),m=p?this.eventFromMessage(f,i,u):this.eventFromException(t,u);return this._process(()=>m.then(h=>this._captureEvent(h,u,c)),p?"unknown":"error"),u.event_id}captureEvent(t,i,a){const c=fn();if(i?.originalException&&pE(i.originalException))return ee&&G.log(kE),c;const u={event_id:c,...i},f=t.sdkProcessingMetadata||{},p=f.capturedSpanScope,m=f.capturedSpanIsolationScope,h=BE(t.type);return this._process(()=>this._captureEvent(t,u,p||a,m),h),u.event_id}captureSession(t){this.sendSession(t),rs(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const i=this._transport;if(!i)return!0;
19this.emit("flush");const a=await this._isClientDoneProcessing(t),c=await i.flush(t);return a&&c}async close(t){dl(this);const i=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),i}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 i=this._integrations[t.name];ab(this,t,this._integrations),i||NE(this,[t])}sendEvent(t,i={}){this.emit("beforeSendEvent",t,i);let a=pw(t,this._dsn,this._options._metadata,this._options.tunnel);for(const c of i.attachments||[])a=rw(a,uw(c));this.sendEnvelope(a).then(c=>this.emit("afterSendEvent",t,c))}sendSession(t){const{release:i,environment:a=Wm}=this._options;if("aggregates"in t){const u=t.attrs||{};if(!u.release&&!i){ee&&G.warn(PE);return}u.release=u.release||i,u.environment=u.environment||a,t.attrs=u}else{if(!t.release&&!i){ee&&G.warn(PE);return}t.release=t.release||i,t.environment=t.environment||a}this.emit("beforeSendSession",t);const c=fw(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(c)}recordDroppedEvent(t,i,a=1){if(this._options.sendClientReports){const c=`${t}:${i}`;ee&&G.log(`Recording outcome: "${c}"${a>1?` (${a} times)`:""}`),this._outcomes[c]=(this._outcomes[c]||0)+a}}on(t,i){const a=this._hooks[t]=this._hooks[t]||new Set,c=(...u)=>i(...u);return a.add(c),()=>{a.delete(c)}}emit(t,...i){const a=this._hooks[t];a&&a.forEach(c=>c(...i))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(i){return ee&&G.error("Error while sending envelope:",i),{}}return ee&&G.error("Transport disabled"),{}}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=tx(this,t),NE(this,t)}_updateSessionFromEvent(t,i){let a=i.level==="fatal",c=!1;const u=i.exception?.values;if(u){c=!0,a=!1;for(const m of u)if(m.mechanism?.handled===!1){a=!0;break}}const f=t.status==="ok";(f&&t.errors===0||f&&a)&&(rs(t,{...a&&{status:"crashed"},errors:t.errors||Number(c||a)}),this.captureSession(t))}async _isClientDoneProcessing(t){let i=0;for(;!t||i<t;){if(await new Promise(a=>setTimeout(a,1)),!this._numProcessing)return!0;i++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,i,a,c){const u=this.getOptions(),f=Object.keys(this._integrations);return!i.integrations&&f?.length&&(i.integrations=f),this.emit("preprocessEvent",t,i),t.type||c.setLastEventId(t.event_id||i.event_id),W0(u,t,i,a,this,c).then(p=>{if(p===null)return p;this.emit("postprocessEvent",p,i),p.contexts={trace:{...p.contexts?.trace,...R0(a)},...p.contexts};const m=Zm(this,a);return p.sdkProcessingMetadata={dynamicSamplingContext:m,...p.sdkProcessingMetadata},p})}_captureEvent(t,i={},a=qe(),c=_t()){return ee&&tm(t)&&G.log(`Captured error event \`${mb(t)[0]||"<unknown>"}\``),this._processEvent(t,i,a,c).then(u=>u.event_id,u=>{ee&&(jE(u)?G.log(u.message):UE(u)?G.warn(u.message):G.warn(u))})}_processEvent(t,i,a,c){const u=this.getOptions(),{sampleRate:f}=u,p=gb(t),m=tm(t),v=`before send for type \`${t.type||"error"}\``,g=typeof f>"u"?void 0:Wi(f);if(m&&typeof g=="number"&&yr()>g)return this.recordDroppedEvent("sample_rate","error"),i_(wp(`Discarding event because it's not included in the random sample (sampling rate = ${f})`));const b=BE(t.type);return this._prepareEvent(t,i,a,c).then(T=>{if(T===null)throw this.recordDroppedEvent("event_processor",b),wp("An event processor returned `null`, will not send event.");if(i.data?.__sentry__===!0)return T;const x=Dx(this,u,T,i);return Ox(x,v)}).then(T=>{if(T===null){if(this.recordDroppedEvent("before_send",b),p){const $=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",$)}throw wp(`${v} returned \`null\`, will not send event.`)}const R=a.getSession()||c.getSession();if(m&&R&&this._updateSessionFromEvent(R,T),p){const P=T.sdkProcessingMetadata?.spanCountBeforeProcessing||0,$=T.spans?T.spans.length:0,K=P-$;K>0&&this.recordDroppedEvent("before_send","span",K)}const x=T.transaction_info;if(p&&x&&T.transaction!==t.transaction){const P="custom";T.transaction_info={...x,source:P}}return this.sendEvent(T,i),T}).then(null,T=>{throw jE(T)||UE(T)?T:(this.captureException(T,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:T}),$u(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
20Reason: ${T}`))})}_process(t,i){this._numProcessing++,this._promiseBuffer.add(t).then(a=>(this._numProcessing--,a),a=>(this._numProcessing--,a===u_&&this.recordDroppedEvent("queue_overflow",i),a))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([i,a])=>{const[c,u]=i.split(":");
20return{reason:c,category:u,quantity:a}})}_flushOutcomes(){ee&&G.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){ee&&G.log("No outcomes to send");return}if(!this._dsn){ee&&G.log("No dsn provided, will not send outcomes");return}ee&&G.log("Sending outcomes:",t);const i=Sx(t,this._options.tunnel&&na(this._dsn));this.sendEnvelope(i)}}function BE(e){return e==="replay_event"?"replay":e||"error"}function Ox(e,t){const i=`${t} must return \`null\` or a valid event.`;if(hs(e))return e.then(a=>{if(!Io(a)&&a!==null)throw $u(i);return a},a=>{throw $u(`${t} rejected with ${a}`)});if(!Io(e)&&e!==null)throw $u(i);return e}function Dx(e,t,i,a){const{beforeSend:c,beforeSendTransaction:u,beforeSendSpan:f,ignoreSpans:p}=t;let m=i;if(tm(m)&&c)return c(m,a);if(gb(m)){if(f||p){const h=bx(m);if(p?.length&&ol(h,p))return null;if(f){const v=f(h);v?m=Go(i,Tx(v)):Jp()}if(m.spans){const v=[],g=m.spans;for(const T of g){if(p?.length&&ol(T,p)){KD(g,T);continue}if(f){const R=f(T);R?v.push(R):(Jp(),v.push(T))}else v.push(T)}const b=m.spans.length-v.length;b&&e.recordDroppedEvent("before_send","span",b),m.spans=v}}if(u){if(m.spans){const h=m.spans.length;m.sdkProcessingMetadata={...i.sdkProcessingMetadata,spanCountBeforeProcessing:h}}return u(m,a)}}return m}function tm(e){return e.type===void 0}function gb(e){return e.type==="transaction"}function wx(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+yb(e.attributes)}function xx(e){let t=0;return e.message&&(t+=e.message.length*2),t+yb(e.attributes)}function yb(e){if(!e)return 0;let t=0;return Object.values(e).forEach(i=>{Array.isArray(i)?t+=i.length*VE(i[0]):ts(i)?t+=VE(i):t+=100}),t}function VE(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Ix(e){return Nl(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function qE(e){return Ix(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function Cx(e,t){t.debug===!0&&(ee?G.enable():_i(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),qe().update(t.initialScope);const a=new e(t);return Lx(a),a.init(),a}function Lx(e){qe().setClient(e)}const Mx="thismessage:/";function d_(e){return"isRelative"in e}function f_(e,t){const i=e.indexOf("://")<=0&&e.indexOf("//")!==0,a=i?Mx:void 0;try{if("canParse"in URL&&!URL.canParse(e,a))return;const c=new URL(e,a);return i?{isRelative:i,pathname:c.pathname,search:c.search,hash:c.hash}:c}catch{}}function Nx(e){if(d_(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 Ki(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const i=t[6]||"",a=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:i,hash:a,relative:t[5]+i+a}}function kx(e){return e.split(/[?#]/,1)[0]}function ci(e,t=!0){if(e.startsWith("data:")){const i=e.match(/^data:([^;,]+)/),a=i?i[1]:"text/plain",c=e.includes(";base64,"),u=e.indexOf(",");let f="";if(t&&u!==-1){const p=e.slice(u+1);f=p.length>10?`${p.slice(0,10)}... [truncated]`:p}return`data:${a}${c?",base64":""}${f?`,${f}`:""}`}return e}function Px(e,t){const i=t?.getDsn(),a=t?.getOptions().tunnel;return jx(e,i)||Ux(e,a)}function Ux(e,t){return t?HE(e)===HE(t):!1}function jx(e,t){const i=f_(e);return!i||d_(i)?!1:t?i.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(i.search):!1}function HE(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function zx(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function vb(e,t,i=[t],a="npm"){const c=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};c.name||(c.name=`sentry.javascript.${t}`,c.packages=i.map(u=>({name:`${a}:@sentry/${u}`,version:$i})),c.version=$i)}function Eb(e={}){const t=e.client||Te();if(!$w()||!t)return{};const i=Ir(),a=yi(i);if(a.getTraceData)return a.getTraceData(e);
20const c=e.scope||qe(),u=e.span||Pt(),f=u?FD(u):Bx(c),p=u?Pn(u):Zm(t,c),m=I0(p);if(!N0.test(f))return G.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const v={"sentry-trace":f,baggage:m};return e.propagateTraceparent&&(v.traceparent=u?GD(u):Vx(c)),v}function Bx(e){const{traceId:t,sampled:i,propagationSpanId:a}=e.getPropagationContext();return P0(t,a,i)}function Vx(e){const{traceId:t,sampled:i,propagationSpanId:a}=e.getPropagationContext();return U0(t,a,i)}function qx(e,t,i){let a,c,u;const f=i?.maxWait?Math.max(i.maxWait,t):0,p=i?.setTimeoutImpl||setTimeout;function m(){return h(),a=e(),a}function h(){c!==void 0&&clearTimeout(c),u!==void 0&&clearTimeout(u),c=u=void 0}function v(){return c!==void 0||u!==void 0?m():a}function g(){return c&&clearTimeout(c),c=p(m,t),f&&u===void 0&&(u=p(m,f)),a}return g.cancel=h,g.flush=v,g}const Hx=100;function fi(e,t){const i=Te(),a=_t();if(!i)return;const{beforeBreadcrumb:c=null,maxBreadcrumbs:u=Hx}=i.getOptions();if(u<=0)return;const p={timestamp:ta(),...e},m=c?_i(()=>c(p,t)):p;m!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",m,t),a.addBreadcrumb(m,u))}let FE;const Fx="FunctionToString",GE=new WeakMap,Gx=(()=>({name:Fx,setupOnce(){FE=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Ym(this),i=GE.has(Te())&&t!==void 0?t:this;return FE.apply(i,e)}}catch{}},setup(e){GE.set(e,!0)}})),Yx=Gx,$x=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],Xx="EventFilters",Qx=(e={})=>{let t;return{name:Xx,setup(i){const a=i.getOptions();t=YE(e,a)},processEvent(i,a,c){if(!t){const u=c.getOptions();t=YE(e,u)}return Jx(i,t)?null:i}}},Kx=((e={})=>({...Qx(e),name:"InboundFilters"}));function YE(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:$x],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Jx(e,t){if(e.type){if(e.type==="transaction"&&Zx(e,t.ignoreTransactions))return ee&&G.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
21Event: ${Fi(e)}`),!0}else{if(Wx(e,t.ignoreErrors))return ee&&G.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
22Event: ${Fi(e)}`),!0;if(rI(e))return ee&&G.warn(`Event dropped due to not having an error message, error type or stacktrace.
23Event: ${Fi(e)}`),!0;if(eI(e,t.denyUrls))return ee&&G.warn(`Event dropped due to being matched by \`denyUrls\` option.
24Event: ${Fi(e)}.
25Url: ${fl(e)}`),!0;if(!tI(e,t.allowUrls))return ee&&G.warn(`Event dropped due to not being matched by \`allowUrls\` option.
26Event: ${Fi(e)}.
27Url: ${fl(e)}`),!0}return!1}function Wx(e,t){return t?.length?mb(e).some(i=>vr(i,t)):!1}function Zx(e,t){if(!t?.length)return!1;const i=e.transaction;return i?vr(i,t):!1}function eI(e,t){if(!t?.length)return!1;const i=fl(e);return i?vr(i,t):!1}function tI(e,t){if(!t?.length)return!0;const i=fl(e);return i?vr(i,t):!0}function nI(e=[]){for(let t=e.length-1;t>=0;t--){const i=e[t];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null}function fl(e){try{const i=[...e.exception?.values??[]].reverse().find(a=>a.mechanism?.parent_id===void 0&&a.stacktrace?.frames?.length)?.stacktrace?.frames;return i?nI(i):null}catch{return ee&&G.error(`Cannot extract url for event ${Fi(e)}`),null}}function rI(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function iI(e,t,i,a,c,u){if(!c.exception?.values||!u||!Ar(u.originalException,Error))return;const f=c.exception.values.length>0?c.exception.values[c.exception.values.length-1]:void 0;f&&(c.exception.values=nm(e,t,a,u.originalException,i,c.exception.values,f,0))}function nm(e,t,i,a,c,u,f,p){if(u.length>=i+1)return u;let m=[...u];
27if(Ar(a[c],Error)){$E(f,p,a);const h=e(t,a[c]),v=m.length;XE(h,c,v,p),m=nm(e,t,i,a[c],c,[h,...m],h,v)}return Sb(a)&&a.errors.forEach((h,v)=>{if(Ar(h,Error)){$E(f,p,a);const g=e(t,h),b=m.length;XE(g,`errors[${v}]`,b,p),m=nm(e,t,i,h,c,[g,...m],g,b)}}),m}function Sb(e){return Array.isArray(e.errors)}function $E(e,t,i){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Sb(i)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function XE(e,t,i,a){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:i,parent_id:a}}function aI(e){const t="console";hi(t,e),gi(t,sI)}function sI(){"console"in Ne&&HO.forEach(function(e){e in Ne.console&&Jt(Ne.console,e,function(t){return il[e]=t,function(...i){On("console",{args:i,level:e}),il[e]?.apply(Ne.console,i)}})})}function bb(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const oI="Dedupe",cI=(()=>{let e;return{name:oI,processEvent(t){if(t.type)return t;try{if(lI(t,e))return ee&&G.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),uI=cI;function lI(e,t){return t?!!(dI(e,t)||fI(e,t)):!1}function dI(e,t){const i=e.message,a=t.message;return!(!i&&!a||i&&!a||!i&&a||i!==a||!Ab(e,t)||!Tb(e,t))}function fI(e,t){const i=QE(t),a=QE(e);return!(!i||!a||i.type!==a.type||i.value!==a.value||!Ab(e,t)||!Tb(e,t))}function Tb(e,t){let i=oE(e),a=oE(t);if(!i&&!a)return!0;if(i&&!a||!i&&a||(i=i,a=a,a.length!==i.length))return!1;for(let c=0;c<a.length;c++){const u=a[c],f=i[c];if(u.filename!==f.filename||u.lineno!==f.lineno||u.colno!==f.colno||u.function!==f.function)return!1}return!0}function Ab(e,t){let i=e.fingerprint,a=t.fingerprint;if(!i&&!a)return!0;if(i&&!a||!i&&a)return!1;i=i,a=a;try{return i.join("")===a.join("")}catch{return!1}}function QE(e){return e.exception?.values?.[0]}const pI="ConversationId",mI=(()=>({name:pI,setup(e){e.on("spanStart",t=>{const i=qe().getScopeData(),a=_t().getScopeData(),c=i.conversationId||a.conversationId;c&&t.setAttribute(RD,c)})}})),_I=mI;function hI(e,t,i,a,c){if(!e.fetchData)return;const{method:u,url:f}=e.fetchData,p=Nn()&&t(f);if(e.endTimestamp){const T=e.fetchData.__span;if(!T)return;const R=a[T];R&&(p&&(vI(R,e),gI(R,e,c)),delete a[T]);return}const{spanOrigin:m="auto.http.browser",propagateTraceparent:h=!1}=typeof c=="object"?c:{spanOrigin:c},v=!!Pt(),g=p&&v?vs(SI(f,u,m)):new Or;if(e.fetchData.__span=g.spanContext().spanId,a[g.spanContext().spanId]=g,i(e.fetchData.url)){const T=e.args[0],R={...e.args[1]||{}},x=yI(T,R,Nn()&&v?g:void 0,h);x&&(e.args[1]=R,R.headers=x)}const b=Te();if(b){const T={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};b.emit("beforeOutgoingRequestSpan",g,T)}return g}function gI(e,t,i){(typeof i=="object"&&i!==null?i.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function yI(e,t,i,a){const c=Eb({span:i,propagateTraceparent:a}),u=c["sentry-trace"],f=c.baggage,p=c.traceparent;if(!u)return;const m=t.headers||(Fm(e)?e.headers:void 0);if(m)if(EI(m)){const h=new Headers(m);if(h.get("sentry-trace")||h.set("sentry-trace",u),a&&p&&!h.get("traceparent")&&h.set("traceparent",p),f){const v=h.get("baggage");v?Ru(v)||h.set("baggage",`${v},${f}`):h.set("baggage",f)}return h}else if(Array.isArray(m)){const h=[...m];m.find(g=>g[0]==="sentry-trace")||h.push(["sentry-trace",u]),a&&p&&!m.find(g=>g[0]==="traceparent")&&h.push(["traceparent",p]);const v=m.find(g=>g[0]==="baggage"&&Ru(g[1]));return f&&!v&&h.push(["baggage",f]),h}else{const h="sentry-trace"in m?m["sentry-trace"]:void 0,v="traceparent"in m?m.traceparent:void 0,g="baggage"in m?m.baggage:void 0,b=g?Array.isArray(g)?[...g]:[g]:[],T=g&&(Array.isArray(g)?g.find(x=>Ru(x)):Ru(g));f&&!T&&b.push(f);const R={...m,"sentry-trace":h??u,baggage:b.length>0?b.join(","):void 0};return a&&p&&!v&&(R.traceparent=p),R}else return{...c}}function vI(e,t){if(t.response){D0(e,t.response.status);const i=t.response?.headers?.get("content-length");if(i){const a=parseInt(i);a>0&&e.setAttribute("http.response_content_length",a)}}else t.error&&e.setStatus({code:Et,message:"internal_error"});e.end()}function Ru(e){return e.split(",").some(t=>t.trim().startsWith(sl))}function EI(e){return typeof Headers<"u"&&Ar(e,Headers)}function SI(e,t,i){if(e.startsWith("data:")){const u=ci(e);return{name:`${t} ${u}`,attributes:KE(e,void 0,t,i)}}const a=f_(e),c=a?Nx(a):e;return{name:`${t} ${c}`,attributes:KE(e,a,t,i)}}function KE(e,t,i,a){const c={url:ci(e),type:"fetch","http.method":i,[Dt]:a,[Rr]:"http.client"};return t&&(d_(t)||(c["http.url"]=ci(t.href),c["server.address"]=t.host),t.search&&(c["http.query"]=t.search),t.hash&&(c["http.fragment"]=t.hash)),c}function Rb(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const ss=Ne;function bI(){return"history"in ss&&!!ss.history}function TI(){if(!("fetch"in ss))return!1;
27try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function rm(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function AI(){if(typeof EdgeRuntime=="string")return!0;if(!TI())return!1;if(rm(ss.fetch))return!0;let e=!1;const t=ss.document;if(t&&typeof t.createElement=="function")try{const i=t.createElement("iframe");i.hidden=!0,t.head.appendChild(i),i.contentWindow?.fetch&&(e=rm(i.contentWindow.fetch)),t.head.removeChild(i)}catch(i){ee&&G.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return e}function qB(){return"ReportingObserver"in ss}function Ob(e,t){const i="fetch";hi(i,e),gi(i,()=>Db(void 0,t))}function RI(e){const t="fetch-body-resolved";hi(t,e),gi(t,()=>Db(DI))}function Db(e,t=!1){t&&!AI()||Jt(Ne,"fetch",function(i){return function(...a){const c=new Error,{method:u,url:f}=wI(a),p={args:a,fetchData:{method:u,url:f},startTimestamp:bt()*1e3,virtualError:c,headers:xI(a)};return e||On("fetch",{...p}),i.apply(Ne,a).then(async m=>(e?e(m):On("fetch",{...p,endTimestamp:bt()*1e3,response:m}),m),m=>{On("fetch",{...p,endTimestamp:bt()*1e3,error:m}),Nl(m)&&m.stack===void 0&&(m.stack=c.stack,Zt(m,"framesToPop",1));const v=Te()?.getOptions().enhanceFetchErrorMessages??"always";if(v!==!1&&m instanceof TypeError&&(m.message==="Failed to fetch"||m.message==="Load failed"||m.message==="NetworkError when attempting to fetch resource."))try{const T=new URL(p.fetchData.url).host;v==="always"?m.message=`${m.message} (${T})`:Zt(m,"__sentry_fetch_url_host__",T)}catch{}throw m})}})}async function OI(e,t){if(e?.body){const i=e.body,a=i.getReader(),c=setTimeout(()=>{i.cancel().then(null,()=>{})},90*1e3);let u=!0;for(;u;){let f;try{f=setTimeout(()=>{i.cancel().then(null,()=>{})},5e3);const{done:p}=await a.read();clearTimeout(f),p&&(t(),u=!1)}catch{u=!1}finally{clearTimeout(f)}}clearTimeout(c),a.releaseLock(),i.cancel().then(null,()=>{})}}function DI(e){let t;try{t=e.clone()}catch{return}OI(t,()=>{On("fetch-body-resolved",{endTimestamp:bt()*1e3,response:e})})}function Xu(e,t){return!!e&&typeof e=="object"&&!!e[t]}function JE(e){return typeof e=="string"?e:e?Xu(e,"url")?e.url:e.toString?e.toString():"":""}function wI(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[i,a]=e;return{url:JE(i),method:Xu(a,"method")?String(a.method).toUpperCase():Fm(i)&&Xu(i,"method")?String(i.method).toUpperCase():"GET"}}const t=e[0];return{url:JE(t),method:Xu(t,"method")?String(t.method).toUpperCase():"GET"}}function xI(e){const[t,i]=e;try{if(typeof i=="object"&&i!==null&&"headers"in i&&i.headers)return new Headers(i.headers);if(Fm(t))return new Headers(t.headers)}catch{}}function II(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function CI(){return"npm"}function LI(){return!II()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function im(){return typeof window<"u"&&(!LI()||MI())}function MI(){return Ne.process?.type==="renderer"}const Ue=Ne;let am=0;function wb(){return am>0}function NI(){am++,setTimeout(()=>{am--})}function os(e,t={}){function i(c){return typeof c=="function"}if(!i(e))return e;try{const c=e.__sentry_wrapped__;if(c)return typeof c=="function"?c:e;if(Ym(e))return e}catch{return e}const a=function(...c){try{const u=c.map(f=>os(f,t));return e.apply(this,u)}catch(u){throw NI(),Cr(f=>{f.addEventProcessor(p=>(t.mechanism&&($p(p,void 0),ns(p,t.mechanism)),p.extra={...p.extra,arguments:c},p)),a_(u)}),u}};try{for(const c in e)Object.prototype.hasOwnProperty.call(e,c)&&(a[c]=e[c])}catch{}S0(a,e),Zt(e,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get(){return e.name}})}catch{}return a}function p_(){const e=gs(),{referrer:t}=Ue.document||{},{userAgent:i}=Ue.navigator||{},a={...t&&{Referer:t},...i&&{"User-Agent":i}};return{url:e,headers:a}}function m_(e,t){const i=__(e,t),a={type:zI(t),value:BI(t)};return i.length&&(a.stacktrace={frames:i}),a.type===void 0&&a.value===""&&(a.value="Unrecoverable error caught"),a}function kI(e,t,i,a){const u=Te()?.getOptions().normalizeDepth,f=GI(t),p={__serialized__:G0(t,u)};if(f)return{exception:{values:[m_(e,f)]},extra:p};const m={exception:{values:[{type:Pl(t)?t.constructor.name:a?"UnhandledRejection":"Error",value:HI(t,{isUnhandledRejection:a})}]},extra:p};
27if(i){const h=__(e,i);h.length&&(m.exception.values[0].stacktrace={frames:h})}return m}function xp(e,t){return{exception:{values:[m_(e,t)]}}}function __(e,t){const i=t.stacktrace||t.stack||"",a=UI(t),c=jI(t);try{return e(i,a,c)}catch{}return[]}const PI=/Minified React error #\d+;/i;function UI(e){return e&&PI.test(e.message)?1:0}function jI(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function xb(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function zI(e){const t=e?.name;return!t&&xb(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function BI(e){const t=e?.message;return xb(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?qE(t.error):qE(e):"No error message"}function VI(e,t,i,a){const c=i?.syntheticException||void 0,u=h_(e,t,c,a);return ns(u),u.level="error",i?.event_id&&(u.event_id=i.event_id),Qo(u)}function qI(e,t,i="info",a,c){const u=a?.syntheticException||void 0,f=sm(e,t,u,c);return f.level=i,a?.event_id&&(f.event_id=a.event_id),Qo(f)}function h_(e,t,i,a,c){let u;if(y0(t)&&t.error)return xp(e,t.error);if(uE(t)||tD(t)){const f=t;if("stack"in t)u=xp(e,t);else{const p=f.name||(uE(f)?"DOMError":"DOMException"),m=f.message?`${p}: ${f.message}`:p;u=sm(e,m,i,a),$p(u,m)}return"code"in f&&(u.tags={...u.tags,"DOMException.code":`${f.code}`}),u}return Nl(t)?xp(e,t):Io(t)||Pl(t)?(u=kI(e,t,i,c),ns(u,{synthetic:!0}),u):(u=sm(e,t,i,a),$p(u,`${t}`),ns(u,{synthetic:!0}),u)}function sm(e,t,i,a){const c={};if(a&&i){const u=__(e,i);u.length&&(c.exception={values:[{value:t,stacktrace:{frames:u}}]}),ns(c,{synthetic:!0})}if(kl(t)){const{__sentry_template_string__:u,__sentry_template_values__:f}=t;return c.logentry={message:u,params:f},c}return c.message=t,c}function HI(e,{isUnhandledRejection:t}){const i=oD(e),a=t?"promise rejection":"exception";return y0(e)?`Event \`ErrorEvent\` captured as ${a} with message \`${e.message}\``:Pl(e)?`Event \`${FI(e)}\` (type=${e.type}) captured as ${a}`:`Object captured as ${a} with keys: ${i}`}function FI(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function GI(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t];if(i instanceof Error)return i}}class YI extends Rx{constructor(t){const i=$I(t),a=Ue.SENTRY_SDK_SOURCE||CI();vb(i,"browser",["browser"],a),i._metadata?.sdk&&(i._metadata.sdk.settings={infer_ip:i.sendDefaultPii?"auto":"never",...i._metadata.sdk.settings}),super(i);const{sendDefaultPii:c,sendClientReports:u,enableLogs:f,_experiments:p,enableMetrics:m}=this._options,h=m??p?.enableMetrics??!0;Ue.document&&(u||f||h)&&Ue.document.addEventListener("visibilitychange",()=>{Ue.document.visibilityState==="hidden"&&(u&&this._flushOutcomes(),f&&dl(this),h&&o_(this))}),c&&this.on("beforeSendSession",zx)}eventFromException(t,i){return VI(this._options.stackParser,t,i,this._options.attachStacktrace)}eventFromMessage(t,i="info",a){return qI(this._options.stackParser,t,i,a,this._options.attachStacktrace)}_prepareEvent(t,i,a,c){return t.platform=t.platform||"javascript",super._prepareEvent(t,i,a,c)}}function $I(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Ue.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const Zi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ae=Ne,XI=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Ko=(e,t,i,a)=>{let c,u;return f=>{t.value>=0&&(f||a)&&(u=t.value-(c??0),(u||c===void 0)&&(c=t.value,t.delta=u,t.rating=XI(t.value,i),e(t)))}},Jo=(e=!0)=>{const t=Ae.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Es=()=>Jo()?.activationStart??0;function ui(e,t,i){Ae.document&&Ae.addEventListener(e,t,i)}function pl(e,t,i){Ae.document&&Ae.removeEventListener(e,t,i)}let Za=-1;const Ib=new Set,QI=()=>Ae.document?.visibilityState==="hidden"&&!Ae.document?.prerendering?0:1/0,Qu=e=>{if(KI(e)&&Za>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of Ib)t();isFinite(Za)||(Za=e.type==="visibilitychange"?e.timeStamp:0,pl("prerenderingchange",Qu,!0))}},Wo=()=>
27{if(Ae.document&&Za<0){const e=Es();Za=(Ae.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(i=>i.name==="hidden"&&i.startTime>e)[0]?.startTime)??QI(),ui("visibilitychange",Qu,!0),ui("pagehide",Qu,!0),ui("prerenderingchange",Qu,!0)}return{get firstHiddenTime(){return Za},onHidden(e){Ib.add(e)}}};function KI(e){return e.type==="pagehide"||Ae.document?.visibilityState==="hidden"}const JI=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Zo=(e,t=-1)=>{const i=Jo();let a="navigate";return i&&(Ae.document?.prerendering||Es()>0?a="prerender":Ae.document?.wasDiscarded?a="restore":i.type&&(a=i.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:JI(),navigationType:a}},Ip=new WeakMap;function g_(e,t){try{return Ip.get(e)||Ip.set(e,new t),Ip.get(e)}catch{return new t}}class ml{constructor(){ml.prototype.__init.call(this),ml.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const i=this._sessionEntries[0],a=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&i&&a&&t.startTime-a.startTime<1e3&&t.startTime-i.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const Ss=(e,t,i={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const a=new PerformanceObserver(c=>{Promise.resolve().then(()=>{t(c.getEntries())})});return a.observe({type:e,buffered:!0,...i}),a}}catch{}},y_=e=>{let t=!1;return()=>{t||(e(),t=!0)}},Bl=e=>{Ae.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},WI=[1800,3e3],ZI=(e,t={})=>{Bl(()=>{const i=Wo(),a=Zo("FCP");let c;const f=Ss("paint",p=>{for(const m of p)m.name==="first-contentful-paint"&&(f.disconnect(),m.startTime<i.firstHiddenTime&&(a.value=Math.max(m.startTime-Es(),0),a.entries.push(m),c(!0)))});f&&(c=Ko(e,a,WI,t.reportAllChanges))})},eC=[.1,.25],tC=(e,t={})=>{ZI(y_(()=>{const i=Zo("CLS",0);let a;const c=Wo(),u=g_(t,ml),f=m=>{for(const h of m)u._processEntry(h);u._sessionValue>
27i.value&&(i.value=u._sessionValue,i.entries=u._sessionEntries,a())},p=Ss("layout-shift",f);p&&(a=Ko(e,i,eC,t.reportAllChanges),c.onHidden(()=>{f(p.takeRecords()),a(!0)}),Ae?.setTimeout?.(a))}))};let Cb=0,Cp=1/0,Ou=0;const nC=e=>{e.forEach(t=>{t.interactionId&&(Cp=Math.min(Cp,t.interactionId),Ou=Math.max(Ou,t.interactionId),Cb=Ou?(Ou-Cp)/7+1:0)})};let om;const Lb=()=>om?Cb:performance.interactionCount||0,rC=()=>{"interactionCount"in performance||om||(om=Ss("event",nC,{type:"event",buffered:!0,durationThreshold:0}))},Lp=10;let Mb=0;const iC=()=>Lb()-Mb;class _l{constructor(){_l.prototype.__init.call(this),_l.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){Mb=Lb(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(iC()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const i=this._longestInteractionList.at(-1);let a=this._longestInteractionMap.get(t.interactionId);if(a||this._longestInteractionList.length<Lp||t.duration>i._latency){if(a?t.duration>a._latency?(a.entries=[t],a._latency=t.duration):t.duration===a._latency&&t.startTime===a.entries[0].startTime&&a.entries.push(t):(a={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(a.id,a),this._longestInteractionList.push(a)),this._longestInteractionList.sort((c,u)=>u._latency-c._latency),this._longestInteractionList.length>Lp){const c=this._longestInteractionList.splice(Lp);for(const u of c)this._longestInteractionMap.delete(u.id)}this._onAfterProcessingINPCandidate?.(a)}}}const Nb=e=>{const t=Ae.requestIdleCallback||Ae.setTimeout;Ae.document?.visibilityState==="hidden"?e():(e=y_(e),ui("visibilitychange",e,{once:!0,capture:!0}),ui("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),pl("visibilitychange",e,{capture:!0}),pl("pagehide",e,{capture:!0})}))},aC=[200,500],sC=40,oC=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const i=Wo();Bl(()=>{rC();const a=Zo("INP");let c;const u=g_(t,_l),f=m=>{Nb(()=>{for(const v of m)u._processEntry(v);const h=u._estimateP98LongestInteraction();h&&h._latency!==a.value&&(a.value=h._latency,a.entries=h.entries,c())})},p=Ss("event",f,{durationThreshold:t.durationThreshold??sC});c=Ko(e,a,aC,t.reportAllChanges),p&&(p.observe({type:"first-input",buffered:!0}),i.onHidden(()=>{f(p.takeRecords()),c(!0)}))})};class cC{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const uC=[2500,4e3],lC=(e,t={})=>{Bl(()=>{const i=Wo(),a=Zo("LCP");let c;const u=g_(t,cC),f=m=>{t.reportAllChanges||(m=m.slice(-1));for(const h of m)u._processEntry(h),h.startTime<i.firstHiddenTime&&(a.value=Math.max(h.startTime-Es(),0),a.entries=[h],c())},p=Ss("largest-contentful-paint",f);if(p){c=Ko(e,a,uC,t.reportAllChanges);const m=y_(()=>{f(p.takeRecords()),p.disconnect(),c(!0)}),h=v=>{v.isTrusted&&(Nb(m),pl(v.type,h,{capture:!0}))};for(const v of["keydown","click","visibilitychange"])ui(v,h,{capture:!0})}})},dC=[800,1800],cm=e=>{Ae.document?.prerendering?Bl(()=>cm(e)):Ae.document?.readyState!=="complete"?addEventListener("load",()=>cm(e),!0):setTimeout(e)},fC=(e,t={})=>{const i=Zo("TTFB"),a=Ko(e,i,dC,t.reportAllChanges);cm(()=>{const c=Jo();c&&(i.value=Math.max(c.responseStart-Es(),0),i.entries=[c],a(!0))})},To={},hl={};let kb,Pb,Ub,jb;function v_(e,t=!1){return Vl("cls",e,mC,kb,t)}function E_(e,t=!1){return Vl("lcp",e,_C,Pb,t)}function pC(e){return Vl("ttfb",e,hC,Ub)}function zb(e){return Vl("inp",e,gC,jb)}function ea(e,t){return Bb(e,t),hl[e]||(yC(e),hl[e]=!0),Vb(e,t)}function ec(e,t){const i=To[e];if(i?.length)for(const a of i)try{a(t)}catch(c){Zi&&G.error(`Error while triggering instrumentation handler.
28Type: ${e}
29Name: ${Tr(a)}
30Error:`,c)}}function mC(){return tC(e=>{ec("cls",{metric:e}),kb=e},{reportAllChanges:!0})}function _C(){return lC(e=>{ec("lcp",{metric:e}),Pb=e},{reportAllChanges:!0})}function hC(){return fC(e=>{ec("ttfb",{metric:e}),Ub=e})}function gC(){return oC(e=>{ec("inp",{metric:e}),jb=e})}function Vl(e,t,i,a,c=!1){Bb(e,t);let u;return hl[e]||(u=i(),hl[e]=!0),a&&t({metric:a}),Vb(e,t,c?u:void 0)}function yC(e){const t={};e==="event"&&(t.durationThreshold=0),Ss(e,i=>{ec(e,{entries:i})},t)}function Bb(e,t){To[e]=To[e]||[],To[e].push(t)}function Vb(e,t,i){return()=>{i&&i();const a=To[e];if(!a)return;const c=a.indexOf(t);c!==-1&&a.splice(c,1)}}function vC(e){return"duration"in e}const EC=e=>{const t=i=>{(i.type==="pagehide"||Ae.document?.visibilityState==="hidden")&&e(i)};ui("visibilitychange",t,{capture:!0,once:!0}),ui("pagehide",t,{capture:!0,once:!0})};function Mp(e){return typeof e=="number"&&isFinite(e)}function pi(e,t,i,{...a}){const c=Ve(e).start_timestamp;return c&&c>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),jl(e,()=>{const u=vs({startTime:t,...a});return u&&u.end(i),u})}function S_(e){const t=Te();if(!t)return;const{name:i,transaction:a,attributes:c,startTime:u}=e,{release:f,environment:p,sendDefaultPii:m}=t.getOptions(),v=t.getIntegrationByName("Replay")?.getReplayId(),g=qe(),b=g.getUser(),T=b!==void 0?b.email||b.id||b.ip_address:void 0;let R;try{R=g.getScopeData().contexts.profile.profile_id}catch{}const x={release:f,environment:p,user:T||void 0,profile_id:R||void 0,replay_id:v||void 0,transaction:a,"user_agent.original":Ae.navigator?.userAgent,"client.address":m?"{{auto}}":void 0,...c};return vs({name:i,attributes:x,startTime:u,experimental:{standalone:!0}})}function tc(){return Ae.addEventListener&&Ae.performance}function dt(e){return e/1e3}function SC(e){let t="unknown",i="unknown",a="";for(const c of e){if(c==="/"){[t,i]=e.split("/");break}if(!isNaN(Number(c))){t=a==="h"?"http":a,i=e.split(a)[1];break}a+=c}
30return a===e&&(t=a),{name:t,version:i}}function qb(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Hb(e,t){let i,a=!1;function c(p){!a&&i&&t(p,i),a=!0}EC(()=>{c("pagehide")});const u=e.on("beforeStartNavigationSpan",(p,m)=>{m?.isRedirect||(c("navigation"),u(),f())}),f=e.on("afterStartPageLoadSpan",p=>{i=p.spanContext().spanId,f()})}function bC(e){let t=0,i;if(!qb("layout-shift"))return;const a=v_(({metric:c})=>{const u=c.entries[c.entries.length-1];u&&(t=c.value,i=u)},!0);Hb(e,(c,u)=>{TC(t,i,u,c),a()})}function TC(e,t,i,a){Zi&&G.log(`Sending CLS span (${e})`);const c=t?dt((en()||0)+t.startTime):bt(),u=qe().getScopeData().transactionName,f=t?Wt(t.sources[0]?.node):"Layout shift",p={[Dt]:"auto.http.browser.cls",[Rr]:"ui.webvital.cls",[ys]:0,"sentry.pageload.span_id":i,"sentry.report_event":a};t?.sources&&t.sources.forEach((h,v)=>{p[`cls.source.${v+1}`]=Wt(h.node)});const m=S_({name:f,transaction:u,attributes:p,startTime:c});m&&(m.addEvent("cls",{[Yo]:"",[$o]:e}),m.end(c))}function AC(e){let t=0,i;if(!qb("largest-contentful-paint"))return;const a=E_(({metric:c})=>{const u=c.entries[c.entries.length-1];u&&(t=c.value,i=u)},!0);Hb(e,(c,u)=>{RC(t,i,u,c),a()})}function RC(e,t,i,a){Zi&&G.log(`Sending LCP span (${e})`);const c=dt((en()||0)+(t?.startTime||0)),u=qe().getScopeData().transactionName,f=t?Wt(t.element):"Largest contentful paint",p={[Dt]:"auto.http.browser.lcp",[Rr]:"ui.webvital.lcp",[ys]:0,"sentry.pageload.span_id":i,"sentry.report_event":a};t&&(t.element&&(p["lcp.element"]=Wt(t.element)),t.id&&(p["lcp.id"]=t.id),t.url&&(p["lcp.url"]=t.url),t.loadTime!=null&&(p["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(p["lcp.renderTime"]=t.renderTime),t.size!=null&&(p["lcp.size"]=t.size));const m=S_({name:f,transaction:u,attributes:p,startTime:c});m&&(m.addEvent("lcp",{[Yo]:"millisecond",[$o]:e}),m.end(c))}function An(e){return e&&((en()||performance.timeOrigin)+e)/1e3}function Fb(e){const t={};if(e.nextHopProtocol!=null){const{name:i,version:a}=SC(e.nextHopProtocol);t["network.protocol.version"]=a,t["network.protocol.name"]=i}return en()||tc()?.timeOrigin?OC({...t,"http.request.redirect_start":An(e.redirectStart),"http.request.redirect_end":An(e.redirectEnd),"http.request.worker_start":An(e.workerStart),"http.request.fetch_start":An(e.fetchStart),"http.request.domain_lookup_start":An(e.domainLookupStart),"http.request.domain_lookup_end":An(e.domainLookupEnd),"http.request.connect_start":An(e.connectStart),"http.request.secure_connection_start":An(e.secureConnectionStart),"http.request.connection_end":An(e.connectEnd),"http.request.request_start":An(e.requestStart),"http.request.response_start":An(e.responseStart),"http.request.response_end":An(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function OC(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const DC=2147483647;let WE=0,Mn={},Kt,gl;function wC({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:i}){const a=tc();if(a&&en()){a.mark&&Ae.performance.mark("sentry-tracing-init");const c=t?AC(i):MC(),u=NC(),f=e?bC(i):LC();return()=>{c?.(),u(),f?.()}}return()=>{}}function xC(){ea("longtask",({entries:e})=>{const t=Pt();if(!t)return;const{op:i,start_timestamp:a}=Ve(t);for(const c of e){const u=dt(en()+c.startTime),f=dt(c.duration);i==="navigation"&&a&&u<a||pi(t,u,u+f,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[Dt]:"auto.ui.browser.metrics"}})}})}function IC(){new PerformanceObserver(t=>{const i=Pt();if(i)for(const a of t.getEntries()){if(!a.scripts[0])continue;const c=dt(en()+a.startTime),{start_timestamp:u,op:f}=Ve(i);if(f==="navigation"&&u&&c<u)continue;const p=dt(a.duration),m={[Dt]:"auto.ui.browser.metrics"},h=a.scripts[0],{invoker:v,invokerType:g,sourceURL:b,sourceFunctionName:T,sourceCharPosition:R}=h;m["browser.script.invoker"]=v,m["browser.script.invoker_type"]=g,b&&(m["code.filepath"]=b),T&&(m["code.function"]=T),R!==-1&&(m["browser.script.source_char_position"]=R),pi(i,c,c+p,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:m})}}).observe({type:"long-animation-frame",buffered:!0})}function CC(){ea("event",({entries:e})=>{const t=Pt();if(t){for(const i of e)if(i.name==="click"){const a=dt(en()+i.startTime),c=dt(i.duration),u={name:Wt(i.target),op:`ui.interaction.${i.name}`,startTime:a,attributes:{[Dt]:"auto.ui.browser.metrics"}},f=E0(i.target);f&&(u.attributes["ui.component_name"]=f),pi(t,a,a+c,u)}}})}function LC(){return v_(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Mn.cls={value:e.value,unit:""},gl=t)},!0)}function MC(){return E_(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Mn.lcp={value:e.value,unit:"millisecond"},Kt=t)},!0)}function NC(){return pC(({metric:e})=>{e.entries[e.entries.length-1]&&(Mn.ttfb={value:e.value,unit:"millisecond"})})}function kC(e,t){const i=tc(),a=en();if(!i?.getEntries||!a)return;const c=dt(a),u=i.getEntries(),{op:f,start_timestamp:p}=Ve(e);
30u.slice(WE).forEach(m=>{const h=dt(m.startTime),v=dt(Math.max(0,m.duration));if(!(f==="navigation"&&p&&c+h<p))switch(m.entryType){case"navigation":{zC(e,m,c);break}case"mark":case"paint":case"measure":{UC(e,m,h,v,c,t.ignorePerformanceApiSpans);const g=Wo(),b=m.startTime<g.firstHiddenTime;m.name==="first-paint"&&b&&(Mn.fp={value:m.startTime,unit:"millisecond"}),m.name==="first-contentful-paint"&&b&&(Mn.fcp={value:m.startTime,unit:"millisecond"});break}case"resource":{qC(e,m,m.name,h,v,c,t.ignoreResourceSpans);break}}}),WE=Math.max(u.length-1,0),HC(e),f==="pageload"&&(YC(Mn),t.recordClsOnPageloadSpan||delete Mn.cls,t.recordLcpOnPageloadSpan||delete Mn.lcp,Object.entries(Mn).forEach(([m,h])=>{gw(m,h.value,h.unit)}),e.setAttribute("performance.timeOrigin",c),e.setAttribute("performance.activationStart",Es()),FC(e,t)),Kt=void 0,gl=void 0,Mn={}}function PC(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function UC(e,t,i,a,c,u){if(PC(t)||["mark","measure"].includes(t.entryType)&&vr(t.name,u))return;const f=Jo(!1),p=dt(f?f.requestStart:0),m=c+Math.max(i,p),h=c+i,v=h+a,g={[Dt]:"auto.resource.browser.metrics"};m!==h&&(g["sentry.browser.measure_happened_before_request"]=!0,g["sentry.browser.measure_start_time"]=m),jC(g,t),m<=v&&pi(e,m,v,{name:t.name,op:t.entryType,attributes:g})}function jC(e,t){try{const i=t.detail;if(!i)return;if(typeof i=="object"){for(const[a,c]of Object.entries(i))if(c&&ts(c))e[`sentry.browser.measure.detail.${a}`]=c;else if(c!==void 0)try{e[`sentry.browser.measure.detail.${a}`]=JSON.stringify(c)}catch{}return}if(ts(i)){e["sentry.browser.measure.detail"]=i;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(i)}catch{}}catch{}}function zC(e,t,i){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(a=>{Du(e,t,a,i)}),Du(e,t,"secureConnection",i,"TLS/SSL"),Du(e,t,"fetch",i,"cache"),Du(e,t,"domainLookup",i,"DNS"),VC(e,t,i)}function Du(e,t,i,a,c=i){const u=BC(i),f=t[u],p=t[`${i}Start`];!p||!f||pi(e,a+dt(p),a+dt(f),{op:`browser.${c}`,name:t.name,attributes:{[Dt]:"auto.ui.browser.metrics",...i==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function BC(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function VC(e,t,i){const a=i+dt(t.requestStart),c=i+dt(t.responseEnd),u=i+dt(t.responseStart);t.responseEnd&&(pi(e,a,c,{op:"browser.request",name:t.name,attributes:{[Dt]:"auto.ui.browser.metrics"}}),pi(e,u,c,{op:"browser.response",name:t.name,attributes:{[Dt]:"auto.ui.browser.metrics"}}))}function qC(e,t,i,a,c,u,f){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const p=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(f?.includes(p))return;const m={[Dt]:"auto.resource.browser.metrics"},h=Ki(i);h.protocol&&(m["url.scheme"]=h.protocol.split(":").pop()),h.host&&(m["server.address"]=h.host),m["url.same_origin"]=i.includes(Ae.location.origin),GC(t,m,[["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 v={...m,...Fb(t)},g=u+a,b=g+c;pi(e,g,b,{name:i.replace(Ae.location.origin,""),op:p,attributes:v})}function HC(e){const t=Ae.navigator;if(!t)return;const i=t.connection;i&&(i.effectiveType&&e.setAttribute("effectiveConnectionType",i.effectiveType),i.type&&e.setAttribute("connectionType",i.type),Mp(i.rtt)&&(Mn["connection.rtt"]={value:i.rtt,unit:"millisecond"})),Mp(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Mp(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function FC(e,t){Kt&&t.recordLcpOnPageloadSpan&&(Kt.element&&e.setAttribute("lcp.element",Wt(Kt.element)),Kt.id&&e.setAttribute("lcp.id",Kt.id),Kt.url&&e.setAttribute("lcp.url",Kt.url.trim().slice(0,200)),Kt.loadTime!=null&&e.setAttribute("lcp.loadTime",Kt.loadTime),Kt.renderTime!=null&&e.setAttribute("lcp.renderTime",Kt.renderTime),e.setAttribute("lcp.size",Kt.size)),gl?.sources&&t.recordClsOnPageloadSpan&&gl.sources.forEac
30h((i,a)=>e.setAttribute(`cls.source.${a+1}`,Wt(i.node)))}function GC(e,t,i){i.forEach(([a,c])=>{const u=e[a];u!=null&&(typeof u=="number"&&u<DC||typeof u=="string")&&(t[c]=u)})}function YC(e){const t=Jo(!1);if(!t)return;const{responseStart:i,requestStart:a}=t;a<=i&&(e["ttfb.requestTime"]={value:i-a,unit:"millisecond"})}function $C(){return tc()&&en()?ea("element",XC):()=>{}}const XC=({entries:e})=>{const t=Pt(),i=t?kt(t):void 0,a=i?Ve(i).description:qe().getScopeData().transactionName;e.forEach(c=>{const u=c;if(!u.identifier)return;const f=u.name,p=u.renderTime,m=u.loadTime,[h,v]=m?[dt(m),"load-time"]:p?[dt(p),"render-time"]:[bt(),"entry-emission"],g=f==="image-paint"?dt(Math.max(0,(p??0)-(m??0))):0,b={[Dt]:"auto.ui.browser.elementtiming",[Rr]:"ui.elementtiming",[Rn]:"component","sentry.span_start_time_source":v,"sentry.transaction_name":a,"element.id":u.id,"element.type":u.element?.tagName?.toLowerCase()||"unknown","element.size":u.naturalWidth&&u.naturalHeight?`${u.naturalWidth}x${u.naturalHeight}`:void 0,"element.render_time":p,"element.load_time":m,"element.url":u.url||void 0,"element.identifier":u.identifier,"element.paint_type":f};bw({name:`element[${u.identifier}]`,attributes:b,startTime:h,onlyIfParent:!0},T=>{T.end(h+g)})})},QC=1e3;let ZE,um,lm;function Gb(e){hi("dom",e),gi("dom",KC)}function KC(){if(!Ae.document)return;const e=On.bind(null,"dom"),t=eS(e,!0);Ae.document.addEventListener("click",t,!1),Ae.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(i=>{const c=Ae[i]?.prototype;c?.hasOwnProperty?.("addEventListener")&&(Jt(c,"addEventListener",function(u){return function(f,p,m){if(f==="click"||f=="keypress")try{const h=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},v=h[f]=h[f]||{refCount:0};if(!v.handler){const g=eS(e);v.handler=g,u.call(this,f,g,m)}v.refCount++}catch{}return u.call(this,f,p,m)}}),Jt(c,"removeEventListener",function(u){return function(f,p,m){if(f==="click"||f=="keypress")try{const h=this.__sentry_instrumentation_handlers__||{},v=h[f];v&&(v.refCount--,v.refCount<=0&&(u.call(this,f,v.handler,m),v.handler=void 0,delete h[f]),Object.keys(h).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return u.call(this,f,p,m)}}))})}function JC(e){if(e.type!==um)return!1;try{if(!e.target||e.target._sentryId!==lm)return!1}catch{}return!0}function WC(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function eS(e,t=!1){return i=>{if(!i||i._sentryCaptured)return;const a=ZC(i);if(WC(i.type,a))return;Zt(i,"_sentryCaptured",!0),a&&!a._sentryId&&Zt(a,"_sentryId",fn());
30const c=i.type==="keypress"?"input":i.type;JC(i)||(e({event:i,name:c,global:t}),um=i.type,lm=a?a._sentryId:void 0),clearTimeout(ZE),ZE=Ae.setTimeout(()=>{lm=void 0,um=void 0},QC)}}function ZC(e){try{return e.target}catch{return null}}let wu;function ql(e){const t="history";hi(t,e),gi(t,eL)}function eL(){if(Ae.addEventListener("popstate",()=>{const t=Ae.location.href,i=wu;if(wu=t,i===t)return;On("history",{from:i,to:t})}),!bI())return;function e(t){return function(...i){const a=i.length>2?i[2]:void 0;if(a){const c=wu,u=tL(String(a));if(wu=u,c===u)return t.apply(this,i);On("history",{from:c,to:u})}return t.apply(this,i)}}Jt(Ae.history,"pushState",e),Jt(Ae.history,"replaceState",e)}function tL(e){try{return new URL(e,Ae.location.origin).toString()}catch{return e}}const Ku={};function Yb(e){const t=Ku[e];if(t)return t;let i=Ae[e];if(rm(i))return Ku[e]=i.bind(Ae);const a=Ae.document;if(a&&typeof a.createElement=="function")try{const c=a.createElement("iframe");c.hidden=!0,a.head.appendChild(c);const u=c.contentWindow;u?.[e]&&(i=u[e]),a.head.removeChild(c)}catch(c){Zi&&G.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,c)}return i&&(Ku[e]=i.bind(Ae))}function nL(e){Ku[e]=void 0}function nc(...e){return Yb("setTimeout")(...e)}const Gi="__sentry_xhr_v3__";function $b(e){hi("xhr",e),gi("xhr",rL)}function rL(){if(!Ae.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,i,a){const c=new Error,u=bt()*1e3,f=gr(a[0])?a[0].toUpperCase():void 0,p=iL(a[1]);if(!f||!p)return t.apply(i,a);i[Gi]={method:f,url:p,request_headers:{}},f==="POST"&&p.match(/sentry_key/)&&(i.__sentry_own_request__=!0);const m=()=>{const h=i[Gi];if(h&&i.readyState===4){try{h.status_code=i.status}catch{}const v={endTimestamp:bt()*1e3,startTimestamp:u,xhr:i,virtualError:c};On("xhr",v)}};return"onreadystatechange"in i&&typeof i.onreadystatechange=="function"?i.onreadystatechange=new Proxy(i.onreadystatechange,{apply(h,v,g){return m(),h.apply(v,g)}}):i.addEventListener("readystatechange",m),i.setRequestHeader=new Proxy(i.setRequestHeader,{apply(h,v,g){const[b,T]=g,R=v[Gi];return R&&gr(b)&&gr(T)&&(R.request_headers[b.toLowerCase()]=T),h.apply(v,g)}}),t.apply(i,a)}}),e.send=new Proxy(e.send,{apply(t,i,a){const c=i[Gi];if(!c)return t.apply(i,a);a[0]!==void 0&&(c.body=a[0]);const u={startTimestamp:bt()*1e3,xhr:i};return On("xhr",u),t.apply(i,a)}})}function iL(e){if(gr(e))return e;try{return e.toString()}catch{}}const aL=Symbol.for("sentry__originalRequestBody");function Xb(e){return new URLSearchParams(e).toString()}function Qb(e,t=G){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Xb(e)];if(!e)return[void 0]}catch(i){return Zi&&t.error(i,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Zi&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Kb(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const i=e[0][aL];return i!==void 0?i:void 0}}function Jb(e){let t;try{t=e.getAllResponseHeaders()}catch(i){return Zi&&G.error(i,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
31`).reduce((i,a)=>{const[c,u]=a.split(": ");return u&&(i[c.toLowerCase()]=u),i},{}):{}}const Np=[],Ju=new Map,Ha=new Map,sL=60;function oL(){if(tc()&&en()){const t=cL();return()=>{t()}}return()=>{}}const dm={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 cL(){return zb(uL)}const uL=({metric:e})=>{if(e.value==null)return;const t=dt(e.value);if(t>sL)return;const i=e.entries.find(R=>R.duration===e.value&&dm[R.name]);if(!i)return;const{interactionId:a}=i,c=dm[i.name],u=dt(en()+i.startTime),f=Pt(),p=f?kt(f):void 0,m=a!=null?Ju.get(a):void 0,h=m?.span||p,v=h?Ve(h).description:qe().getScopeData().transactionName,g=m?.elementName||Wt(i.target),b={[Dt]:"auto.http.browser.inp",[Rr]:`ui.interaction.${c}`,[ys]:i.duration},T=S_({name:g,transaction:v,attributes:b,startTime:u});T&&(T.addEvent("inp",{[Yo]:"millisecond",[$o]:e.value}),T.end(u+t))};function lL(){const e=Object.keys(dm);im()&&e.forEach(c=>{Ae.addEventListener(c,t,{capture:!0,passive:!0})});function t(c){const u=c.target;if(!u)return;const f=Wt(u),p=Math.round(c.timeStamp);if(Ha.set(p,f),Ha.size>50){const m=Ha.keys().next().value;m!==void 0&&Ha.delete(m)}}function i(c){const u=Math.round(c.startTime);let f=Ha.get(u);if(!f)for(let p=-5;p<=5;p++){const m=Ha.get(u+p);if(m){f=m;break}}return f||"<unknown>"}const a=({entries:c})=>{const u=Pt(),f=u&&kt(u);
31c.forEach(p=>{if(!vC(p))return;const m=p.interactionId;if(m==null||Ju.has(m))return;const h=p.target?Wt(p.target):i(p);if(Np.length>10){const v=Np.shift();Ju.delete(v)}Np.push(m),Ju.set(m,{span:f,elementName:h})})};ea("event",a),ea("first-input",a)}const dL=40;function fL(e,t=Yb("fetch")){let i=0,a=0;async function c(u){const f=u.body.length;i+=f,a++;const p={body:u.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:i<=6e4&&a<15,...e.fetchOptions};try{const m=await t(e.url,p);return{statusCode:m.status,headers:{"x-sentry-rate-limits":m.headers.get("X-Sentry-Rate-Limits"),"retry-after":m.headers.get("Retry-After")}}}catch(m){throw nL("fetch"),m}finally{i-=f,a--}}return Ex(e,c,l_(e.bufferSize||dL))}const pn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,pL=10,mL=20,_L=30,hL=40,gL=50;function cs(e,t,i,a){const c={filename:e,function:t==="<anonymous>"?Gn:t,in_app:!0};return i!==void 0&&(c.lineno=i),a!==void 0&&(c.colno=a),c}const yL=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,vL=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,EL=/\((\S*)(?::(\d+))(?::(\d+))\)/,SL=/at (.+?) ?\(data:(.+?),/,bL=e=>{const t=e.match(SL);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const i=yL.exec(e);if(i){const[,c,u,f]=i;return cs(c,Gn,+u,+f)}const a=vL.exec(e);if(a){if(a[2]?.indexOf("eval")===0){const p=EL.exec(a[2]);p&&(a[2]=p[1],a[3]=p[2],a[4]=p[3])}const[u,f]=Wb(a[1]||Gn,a[2]);return cs(f,u,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},TL=[_L,bL],AL=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,RL=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,OL=e=>{const t=AL.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const u=RL.exec(t[3]);u&&(t[1]=t[1]||"eval",t[3]=u[1],t[4]=u[2],t[5]="")}let a=t[3],c=t[1]||Gn;return[c,a]=Wb(c,a),cs(a,c,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},DL=[gL,OL],wL=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,xL=e=>{const t=wL.exec(e);return t?cs(t[2],t[1]||Gn,+t[3],t[4]?+t[4]:void 0):void 0},HB=[hL,xL],IL=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,CL=e=>{const t=IL.exec(e);return t?cs(t[2],t[3]||Gn,+t[1]):void 0},FB=[pL,CL],LL=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,ML=e=>{const t=LL.exec(e);return t?cs(t[5],t[3]||t[4]||Gn,+t[1],+t[2]):void 0},GB=[mL,ML],NL=[TL,DL],kL=p0(...NL),Wb=(e,t)=>{const i=e.indexOf("safari-extension")!==-1,a=e.indexOf("safari-web-extension")!==-1;return i||a?[e.indexOf("@")!==-1?e.split("@")[0]:Gn,i?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},xu=1024,PL="Breadcrumbs",UL=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:PL,setup(i){t.console&&aI(VL(i)),t.dom&&Gb(BL(i,t.dom)),t.xhr&&$b(qL(i)),t.fetch&&Ob(HL(i)),t.history&&ql(FL(i)),t.sentry&&i.on("beforeSendEvent",zL(i))}}}),jL=UL;function zL(e){return function(i){Te()===e&&fi({category:`sentry.${i.type==="transaction"?"transaction":"event"}`,event_id:i.event_id,level:i.level,message:Fi(i)},{event:i})}}function BL(e,t){return function(a){if(Te()!==e)return;let c,u,f=typeof t=="object"?t.serializeAttribute:void 0,p=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;p&&p>xu&&(pn&&G.warn(`\`dom.maxStringLength\` cannot exceed ${xu}, but a value of ${p} was configured. Sentry will use ${xu} instead.`),p=xu),typeof f=="string"&&(f=[f]);try{const h=a.event,v=GL(h)?h.target:h;c=Wt(v,{keyAttrs:f,maxStringLength:p}),u=E0(v)}catch{c="<unknown>"}if(c.length===0)return;const m={category:`ui.${a.name}`,message:c};u&&(m.data={"ui.component_name":u}),fi(m,{event:a.event,name:a.name,global:a.global})}}function VL(e){return function(i){if(Te()!==e)return;const a={category:"console",data:{arguments:i.args,logger:"console"},level:bb(i.level),message:fE(i.args," ")};if(i.level==="assert")if(i.args[0]===!1)a.message=`Assertion failed: ${fE(i.args.slice(1)," ")||"console.assert"}`,a.data.arguments=i.args.slice(1);else return;fi(a,{input:i.args,level:i.level})}}function qL(e){return function(i){if(Te()!==e)return;const{startTimestamp:a,endTimestamp:c}=i,u=i.xhr[Gi];if(!a||!c||!u)return;const{method:f,url:p,status_code:m,body:h}=u,v={method:f,url:p,status_code:m},g={xhr:i.xhr,input:h,startTimestamp:a,endTimestamp:c},b={category:"xhr",data:v,type:"http",level:Rb(m)};e.emit("beforeOutgoingRequestBreadcrumb",b,g),fi(b,g)}}function HL(e){return function(i){if(Te()!==e)return;const{startTimestamp:a,endTimestamp:c}=i;
31if(c&&!(i.fetchData.url.match(/sentry_key/)&&i.fetchData.method==="POST"))if(i.fetchData.method,i.fetchData.url,i.error){const u=i.fetchData,f={data:i.error,input:i.args,startTimestamp:a,endTimestamp:c},p={category:"fetch",data:u,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",p,f),fi(p,f)}else{const u=i.response,f={...i.fetchData,status_code:u?.status};i.fetchData.request_body_size,i.fetchData.response_body_size,u?.status;const p={input:i.args,response:u,startTimestamp:a,endTimestamp:c},m={category:"fetch",data:f,type:"http",level:Rb(f.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",m,p),fi(m,p)}}}function FL(e){return function(i){if(Te()!==e)return;let a=i.from,c=i.to;const u=Ki(Ue.location.href);let f=a?Ki(a):void 0;const p=Ki(c);f?.path||(f=u),u.protocol===p.protocol&&u.host===p.host&&(c=p.relative),u.protocol===f.protocol&&u.host===f.host&&(a=f.relative),fi({category:"navigation",data:{from:a,to:c}})}}function GL(e){return!!e&&!!e.target}const YL=["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"],$L="BrowserApiErrors",XL=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:$L,setupOnce(){t.setTimeout&&Jt(Ue,"setTimeout",tS),t.setInterval&&Jt(Ue,"setInterval",tS),t.requestAnimationFrame&&Jt(Ue,"requestAnimationFrame",KL),t.XMLHttpRequest&&"XMLHttpRequest"in Ue&&Jt(XMLHttpRequest.prototype,"send",JL);const i=t.eventTarget;i&&(Array.isArray(i)?i:YL).forEach(c=>WL(c,t))}}}),QL=XL;function tS(e){return function(...t){const i=t[0];return t[0]=os(i,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Tr(e)}`}}),e.apply(this,t)}}function KL(e){return function(t){return e.apply(this,[os(t,{mechanism:{data:{handler:Tr(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function JL(e){return function(...t){const i=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(c=>{c in i&&typeof i[c]=="function"&&Jt(i,c,function(u){const f={mechanism:{data:{handler:Tr(u)},handled:!1,type:`auto.browser.browserapierrors.xhr.${c}`}},p=Ym(u);return p&&(f.mechanism.data.handler=Tr(p)),os(u,f)})}),e.apply(this,t)}}function WL(e,t){const a=Ue[e]?.prototype;a?.hasOwnProperty?.("addEventListener")&&(Jt(a,"addEventListener",function(c){return function(u,f,p){try{ZL(f)&&(f.handleEvent=os(f.handleEvent,{mechanism:{data:{handler:Tr(f),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&eM(this,u,f),c.apply(this,[u,os(f,{mechanism:{data:{handler:Tr(f),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),p])}}),Jt(a,"removeEventListener",function(c){return function(u,f,p){try{const m=f.__sentry_wrapped__;m&&c.call(this,u,m,p)}catch{}return c.call(this,u,f,p)}}))}function ZL(e){return typeof e.handleEvent=="function"}function eM(e,t,i){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,i)}const tM=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof Ue.document>"u"){pn&&G.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}LE({ignoreDuration:!0}),Rp();const i=_t();let a=i.getUser();i.addScopeListener(c=>{const u=c.getUser();(a?.id!==u?.id||a?.ip_address!==u?.ip_address)&&(Rp(),a=u)}),t==="route"&&ql(({from:c,to:u})=>{c!==u&&(LE({ignoreDuration:!0}),Rp())})}}},nM="CultureContext",rM=(()=>({name:nM,preprocessEvent(e){const t=aM();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})}})),iM=rM;function aM(){try{const e=Ue.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const sM="GlobalHandlers",oM=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:sM,setupOnce(){Error.stackTraceLimit=50},setup(i){t.onerror&&(uM(i),nS("onerror")),t.onunhandledrejection&&(lM(i),nS("onunhandledrejection"))}}}),cM=oM;function uM(e){_0(t=>{const{stackParser:i,attachStacktrace:a}=Zb();if(Te()!==e||wb())return;const{msg:c,url:u,line:f,column:p,error:m}=t,h=pM(h_(i,m||c,void 0,a,!1),u,f,p);h.level="error",Z0(h,{originalException:m,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function lM(e){h0(t=>{const{stackParser:i,attachStacktrace:a}=Zb();if(Te()!==e||wb())return;const c=dM(t),u=ts(c)?fM(c):h_(i,c,void 0,a,!0);u.level="error",Z0(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function dM(e){if(ts(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function fM(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function pM(e,t,i,a){const c=e.exception=e.exception||{},u=c.values=c.values||[],f=u[0]=u[0]||{},p=f.stacktrace=f.stacktrace||{},m=p.frames=p.frames||[],h=a,v=i,g=mM(t)??gs();return m.length===0&&m.push({colno:h,filename:g,function:Gn,in_app:!0,lineno:v}),e}function nS(e){pn&&G.log(`Global Handler attached: ${e}`)}function Zb(){return Te()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function mM(e){if(!(!gr(e)||e.length===0))return e.startsWith("data:")?`<${ci(e,!1)}>`:e}const _M=()=>({name:"HttpContext",preprocessEvent(e){if(!Ue.navigator&&!Ue.location&&!Ue.document)return;const t=p_(),i={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:i}}}),hM="cause",gM=5,yM="LinkedErrors",vM=((e={})=>{const t=e.limit||gM,i=e.key||hM;return{name:yM,preprocessEvent(a,c,u){const f=u.getOptions();iI(m_,f.stackParser,i,t,a,c)}}}),EM=vM;function SM(){return bM()?(pn&&_i(()=>{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 bM(){if(typeof Ue.window>"u")return!1;const e=Ue;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const i=gs(),a=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Ue===Ue.top&&a.some(u=>i.startsWith(`${u}://`)))}function TM(e){return[Kx(),Yx(),_I(),QL(),jL(),cM(),EM(),uI(),_M(),iM(),tM()]}function AM(e={}){const t=!e.skipBrowserExtensionCheck&&SM();let i=e.defaultIntegrations==null?TM():e.defaultIntegrations;const a={...e,enabled:t?!1:e.enabled,stackParser:KO(e.stackParser||kL),integrations:ex({integrations:e.integrations,defaultIntegrations:i}),transport:e.transport||fL};return Cx(YI,a)}function YB(){}function $B(e){e()}const tt=Ne,b_="sentryReplaySession",RM="replay_event",T_="Unable to send Replay",OM=3e5,DM=9e5,wM=5e3,xM=5500,IM=6e4,CM=5e3,LM=3,rS=15e4,Iu=5e3,MM=3e3,NM=300,A_=2e7,kM=4999,PM=5e4,iS=36e5;
31var UM=Object.defineProperty,jM=(e,t,i)=>t in e?UM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,aS=(e,t,i)=>jM(e,typeof t!="symbol"?t+"":t,i),St=(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))(St||{});function zM(e){return e.nodeType===e.ELEMENT_NODE}function Ao(e){return e?.host?.shadowRoot===e}function Ro(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function BM(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 VM(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const i=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?i.push("layer"):e.layerName&&i.push(`layer(${e.layerName})`),e.supportsText&&i.push(`supports(${e.supportsText})`),e.media.length&&i.push(e.media.mediaText),i.join(" ")+";"}function yl(e){try{const t=e.rules||e.cssRules;return t?BM(Array.from(t,eT).join("")):null}catch{return null}}function qM(e){let t="";for(let i=0;i<e.style.length;i++){const a=e.style,c=a[i],u=a.getPropertyPriority(c);t+=`${c}:${a.getPropertyValue(c)}${u?" !important":""};`}return`${e.selectorText} { ${t} }`}function eT(e){let t;if(FM(e))try{t=yl(e.styleSheet)||VM(e)}catch{}else if(GM(e)){let i=e.cssText;const a=e.selectorText.includes(":"),c=typeof e.style.all=="string"&&e.style.all;if(c&&(i=qM(e)),a&&(i=HM(i)),a||c)return i}return t||e.cssText}function HM(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function FM(e){return"styleSheet"in e}function GM(e){return"selectorText"in e}class tT{constructor(){aS(this,"idNodeMap",new Map),aS(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const i=this.getId(t);this.idNodeMap.delete(i),t.childNodes&&t.childNodes.forEach(a=>this.removeNodeFromMap(a))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,i){const a=i.id;this.idNodeMap.set(a,t),this.nodeMetaMap.set(t,i)}replace(t,i){const a=this.getNode(t);if(a){const c=this.nodeMetaMap.get(a);c&&this.nodeMetaMap.set(i,c)}this.idNodeMap.set(t,i)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function YM(){return new tT}function Hl({maskInputOptions:e,tagName:t,type:i}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||i&&e[i]||i==="password"||t==="INPUT"&&!i&&e.text)}function Mo({isMasked:e,element:t,value:i,maskInputFn:a}){let c=i||"";return e?(a&&(c=a(c,t)),"*".repeat(c.length)):c}function us(e){return e.toLowerCase()}function fm(e){return e.toUpperCase()}const sS="__rrweb_original__";function $M(e){const t=e.getContext("2d");if(!t)return!0;const i=50;for(let a=0;a<e.width;a+=i)for(let c=0;c<e.height;c+=i){const u=t.getImageData,f=sS in u?u[sS]:u;if(new Uint32Array(f.call(t,a,c,Math.min(i,e.width-a),Math.min(i,e.height-c)).data.buffer).some(m=>m!==0))return!1}return!0}function R_(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?us(t):null}function vl(e,t,i){return t==="INPUT"&&(i==="radio"||i==="checkbox")?e.getAttribute("value")||"":e.value}function nT(e,t){let i;try{i=new URL(e,t??window.location.href)}catch{return null}const a=/\.([0-9a-z]+)(?:$)/i;return i.pathname.match(a)?.[1]??null}const oS={};function rT(e){const t=oS[e];if(t)return t;const i=window.document;let a=window[e];if(i&&typeof i.createElement=="function")try{const c=i.createElement("iframe");c.hidden=!0,i.head.appendChild(c);const u=c.contentWindow;u&&u[e]&&(a=u[e]),i.head.removeChild(c)}catch{}return oS[e]=a.bind(window)}function pm(...e){return rT("setTimeout")(...e)}function iT(...e){return rT("clearTimeout")(...e)}function aT(e){try{return e.contentDocument}catch{}}let XM=1;const QM=new RegExp("[^a-z0-9-_:]"),No=-2;function O_(){return XM++}function KM(e){if(e instanceof HTMLFormElement)return"form";const t=us(e.tagName);return QM.test(t)?"div":t}function JM(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Fa,cS;const WM=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ZM=/^(?:[a-z+]+:)?\/\//i,eN=/^www\..*/i,tN=/^(data:)([^,]*),(.*)/i;function nN(e,t){if(!e||t.size===0)return e;try{const i=e.split(";"),a=[];for(let c of i){if(c=c.trim(),!c)continue;const u=c.indexOf(":");if(u===-1){a.push(c);continue}const f=c.slice(0,u).trim();t.has(f)||a.push(c)}return a.join("; ")+(a.length>0&&e.endsWith(";")?";":"")}catch(i){return console.warn("Error filtering CSS properties:",i),e}}function El(e,t){return(e||"").replace(WM,(i,a,c,u,f,p)=>{const m=c||f||p,h=a||u||"";if(!m)return i;if(ZM.test(m)||eN.test(m))return`url(${h}${m}${h})`;if(tN.test(m))return`url(${h}${m}${h})`;if(m[0]==="/")return`url(${h}${JM(t)+m}${h})`;const v=t.split("/"),g=m.split("/");v.pop();for(const b of g)b!=="."&&(b===".."?v.pop():v.push(b));return`url(${h}${v.join("/")}${h})`})}const rN=/^[^ \t\n\r\u000c]+/,iN=/^[, \t\n\r\u000c]+/;function aN(e,t){if(t.trim()==="")return t;let i=0;function a(u){let f;const p=u.exec(t.substring(i));return p?(f=p[0],i+=f.length,f):""}const c=[];for(;a(iN),!(i>=t.length);){let u=a(rN);if(u.slice(-1)===",")u=Qa(e,u.substring(0,u.length-1)),c.push(u);else{let f="";u=Qa(e,u);let p=!1;for(;;){const m=t.charAt(i);if(m===""){c.push((u+f).trim());break}else if(p)m===")"&&(p=!1);else if(m===","){i+=1,c.push((u+f).trim());break}else m==="("&&(p=!0);f+=m,i+=1}}}return c.join(", ")}const uS=new WeakMap;function Qa(e,t){return!t||t.trim()===""?t:Fl(e,t)}function sN(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Fl(e,t){let i=uS.get(e);if(i||(i=e.createElement("a"),uS.set(e,i)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return i.setAttribute("href",t),i.href}function sT(e,t,i,a,c,u,f){if(!a)return a;
31if(i==="src"||i==="href"&&!(t==="use"&&a[0]==="#"))return Qa(e,a);if(i==="xlink:href"&&a[0]!=="#")return Qa(e,a);if(i==="background"&&(t==="table"||t==="td"||t==="th"))return Qa(e,a);if(i==="srcset")return aN(e,a);if(i==="style"){let p=El(a,Fl(e));return f&&f.size>0&&(p=nN(p,f)),p}else if(t==="object"&&i==="data")return Qa(e,a);return typeof u=="function"?u(i,a,c):a}function oT(e,t,i){return(e==="video"||e==="audio")&&t==="autoplay"}function oN(e,t,i,a){try{if(a&&e.matches(a))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let c=e.classList.length;c--;){const u=e.classList[c];if(t.test(u))return!0}if(i)return e.matches(i)}catch{}return!1}function cN(e,t){for(let i=e.classList.length;i--;){const a=e.classList[i];if(t.test(a))return!0}return!1}function Yi(e,t,i=1/0,a=0){return!e||e.nodeType!==e.ELEMENT_NODE||a>i?-1:t(e)?a:Yi(e.parentNode,t,i,a+1)}function Ka(e,t){return i=>{const a=i;if(a===null)return!1;try{if(e){if(typeof e=="string"){if(a.matches(`.${e}`))return!0}else if(cN(a,e))return!0}return!!(t&&a.matches(t))}catch{return!1}}}function ls(e,t,i,a,c,u){try{const f=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(f===null)return!1;if(f.tagName==="INPUT"){const h=f.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(h))return!0}let p=-1,m=-1;if(u){if(m=Yi(f,Ka(a,c)),m<0)return!0;p=Yi(f,Ka(t,i),m>=0?m:1/0)}else{if(p=Yi(f,Ka(t,i)),p<0)return!1;m=Yi(f,Ka(a,c),p>=0?p:1/0)}return p>=0?m>=0?p<=m:!0:m>=0?!1:!!u}catch{}return!!u}function uN(e,t,i){const a=e.contentWindow;if(!a)return;let c=!1,u;try{u=a.document.readyState}catch{return}if(u!=="complete"){const p=pm(()=>{c||(t(),c=!0)},i);e.addEventListener("load",()=>{iT(p),c=!0,t()});return}const f="about:blank";if(a.location.href!==f||e.src===f||e.src==="")return pm(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function lN(e,t,i){let a=!1,c;try{c=e.sheet}catch{return}if(c)return;const u=pm(()=>{a||(t(),a=!0)},i);e.addEventListener("load",()=>{iT(u),a=!0,t()})}function dN(e,t){const{doc:i,mirror:a,blockClass:c,blockSelector:u,unblockSelector:f,maskAllText:p,maskAttributeFn:m,maskTextClass:h,unmaskTextClass:v,maskTextSelector:g,unmaskTextSelector:b,inlineStylesheet:T,maskInputOptions:R={},maskTextFn:x,maskInputFn:P,dataURLOptions:$={},inlineImages:K,recordCanvas:le,keepIframeSrcFn:de,newlyAddedElement:he=!1,ignoreCSSAttributes:re}=t,z=fN(i,a);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:St.Document,childNodes:[],compatMode:e.compatMode}:{type:St.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:St.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:z};case e.ELEMENT_NODE:return mN(e,{doc:i,blockClass:c,blockSelector:u,unblockSelector:f,inlineStylesheet:T,maskAttributeFn:m,maskInputOptions:R,maskInputFn:P,dataURLOptions:$,inlineImages:K,recordCanvas:le,keepIframeSrcFn:de,newlyAddedElement:he,rootId:z,maskTextClass:h,unmaskTextClass:v,maskTextSelector:g,unmaskTextSelector:b,ignoreCSSAttributes:re});case e.TEXT_NODE:return pN(e,{doc:i,maskAllText:p,maskTextClass:h,unmaskTextClass:v,maskTextSelector:g,unmaskTextSelector:b,maskTextFn:x,maskInputOptions:R,maskInputFn:P,rootId:z});case e.CDATA_SECTION_NODE:return{type:St.CDATA,textContent:"",rootId:z};case e.COMMENT_NODE:return{type:St.Comment,textContent:e.textContent||"",rootId:z};default:return!1}}function fN(e,t){if(!t.hasNode(e))return;const i=t.getId(e);return i===1?void 0:i}function pN(e,t){const{maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:f,maskTextFn:p,maskInputOptions:m,maskInputFn:h,rootId:v}=t,g=e.parentNode&&e.parentNode.tagName;let b=e.textContent;const T=g==="STYLE"?!0:void 0,R=g==="SCRIPT"?!0:void 0,x=g==="TEXTAREA"?!0:void 0;if(T&&b){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(b=yl(e.parentNode.sheet))}catch($){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${$}`,e)}b=El(b,Fl(t.doc))}R&&(b="SCRIPT_PLACEHOLDER");const P=ls(e,a,u,c,f,i);if(!T&&!R&&!x&&b&&P&&(b=p?p(b,e.parentElement):b.replace(/[\S]/g,"*")),x&&b&&(m.textarea||P)&&(b=h?h(b,e.parentNode):b.replace(/[\S]/g,"*")),g==="OPTION"&&b){const $=Hl({type:null,tagName:g,maskInputOptions:m});b=Mo({isMasked:ls(e,a,u,c,f,$),element:e,value:b,maskInputFn:h})}return{type:St.Text,textContent:b||"",isStyle:T,rootId:v}}function mN(e,t){const{doc:i,blockClass:a,blockSelector:c,unblockSelector:u,inlineStylesheet:f,maskInputOptions:p={},maskAttributeFn:m,maskInputFn:h,dataURLOptions:v={},inlineImages:g,recordCanvas:b,keepIframeSrcFn:T,newlyAddedElement:R=!1,rootId:x,maskTextClass:P,unmaskTextClass:$,maskTextSelector:K,unmaskTextSelector:le,ignoreCSSAttributes:de}=t,he=oN(e,a,c,u),re=KM(e);let z={};const Z=e.attributes.length;for(let J=0;J<Z;J++){const ne=e.attributes[J];ne.name&&!oT(re,ne.name,ne.value)&&(z[ne.name]=sT(i,re,us(ne.name),ne.value,e,m,de))}if(re==="link"&&f){const J=Array.from(i.styleSheets).find(fe=>fe.href===e.href);let ne=null;J&&(ne=yl(J)),ne&&(z.rel=null,z.href=null,z.crossorigin=null,z._cssText=El(ne,J.href))}if(re==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const J=yl(e.sheet);J&&(z._cssText=El(J,Fl(i)))}if(re==="input"||re==="textarea"||re==="select"||re==="option"){const J=e,ne=R_(J),fe=vl(J,fm(re),ne),De=J.checked;if(ne!=="submit"&&ne!=="button"&&fe){const me=ls(J,P,K,$,le,Hl({type:ne,tagName:fm(re),maskInputOptions:p}));z.value=Mo({isMasked:me,element:J,value:fe,maskInputFn:h})}De&&(z.checked=De)}if(re==="option"&&(e.selected&&!p.select?z.selected=!0:delete z.selected),re==="canvas"&&b){if(e.__context==="2d")$M(e)||(z.rr_dataURL=e.toDataURL(v.type,v.quality));else if(!("__context"in e)){const J=e.toDataURL(v.type,v.quality),ne=i.createElement("canvas");ne.width=e.width,ne.height=e.height;const fe=ne.toDataURL(v.type,v.quality);J!==fe&&(z.rr_dataURL=J)}}if(re==="img"&&g){Fa||(Fa=i.createElement("canvas"),cS=Fa.getContext("2d"));const J=e,ne=J.currentSrc||J.getAttribute("src")||"<unknown-src>",fe=J.crossOrigin,De=()=>{J.removeEventListener("load",De);
31try{Fa.width=J.naturalWidth,Fa.height=J.naturalHeight,cS.drawImage(J,0,0),z.rr_dataURL=Fa.toDataURL(v.type,v.quality)}catch(me){if(J.crossOrigin!=="anonymous"){J.crossOrigin="anonymous",J.complete&&J.naturalWidth!==0?De():J.addEventListener("load",De);return}else console.warn(`Cannot inline img src=${ne}! Error: ${me}`)}J.crossOrigin==="anonymous"&&(fe?z.crossOrigin=fe:J.removeAttribute("crossorigin"))};J.complete&&J.naturalWidth!==0?De():J.addEventListener("load",De)}if((re==="audio"||re==="video")&&(z.rr_mediaState=e.paused?"paused":"played",z.rr_mediaCurrentTime=e.currentTime),R||(e.scrollLeft&&(z.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(z.rr_scrollTop=e.scrollTop)),he){const{width:J,height:ne}=e.getBoundingClientRect();z={class:z.class,rr_width:`${J}px`,rr_height:`${ne}px`}}re==="iframe"&&!T(z.src)&&(!he&&!aT(e)&&(z.rr_src=z.src),delete z.src);let Ie;try{customElements.get(re)&&(Ie=!0)}catch{}return{type:St.Element,tagName:re,attributes:z,childNodes:[],isSVG:sN(e)||void 0,needBlock:he,rootId:x,isCustom:Ie}}function et(e){return e==null?"":e.toLowerCase()}function _N(e,t){if(t.comment&&e.type===St.Comment)return!0;if(e.type===St.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"&&nT(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(et(e.attributes.name).match(/^msapplication-tile(image|color)$/)||et(e.attributes.name)==="application-name"||et(e.attributes.rel)==="icon"||et(e.attributes.rel)==="apple-touch-icon"||et(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&et(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(et(e.attributes.property).match(/^(og|twitter|fb):/)||et(e.attributes.name).match(/^(og|twitter):/)||et(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(et(e.attributes.name)==="robots"||et(e.attributes.name)==="googlebot"||et(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(et(e.attributes.name)==="author"||et(e.attributes.name)==="generator"||et(e.attributes.name)==="framework"||et(e.attributes.name)==="publisher"||et(e.attributes.name)==="progid"||et(e.attributes.property).match(/^article:/)||et(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(et(e.attributes.name)==="google-site-verification"||et(e.attributes.name)==="yandex-verification"||et(e.attributes.name)==="csrf-token"||et(e.attributes.name)==="p:domain_verify"||et(e.attributes.name)==="verify-v1"||et(e.attributes.name)==="verification"||et(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ja(e,t){const{doc:i,mirror:a,blockClass:c,blockSelector:u,unblockSelector:f,maskAllText:p,maskTextClass:m,unmaskTextClass:h,maskTextSelector:v,unmaskTextSelector:g,skipChild:b=!1,inlineStylesheet:T=!0,maskInputOptions:R={},maskAttributeFn:x,maskTextFn:P,maskInputFn:$,slimDOMOptions:K,dataURLOptions:le={},inlineImages:de=!1,recordCanvas:he=!1,onSerialize:re,onIframeLoad:z,iframeLoadTimeout:Z=5e3,onBlockedImageLoad:Ie,onStylesheetLoad:J,stylesheetLoadTimeout:ne=5e3,keepIframeSrcFn:fe=()=>!1,newlyAddedElement:De=!1,ignoreCSSAttributes:me}=t;let{preserveWhiteSpace:He=!0}=t;const M=dN(e,{doc:i,mirror:a,blockClass:c,blockSelector:u,maskAllText:p,unblockSelector:f,maskTextClass:m,unmaskTextClass:h,maskTextSelector:v,unmaskTextSelector:g,inlineStylesheet:T,maskInputOptions:R,maskAttributeFn:x,maskTextFn:P,maskInputFn:$,dataURLOptions:le,inlineImages:de,recordCanvas:he,keepIframeSrcFn:fe,newlyAddedElement:De,ignoreCSSAttributes:me});if(!M)return console.warn(e,"not serialized"),null;let q;a.hasNode(e)?q=a.getId(e):_N(M,K)||!He&&M.type===St.Text&&!M.isStyle&&!M.textContent.replace(/^\s+|\s+$/gm,"").length?q=No:q=O_();const H=Object.assign(M,{id:q});if(a.add(e,H),q===No)return null;re&&re(e);let te=!b;if(H.type===St.Element){te=te&&!H.needBlock;const W=e.shadowRoot;W&&Ro(W)&&(H.isShadowHost=!0)}
31if((H.type===St.Document||H.type===St.Element)&&te){K.headWhitespace&&H.type===St.Element&&H.tagName==="head"&&(He=!1);const W={doc:i,mirror:a,blockClass:c,blockSelector:u,maskAllText:p,unblockSelector:f,maskTextClass:m,unmaskTextClass:h,maskTextSelector:v,unmaskTextSelector:g,skipChild:b,inlineStylesheet:T,maskInputOptions:R,maskAttributeFn:x,maskTextFn:P,maskInputFn:$,slimDOMOptions:K,dataURLOptions:le,inlineImages:de,recordCanvas:he,preserveWhiteSpace:He,onSerialize:re,onIframeLoad:z,iframeLoadTimeout:Z,onBlockedImageLoad:Ie,onStylesheetLoad:J,stylesheetLoadTimeout:ne,keepIframeSrcFn:fe,ignoreCSSAttributes:me},ce=e.childNodes?Array.from(e.childNodes):[];for(const B of ce){const X=Ja(B,W);X&&H.childNodes.push(X)}if(zM(e)&&e.shadowRoot)for(const B of Array.from(e.shadowRoot.childNodes)){const X=Ja(B,W);X&&(Ro(e.shadowRoot)&&(X.isShadow=!0),H.childNodes.push(X))}}if(e.parentNode&&Ao(e.parentNode)&&Ro(e.parentNode)&&(H.isShadow=!0),H.type===St.Element&&H.tagName==="iframe"&&!H.needBlock&&uN(e,()=>{const W=aT(e);if(W&&z){const ce=Ja(W,{doc:W,mirror:a,blockClass:c,blockSelector:u,unblockSelector:f,maskAllText:p,maskTextClass:m,unmaskTextClass:h,maskTextSelector:v,unmaskTextSelector:g,skipChild:!1,inlineStylesheet:T,maskInputOptions:R,maskAttributeFn:x,maskTextFn:P,maskInputFn:$,slimDOMOptions:K,dataURLOptions:le,inlineImages:de,recordCanvas:he,preserveWhiteSpace:He,onSerialize:re,onIframeLoad:z,iframeLoadTimeout:Z,onStylesheetLoad:J,stylesheetLoadTimeout:ne,keepIframeSrcFn:fe,ignoreCSSAttributes:me});ce&&z(e,ce)}},Z),H.type===St.Element&&H.tagName==="img"&&!e.complete&&H.needBlock){const W=e,ce=()=>{if(W.isConnected&&!W.complete&&Ie)try{const B=W.getBoundingClientRect();B.width>0&&B.height>0&&Ie(W,H,B)}catch{}W.removeEventListener("load",ce)};W.isConnected&&W.addEventListener("load",ce)}return H.type===St.Element&&H.tagName==="link"&&typeof H.attributes.rel=="string"&&(H.attributes.rel==="stylesheet"||H.attributes.rel==="preload"&&typeof H.attributes.href=="string"&&nT(H.attributes.href)==="css")&&lN(e,()=>{if(J){const W=Ja(e,{doc:i,mirror:a,blockClass:c,blockSelector:u,unblockSelector:f,maskAllText:p,maskTextClass:m,unmaskTextClass:h,maskTextSelector:v,unmaskTextSelector:g,skipChild:!1,inlineStylesheet:T,maskInputOptions:R,maskAttributeFn:x,maskTextFn:P,maskInputFn:$,slimDOMOptions:K,dataURLOptions:le,inlineImages:de,recordCanvas:he,preserveWhiteSpace:He,onSerialize:re,onIframeLoad:z,iframeLoadTimeout:Z,onStylesheetLoad:J,stylesheetLoadTimeout:ne,keepIframeSrcFn:fe,ignoreCSSAttributes:me});W&&J(e,W)}},ne),H.type===St.Element&&delete H.needBlock,H}function hN(e,t){const{mirror:i=new tT,blockClass:a="rr-block",blockSelector:c=null,unblockSelector:u=null,maskAllText:f=!1,maskTextClass:p="rr-mask",unmaskTextClass:m=null,maskTextSelector:h=null,unmaskTextSelector:v=null,inlineStylesheet:g=!0,inlineImages:b=!1,recordCanvas:T=!1,maskAllInputs:R=!1,maskAttributeFn:x,maskTextFn:P,maskInputFn:$,slimDOM:K=!1,dataURLOptions:le,preserveWhiteSpace:de,onSerialize:he,onIframeLoad:re,iframeLoadTimeout:z,onBlockedImageLoad:Z,onStylesheetLoad:Ie,stylesheetLoadTimeout:J,keepIframeSrcFn:ne=()=>!1,ignoreCSSAttributes:fe=new Set([])}=t||{};return Ja(e,{doc:e,mirror:i,blockClass:a,blockSelector:c,unblockSelector:u,maskAllText:f,maskTextClass:p,unmaskTextClass:m,maskTextSelector:h,unmaskTextSelector:v,skipChild:!1,inlineStylesheet:g,maskInputOptions:R===!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}:R===!1?{}:R,maskAttributeFn:x,maskTextFn:P,maskInputFn:$,slimDOMOptions:K===!0||K==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:K==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:K===!1?{}:K,dataURLOptions:le,inlineImages:b,recordCanvas:T,preserveWhiteSpace:de,onSerialize:he,onIframeLoad:re,iframeLoadTimeout:z,onBlockedImageLoad:Z,onStylesheetLoad:Ie,stylesheetLoadTimeout:J,keepIframeSrcFn:ne,newlyAddedElement:!1,ignoreCSSAttributes:fe})}function Bt(e,t,i=document){const a={capture:!0,passive:!0};return i.addEventListener(e,t,a),()=>i.removeEventListener(e,t,a)}const Ya=`Please stop import mirror directly. Instead of that,\r
32now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
33or you can use record.mirror to access the mirror instance during recording.`;let lS={map:{},getId(){return console.error(Ya),-1},getNode(){return console.error(Ya),null},removeNodeFromMap(){console.error(Ya)},has(){return console.error(Ya),!1},reset(){console.error(Ya)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(lS=new Proxy(lS,{get(e,t,i){return t==="map"&&console.error(Ya),Reflect.get(e,t,i)}}));function ko(e,t,i={}){let a=null,c=0;return function(...u){const f=Date.now();!c&&i.leading===!1&&(c=f);const p=t-(f-c),m=this;p<=0||p>t?(a&&(TN(a),a=null),c=f,e.apply(m,u)):!a&&i.trailing!==!1&&(a=Gl(()=>{c=i.leading===!1?0:Date.now(),a=null,e.apply(m,u)},p))}}function cT(e,t,i,a,c=window){const u=c.Object.getOwnPropertyDescriptor(e,t);return c.Object.defineProperty(e,t,a?i:{set(f){Gl(()=>{i.set.call(this,f)},0),u&&u.set&&u.set.call(this,f)}}),()=>cT(e,t,u||{},!0)}function D_(e,t,i){try{if(!(t in e))return()=>{};const a=e[t],c=i(a);return typeof c=="function"&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__rrweb_original__:{enumerable:!1,value:a}})),e[t]=c,()=>{e[t]=a}}catch{return()=>{}}}let Sl=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Sl=()=>new Date().getTime());function uT(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function lT(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function dT(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function fT(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function dn(e,t,i,a,c){if(!e)return!1;const u=fT(e);if(!u)return!1;const f=Ka(t,i);if(!c){const h=a&&u.matches(a);return f(u)&&!h}const p=Yi(u,f);let m=-1;return p<0?!1:(a&&(m=Yi(u,Ka(null,a))),p>-1&&m<0?!0:p<m)}function gN(e,t){return t.getId(e)!==-1}function kp(e,t){return t.getId(e)===No}function pT(e,t){if(Ao(e))return!1;const i=t.getId(e);return t.has(i)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?pT(e.parentNode,t):!0:!0}function mm(e){return!!e.changedTouches}function yN(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let i=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===i)return!0;while(i=i&&i.parentNode);return!1})}function mT(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function _T(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function _m(e){return!!e?.shadowRoot}class vN{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,i){if(this.has(t))return this.getId(t);let a;return i===void 0?a=this.id++:a=i,this.styleIDMap.set(t,a),this.idStyleMap.set(a,t),a}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 hT(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function EN(e){let t=e,i;for(;i=hT(t);)t=i;return t}function SN(e){const t=e.ownerDocument;if(!t)return!1;const i=EN(e);return t.contains(i)}function gT(e){const t=e.ownerDocument;return t?t.contains(e)||SN(e):!1}const dS={};function w_(e){const t=dS[e];if(t)return t;const i=window.document;let a=window[e];if(i&&typeof i.createElement=="function")try{const c=i.createElement("iframe");c.hidden=!0,i.head.appendChild(c);const u=c.contentWindow;u&&u[e]&&(a=u[e]),i.head.removeChild(c)}catch{}return dS[e]=a.bind(window)}function bN(...e){return w_("requestAnimationFrame")(...e)}
33function Gl(...e){return w_("setTimeout")(...e)}function TN(...e){return w_("clearTimeout")(...e)}var xe=(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))(xe||{}),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||{}),zt=(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))(zt||{}),hr=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(hr||{}),$a=(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))($a||{});function x_(e){try{return e.contentDocument}catch{}}function AN(e){try{return e.contentWindow}catch{}}function fS(e){return"__ln"in e}class RN{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 i=this.head;for(let a=0;a<t;a++)i=i?.next||null;return i}addNode(t){const i={value:t,previous:null,next:null};if(t.__ln=i,t.previousSibling&&fS(t.previousSibling)){const a=t.previousSibling.__ln.next;i.next=a,i.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=i,a&&(a.previous=i)}else if(t.nextSibling&&fS(t.nextSibling)&&t.nextSibling.__ln.previous){const a=t.nextSibling.__ln.previous;i.previous=a,i.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=i,a&&(a.next=i)}else this.head&&(this.head.previous=i),i.next=this.head,this.head=i;i.next===null&&(this.tail=i),this.length++}removeNode(t){const i=t.__ln;this.head&&(i.previous?(i.previous.next=i.next,i.next?i.next.previous=i.previous:this.tail=i.previous):(this.head=i.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const pS=(e,t)=>`${e}@${t}`;class ON{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=[],i=new Set,a=new RN,c=m=>{let h=m,v=No;for(;v===No;)h=h&&h.nextSibling,v=h&&this.mirror.getId(h);return v},u=m=>{if(!m.parentNode||!gT(m))return;const h=Ao(m.parentNode)?this.mirror.getId(hT(m)):this.mirror.getId(m.parentNode),v=c(m);if(h===-1||v===-1)return a.addNode(m);const g=Ja(m,{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:b=>{mT(b,this.mirror)&&!dn(b,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(b),_T(b,this.mirror)&&this.stylesheetManager.trackLinkElement(b),_m(m)&&this.shadowDomManager.addShadowRoot(m.shadowRoot,this.doc)},onIframeLoad:(b,T)=>{dn(b,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(b,T),b.contentWindow&&this.canvasManager.addWindow(b.contentWindow),this.shadowDomManager.observeAttachShadow(b))},onStylesheetLoad:(b,T)=>{this.stylesheetManager.attachLinkElement(b,T)},onBlockedImageLoad:(b,T,{width:R,height:x})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:T.id,attributes:{style:{width:`${R}px`,height:`${x}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});g&&(t.push({parentId:h,nextId:v,node:g}),i.add(g.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const m of this.movedSet)mS(this.removes,m,this.mirror)&&!this.movedSet.has(m.parentNode)||u(m);for(const m of this.addedSet)!_S(this.droppedSet,m)&&!mS(this.removes,m,this.mirror)||_S(this.movedSet,m)?u(m):this.droppedSet.add(m);let f=null;for(;a.length;){let m=null;if(f){const h=this.mirror.getId(f.value.parentNode),v=c(f.value);h!==-1&&v!==-1&&(m=f)}if(!m){let h=a.tail;for(;h;){const v=h;if(h=h.previous,v){const g=this.mirror.getId(v.value.parentNode);
33if(c(v.value)===-1)continue;if(g!==-1){m=v;break}else{const T=v.value;if(T.parentNode&&T.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const R=T.parentNode.host;if(this.mirror.getId(R)!==-1){m=v;break}}}}}}if(!m){for(;a.head;)a.removeNode(a.head.value);break}f=m.previous,a.removeNode(m.value),u(m.value)}const p={texts:this.texts.map(m=>({id:this.mirror.getId(m.node),value:m.value})).filter(m=>!i.has(m.id)).filter(m=>this.mirror.has(m.id)),attributes:this.attributes.map(m=>{const{attributes:h}=m;if(typeof h.style=="string"){const v=JSON.stringify(m.styleDiff),g=JSON.stringify(m._unchangedStyles);v.length<h.style.length&&(v+g).split("var(").length===h.style.split("var(").length&&(h.style=m.styleDiff)}return{id:this.mirror.getId(m.node),attributes:h}}).filter(m=>!i.has(m.id)).filter(m=>this.mirror.has(m.id)),removes:this.removes,adds:t};!p.texts.length&&!p.attributes.length&&!p.removes.length&&!p.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(p))},this.processMutation=t=>{if(!kp(t.target,this.mirror))switch(t.type){case"characterData":{const i=t.target.textContent;!dn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&i!==t.oldValue&&this.texts.push({value:ls(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&i?this.maskTextFn?this.maskTextFn(i,fT(t.target)):i.replace(/[\S]/g,"*"):i,node:t.target});break}case"attributes":{const i=t.target;let a=t.attributeName,c=t.target.getAttribute(a);if(a==="value"){const f=R_(i),p=i.tagName;c=vl(i,p,f);const m=Hl({maskInputOptions:this.maskInputOptions,tagName:p,type:f}),h=ls(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,m);c=Mo({isMasked:h,element:i,value:c,maskInputFn:this.maskInputFn})}if(dn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||c===t.oldValue)return;let u=this.attributeMap.get(t.target);if(i.tagName==="IFRAME"&&a==="src"&&!this.keepIframeSrcFn(c))if(!x_(i))a="rr_src";else return;if(u||(u={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(u),this.attributeMap.set(t.target,u)),a==="type"&&i.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&i.setAttribute("data-rr-is-password","true"),!oT(i.tagName,a)&&(u.attributes[a]=sT(this.doc,us(i.tagName),us(a),c,i,this.maskAttributeFn),a==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const f=this.unattachedDoc.createElement("span");t.oldValue&&f.setAttribute("style",t.oldValue);for(const p of Array.from(i.style)){const m=i.style.getPropertyValue(p),h=i.style.getPropertyPriority(p);m!==f.style.getPropertyValue(p)||h!==f.style.getPropertyPriority(p)?h===""?u.styleDiff[p]=m:u.styleDiff[p]=[m,h]:u._unchangedStyles[p]=[m,h]}for(const p of Array.from(f.style))i.style.getPropertyValue(p)===""&&(u.styleDiff[p]=!1)}break}case"childList":{if(dn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(i=>this.genAdds(i,t.target)),t.removedNodes.forEach(i=>{const a=this.mirror.getId(i),c=Ao(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);dn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||kp(i,this.mirror)||!gN(i,this.mirror)||(this.addedSet.has(i)?(hm(this.addedSet,i),this.droppedSet.add(i)):this.addedSet.has(t.target)&&a===-1||pT(t.target,this.mirror)||(this.movedSet.has(i)&&this.movedMap[pS(a,c)]?hm(this.movedSet,i):this.removes.push({parentId:c,id:a,isShadow:Ao(t.target)&&Ro(t.target)?!0:void 0})),this.mapRemoves.push(i))});break}}},this.genAdds=(t,i)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(kp(t,this.mirror))return;this.movedSet.add(t);let a=null;i&&this.mirror.hasNode(i)&&(a=this.mirror.getId(i)),a&&a!==-1&&(this.movedMap[pS(this.mirror.getId(t),a)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);dn(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEac
33h(a=>this.genAdds(a)),_m(t)&&t.shadowRoot.childNodes.forEach(a=>{this.processedNodeManager.add(a,this),this.genAdds(a,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(i=>{this[i]=t[i]})}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 hm(e,t){e.delete(t),t.childNodes?.forEach(i=>hm(e,i))}function mS(e,t,i){return e.length===0?!1:DN(e,t,i)}function DN(e,t,i){let a=t.parentNode;for(;a;){const c=i.getId(a);if(e.some(u=>u.id===c))return!0;a=a.parentNode}return!1}function _S(e,t){return e.size===0?!1:yT(e,t)}function yT(e,t){const{parentNode:i}=t;return i?e.has(i)?!0:yT(e,i):!1}let Oo;function wN(e){Oo=e}function xN(){Oo=void 0}const Be=e=>Oo?(...i)=>{try{return e(...i)}catch(a){if(Oo&&Oo(a)===!0)return()=>{};throw a}}:e,Wa=[];function rc(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function vT(e,t){const i=new ON;Wa.push(i),i.init(e);let a=window.MutationObserver||window.__rrMutationObserver;const c=window?.Zone?.__symbol__?.("MutationObserver");c&&window[c]&&(a=window[c]);const u=new a(Be(f=>{e.onMutation&&e.onMutation(f)===!1||i.processMutations.bind(i)(f)}));return u.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),u}function IN({mousemoveCb:e,sampling:t,doc:i,mirror:a}){if(t.mousemove===!1)return()=>{};const c=typeof t.mousemove=="number"?t.mousemove:50,u=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let f=[],p;const m=ko(Be(g=>{const b=Date.now()-p;e(f.map(T=>(T.timeOffset-=b,T)),g),f=[],p=null}),u),h=Be(ko(Be(g=>{const b=rc(g),{clientX:T,clientY:R}=mm(g)?g.changedTouches[0]:g;p||(p=Sl()),f.push({x:T,y:R,id:a.getId(b),timeOffset:Sl()-p}),m(typeof DragEvent<"u"&&g instanceof DragEvent?be.Drag:g instanceof MouseEvent?be.MouseMove:be.TouchMove)}),c,{trailing:!1})),v=[Bt("mousemove",h,i),Bt("touchmove",h,i),Bt("drag",h,i)];return Be(()=>{v.forEach(g=>g())})}function CN({mouseInteractionCb:e,doc:t,mirror:i,blockClass:a,blockSelector:c,unblockSelector:u,sampling:f}){if(f.mouseInteraction===!1)return()=>{};const p=f.mouseInteraction===!0||f.mouseInteraction===void 0?{}:f.mouseInteraction,m=[];let h=null;const v=g=>b=>{const T=rc(b);if(dn(T,a,c,u,!0))return;let R=null,x=g;if("pointerType"in b){switch(b.pointerType){case"mouse":R=hr.Mouse;break;case"touch":R=hr.Touch;break;case"pen":R=hr.Pen;break}R===hr.Touch?zt[g]===zt.MouseDown?x="TouchStart":zt[g]===zt.MouseUp&&(x="TouchEnd"):hr.Pen}else mm(b)&&(R=hr.Touch);R!==null?(h=R,(x.startsWith("Touch")&&R===hr.Touch||x.startsWith("Mouse")&&R===hr.Mouse)&&(R=null)):zt[g]===zt.Click&&(R=h,h=null);const P=mm(b)?b.changedTouches[0]:b;if(!P)return;const $=i.getId(T),{clientX:K,clientY:le}=P;Be(e)({type:zt[x],id:$,x:K,y:le,...R!==null&&{pointerType:R}})};return Object.keys(zt).filter(g=>Number.isNaN(Number(g))&&!g.endsWith("_Departed")&&p[g]!==!1).forEach(g=>{let b=us(g);const T=v(g);if(window.PointerEvent)switch(zt[g]){case zt.MouseDown:case zt.MouseUp:b=b.replace("mouse","pointer");break;case zt.TouchStart:case zt.TouchEnd:return}m.push(Bt(b,T,t))}),Be(()=>{m.forEach(g=>g())})}function ET({scrollCb:e,doc:t,mirror:i,blockClass:a,blockSelector:c,unblockSelector:u,sampling:f}){const p=Be(ko(Be(m=>{const h=rc(m);if(!h||dn(h,a,c,u,!0))return;const v=i.getId(h);if(h===t&&t.defaultView){const g=uT(t.defaultView);e({id:v,x:g.left,y:g.top})}else e({id:v,x:h.scrollLeft,y:h.scrollTop})}),f.scroll||100));return Bt("scroll",p,t)}function LN({viewportResizeCb:e},{win:t}){let i=-1,a=-1;const c=Be(ko(Be(()=>{const u=lT(),f=dT();(i!==u||a!==f)&&(e({width:Number(f),height:Number(u)}),i=u,a=f)}),200));return Bt("resize",c,t)}const MN=["INPUT","TEXTAREA","SELECT"],hS=new WeakMap;function NN({inputCb:e,doc:t,mirror:i,blockClass:a,blockSelector:c,unblockSelector:u,ignoreClass:f,ignoreSelector:p,maskInputOptions:m,maskInputFn:h,sampling:v,userTriggeredOnInput:g,maskTextClass:b,unmaskTextClass:T,maskTextSelector:R,unmaskTextSelector:x}){function P(z){let Z=rc(z);const Ie=z.isTrusted,J=Z&&fm(Z.tagName);if(J==="OPTION"&&(Z=Z.parentElement),!Z||!J||MN.indexOf(J)<0||dn(Z,a,c,u,!0))return;const ne=Z;if(ne.classList.contains(f)||p&&ne.matches(p))return;const fe=R_(Z);let De=vl(ne,J,fe),me=!1;const He=Hl({maskInputOptions:m,tagName:J,type:fe}),M=ls(Z,b,R,T,x,He);(fe==="radio"||fe==="checkbox")&&(me=Z.checked),De=Mo({isMasked:M,element:Z,value:De,maskInputFn:h}),$(Z,g?{text:De,isChecked:me,userTriggered:Ie}:{text:De,isChecked:me});const q=Z.name;fe==="radio"&&q&&me&&t.querySelectorAll(`input[type="radio"][name="${q}"]`).forEach(H=>{if(H!==Z){const te=Mo({isMasked:M,element:H,value:vl(H,J,fe),maskInputFn:h});$(H,g?{text:te,isChecked:!me,userTriggered:!1}:{text:te,isChecked:!me})}})}function $(z,Z){const Ie=hS.get(z);if(!Ie||Ie.text!==Z.text||Ie.isChecked!==Z.isChecked){hS.set(z,Z);const J=i.getId(z);Be(e)({...Z,id:J})}}
vendor: 6,089 bytes, line 33
33const le=(v.input==="last"?["change"]:["input","change"]).map(z=>Bt(z,Be(P),t)),de=t.defaultView;if(!de)return()=>{le.forEach(z=>z())};const he=de.Object.getOwnPropertyDescriptor(de.HTMLInputElement.prototype,"value"),re=[[de.HTMLInputElement.prototype,"value"],[de.HTMLInputElement.prototype,"checked"],[de.HTMLSelectElement.prototype,"value"],[de.HTMLTextAreaElement.prototype,"value"],[de.HTMLSelectElement.prototype,"selectedIndex"],[de.HTMLOptionElement.prototype,"selected"]];return he&&he.set&&le.push(...re.map(z=>cT(z[0],z[1],{set(){Be(P)({target:this,isTrusted:!1})}},!1,de))),Be(()=>{le.forEach(z=>z())})}function bl(e){const t=[];function i(a,c){if(Cu("CSSGroupingRule")&&a.parentRule instanceof CSSGroupingRule||Cu("CSSMediaRule")&&a.parentRule instanceof CSSMediaRule||Cu("CSSSupportsRule")&&a.parentRule instanceof CSSSupportsRule||Cu("CSSConditionRule")&&a.parentRule instanceof CSSConditionRule){const f=Array.from(a.parentRule.cssRules).indexOf(a);c.unshift(f)}else if(a.parentStyleSheet){const f=Array.from(a.parentStyleSheet.cssRules).indexOf(a);c.unshift(f)}return c}return i(e,t)}function ai(e,t,i){let a,c;return e?(e.ownerNode?a=t.getId(e.ownerNode):c=i.getId(e),{styleId:c,id:a}):{}}function kN({styleSheetRuleCb:e,mirror:t,stylesheetManager:i},{win:a}){if(!a.CSSStyleSheet||!a.CSSStyleSheet.prototype)return()=>{};const c=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=new Proxy(c,{apply:Be((v,g,b)=>{const[T,R]=b,{id:x,styleId:P}=ai(g,t,i.styleMirror);return(x&&x!==-1||P&&P!==-1)&&e({id:x,styleId:P,adds:[{rule:T,index:R}]}),v.apply(g,b)})});const u=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=new Proxy(u,{apply:Be((v,g,b)=>{const[T]=b,{id:R,styleId:x}=ai(g,t,i.styleMirror);return(R&&R!==-1||x&&x!==-1)&&e({id:R,styleId:x,removes:[{index:T}]}),v.apply(g,b)})});let f;a.CSSStyleSheet.prototype.replace&&(f=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=new Proxy(f,{apply:Be((v,g,b)=>{const[T]=b,{id:R,styleId:x}=ai(g,t,i.styleMirror);return(R&&R!==-1||x&&x!==-1)&&e({id:R,styleId:x,replace:T}),v.apply(g,b)})}));let p;a.CSSStyleSheet.prototype.replaceSync&&(p=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=new Proxy(p,{apply:Be((v,g,b)=>{const[T]=b,{id:R,styleId:x}=ai(g,t,i.styleMirror);return(R&&R!==-1||x&&x!==-1)&&e({id:R,styleId:x,replaceSync:T}),v.apply(g,b)})}));const m={};Lu("CSSGroupingRule")?m.CSSGroupingRule=a.CSSGroupingRule:(Lu("CSSMediaRule")&&(m.CSSMediaRule=a.CSSMediaRule),Lu("CSSConditionRule")&&(m.CSSConditionRule=a.CSSConditionRule),Lu("CSSSupportsRule")&&(m.CSSSupportsRule=a.CSSSupportsRule));const h={};return Object.entries(m).forEach(([v,g])=>{h[v]={insertRule:g.prototype.insertRule,deleteRule:g.prototype.deleteRule},g.prototype.insertRule=new Proxy(h[v].insertRule,{apply:Be((b,T,R)=>{const[x,P]=R,{id:$,styleId:K}=ai(T.parentStyleSheet,t,i.styleMirror);return($&&$!==-1||K&&K!==-1)&&e({id:$,styleId:K,adds:[{rule:x,index:[...bl(T),P||0]}]}),b.apply(T,R)})}),g.prototype.deleteRule=new Proxy(h[v].deleteRule,{apply:Be((b,T,R)=>{const[x]=R,{id:P,styleId:$}=ai(T.parentStyleSheet,t,i.styleMirror);return(P&&P!==-1||$&&$!==-1)&&e({id:P,styleId:$,removes:[{index:[...bl(T),x]}]}),b.apply(T,R)})})}),Be(()=>{a.CSSStyleSheet.prototype.insertRule=c,a.CSSStyleSheet.prototype.deleteRule=u,f&&(a.CSSStyleSheet.prototype.replace=f),p&&(a.CSSStyleSheet.prototype.replaceSync=p),Object.entries(m).forEach(([v,g])=>{g.prototype.insertRule=h[v].insertRule,g.prototype.deleteRule=h[v].deleteRule})})}function ST({mirror:e,stylesheetManager:t},i){let a=null;i.nodeName==="#document"?a=e.getId(i):a=e.getId(i.host);const c=i.nodeName==="#document"?i.defaultView?.Document:i.ownerDocument?.defaultView?.ShadowRoot,u=c?.prototype?Object.getOwnPropertyDescriptor(c?.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!c||!u?()=>{}:(Object.defineProperty(i,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){return u.get?.call(this)},set(f){const p=u.set?.call(this,f);if(a!==null&&a!==-1)try{t.adoptStyleSheets(f,a)}catch{}return p}}),Be(()=>{Object.defineProperty(i,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))}function PN({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:i,stylesheetManager:a},{win:c}){const u=c.CSSStyleDeclaration.prototype.setProperty;c.CSSStyleDeclaration.prototype.setProperty=new Proxy(u,{apply:Be((p,m,h)=>{const[v,g,b]=h;if(i.has(v))return u.apply(m,[v,g,b]);const{id:T,styleId:R}=ai(m.parentRule?.parentStyleSheet,t,a.styleMirror);return(T&&T!==-1||R&&R!==-1)&&e({id:T,styleId:R,set:{property:v,value:g,priority:b},index:bl(m.parentRule)}),p.apply(m,h)})});const f=c.CSSStyleDeclaration.prototype.removeProperty;return c.CSSStyleDeclaration.prototype.removeProperty=new Proxy(f,{apply:Be((p,m,h)=>{const[v]=h;if(i.has(v))return f.apply(m,[v]);const{id:g,styleId:b}=ai(m.parentRule?.parentStyleSheet,t,a.styleMirror);return(g&&g!==-1||b&&b!==-1)&&e({id:g,styleId:b,remove:{property:v},index:bl(m.parentRule)}),p.apply(m,h)})}),Be(()=>{c.CSSStyleDeclaration.prototype.setProperty=u,c.CSSStyleDeclaration.prototype.removeProperty=f})}function UN({mediaInteractionCb:e,blockClass:t,blockSelector:i,unblockSelector:a,mirror:c,sampling:u,doc:f}){const p=Be(h=>ko(Be(v=>{const g=rc(v);if(!g||dn(g,t,i,a,!0))return;const{currentTime:b,volume:T,muted:R,playbackRate:x}=g;e({type:h,id:c.getId(g),currentTime:b,volume:T,muted:R,playbackRate:x})}),u.media||500)),m=[Bt("play",p($a.Play),f),Bt("pause",p($a.Pause),f),Bt("seeked",p($a.Seeked),f),Bt("volumechange",p($a.VolumeChange),f),Bt("ratechange",p($a.RateChange),f)];return Be(()=>{m.forEach(h=>h())})}function jN({fontCb:e,doc:t}){const i=t.defaultView;if(!i)return()=>{};const a=[],c=new WeakMap,u=i.FontFace;i.FontFace=function(m,h,v){const g=new u(m,h,v);return c.set(g,{family:m,buffer:typeof h!="string",descriptors:v,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),g};const f=D_(t.fonts,"add",function(p){return function(m){return Gl
33(Be(()=>{const h=c.get(m);h&&(e(h),c.delete(m))}),0),p.apply(this,[m])}});return a.push(()=>{i.FontFace=u}),a.push(f),Be(()=>{a.forEach(p=>p())})}function zN(e){const{doc:t,mirror:i,blockClass:a,blockSelector:c,unblockSelector:u,selectionCb:f}=e;let p=!0;const m=Be(()=>{const h=t.getSelection();if(!h||p&&h?.isCollapsed)return;p=h.isCollapsed||!1;const v=[],g=h.rangeCount||0;for(let b=0;b<g;b++){const T=h.getRangeAt(b),{startContainer:R,startOffset:x,endContainer:P,endOffset:$}=T;dn(R,a,c,u,!0)||dn(P,a,c,u,!0)||v.push({start:i.getId(R),startOffset:x,end:i.getId(P),endOffset:$})}f({ranges:v})});return m(),Bt("selectionchange",m)}function BN({doc:e,customElementCb:t}){const i=e.defaultView;return!i||!i.customElements?()=>{}:D_(i.customElements,"define",function(c){return function(u,f,p){try{t({define:{name:u}})}catch{}return c.apply(this,[u,f,p])}})}function VN(e,t={}){const i=e.doc.defaultView;if(!i)return()=>{};let a;e.recordDOM&&(a=vT(e,e.doc));const c=IN(e),u=CN(e),f=ET(e),p=LN(e,{win:i}),m=NN(e),h=UN(e);let v=()=>{},g=()=>{},b=()=>{},T=()=>{};e.recordDOM&&(v=kN(e,{win:i}),g=ST(e,e.doc),b=PN(e,{win:i}),e.collectFonts&&(T=jN(e)));const R=zN(e),x=BN(e),P=[];for(const $ of e.plugins)P.push($.observer($.callback,i,$.options));return Be(()=>{Wa.forEach($=>$.reset()),a?.disconnect(),c(),u(),f(),p(),m(),h(),v(),g(),b(),T(),R(),x(),P.forEach($=>$())})}function Cu(e){return typeof window[e]<"u"}function Lu(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class gm{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,i,a,c){const u=a||this.getIdToRemoteIdMap(t),f=c||this.getRemoteIdToIdMap(t);let p=u.get(i);return p||(p=this.generateIdFn(),u.set(i,p),f.set(p,i)),p}getIds(t,i){const a=this.getIdToRemoteIdMap(t),c=this.getRemoteIdToIdMap(t);return i.map(u=>this.getId(t,u,a,c))}getRemoteId(t,i,a){const c=a||this.getRemoteIdToIdMap(t);if(typeof i!="number")return i;const u=c.get(i);return u||-1}getRemoteIds(t,i){const a=this.getRemoteIdToIdMap(t);return i.map(c=>this.getRemoteId(t,c,a))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let i=this.iframeIdToRemoteIdMap.get(t);return i||(i=new Map,this.iframeIdToRemoteIdMap.set(t,i)),i}getRemoteIdToIdMap(t){let i=this.iframeRemoteIdToIdMap.get(t);return i||(i=new Map,this.iframeRemoteIdToIdMap.set(t,i)),i}}class qN{constructor(){this.crossOriginIframeMirror=new gm(O_),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class HN{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new gm(O_),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new gm(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,i){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:i}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const a=x_(t);a&&a.adoptedStyleSheets&&a.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(a.adoptedStyleSheets,this.mirror.getId(a))}handleMessage(t){const i=t;if(i.data.type!=="rrweb"||i.origin!==i.data.origin||!t.source)return;const c=this.crossOriginIframeMap.get(t.source);if(!c)return;const u=this.transformCrossOriginEvent(c,i.data.event);u&&this.wrappedEmit(u,i.data.isCheckout)}transformCrossOriginEvent(t,i){switch(i.type){case xe.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(i.data.node,t);const a=i.data.node.id;return this.crossOriginIframeRootIdMap.set(t,a),this.patchRootIdOnNode(i.data.node,a),{timestamp:i.timestamp,type:xe.IncrementalSnapshot,data:{source:be.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:i.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case xe.Meta:case xe.Load:case xe.DomContentLoaded:return!1;case xe.Plugin:return i;case xe.Custom:return this.replaceIds(i.data.payload,t,["id","parentId","previousId","nextId"]),i;case xe.IncrementalSnapshot:switch(i.data.source){case be.Mutation:return i.data.adds.forEach(a=>{this.replaceIds(a,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(a.node,t);const c=this.crossOriginIframeRootIdMap.get(t);c&&this.patchRootIdOnNode(a.node,c)}
33),i.data.removes.forEach(a=>{this.replaceIds(a,t,["parentId","id"])}),i.data.attributes.forEach(a=>{this.replaceIds(a,t,["id"])}),i.data.texts.forEach(a=>{this.replaceIds(a,t,["id"])}),i;case be.Drag:case be.TouchMove:case be.MouseMove:return i.data.positions.forEach(a=>{this.replaceIds(a,t,["id"])}),i;case be.ViewportResize:return!1;case be.MediaInteraction:case be.MouseInteraction:case be.Scroll:case be.CanvasMutation:case be.Input:return this.replaceIds(i.data,t,["id"]),i;case be.StyleSheetRule:case be.StyleDeclaration:return this.replaceIds(i.data,t,["id"]),this.replaceStyleIds(i.data,t,["styleId"]),i;case be.Font:return i;case be.Selection:return i.data.ranges.forEach(a=>{this.replaceIds(a,t,["start","end"])}),i;case be.AdoptedStyleSheet:return this.replaceIds(i.data,t,["id"]),this.replaceStyleIds(i.data,t,["styleIds"]),i.data.styles?.forEach(a=>{this.replaceStyleIds(a,t,["styleId"])}),i}}return!1}replace(t,i,a,c){for(const u of c)!Array.isArray(i[u])&&typeof i[u]!="number"||(Array.isArray(i[u])?i[u]=t.getIds(a,i[u]):i[u]=t.getId(a,i[u]));return i}replaceIds(t,i,a){return this.replace(this.crossOriginIframeMirror,t,i,a)}replaceStyleIds(t,i,a){return this.replace(this.crossOriginIframeStyleMirror,t,i,a)}replaceIdOnNode(t,i){this.replaceIds(t,i,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(a=>{this.replaceIdOnNode(a,i)})}patchRootIdOnNode(t,i){t.type!==St.Document&&!t.rootId&&(t.rootId=i),"childNodes"in t&&t.childNodes.forEach(a=>{this.patchRootIdOnNode(a,i)})}}class FN{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class GN{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,i){if(!Ro(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const a=vT({...this.bypassOptions,doc:i,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>a.disconnect()),this.restoreHandlers.push(ET({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Gl(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(ST({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const i=x_(t),a=AN(t);!i||!a||this.patchAttachShadow(a.Element,i)}patchAttachShadow(t,i){const a=this;this.restoreHandlers.push(D_(t.prototype,"attachShadow",function(c){return function(u){const f=c.call(this,u);return this.shadowRoot&&gT(this)&&a.addShadowRoot(this.shadowRoot,i),f}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var gS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",YN=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Mu=0;Mu<gS.length;Mu++)YN[gS.charCodeAt(Mu)]=Mu;class yS{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class $N{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new vN,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,i){"_cssText"in i.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:i.id,attributes:i.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,i){if(t.length===0)return;const a={id:i,styleIds:[]},c=[];for(const u of t){let f;this.styleMirror.has(u)?f=this.styleMirror.getId(u):(f=this.styleMirror.add(u),c.push({styleId:f,rules:Array.from(u.rules||CSSRule,(p,m)=>({rule:eT(p),index:m}))})),a.styleIds.push(f)}c.length>0&&(a.styles=c),this.adoptedStyleSheetCb(a)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class XN{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,i){const a=this.nodeMap.get(t);return a&&Array.from(a).some(c=>c!==i)}add(t,i){this.active||(this.active=!0,bN(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(i))}destroy(){}}let lt,Tl;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Cn=YM();function Sr(e={}){const{emit:t,checkoutEveryNms:i,checkoutEveryNth:a,blockClass:c="rr-block",blockSelector:u=null,unblockSelector:f=null,ignoreClass:p="rr-ignore",ignoreSelector:m=null,maskAllText:h=!1,maskTextClass:v="rr-mask",unmaskTextClass:g=null,maskTextSelector:b=null,unmaskTextSelector:T=null,inlineStylesheet:R=!0,maskAllInputs:x,maskInputOptions:P,slimDOMOptions:$,maskAttributeFn:K,maskInputFn:le,maskTextFn:de,maxCanvasSize:he=null,packFn:re,sampling:z={},dataURLOptions:Z={},mousemoveWait:Ie,recordDOM:J=!0,recordCanvas:ne=!1,recordCrossOriginIframes:fe=!1,recordAfter:De=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:me=!1,collectFonts:He=!1,inlineImages:M=!1,plugins:q,keepIframeSrcFn:H=()=>!1,ignoreCSSAttributes:te=new Set([]),errorHandler:W,onMutation:ce,getCanvasManager:B}=e;wN(W);const X=fe?window.parent===window:!0;let ie=!1;if(!X)try{window.parent.document&&(ie=!1)}catch{ie=!0}if(X&&!t)throw new Error("emit function is required");if(!X&&!ie)return()=>{};Ie!==void 0&&z.mousemove===void 0&&(z.mousemove=Ie),Cn.reset();const _e=x===!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}:P!==void 0?P:{},Re=$===!0||$==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:$==="all",headMetaDescKeywords:$==="all"}:$||{};yN();let se,Ee=0;const ge=je=>{for(const Ut of q||[])Ut.eventProcessor&&(je=Ut.eventProcessor(je));return re&&!ie&&(je=re(je)),je};lt=(je,Ut)=>{const Ce=je;if(Ce.timestamp=Sl(),Wa[0]?.isFrozen()&&Ce.type!==xe.FullSnapshot&&!(Ce.type===xe.IncrementalSnapshot&&Ce.data.source===be.Mutation)&&Wa.forEach(At=>At.unfreeze()),X)t?.(ge(Ce),Ut);else if(ie){const At={type:"rrweb",event:ge(Ce),origin:window.location.origin,isCheckout:Ut};window.parent.postMessage(At,"*")}if(Ce.type===xe.FullSnapshot)se=Ce,Ee=0;else if(Ce.type===xe.IncrementalSnapshot){if(Ce.data.source===be.Mutation&&Ce.data.isAttachIframe)return;Ee++;const At=a&&Ee>=a,Se=i&&se&&Ce.timestamp-se.timestamp>i;(At||Se)&&Ti(!0)}};const We=je=>{lt({type:xe.IncrementalSnapshot,data:{source:be.Mutation,...je}})},ot=je=>lt({type:xe.IncrementalSnapshot,data:{source:be.Scroll,...je}}),at=je=>lt({type:xe.IncrementalSnapshot,data:{source:be.CanvasMutation,...je}}),ra=je=>lt({type:xe.IncrementalSnapshot,data:{source:be.AdoptedStyleSheet,...je}}),Tt=new $N({mutationCb:We,adoptedStyleSheetCb:ra}),ft=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new qN:new HN({mirror:Cn,mutationCb:We,stylesheetManager:Tt,recordCrossOriginIframes:fe,wrappedEmit:lt});for(const je of q||[])je.getMirror&&je.getMirror({nodeMirror:Cn,crossOriginIframeMirror:ft.crossOriginIframeMirror,crossOriginIframeStyleMirror:ft.crossOriginIframeStyleMirror});const nt=new XN,qt=KN(B,{mirror:Cn,win:window,mutationCb:je=>lt({type:xe.IncrementalSnapshot,data:{source:be.CanvasMutation,...je}}),recordCanvas:ne,blockClass:c,blockSelector:u,unblockSelector:f,maxCanvasSize:he,sampling:z.canvas,dataURLOptions:Z,errorHandler:W}),bi=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new FN:new GN({mutationCb:We,scrollCb:ot,bypassOptions:{onMutation:ce,blockClass:c,blockSelector:u,unblockSelector:f,maskAllText:h,maskTextClass:v,unmaskTextClass:g,maskTextSelector:b,unmaskTextSelector:T,inlineStylesheet:R,maskInputOptions:_e,dataURLOptions:Z,maskAttributeFn:K,maskTextFn:de,maskInputFn:le,recordCanvas:ne,inlineImages:M,sampling:z,slimDOMOptions:Re,iframeManager:ft,stylesheetManager:Tt,canvasManager:qt,keepIframeSrcFn:H,processedNodeManager:nt,ignoreCSSAttributes:te},mirror:Cn}),Ti=(je=!1)=>
33{if(!J)return;lt({type:xe.Meta,data:{href:window.location.href,width:dT(),height:lT()}},je),Tt.reset(),bi.init(),Wa.forEach(Ce=>Ce.lock());const Ut=hN(document,{mirror:Cn,blockClass:c,blockSelector:u,unblockSelector:f,maskAllText:h,maskTextClass:v,unmaskTextClass:g,maskTextSelector:b,unmaskTextSelector:T,inlineStylesheet:R,maskAllInputs:_e,maskAttributeFn:K,maskInputFn:le,maskTextFn:de,slimDOM:Re,dataURLOptions:Z,recordCanvas:ne,inlineImages:M,onSerialize:Ce=>{mT(Ce,Cn)&&ft.addIframe(Ce),_T(Ce,Cn)&&Tt.trackLinkElement(Ce),_m(Ce)&&bi.addShadowRoot(Ce.shadowRoot,document)},onIframeLoad:(Ce,At)=>{ft.attachIframe(Ce,At),Ce.contentWindow&&qt.addWindow(Ce.contentWindow),bi.observeAttachShadow(Ce)},onStylesheetLoad:(Ce,At)=>{Tt.attachLinkElement(Ce,At)},onBlockedImageLoad:(Ce,At,{width:Se,height:Ai})=>{We({adds:[],removes:[],texts:[],attributes:[{id:At.id,attributes:{style:{width:`${Se}px`,height:`${Ai}px`}}}]})},keepIframeSrcFn:H,ignoreCSSAttributes:te});if(!Ut)return console.warn("Failed to snapshot the document");lt({type:xe.FullSnapshot,data:{node:Ut,initialOffset:uT(window)}}),Wa.forEach(Ce=>Ce.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Tt.adoptStyleSheets(document.adoptedStyleSheets,Cn.getId(document))};Tl=Ti;try{const je=[],Ut=At=>Be(VN)({onMutation:ce,mutationCb:We,mousemoveCb:(Se,Ai)=>lt({type:xe.IncrementalSnapshot,data:{source:Ai,positions:Se}}),mouseInteractionCb:Se=>lt({type:xe.IncrementalSnapshot,data:{source:be.MouseInteraction,...Se}}),scrollCb:ot,viewportResizeCb:Se=>lt({type:xe.IncrementalSnapshot,data:{source:be.ViewportResize,...Se}}),inputCb:Se=>lt({type:xe.IncrementalSnapshot,data:{source:be.Input,...Se}}),mediaInteractionCb:Se=>lt({type:xe.IncrementalSnapshot,data:{source:be.MediaInteraction,...Se}}),styleSheetRuleCb:Se=>lt({type:xe.IncrementalSnapshot,data:{source:be.StyleSheetRule,...Se}}),styleDeclarationCb:Se=>lt({type:xe.IncrementalSnapshot,data:{source:be.StyleDeclaration,...Se}}),canvasMutationCb:at,fontCb:Se=>lt({type:xe.IncrementalSnapshot,data:{source:be.Font,...Se}}),selectionCb:Se=>{lt({type:xe.IncrementalSnapshot,data:{source:be.Selection,...Se}})},customElementCb:Se=>{lt({type:xe.IncrementalSnapshot,data:{source:be.CustomElement,...Se}})},blockClass:c,ignoreClass:p,ignoreSelector:m,maskAllText:h,maskTextClass:v,unmaskTextClass:g,maskTextSelector:b,unmaskTextSelector:T,maskInputOptions:_e,inlineStylesheet:R,sampling:z,recordDOM:J,recordCanvas:ne,inlineImages:M,userTriggeredOnInput:me,collectFonts:He,doc:At,maskAttributeFn:K,maskInputFn:le,maskTextFn:de,keepIframeSrcFn:H,blockSelector:u,unblockSelector:f,slimDOMOptions:Re,dataURLOptions:Z,mirror:Cn,iframeManager:ft,stylesheetManager:Tt,shadowDomManager:bi,processedNodeManager:nt,canvasManager:qt,ignoreCSSAttributes:te,plugins:q?.filter(Se=>Se.observer)?.map(Se=>({observer:Se.observer,options:Se.options,callback:Ai=>lt({type:xe.Plugin,data:{plugin:Se.name,payload:Ai}})}))||[]},{});ft.addLoadListener(At=>{try{je.push(Ut(At.contentDocument))}catch(Se){console.warn(Se)}});const Ce=()=>{Ti(),je.push(Ut(document))};return document.readyState==="interactive"||document.readyState==="complete"?Ce():(je.push(Bt("DOMContentLoaded",()=>{lt({type:xe.DomContentLoaded,data:{}}),De==="DOMContentLoaded"&&Ce()})),je.push(Bt("load",()=>{lt({type:xe.Load,data:{}}),De==="load"&&Ce()},window))),()=>{je.forEach(At=>At()),nt.destroy(),Tl=void 0,xN()}}catch(je){console.warn(je)}}function QN(e){if(!Tl)throw new Error("please take full snapshot after start recording");Tl(e)}Sr.mirror=Cn;Sr.takeFullSnapshot=QN;function KN(e,t){try{return e?e(t):new yS}catch{return console.warn("Unable to initialize CanvasManager"),new yS}}var vS;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(vS||(vS={}));const JN=3,WN=5;function I_(e){return e>9999999999?e:e*1e3}function Pp(e){return e>9999999999?e/1e3:e}function ic(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>
33(e.throttledAddEvent({type:xe.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ln(t,10,1e3)}}),t.category==="console")))}const ZN="button,a";function bT(e){return e.closest(ZN)||e}function TT(e){const t=AT(e);return!t||!(t instanceof Element)?t:bT(t)}function AT(e){return ek(e)?e.target:e}function ek(e){return typeof e=="object"&&!!e&&"target"in e}let si;function tk(e){return si||(si=[],nk()),si.push(e),()=>{const t=si?si.indexOf(e):-1;t>-1&&si.splice(t,1)}}function nk(){Jt(tt,"open",function(e){return function(...t){if(si)try{si.forEach(i=>i())}catch{}return e.apply(tt,t)}})}const rk=new Set([be.Mutation,be.StyleSheetRule,be.StyleDeclaration,be.AdoptedStyleSheet,be.CanvasMutation,be.Selection,be.MediaInteraction]);function ik(e,t,i){e.handleClick(t,i)}class ak{constructor(t,i,a=ic){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=i.timeout/1e3,this._threshold=i.threshold/1e3,this._scrollTimeout=i.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=i.ignoreSelector,this._addBreadcrumbEvent=a}addListeners(){const t=tk(()=>{this._lastMutation=ES()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,i){if(ok(i,this._ignoreSelector)||!ck(t))return;const a={timestamp:Pp(t.timestamp),clickBreadcrumb:t,clickCount:0,node:i};this._clicks.some(c=>c.node===a.node&&Math.abs(c.timestamp-a.timestamp)<1)||(this._clicks.push(a),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Pp(t)}registerScroll(t=Date.now()){this._lastScroll=Pp(t)}registerClick(t){const i=bT(t);this._handleMultiClick(i)}_handleMultiClick(t){this._getClicks(t).forEach(i=>{i.clickCount++})}_getClicks(t){return this._clicks.filter(i=>i.node===t)}_checkClicks(){const t=[],i=ES();this._clicks.forEach(a=>{!a.mutationAfter&&this._lastMutation&&(a.mutationAfter=a.timestamp<=this._lastMutation?this._lastMutation-a.timestamp:void 0),!a.scrollAfter&&this._lastScroll&&(a.scrollAfter=a.timestamp<=this._lastScroll?this._lastScroll-a.timestamp:void 0),a.timestamp+this._timeout<=i&&t.push(a)});for(const a of t){const c=this._clicks.indexOf(a);c>-1&&(this._generateBreadcrumbs(a),this._clicks.splice(c,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const i=this._replay,a=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,c=t.mutationAfter&&t.mutationAfter<=this._threshold,u=!a&&!c,{clickCount:f,clickBreadcrumb:p}=t;if(u){const m=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,h=m<this._timeout*1e3?"mutation":"timeout",v={type:"default",message:p.message,timestamp:p.timestamp,category:"ui.slowClickDetected",data:{...p.data,url:tt.location.href,route:i.getCurrentRoute(),timeAfterClickMs:m,endReason:h,clickCount:f||1}};this._addBreadcrumbEvent(i,v);return}if(f>1){const m={type:"default",message:p.message,timestamp:p.timestamp,category:"ui.multiClick",data:{...p.data,url:tt.location.href,route:i.getCurrentRoute(),clickCount:f,metric:!0}};this._addBreadcrumbEvent(i,m)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=nc(()=>this._checkClicks(),1e3)}}const sk=["A","BUTTON","INPUT"];function ok(e,t){return!!(!sk.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 ck(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function ES(){return Date.now()/1e3}function uk(e,t){try{if(!lk(t))return;const{source:i}=t.data;if(rk.has(i)&&e.registerMutation(t.timestamp),i===be.Scroll&&e.registerScroll(t.timestamp),dk(t)){const{type:a,id:c}=t.data,u=Sr.mirror.getNode(c);u instanceof HTMLElement&&a===zt.Click&&e.registerClick(u)}}catch{}}function lk(e){return e.type===JN}function dk(e){return e.data.source===be.MouseInteraction}function Fn(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var C_=(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))(C_||{});const fk=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function pk(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const i in e)if(fk.has(i)){let a=i;(i==="data-testid"||i==="data-test-id")&&(a="testId"),t[a]=e[i]}return t}const mk=e=>t=>{if(!e.isEnabled())return;const i=_k(t);if(!i)return;const a=t.name==="click",c=a?t.event:void 0;a&&e.clickDetector&&c?.target&&!c.altKey&&!c.metaKey&&!c.ctrlKey&&!c.shiftKey&&ik(e.clickDetector,i,TT(t.event)),ic(e,i)};function RT(e,t){const i=Sr.mirror.getId(e),a=i&&Sr.mirror.getNode(i),c=a&&Sr.mirror.getMeta(a),u=c&&gk(c)?c:null;return{message:t,data:u?{nodeId:i,node:{id:i,tagName:u.tagName,textContent:Array.from(u.childNodes).map(f=>
33f.type===C_.Text&&f.textContent).filter(Boolean).map(f=>f.trim()).join(""),attributes:pk(u.attributes)}}:{}}}function _k(e){const{target:t,message:i}=hk(e);return Fn({category:`ui.${e.name}`,...RT(t,i)})}function hk(e){const t=e.name==="click";let i,a=null;try{a=t?TT(e.event):AT(e.event),i=Wt(a,{maxStringLength:200})||"<unknown>"}catch{i="<unknown>"}return{target:a,message:i}}function gk(e){return e.type===C_.Element}function yk(e,t){if(!e.isEnabled())return;e.updateUserActivity();const i=vk(t);i&&ic(e,i)}function vk(e){const{metaKey:t,shiftKey:i,ctrlKey:a,altKey:c,key:u,target:f}=e;if(!f||Ek(f)||!u)return null;const p=t||a||c,m=u.length===1;if(!p&&m)return null;const h=Wt(f,{maxStringLength:200})||"<unknown>",v=RT(f,h);return Fn({category:"ui.keyDown",message:h,data:{...v.data,metaKey:t,shiftKey:i,ctrlKey:a,altKey:c,key:u}})}function Ek(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const Sk={resource:Ok,paint:Ak,navigation:Rk};function Up(e,t){return({metric:i})=>{t.replayPerformanceEntries.push(e(i))}}function bk(e){return e.map(Tk).filter(Boolean)}function Tk(e){const t=Sk[e.entryType];return t?t(e):null}function ds(e){return((en()||tt.performance.timeOrigin)+e)/1e3}function Ak(e){const{duration:t,entryType:i,name:a,startTime:c}=e,u=ds(c);return{type:i,name:a,start:u,end:u+t,data:void 0}}function Rk(e){const{entryType:t,name:i,decodedBodySize:a,duration:c,domComplete:u,encodedBodySize:f,domContentLoadedEventStart:p,domContentLoadedEventEnd:m,domInteractive:h,loadEventStart:v,loadEventEnd:g,redirectCount:b,startTime:T,transferSize:R,type:x}=e;return c===0?null:{type:`${t}.${x}`,start:ds(T),end:ds(u),name:i,data:{size:R,decodedBodySize:a,encodedBodySize:f,duration:c,domInteractive:h,domContentLoadedEventStart:p,domContentLoadedEventEnd:m,loadEventStart:v,loadEventEnd:g,domComplete:u,redirectCount:b}}}function Ok(e){const{entryType:t,initiatorType:i,name:a,responseEnd:c,startTime:u,decodedBodySize:f,encodedBodySize:p,responseStatus:m,transferSize:h}=e;return["fetch","xmlhttprequest"].includes(i)?null:{type:`${t}.${i}`,start:ds(u),end:ds(c),name:a,data:{size:h,statusCode:m,decodedBodySize:f,encodedBodySize:p}}}function Dk(e){const t=e.entries[e.entries.length-1],i=t?.element?[t.element]:void 0;return L_(e,"largest-contentful-paint",i)}function wk(e){return e.sources!==void 0}function xk(e){const t=[],i=[];for(const a of e.entries)if(wk(a)){const c=[];for(const u of a.sources)if(u.node){i.push(u.node);const f=Sr.mirror.getId(u.node);f&&c.push(f)}t.push({value:a.value,nodeIds:c.length?c:void 0})}return L_(e,"cumulative-layout-shift",i,t)}function Ik(e){const t=e.entries[e.entries.length-1],i=t?.target?[t.target]:void 0;return L_(e,"interaction-to-next-paint",i)}function L_(e,t,i,a){const c=e.value,u=e.rating,f=ds(c);return{type:"web-vital",name:t,start:f,end:f,data:{value:c,size:c,rating:u,nodeIds:i?i.map(p=>Sr.mirror.getId(p)):void 0,attributions:a}}}function Ck(e){function t(c){e.performanceEntries.includes(c)||e.performanceEntries.push(c)}function i({entries:c}){c.forEach(t)}const a=[];return["navigation","paint","resource"].forEach(c=>{a.push(ea(c,i))}),a.push(E_(Up(Dk,e)),v_(Up(xk,e)),zb(Up(Ik,e))),()=>{a.forEach(c=>c())}}const ye=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Lk='
vendor: 10,329 bytes, line 33
33var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});
33';function Mk(){const e=new Blob([Lk]);return URL.createObjectURL(e)}const SS=["log","warn","error"],Wu="[Replay] ";function jp(e,t="info"){fi({category:"console",data:{logger:"replay"},level:t,message:`${Wu}${e}`},{level:t})}function Nk(){let e=!1,t=!1;const i={exception:()=>{},infoTick:()=>{},setConfig:a=>{e=!!a.captureExceptions,t=!!a.traceInternals}};return ye?(SS.forEach(a=>{i[a]=(...c)=>{G[a](Wu,...c),t&&jp(c.join(""),bb(a))}}),i.exception=(a,...c)=>{c.length&&i.error&&i.error(...c),G.error(Wu,a),e?a_(a,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&jp(a,"error")},i.infoTick=(...a)=>{G.log(Wu,...a),t&&setTimeout(()=>jp(a[0]),0)}):SS.forEach(a=>{i[a]=()=>{}}),i}const ve=Nk();class M_ extends Error{constructor(){super(`Event buffer exceeded maximum size of ${A_}.`)}}class OT{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const i=JSON.stringify(t).length;if(this._totalSize+=i,this._totalSize>A_)throw new M_;this.events.push(t)}finish(){return new Promise(t=>{const i=this.events;this.clear(),t(JSON.stringify(i))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(i=>i.timestamp).sort()[0];return t?I_(t):null}}class kk{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,i)=>{this._worker.addEventListener("message",({data:a})=>{a.success?t():(ye&&ve.warn("Received worker message with unsuccessful status",a),i(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",a=>{ye&&ve.warn("Failed to load Replay compression worker",a),i(new Error(`Failed to load Replay compression worker: ${a instanceof ErrorEvent&&a.message?a.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){ye&&ve.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,i){const a=this._getAndIncrementId();return new Promise((c,u)=>{const f=({data:p})=>{const m=p;if(m.method===t&&m.id===a){if(this._worker.removeEventListener("message",f),!m.success){ye&&ve.error("Error in compression worker: ",m.response),u(new Error("Error in compression worker"));return}c(m.response)}};this._worker.addEventListener("message",f),this._worker.postMessage({id:a,method:t,arg:i})})}_getAndIncrementId(){return this._id++}}class Pk{constructor(t){this._worker=new kk(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 i=I_(t.timestamp);(!this._earliestTimestamp||i<this._earliestTimestamp)&&(this._earliestTimestamp=i);const a=JSON.stringify(t);return this._totalSize+=a.length,this._totalSize>A_?Promise.reject(new M_):this._sendEventToWorker(a)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{ye&&ve.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class Uk{constructor(t){this._fallback=new OT,this._compression=new Pk(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}
33ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){ye&&ve.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:i,waitForCheckout:a}=this._fallback,c=[];for(const u of t)c.push(this._compression.addEvent(u));this._compression.hasCheckout=i,this._compression.waitForCheckout=a,this._used=this._compression;try{await Promise.all(c),this._fallback.clear()}catch(u){ye&&ve.exception(u,"Failed to add events when switching buffers.")}}}function jk({useCompression:e,workerUrl:t}){if(e&&window.Worker){const i=zk(t);if(i)return i}return ye&&ve.log("Using simple buffer"),new OT}function zk(e){try{const t=e||Bk();if(!t)return;ye&&ve.log(`Using compression worker${e?` from ${e}`:""}`);const i=new Worker(t);return new Uk(i)}catch(t){ye&&ve.exception(t,"Failed to create compression worker")}}function Bk(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Mk():""}function N_(){try{return"sessionStorage"in tt&&!!tt.sessionStorage}catch{return!1}}function Vk(e){qk(),e.session=void 0}
33function qk(){if(N_())try{tt.sessionStorage.removeItem(b_)}catch{}}function DT(e){return e===void 0?!1:Math.random()<e}function Yl(e){if(N_())try{tt.sessionStorage.setItem(b_,JSON.stringify(e))}catch{}}function wT(e){const t=Date.now(),i=e.id||fn(),a=e.started||t,c=e.lastActivity||t,u=e.segmentId||0,f=e.sampled,p=e.previousSessionId,m=e.dirty||!1;return{id:i,started:a,lastActivity:c,segmentId:u,sampled:f,previousSessionId:p,dirty:m}}function Hk(e,t){return DT(e)?"session":t?"buffer":!1}function bS({sessionSampleRate:e,allowBuffering:t,stickySession:i=!1},{previousSessionId:a}={}){const c=Hk(e,t),u=wT({sampled:c,previousSessionId:a});return i&&Yl(u),u}function Fk(){if(!N_())return null;try{const e=tt.sessionStorage.getItem(b_);if(!e)return null;const t=JSON.parse(e);return ye&&ve.infoTick("Loading existing session"),wT(t)}catch{return null}}function ym(e,t,i=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=i}function xT(e,{maxReplayDuration:t,sessionIdleExpire:i,targetTime:a=Date.now()}){return ym(e.started,t,a)||ym(e.lastActivity,i,a)}function IT(e,{sessionIdleExpire:t,maxReplayDuration:i}){return!(!xT(e,{sessionIdleExpire:t,maxReplayDuration:i})||e.sampled==="buffer"&&e.segmentId===0)}function zp({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:i},a){const c=a.stickySession&&Fk();return c?IT(c,{sessionIdleExpire:e,maxReplayDuration:t})?(ye&&ve.infoTick("Session in sessionStorage is expired, creating new one..."),bS(a,{previousSessionId:c.id})):c:(ye&&ve.infoTick("Creating new session"),bS(a,{previousSessionId:i}))}function Gk(e){return e.type===xe.Custom}function k_(e,t,i){return LT(e,t)?(CT(e,t,i),!0):!1}function Yk(e,t,i){return LT(e,t)?CT(e,t,i):Promise.resolve(null)}async function CT(e,t,i){const{eventBuffer:a}=e;if(!a||a.waitForCheckout&&!i)return null;const c=e.recordingMode==="buffer";try{i&&c&&a.clear(),i&&(a.hasCheckout=!0,a.waitForCheckout=!1);const u=e.getOptions(),f=$k(t,u.beforeAddRecordingEvent);return f?await a.addEvent(f):void 0}catch(u){const f=u&&u instanceof M_,p=f?"addEventSizeExceeded":"addEvent",m=Te();if(m){const h=f?"buffer_overflow":"internal_sdk_error";m.recordDroppedEvent(h,"replay")}if(f&&c)return a.clear(),a.waitForCheckout=!0,null;e.handleException(u),await e.stop({reason:p})}}function LT(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const i=I_(t.timestamp);return i+e.timeouts.sessionIdlePause<Date.now()?!1:i>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(ye&&ve.infoTick(`Skipping event with timestamp ${i} because it is after maxReplayDuration`),!1):!0}function $k(e,t){try{if(typeof t=="function"&&Gk(e))return t(e)}catch(i){return ye&&ve.exception(i,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function P_(e){return!e.type}function vm(e){return e.type==="transaction"}function Xk(e){return e.type==="replay_event"}function TS(e){return e.type==="feedback"}function Qk(e){return(t,i)=>{if(!e.isEnabled()||!P_(t)&&!vm(t))return;const a=i.statusCode;if(!(!a||a<200||a>=300)){if(vm(t)){Kk(e,t);return}Jk(e,t)}}}function Kk(e,t){const i=e.getContext();t.contexts?.trace?.trace_id&&i.traceIds.size<100&&i.traceIds.add(t.contexts.trace.trace_id)}function Jk(e,t){const i=e.getContext();if(t.event_id&&i.errorIds.size<100&&i.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;const{beforeErrorSampling:a}=e.getOptions();typeof a=="function"&&!a(t)||nc(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(c){e.handleException(c)}})}function Wk(e){return t=>{!e.isEnabled()||!P_(t)||Zk(e,t)}}function Zk(e,t){const i=t.exception?.values?.[0]?.value;if(typeof i=="string"&&(i.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||i.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const a=Fn({category:"replay.hydrate-error",data:{url:gs()}});ic(e,a)}}function eP(e){const t=Te();t&&t.on("beforeAddBreadcrumb",i=>tP(e,i))}function tP(e,t){if(!e.isEnabled()||!MT(t))return;const i=nP(t);i&&ic(e,i)}function nP(e){return!MT(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?rP(e):Fn(e)}function rP(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return Fn(e);let i=!1;const a=t.map(c=>{if(!c)return c;if(typeof c=="string")return c.length>Iu?(i=!0,`${c.slice(0,Iu)}…`):c;if(typeof c=="object")try{const u=Ln(c,7);return JSON.stringify(u).length>Iu?(i=!0,`${JSON.stringify(u,null,2).slice(0,Iu)}…`):u}catch{}return c});return Fn({...e,data:{...e.data,arguments:a,...i?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function MT(e){return!!e.category}function iP(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function NT(){const e=qe().getPropagationContext().dsc;e&&delete e.replay_id;const t=Pt();if(t){const i=Pn(t);delete i.replay_id}}function aP(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:xe.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 sP(e,t){return e.recordingMode!=="buffer"||t.message===T_||!t.exception||t.type?!1:DT(e.getOptions().errorSampleRate)}function oP(e){return Object.assign((t,i)=>
33{if(!e.isEnabled()||e.isPaused())return t;if(Xk(t))return delete t.breadcrumbs,t;if(!P_(t)&&!vm(t)&&!TS(t))return t;if(!e.checkAndHandleExpiredSession())return NT(),t;if(TS(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),aP(e,t),t;if(iP(t,i)&&!e.getOptions()._experiments.captureExceptions)return ye&&ve.log("Ignoring error from rrweb internals",t),null;const c=sP(e,t);if((c||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),c&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const f=e.session;f.dirty=!0,e.getOptions().stickySession&&Yl(f)}return t},{id:"Replay"})}function $l(e,t){return t.map(({type:i,start:a,end:c,name:u,data:f})=>{const p=e.throttledAddEvent({type:xe.Custom,timestamp:a,data:{tag:"performanceSpan",payload:{op:i,description:u,startTimestamp:a,endTimestamp:c,data:f}}});return typeof p=="string"?Promise.resolve(null):p})}function cP(e){const{from:t,to:i}=e,a=Date.now()/1e3;return{type:"navigation.push",start:a,end:a,name:i,data:{previous:t}}}function uP(e){return t=>{if(!e.isEnabled())return;const i=cP(t);i!==null&&(e.getContext().urls.push(i.name),e.triggerUserActivity(),e.addUpdate(()=>($l(e,[i]),!1)))}}function lP(e,t){return ye&&e.getOptions()._experiments.traceInternals?!1:Px(t,Te())}function kT(e,t){e.isEnabled()&&t!==null&&(lP(e,t.name)||e.addUpdate(()=>($l(e,[t]),!0)))}function Xl(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 i=Xb(e);return t.encode(i).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function PT(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Al(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const i={...e._meta},a=i.warnings||[];return i.warnings=[...a,t],e._meta=i,e}function UT(e,t){if(!t)return null;const{startTimestamp:i,endTimestamp:a,url:c,method:u,statusCode:f,request:p,response:m}=t;return{type:e,start:i/1e3,end:a/1e3,name:c,data:{method:u,statusCode:f,request:p,response:m}}}function Po(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function li(e,t,i){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!i)return{headers:e,size:t};const a={headers:e,size:t},{body:c,warnings:u}=dP(i);return a.body=c,u?.length&&(a._meta={warnings:u}),a}function Em(e,t){return Object.entries(e).reduce((i,[a,c])=>{const u=a.toLowerCase();return t.includes(u)&&e[a]&&(i[u]=c),i},{})}function dP(e){if(!e||typeof e!="string")return{body:e};const t=e.length>rS,i=fP(e);if(t){const a=e.slice(0,rS);return i?{body:a,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${a}…`,warnings:["TEXT_TRUNCATED"]}}if(i)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function fP(e){const t=e[0],i=e[e.length-1];return t==="["&&i==="]"||t==="{"&&i==="}"}function Rl(e,t){const i=pP(e);return vr(i,t)}function pP(e,t=tt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(tt.location.origin))return e;const i=new URL(e,t);if(i.origin!==new URL(t).origin)return e;const a=i.href;return!e.endsWith("/")&&a.endsWith("/")?a.slice(0,-1):a}async function mP(e,t,i){try{const a=await hP(e,t,i),c=UT("resource.fetch",a);kT(i.replay,c)}catch(a){ye&&ve.exception(a,"Failed to capture fetch breadcrumb")}}function _P(e,t){const{input:i,response:a}=t,c=i?Kb(i):void 0,u=Xl(c),f=a?PT(a.headers.get("content-length")):void 0;u!==void 0&&(e.data.request_body_size=u),f!==void 0&&(e.data.response_body_size=f)}async function hP(e,t,i){const a=Date.now(),{startTimestamp:c=a,endTimestamp:u=a}=t,{url:f,method:p,status_code:m=0,request_body_size:h,response_body_size:v}=e.data,g=Rl(f,i.networkDetailAllowUrls)&&!Rl(f,i.networkDetailDenyUrls),b=g?gP(i,t.input,h):Po(h),T=await yP(g,i,t.response,v);return{startTimestamp:c,endTimestamp:u,url:f,method:p,statusCode:m,request:b,response:T}}function gP({networkCaptureBodies:e,networkRequestHeaders:t},i,a){const c=i?SP(i,t):{};if(!e)return li(c,a,void 0);
33const u=Kb(i),[f,p]=Qb(u,ve),m=li(c,a,f);return p?Al(m,p):m}async function yP(e,{networkCaptureBodies:t,networkResponseHeaders:i},a,c){if(!e&&c!==void 0)return Po(c);const u=a?jT(a.headers,i):{};if(!a||!t&&c!==void 0)return li(u,c,void 0);const[f,p]=await EP(a),m=vP(f,{networkCaptureBodies:t,responseBodySize:c,captureDetails:e,headers:u});return p?Al(m,p):m}function vP(e,{networkCaptureBodies:t,responseBodySize:i,captureDetails:a,headers:c}){try{const u=e?.length&&i===void 0?Xl(e):i;return a?t?li(c,u,e):li(c,u,void 0):Po(u)}catch(u){return ye&&ve.exception(u,"Failed to serialize response body"),li(c,i,void 0)}}async function EP(e){const t=bP(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await TP(t)]}catch(i){return i instanceof Error&&i.message.indexOf("Timeout")>-1?(ye&&ve.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(ye&&ve.exception(i,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function jT(e,t){const i={};return t.forEach(a=>{e.get(a)&&(i[a]=e.get(a))}),i}function SP(e,t){return e.length===1&&typeof e[0]!="string"?AS(e[0],t):e.length===2?AS(e[1],t):{}}function AS(e,t){if(!e)return{};const i=e.headers;return i?i instanceof Headers?jT(i,t):Array.isArray(i)?{}:Em(i,t):{}}function bP(e){try{return e.clone()}catch(t){ye&&ve.exception(t,"Failed to clone response body")}}function TP(e){return new Promise((t,i)=>{const a=nc(()=>i(new Error("Timeout while trying to read response body")),500);AP(e).then(c=>t(c),c=>i(c)).finally(()=>clearTimeout(a))})}async function AP(e){return await e.text()}async function RP(e,t,i){try{const a=DP(e,t,i),c=UT("resource.xhr",a);kT(i.replay,c)}catch(a){ye&&ve.exception(a,"Failed to capture xhr breadcrumb")}}function OP(e,t){const{xhr:i,input:a}=t;if(!i)return;const c=Xl(a),u=i.getResponseHeader("content-length")?PT(i.getResponseHeader("content-length")):IP(i.response,i.responseType);c!==void 0&&(e.data.request_body_size=c),u!==void 0&&(e.data.response_body_size=u)}function DP(e,t,i){const a=Date.now(),{startTimestamp:c=a,endTimestamp:u=a,input:f,xhr:p}=t,{url:m,method:h,status_code:v=0,request_body_size:g,response_body_size:b}=e.data;if(!m)return null;if(!p||!Rl(m,i.networkDetailAllowUrls)||Rl(m,i.networkDetailDenyUrls)){const re=Po(g),z=Po(b);return{startTimestamp:c,endTimestamp:u,url:m,method:h,statusCode:v,request:re,response:z}}const T=p[Gi],R=T?Em(T.request_headers,i.networkRequestHeaders):{},x=Em(Jb(p),i.networkResponseHeaders),[P,$]=i.networkCaptureBodies?Qb(f,ve):[void 0],[K,le]=i.networkCaptureBodies?wP(p):[void 0],de=li(R,g,P),he=li(x,b,K);return{startTimestamp:c,endTimestamp:u,url:m,method:h,statusCode:v,request:$?Al(de,$):de,response:le?Al(he,le):he}}function wP(e){const t=[];try{return[e.responseText]}catch(i){t.push(i)}try{return xP(e.response,e.responseType)}catch(i){t.push(i)}return ye&&ve.warn("Failed to get xhr response body",...t),[void 0]}function xP(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(i){return ye&&ve.exception(i,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return ye&&ve.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function IP(e,t){try{const i=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Xl(i)}catch{return}}function CP(e){const t=Te();try{const{networkDetailAllowUrls:i,networkDetailDenyUrls:a,networkCaptureBodies:c,networkRequestHeaders:u,networkResponseHeaders:f}=e.getOptions(),p={replay:e,networkDetailAllowUrls:i,networkDetailDenyUrls:a,networkCaptureBodies:c,networkRequestHeaders:u,networkResponseHeaders:f};t&&t.on("beforeAddBreadcrumb",(m,h)=>LP(p,m,h))}catch{}}function LP(e,t,i){if(t.data)try{MP(t)&&kP(i)&&(OP(t,i),RP(t,i,e)),NP(t)&&PP(i)&&(_P(t,i),mP(t,i,e))}catch(a){ye&&ve.exception(a,"Error when enriching network breadcrumb")}}function MP(e){return e.category==="xhr"}function NP(e){return e.category==="fetch"}function kP(e){return e?.xhr}function PP(e){return e?.response}function UP(e){const t=Te();Gb(mk(e)),ql(uP(e)),eP(e),CP(e);const i=oP(e);Xw(i),t&&(t.on("beforeSendEvent",Wk(e)),t.on("afterSendEvent",Qk(e)),t.on("createDsc",a=>{const c=e.getSessionId();c&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(a.replay_id=c)}),t.on("spanStart",a=>{e.lastActiveSpan=a}),t.on("spanEnd",a=>{e.lastActiveSpan=a}),t.on("beforeSendFeedback",async(a,c)=>{const u=e.getSessionId();c?.includeReplay&&e.isEnabled()&&u&&a.contexts?.feedback&&(a.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),a.contexts.feedback.replay_id=u)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function jP(e){try{return Promise.all($l(e,[zP(tt.performance.memory)]))}catch{return[]}}function zP(e){const{jsHeapSizeLimit:t,totalJSHeapSize:i,usedJSHeapSize:a}=e,c=Date.now()/1e3;return{type:"memory",name:"memory",start:c,end:c,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:i,usedJSHeapSize:a}}}}function BP(e,t,i){return qx(e,t,{...i,setTimeoutImpl:nc})}const Nu=Ne.navigator;function VP(){return/iPhone|iPad|iPod/i.test(Nu?.userAgent??"")||/Macintosh/i.test(Nu?.userAgent??"")&&Nu?.maxTouchPoints&&Nu?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function qP(e){let t=!1;return(i,a)=>
33{if(!e.checkAndHandleExpiredSession()){ye&&ve.warn("Received replay event after session expired.");return}const c=a||!t;t=!0,e.clickDetector&&uk(e.clickDetector,i),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&c&&e.setInitialState(),!k_(e,i,c))return!0;if(!c)return!1;const u=e.session;if(FP(e,c),e.recordingMode==="buffer"&&u&&e.eventBuffer&&!u.dirty){const f=e.eventBuffer.getEarliestTimestamp();f&&(ye&&ve.log(`Updating session start time to earliest event in buffer to ${new Date(f)}`),u.started=f,e.getOptions().stickySession&&Yl(u))}return u?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function HP(e){const t=e.getOptions();return{type:xe.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 FP(e,t){!t||e.session?.segmentId!==0||k_(e,HP(e),!1)}function GP(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function YP(e,t,i,a){return Ei($0(e,e_(e),a,i),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function $P({recordingData:e,headers:t}){let i;const a=`${JSON.stringify(t)}
34`;if(typeof e=="string")i=`${a}${e}`;else{const u=new TextEncoder().encode(a);i=new Uint8Array(u.length+e.length),i.set(u),i.set(e,u.length)}return i}async function XP({client:e,scope:t,replayId:i,event:a}){const c=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,u={event_id:i,integrations:c};e.emit("preprocessEvent",a,u);const f=await W0(e.getOptions(),a,u,t,e,_t());if(!f)return null;e.emit("postprocessEvent",f,u),f.platform=f.platform||"javascript";const p=e.getSdkMetadata(),{name:m,version:h,settings:v}=p?.sdk||{};return f.sdk={...f.sdk,name:m||"sentry.javascript.unknown",version:h||"0.0.0",settings:v},f}async function QP({recordingData:e,replayId:t,segmentId:i,eventContext:a,timestamp:c,session:u}){const f=$P({recordingData:e,headers:{segment_id:i}}),{urls:p,errorIds:m,traceIds:h,initialTimestamp:v}=a,g=Te(),b=qe(),T=g?.getTransport(),R=g?.getDsn();if(!g||!T||!R||!u.sampled)return Promise.resolve({});const x={type:RM,replay_start_timestamp:v/1e3,timestamp:c/1e3,error_ids:m,trace_ids:h,urls:p,replay_id:t,segment_id:i,replay_type:u.sampled},P=await XP({scope:b,client:g,replayId:t,event:x});if(!P)return g.recordDroppedEvent("event_processor","replay"),ye&&ve.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete P.sdkProcessingMetadata;const $=YP(P,f,R,g.getOptions().tunnel);let K;try{K=await T.send($)}catch(de){const he=new Error(T_);try{he.cause=de}catch{}throw he}const le=fb({},K);if(db(le,"replay"))throw new U_(le);if(typeof K.statusCode=="number"&&(K.statusCode<200||K.statusCode>=300))throw new zT(K.statusCode);return K}class zT extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class U_ extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class RS extends Error{constructor(){super("Session is too long, not sending replay")}}async function BT(e,t={count:0,interval:CM}){const{recordingData:i,onError:a}=e;if(i.length)try{return await QP(e),!0}catch(c){if(c instanceof zT||c instanceof U_)throw c;if(eb("Replays",{_retryCount:t.count}),a&&a(c),t.count>=LM){const u=new Error(`${T_} - max retries exceeded`);try{u.cause=c}catch{}throw u}return t.interval*=++t.count,new Promise((u,f)=>{nc(async()=>{try{await BT(e,t),u(!0)}catch(p){f(p)}},t.interval)})}}const VT="__THROTTLED",KP="__SKIPPED";function JP(e,t,i){const a=new Map,c=p=>{const m=p-i;a.forEach((h,v)=>{v<m&&a.delete(v)})},u=()=>[...a.values()].reduce((p,m)=>p+m,0);let f=!1;return(...p)=>{const m=Math.floor(Date.now()/1e3);if(c(m),u()>=t){const v=f;return f=!0,v?KP:VT}f=!1;const h=a.get(m)||0;return a.set(m,h+1),e(...p)}}class WP{constructor({options:t,recordingOptions:i}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:OM,sessionIdleExpire:DM},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=i,this._options=t,this._debouncedFlush=BP(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=JP((f,p)=>Yk(this,f,p),300,5);const{slowClickTimeout:a,slowClickIgnoreSelectors:c}=this.getOptions(),u=a?{threshold:Math.min(MM,a),timeout:a,scrollTimeout:NM,ignoreSelector:c?c.join(","):""}:void 0;if(u&&(this.clickDetector=new ak(this,u)),ye){const f=t._experiments;ve.setConfig({captureExceptions:!!f.captureExceptions,traceInternals:!!f.traceInternals})}this._handleVisibilityChange=()=>{tt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroun
34dTasks()},this._handleWindowBlur=()=>{const f=Fn({category:"ui.blur"});this._doChangeToBackgroundTasks(f)},this._handleWindowFocus=()=>{const f=Fn({category:"ui.focus"});this._doChangeToForegroundTasks(f)},this._handleKeyboardEvent=f=>{yk(this,f)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){ye&&ve.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:i,sessionSampleRate:a}=this._options,c=i<=0&&a<=0;if(this._requiresManualStart=c,!c){if(this._initializeSessionForSampling(t),!this.session){ye&&ve.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",ye&&ve.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){ye&&ve.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){ye&&ve.log("Buffering is in progress, call `flush()` to save the replay");return}ye&&ve.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=zp({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){ye&&ve.log("Buffering is in progress, call `flush()` to save the replay");return}ye&&ve.infoTick("Starting replay in buffer mode");const t=zp({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=Sr({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:IM}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:qP(this),...VP(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:i}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{ye&&ve.log(`Stopping Replay${i?` triggered by ${i}`:""}`),NT(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,Vk(this)}catch(a){this.handleException(a)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),ye&&ve.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),ye&&ve.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const i=Date.now();ye&&ve.log("Converting buffer to session"),await this.flushImmediate();const a=this.stopRecording();!t||!a||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(i),this._updateSessionActivity(i),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const i=t();this.recordingMode==="buffer"||!this._isEnabled||i!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}
34checkAndHandleExpiredSession(){if(this._lastActivity&&ym(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${tt.location.pathname}${tt.location.hash}${tt.location.search}`,i=`${tt.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=i,this._context.initialTimestamp=Date.now(),this._context.urls.push(i)}throttledAddEvent(t,i){const a=this._throttledAddEvent(t,i);if(a===VT){const c=Fn({category:"replay.throttled"});this.addUpdate(()=>!k_(this,{type:WN,timestamp:c.timestamp||0,data:{tag:"breadcrumb",payload:c,metric:!0}}))}return a}getCurrentRoute(){const t=this.lastActiveSpan||Pt(),i=t&&kt(t),c=(i&&Ve(i).data||{})[Rn];if(!(!i||!c||!["route","custom"].includes(c)))return Ve(i).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=jk({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const i=this._options.errorSampleRate>0,a=zp({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:i});this.session=a}_checkSession(){if(!this.session)return!1;const t=this.session;return IT(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{tt.document.addEventListener("visibilitychange",this._handleVisibilityChange),tt.addEventListener("blur",this._handleWindowBlur),tt.addEventListener("focus",this._handleWindowFocus),tt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(UP(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=Ck(this)}_removeListeners(){try{tt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),tt.removeEventListener("blur",this._handleWindowBlur),tt.removeEventListener("focus",this._handleWindowFocus),tt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||xT(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()){ye&&ve.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:xe.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=bk(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const i=this._context.initialTimestamp/1e3;t=t.filter(a=>a.start>=i)}return Promise.all($l(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:i}=this;if(!t||!i||this._requiresManualStart||t.segmentId)return;const a=i.getEarliestTimestamp();a&&a<this._context.initialTimestamp&&(this._context.initialTimestamp=a)}
34_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){ye&&ve.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await jP(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const i=Date.now();if(i-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new RS;const a=this._popEventContext(),c=this.session.segmentId++;this._maybeSaveSession();const u=await this.eventBuffer.finish();await BT({replayId:t,recordingData:u,segmentId:c,eventContext:a,session:this.session,timestamp:i,onError:f=>this.handleException(f)})}catch(i){this.handleException(i),this.stop({reason:"sendReplay"});const a=Te();if(a){let c;i instanceof U_?c="ratelimit_backoff":i instanceof RS?c="invalid":c="send_error",a.recordDroppedEvent(c,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){ye&&ve.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const i=this.session.started,c=Date.now()-i;this._debouncedFlush.cancel();const u=c<this._options.minReplayDuration,f=c>this._options.maxReplayDuration+5e3;if(u||f){ye&&ve.log(`Session duration (${Math.floor(c/1e3)}s) is too ${u?"short":"long"}, not sending replay.`),u&&this._debouncedFlush();return}const p=this.eventBuffer;p&&this.session.segmentId===0&&!p.hasCheckout&&ye&&ve.log("Flushing initial segment without checkout.");const m=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(h){this.handleException(h)}finally{this._flushLock=void 0,m&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Yl(this.session)}_onMutationHandler(t){const{ignoreMutations:i}=this._options._experiments;if(i?.length&&t.some(p=>{const m=GP(p.target),h=i.join(",");return m?.matches(h)}))return!1;const a=t.length,c=this._options.mutationLimit,u=this._options.mutationBreadcrumbLimit,f=c&&a>c;if(a>u||f){const p=Fn({category:"replay.mutations",data:{count:a,limit:f}});this._createCustomBreadcrumb(p)}return f?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function vo(e,t){return[...e,...t].join(",")}function ZP({mask:e,unmask:t,block:i,unblock:a,ignore:c}){const u=["base","iframe[srcdoc]:not([src])"],f=vo(e,[".sentry-mask","[data-sentry-mask]"]),p=vo(t,[]);return{maskTextSelector:f,unmaskTextSelector:p,blockSelector:vo(i,[".sentry-block","[data-sentry-block]",...u]),unblockSelector:vo(a,[]),ignoreSelector:vo(c,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function e3({el:e,key:t,maskAttributes:i,maskAllText:a,privacyOptions:c,value:u}){return!a||c.unmaskTextSelector&&e.matches(c.unmaskTextSelector)?u:i.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?u.replace(/[\S]/g,"*"):u}const OS='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',t3=["content-length","content-type","accept"],n3=Symbol.for("sentry__originalRequestBody");let DS=!1,wS=!1;function r3(){if(typeof Request>"u"||wS)return;const e=Request;try{const t=function(i,a){const c=new e(i,a);return a?.body!=null&&(c[n3]=a.body),c};t.prototype=e.prototype,Ne.Request=t,wS=!0}catch{}}const i3=(e=>new a3(e));class a3{constructor({flushMinDelay:t=wM,flushMaxDelay:i=xM,minReplayDuration:a=kM,maxReplayDuration:c=iS,stickySession:u=!0,useCompression:f=!0,workerUrl:p,_experiments:m={},maskAllText:h=!0,maskAllInputs:v=!0,blockAllMedia:g=!0,mutationBreadcrumbLimit:b=750,mutationLimit:T=1e4,slowClickTimeout:R=7e3,slowClickIgnoreSelectors:x=[],networkDetailAllowUrls:P=[],networkDetailDenyUrls:$=[],networkCaptureBodies:K=!0,networkRequestHeaders:le=[],networkResponseHeaders:de=[],mask:he=[],maskAttributes:re=["title","placeholder","aria-label"],unmask:z=[],block:Z=[],unblock:Ie=[],ignore:J=[],maskFn:ne,beforeAddRecordingEvent:fe,beforeErrorSampling:De,onError:me,attachRawBodyFromRequest:He=!1}={}){this.name="Replay";const M=ZP({mask:he,unmask:z,block:Z,unblock:Ie,ignore:J});if(this._recordingOptions={maskAllInputs:v,maskAllText:h,maskInputOptions:{password:!0},maskTextFn:ne,maskInputFn:ne,maskAttributeFn:(q,H,te)=>e3({maskAttributes:re,maskAllText:h,privacyOptions:M,key:q,value:H,el:te}),...M,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:q=>{try{q.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!m.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:i,minReplayDuration:Math.min(a,PM),maxReplayDuration:Math.min(c,iS),stickySession:u,useCompression:f,workerUrl:p,blockAllMedia:g,maskAllInputs:v,maskAllText:h,mutationBreadcrumbLimit:b,mutationLimit:T,slowClickTimeout:R,slowClickIgnoreSelectors:x,networkDetailAllowUrls:P,networkDetailDenyUrls:$,networkCaptureBodies:K,networkRequestHeaders:xS(le),networkResponseHeaders:xS(de),beforeAddRecordingEvent:fe,beforeErrorSampling:De,onError:me,attachRawBodyFromRequest:He,_experiments:m},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${OS}`:OS,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&im())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return DS}set _isInitialized(t){DS=t}afterAllSetup(t){!im()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&r3(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}
34startBuffering(){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){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const i=s3(this._initialOptions,t);this._replay=new WP({options:i,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const i=t.getIntegrationByName("ReplayCanvas");if(!i)return;this._replay._canvas=i.getOptions()}catch{}}}function s3(e,t){const i=t.getOptions(),a={sessionSampleRate:0,errorSampleRate:0,...e},c=Wi(i.replaysSessionSampleRate),u=Wi(i.replaysOnErrorSampleRate);return c==null&&u==null&&_i(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),c!=null&&(a.sessionSampleRate=c),u!=null&&(a.errorSampleRate=u),a}function xS(e){return[...t3,...e.map(t=>t.toLowerCase())]}function XB(){return Te()?.getIntegrationByName("Replay")}function o3(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function qT(e){try{return new URL(e,Ue.location.origin).href}catch{return}}function c3(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function HT(e){try{return new Headers(e)}catch{return}}const IS=new WeakMap,Bp=new Map,FT={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function u3(e,t){const{traceFetch:i,traceXHR:a,trackFetchStreamPerformance:c,shouldCreateSpanForRequest:u,enableHTTPTimings:f,tracePropagationTargets:p,onRequestSpanStart:m,onRequestSpanEnd:h}={...FT,...t},v=typeof u=="function"?u:R=>!0,g=R=>l3(R,p),b={},T=e.getOptions().propagateTraceparent;i&&(e.addEventProcessor(R=>(R.type==="transaction"&&R.spans&&R.spans.forEach(x=>{if(x.op==="http.client"){const P=Bp.get(x.span_id);P&&(x.timestamp=P/1e3,Bp.delete(x.span_id))}}),R)),c&&RI(R=>{if(R.response){const x=IS.get(R.response);
34x&&R.endTimestamp&&Bp.set(x,R.endTimestamp)}}),Ob(R=>{const x=hI(R,v,g,b,{propagateTraceparent:T,onRequestSpanEnd:h});if(R.response&&R.fetchData.__span&&IS.set(R.response,R.fetchData.__span),x){const P=qT(R.fetchData.url),$=P?Ki(P).host:void 0;x.setAttributes({"http.url":P?ci(P):void 0,"server.address":$}),f&&CS(x),m?.(x,{headers:R.headers})}})),a&&$b(R=>{const x=d3(R,v,g,b,T,h);x&&(f&&CS(x),m?.(x,{headers:HT(R.xhr.__sentry_xhr_v3__?.request_headers)}))})}function CS(e){const{url:t}=Ve(e).data;if(!t||typeof t!="string")return;const i=ea("resource",({entries:a})=>{a.forEach(c=>{c3(c)&&c.name.endsWith(t)&&(e.setAttributes(Fb(c)),setTimeout(i))})})}function l3(e,t){const i=gs();if(i){let a,c;try{a=new URL(e,i),c=new URL(i).origin}catch{return!1}const u=a.origin===c;return t?vr(a.toString(),t)||u&&vr(a.pathname,t):u}else{const a=!!e.match(/^\/(?!\/)/);return t?vr(e,t):a}}function d3(e,t,i,a,c,u){const f=e.xhr,p=f?.[Gi];if(!f||f.__sentry_own_request__||!p)return;const{url:m,method:h}=p,v=Nn()&&t(m);if(e.endTimestamp){const $=f.__sentry_xhr_span_id__;if(!$)return;const K=a[$];K&&(v&&p.status_code!==void 0&&(D0(K,p.status_code),K.end(),u?.(K,{headers:HT(Jb(f)),error:e.error})),delete a[$]);return}const g=qT(m),b=Ki(g||m),T=ci(kx(m)),R=!!Pt(),x=v&&R?vs({name:`${h} ${T}`,attributes:{url:ci(m),type:"xhr","http.method":h,"http.url":g?ci(g):void 0,"server.address":b?.host,[Dt]:"auto.http.browser",[Rr]:"http.client",...b?.search&&{"http.query":b?.search},...b?.hash&&{"http.fragment":b?.hash}}}):new Or;f.__sentry_xhr_span_id__=x.spanContext().spanId,a[f.__sentry_xhr_span_id__]=x,i(m)&&f3(f,Nn()&&R?x:void 0,c);const P=Te();return P&&P.emit("beforeOutgoingRequestSpan",x,e),x}function f3(e,t,i){const{"sentry-trace":a,baggage:c,traceparent:u}=Eb({span:t,propagateTraceparent:i});a&&p3(e,a,c,u)}function p3(e,t,i,a){const c=e.__sentry_xhr_v3__?.request_headers;if(!(c?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),a&&!c?.traceparent&&e.setRequestHeader("traceparent",a),i){const u=c?.baggage;(!u||!o3(u))&&e.setRequestHeader("baggage",i)}}catch{}}function m3(){Ue.document?Ue.document.addEventListener("visibilitychange",()=>{const e=Pt();if(!e)return;const t=kt(e);if(Ue.document.hidden&&t){const i="cancelled",{op:a,status:c}=Ve(t);pn&&G.log(`[Tracing] Transaction: ${i} -> since tab moved to the background, op: ${a}`),c||t.setStatus({code:Et,message:i}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):pn&&G.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const _3=3600,GT="sentry_previous_trace",h3="sentry.previous_trace";function g3(e,{linkPreviousTrace:t,consistentTraceSampling:i}){const a=t==="session-storage";let c=a?E3():void 0;e.on("spanStart",f=>{if(kt(f)!==f)return;const p=qe().getPropagationContext();c=y3(c,f,p),a&&v3(c)});let u=!0;i&&e.on("beforeSampling",f=>{if(!c)return;const p=qe(),m=p.getPropagationContext();if(u&&m.parentSpanId){u=!1;return}p.setPropagationContext({...m,dsc:{...m.dsc,sample_rate:String(c.sampleRate),sampled:String(Sm(c.spanContext))},sampleRand:c.sampleRand}),f.parentSampled=Sm(c.spanContext),f.parentSampleRate=c.sampleRate,f.spanAttributes={...f.spanAttributes,[O0]:c.sampleRate}})}function y3(e,t,i){const a=Ve(t);function c(){try{return Number(i.dsc?.sample_rate)??Number(a.data?.[$m])}catch{return 0}}const u={spanContext:t.spanContext(),startTimestamp:a.start_timestamp,sampleRate:c(),sampleRand:i.sampleRand};if(!e)return u;const f=e.spanContext;return f.traceId===a.trace_id?e:(Date.now()/1e3-e.startTimestamp<=_3&&(pn&&G.log(`Adding previous_trace \`${JSON.stringify(f)}\` link to span \`${JSON.stringify({op:a.op,...t.spanContext()})}\``),t.addLink({context:f,attributes:{[AD]:"previous_trace"}}),t.setAttribute(h3,`${f.traceId}-${f.spanId}-${Sm(f)?1:0}`)),u)}function v3(e){try{Ue.sessionStorage.setItem(GT,JSON.stringify(e))}catch(t){pn&&G.warn("Could not store previous trace in sessionStorage",t)}}function E3(){try{const e=Ue.sessionStorage?.getItem(GT);return JSON.parse(e)}catch{return}}function Sm(e){return e.traceFlags===1}const S3="BrowserTracing",b3=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function T3(){const e=Ue.navigator;return e?.userAgent?b3.test(e.userAgent):!1}const A3={...Yu,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroun
34dSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...FT},R3=((e={})=>{const t={name:void 0,source:void 0},i=Ue.document,{enableInp:a,enableElementTiming:c,enableLongTask:u,enableLongAnimationFrame:f,_experiments:{enableInteractions:p,enableStandaloneClsSpans:m,enableStandaloneLcpSpans:h},beforeStartSpan:v,idleTimeout:g,finalTimeout:b,childSpanTimeout:T,markBackgroundSpan:R,traceFetch:x,traceXHR:P,trackFetchStreamPerformance:$,shouldCreateSpanForRequest:K,enableHTTPTimings:le,ignoreResourceSpans:de,ignorePerformanceApiSpans:he,instrumentPageLoad:re,instrumentNavigation:z,detectRedirects:Z,linkPreviousTrace:Ie,consistentTraceSampling:J,enableReportPageLoaded:ne,onRequestSpanStart:fe,onRequestSpanEnd:De}={...A3,...e},me=T3();let He,M,q;function H(te,W,ce=!0){const B=W.op==="pageload",X=W.name,ie=v?v(W):W,_e=ie.attributes||{};if(X!==ie.name&&(_e[Rn]="custom",ie.attributes=_e),!ce){const Ee=ta();vs({...ie,startTime:Ee}).end(Ee);return}t.name=ie.name,t.source=_e[Rn];const Re=K0(ie,{idleTimeout:g,finalTimeout:b,childSpanTimeout:T,disableAutoFinish:B,beforeSpanEnd:Ee=>{He?.(),kC(Ee,{recordClsOnPageloadSpan:!m,recordLcpOnPageloadSpan:!h,ignoreResourceSpans:de,ignorePerformanceApiSpans:he}),NS(te,void 0);const ge=qe(),We=ge.getPropagationContext();ge.setPropagationContext({...We,traceId:Re.spanContext().traceId,sampled:vi(Re),dsc:Pn(Ee)}),B&&(q=void 0)},trimIdleSpanEndTimestamp:!ne});B&&ne&&(q=Re),NS(te,Re);function se(){i&&["interactive","complete"].includes(i.readyState)&&te.emit("idleSpanEnableAutoFinish",Re)}B&&!ne&&i&&(i.addEventListener("readystatechange",()=>{se()}),se())}return{name:S3,setup(te){if(me){pn&&G.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(QD(),He=wC({recordClsStandaloneSpans:m||!1,recordLcpStandaloneSpans:h||!1,client:te}),a&&oL(),c&&$C(),f&&Ne.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?IC():u&&xC(),p&&CC(),Z&&i){const ce=()=>{M=bt()};addEventListener("click",ce,{capture:!0}),addEventListener("keydown",ce,{capture:!0,passive:!0})}function W(){const ce=Uo(te);ce&&!Ve(ce).timestamp&&(pn&&G.log(`[Tracing] Finishing current active span with op: ${Ve(ce).op}`),ce.setAttribute(Co,"cancelled"),ce.end())}te.on("startNavigationSpan",(ce,B)=>{if(Te()!==te)return;if(B?.isRedirect){pn&&G.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),H(te,{op:"navigation.redirect",...ce},!1);return}M=void 0,W(),_t().setPropagationContext({traceId:Yn(),sampleRand:Math.random(),propagationSpanId:Nn()?void 0:Er()});const X=qe();X.setPropagationContext({traceId:Yn(),sampleRand:Math.random(),propagationSpanId:Nn()?void 0:Er()}),X.setSDKProcessingMetadata({normalizedRequest:void 0}),H(te,{op:"navigation",...ce,parentSpan:null,forceTransaction:!0})}),te.on("startPageLoadSpan",(ce,B={})=>
34{if(Te()!==te)return;W();const X=B.sentryTrace||LS("sentry-trace")||MS("sentry-trace"),ie=B.baggage||LS("baggage")||MS("baggage"),_e=k0(X,ie),Re=qe();Re.setPropagationContext(_e),Nn()||(Re.getPropagationContext().propagationSpanId=Er()),Re.setSDKProcessingMetadata({normalizedRequest:p_()}),H(te,{op:"pageload",...ce})}),te.on("endPageloadSpan",()=>{ne&&q&&(q.setAttribute(Co,"reportPageLoaded"),q.end())})},afterAllSetup(te){if(me)return;let W=gs();if(Ie!=="off"&&g3(te,{linkPreviousTrace:Ie,consistentTraceSampling:J}),Ue.location){if(re){const ce=en();O3(te,{name:Ue.location.pathname,startTime:ce?ce/1e3:void 0,attributes:{[Rn]:"url",[Dt]:"auto.pageload.browser"}})}z&&ql(({to:ce,from:B})=>{if(B===void 0&&W?.indexOf(ce)!==-1){W=void 0;return}W=void 0;const X=f_(ce),ie=Uo(te),_e=ie&&Z&&x3(ie,M);D3(te,{name:X?.pathname||Ue.location.pathname,attributes:{[Rn]:"url",[Dt]:"auto.navigation.browser"}},{url:ce,isRedirect:_e})})}R&&m3(),p&&w3(te,g,b,T,t),a&&lL(),u3(te,{traceFetch:x,traceXHR:P,trackFetchStreamPerformance:$,tracePropagationTargets:te.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:K,enableHTTPTimings:le,onRequestSpanStart:fe,onRequestSpanEnd:De})}}});function O3(e,t,i){e.emit("startPageLoadSpan",t,i),qe().setTransactionName(t.name);const a=Uo(e);return a&&e.emit("afterStartPageLoadSpan",a),a}function D3(e,t,i){const{url:a,isRedirect:c}=i||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:c}),e.emit("startNavigationSpan",t,{isRedirect:c});const u=qe();return u.setTransactionName(t.name),a&&!c&&u.setSDKProcessingMetadata({normalizedRequest:{...p_(),url:a}}),Uo(e)}function LS(e){return Ue.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function MS(e){return Ue.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(a=>a.name===e)?.description}function w3(e,t,i,a,c){const u=Ue.document;let f;const p=()=>{const m="ui.action.click",h=Uo(e);if(h){const v=Ve(h).op;if(["navigation","pageload"].includes(v)){pn&&G.warn(`[Tracing] Did not create ${m} span because a pageload or navigation span is in progress.`);return}}if(f&&(f.setAttribute(Co,"interactionInterrupted"),f.end(),f=void 0),!c.name){pn&&G.warn(`[Tracing] Did not create ${m} transaction because _latestRouteName is missing.`);return}f=K0({name:c.name,op:m,attributes:{[Rn]:c.source||"url"}},{idleTimeout:t,finalTimeout:i,childSpanTimeout:a})};u&&addEventListener("click",p,{capture:!0})}const YT="_sentry_idleSpan";function Uo(e){return e[YT]}function NS(e,t){Zt(e,YT,t)}const kS=1.5;function x3(e,t){const i=Ve(e),a=ta(),c=i.start_timestamp;return!(a-c>kS||t&&a-t<=kS)}function I3(e){const t={...e};return vb(t,"react"),eb("react",{version:Q.version}),AM(t)}const j_="certbox_analytics_consent";function bs(){try{return localStorage.getItem(j_)==="granted"}catch{return!1}}function C3(){try{const e=localStorage.getItem(j_);return e==="granted"||e==="denied"}catch{return!0}}function L3(e){try{localStorage.setItem(j_,e?"granted":"denied")}catch{}}const $T=["shared","verify","cert-verify","quote","invoice","invite","portal","answer"],M3=":token",Vp="[redacted]",kn="\\s\"'<>\\\\`",N3=new RegExp(`/storage/v1/object/[^${kn}]+`,"g"),k3=new RegExp(`\\b(certificates|qualifications|jobs|expenses)/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/[^${kn}]+`,"gi"),P3=new RegExp(`(/(?:rest|auth|functions|realtime|graphql)/v1/[^${kn}?#]*)[?#][^${kn}]*`,"g"),U3=new RegExp(`(^|[${kn}=(]|https?://[^/${kn}]+)/(${$T.join("|")})/[^/?#${kn}]+`,"g"),j3=new RegExp(`([?&#])(?:code|state|invite|address|postcode|email|download|[a-z_]*token[a-z_]*)=[^&#${kn}]*`,"gi"),z3=new RegExp(`([?&#])type=(?:signup|invite|magiclink|recovery|email_change|email)(?=[&#${kn}]|$)`,"gi"),B3=new RegExp(`\\b(mailto|tel|sms):[^${kn}]+`,"gi"),V3=/[/?#:]/;function PS(e,t){let i=!1;const a=e.replace(t,(c,u)=>(i=!0,u==="&"?"":u));return i?a.replace(/([?#])&+/g,"$1").replace(new RegExp(`[?#](?=$|[${kn}#])`,"g"),""):e}function Ol(e){if(!e||!V3.test(e))return e;let t=e;return t=t.replace(N3,`/storage/v1/object/${Vp}`),t=t.replace(k3,`$1/${Vp}`),t=t.replace(P3,"$1"),t=t.replace(U3,`$1/$2/${M3}`),t=PS(t,j3),t=PS(t,z3),t=t.replace(B3,`$1:${Vp}`),t===e?e:t}function Ql(e,t=8){return bm(e,0,t),e}function bm(e,t,i){if(!(t>i||e===null||typeof e!="object")){if(Array.isArray(e)){for(let a=0;a<e.length;a++){const c=e[a];if(typeof c=="string"){const u=Ol(c);u!==c&&(e[a]=u)}else bm(c,t+1,i)}return}for(const[a,c]of Object.entries(e))if(typeof c=="string"){const u=Ol(c);u!==c&&(e[a]=u)}else bm(c,t+1,i)}}const q3=/\[(aria-label|title|alt)="(?:[^"\\]|\\.)*"\]/g;function Tm(e){try{Ql(e)}catch{}return e}
34function H3(e){try{e.category?.startsWith("ui.")&&typeof e.message=="string"&&(e.message=e.message.replace(q3,"[$1]")),Ql(e)}catch{}return e}const F3={name:"CertBoxScrubReplayEvents",processEvent(e){return e.type==="replay_event"?Tm(e):e}};function G3(e){return e==="certbox.app"||e.endsWith(".certbox.app")?"production":e.endsWith(".pages.dev")?"staging":null}function Y3(e){tb(e?{id:e}:null)}function $3(){const e="https://9bc9610c3a7b39b9e257181485f3a8e2@o4510810132512768.ingest.de.sentry.io/4511616015335504";if(typeof navigator<"u"&&navigator.webdriver)return;const t=typeof window>"u"?null:G3(window.location.hostname);t&&I3({dsn:e,environment:t,integrations:[R3(),F3,...bs()?[i3({maskAllText:!0,blockAllMedia:!0,block:[".ph-no-capture"],beforeAddRecordingEvent:i=>Ql(i)})]:[]],beforeSend:Tm,beforeSendTransaction:Tm,beforeBreadcrumb:H3,tracesSampleRate:.1,replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,denyUrls:[/gsi\/client/,/accounts\.google\.com/],ignoreErrors:["Error retrieving a token","Not signed in with the identity provider","Object Not Found Matching Id"]})}function z_(e){try{return window[e]??null}catch{return null}}function Xn(e,t){try{return z_(e)?.getItem(t)??null}catch{return null}}function mi(e,t,i){try{const a=z_(e);return a?(a.setItem(t,i),!0):!1}catch{return!1}}function jo(e,t){try{z_(e)?.removeItem(t)}catch{}}let ku;const Pu={id:null,email:null};function XT(){try{if(ku===void 0){const c="https://api.certbox.app",u=c?new URL(c).hostname.split(".")[0]:"";ku=u?`sb-${u}-auth-token`:null}if(!ku)return Pu;const e=Xn("localStorage",ku);if(!e)return Pu;const t=JSON.parse(e);if(typeof t.expires_at=="number"&&t.expires_at*1e3<Date.now())return Pu;const i=t.user?.id,a=t.user?.email;return{id:typeof i=="string"&&i.length>0?i:null,email:typeof a=="string"&&a.length>0?a:null}}catch{return Pu}}function QT(e){if(!e)return!1;const t=e.toLowerCase();return t==="[email protected]"||t.endsWith("@certbox.test")}let Dr=null,Uu=null;const X3={eu:{api:"https://eu.i.posthog.com",assets:"https://eu-assets.i.posthog.com",ui:"https://eu.posthog.com"},us:{api:"https://us.i.posthog.com",assets:"https://us-assets.i.posthog.com",ui:"https://us.posthog.com"}},Q3="https://g.certbox.app".trim();function K3(){return"eu".toLowerCase()==="us"?"us":"eu"}function J3(){try{return localStorage.getItem("certbox_ph_did")}catch{return null}}function W3(e){return KT(e,0),e}function KT(e,t){if(!(t>6||e===null||typeof e!="object"))for(const[i,a]of Object.entries(e))if(typeof a=="string"){const c=a.indexOf("#");c!==-1&&/^https?:\/\//i.test(a)&&(e[i]=a.slice(0,c))}else KT(a,t+1)}function Z3(e){if(!e||e.event==="$snapshot")return e;try{W3(e),Ql(e)}catch{}return e}function eU(e){return typeof e.name=="string"?{...e,name:Ol(e.name)}:e}function JT(){if(typeof window>"u")return Promise.resolve();const e="phc_qpRq2gQByRtHSSxwpCknCZwCPU42iffxCdut5UVBMabp";if(Uu)return Uu;if(!bs()||QT(XT().email))return Promise.resolve();const{api:t,assets:i,ui:a}=X3[K3()],c=Q3||t;return Uu=(async()=>{try{const{default:u}=await y(async()=>{const{default:p}=await import("./module-BC0UgTD4.js");return{default:p}},[]),f=J3();u.init(e,{api_host:c,ui_host:a,...f?{bootstrap:{distinctID:f}}:{},asset_host:i,person_profiles:"identified_only",autocapture:!0,mask_all_text:!0,mask_all_element_attributes:!0,disable_session_recording:!1,session_recording:{maskAllInputs:!0,maskTextSelector:"*",maskCapturedNetworkRequestFn:eU},capture_pageview:!0,capture_pageleave:!0,persistence:"localStorage+cookie",before_send:Z3}),Dr=u,nU()}catch{Dr=null}})(),Uu}const tU=50;let zo=[];function nU(){if(!Dr)return;const e=zo;zo=[];for(const t of e)try{Dr.capture(t.event,{...t.props,$timestamp_backfilled:!0,timestamp:new Date(t.at)})}catch{}}function rU(e,t){try{if(!Dr){if(!bs())return;zo.length<tU&&zo.push({event:e,props:t,at:Date.now()});return}Dr.capture(e,t)}catch{}}function iU(){try{const e=Dr;if(!e)return;e.has_opted_out_capturing?.()||e.opt_out_capturing?.(),e.stopSessionRecording?.()}catch{}}function aU(e,t){try{Dr?.identify(e,t)}catch{}}function sU(){try{zo=[],Dr?.reset()}catch{}}const oU=4e3,cU=15e3,uU=6e4;function lU(e,t="GET"){if(e.includes("/auth/v1/token"))return null;if(e.includes("/storage/v1/object"))return uU;const i=t.toUpperCase();return i!=="GET"&&i!=="HEAD"?cU:oU}const dU="https://api.certbox.app",fU="eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJyb2xlIjogImFub24iLCAiaXNzIjogInN1cGFiYXNlIiwgImlhdCI6IDE3ODkzMzg1OTUsICJleHAiOiAxOTQ3MDE4NTk1fQ.RdVNHp3m-NXSEs8ruhxhc1LjAptGexpogHwMqLYaiXE",WT=async(e,t)=>{let i=!1;try{if(!navigator.onLine){const v=(t?.method??"GET").toUpperCase();if(v==="GET"||v==="HEAD")throw new DOMException("Network is offline","AbortError")}const a=typeof e=="string"?e:e.url,c=t?.method??(typeof e=="string"?"GET":e.method),u=lU(a,c),f=globalThis.fetch;if(u===null)return await f(e,t);const p=new AbortController,m=setTimeout(()=>{i=!0,p.abort()},u),h=p.signal;if(t?.signal){const v=t.signal;v.aborted?p.abort(v.reason):v.addEventListener("abort",()=>p.abort(v.reason),{once:!0})}return await f(e,{...t,signal:h}).finally(()=>clearTimeout(m))}catch(a){const c=a;if(a&&c?.name==="AbortError"){const u=c.message==="Network is offline";throw(i||u)&&y(async()=>{const{trackApiError:f}=await Promise.resolve().then(()=>l0);return{trackApiError:f}},void 0).then(({trackApiError:f})=>{f(String(typeof e=="string"?e:e.url),i?new Error("request timed out"):a)}).catch(()=>{}),a}return globalThis.fetch(e,t)}},D=_O(dU,fU,{db:{schema:"certbox"},global:{fetch:WT},auth:{persistSession:!0,autoRefreshToken:!0,detectSessionInUrl:!0,flowType:"pkce",lock:async(e,t,i)=>await i()}}),QB=Object.freeze(Object.defineProperty({__proto__:null,supabase:D,timeoutFetch:WT},Symbol.toStringTag,{value:"Module"})),pU="A",mU={control:pU},_U=mU;function hU(){return{}}function KB(){return _U.control}const gU=["/symbols","/guides","/tools","/compare","/features","/certificate","/cert-verify"],yU=new Set(["/electricians","/gas-engineers","/plumbers","/landlords","/letting-agents","/holiday-lets","/campervans","/legionella","/fire-safety","/rams"]);function vU(e){return yU.has(e)?!0:gU.some(t=>e===t||e.startsWith(t+"/"))}function ZT(e){for(const t of $T){const i=`/${t}`;if(e===i||e.startsWith(`${i}/`))return i}return e}const US="certbox_funnel_session",Am="certbox_attribution",jS="certbox_device_id";function EU(){if(!bs())return"no-consent";try{const e=localStorage.getItem(jS);if(e)return e;const t=crypto.randomUUID();return localStorage.setItem(jS,t),t}catch{return"no-device"}}
34function SU(){if(bs())try{if(localStorage.getItem(Am))return;const e=new URLSearchParams(window.location.search),t={};for(const i of["utm_source","utm_medium","utm_campaign","utm_term","utm_content"]){const a=e.get(i);a&&(t[i]=a.slice(0,100))}document.referrer&&!document.referrer.includes(window.location.hostname)&&(t.referrer=Ol(document.referrer).slice(0,200)),t.landing_path=ZT(window.location.pathname),t.landed_at=new Date().toISOString(),localStorage.setItem(Am,JSON.stringify(t))}catch{}}function eA(){try{const e=localStorage.getItem(Am);return e?JSON.parse(e):{}}catch{return{}}}let Zu=null;const bU=()=>XT().id;function Rm(e,t){if(QT(t)){iU(),Zu=e;return}const i=Zu;Zu=e,e?aU(e):i&&sU();try{tb(e?{id:e}:null)}catch{}}function TU(){if(typeof window>"u")return"unknown";const e=window.innerWidth;return e?e<640?"mobile":e<1024?"tablet":"desktop":"unknown"}let ju=null;function AU(){if(!bs()){if(!ju)try{ju=crypto.randomUUID()}catch{ju="no-session"}return ju}try{const e=sessionStorage.getItem(US);if(e)return e;const t=crypto.randomUUID();return sessionStorage.setItem(US,t),t}catch{return"no-session"}}function Bo(e,t){try{if(typeof navigator<"u"&&navigator.webdriver)return;const i=AU(),a={device_id:EU(),viewport:TU(),...hU(),...t},c=D.from("funnel_events").insert({event_type:e,metadata:a,session_id:i,user_id:Zu??bU()});c&&typeof c.then=="function"&&c.then(({error:u})=>{}).catch(()=>{}),rU(e,{...a,session_id:i})}catch{}}const RU="/manifest.webmanifest",OU=4e3,DU=3e4,wU=3e3,B_=2;let el=null,Do=0;async function xU(){if(!navigator.onLine)return!1;try{const e=new AbortController,t=setTimeout(()=>e.abort(),OU),i=`${RU}?_cb=${Date.now()}`,a=await fetch(i,{method:"HEAD",signal:e.signal,cache:"no-store"});return clearTimeout(t),a.ok}catch{return!1}}function Om(e){if(e)Do=0;else if(Do++,Do<B_)return;Ji.isOnline()!==e&&Ji.setOnline(e)}async function wo(){if(!navigator.onLine){Do=B_,Om(!1);return}const e=await xU();Om(e)}function IU(){tA(),el=setInterval(()=>{document.visibilityState==="visible"&&wo()},DU)}function tA(){el&&(clearInterval(el),el=null)}function CU(){const e=()=>{wo()},t=()=>{Do=B_,Om(!1)},i=()=>{document.visibilityState==="visible"&&wo()};window.addEventListener("online",e),window.addEventListener("offline",t),document.addEventListener("visibilitychange",i);const a=setTimeout(()=>{wo(),IU()},wU);return()=>{clearTimeout(a),tA(),window.removeEventListener("online",e),window.removeEventListener("offline",t),document.removeEventListener("visibilitychange",i)}}function LU(){wo()}function V_(){try{return Object.keys(localStorage).find(e=>e.startsWith("sb-")&&e.endsWith("-auth-token"))}catch{return}}function zS(){try{const e=V_();if(!e)return null;const t=localStorage.getItem(e),i=t?JSON.parse(t):null;return i?.user?{user:i.user}:null}catch{return null}}function MU(e){try{const i=`sb-${new URL("https://api.certbox.app").hostname.split(".")[0]}-auth-token`;localStorage.setItem(i,JSON.stringify({access_token:e.access_token,refresh_token:e.refresh_token,token_type:"bearer",expires_in:e.expires_in,expires_at:e.expires_at,user:e.user}))}catch{}}function NU(){try{const e=V_();e&&localStorage.removeItem(e)}catch{}}function kU(e){return!!e&&e.startsWith("sb-")&&e.endsWith("-auth-token")}function nA(){try{const e=V_();return!!(e&&localStorage.getItem(e))}catch{return!1}}function PU(){if(!("serviceWorker"in navigator))return;const e=()=>{navigator.serviceWorker.register("/sw.js",{scope:"/"}).catch(t=>{s0(t)})};document.readyState==="complete"?e():window.addEventListener("load",e,{once:!0})}const q_="profile-";async function UU(e){try{await Bm(`${q_}${e.uid}`,e)}catch{}}async function Dl(e){try{return await zm(`${q_}${e}`)??null}catch{return null}}async function qp(){try{const{keys:e}=await y(async()=>{const{keys:i}=await Promise.resolve().then(()=>i0);return{keys:i}},void 0),t=await e();for(const i of t)if(typeof i=="string"&&i.startsWith(q_))try{await Ml(i)}catch{}}catch{}}function jU(e){const t=e.transaction.bind(e);return e.transaction=((...i)=>{const a=t(...i),c=()=>{try{e.close()}catch{}};return a.addEventListener("complete",c),a.addEventListener("error",c),a.addEventListener("abort",c),a}),e}const zU="certbox-drafts",BU=1,Dn="drafts";function VU(e){return e.syncedAt!=null&&e.syncedAt>=e.updatedAt}function ac(){return new Promise((e,t)=>
34{const i=indexedDB.open(zU,BU);i.onupgradeneeded=()=>{const a=i.result;a.objectStoreNames.contains(Dn)||a.createObjectStore(Dn,{keyPath:"key"}).createIndex("userId","userId",{unique:!1})},i.onsuccess=()=>e(jU(i.result)),i.onerror=()=>t(i.error)})}function Kl(e,t){return`${e}|${t}`}async function JB(e,t,i,a=Date.now()){const c=await ac();return new Promise((u,f)=>{const p=Kl(e,t),m=c.transaction(Dn,"readwrite"),h=m.objectStore(Dn),v=h.get(p);v.onsuccess=()=>{const g=v.result,b={key:p,userId:e,formType:t,formData:i,updatedAt:a,...g?.syncedAt!=null?{syncedAt:g.syncedAt}:{}};h.put(b)},m.oncomplete=()=>u(a),m.onerror=()=>f(m.error)})}async function WB(e,t,i){const a=await ac();return new Promise((c,u)=>{const f=Kl(e,t),p=a.transaction(Dn,"readwrite"),m=p.objectStore(Dn),h=m.get(f);h.onsuccess=()=>{const v=h.result;!v||v.updatedAt>i||m.put({...v,syncedAt:i})},p.oncomplete=()=>c(),p.onerror=()=>u(p.error)})}async function ZB(e,t){const i=await ac();return new Promise((a,c)=>{const f=i.transaction(Dn,"readonly").objectStore(Dn).get(Kl(e,t));f.onsuccess=()=>a(f.result??null),f.onerror=()=>c(f.error)})}async function eV(e,t){const i=await ac();return new Promise((a,c)=>{const u=i.transaction(Dn,"readwrite");u.objectStore(Dn).delete(Kl(e,t)),u.oncomplete=()=>a(),u.onerror=()=>c(u.error)})}async function tV(e){const t=await ac();return new Promise((i,a)=>{const f=t.transaction(Dn,"readonly").objectStore(Dn).index("userId").getAll(e);f.onsuccess=()=>i(f.result),f.onerror=()=>a(f.error)})}const qU=["certbox-drafts","certbox-pdfs","certbox-photos","certbox-write-queue","certbox-intents","certbox-cert-intents"],HU={"certbox-drafts":{kind:"drafts",isUnsynced:e=>!VU(e??{})},"certbox-pdfs":{kind:"pdfs",isUnsynced:e=>{const t=e?.synced;return!(t===1||t===!0)}},"certbox-photos":{kind:"photos",isUnsynced:()=>!0},"certbox-write-queue":{kind:"writes",isUnsynced:()=>!0},"certbox-intents":{kind:"intents",isUnsynced:()=>!0},"certbox-cert-intents":{kind:"certIntents",isUnsynced:()=>!0}};function rA(e){return HU[e]??{kind:"writes",isUnsynced:()=>!0}}function FU(){return{writes:0,certIntents:0,intents:0,photos:0,pdfs:0,drafts:0,total:0}}function GU(e,t,i=2e3){const a=rA(e);return new Promise(c=>{const u={removed:0,keptForUser:0,keptForOthers:0};let f=!1;const p=v=>{f||(f=!0,c({ok:v,...u}))},m=setTimeout(()=>p(!1),i),h=v=>{clearTimeout(m),p(v)};try{const v=indexedDB.open(e);v.onupgradeneeded=g=>{if(g.oldVersion===0)try{v.transaction?.abort()}catch{}},v.onerror=()=>{const g=v.error;h(g?.name==="AbortError")},v.onblocked=()=>h(!1),v.onsuccess=()=>{const g=v.result;g.onversionchange=()=>{try{g.close()}catch{}};try{const b=Array.from(g.objectStoreNames);if(b.length===0){g.close(),h(!0);return}const T=g.transaction(b,"readwrite");for(const R of b){const x=T.objectStore(R).openCursor();x.onsuccess=()=>{const P=x.result;if(!P)return;const $=P.value;if(a.isUnsynced($)){const K=$?.userId;t&&K===t?u.keptForUser++:u.keptForOthers++}else P.delete(),u.removed++;P.continue()}}T.oncomplete=()=>{g.close(),h(!0)},T.onerror=()=>{g.close(),h(!1)},T.onabort=()=>{g.close(),h(!1)}}catch{try{g.close()}catch{}h(!1)}}}catch{h(!1)}})}function YU(e){let t=0,i=0;try{for(let a=0;a<localStorage.length;a++){const c=localStorage.key(a);!c||!c.startsWith("certbox_")||!c.endsWith("_draft")||(e&&c.startsWith(`certbox_${e}_`)?t++:i++)}}catch{}return{forUser:t,forOthers:i}}async function $U(e=2e3){try{return await new Promise(t=>{const i=setTimeout(()=>t(!1),e);Ml(So).then(()=>{clearTimeout(i),t(!0)},()=>{clearTimeout(i),t(!1)})})}catch{return!1}}async function XU(e){const[t,i]=await Promise.all([Promise.all(qU.map(async p=>[p,await GU(p,e)])),$U()]),a=FU();let c=0,u=0;for(const[p,m]of t)a[rA(p).kind]+=m.keptForUser,c+=m.keptForOthers,u+=m.removed;const f=YU(e);return a.drafts+=f.forUser,c+=f.forOthers,a.total=a.writes+a.certIntents+a.intents+a.photos+a.pdfs+a.drafts,{swept:t.filter(([,p])=>p.ok).map(([p])=>p),failed:t.filter(([,p])=>!p.ok).map(([p])=>p),removed:u,keptForUser:a,keptForOthers:c,queryCacheCleared:i}}function Y(e){return e?e instanceof Date?e:typeof e=="string"||typeof e=="number"?new Date(e):typeof e=="object"&&e!==null&&"toDate"in e&&typeof e.toDate=="function"?e.toDate():new Date:new Date(0)}function QU(e,t){if(t)return"superseded";if(!e)return"no_expiry";const i=new Date,a=Math.floor((e.getTime()-i.getTime())/(1e3*60*60*24));return a<0?"expired":a<=30?"expiring":"valid"}function KU(e){return e==="individual"||e==="team"||e==="landlord"||e==="agent"||e==="pro"||e==="business"||e==="enterprise"}function nV(e,t){return e&&t?.logoUrl?t.logoUrl:null}function H_(e,t){return(e==="active"||e==="past_due"||e==="trialing")&&KU(t)}function F_(e){if(!e)return"individual";switch(e){case"individual":return"individual";case"team":return"team";case"landlord":return"landlord";case"agent":return"agent";case"free":return"individual";case"pro":return"individual";case"business":return"team";case"enterprise":return"team";default:return"individual"}}const iA={individual:{certsPerMonth:-1,properties:-1,users:-1,jobsPerMonth:-1},team:{certsPerMonth:-1,properties:-1,users:-1,jobsPerMonth:-1},landlord:{certsPerMonth:-1,properties:20,users:1,jobsPerMonth:-1},agent:{certsPerMonth:-1,properties:-1,users:-1,jobsPerMonth:-1}},aA={certsPerMonth:-1,properties:-1,users:1,jobsPerMonth:-1},rV={name:"Free",tagline:"Fill in, check and get paid - as many as you like",features:["Unlimited certificates, every type","Quotes, invoices & card payments","Unpaid quotes chased at 3 and 7 days, overdue invoices too","Check the finished certificate on screen, every page","Unlimited properties","Import last year’s properties and clients from a CSV","Job tracking & scheduling","Timesheets"]},JU=[{tier:"individual",name:"Pro",tagline:"Win the repeat work, look professional",trialDays:14,highlighted:!0,features:["Everything in Free, plus:","Hand the certificate over: download the PDF, email it to your customer, share a link, print it","Your logo on every PDF, and the CertBox line off the bottom","Automatic renew
34al reminders sent to your customers, so next year’s job comes back to you","Your whole team on one flat price, unlimited users","Photograph a board and the circuit schedule fills itself in","Compliance reporting across every property","Priority support"],pricing:{GB:{monthlyPrice:14.99,annualPrice:11900,currency:"GBP",symbol:"£",monthlyPriceId:"price_1TtTANE0w54HA8sQsrKTnUsa",annualPriceId:"price_1TtTAOE0w54HA8sQfbKWA813"},IE:{monthlyPrice:16.99,annualPrice:13500,currency:"EUR",symbol:"€",monthlyPriceId:"price_1TtTAOE0w54HA8sQ9wPVcaT5",annualPriceId:"price_1TtTAOE0w54HA8sQJ8btpo0s"},AU:{monthlyPrice:24.99,annualPrice:19900,currency:"AUD",symbol:"A$",monthlyPriceId:"price_1TtTAPE0w54HA8sQe6MW02CB",annualPriceId:"price_1TtTAPE0w54HA8sQNJmSLQ8H"},US:{monthlyPrice:16.99,annualPrice:13500,currency:"USD",symbol:"$",monthlyPriceId:"",annualPriceId:""},ZA:{monthlyPrice:199,annualPrice:159e3,currency:"ZAR",symbol:"R",monthlyPriceId:"",annualPriceId:""}}}],iV=["Send it: download the PDF, email it to your customer, share a link, print it","A QR on every certificate. Anyone can check it is the one you issued, and that nobody has changed it","Yours for ever, corrections included. The next one is another payment."],aV=[1,3,4],WU={GB:{amount:4.99,currency:"GBP",symbol:"£",priceId:"price_1UGluQE0w54HA8sQ9IfwGfec"},IE:{amount:5.99,currency:"EUR",symbol:"€",priceId:"price_1UGluQE0w54HA8sQWdQw3Rfn"},AU:{amount:8.99,currency:"AUD",symbol:"A$",priceId:"price_1UGluQE0w54HA8sQJEoy7jug"}};function ZU(e){const t=e?WU[e]:void 0;return t&&t.priceId?t:null}function ej(e){return iA[e]}function tj(e){return e===-1}const nj={individual:1,landlord:1,team:2,agent:2};function sV(e){return nj[e]??0}function rj(e,t){return H_(t,e)?iA[F_(e)].users:aA.users}function ij(e,t,i){const a=rj(e,t);return tj(a)?!0:i<a}function G_(e){return{id:e.id,address:e.address,postcode:e.postcode??"",propertyType:e.property_type??"other",ownerName:e.owner_name??void 0,ownerEmail:e.owner_email??void 0,notes:e.notes??void 0,ownerId:e.owner_id??null,clientId:e.client_id??void 0,memberUids:e.member_uids??[],orgId:e.org_id??void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function wr(e){const t=e.expiry_date?Y(e.expiry_date):void 0;return{id:e.id,typeCode:e.type_code,typeName:e.type_name,schemaVersion:e.schema_version??void 0,country:e.country??"GB",propertyId:e.property_id??void 0,jobId:e.job_id??void 0,issuedByUid:e.issued_by_uid,issuedByName:e.issued_by_name,issueDate:Y(e.issue_date),expiryDate:t,status:QU(t,e.is_superseded===!0),pdfUrl:e.pdf_url??void 0,fileName:e.file_name??void 0,notes:e.notes??void 0,formData:e.form_data??void 0,photos:e.photos??void 0,orgId:e.org_id??void 0,customerReminder:e.customer_reminder??void 0,supersededBy:e.superseded_by??void 0,isSuperseded:e.is_superseded??!1,buildingControlNotified:e.building_control_notified??void 0,buildingControlNotifiedAt:e.building_control_notified_at?Y(e.building_control_notified_at):void 0,issuedAt:e.issued_at?Y(e.issued_at):void 0,sentAt:e.sent_at?Y(e.sent_at):void 0,sentToEmail:e.sent_to_email??void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function sA(e){return{id:e.id,propertyId:e.property_id,propertyAddress:e.property_address,invitedByUid:e.invited_by_uid,invitedByName:e.invited_by_name,invitedEmail:e.invited_email,role:e.role,status:e.status,createdAt:Y(e.created_at)}}function aj(e){return{id:e.id,name:e.name,logoUrl:e.logo_url??void 0,logoPath:e.logo_path??void 0,phone:e.phone??void 0,email:e.email??void 0,website:e.website??void 0,address:e.address??void 0,defaultHourlyRate:e.default_hourly_rate??void 0,createdByUid:e.created_by_uid,memberUids:e.member_uids??[],subscriptionTier:e.subscription_tier?F_(e.subscription_tier):void 0,rawSubscriptionTier:e.subscription_tier??void 0,subscriptionStatus:e.subscription_status??void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function sj(e){return{uid:e.uid,email:e.email,displayName:e.display_name??e.email?.split("@")[0]??"User",role:e.role,country:e.country??void 0,company:e.company??void 0,phone:e.phone??void 0,orgId:e.active_org_id??e.org_id??void 0,activeOrgId:e.active_org_id??e.org_id??void 0,trades:e.trades?.length?e.trades:void 0,engineerProfile:e.engineer_profile??void 0,isAdmin:e.is_admin??!1,calendarToken:e.calendar_token??void 0,subscriptionTier:e.subscription_tier??void 0,subscriptionStatus:e.subscription_status??void 0,effectiveTier:e.effective_tier??void 0,trialEndsAt:e.trial_ends_at?Y(e.trial_ends_at):void 0,trialKind:e.trial_kind==="card"||e.trial_kind==="no_card"?e.trial_kind:void 0,cardTrialStartedAt:e.card_trial_started_at?Y(e.card_trial_started_at):void 0,lastLoginAt:e.last_login_at?Y(e.last_login_at):void 0,createdAt:e.created_at?Y(e.created_at):new Date}}function oV(e){return{id:e.id,userId:e.user_id,type:e.type,title:e.title,body:e.body??void 0,link:e.link??void 0,read:e.read,createdAt:new Date(e.created_at)}}function Dm(e){return{id:e.id,orgId:e.org_id??void 0,createdByUid:e.created_by_uid,name:e.name,contactName:e.contact_name??void 0,email:e.email??void 0,phone:e.phone??void 0,addressLine1:e.address_line1??void 0,addressLine2:e.address_line2??void 0,city:e.city??void 0,county:e.county??void 0,postcode:e.postcode??void 0,notes:e.notes??void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function wl(e){return{id:e.id,orgId:e.org_id??void 0,createdByUid:e.created_by_uid,clientId:e.client_id,propertyId:e.property_id??void 0,jobNumber:e.job_number,title:e.title,de
34scription:e.description??void 0,status:e.status,assignedToUid:e.assigned_to_uid??void 0,scheduledDate:e.scheduled_date?Y(e.scheduled_date):void 0,completedDate:e.completed_date?Y(e.completed_date):void 0,notes:e.notes??void 0,defaultCertType:e.default_cert_type??void 0,recurrenceRule:e.recurrence_rule,recurrenceEndDate:e.recurrence_end_date?Y(e.recurrence_end_date):void 0,parentJobId:e.parent_job_id??void 0,customStatusId:e.custom_status_id??void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function oA(e){return{id:e.id,jobId:e.job_id,storagePath:e.storage_path,fileName:e.file_name,caption:e.caption??void 0,createdByUid:e.created_by_uid,createdAt:Y(e.created_at)}}function cA(e){return{id:e.id,quoteId:e.quote_id,description:e.description,quantity:Number(e.quantity),unitPrice:e.unit_price,vatRate:Number(e.vat_rate),lineTotal:e.line_total,sortOrder:e.sort_order}}function fs(e,t){return{id:e.id,orgId:e.org_id??void 0,createdByUid:e.created_by_uid,jobId:e.job_id??void 0,clientId:e.client_id,quoteNumber:e.quote_number,status:e.status,validUntil:e.valid_until?Y(e.valid_until):void 0,subtotal:e.subtotal,vatAmount:e.vat_amount,total:e.total,notes:e.notes??void 0,terms:e.terms??void 0,pdfUrl:e.pdf_url??void 0,sentAt:e.sent_at?Y(e.sent_at):void 0,acceptedAt:e.accepted_at?Y(e.accepted_at):void 0,followupsPaused:e.followups_paused??void 0,items:t,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function oj(e){return{id:e.id,invoiceId:e.invoice_id,description:e.description,quantity:Number(e.quantity),unitPrice:e.unit_price,vatRate:Number(e.vat_rate),lineTotal:e.line_total,sortOrder:e.sort_order}}function ps(e,t){return{id:e.id,orgId:e.org_id??void 0,createdByUid:e.created_by_uid,jobId:e.job_id??void 0,clientId:e.client_id,quoteId:e.quote_id??void 0,invoiceNumber:e.invoice_number,status:e.status,invoiceType:e.invoice_type??"standard",issueDate:Y(e.issue_date),dueDate:Y(e.due_date),paymentTerms:e.payment_terms??void 0,subtotal:e.subtotal,vatAmount:e.vat_amount,total:e.total,amountPaid:e.amount_paid,retentionRate:e.retention_rate??0,retentionAmount:e.retention_amount??0,depositRate:e.deposit_rate??0,parentInvoiceId:e.parent_invoice_id??void 0,notes:e.notes??void 0,terms:e.terms??void 0,pdfUrl:e.pdf_url??void 0,sentAt:e.sent_at?Y(e.sent_at):void 0,paidAt:e.paid_at?Y(e.paid_at):void 0,followupsPaused:e.followups_paused??void 0,reverseChargeVat:e.reverse_charge_vat??void 0,viewedAt:e.viewed_at?Y(e.viewed_at):void 0,items:t,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function cV(e){return{id:e.id,userUid:e.user_uid,orgId:e.org_id??void 0,realmId:e.realm_id,companyName:e.company_name??void 0,isSandbox:e.is_sandbox??!1,connectedAt:Y(e.connected_at),disconnectedAt:e.disconnected_at?Y(e.disconnected_at):void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function uV(e){return{connectionId:e.connection_id,invoiceId:e.invoice_id,qbInvoiceId:e.qb_invoice_id??void 0,qbDocNumber:e.qb_doc_number??void 0,syncStatus:e.sync_status,lastSyncedAt:e.last_synced_at?Y(e.last_synced_at):void 0,lastError:e.last_error??void 0,qbBalance:e.qb_balance??void 0,qbTotalPaid:e.qb_total_paid??void 0,paymentCheckedAt:e.payment_checked_at?Y(e.payment_checked_at):void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function lV(e){return{id:e.id,userUid:e.user_uid,orgId:e.org_id??void 0,tenantId:e.tenant_id,companyName:e.company_name??void 0,connectedAt:Y(e.connected_at),disconnectedAt:e.disconnected_at?Y(e.disconnected_at):void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function dV(e){return{connectionId:e.connection_id,invoiceId:e.invoice_id,xeroInvoiceId:e.xero_invoice_id??void 0,xeroInvoiceNumber:e.xero_invoice_number??void 0,syncStatus:e.sync_status,lastSyncedAt:e.last_synced_at?Y(e.last_synced_at):void 0,lastError:e.last_error??void 0,xeroAmountDue:e.xero_amount_due??void 0,xeroAmountPaid:e.xero_amount_paid??void 0,paymentCheckedAt:e.payment_checked_at?Y(e.payment_checked_at):void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function fV(e){return{id:e.id,userUid:e.user_uid,orgId:e.org_id??void 0,stripeAccountId:e.stripe_account_id,accountName:e.account_name??void 0,chargesEnabled:e.charges_enabled,connectedAt:Y(e.connected_at),disconnectedAt:e.disconnected_at?Y(e.disconnected_at):void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function uA(e){return{id:e.id,userUid:e.user_uid,orgId:e.org_id??void 0,name:e.name,items:e.items||[],notes:e.notes??void 0,terms:e.terms??void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function lA(e){return{id:e.id,userUid:e.user_uid,orgId:e.org_id??void 0,name:e.name,items:e.items||[],paymentTerms:e.payment_terms??void 0,notes:e.notes??void 0,terms:e.terms??void 0,dueDays:e.due_days??30,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function dA(e){return{id:e.id,userUid:e.user_uid,orgId:e.org_id??void 0,name:e.name,title:e.title,de
34scription:e.description??void 0,defaultCertType:e.default_cert_type??void 0,defaultQuoteTemplateId:e.default_quote_template_id??void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function pV(e){return{id:e.id,orgId:e.org_id??void 0,createdByUid:e.created_by_uid,jobId:e.job_id,description:e.description??void 0,startTime:e.start_time?Y(e.start_time):void 0,endTime:e.end_time?Y(e.end_time):void 0,durationMins:e.duration_mins,hourlyRate:e.hourly_rate??void 0,billable:e.billable??!0,invoiced:e.invoiced??!1,invoiceId:e.invoice_id??void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function mV(e){return{id:e.id,orgId:e.org_id,createdByUid:e.created_by_uid,name:e.name,trade:e.trade??void 0,email:e.email??void 0,phone:e.phone??void 0,company:e.company??void 0,dayRate:e.day_rate??void 0,hourlyRate:e.hourly_rate??void 0,notes:e.notes??void 0,cisRegistered:e.cis_registered??!1,cisVerificationStatus:e.cis_verification_status??"unverified",entityType:e.entity_type??void 0,utrNumber:e.utr_number??void 0,niNumber:e.ni_number??void 0,companyReg:e.company_reg??void 0,verificationReference:e.verification_reference??void 0,verifiedAt:e.verified_at?Y(e.verified_at):void 0,vatRegistered:e.vat_registered??!1,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function _V(e){return{id:e.id,orgId:e.org_id,createdByUid:e.created_by_uid,category:e.category??void 0,description:e.description,unitPrice:e.unit_price,unit:e.unit??"each",vatRate:Number(e.vat_rate??20),sku:e.sku??void 0,sortOrder:e.sort_order??0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function hV(e){const t=e.price_list_items;return{id:e.id,bundleId:e.bundle_id,priceListItemId:e.price_list_item_id,quantity:Number(e.quantity??1),sortOrder:e.sort_order??0,description:t?.description,unitPrice:t?.unit_price,vatRate:t?.vat_rate!=null?Number(t.vat_rate):void 0,unit:t?.unit}}function gV(e,t){return{id:e.id,orgId:e.org_id,createdByUid:e.created_by_uid,name:e.name,description:e.description??void 0,items:t,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function yV(e){return{id:e.id,jobId:e.job_id,subcontractorId:e.subcontractor_id,role:e.role??void 0,notes:e.notes??void 0,createdAt:Y(e.created_at),subcontractorName:e.subcontractor_name??void 0,subcontractorTrade:e.subcontractor_trade??void 0}}function vV(e){return{id:e.id,orgId:e.org_id??void 0,createdByUid:e.created_by_uid,name:e.name,isDefault:e.is_default??!1,sortOrder:e.sort_order??0,createdAt:Y(e.created_at)}}function EV(e){return{id:e.id,orgId:e.org_id??void 0,createdByUid:e.created_by_uid,jobId:e.job_id??void 0,categoryId:e.category_id??void 0,description:e.description,amount:e.amount,vatAmount:e.vat_amount??0,expenseDate:Y(e.expense_date),paymentMethod:e.payment_method??void 0,isBillable:e.is_billable??!1,isReimbursable:e.is_reimbursable??!1,isReimbursed:e.is_reimbursed??!1,receiptPath:e.receipt_path??void 0,receiptFileName:e.receipt_file_name??void 0,supplierName:e.supplier_name??void 0,notes:e.notes??void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function SV(e){return{id:e.id,orgId:e.org_id??void 0,createdByUid:e.created_by_uid,jobId:e.job_id??void 0,fromLocation:e.from_location,toLocation:e.to_location,distanceMiles:Number(e.distance_miles),ratePerMile:e.rate_per_mile??45,amount:e.amount,tripDate:Y(e.trip_date),isReturnTrip:e.is_return_trip??!1,notes:e.notes??void 0,createdAt:Y(e.created_at)}}function bV(e){return{id:e.id,orgId:e.org_id,createdByUid:e.created_by_uid,subcontractorId:e.subcontractor_id,jobId:e.job_id??void 0,invoiceId:e.invoice_id??void 0,grossAmount:e.gross_amount,materialsAmount:e.materials_amount,labourAmount:e.labour_amount,deductionRate:Number(e.deduction_rate),deductionAmount:e.deduction_amount,netPayment:e.net_payment,paymentDate:Y(e.payment_date),taxMonth:e.tax_month,notes:e.notes??void 0,createdAt:Y(e.created_at),subcontractorName:e.subcontractor_name??void 0}}function TV(e){return{id:e.id,orgId:e.org_id,createdByUid:e.created_by_uid,taxMonth:e.tax_month,totalPayments:e.total_payments,totalDeductions:e.total_deductions,totalMaterials:e.total_materials,status:e.status,isNil:e.is_nil??!1,amendedAt:e.amended_at?Y(e.amended_at):void 0,submittedAt:e.submitted_at?Y(e.submitted_at):void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function AV(e){return{id:e.id,userId:e.user_id,kind:e.kind,awardingBody:e.awarding_body??void 0,issuedOn:e.issued_on??void 0,expiresOn:e.expires_on??void 0,documentPath:e.document_path??void 0,documentFileName:e.document_file_name??void 0,createdAt:Y(e.created_at),updatedAt:Y(e.updated_at)}}function RV(e){return{id:e.id,certId:e.cert_id,oldFileName:e.old_file_name??void 0,newFileName:e.new_file_name,reason:e.reason,rebuiltAt:Y(e.rebuilt_at)}}async function ii(e){try{const{data:t,error:i}=await D.from("users").select("*").eq("uid",e).single();if(i||!t)return await Dl(e);const a=sj(t);return UU(a).catch(()=>{}),a}catch{return await Dl(e)}}async function Ga(e){await D.from("users").update({last_login_at:new Date().toISOString()}).eq("uid",e)}const oi={properties:(e,t)=>["properties",e,t??""],property:e=>["property",e],certificates:(e,t)=>["certificates",e,t??""],certificate:e=>["certificate",e],certificatesForProperty:e=>["certificatesForProperty",e],pendingInvites:e=>["pendingInvites",e],invitesForProperty:(e,t)=>["invitesForProperty",e,t],subscription:e=>["subscription",e],clients:(e,t)=>["clients",e,t??""],client:e=>["client",e],jobs:(e,t)=>["jobs",e,t??""],job:e=>["job",e],jobsForClient:e=>["jobsForClient",e],certificatesForJob:e=>["certificatesForJob",e],quotes:(e,t)=>["quotes",e,t??""],quote:e=>["quote",e],quotesForJob:e=>["quotesForJob",e],quotesForClient:e=>["quotesForClient",e],invoices:(e,t)=>["invoices",e,t??""],invoice:e=>["invoice",e],invoicesForJob:e=>["invoicesForJob",e],invoicesForClient:e=>["invoicesForClient",e],invoicesForQuote:e=>["invoicesForQuote",e],portfolio:e=>["portfolio",e],notifications:e=>["notifications",e],unreadNotificationCount:e=>["unreadNotificationCount",e],qbConnection:(e,t)=>["qbConnection",e,t??""],qbInvoiceSync:e=>["qbInvoiceSync",e],xeroConnection:(e,t)=>["xeroConnection",e,t??""],xeroInvoiceSync:e=>["xeroInvoiceSync",e],stripeConnection:(e,t)=>["stripeConnection",e,t??""],jobTasks:e=>["jobTasks",e],jobInvoicingSummary:e=>["jobInvoicingSummary",e],timeEntries:e=>["timeEntries",e],timeEntriesForJob:e=>["timeEntriesForJob",e],subcontractors:e=>["subcontractors",e],jobAssignees:e=>["jobAssignees",e],priceListItems:e=>["priceListItems",e],kitBundles:e=>["kitBundles",e],dashboardSummary:(e,t)=>["dashboardSummary",e,t??""],deliveryStatus:e=>["deliveryStatus",e],certificateDelivery:e=>["certificateDelivery",e],adminMetrics:()=>["adminMetrics"],contentMetrics:()=>["contentMetrics"],adminArticles:e=>["adminArticles",e],inventoryLocations:e=>["inventoryLocations",e],inventoryItems:e=>["inventoryItems",e],inventoryItem:e=>["inventoryItem",e],inventoryStock:e=>["inventoryStock",e],inventoryMovements:(e,t)=>["inventoryMovements",e,t??""],lowStockItems:e=>["lowStockItems",e],suppliers:(e,t)=>["suppliers",e,t??""],purchaseOrders:(e,t)=>["purchaseOrders",e,t??""],purchaseOrder:e=>["purchaseOrder",e],purchaseOrdersForJob:e=>["purchaseOrdersForJob",e],expenseCategories:e=>["expenseCategories",e??""],expenses:(e,t)=>["expenses",e,t??""],expensesForJob:e=>["expensesForJob",e],qualificationDocuments:e=>["qualificationDocuments",e],dpaAcceptance:(e,t)=>["dpaAcceptance",e,t],standingAcknowledgement:(e,t)=>
34["standingAcknowledgement",e,t],certificateRebuilds:e=>["certificateRebuilds",e],certificateWithdrawal:e=>["certificateWithdrawal",e],mileageForJob:e=>["mileageForJob",e],mileageLog:(e,t)=>["mileageLog",e,t??""],expenseSummary:(e,t,i,a)=>["expenseSummary",e,t??"",i??"",a??""],bookingSettings:e=>["bookingSettings",e],bookingSettingsBySlug:e=>["bookingSettingsBySlug",e],bookingServices:e=>["bookingServices",e],bookings:(e,t)=>["bookings",e,t??""],booking:e=>["booking",e],availableSlots:(e,t,i)=>["availableSlots",e,t,i??""],cisPayments:(e,t)=>["cisPayments",e,t??""],cisReturns:e=>["cisReturns",e],cisReturn:(e,t)=>["cisReturn",e,t],cisReturnBreakdown:(e,t)=>["cisReturnBreakdown",e,t],cisPaymentByInvoice:e=>["cisPaymentByInvoice",e],assets:(e,t)=>["assets",e,t??""],asset:e=>["asset",e],assetsForProperty:e=>["assetsForProperty",e],assetByQrToken:e=>["assetByQrToken",e],assetServiceLog:e=>["assetServiceLog",e],assetCertificates:e=>["assetCertificates",e],assetJobs:e=>["assetJobs",e]};function OV(e,t){const i=(e??"").trim(),a=(t??"").trim(),c=m=>m.replace(/\s+/g,"").toUpperCase(),u=fA(i),f=a===""||a.toUpperCase()==="N/A"||!!u&&c(u)===c(a);return[i,f?"":a].filter(m=>m!==""&&m.toUpperCase()!=="N/A").join(", ")}const cj=/\b([A-Z]{1,2}\d[A-Z\d]?)\s*(\d[A-Z]{2})\s*$/i,uj=/\b([AC-FHKNPRTV-Y]\d{2})\s*([0-9AC-FHKNPRTV-Y]{4})\s*$/i;function fA(e){const t=(e??"").replace(/[\s,.;]+$/,""),i=cj.exec(t)??uj.exec(t);return i?`${i[1]} ${i[2]}`.toUpperCase():""}function xl(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g," ").trim()}function DV(e,t){const i=xl(e);return i!==""&&i===xl(t)}async function Ts(e,t,i,a,c){const[u,f]=await Promise.allSettled([e,t]),p=u.status==="fulfilled"&&!u.value.error,m=f.status==="fulfilled"&&!f.value.error;if(!p&&!m)throw new Error(`Failed to load ${c}`);const h=new Set,v=[];if(p)for(const g of u.value.data??[])h.add(g.id),v.push(i(g));if(m)for(const g of f.value.data??[])h.has(g.id)||v.push(i(g));return v.sort(a),v}const sc=(e,t)=>t.createdAt.getTime()-e.createdAt.getTime(),wm="id,address,postcode,property_type,owner_name,owner_email,notes,owner_id,client_id,member_uids,org_id,created_at,updated_at";async function lj(e){const{data:t,error:i}=await D.from("properties").select(wm).contains("member_uids",[e]).order("created_at",{ascending:!1});if(i)throw i;return t.map(G_)}async function pA(e){const{data:t,error:i}=await D.from("properties").select("*").eq("id",e).maybeSingle();if(i)throw i;return t?G_(t):null}async function dj(e){const t={address:e.address,member_uids:e.memberUids},i=(e.postcode??"").trim()||fA(e.address);(e.postcode!==void 0||i)&&(t.postcode=i),e.propertyType!==void 0&&(t.property_type=e.propertyType),e.ownerName!==void 0&&(t.owner_name=e.ownerName),e.ownerEmail!==void 0&&(t.owner_email=e.ownerEmail),e.notes!==void 0&&(t.notes=e.notes),e.ownerId!==null&&e.ownerId!==void 0&&(t.owner_id=e.ownerId),e.clientId!==void 0&&(t.client_id=e.clientId),e.orgId!==void 0&&(t.org_id=e.orgId);const{data:a,error:c}=await D.from("properties").insert(t).select("id").single();if(c)throw c;return a.id}const tl=new Map;function wV(e){const t=[xl(e.address),xl(e.postcode),e.orgId??""].join("|"),i=tl.get(t);if(i)return i;const a=dj(e).catch(c=>{throw tl.delete(t),c});return tl.set(t,a),a}function xV(){tl.clear()}async function fj(e,t){const i={};t.address!==void 0&&(i.address=t.address),t.postcode!==void 0&&(i.postcode=t.postcode),t.propertyType!==void 0&&(i.property_type=t.propertyType),t.ownerName!==void 0&&(i.owner_name=t.ownerName),t.ownerEmail!==void 0&&(i.owner_email=t.ownerEmail),t.notes!==void 0&&(i.notes=t.notes),t.clientId!==void 0&&(i.client_id=t.clientId);const{error:a}=await D.from("properties").update(i).eq("id",e);if(a)throw a}async function IV(e){const{error:t}=await D.from("properties").delete().eq("id",e);if(t)throw t}async function pj(e,t){return t?Ts(D.from("properties").select(wm).contains("member_uids",[e]).order("created_at",{ascending:!1}),D.from("properties").select(wm).eq("org_id",t).order("created_at",{ascending:!1}),G_,sc,"properties"):lj(e)}async function CV(e){const{data:t,error:i}=await D.from("property_invites").insert({property_id:e.propertyId,property_address:e.propertyAddress,invited_by_uid:e.invitedByUid,invited_by_name:e.invitedByName,invited_email:e.invitedEmail.toLowerCase(),role:e.role,status:"pending"}).select("id").single();if(i)throw i;return t.id}async function LV(e){const{data:t,error:i}=await D.from("property_invites").select("id,property_id,property_address,invited_by_uid,invited_by_name,invited_email,role,status,created_at").eq("invited_email",e.toLowerCase()).eq("status","pen
34ding");if(i)throw i;return t.map(sA)}async function MV(e,t){const{data:i,error:a}=await D.from("property_invites").select("id,property_id,property_address,invited_by_uid,invited_by_name,invited_email,role,status,created_at").eq("property_id",e).eq("invited_by_uid",t).order("created_at",{ascending:!1});if(a)throw a;return i.map(sA)}async function NV(e,t,i,a){const{error:c}=await D.from("property_invites").update({status:"accepted"}).eq("id",e);if(c)throw c;const{error:u}=await D.rpc("certbox_add_property_member",{p_property_id:i,p_user_id:t,p_role:a});if(u)throw u}async function kV(e){const{error:t}=await D.from("property_invites").update({status:"declined"}).eq("id",e);if(t)throw t}const mj="2026-09-17",_j="2026-09-17",mA="2026-09-17";function hj(e){return e.code==="PGRST204"||e.code==="42703"?!0:/dpa_version/.test(e.message??"")}function gj(e){return e.code==="23514"&&/terms_acceptances_surface_known/.test(e.message??"")}async function _A(e,t="signup"){if(!e)return!1;const i={user_id:e,terms_version:mj,privacy_version:_j,surface:t};try{const{error:a}=await D.from("terms_acceptances").insert({...i,dpa_version:mA});if(!a)return!0;if(hj(a)){const c=await D.from("terms_acceptances").insert(i);return c.error?(console.warn("[terms] acceptance not recorded:",c.error.message??c.error),!1):(console.warn("[terms] acceptance recorded without dpa_version - migration 183 is not applied"),!0)}return gj(a)?(console.warn(`[terms] acceptance not recorded: surface '${t}' is refused - migration 194 is not applied`),!1):(console.warn("[terms] acceptance not recorded:",a.message??a),!1)}catch(a){return console.warn("[terms] acceptance not recorded:",a),!1}}async function PV(e){if(!e)return null;try{const{data:t,error:i}=await D.from("terms_acceptances").select("id").eq("user_id",e).eq("dpa_version",mA).limit(1);return i?(console.warn("[terms] could not read acceptances:",i.message??i),null):Array.isArray(t)&&t.length>0}catch(t){return console.warn("[terms] could not read acceptances:",t),null}}const hA="certbox_chunk_reload",yj=6e4;function gA(e=Date.now()){const t=Xn("sessionStorage",hA);if(!t)return!0;const i=Number(t);return Number.isFinite(i)?e-i>yj:!0}function vj(e=Date.now()){mi("sessionStorage",hA,String(e))}function Jl(){return Ji.isOnline()?gA()?null:"rate-limited":"offline"}async function Ej(){return!Ji.isOnline()||!gA()?!1:(vj(),window.location.reload(),!0)}const BS=1e4;function Sj(e){try{const t=String(e);return(t.match(/["'`]([^"'`]*\.(?:js|mjs|css))["'`]/)??t.match(/import\(\s*["'`]([^"'`]+)["'`]/))?.[1]?.slice(-80)??"unknown"}catch{return"unknown"}}function bj(e,t,i){try{const a=new URL(e,t);return a.origin!==i?null:(a.searchParams.set("__retry",String(Date.now())),a.href)}catch{return null}}function Tj(e){if(typeof window>"u")return null;try{const t=String(e).match(/["'`]([^"'`]*\.(?:js|mjs))["'`]/);if(!t?.[1])return null;let i=window.location.href;try{const a=new URL(import.meta.url);(a.protocol==="http:"||a.protocol==="https:")&&(i=a.href)}catch{}return bj(t[1],i,window.location.origin)}catch{return null}}function Aj(e,t){if(!e||typeof e!="object")return null;const i=e,a=String(t).match(/default\s*:\s*[A-Za-z_$][\w$]*\.([A-Za-z_$][\w$]*)/)?.[1];return a?i[a]!=null?{default:i[a]}:null:i}function Rj(e){const t=Tj(e);if(!t)return null;try{return import(t).then(i=>{const a=Aj(i,e);if(!a)throw new Error("fresh chunk loaded but its shape was not usable");return a})}catch{return null}}function Oj(e){return Promise.any(e).catch(t=>{throw t instanceof AggregateError&&t.errors.length?t.errors[0]:t})}function VS(e,t,i){return new Promise((a,c)=>{const u=setTimeout(()=>c(new Error(`Dynamic import timeout: ${i}`)),t);e.then(a,c).finally(()=>clearTimeout(u))})}function Ot(e){const t=Sj(e),i=e();return VS(i,BS,t).catch(()=>VS(Oj([i,Rj(e)].filter(a=>a!=null)),BS,t).catch(async a=>{if(await Ej())return new Promise(()=>{});const u=Jl();throw a instanceof Error&&u&&(a.message=`${a.message} [no recovery: ${u}]`),a}))}function F(e){return Q.lazy(()=>Ot(e))}const Dj=[];function yA(e){return!Dj.includes(e)}const UV=!1,Wl={GB:{"GS-01":()=>y(()=>import("./gs-01-DdcbFIZq.js"),[]),"IN-01":()=>y(()=>import("./in-01-CM7C5W20.js"),[]),"IN-02":()=>y(()=>import("./in-02-BoNjBswf.js"),[]),"SC-01":()=>y(()=>import("./sc-01-DqhK7Ll0.js"),[]),"SC-02":()=>y(()=>import("./sc-02-BXEgfxNN.js"),[]),"PR-01":()=>y(()=>import("./pr-01-CbT9lQ5x.js"),[]),"CH-01":()=>y(()=>import("./ch-01-BNlXtm8g.js"),[]),"OT-01":()=>y(()=>import("./ot-01-DAIYJysK.js"),[]),"EL-02":()=>y(()=>import("./el-02-CkBoTHyW.js"),[]),"OF-01":()=>y(()=>import("./of-01-BmTq4siY.js"),[]),"SF-01":()=>y(()=>import("./sf-01-YnKcVAjw.js"),[]),"SF-02":()=>y(()=>import("./sf-02-DbgD-DH3.js"),[]),"EN-03":()=>y(()=>import("./en-03-CfBJHv3c.js"),[]),"FR-03":()=>y(()=>import("./fr-03-tqpBTJDI.js"),[]),"DR-01":()=>y(()=>import("./dr-01-CFOP0we9.js"),[]),"RF-01":()=>y(()=>import("./rf-01-By62qHIW.js"),[]),"WS-01":()=>y(()=>import("./ws-01-qP3Kd9vg.js"),[]),"WS-02":()=>y(()=>import("./ws-02-DrZtWP3b.js"),[]),"WS-03":()=>y(()=>import("./ws-03-C9KbbUYP.js"),[]),"FR-02":()=>y(()=>import("./fr-02-DOLtBr_f.js"),[]),"EL-04":()=>y(()=>import("./el-04-C4DU9C0E.js"),[]),"EL-03":()=>y(()=>import("./el-03-DRZ27VSV.js"),[]),"EL-05":()=>y(()=>import("./el-05-8gxPgbSF.js"),[]),"EL-01":()=>y(()=>import("./el-01-CcdBV4GO.js"),[]),"EL-06":()=>y(()=>import("./el-06-CxTT7KiS.js"),[]),"EL-07":()=>y(()=>import("./el-07-NhaAT7Ye.js"),[]),"FR-01":()=>y(()=>import("./fr-01-DRLBrcHl.js"),[]),"LG-04":()=>y(()=>import("./lg-04-CSbEy8Kb.js"),[]),"LG-01":()=>y(()=>import("./lg-01-BePmGrBJ.js"),[]),"GS-02":()=>y(()=>import("./gs-02-ckShlDqc.js"),[]),"HW-01":()=>y(()=>
34import("./hw-01-C7XOboYG.js"),[]),"GS-03":()=>y(()=>import("./gs-03-Ja7bZPUg.js"),[]),"GS-04":()=>y(()=>import("./gs-04-DSIQ4_62.js"),[]),"GS-05":()=>y(()=>import("./gs-05-srXwAHIe.js"),[]),"GS-06":()=>y(()=>import("./gs-06-BnzIFovI.js"),[]),"GS-07":()=>y(()=>import("./gs-07-CZMGygyr.js"),[]),"GS-08":()=>y(()=>import("./gs-08-Cg02g3b4.js"),[]),"GS-09":()=>y(()=>import("./gs-09-9ctQoiNg.js"),[]),"GS-10":()=>y(()=>import("./gs-10-C402ShPe.js"),[]),"GS-11":()=>y(()=>import("./gs-11-C6PZLTU8.js"),[]),"GS-12":()=>y(()=>import("./gs-12-CpHFEItf.js"),[]),"GS-13":()=>y(()=>import("./gs-13-BQ3ajON7.js"),[]),"GS-14":()=>y(()=>import("./gs-14-CFqsYNiR.js"),[]),"GS-15":()=>y(()=>import("./gs-15-DF1SIjdI.js"),[]),"GS-16":()=>y(()=>import("./gs-16-CNAkRx63.js"),[]),"GS-17":()=>y(()=>import("./gs-17-BzDhSMNP.js"),[]),"GS-18":()=>y(()=>import("./gs-18-BIYqTUi8.js"),[]),"GS-19":()=>y(()=>import("./gs-19-DxzW2W2J.js"),[]),"GS-20":()=>y(()=>import("./gs-20-DnXta8nQ.js"),[]),"LF-01":()=>y(()=>import("./lf-01-BDPhQB3d.js"),[]),"OF-02":()=>y(()=>import("./of-02-D7WWz7_c.js"),[]),"HS-01":()=>y(()=>import("./hs-01-COU2P6oD.js"),[]),"HS-02":()=>y(()=>import("./hs-02-CH6pgr6v.js"),[]),"EN-02":()=>y(()=>import("./en-02-bQKaw44t.js"),[]),"TH-01":()=>y(()=>import("./th-01-8keEv6Zb.js"),[]),"WP-01":()=>y(()=>import("./wp-01-0B8lQbCD.js"),[]),"RM-01":()=>y(()=>import("./rm-01-ZSw-56so.js"),[]),"AS-01":()=>y(()=>import("./as-01-Dcohptgp.js"),[]),"AS-02":()=>y(()=>import("./as-02-D1uTGqhV.js"),[]),"AS-03":()=>y(()=>import("./as-03-Bt_3wd-W.js"),[]),"LG-02":()=>y(()=>import("./lg-02-L1ZsdyyN.js"),[]),"HS-03":()=>y(()=>import("./hs-03-CBDy_eYG.js"),[]),"FG-01":()=>y(()=>import("./fg-01-C37TXrgq.js"),[]),"FG-02":()=>y(()=>import("./fg-02-BWEimaGg.js"),[]),"AC-02":()=>y(()=>import("./ac-02-cN7C-oJU.js"),[]),"FR-04":()=>y(()=>import("./fr-04-C3mNmV0Q.js"),[]),"FR-06":()=>y(()=>import("./fr-06-zBs2gvFX.js"),[]),"FR-07":()=>y(()=>import("./fr-07-K-RCwU_g.js"),[]),"HV-01":()=>y(()=>import("./hv-01-BVHo6nB-.js"),[]),"HV-03":()=>y(()=>import("./hv-03-cldezIaA.js"),[]),"SE-01":()=>y(()=>import("./se-01-DkLal-kh.js"),[]),"SE-02":()=>y(()=>import("./se-02-C7kMyL8G.js"),[]),"CV-01":()=>y(()=>import("./cv-01-CGrdJAzc.js"),[]),"CV-02":()=>y(()=>import("./cv-02-Y9FELSPu.js"),[]),"FR-05":()=>y(()=>import("./fr-05-CcHJ8Rw8.js"),[]),"WS-04":()=>y(()=>import("./ws-04-Dut8V35f.js"),[]),"DR-03":()=>y(()=>import("./dr-03-BDAOQZNR.js"),[]),"SC-03":()=>y(()=>import("./sc-03-K4EeLeDW.js"),[]),"RE-04":()=>y(()=>import("./re-04-CTjJQSWp.js"),[]),"RE-05":()=>y(()=>import("./re-05-DxZd128d.js"),[]),"RE-06":()=>y(()=>import("./re-06-DW-zsSy9.js"),[]),"RE-07":()=>y(()=>import("./re-07-BxuV1LQD.js"),[]),"RE-08":()=>y(()=>import("./re-08-7FNre7K6.js"),[]),"RE-09":()=>y(()=>import("./re-09-6JXlDCJL.js"),[]),"RE-11":()=>y(()=>import("./re-11-DUlnPIxC.js"),[]),"RE-10":()=>y(()=>import("./re-10-mrSx3Ti7.js"),[]),"TH-03":()=>y(()=>import("./th-03-BOp2kouj.js"),[]),"HV-02":()=>y(()=>import("./hv-02-BdmsZkO6.js"),[]),"SE-03":()=>y(()=>import("./se-03-COeVZwos.js"),[]),"WS-05":()=>y(()=>import("./ws-05-BDDxPfvO.js"),[]),"IL-02":()=>y(()=>import("./il-02-CxkX5Z75.js"),[]),"SP-01":()=>y(()=>import("./sp-01-BVFxanup.js"),[]),"SP-02":()=>y(()=>import("./sp-02-Cb0UlRls.js"),[]),"SP-03":()=>y(()=>import("./sp-03-D1Jq5VDb.js"),[]),"SP-04":()=>y(()=>
34import("./sp-04-Ce9pZLeo.js"),[]),"FR-08":()=>y(()=>import("./fr-08-Bbt0RWtf.js"),[]),"FR-09":()=>y(()=>import("./fr-09-Co5EpMwV.js"),[]),"FR-10":()=>y(()=>import("./fr-10-B1q9Ql2c.js"),[]),"FR-11":()=>y(()=>import("./fr-11-C8Qh1QYE.js"),[]),"FR-12":()=>y(()=>import("./fr-12-CxUKDaQq.js"),[]),"FR-13":()=>y(()=>import("./fr-13-CBTxS4Zm.js"),[]),"FR-14":()=>y(()=>import("./fr-14-BwTiMFEk.js"),[]),"FR-15":()=>y(()=>import("./fr-15-n7fvGP0Y.js"),[]),"FR-16":()=>y(()=>import("./fr-16-BITwEqxr.js"),[]),"FR-17":()=>y(()=>import("./fr-17-CcpHvbwf.js"),[]),"FR-18":()=>y(()=>import("./fr-18-MoUS7aol.js"),[]),"FR-19":()=>y(()=>import("./fr-19-2vbLixxY.js"),[]),"FR-20":()=>y(()=>import("./fr-20-D1zh5WFF.js"),[]),"FR-21":()=>y(()=>import("./fr-21-Bg_DoAW3.js"),[]),"FR-22":()=>y(()=>import("./fr-22-hpkgM1WT.js"),[]),"FR-23":()=>y(()=>import("./fr-23-X9SMilJ9.js"),[]),"FR-24":()=>y(()=>import("./fr-24-J9bmzEvy.js"),[]),"EL-08":()=>y(()=>import("./el-08-DMbuwgoY.js"),[]),"EL-09":()=>y(()=>import("./el-09-C0LfUT8R.js"),[]),"EL-10":()=>y(()=>import("./el-10-CD60r9_t.js"),[]),"OF-03":()=>y(()=>import("./of-03-CrDE9ZHR.js"),[]),"OF-04":()=>y(()=>import("./of-04-CUb5hxQx.js"),[]),"OF-05":()=>y(()=>import("./of-05-uJEG7GET.js"),[]),"OF-06":()=>y(()=>import("./of-06-CvRXdteR.js"),[]),"OF-07":()=>y(()=>import("./of-07-CNoNX7bw.js"),[])},IE:{"GS-01":()=>y(()=>import("./gs-01-DmsNDQ88.js"),[]),"GS-02":()=>y(()=>import("./gs-02-D32eZ7TO.js"),[]),"GS-03":()=>y(()=>import("./gs-03-DT_RvLTa.js"),[]),"GS-04":()=>y(()=>import("./gs-04-ThK1ETyQ.js"),[]),"EL-01":()=>y(()=>import("./el-01-nKOCZEvt.js"),[]),"EL-02":()=>y(()=>import("./el-02-DIeLgpoJ.js"),[]),"EL-03":()=>y(()=>import("./el-03-C063A5dE.js"),[]),"EL-04":()=>y(()=>import("./el-04-BCzvhacb.js"),[]),"PL-01":()=>y(()=>import("./pl-01-Jemh7bWa.js"),[]),"PL-02":()=>y(()=>import("./pl-02-U6r-Q9uL.js"),[]),"PL-03":()=>y(()=>import("./pl-03-JSU8ml60.js"),[]),"PL-04":()=>y(()=>import("./pl-04-i_4vQm7m.js"),[]),"OT-01":()=>y(()=>import("./ot-01-AwZcYerN.js"),[]),"EL-05":()=>y(()=>import("./el-05-XpkJkfDP.js"),[]),"DR-01":()=>y(()=>import("./dr-01-DBroUaMT.js"),[]),"FR-01":()=>y(()=>import("./fr-01-h7Zc2h_4.js"),[]),"FR-02":()=>y(()=>import("./fr-02-RPXq81B3.js"),[]),"FR-03":()=>y(()=>import("./fr-03-DevkBU6t.js"),[])},AU:{"GS-01":()=>y(()=>import("./gs-01-CGyNbBYZ.js"),[]),"GS-02":()=>y(()=>import("./gs-02-BRQuKRdp.js"),[]),"GS-03":()=>y(()=>import("./gs-03-CFebBLu2.js"),[]),"EL-01":()=>y(()=>import("./el-01-CnkKhS4z.js"),[]),"EL-02":()=>y(()=>import("./el-02-CgHSLceW.js"),[]),"EL-03":()=>y(()=>import("./el-03-Bxbxu3PY.js"),[]),"EL-04":()=>y(()=>import("./el-04-Bb6AR-Bp.js"),[]),"EL-05":()=>y(()=>import("./el-05-DwsAjv6C.js"),[]),"PL-01":()=>y(()=>import("./pl-01-CTEJbXiv.js"),[]),"PL-02":()=>y(()=>import("./pl-02-DiX3NT5S.js"),[]),"PL-03":()=>y(()=>import("./pl-03-9c1Ql-au.js"),[]),"PL-04":()=>y(()=>import("./pl-04-obshBOBK.js"),[]),"PL-05":()=>y(()=>import("./pl-05-BqtFSZzA.js"),[]),"PL-06":()=>y(()=>import("./pl-06-Dy6JbJlO.js"),[]),"OT-01":()=>y(()=>import("./ot-01-CnP5iAh7.js"),[])},US:{"GS-01":()=>y(()=>import("./gs-01-CsNRNzC8.js"),[]),"GS-02":()=>y(()=>import("./gs-02-DgWa9Ibe.js"),[]),"GS-03":()=>y(()=>import("./gs-03-BliuZyrD.js"),[]),"GS-04":()=>y(()=>import("./gs-04-Dg421Nvy.js"),[]),"GS-05":()=>y(()=>import("./gs-05-DIM1KERW.js"),[]),"EL-01":()=>y(()=>import("./el-01-BHzJbjZ6.js"),[]),"EL-02":()=>y(()=>import("./el-02-B2ylXCky.js"),[]),"EL-03":()=>y(()=>import("./el-03-ClxhovWj.js"),[]),"EL-04":()=>y(()=>import("./el-04-C_53yQ-h.js"),[]),"EL-05":()=>y(()=>import("./el-05-BeID-Lz_.js"),[]),"EL-06":()=>y(()=>import("./el-06-RZepqqw5.js"),[]),"PL-01":()=>y(()=>import("./pl-01-Bj2VSgR6.js"),[]),"PL-02":()=>y(()=>import("./pl-02-BOI3--PU.js"),[]),"PL-03":()=>y(()=>import("./pl-03-C6dpEKrB.js"),[]),"PL-04":()=>y(()=>import("./pl-04-DqXlH4G8.js"),[]),"PL-05":()=>y(()=>import("./pl-05-ydrfO7ds.js"),[]),"HV-01":()=>y(()=>import("./hv-01-q76Zohg2.js"),[]),"HV-02":()=>y(()=>import("./hv-02-B_zpRnQB.js"),[]),"HV-03":()=>y(()=>import("./hv-03-Bj4X43_n.js"),[]),"HV-04":()=>y(()=>import("./hv-04-lt_38snu.js"),[]),"HV-05":()=>y(()=>
34import("./hv-05-CH-_9DaP.js"),[]),"FR-01":()=>y(()=>import("./fr-01-DhKZkySb.js"),[]),"FR-02":()=>y(()=>import("./fr-02-kJhMEggQ.js"),[]),"FR-03":()=>y(()=>import("./fr-03-B6Ynew03.js"),[]),"FR-04":()=>y(()=>import("./fr-04-CLtQrG5i.js"),[]),"FR-57":()=>y(()=>import("./fr-57-CxjcEVYT.js"),[]),"FR-19":()=>y(()=>import("./fr-19-BRfAd2iT.js"),[]),"FR-24":()=>y(()=>import("./fr-24-Bnl_-qEh.js"),[]),"FR-49":()=>y(()=>import("./fr-49-Bgm-YnpH.js"),[]),"HV-11":()=>y(()=>import("./hv-11-CO7ZvCxB.js"),[]),"PL-08":()=>y(()=>import("./pl-08-B74w5Utq.js"),[]),"EL-09":()=>y(()=>import("./el-09-z63SXjrk.js"),[]),"GS-15":()=>y(()=>import("./gs-15-CBHwaQK1.js"),[]),"FR-05":()=>y(()=>import("./fr-05-BIW7PY8t.js"),[]),"PL-29":()=>y(()=>import("./pl-29-BFTHaqKs.js"),[]),"FR-06":()=>y(()=>import("./fr-06-D-orYZ6s.js"),[]),"FR-12":()=>y(()=>import("./fr-12-CmeazdOF.js"),[]),"FR-16":()=>y(()=>import("./fr-16-B486Fqxl.js"),[]),"FR-18":()=>y(()=>import("./fr-18-CCEEilGh.js"),[]),"FR-21":()=>y(()=>import("./fr-21-Bnt5r0mZ.js"),[]),"FR-29":()=>y(()=>import("./fr-29-ByIBeHy3.js"),[]),"FR-34":()=>y(()=>import("./fr-34-DR5Jm8Z9.js"),[]),"FR-47":()=>y(()=>import("./fr-47-CUG8-Ubs.js"),[]),"FR-50":()=>y(()=>import("./fr-50-Cd7R4Df8.js"),[]),"FR-52":()=>y(()=>import("./fr-52-CK9-RnD1.js"),[]),"EL-08":()=>y(()=>import("./el-08-ANcfaA_c.js"),[]),"EL-11":()=>y(()=>import("./el-11-D9Bb92ne.js"),[]),"EL-12":()=>y(()=>import("./el-12-BffOh1qO.js"),[]),"EL-13":()=>y(()=>import("./el-13-C9O1rzqD.js"),[]),"EL-15":()=>y(()=>import("./el-15-CN1zCRrA.js"),[]),"EL-16":()=>y(()=>import("./el-16-DTOb0DkB.js"),[]),"EL-17":()=>y(()=>import("./el-17-EV2Zv6yD.js"),[]),"EL-18":()=>y(()=>import("./el-18-DojoiKGu.js"),[]),"EL-19":()=>y(()=>import("./el-19-CCCgqVk_.js"),[]),"EL-22":()=>y(()=>import("./el-22-C2suHJvY.js"),[]),"EL-24":()=>y(()=>import("./el-24-C_aQR7Vp.js"),[]),"EL-27":()=>y(()=>import("./el-27-IkV6TeDw.js"),[]),"PL-06":()=>y(()=>import("./pl-06-B2WxHNI3.js"),[]),"PL-07":()=>y(()=>import("./pl-07-CYo9PGmn.js"),[]),"PL-09":()=>y(()=>import("./pl-09-CstQWlp9.js"),[]),"PL-10":()=>y(()=>import("./pl-10-C7SI4dSe.js"),[]),"PL-11":()=>y(()=>import("./pl-11-oIzM1Tuk.js"),[]),"PL-17":()=>y(()=>import("./pl-17-DfdLv21E.js"),[]),"PL-26":()=>y(()=>import("./pl-26-BUE1vtfu.js"),[]),"PL-28":()=>y(()=>import("./pl-28-BQ1qO9qH.js"),[]),"HV-12":()=>y(()=>import("./hv-12-BVGjeu_Y.js"),[]),"HV-13":()=>y(()=>import("./hv-13-BXonwwwt.js"),[]),"HV-15":()=>y(()=>import("./hv-15-F5kCc6DG.js"),[]),"HV-16":()=>y(()=>import("./hv-16-CSh-5eA9.js"),[]),"HV-32":()=>y(()=>import("./hv-32-66GK2FDR.js"),[]),"GS-06":()=>y(()=>import("./gs-06-BJ1xnKB2.js"),[]),"GS-12":()=>y(()=>import("./gs-12-9A5HUaRo.js"),[]),"GS-16":()=>y(()=>import("./gs-16-Ba-1KSEB.js"),[]),"GS-08":()=>y(()=>import("./gs-08-CLjH0OiJ.js"),[]),"GS-10":()=>y(()=>import("./gs-10-VvIMhYht.js"),[]),"GS-11":()=>y(()=>import("./gs-11-BZIOpL1E.js"),[]),"GS-13":()=>y(()=>import("./gs-13-4tER7WVm.js"),[]),"GS-14":()=>y(()=>import("./gs-14-Cu9JlHht.js"),[]),"GS-19":()=>y(()=>import("./gs-19-s-BQcdwn.js"),[]),"GS-20":()=>y(()=>import("./gs-20-G_sQEGjY.js"),[]),"GS-21":()=>y(()=>import("./gs-21-8kw4BMQK.js"),[]),"GS-22":()=>y(()=>import("./gs-22-CJW0lnbu.js"),[]),"GS-23":()=>y(()=>import("./gs-23-RP9LUqIX.js"),[]),"GS-24":()=>y(()=>import("./gs-24-DOEEdD8E.js"),[]),"GS-25":()=>y(()=>import("./gs-25-CztdfvKj.js"),[]),"GS-26":()=>y(()=>import("./gs-26-CH_Du08g.js"),[]),"GS-27":()=>y(()=>import("./gs-27-Ct93mmI2.js"),[]),"GS-28":()=>y(()=>import("./gs-28-DKPV_pz0.js"),[]),"EL-10":()=>y(()=>import("./el-10-BovrsXFs.js"),[]),"EL-14":()=>y(()=>import("./el-14-wW5BOkhJ.js"),[]),"EL-20":()=>y(()=>import("./el-20-CODdvwaz.js"),[]),"EL-21":()=>y(()=>import("./el-21-BWllB8p5.js"),[]),"EL-23":()=>y(()=>import("./el-23-Dk0rdVRe.js"),[]),"EL-25":()=>y(()=>import("./el-25-Ou9B_Wwi.js"),[]),"EL-26":()=>y(()=>import("./el-26-ZxDYZAfw.js"),[]),"EL-29":()=>y(()=>import("./el-29-BCly2NVT.js"),[]),"EL-30":()=>y(()=>import("./el-30-CnfBWajc.js"),[]),"EL-31":()=>y(()=>import("./el-31-DSK-KvFc.js"),[]),"EL-33":()=>y(()=>import("./el-33-INq9zrKN.js"),[]),"EL-34":()=>y(()=>import("./el-34-D0JPbXAh.js"),[]),"FR-13":()=>y(()=>import("./fr-13-BePzDJa_.js"),[]),"FR-15":()=>y(()=>import("./fr-15-CVs3QTOV.js"),[]),"FR-23":()=>y(()=>import("./fr-23-DBYiIvxz.js"),[]),"FR-31":()=>y(()=>import("./fr-31-CqVxb9AK.js"),[]),"FR-35":()=>y(()=>import("./fr-35-DSBcz-3Q.js"),[]),"FR-37":()=>y(()=>import("./fr-37-28GmegIM.js"),[]),"FR-38":()=>y(()=>import("./fr-38-BvCkrVoQ.js"),[]),"FR-51":()=>y(()=>import("./fr-51-CPjll-MR.js"),[]),"FR-53":()=>y(()=>import("./fr-53-O_oFBkxW.js"),[]),"FR-55":()=>y(()=>import("./fr-55-CkA6jcSy.js"),[]),"SP-01":()=>y(()=>import("./sp-01-Dd15BvnH.js"),[]),"SP-02":()=>y(()=>import("./sp-02-COvXq80B.js"),[]),"SP-10":()=>y(()=>import("./sp-10-CTTBKDvQ.js"),[]),"SP-12":()=>y(()=>import("./sp-12-BPJt_RqM.js"),[]),"SP-13":()=>y(()=>import("./sp-13-Dz4PZHTL.js"),[]),"EN-01":()=>y(()=>import("./en-01-D8Bm7nfJ.js"),[])},ZA:{"EL-01":()=>y(()=>import("./el-01-fSvRsLY6.js"),[]),"EF-01":()=>y(()=>import("./ef-01-DeCLl2R_.js"),[]),"PL-01":()=>y(()=>import("./pl-01-CjCTowCj.js"),[])}};function vA(e,t){return!!Wl[e]?.[t]&&yA(t)}async function EA(e,t){const i=Wl[e]?.[t];if(!i)throw new Error(`No schema registered for ${e}/${t}`);return(await Ot(i)).default}function wj(e){return Object.keys(Wl[e]||{}).filter(yA)}function xj(e){return Object.keys(Wl[e]||{})}const jV=Object.freeze(Object.defineProperty({__proto__:null,getAllFormSchemaTypes:xj,getFormSchemaTypes:wj,hasSchema:vA,loadSchema:EA},Symbol.toStringTag,{value:"Module"})),zV=6048e5,BV=864e5,VV=43200,qV=1440,qS=Symbol.for("constructDateFrom");function xm(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&qS in e?e[qS](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ij(e,t){return xm(t||e,e)}function Cj(e,t,i){const a=Ij(e,i?.in);if(isNaN(t))return xm(e,NaN);if(!t)return a;const c=a.getDate(),u=xm(e,a.getTime());
34u.setMonth(a.getMonth()+t+1,0);const f=u.getDate();return c>=f?u:(a.setFullYear(u.getFullYear(),u.getMonth(),c),a)}function HV(e,t="",i){const a=i==="US"?"en-US":"en-GB";if(!e)return t;if(e instanceof Date)return isNaN(e.getTime())?t:e.toLocaleDateString(a);if(typeof e=="string"){const c=new Date(e);return isNaN(c.getTime())?t:c.toLocaleDateString(a)}return t}function Im(e=new Date){if(!(e instanceof Date)||isNaN(e.getTime()))return"";const t=i=>String(i).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function FV(e,t){const i=/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):new Date(e);return isNaN(i.getTime())?"":Im(Cj(i,t))}function GV(e,t=""){if(!e)return t;if(e instanceof Date)return isNaN(e.getTime())?t:e.toISOString().split("T")[0];if(typeof e=="string"){const i=new Date(e);return isNaN(i.getTime())?t:i.toISOString().split("T")[0]}return t}function YV(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))return"";const i=e.getTime()-Date.now(),a=Math.round(i/864e5);return t==="expired"?a>=0?"Expired today":a===-1?"Expired yesterday":`Expired ${Math.abs(a)} days ago`:a<=0?"Expires today":a===1?"Expires tomorrow":`Expires in ${a} days`}const SA=["propertyAddress","addressLine1"],Lj="postcode",Mj=[...SA,"siteAddress","premisesAddress","projectAddress","accommodationAddress","vehicleRegNumber","streetName","location"];function $V(e){if(!e)return"";for(const t of Mj){const i=e[t];if(typeof i=="string"&&i.trim())return i.trim()}return""}function bA(e){return e.propertySource?[e.propertySource.address]:[...SA]}function Nj(e){return e.propertySource?.postcode??Lj}function kj(e,t){let i="";for(const c of bA(e)){const u=t[c];if(typeof u=="string"&&u.trim()){i=u.trim();break}}const a=t[Nj(e)];return{address:i,postcode:typeof a=="string"?a.trim():""}}function XV(e){const t=bA(e);let i;const a=c=>{if(i||!c||typeof c!="object")return;if(Array.isArray(c)){c.forEach(a);return}const u=c;if(typeof u.key=="string"&&t.includes(u.key)&&typeof u.label=="string"){i=u.label;return}for(const f of Object.values(c))a(f)};return a(e.steps),(i??"property address").toLowerCase()}function Pj(e){const t=[],i=a=>{if(!a||typeof a!="object")return;if(Array.isArray(a)){a.forEach(i);return}const c=a;typeof c.key=="string"&&typeof c.type=="string"&&t.push(c);for(const u of Object.values(a))i(u)};return i(e.steps),t}const Uj=["clientName","landlordName","customerName","ownerName","responsiblePersonName","responsiblePerson"],jj=/^(the\s+)?(client|customer|landlord|owner|occupier|householder|responsible\s*person|duty\s*holder|purchaser|leaseholder|freeholder)\b[^|]*\bname\b/i,HS={tenantName:"The occupier, not the owner. GS-01 carries both.",actualLandlordName:"GS-01 shows this only when the user is acting as an AGENT, precisely to separate the real owner from the agent named in landlordName. One name on the property record cannot say which role it holds."},zj=/sign(ature)?name$/i;function QV(e){const t=new Set(Uj);if(e)for(const i of Pj(e)){if(i.key in HS){t.delete(i.key);continue}zj.test(i.key)||jj.test(i.label??"")&&t.add(i.key)}for(const i of Object.keys(HS))t.delete(i);return[...t]}function Bj(e){return e.replace(/[^a-zA-Z0-9]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"").slice(0,30)}function Vj(e){const t=i=>String(i).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function KV(e,t,i){const{address:a}=kj(e,t),c=Bj(a)||"property";return`${e.typeCode}_${c}_${Vj(i)}.pdf`}const qj=/^([A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+)_.*_(\d{4}-\d{2}-\d{2})\.pdf$/;function Hj(e,t){const i=qj.exec(e);if(i)return`${t}_${i[1]}_${i[2]}.pdf`;const a=/\.([A-Za-z0-9]{1,8})$/.exec(e)?.[1]?.toLowerCase();return`${t}_document${a?`.${a}`:""}`}const br="id,type_code,type_name,schema_version,country,property_id,job_id,issued_by_uid,issued_by_name,issue_date,expiry_date,pdf_url,file_name,notes,org_id,customer_reminder,superseded_by,is_superseded,building_control_notified,building_control_notified_at,issued_at,sent_at,sent_to_email,created_at,updated_at";async function Fj(e,t){if(!t){const{data:i,error:a}=await D.from("certificates").select(br).eq("issued_by_uid",e).order("created_at",{ascending:!1});if(a)throw a;return i.map(wr)}return Ts(D.from("certificates").select(br).eq("issued_by_uid",e).order("created_at",{ascending:!1}),D.from("certificates").select(br).eq("org_id",t).order("created_at",{ascending:!1}),wr,sc,"certificates")}async function JV(e){const{data:t,error:i}=await D.from("certificates").select(br).eq("property_id",e).order("issue_date",{ascending:!1});if(i)throw i;return t.map(wr)}async function WV(e,t){const{data:i,error:a}=await D.from("certificates").select("*").eq("property_id",e).eq("type_code",t).order("issue_date",{ascending:!1}).limit(1).maybeSingle();if(a)throw a;return i?wr(i):null}async function ZV(e,t,i=0,a){if(a){const[h,v]=await Promise.allSettled([D.from("certificates").select(br).eq("issued_by_uid",e).order("created_at",{ascending:!1}).limit(1e3),D.from("certificates").select(br).eq("org_id",a).order("created_at",{ascending:!1}).limit(1e3)]),g=h.status==="fulfilled"&&!h.value.error,b=v.status==="fulfilled"&&!v.value.error;if(!g&&!b)throw new Error("Failed to load certificates");const T=new Set,R=[];if(g)for(const K of h.value.data??[])T.add(K.id),R.push(K);
34if(b)for(const K of v.value.data??[])T.has(K.id)||R.push(K);R.sort((K,le)=>new Date(le.created_at).getTime()-new Date(K.created_at).getTime());const x=R.slice(i,i+t+1),P=x.length>t;return{items:(P?x.slice(0,t):x).map(wr),nextOffset:P?i+t:null,hasMore:P}}const{data:c,error:u}=await D.from("certificates").select(br).eq("issued_by_uid",e).order("created_at",{ascending:!1}).range(i,i+t);if(u)throw u;const f=c??[],p=f.length>t;return{items:(p?f.slice(0,t):f).map(wr),nextOffset:p?i+t:null,hasMore:p}}async function TA(e){const{data:t,error:i}=await D.from("certificates").select("*").eq("id",e).maybeSingle();if(i)throw i;return t?wr(t):null}async function e5(e){const{data:t,error:i}=await D.from("certificates").select(br).eq("superseded_by",e).limit(1).maybeSingle();if(i)throw i;return t?wr(t):null}async function t5(e){const t=new Set([e]);let i=e,a=null;for(let c=0;c<20;c++){const{data:u,error:f}=await D.from("certificates").select("id, sent_at, sent_to_email").eq("superseded_by",i).limit(1).maybeSingle();if(f)throw f;const p=u;if(!p||t.has(p.id))break;const m=p.sent_at?new Date(p.sent_at):null;m&&!Number.isNaN(m.getTime())&&(!a||m>a.sentAt)&&(a={sentAt:m,sentTo:p.sent_to_email}),t.add(p.id),i=p.id}return a}const Gj=45e3;async function n5(e){const t={id:e.id??crypto.randomUUID(),type_code:e.typeCode,type_name:e.typeName,country:e.country??"GB",property_id:e.propertyId??null,issued_by_uid:e.issuedByUid,issued_by_name:e.issuedByName,issue_date:Im(e.issueDate),expiry_date:e.expiryDate?Im(e.expiryDate):null};e.schemaVersion!==void 0&&(t.schema_version=e.schemaVersion),e.issuedBuild&&(t.issued_build=e.issuedBuild),e.issuerAcknowledgement&&(t.issuer_acknowledgement=e.issuerAcknowledgement),e.pdfUrl!==void 0&&(t.pdf_url=e.pdfUrl),e.fileName!==void 0&&(t.file_name=e.fileName),e.notes!==void 0&&(t.notes=e.notes),e.formData!==void 0&&(t.form_data=e.formData),e.orgId!==void 0&&(t.org_id=e.orgId),e.jobId!==void 0&&(t.job_id=e.jobId),t.issued_at=(e.issuedAt??new Date).toISOString();const i=D.from("certificates").insert(t).select("id").single(),a=new Promise((f,p)=>setTimeout(()=>p(new Error("Certificate save timed out")),Gj));let c=await Promise.race([i,a]);if("error"in c&&c.error&&t.issuer_acknowledgement!==void 0&&Zj(c.error)){console.error("[certificates] issuer_acknowledgement column missing - migration 199 not applied; saved without it",c.error),a_(new Error("issuer_acknowledgement column missing (migration 199)"),{tags:{area:"certificate-save",part:"issuer-acknowledgement"}}),delete t.issuer_acknowledgement;const f=D.from("certificates").insert(t).select("id").single();c=await Promise.race([f,a])}if("error"in c&&c.error&&c.error.code!=="23505")throw c.error;return c.data?.id??t.id}async function r5(e,t){const{error:i}=await D.rpc("supersede_certificate",{p_old:e,p_new:t});if(i)throw i}async function i5(e,t){const{error:i}=await D.from("certificates").update({building_control_notified:t,building_control_notified_at:t?new Date().toISOString():null}).eq("id",e);if(i)throw i}async function a5(e,t){const{error:i}=await D.from("certificates").update({customer_reminder:t}).eq("id",e);if(i)throw i}async function Yj(e){const t=e.country??"GB";if(!vA(t,e.typeCode))return{blocked:!1};try{const i=await EA(t,e.typeCode);if(!i.retentionYears)return{blocked:!1};const a=e.issuedAt??e.createdAt;if(!(a instanceof Date))return{blocked:!1};const c=new Date(a);if(c.setFullYear(c.getFullYear()+i.retentionYears),c>new Date)return{blocked:!0,retentionYears:i.retentionYears,retentionEnds:c,retentionBasis:i.retentionBasis??"statutory"}}catch{}return{blocked:!1}}class $j extends Error{retention;constructor(t){super("Certificate is inside its statutory retention period"),this.name="RetentionNotAcknowledgedError",this.retention=t}}async function s5(e,t,i,a){if(!a?.retentionAcknowledged){const p=a?.cert??await TA(e).catch(()=>null);if(p){const m=await Yj(p);if(m.blocked)throw new $j(m)}}if(Ji.isOnline()){const p=[];t&&p.push(D.storage.from("certbox").remove([t]).catch(()=>{})),i?.length&&p.push(Qj(i)),await Promise.allSettled(p)}const c=D.from("certificates").delete().eq("id",e),u=new Promise((p,m)=>setTimeout(()=>m(new Error("Certificate delete timed out")),5e3)),f=await Promise.race([c,u]);if("error"in f&&f.error)throw f.error}async function o5(e){const{data:t,error:i}=await D.from("certificates").select(br).eq("job_id",e).order("created_at",{ascending:!1});if(i)throw i;return t.map(wr)}async function c5(e){const{data:t,error:i}=await D.rpc("verify_certificate",{p_cert_id:e});if(i)throw i;if(!t)return null;const a=t;return{id:a.id,typeCode:a.typeCode,typeName:a.typeName,issueDate:new Date(a.issueDate),expiryDate:a.expiryDate?new Date(a.expiryDate):null,issuedAt:a.issuedAt?new Date(a.issuedAt):null,issuedByName:a.issuedByName,orgName:a.orgName??null,propertyAddress:a.propertyAddress??null,propertyPostcode:a.propertyPostcode??null,buildingControlNotified:a.buildingControlNotified??null,contentHash:a.contentHash??null,recordHash:a.recordHash??null,recordHashAlg:a.recordHashAlg??null,verifySummary:a.verifySummary??null,isSuperseded:a.isSuperseded??!1,replacedBy:a.replacedBy??null,replacedOn:a.replacedOn?new Date(a.replacedOn):null,newerIssueDate:a.newerIssueDate?new Date(a.newerIssueDate):null,earlierVersions:Array.isArray(a.earlierVersions)?a.earlierVersions.filter(c=>typeof c=="string"):[],withdrawnAt:a.withdrawnAt?new Date(a.withdrawnAt):null,withdrawnReason:a.withdrawnReason??null,withdrawnBy:a.withdrawnBy==="issuer"?"issuer":a.withdrawnBy==="certbox"?"certbox":null,status:a.status,verifiedAt:new Date(a.verifiedAt)}}async function u5(e,t,i,a){const{error:c}=await D.rpc("set_certificate_integrity",{p_cert_id:e,p_content_hash:t,p_verify_summary:i??null,p_record_hash:a?.hash??null,p_record_hash_alg:a?.alg??null});if(c)throw c}async function Xj(e,t,i){const{error:a}=await D.functions.invoke("send-certificate-email",{body:{certificateId:e,toEmail:t,message:i},timeout:15e3});if(a)throw a}async function l5(e,t,i){const{error:a}=await D.rpc("update_certificate_pdf",{p_cert_id:e,p_pdf_url:t,p_file_name:i});if(a)throw a}async function d5(e,t,i){const a=Date.now(),c=i.name.replace(/[^a-zA-Z0-9._-]/g,"_"),u=`certificates/${e}/photos/${t}/${a}_${c}`,{error:f}
34=await D.storage.from("certbox").upload(u,i,{contentType:i.type,upsert:!1});if(f)throw f;const p={path:u,fileName:i.name,createdAt:a},{error:m}=await D.rpc("certbox_append_certificate_photo",{p_cert_id:t,p_photo:p});if(m)throw m;return p}async function f5(e,t){await D.storage.from("certbox").remove([t.path]).catch(()=>{});const{error:i}=await D.rpc("certbox_remove_certificate_photo",{p_cert_id:e,p_photo_path:t.path});if(i)throw i}async function Qj(e){const t=e.map(i=>i.path);await D.storage.from("certbox").remove(t).catch(()=>{})}class Kj extends Error{path;constructor(t){super("Upload timed out - it may still be finishing in the background"),this.name="UploadTimeoutError",this.path=t}}const Jj=12e4;async function p5(e,t){const i=`certificates/${e}/${Hj(t.name,Date.now())}`,a=D.storage.from("certbox").upload(i,t,{contentType:t.type,upsert:!1});let c;const u=new Promise((f,p)=>{c=setTimeout(()=>p(new Kj(i)),Jj)});try{const f=await Promise.race([a,u]);if("error"in f&&f.error)throw f.error;return i}finally{clearTimeout(c)}}function m5(e,t){if(!/^https?:/i.test(e))return e;const i=e.includes("?")?"&":"?";return`${e}${i}download=${encodeURIComponent(t)}`}async function Wj(e,t=3600){const{data:i,error:a}=await D.storage.from("certbox").createSignedUrl(e,t);if(a)throw a;return i.signedUrl}async function _5(e){try{const{data:t,error:i}=await D.rpc("next_cert_ref",{p_type_code:e});return i||typeof t!="string"||!t?null:t}catch{return null}}function Zj(e){return(e.code==="PGRST204"||e.code==="42703")&&/issuer_acknowledgement/.test(e.message??"")}async function h5({name:e,createdByUid:t}){const{data:i,error:a}=await D.from("organisations").insert({name:e,created_by_uid:t,member_uids:[t]}).select("id").single();if(a){if(a.code==="23505"){const p=await e2(t);if(p)return await t2(p,t),p}throw a}const c=i.id,{error:u}=await D.from("org_members").insert({org_id:c,user_id:t,role:"owner"});if(u)throw u;const{error:f}=await D.rpc("apply_org_membership",{p_org_id:c,p_user_id:t});if(f)throw f;return c}async function e2(e){const{data:t,error:i}=await D.from("organisations").select("id").eq("created_by_uid",e).order("created_at",{ascending:!1}).limit(10);if(i||!t||!t.length)return null;const a=t;for(const c of a){const{data:u,error:f}=await D.from("org_members").select("user_id").eq("org_id",c.id).eq("user_id",e).maybeSingle();if(f)return null;if(u)return c.id}return null}async function t2(e,t){const{error:i}=await D.rpc("apply_org_membership",{p_org_id:e,p_user_id:t});if(i)throw i}async function n2(e){const{data:t,error:i}=await D.from("organisations").select("*").eq("id",e).maybeSingle();if(i)throw i;return t?aj(t):null}async function g5(e,t){const i={};t.name!==void 0&&(i.name=t.name),t.phone!==void 0&&(i.phone=t.phone),t.email!==void 0&&(i.email=t.email),t.website!==void 0&&(i.website=t.website),t.address!==void 0&&(i.address=t.address),t.logoUrl!==void 0&&(i.logo_url=t.logoUrl),t.logoPath!==void 0&&(i.logo_path=t.logoPath),t.defaultHourlyRate!==void 0&&(i.default_hourly_rate=t.defaultHourlyRate);const{error:a}=await D.from("organisations").update(i).eq("id",e);if(a)throw a}async function y5(e){const{data:t,error:i}=await D.from("organisations").select("name, subscription_tier, subscription_status").eq("id",e).maybeSingle();if(i)throw i;if(!t)return{allowed:!1,reason:"Organisation not found."};const a=t,{count:c}=await D.from("org_members").select("id",{count:"exact",head:!0}).eq("org_id",e),u=c??0;return ij(a.subscription_tier,a.subscription_status,u)?{allowed:!0,orgName:a.name}:{allowed:!1,orgName:a.name,reason:`This organisation has reached its member limit (${u} members). The owner needs to upgrade to add more members.`}}async function r2(e,t){const{error:i}=await D.rpc("certbox_add_org_member",{p_org_id:e,p_user_id:t});if(i)throw i;const{error:a}=await D.rpc("apply_org_membership",{p_org_id:e,p_user_id:t});if(a)throw a}async function v5(e,t){const{error:i}=await D.from("org_members").delete().eq("org_id",e).eq("user_id",t);if(i)throw i;try{await D.rpc("certbox_remove_org_member",{p_org_id:e,p_user_id:t})}catch{}const{error:a}=await D.rpc("clear_org_membership",{p_org_id:e,p_user_id:t});if(a)throw a}async function E5(e,t){const i=Date.now(),a=t.name.replace(/[^a-zA-Z0-9._-]/g,"_"),c=`organisations/${e}/logo/${i}_${a}`,{error:u}=await D.storage.from("public-assets").upload(c,t,{contentType:t.type,upsert:!0});if(u)throw u;const{data:f}=D.storage.from("public-assets").getPublicUrl(c);return{path:c,url:f.publicUrl}}async function S5(e){await D.storage.from("public-assets").remove([e]).catch(()=>{})}async function b5(e){const{data:t,error:i}=await D.rpc("search_organisations_public",{search_text:e});if(i)throw i;return t??[]}async function T5(e,t,i,a){const{error:c}=await D.from("org_join_requests").insert({org_id:e,user_id:t,user_name:i??null,user_email:a??null});if(c)throw c}async function A5(e){const{data:t,error:i}=await D.from("org_join_requests").select("id,org_id,user_id,user_name,user_email,status,created_at,responded_at").eq("org_id",e).eq("status","pen
34ding").order("created_at",{ascending:!1});return i?[]:(t??[]).map(a=>({id:a.id,orgId:a.org_id,userId:a.user_id,userName:a.user_name??void 0,userEmail:a.user_email??void 0,status:a.status,createdAt:new Date(a.created_at),respondedAt:a.responded_at?new Date(a.responded_at):void 0}))}async function R5(e,t,i){const{error:a}=await D.from("org_join_requests").update({status:"approved",responded_at:new Date().toISOString()}).eq("id",e);if(a)throw a;await r2(t,i)}async function O5(e){const{error:t}=await D.from("org_join_requests").update({status:"rejected",responded_at:new Date().toISOString()}).eq("id",e);if(t)throw t}const i2=7;function a2(){const e=new Uint8Array(24);return crypto.getRandomValues(e),Array.from(e,t=>t.toString(16).padStart(2,"0")).join("")}function s2(e){return`${"https://api.certbox.app".replace(/\/$/,"")}/functions/v1/share-file?token=${encodeURIComponent(e)}`}async function o2(e,t,i=i2){const a=await c2(e,t);if(a.length>0){const x=a[0];return{id:x.token,token:x.token,certificateId:e,createdByUid:t,expiresAt:x.expiresAt,accessCount:x.accessCount,active:!0,createdAt:x.createdAt}}const c=a2(),u=new Date;u.setDate(u.getDate()+i);const f=await TA(e);if(!f)throw new Error("Certificate not found");const p=f.propertyId?await pA(f.propertyId):null,m=f.pdfUrl?s2(c):void 0,{data:h}=await D.from("users").select("org_id").eq("uid",f.issuedByUid).maybeSingle();let v;const g=h?.org_id;if(g){const x=await n2(g);x&&(v={name:x.name},x.logoUrl&&(v.logoUrl=x.logoUrl))}const b={typeName:f.typeName,typeCode:f.typeCode,country:f.country??"GB",issuedByName:f.issuedByName,issueDate:f.issueDate.toISOString(),expiryDate:f.expiryDate?f.expiryDate.toISOString():null,notes:f.notes??null,fileName:f.fileName??null};if(m&&(b.fileUrl=m),f.formData){const x={...f.formData};for(const P of Object.keys(x))P.toLowerCase().includes("signature")&&typeof x[P]=="string"&&x[P].startsWith("data:")&&(x[P]="[signature on file]");b.formData=x}const T={id:c,certificate_id:e,created_by_uid:t,expires_at:u.toISOString(),access_count:0,active:!0,certificate:b,property_address:p?.address??"Unknown",property_postcode:p?.postcode??""};v&&(T.organisation=v);const{error:R}=await D.from("share_links").insert(T);if(R)throw R;return{id:c,token:c,certificateId:e,createdByUid:t,expiresAt:u,accessCount:0,active:!0,createdAt:new Date}}async function D5(e){const{data:t,error:i}=await D.rpc("get_share_link_by_token",{p_token:e});if(i)throw i;const a=Array.isArray(t)?t[0]:t;if(!a)return null;const c=Y(a.expires_at);if(c<new Date)return null;const u=a.certificate??{};return{id:a.id,certificateId:a.certificate_id,createdByUid:a.created_by_uid,expiresAt:c,accessCount:a.access_count,active:a.active,createdAt:Y(a.created_at),certificate:{typeName:u.typeName,typeCode:u.typeCode,country:u.country??"GB",issuedByName:u.issuedByName,issueDate:Y(u.issueDate),expiryDate:u.expiryDate?Y(u.expiryDate):void 0,notes:u.notes||void 0,fileUrl:u.fileUrl||void 0,fileName:u.fileName||void 0,formData:u.formData||void 0},propertyAddress:a.property_address??void 0,propertyPostcode:a.property_postcode??void 0,organisation:a.organisation?{name:a.organisation.name,logoUrl:a.organisation.logoUrl}:void 0}}async function w5(e){const{error:t}=await D.rpc("certbox_increment_share_link_access",{p_token:e});t&&console.warn("Failed to increment share link access count:",t)}async function c2(e,t){const{data:i,error:a}=await D.from("share_links").select("id, created_at, expires_at, access_count").eq("certificate_id",e).eq("created_by_uid",t).eq("active",!0).order("created_at",{ascending:!1});if(a)throw a;const c=new Date;return(i??[]).map(u=>{const f=u;return{token:f.id,createdAt:Y(f.created_at),expiresAt:Y(f.expires_at),accessCount:f.access_count??0}}).filter(u=>u.expiresAt>c)}async function x5(e){const{error:t}=await D.from("share_links").update({active:!1}).eq("id",e);if(t)throw t}const Hp="id,org_id,created_by_uid,name,contact_name,email,phone,address_line1,address_line2,city,county,postcode,notes,created_at,updated_at";async function u2(e,t){if(!t){const{data:i,error:a}=await D.from("clients").select(Hp).eq("created_by_uid",e).order("name",{ascending:!0});if(a)throw a;return i.map(Dm)}return Ts(D.from("clients").select(Hp).eq("created_by_uid",e).order("name",{ascending:!0}),D.from("clients").select(Hp).eq("org_id",t).order("name",{ascending:!0}),Dm,(i,a)=>i.name.localeCompare(a.name),"clients")}async function I5(e){const{data:t,error:i}=await D.from("clients").select("*").eq("id",e).maybeSingle();if(i)throw i;return t?Dm(t):null}async function C5(e){const t={created_by_uid:e.createdByUid,name:e.name};e.orgId!==void 0&&(t.org_id=e.orgId),e.contactName!==void 0&&(t.contact_name=e.contactName),e.email!==void 0&&(t.email=e.email),e.phone!==void 0&&(t.phone=e.phone),e.addressLine1!==void 0&&(t.address_line1=e.addressLine1),e.addressLine2!==void 0&&(t.address_line2=e.addressLine2),e.city!==void 0&&(t.city=e.city),e.county!==void 0&&(t.county=e.county),e.postcode!==void 0&&(t.postcode=e.postcode),e.notes!==void 0&&(t.notes=e.notes);const{data:i,error:a}=await D.from("clients").insert(t).select("id").single();if(a)throw a;return i.id}async function L5(e,t){const i={};t.name!==void 0&&(i.name=t.name),t.contactName!==void 0&&(i.contact_name=t.contactName),t.email!==void 0&&(i.email=t.email),t.phone!==void 0&&(i.phone=t.phone),t.addressLine1!==void 0&&(i.address_line1=t.addressLine1),t.addressLine2!==void 0&&(i.address_line2=t.addressLine2),t.city!==void 0&&(i.city=t.city),t.county!==void 0&&(i.county=t.county),t.postcode!==void 0&&(i.postcode=t.postcode),t.notes!==void 0&&(i.notes=t.notes);const{error:a}=await D.from("clients").update(i).eq("id",e);if(a)throw a}async function M5(e){const{data:t,error:i}=await D.from("clients").delete().eq("id",e).select("id");if(i)throw i;if(!t||t.length===0)throw new Error("This client couldn't be deleted - you may 
34not have permission, or it was already removed.")}async function N5(e){const{data:t,error:i}=await D.from("client_activity_log").select("id,client_id,user_uid,org_id,activity_type,description,metadata,created_at").eq("client_id",e).order("created_at",{ascending:!1}).limit(50);if(i)throw i;return(t||[]).map(a=>({id:a.id,clientId:a.client_id,userUid:a.user_uid,orgId:a.org_id??void 0,activityType:a.activity_type,description:a.description,metadata:a.metadata??void 0,createdAt:new Date(a.created_at)}))}async function k5(e,t,i,a,c,u){const{error:f}=await D.from("client_activity_log").insert({client_id:e,user_uid:t,org_id:i||null,activity_type:a,description:c,metadata:u||null});if(f)throw f}const nl="id,org_id,created_by_uid,client_id,property_id,job_number,title,description,status,assigned_to_uid,scheduled_date,completed_date,notes,default_cert_type,recurrence_rule,recurrence_end_date,parent_job_id,custom_status_id,created_at,updated_at";async function l2(e,t){if(!t){const{data:i,error:a}=await D.from("jobs").select(nl).eq("created_by_uid",e).order("created_at",{ascending:!1});if(a)throw a;return i.map(wl)}return Ts(D.from("jobs").select(nl).eq("created_by_uid",e).order("created_at",{ascending:!1}),D.from("jobs").select(nl).eq("org_id",t).order("created_at",{ascending:!1}),wl,sc,"jobs")}async function P5(e){const{data:t,error:i}=await D.from("jobs").select(nl).eq("client_id",e).order("created_at",{ascending:!1});if(i)throw i;return t.map(wl)}async function U5(e){const{data:t,error:i}=await D.from("jobs").select("*").eq("id",e).maybeSingle();if(i)throw i;return t?wl(t):null}async function d2(e,t){const{data:i,error:a}=await D.rpc("next_job_number",{p_user_id:e,p_org_id:t??null});if(a)throw a;return i}async function f2(e){const t=await d2(e.createdByUid,e.orgId),i={created_by_uid:e.createdByUid,client_id:e.clientId,job_number:t,title:e.title,status:e.status};e.orgId!==void 0&&(i.org_id=e.orgId),e.propertyId!==void 0&&(i.property_id=e.propertyId),e.description!==void 0&&(i.description=e.description),e.assignedToUid!==void 0&&(i.assigned_to_uid=e.assignedToUid),e.scheduledDate!==void 0&&(i.scheduled_date=e.scheduledDate.toISOString().split("T")[0]),e.notes!==void 0&&(i.notes=e.notes),e.recurrenceRule!==void 0&&(i.recurrence_rule=e.recurrenceRule),e.recurrenceEndDate!==void 0&&(i.recurrence_end_date=e.recurrenceEndDate.toISOString().split("T")[0]),e.parentJobId!==void 0&&(i.parent_job_id=e.parentJobId),e.defaultCertType!==void 0&&(i.default_cert_type=e.defaultCertType);const{data:a,error:c}=await D.from("jobs").insert(i).select("id").single();if(c)throw c;if(e.propertyId&&e.clientId)try{const u=await pA(e.propertyId);u&&!u.clientId&&await fj(e.propertyId,{clientId:e.clientId})}catch{}return a.id}async function j5(e,t){const i={};t.title!==void 0&&(i.title=t.title),t.description!==void 0&&(i.description=t.description),t.status!==void 0&&(i.status=t.status),t.assignedToUid!==void 0&&(i.assigned_to_uid=t.assignedToUid),t.scheduledDate!==void 0&&(i.scheduled_date=t.scheduledDate.toISOString().split("T")[0]),t.completedDate!==void 0&&(i.completed_date=t.completedDate.toISOString().split("T")[0]),t.notes!==void 0&&(i.notes=t.notes),t.propertyId!==void 0&&(i.property_id=t.propertyId),t.clientId!==void 0&&(i.client_id=t.clientId);const{error:a}=await D.from("jobs").update(i).eq("id",e);if(a)throw a}async function z5(e){const{data:t,error:i}=await D.from("jobs").delete().eq("id",e).select("id");if(i)throw i;if(!t||t.length===0)throw new Error("This job couldn't be deleted - you may not have permission, or it was already removed.")}async function B5(e){const{data:t,error:i}=await D.from("job_photos").select("id,job_id,storage_path,file_name,caption,created_by_uid,created_at").eq("job_id",e).order("created_at",{ascending:!0});if(i)throw i;return t.map(oA)}async function V5(e,t,i,a){const c=Date.now(),u=i.name.replace(/[^a-zA-Z0-9._-]/g,"_"),f=`jobs/${t}/${c}_${u}`,{error:p}=await D.storage.from("certbox").upload(f,i,{contentType:i.type,upsert:!1});if(p)throw p;const m={job_id:t,storage_path:f,file_name:i.name,created_by_uid:e};a&&(m.caption=a);const{data:h,error:v}=await D.from("job_photos").insert(m).select("id,job_id,storage_path,file_name,caption,created_by_uid,created_at").single();if(v)throw v;return oA(h)}async function q5(e){await D.storage.from("certbox").remove([e.storagePath]).c
34atch(()=>{});const{error:t}=await D.from("job_photos").delete().eq("id",e.id);if(t)throw t}async function H5(e){const{data:t,error:i}=await D.from("job_tasks").select("id,job_id,description,completed,completed_at,sort_order,created_at").eq("job_id",e).order("sort_order").order("created_at");if(i)throw i;return(t||[]).map(a=>({id:a.id,jobId:a.job_id,description:a.description,completed:a.completed,completedAt:a.completed_at?new Date(a.completed_at):void 0,sortOrder:a.sort_order,createdAt:new Date(a.created_at)}))}async function F5(e,t){const{data:i,error:a}=await D.from("job_tasks").insert({job_id:e,description:t}).select("id,job_id,description,completed,completed_at,sort_order,created_at").single();if(a)throw a;const c=i;return{id:c.id,jobId:c.job_id,description:c.description,completed:c.completed,completedAt:c.completed_at?new Date(c.completed_at):void 0,sortOrder:c.sort_order,createdAt:new Date(c.created_at)}}async function G5(e,t){const i={completed:t,completed_at:t?new Date().toISOString():null},{error:a}=await D.from("job_tasks").update(i).eq("id",e);if(a)throw a}async function Y5(e){const{error:t}=await D.from("job_tasks").delete().eq("id",e);if(t)throw t}async function $5(){const{data:e,error:t}=await D.from("job_templates").select("id,user_uid,org_id,name,title,description,default_cert_type,default_quote_template_id,created_at,updated_at").order("name");if(t)throw t;return(e||[]).map(i=>dA(i))}async function X5(e,t,i){const{data:a,error:c}=await D.from("job_templates").insert({user_uid:e,org_id:t||null,name:i.name,title:i.title,description:i.description||null,default_cert_type:i.defaultCertType||null}).select("id,user_uid,org_id,name,title,description,default_cert_type,default_quote_template_id,created_at,updated_at").single();if(c)throw c;return dA(a)}async function Q5(e){const{error:t}=await D.from("job_templates").delete().eq("id",e);if(t)throw t}async function K5(e){if(!e.recurrenceRule)throw new Error("Job has no recurrence rule set.");const t=e.scheduledDate??new Date,i=new Date(t);switch(e.recurrenceRule){case"MONTHLY":i.setMonth(i.getMonth()+1);break;case"QUARTERLY":i.setMonth(i.getMonth()+3);break;case"ANNUALLY":i.setFullYear(i.getFullYear()+1);break}return f2({createdByUid:e.createdByUid,orgId:e.orgId,clientId:e.clientId,propertyId:e.propertyId,title:e.title,description:e.description,status:"scheduled",scheduledDate:i,recurrenceRule:e.recurrenceRule,recurrenceEndDate:e.recurrenceEndDate,parentJobId:e.id,defaultCertType:e.defaultCertType,notes:e.notes})}const xo="id,org_id,created_by_uid,job_id,client_id,quote_number,status,valid_until,subtotal,vat_amount,total,pdf_url,sent_at,accepted_at,created_at,updated_at";async function p2(e,t){if(!t){const{data:i,error:a}=await D.from("quotes").select(xo).eq("created_by_uid",e).order("created_at",{ascending:!1});if(a)throw a;return i.map(c=>fs(c))}return Ts(D.from("quotes").select(xo).eq("created_by_uid",e).order("created_at",{ascending:!1}),D.from("quotes").select(xo).eq("org_id",t).order("created_at",{ascending:!1}),i=>fs(i),sc,"quotes")}async function J5(e){const{data:t,error:i}=await D.from("quotes").select(xo).eq("job_id",e).order("created_at",{ascending:!1});if(i)throw i;return t.map(a=>fs(a))}async function W5(e){const{data:t,error:i}=await D.from("quotes").select(xo).eq("client_id",e).order("created_at",{ascending:!1});if(i)throw i;return t.map(a=>fs(a))}async function Z5(e){const{data:t,error:i}=await D.from("quotes").select("*, quote_items(*)").eq("id",e).maybeSingle();if(i)throw i;if(!t)return null;const c=(t.quote_items??[]).sort((u,f)=>(u.sort_order??0)-(f.sort_order??0)).map(cA);return fs(t,c)}async function m2(e,t){const{data:i,error:a}=await D.rpc("next_quote_number",{p_user_id:e,p_org_id:t??null});if(a)throw a;return i}async function eq(e){const t=await m2(e.createdByUid,e.orgId);let i=0,a=0;const c=e.items.map((h,v)=>{const g=Math.round(h.quantity*h.unitPrice),b=Math.round(g*h.vatRate/100);return i+=g,a+=b,{...h,lineTotal:g,sortOrder:v}}),u={created_by_uid:e.createdByUid,client_id:e.clientId,quote_number:t,status:"draft",subtotal:i,vat_amount:a,total:i+a};e.orgId&&(u.org_id=e.orgId),e.jobId&&(u.job_id=e.jobId),e.validUntil&&(u.valid_until=e.validUntil.toISOString().split("T")[0]),e.notes&&(u.notes=e.notes),e.terms&&(u.terms=e.terms);const{data:f,error:p}=await D.from("quotes").insert(u).select("id").single();if(p)throw p;const m=f.id;if(c.length>0){const{error:h}=await D.from("quote_items").insert(c.map(v=>({quote_id:m,description:v.description,quantity:v.quantity,unit_price:v.unitPrice,vat_rate:v.vatRate,line_total:v.lineTotal,sort_order:v.sortOrder})));if(h)throw h}return m}async function tq(e,t,i){const a={};if(t.notes!==void 0&&(a.notes=t.notes),t.terms!==void 0&&(a.terms=t.terms),t.validUntil!==void 0&&(a.valid_until=t.validUntil.toISOString().split("T")[0]),t.status!==void 0&&(a.status=t.status,t.status==="sent"&&(a.sent_at=new Date().toISOString()),t.status==="accepted"&&(
34a.accepted_at=new Date().toISOString())),i){let c=0,u=0;const f=i.map((m,h)=>{const v=Math.round(m.quantity*m.unitPrice),g=Math.round(v*m.vatRate/100);return c+=v,u+=g,{...m,lineTotal:v,sortOrder:h}});a.subtotal=c,a.vat_amount=u,a.total=c+u;const{error:p}=await D.from("quote_items").delete().eq("quote_id",e);if(p)throw p;if(f.length>0){const{error:m}=await D.from("quote_items").insert(f.map(h=>({quote_id:e,description:h.description,quantity:h.quantity,unit_price:h.unitPrice,vat_rate:h.vatRate,line_total:h.lineTotal,sort_order:h.sortOrder})));if(m)throw m}}if(Object.keys(a).length>0){const{error:c}=await D.from("quotes").update(a).eq("id",e);if(c)throw c}}async function nq(e){const{data:t,error:i}=await D.from("quotes").delete().eq("id",e).select("id");if(i)throw i;if(!t||t.length===0)throw new Error("This quote couldn't be deleted - you may not have permission, or it was already removed.")}async function rq(e){const{data:t,error:i}=await D.rpc("get_public_quote",{p_quote_id:e});if(i)throw i;if(!t||t.length===0)return null;const a=t[0],{data:c,error:u}=await D.rpc("get_public_quote_items",{p_quote_id:e});if(u)throw u;const f=(c??[]).map(cA);return fs(a,f)}async function iq(e,t){const{error:i}=await D.rpc("respond_to_quote",{p_quote_id:e,p_accept:t});if(i)throw i}async function aq(e){try{await D.rpc("notify_quote_viewed",{p_quote_id:e})}catch{}}async function sq(){const{data:e,error:t}=await D.from("quote_templates").select("id,user_uid,org_id,name,items,notes,terms,created_at,updated_at").order("name");if(t)throw t;return(e||[]).map(i=>uA(i))}async function oq(e,t,i){const{data:a,error:c}=await D.from("quote_templates").insert({user_uid:e,org_id:t||null,name:i.name,items:i.items,notes:i.notes||null,terms:i.terms||null}).select("id,user_uid,org_id,name,items,notes,terms,created_at,updated_at").single();if(c)throw c;return uA(a)}async function cq(e){const{error:t}=await D.from("quote_templates").delete().eq("id",e);if(t)throw t}const es="id,org_id,created_by_uid,job_id,client_id,quote_id,invoice_number,status,invoice_type,issue_date,due_date,payment_terms,subtotal,vat_amount,total,amount_paid,retention_rate,retention_amount,deposit_rate,parent_invoice_id,pdf_url,sent_at,paid_at,viewed_at,reverse_charge_vat,created_at,updated_at";async function _2(e,t){if(!t){const{data:i,error:a}=await D.from("invoices").select(es).eq("created_by_uid",e).order("created_at",{ascending:!1});if(a)throw a;return i.map(c=>ps(c))}return Ts(D.from("invoices").select(es).eq("created_by_uid",e).order("created_at",{ascending:!1}),D.from("invoices").select(es).eq("org_id",t).order("created_at",{ascending:!1}),i=>ps(i),sc,"invoices")}async function uq(e){const{data:t,error:i}=await D.from("invoices").select(es).eq("job_id",e).order("created_at",{ascending:!1});if(i)throw i;return t.map(a=>ps(a))}async function lq(e){const{data:t,error:i}=await D.from("invoices").select(es).eq("client_id",e).order("created_at",{ascending:!1});if(i)throw i;return t.map(a=>ps(a))}async function dq(e){const{data:t,error:i}=await D.from("invoices").select(es).eq("quote_id",e).order("created_at",{ascending:!1});if(i)throw i;return t.map(a=>ps(a))}async function fq(e){const{data:t,error:i}=await D.from("invoices").select("*, invoice_items(*)").eq("id",e).maybeSingle();if(i)throw i;if(!t)return null;const c=(t.invoice_items??[]).sort((u,f)=>(u.sort_order??0)-(f.sort_order??0)).map(oj);return ps(t,c)}async function pq(e){const{data:t,error:i}=await D.rpc("get_public_invoice",{p_invoice_id:e});if(i)throw i;if(!t||t.length===0)return null;const a=t[0],c=(a.items??[]).map(u=>({id:u.id,description:u.description,quantity:Number(u.quantity),unitPrice:u.unit_price,vatRate:Number(u.vat_rate),lineTotal:u.line_total,sortOrder:u.sort_order}));return{invoiceNumber:a.invoice_number,status:a.status,issueDate:new Date(a.issue_date),dueDate:new Date(a.due_date),paymentTerms:a.payment_terms??void 0,subtotal:a.subtotal,vatAmount:a.vat_amount,total:a.total,amountPaid:a.amount_paid,paidAt:a.paid_at?new Date(a.paid_at):void 0,notes:a.notes??void 0,terms:a.terms??void 0,items:c}}async function h2(e,t){const{data:i,error:a}=await D.rpc("next_invoice_number",{p_user_id:e,p_org_id:t??null});if(a)throw a;return i}async function mq(e){const t=await h2(e.createdByUid,e.orgId);let i=0,a=0;const c=e.items.map((T,R)=>{const x=Math.round(T.quantity*T.unitPrice),P=Math.round(x*T.vatRate/100);return i+=x,a+=P,{...T,lineTotal:x,sortOrder:R}}),u=e.reverseChargeVat??!1,f=i+(u?0:a),p=e.retentionRate??0,m=p>0?Math.round(f*p/100):0,h={created_by_uid:e.createdByUid,client_id:e.clientId,invoice_number:t,status:"draft",invoice_type:e.invoiceType??"standard",issue_date:e.issueDate.toISOString().split("T")[0],due_date:e.dueDate.toISOString().split("T")[0],subtotal:i,vat_amount:a,total:f,reverse_charge_vat:u,retention_rate:p,retention_amount:m,deposit_rate:e.depositRate??0};e.orgId&&(h.org_id=e.orgId),e.jobId&&(h.job_id=e.jobId),e.quoteId&&(h.quote_id=e.quoteId),e.parentInvoiceId&&(h.parent_invoice_id=e.parentInvoiceId),e.paymentTerms&&(h.payment_terms=e.paymentTerms),e.notes&&(h.notes=e.notes),e.terms&&(h.terms=e.terms);const{data:v,error:g}=await D.from("invoices").insert(h).select("id").single();if(g)throw g;const b=v.id;if(c.length>0){const{error:T}=await D.from("invoice_items").insert(c.map(R=>({invoice_id:b,description:R.description,quantity:R.quantity,unit_price:R.unitPrice,vat_rate:R.vatRate,line_total:R.lineTotal,sort_order:R.sortOrder})));if(T)throw T}return b}async function _q(e,t,i){const a={};if(t.notes!==void 0&&(a.notes=t.notes),t.terms!==void 0&&(a.terms=t.terms),t.issueDate!==void 0&&(a.issue_date=t.issueDate.toISOString().split("T")[0]),t.dueDate!==void 0&&(a.due_date=t.dueDate.toISOString().split("T")[0]),t.paymentTerms!==void 0&&(a.payment_terms=t.paymentTerms),t.amountPaid!==void 0&&(a.amount_paid=t.amountPaid),t.invoiceType!==void 0&&(a.invoice_type=t.invoiceType),t.retentionRate!==void 0&&(a.retention_rate=t.retentionRate),t.depositRate!==void 0&&(a.deposit_rate=t.depositRate),t.reverseChargeVat!==void 0&&(a.reverse_charge_vat=t.reverseChargeVat),t.status!==void 0&&(a.status=t.status,t.status==="sent"&&(a.sent_at=new Date().toISOString()),t.status==="paid"&&(a.paid_at=new Date().toISOString())),i){let c=0,u=0;const f=i.map((g,b)=>{const T=Math.round(g.quantity*g.unitPrice),R=Math.round(T*g.vatRate/100);return c+=T,u+=R,{...g,lineTotal:T,sortOrder:b}}),p=t.reverseChargeVat??!1,m=c+(p?0:u),h=t.retentionRate??0;a.subtotal=c,a.vat_amount=u,a.total=m,h>0&&(a.retention_amount=Math.round(m*h/100));const{error:v}=await D.from("invoice_items").delete().eq("invoice_id",e);if(v)throw v;if(f.length>0){const{error:g}=await D.from("invoice_items").insert(f.map(b=>({invoice_id:e,description:b.description,quantity:b.quantity,unit_price:b.unitPrice,vat_rate:b.vatRate,line_total:b.lineTotal,sort_order:b.sortOrder})));if(g)throw g}}if(Object.keys(a).length>0){const{error:c}=await D.from("invoices").update(a).eq("id",e);if(c)throw c}}async function hq(e){const{data:t,error:i}=await D.from("invoices").delete().eq("id",e).select("id");if(i)throw i;if(!t||t.length===0)throw new Error("This invoice couldn't be deleted - you may 
34not have permission, or it was already removed.")}async function gq(e){const{data:t,error:i}=await D.rpc("job_invoicing_summary",{p_job_id:e});if(i)throw i;const a=Array.isArray(t)?t[0]:t;return{totalInvoiced:a?.total_invoiced??0,totalPaid:a?.total_paid??0,totalRetentionHeld:a?.total_retention_held??0,invoiceCount:a?.invoice_count??0}}async function yq(e){try{await D.rpc("notify_invoice_viewed",{p_invoice_id:e})}catch{}}async function vq(){const{data:e,error:t}=await D.from("invoice_templates").select("id,user_uid,org_id,name,items,payment_terms,notes,terms,due_days,created_at,updated_at").order("name");if(t)throw t;return(e||[]).map(i=>lA(i))}async function Eq(e,t,i){const{data:a,error:c}=await D.from("invoice_templates").insert({user_uid:e,org_id:t||null,name:i.name,items:i.items,payment_terms:i.paymentTerms||null,notes:i.notes||null,terms:i.terms||null,due_days:i.dueDays??30}).select("id,user_uid,org_id,name,items,payment_terms,notes,terms,due_days,created_at,updated_at").single();if(c)throw c;return lA(a)}async function Sq(e){const{error:t}=await D.from("invoice_templates").delete().eq("id",e);if(t)throw t}function Fp(e,t,i){const a={staleTime:3e5};e.prefetchQuery({queryKey:oi.clients(t,i),queryFn:()=>u2(t,i),...a}),e.prefetchQuery({queryKey:oi.properties(t,i),queryFn:()=>pj(t,i),...a}),e.prefetchQuery({queryKey:oi.jobs(t,i),queryFn:()=>l2(t,i),...a}),e.prefetchQuery({queryKey:oi.certificates(t,i),queryFn:()=>Fj(t,i),...a}),e.prefetchQuery({queryKey:oi.quotes(t,i),queryFn:()=>p2(t,i),...a}),e.prefetchQuery({queryKey:oi.invoices(t,i),queryFn:()=>_2(t,i),...a})}async function Cm(e,t){const i="https://api.certbox.app",a="eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJyb2xlIjogImFub24iLCAiaXNzIjogInN1cGFiYXNlIiwgImlhdCI6IDE3ODkzMzg1OTUsICJleHAiOiAxOTQ3MDE4NTk1fQ.RdVNHp3m-NXSEs8ruhxhc1LjAptGexpogHwMqLYaiXE",{data:{session:c}}=await D.auth.getSession();if(!c?.access_token)throw new Error("Your session has expired. Please sign in again.");const u=new URL(`${i}/auth/v1/user`);t&&u.searchParams.set("redirect_to",t);const f=await fetch(u.toString(),{method:"PUT",headers:{Authorization:`Bearer ${c.access_token}`,apikey:a,"Content-Type":"application/json"},body:JSON.stringify(e)});if(!f.ok){const p=await f.json().catch(()=>({}));throw new Error(p.msg||p.error_description||p.message||`Request failed (${f.status})`)}}const Lm="certbox_signup_surface";function g2(e){mi("localStorage",Lm,e)}function y2(){const e=Xn("localStorage",Lm);return jo("localStorage",Lm),e==="google_one_tap"||e==="google_button"?e:"unknown"}const Gp=new Map;function v2(e){const t=Gp.get(e.id);if(t)return t;const i=E2(e).finally(()=>{Gp.delete(e.id)});return Gp.set(e.id,i),i}async function E2(e){const t=y2();t==="google_button"&&await _A(e.id,"signup_google");const{detectCountry:i}=await Ot(()=>y(()=>import("./locale-content-CeCwYUpZ.js"),[]));let a=[],c="tradesman";try{const m=localStorage.getItem("certbox_pending_trades");if(m){const v=JSON.parse(m);Array.isArray(v)&&(a=v.filter(g=>typeof g=="string"))}const h=localStorage.getItem("certbox_pending_role");(h==="tradesman"||h==="landlord"||h==="pm")&&(c=h)}catch{}const u=c==="tradesman"&&a.length===0?["gas"]:a,f={uid:e.id,email:e.email??"",display_name:e.user_metadata?.full_name||e.user_metadata?.name||e.email?.split("@")[0]||"User",role:c,country:i(),trades:u};await D.from("users").upsert(f,{onConflict:"uid"});let p=!1;try{p=!!sessionStorage.getItem("pendingInviteToken")}catch{}try{const{data:m}=await D.from("users").select("org_id").eq("uid",e.id).maybeSingle();if(!p&&!m?.org_id){const{createOrganisation:h}=await Ot(()=>y(()=>import("./index-CfUw_bXj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]))),v=await h({name:f.display_name,createdByUid:e.id});f.email&&await D.from("organisations").update({email:f.email}).eq("id",v)}}catch(m){console.error("[oauth-profile] Could not create organisation for OAuth signup:",m)}try{localStorage.removeItem("certbox_pending_trades"),localStorage.removeItem("certbox_pending_role")}catch{}return Rm(e.id),Bo("sign_up",{method:"google",surface:t,...eA()}),Cm({data:{app:"certbox"}}).catch(()=>{}),ii(e.id)}function FS(e){for(let t=0;t<e.length;t++){const i=e.charCodeAt(t);if(i<=31||i===127||i===92)return!0}return!1}function S2(){try{const e=typeof window<"u"?window.location?.origin:void 0;return e&&e!=="null"?e:null}catch{return null}}
34function Y_(e,t,i=S2()){if(typeof e!="string"||e===""||!i||!e.startsWith("/"))return t;let a;try{a=decodeURIComponent(e)}catch{return t}if(FS(e)||FS(a)||a.startsWith("//"))return t;let c;try{c=new URL(e,i)}catch{return t}if(c.origin!==i)return t;const u=`${c.pathname}${c.search}${c.hash}`;return!u.startsWith("/")||u.startsWith("//")?t:u}const $_="certbox_return_path",X_="certbox_return_path_at",b2=3600*1e3,T2=["/login","/signup","/auth/continue","/reset-password","/logout"];function AA(e){const t=e.split(/[?#]/)[0].replace(/\/+$/,"")||"/";return T2.includes(t)}function Mm(){jo("localStorage",$_),jo("localStorage",X_)}function zu(e,t=Date.now()){const i=Y_(e,null);if(!i||AA(i))return Mm(),!1;const a=mi("localStorage",$_,i)&&mi("localStorage",X_,String(t));return a||Mm(),a}function bq(e=Date.now()){const t=Y_(Xn("localStorage",$_),null),i=Number(Xn("localStorage",X_));if(Mm(),!t||AA(t)||!Number.isFinite(i)||i<=0)return null;const a=e-i;return a<-6e4||a>b2?null:t}const A2="https://certbox.app";function Eo(){try{const{origin:e,hostname:t}=window.location;if(t==="localhost"||t==="127.0.0.1")return e}catch{}return A2}function Xa(e,t,i="Timed out"){return new Promise((a,c)=>{const u=setTimeout(()=>c(new Error(i)),t);e.then(a,c).finally(()=>clearTimeout(u))})}const GS={42501:"You don't have permission to do that.",23505:"This record already exists.",23503:"This record is linked to other data and can't be changed.",23502:"A required field is missing.",23514:"One of the values isn't allowed here.","22P02":"One of the values is in the wrong format.",40001:"That didn't save because of a conflict. Please try again.",57014:"That took too long. Please try again.","42P01":"Something went wrong. Please try again.",PGRST301:"Your session has expired. Please sign in again.",PGRST204:"Something went wrong. Please try again.",PGRST116:"That record could not be found."},Il="ACTION_REQUIRED: ",RA="property_limit_reached";function Tq(e){return OA(e)?.message.includes(RA)??!1}async function Aq(e){const t=e?.context;if(!(t instanceof Response))return null;try{const{error:i}=await t.clone().json();if(typeof i=="string"&&i.startsWith(Il))return i.slice(Il.length)}catch{}return null}function OA(e){if(e instanceof Error){const{code:t}=e;return{message:e.message??"",code:t,name:e.name,isError:!0}}if(e!==null&&typeof e=="object"){const t=e;if(typeof t.message=="string")return{message:t.message,code:typeof t.code=="string"?t.code:void 0,name:typeof t.name=="string"?t.name:void 0,isError:!1}}return null}function Si(e,t="Something went wrong. Please try again."){const i=OA(e);if(i){const{code:a}=i;return i.message.startsWith(Il)?i.message.slice(Il.length):i.message.includes(RA)?"You've reached your plan's property limit. Upgrade to add more.":a&&GS[a]?GS[a]:a?t:i.message.includes("timed out")?"Your signal is too weak to finish saving. Try again when you have a bar or two - nothing has been lost.":i.name==="AbortError"?"Request timed out. Check your connection and try again.":i.message.includes("Failed to fetch")||i.message.includes("NetworkError")?"Network error. Check your connection and try again.":i.message.includes("Edge Function")||i.message.includes("non-2xx")||!i.isError?t:i.message||t}return typeof e=="string"?e:t}async function Zl(){try{await Promise.race([D.auth.getSession(),new Promise(e=>setTimeout(e,3e3))])}catch{}}const DA={trial_already_used:"This account has already had its free trial.",already_released:"This certificate is already yours to download.",already_entitled:"This account is on Pro, so certificates are already included.",not_your_certificate:"That certificate belongs to a different account."};class R2 extends Error{code;constructor(t){super(DA[t]),this.name="CheckoutRefusedError",this.code=t}}const O2=new Set(Object.keys(DA));async function D2(e){const t=e?.context;if(!(t instanceof Response))return null;try{const i=await t.clone().json();return typeof i.code=="string"?i.code:null}catch{return null}}async function w2(e,t={}){await Zl();const i={priceId:e};t.trial&&(i.trial=!0),t.returnTo&&(i.returnTo=t.returnTo),t.singleCertificateId&&(i.kind="single_certificate",i.certificateId=t.singleCertificateId);const{data:a,error:c}=await Promise.race([D.functions.invoke("stripe-checkout",{body:i}),new Promise((u,f)=>setTimeout(()=>f(new Error("Checkout request timed out. Please try again.")),15e3))]);if(c){const u=await D2(c);throw u&&O2.has(u)?new R2(u):new Error(Si(c,"Checkout request failed."))}if(!a?.url)throw new Error("No checkout URL returned from stripe-checkout function");return a.url}const Cl="certbox:entitlement-changed";async function Rq(){await Zl();const e=await Promise.race([D.functions.invoke("stripe-portal",{body:{}}),new Promise((t,i)=>setTimeout(()=>i(new Error("Request timed out")),15e3))]);if(e.error)throw new Error(Si(e.error,"Failed to open billing portal."));if(!e.data?.url)throw new Error("Failed to open billing portal. Please try again.");return e.data.url}async function Oq(){await Zl();const e=await Promise.race([D.functions.invoke("stripe-portal",{body:{flow:"keep_pro"}}),new Promise((t,i)=>setTimeout(()=>i(new Error("Request timed out")),15e3))]);if(e.error)throw new Error(Si(e.error,"Could not open the billing page."));if(e.data?.noSubscription)return{noSubscription:!0}
34;if(!e.data?.url)throw new Error("Could not open the billing page. Please try again.");return{url:e.data.url}}async function Dq(){await Zl();const e=await Promise.race([D.functions.invoke("stripe-portal",{body:{flow:"subscription_update"}}),new Promise((t,i)=>setTimeout(()=>i(new Error("Request timed out")),15e3))]);if(e.error)throw new Error(Si(e.error,"Failed to open billing portal."));if(e.data?.noSubscription)return{noSubscription:!0};if(!e.data?.url)throw new Error("Failed to open billing portal. Please try again.");return{url:e.data.url}}async function wq(){const{data:e,error:t}=await D.functions.invoke("stripe-connect",{body:{returnUrl:`${window.location.origin}/account/stripe/callback`,refreshUrl:`${window.location.origin}/account/stripe/callback?refresh=1`}});if(t)throw new Error(Si(t,"Failed to connect Stripe."));if(!e?.onboardingUrl)throw new Error("Failed to connect Stripe. Please try again.");return e.onboardingUrl}async function xq(){const{data:e,error:t}=await D.functions.invoke("stripe-connect-complete",{});if(t)throw new Error(Si(t,"Failed to verify Stripe connection."));if(!e)throw new Error("No response from stripe-connect-complete");return e}async function Iq(){const{error:e}=await D.functions.invoke("stripe-disconnect",{});if(e)throw new Error(Si(e,"Failed to disconnect Stripe."))}async function Cq(e){const{data:t,error:i}=await D.functions.invoke("stripe-create-payment",{body:{invoiceId:e}});if(i)throw new Error(Si(i,"Failed to create payment link."));return t.paymentUrl}function YS(e){if(!e)return!1;const t=e;if(t.code)return!1;const i=(t.message||"").toLowerCase();return t.name==="AbortError"||i.includes("abort")||i.includes("fetch")||i.includes("network")||i.includes("timeout")||i.includes("load failed")}const x2=6,I2=3e3,C2=4e3;async function $S(e,t){try{const i=await Xa(XU(e),C2,"device teardown timeout");i.failed.length>0&&console.warn("[auth] sign-out could not sweep:",i.failed.join(", ")),t(i.keptForUser.total>0?{items:i.keptForUser.total}:null)}catch(i){console.warn("[auth] device teardown did not finish:",i),t(null)}}const wA=Q.createContext(null);function L2({children:e}){const t=Um(),[i,a]=Q.useState(null),[c,u]=Q.useState(null),[f,p]=Q.useState(!0),m=Q.useRef(!0),h=B=>{m.current=B,p(B)},[v,g]=Q.useState(null),[b,T]=Q.useState(!1),[R,x]=Q.useState([]),[P,$]=Q.useState(null),K=Q.useCallback(()=>$(null),[]),le=Q.useRef(!1),de=Q.useRef(null);Q.useEffect(()=>{i&&(de.current=i.id)},[i]);const he=Q.useRef(!1),re=Q.useRef(!1);Q.useEffect(()=>{let B=!0;navigator.onLine?D.auth.getSession().then(async({data:{session:se}})=>{if(!B||re.current||he.current)return;const Ee=se?.user??null;if(a(Ee),Ee)try{const ge=await ii(Ee.id);B&&(u(ge),ge&&(Ga(Ee.id).catch(()=>{}),Fp(t,Ee.id,ge.orgId)))}catch(ge){console.error("Failed to load profile:",ge)}B&&h(!1)}).catch(()=>{B&&h(!1)}):(async()=>{try{const se=zS()?.user??null;if(B&&!re.current&&!he.current){if(a(se),se){const Ee=await Dl(se.id);B&&u(Ee)}h(!1)}}catch{B&&h(!1)}})();const X=new Set,{data:{subscription:ie}}=D.auth.onAuthStateChange((se,Ee)=>{if(!B)return;const ge=Ee?.user??null;if(se==="PASSWORD_RECOVERY"&&T(!0),se==="SIGNED_OUT"&&(t.clear(),!le.current)){const ot=de.current;de.current=null,qp().catch(()=>{});const at=setTimeout(()=>{X.delete(at),$S(ot,$)},0);X.add(at)}if((re.current||he.current)&&ge)return;if(a(ge),!ge){u(null),h(!1);return}const We=setTimeout(async()=>{if(X.delete(We),!!B){try{let ot=await ii(ge.id);!ot&&ge.app_metadata?.provider&&ge.app_metadata.provider!=="email"&&(ot=await v2(ge)),B&&(u(at=>ot??(at?.uid===ge.id?at:null)),ot&&Ga(ge.id).catch(()=>{}))}catch(ot){console.error("Failed to load profile:",ot)}B&&h(!1)}},0);X.add(We)}),_e=se=>{kU(se.key)&&!se.newValue&&(a(null),u(null),g(null),t.clear(),qp().catch(()=>{}))};window.addEventListener("storage",_e);const Re=setTimeout(async()=>{if(!(!B||!m.current)){try{const se=zS()?.user??null;if(se&&!re.current&&!he.current){a(se);const Ee=await Dl(se.id);B&&u(Ee)}}catch{}B&&h(!1)}},5e3);return()=>{B=!1,ie.unsubscribe(),clearTimeout(Re),X.forEach(clearTimeout),X.clear(),window.removeEventListener("storage",_e)}},[t]),Q.useEffect(()=>{Y3(i?.id??null)},[i]);const z=Q.useRef(!1);Q.useEffect(()=>{if(!i||c?.orgId||re.current||he.current)return;let B=!1,X=0,ie;const _e=async()=>
34{if(B)return;let se=null;try{se=await ii(i.id)}catch{}if(!B){if(se?.orgId){u(se),Ga(i.id).catch(()=>{}),Fp(t,i.id,se.orgId);return}if(se&&!c&&(u(se),Ga(i.id).catch(()=>{})),X+=1,X<=x2){ie=setTimeout(_e,Math.min(1e3*2**X,8e3));return}if(!(!se||z.current)){z.current=!0;try{if(Xn("sessionStorage","pendingInviteToken"))return;const{data:Ee}=await D.from("users").select("org_id").eq("uid",i.id).maybeSingle();if(Ee?.org_id){_e();return}const ge=await Ot(()=>y(()=>import("./index-CfUw_bXj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]))),We=await ge.findAdoptableOrganisation(i.id);We?(await ge.attachOrganisation(We,i.id),console.warn("[auth] attached an organisation this account had already created")):(await ge.createOrganisation({name:se.displayName||se.email||"My company",createdByUid:i.id}),console.warn("[auth] repaired a missing organisation for this account")),X=0,_e()}catch(Ee){console.error("[auth] could not repair missing organisation:",Ee)}}}},Re=()=>{B||(X=0,ie&&clearTimeout(ie),_e())};return _e(),window.addEventListener("online",Re),window.addEventListener("focus",Re),()=>{B=!0,ie&&clearTimeout(ie),window.removeEventListener("online",Re),window.removeEventListener("focus",Re)}},[i,c,t]),Q.useEffect(()=>{Rm(i?.id??null,i?.email??null)},[i?.id,i?.email]);const Z=Q.useCallback(async(B,X)=>{re.current=!0;try{const{error:ie,data:_e}=await D.auth.signInWithPassword({email:B,password:X});if(ie)throw ie;let Re=!1,se=null;try{se=(await Xa(D.auth.mfa.getAuthenticatorAssuranceLevel(),3e3,"MFA check timeout")).data}catch{se=null}if(se?.nextLevel==="aal2"&&se.nextLevel!==se.currentLevel){const{data:ge}=await Xa(D.auth.mfa.listFactors(),3e3,"MFA list timeout"),We=ge?.totp?.[0];if(!We)throw new Error("This account requires two-factor authentication, but no usable factor was found.");const{data:ot,error:at}=await Xa(D.auth.mfa.challenge({factorId:We.id}),3e3,"MFA challenge timeout");if(at||!ot)throw at??new Error("Failed to start MFA challenge");g({factorId:We.id,challengeId:ot.id,accessToken:_e.session?.access_token??""}),Re=!0}if(Re)return{mfaRequired:!0};const Ee=_e.session?.user??null;if(Ee){a(Ee);const ge=await ii(Ee.id);u(ge),ge&&(Ga(Ee.id).catch(()=>{}),Fp(t,Ee.id,ge.orgId))}return re.current=!1,h(!1),{mfaRequired:!1}}finally{re.current=!1}},[t]),Ie=Q.useCallback(async B=>{g2("google_button"),zu(B?.next);const{error:X}=await D.auth.signInWithOAuth({provider:"google",options:{redirectTo:`${Eo()}/auth/continue`}});if(X)throw zu(null),X},[]),J=Q.useCallback(async(B,X)=>{const ie=zu(X?.next),{error:_e}=await D.auth.signInWithOtp({email:B,options:{shouldCreateUser:!1,emailRedirectTo:`${Eo()}/${ie?"auth/continue":""}`}});if(_e)throw zu(null),_e},[]),ne=Q.useCallback(async B=>{if(!v)throw new Error("No MFA challenge pending");const X="https://api.certbox.app",ie="eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJyb2xlIjogImFub24iLCAiaXNzIjogInN1cGFiYXNlIiwgImlhdCI6IDE3ODkzMzg1OTUsICJleHAiOiAxOTQ3MDE4NTk1fQ.RdVNHp3m-NXSEs8ruhxhc1LjAptGexpogHwMqLYaiXE",_e=new AbortController,Re=setTimeout(()=>_e.abort(),15e3);let se;try{se=await fetch(`${X}/auth/v1/factors/${v.factorId}/verify`,{method:"POST",signal:_e.signal,headers:{Authorization:`Bearer ${v.accessToken}`,"Content-Type":"application/json",apikey:ie},body:JSON.stringify({challenge_id:v.challengeId,code:B})})}catch(ge){throw clearTimeout(Re),ge instanceof DOMException&&ge.name==="AbortError"?new Error("Verification timed out. Please try again."):ge}if(clearTimeout(Re),!se.ok){const ge=await se.json().catch(()=>({}));throw new Error(ge.msg||ge.message||`Verification failed (${se.status})`)}const Ee=await se.json();Ee.access_token&&MU(Ee),g(null),window.location.href="/"},[v]),fe=Q.useCallback(async()=>{g(null);try{await Xa(D.auth.signOut(),5e3,"signOut timeout")}catch{}a(null),u(null)},[]),De=Q.useCallback(async(B,X,ie,_e,Re,se,Ee,ge)=>{he.current=!0;try{const{data:We,error:ot}=await D.auth.signUp({email:B,password:X,options:{data:{display_name:ie,app:"certbox"},emailRedirectTo:`${Eo()}/`}});if(ot)throw ot;if(!We.user)throw new Error("Sign-up succeeded but no user was returned");
34if(!We.user.identities||We.user.identities.length===0)throw new Error("An account with this email already exists. Please sign in instead.");const at=We.user.id;Rm(at),Bo("sign_up",{method:"email",...eA()});const ra={uid:at,email:B,display_name:ie,role:_e,country:Re,trades:Ee&&Ee.length>0?Ee:[]};let Tt=!1;for(let nt=0;nt<2&&!Tt;nt++){try{const{error:qt}=await D.from("users").upsert(ra,{onConflict:"uid"});if(!qt){Tt=!0;break}if(!YS(qt))throw qt}catch(qt){if(!YS(qt))throw qt}nt===0&&await new Promise(qt=>setTimeout(qt,400))}Tt||console.warn("[signUp] profile upsert not confirmed after retry; continuing (row likely written server-side, trigger backstops)"),await _A(at,"signup");let ft;if(ge)try{const{acceptInviteByToken:nt}=await Ot(()=>y(()=>import("./org-members-DnIgV0f-.js"),__vite__mapDeps([7,8,9,10,11,12])));ft=await nt(ge),jo("sessionStorage","pendingInviteToken")}catch(nt){console.error("Failed to accept invite during signup:",nt)}if(!ft&&se){if(se.type==="create"){const{createOrganisation:nt}=await Ot(()=>y(()=>import("./index-CfUw_bXj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])));ft=await nt({name:se.orgName,createdByUid:at})}else if(se.type==="join"){const{joinOrganisation:nt}=await Ot(()=>y(()=>import("./index-CfUw_bXj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])));await nt(se.orgId,at),ft=se.orgId}else if(se.type==="request"){const{createOrgJoinRequest:nt}=await Ot(()=>y(()=>import("./index-CfUw_bXj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])));await nt(se.orgId,at,ie,B)}}if(!ft)try{const{createOrganisation:nt}=await Ot(()=>y(()=>import("./index-CfUw_bXj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])));ft=await nt({name:ie,createdByUid:at}),await D.from("organisations").update({email:B}).eq("id",ft)}catch(nt){console.error("[signUp] organisation creation failed; account created without one:",nt)}a(We.user),u({uid:at,email:B,displayName:ie,role:_e,country:Re,orgId:ft,activeOrgId:ft,trades:Ee&&Ee.length>0?Ee:void 0,isAdmin:!1,subscriptionTier:void 0,subscriptionStatus:void 0,createdAt:new Date}),h(!1),Ga(at).catch(()=>{})}finally{he.current=!1}},[]),me=Q.useCallback(async()=>{const B=i?.id??null;le.current=!0;try{a(null),u(null),g(null),T(!1),t.clear(),qp().catch(()=>{});try{const{error:X}=await Xa(D.auth.signOut({scope:"local"}),I2,"signOut timeout");X&&console.warn("[auth] sign-out: the server did not revoke the session:",X.message??X)}catch(X){console.warn("[auth] sign-out: revoke did not complete, clearing locally:",X)}NU(),await $S(B,$),de.current=null}finally{le.current=!1}},[t,i?.id]),He=Q.useCallback(async B=>{const{error:X}=await D.auth.resetPasswordForEmail(B,{redirectTo:`${Eo()}/reset-password`});if(X)throw X},[]),M=Q.useCallback(async B=>{await Cm({password:B}),T(!1)},[]),q=Q.useCallback(async B=>{await Cm({email:B},`${Eo()}/account?tab=security&email_change=success`)},[]),H=Q.useCallback(async()=>{if(!i)return null;const B=await ii(i.id);return B&&u(B),Ot(()=>y(()=>import("./org-members-DnIgV0f-.js"),__vite__mapDeps([7,8,9,10,11,12]))).then(({getUserOrgs:X})=>X().then(x).catch(()=>{})).catch(()=>{}),B},[i]);Q.useEffect(()=>{if(!c?.uid){x([]);return}Ot(()=>y(()=>import("./org-members-DnIgV0f-.js"),__vite__mapDeps([7,8,9,10,11,12]))).then(({getUserOrgs:B})=>B().then(x).catch(()=>{})).catch(()=>{})},[c?.uid,c?.orgId]);const te=Q.useCallback(async B=>{if(!i)throw new Error("Not signed in");const{switchActiveOrg:X}=await Ot(()=>y(()=>import("./org-members-DnIgV0f-.js"),__vite__mapDeps([7,8,9,10,11,12])));await X(B);const ie=await ii(i.id);ie&&u(ie),t.clear();const{getUserOrgs:_e}=await Ot(()=>y(()=>import("./org-members-DnIgV0f-.js"),__vite__mapDeps([7,8,9,10,11,12])));_e().then(x).catch(()=>{})},[i,t]);Q.useEffect(()=>{if(!i)return;let B=!1;const X=()=>{const ie=[400,900,1500,2500,3500,3500];let _e=0;const Re=()=>{B||ii(i.id).then(se=>{if(B||!se)return;u(se),!H_(se.subscriptionStatus,se.effectiveTier??se.subscriptionTier)&&_e<ie.length&&setTimeout(Re,ie[_e++])}).catch(()=>{!B&&_e<ie.length&&setTimeout(Re,ie[_e++])})};Re()};return window.addEventListener(Cl,X),()=>{B=!0,window.removeEventListener(Cl,X)}},[i]);const W=f,ce=Q.useMemo(()=>({user:i,profile:c,loading:f,authLoading:W,recoveryMode:b,signIn:Z,signInWithGoogle:Ie,signInWithMagicLink:J,signUp:De,signOut:me,resetPassword:He,updatePassword:M,updateEmail:q,refreshProfile:H,userOrgs:R,switchOrg:te,mfaPending:!!v,verifyMfaCode:ne,cancelMfa:fe,keptWorkNotice:P,dismissKeptWorkNotice:K}),[i,c,f,W,b,Z,Ie,J,De,me,He,M,q,H,R,te,v,ne,fe,P,K]);return S.jsx(wA.Provider,{value:ce,children:e})}function Qn(){const e=Q.useContext(wA);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}function Lq(){const{userOrgs:e,profile:t}=Qn();return e.find(i=>i.orgId===t?.orgId)?.role??null}const xA=Q.createContext({isOffline:!1,syncState:{status:"idle",pendingCount:0},triggerSync:()=>{},clearError:()=>{},clearAllPending:async()=>{},refreshPendingCount:async()=>{}});function M2({children:e}){const[t,i]=Q.useState(!navigator.onLine),[a,c]=Q.useState({status:"idle",pendingCount:0}),u=Um(),f=Q.useRef("idle");Q.useEffect(()=>{const g=Ji.subscribe(T=>{i(!T)}),b=()=>i(!0);return window.addEventListener("offline",b),()=>{g(),window.removeEventListener("offline",b)}},[]),Q.useEffect(()=>
34{f.current==="syncing"&&a.status==="idle"&&u.invalidateQueries(),f.current=a.status},[a.status,u]),Q.useEffect(()=>{let g,b;return Ot(()=>y(()=>import("./sync-manager-DkQHfIkx.js").then(T=>T.s),__vite__mapDeps([18,19,20,21,22,23]))).then(T=>{g=T.subscribe(c),b=T.startAutoSync()}).catch(T=>console.error("[offline] sync-manager chunk failed to load:",T)),()=>{g?.(),b?.()}},[]);const p=Q.useCallback(()=>{Ot(()=>y(()=>import("./sync-manager-DkQHfIkx.js").then(g=>g.s),__vite__mapDeps([18,19,20,21,22,23]))).then(g=>g.triggerSync()).catch(g=>console.error("[offline] sync-manager chunk failed to load:",g))},[]),m=Q.useCallback(()=>{Ot(()=>y(()=>import("./sync-manager-DkQHfIkx.js").then(g=>g.s),__vite__mapDeps([18,19,20,21,22,23]))).then(g=>g.clearError()).catch(g=>console.error("[offline] sync-manager chunk failed to load:",g))},[]),h=Q.useCallback(()=>Ot(()=>y(()=>import("./sync-manager-DkQHfIkx.js").then(g=>g.s),__vite__mapDeps([18,19,20,21,22,23]))).then(g=>g.clearAllPending()),[]),v=Q.useCallback(()=>Ot(()=>y(()=>import("./sync-manager-DkQHfIkx.js").then(g=>g.s),__vite__mapDeps([18,19,20,21,22,23]))).then(g=>g.refreshPendingCount()),[]);return S.jsx(xA.Provider,{value:{isOffline:t,syncState:a,triggerSync:p,clearError:m,clearAllPending:h,refreshPendingCount:v},children:e})}function IA(){return Q.useContext(xA)}function N2(){const[e,t]=Q.useState({open:!1,title:"",onConfirm:()=>{},onCancel:()=>{}}),i=Q.useCallback((a,c,u)=>new Promise(f=>{t({open:!0,title:a,message:c,confirmLabel:u?.confirmLabel??"Confirm",variant:u?.variant??"danger",onConfirm:()=>{t(p=>({...p,open:!1})),f(!0)},onCancel:()=>{t(p=>({...p,open:!1})),f(!1)}})}),[]);return{confirmState:e,confirm:i}}const k2={primary:"bg-primary text-white hover:bg-primary-dark",secondary:"bg-surface text-text-primary border border-border-strong shadow-sm hover:border-text-primary hover:bg-white",danger:"bg-danger text-white hover:bg-red-700",ghost:"bg-transparent text-text-secondary hover:bg-background-secondary"},P2={sm:"px-3 py-2 text-sm min-h-[44px]",md:"px-4 py-2.5 text-sm min-h-[44px]",lg:"px-6 py-3 text-base min-h-[44px]"};function Vo({variant:e="primary",size:t="md",className:i="",children:a,disabled:c,...u}){return S.jsx("button",{className:`inline-flex items-center justify-center font-normal rounded-[6px] transition-all active:scale-[0.97] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100 ${k2[e]} ${P2[t]} ${i}`,disabled:c,...u,children:a})}function U2({open:e,title:t,message:i,confirmLabel:a="Confirm",cancelLabel:c="Cancel",variant:u="danger",confirmDisabled:f=!1,children:p,onConfirm:m,onCancel:h}){const v=Q.useRef(null),g=Q.useRef(null);return Q.useEffect(()=>{if(!e)return;g.current=document.activeElement;const b=v.current?.querySelector("input, textarea, select"),T=v.current?.querySelector("[data-cancel]");(b??T)?.focus();const R=x=>{if(x.key==="Escape"){h();return}if(x.key!=="Tab")return;const P=v.current?.querySelectorAll("button, [tabindex], input, textarea, select");if(!P?.length)return;const $=P[0],K=P[P.length-1];x.shiftKey&&document.activeElement===$?(x.preventDefault(),K.focus()):!x.shiftKey&&document.activeElement===K&&(x.preventDefault(),$.focus())};return document.addEventListener("keydown",R),()=>{document.removeEventListener("keydown",R),g.current?.focus()}},[e,h]),e?S.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",onClick:h,children:S.jsxs("div",{ref:v,role:"alertdialog","aria-modal":"true","aria-label":t,className:"bg-white rounded-xl shadow-xl w-full max-w-sm p-5 space-y-4",onClick:b=>b.stopPropagation(),children:[S.jsx("h3",{className:"text-base font-semibold text-text-primary",children:t}),i&&S.jsx("p",{className:"text-sm text-text-secondary",children:i}),S.jsx("span",{children:p}),S.jsxs("div",{className:"flex gap-3 justify-end",children:[S.jsx(Vo,{variant:"secondary",size:"sm",onClick:h,"data-cancel":!0,children:c}),S.jsx(Vo,{variant:u==="danger"?"danger":"primary",size:"sm",onClick:m,disabled:f,children:a})]})]})}):null}function j2(){const{isOffline:e,syncState:t,triggerSync:i,clearError:a,clearAllPending:c}=IA(),{confirmState:u,confirm:f}=N2(),p=async()=>{await f(`Delete ${t.pendingCount} item${t.pendingCount!==1?"s":""} that could not sync?`,"The certificates, PDFs, photos and paperwork waiting to upload will be deleted from this device. They have not reached the server, so this cannot be undone.",{confirmLabel:"Delete them",variant:"danger"})&&c()};return!e&&t.status==="syncing"?S.jsxs("div",{role:"status","aria-live":"polite",className:"bg-blue-50 border-b border-blue-200 px-4 py-2 text-center text-sm text-blue-800 flex items-center justify-center gap-2",children:[S.jsx(hO,{size:14,className:"animate-spin"}),S.jsxs("span",{children:["Syncing ",t.pendingCount," item",t.pendingCount!==1?"s":"","..."]}
34)]}):!e&&t.status==="error"&&t.pendingCount>0?S.jsxs("div",{role:"status","aria-live":"polite",className:"bg-red-50 border-b border-red-200 px-4 py-2 text-sm text-danger",children:[S.jsxs("div",{className:"flex items-center justify-center gap-2",children:[S.jsxs("span",{children:["Sync failed for ",t.pendingCount," item",t.pendingCount!==1?"s":"","."]}),S.jsx("button",{onClick:i,className:"underline font-semibold hover:text-danger",children:"Retry"}),S.jsx("button",{onClick:p,className:"underline font-semibold hover:text-danger",children:"Clear"}),S.jsx("button",{onClick:a,className:"ml-1 p-2 min-w-[44px] min-h-[44px] flex items-center justify-center rounded hover:bg-red-100 transition-colors","aria-label":"Dismiss",children:S.jsx(jm,{size:14})})]}),S.jsx(U2,{...u}),t.lastError&&S.jsx("p",{className:"text-sm text-danger text-center mt-1",children:t.lastError.includes("Failed to fetch")||t.lastError.includes("NetworkError")?"Network error. Check your connection and try again.":t.lastError})]}):e?S.jsxs("div",{role:"status","aria-live":"polite",className:"bg-yellow-50 border-b border-yellow-200 px-4 py-2 text-center text-sm text-warning",children:[navigator.onLine?"Poor connection - working offline.":"You're offline - changes saved locally.",t.pendingCount>0&&` ${t.pendingCount} item${t.pendingCount!==1?"s":""} will sync when back online.`]}):null}const XS="certbox_loadingstate_auto_recover",z2=6e4,B2=15;function QS(){const e=typeof navigator<"u"?navigator.onLine:"na",t=typeof document<"u"?document.visibilityState:"na";return`online=${e} vis=${t}`}function V2({label:e="Loading...",slowThresholdSeconds:t=10,onRetry:i}){const[a,c]=Q.useState(0),[u,f]=Q.useState(null),p=Q.useRef(!1),m=Q.useCallback(()=>{if(i){i();return}window.location.reload()},[i]);Q.useEffect(()=>{const g=setTimeout(()=>{f(a),rl(`LoadingState slow: "${e}" [${QS()} after=${t}s]`)},t*1e3);return()=>clearTimeout(g)},[t,a,e]),Q.useEffect(()=>{const g=setTimeout(()=>{if(p.current)return;const b=Xn("sessionStorage",XS),T=Date.now();b&&T-Number(b)<z2||mi("sessionStorage",XS,String(T))&&(p.current=!0,rl(`LoadingState auto-recovered: "${e}" [${QS()}]`),m())},(t+B2)*1e3);return()=>clearTimeout(g)},[t,a,e,m]);const h=u===a,v=Q.useCallback(()=>{c(g=>g+1),m()},[m]);return S.jsx("div",{className:"flex flex-col items-center justify-center py-20 gap-3 text-text-secondary",children:h?S.jsxs(S.Fragment,{children:[S.jsx(gO,{size:28,className:"text-warning"}),S.jsx("p",{className:"text-sm font-semibold text-text-primary",children:"Taking longer than expected"}),S.jsx("p",{className:"text-sm text-center max-w-xs",children:"This could be a network issue. Check your connection and try again."}),S.jsxs(Vo,{onClick:v,size:"sm",className:"mt-2",children:[S.jsx(yO,{size:14,className:"mr-1.5"}),"Retry"]})]}):S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"h-6 w-6 border-2 border-primary/30 border-t-primary rounded-full animate-spin"}),S.jsx("p",{className:"text-sm",children:e})]})})}function q2(){const[e,t]=Q.useState(()=>{try{return typeof navigator<"u"&&navigator.webdriver?!1:!C3()}catch{return!1}});if(!e)return null;const i=a=>{L3(a),a&&JT(),t(!1)};return S.jsxs("div",{role:"region","aria-label":"Analytics cookies",className:"consent-banner fixed inset-x-4 bottom-4 z-50 mx-auto max-w-xl rounded-lg border border-border bg-surface p-4 shadow-lg sm:inset-x-auto sm:right-4",children:[S.jsx("p",{className:"text-base tracking-[-0.011em] text-text-primary",children:"Can we use analytics cookies to see which pages actually help? They stay off unless you say yes."}),S.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-3",children:[S.jsx(Vo,{variant:"primary",onClick:()=>i(!0),children:"Allow"}),S.jsx(Vo,{variant:"secondary",onClick:()=>i(!1),children:"No thanks"}),S.jsx("a",{href:"/privacy/",target:"_blank",rel:"noopener noreferrer",className:"ml-auto inline-flex min-h-[44px] min-w-[44px] items-center text-sm text-primary hover:underline",children:"Privacy policy"})]})]})}function H2(){const{user:e,keptWorkNotice:t,dismissKeptWorkNotice:i}=Qn();if(!t||e)return null;const{items:a}=t,c=a===1?"item has":"items have";return S.jsx("div",{role:"status","aria-live":"polite",className:"bg-yellow-50 border-b border-yellow-200 px-4 py-2 text-sm text-warning",children:S.jsxs("div",{className:"flex items-center justify-center gap-2",children:[S.jsxs("p",{className:"text-center",children:["You're signed out. ",a," ",c," not uploaded yet, so ",a===1?"it is":"they are"," still on this device. Sign in again here to upload ",a===1?"it":"them","."]}),S.jsx("button",{type:"button",onClick:i,className:"shrink-0 p-2 min-w-[44px] min-h-[44px] flex items-center justify-center rounded hover:bg-yellow-100 transition-colors","aria-label":"Dismiss",children:S.jsx(jm,{size:14})})]})})}function F2(){const{profile:e,loading:t}=Qn();return Q.useMemo(()=>
34{const i=e?.subscriptionStatus,a=e?.effectiveTier??e?.subscriptionTier,c=H_(i,a),u=e?.trialEndsAt,f=new Date,m=u instanceof Date&&u.getTime()>f.getTime()&&(i==="trialing"||!c),h=m?Math.ceil((u.getTime()-f.getTime())/(1e3*60*60*24)):0;if(c||m){const b=c?F_(a):"individual",T={individual:"Pro",team:"Pro + Team",landlord:"Landlord",agent:"Agent"};return{tier:b,limits:ej(b),isPaid:!0,isFree:!1,isTrialing:m,trialDaysLeft:h,trialEndsAt:m?u:null,trialSpent:!1,trialHasCard:m&&e?.trialKind==="card",cardTrialAvailable:!1,planName:m?`${T[b]||"Pro"} Trial`:T[b]||"Pro",loading:t}}const v=e?.country||"GB",g=!!JU.find(b=>b.tier==="individual")?.pricing[v]?.monthlyPriceId;return{tier:null,limits:aA,isPaid:!1,isFree:!0,isTrialing:!1,trialDaysLeft:0,trialEndsAt:null,trialSpent:u instanceof Date&&u.getTime()<=f.getTime(),trialHasCard:!1,cardTrialAvailable:!!e&&!e?.cardTrialStartedAt&&g,planName:"Free",loading:t}},[e,t])}const G2=["disabled","exempt","paid","trial","admin","notice_window","gated"],Y2=["entitled","free_for_ever","purchased","correction","gated","withdrawn"];function KS(e){if(typeof e!="string"||!e)return null;const t=new Date(e);return Number.isNaN(t.getTime())?null:t}function CA(e){const t=e??{},i=t.reason;if(typeof t.enabled!="boolean"||typeof t.entitled!="boolean"||!G2.includes(i))throw new Error("delivery_status returned an unexpected shape");return{enabled:t.enabled,entitled:t.entitled,reason:i,launchedAt:KS(t.launched_at),noticeEndsAt:KS(t.notice_ends_at),cardTrialAvailable:t.card_trial_available===!0,purchasedLast30d:typeof t.purchased_last_30d=="number"?t.purchased_last_30d:0}}async function LA(){const{data:e,error:t}=await D.rpc("delivery_status");if(t)throw t;return CA(e)}async function MA(e){const t=new Map;if(e.length===0)return t;const{data:i,error:a}=await D.rpc("certificates_that_may_leave",{p_ids:e});if(a)throw a;for(const c of i??[])c.certificate_id&&Y2.includes(c.reason)&&t.set(c.certificate_id,c.reason);return t}const $2=10080*60*1e3,NA=e=>`certbox_delivery_status:${e}`;function X2(e,t,i=Date.now()){try{localStorage.setItem(NA(e),JSON.stringify({at:i,status:t}))}catch{}}function Q2(e,t=Date.now()){try{const i=localStorage.getItem(NA(e));if(!i)return null;const{at:a,status:c}=JSON.parse(i);return typeof a!="number"||t-a>$2||t<a?null:CA({...c,launched_at:c.launchedAt??null,notice_ends_at:c.noticeEndsAt??null,card_trial_available:c.cardTrialAvailable,purchased_last_30d:c.purchasedLast30d})}catch{return null}}function K2(e){return Object.freeze({certificateId:e})}const J2=["entitled","free_for_ever","purchased","correction"];function kA(e){const t=a=>({kind:"allowed",permit:K2(e.certificateId),certificateReason:e.certificateReason,accountEntitled:a}),i=(a,c)=>!a.enabled||a.entitled?t(!0):e.certificateReason&&J2.includes(e.certificateReason)?t(!1):e.certificateId&&e.certificateReason===null&&e.reasonLoading&&!c?{kind:"checking"}:{kind:"gated",offline:c,neverChecked:!1,cardTrialAvailable:a.cardTrialAvailable};return e.online?e.status?i(e.status,!1):e.statusLoading?{kind:"checking"}:e.certificateReason==="gated"?{kind:"gated",offline:!1,neverChecked:!1,cardTrialAvailable:!1}:t(!1):e.status?i(e.status,!0):e.remembered?i(e.remembered,!0):e.profilePaid?t(!0):{kind:"gated",offline:!0,neverChecked:!0,cardTrialAvailable:!1}}function PA(){const{user:e}=Qn(),t=Um(),i=e?.id??"",a=t0({queryKey:oi.deliveryStatus(i),queryFn:async()=>{const c=await LA();return X2(i,c),c},enabled:!!i,staleTime:6e4,retry:1});return Q.useEffect(()=>{if(!i)return;const c=()=>{t.invalidateQueries({queryKey:["deliveryStatus"]}),t.invalidateQueries({queryKey:["certificateDelivery"]})};return window.addEventListener(Cl,c),()=>window.removeEventListener(Cl,c)},[i,t]),a}function Mq(e,t={}){const{user:i}=Qn(),{isPaid:a}=F2(),{isOffline:c}=IA(),u=PA(),f=e??null,p=!!(u.data?.enabled&&!u.data.entitled),m=t0({queryKey:oi.certificateDelivery(f??""),queryFn:async()=>(await MA([f])).get(f)??null,enabled:!!f&&!!i?.id&&p,staleTime:6e4,retry:1}),h=i?.id??"",v=Q.useMemo(()=>c&&h?Q2(h):null,[c,h,u.dataUpdatedAt]),g=u.data??null,b=f?m.data??null:null,T=f?m.isLoading:!1;return Q.useMemo(()=>
34!f&&!t.pendingLocal?{kind:"checking"}:kA({certificateId:f,status:g,statusFailed:u.isError,statusLoading:u.isLoading,certificateReason:b,reasonLoading:T,online:!c,remembered:v,profilePaid:a}),[f,t.pendingLocal,g,u.isError,u.isLoading,b,T,c,v,a])}async function Nq(e,t,i){const a=ZU(i);if(!a)throw new Error("Buying a single certificate is not available in your country yet.");return w2(a.priceId,{singleCertificateId:e,returnTo:`/certificates/${e}?deliver=${t}`})}async function kq(e,t){const i=new Map;let a=null,c=new Map;try{a=await LA()}catch{}const u=!!(a&&a.enabled&&!a.entitled);if(u)try{c=await MA(e)}catch{}for(const f of e)i.set(f,kA({certificateId:f,status:a,statusLoading:!1,certificateReason:c.get(f)??(u?"gated":null),reasonLoading:!1,online:!0,remembered:null,profilePaid:t.profilePaid}));return i}function Q_(e,t){if(e.certificateId!==t)throw new Error("Delivery permit does not match this certificate")}function Pq(e,t,i,a){return Q_(e,t),Wj(i,a)}function Uq(e,t,i){return Q_(e,t),o2(t,i)}class W2 extends Error{constructor(){super("Sending certificates to customers needs Pro."),this.name="DeliveryNeedsProError"}}async function Z2(e){const t=e?.context;if(!(t instanceof Response))return null;try{const i=await t.clone().json();return typeof i.code=="string"?i.code:null}catch{return null}}async function jq(e,t,i,a){Q_(e,t);try{await Xj(t,i,a)}catch(c){const u=await Z2(c);throw u==="delivery_needs_pro"?new W2:u==="certificate_withdrawn"?new Error("CertBox has withdrawn this certificate, so it cannot be sent."):c}}function zq(e){return e!==null}const JS=(e,t)=>`certbox_delivery_notice_${t}_${e}`,e4=7;function t4(e){return Math.ceil((e.getTime()-Date.now())/864e5)}function n4(){const{data:e}=PA(),t=e?.noticeEndsAt??null,i=t?t.toISOString().slice(0,10):"",a=t?t4(t):0,c=a<=e4?"final":"early",[u,f]=Q.useState(()=>i?Xn("localStorage",JS(i,c))==="1":!1);if(!e?.enabled||e.reason!=="notice_window"||!t||a<=0||u)return null;const p=t.toLocaleDateString("en-GB",{day:"numeric",month:"long"}),m=()=>{mi("localStorage",JS(i,c),"1"),f(!0),Bo("delivery_notice_dismissed",{phase:c,daysLeft:a})};return S.jsx("div",{role:"status","aria-live":"polite",className:"bg-yellow-50 border-b border-yellow-200 px-4 py-2.5 print:hidden",children:S.jsxs("div",{className:"max-w-5xl mx-auto flex items-start gap-3",children:[S.jsxs("p",{className:"flex-1 min-w-0 text-sm text-text-primary",children:["From ",S.jsx("span",{className:"font-semibold",children:p}),", sending a certificate to your customer needs a paid plan: downloading, emailing, sharing or printing it. Filling them in and checking them stays free. Everything you make before then stays yours to send, for ever."," ",S.jsx(lO,{to:"/pricing",onClick:()=>Bo("upgrade_prompt_click",{feature:"delivery",surface:"notice_banner",daysLeft:a}),className:"text-primary underline",children:"See what Pro costs"})]}),S.jsx("button",{onClick:m,"aria-label":"Dismiss this notice",className:"shrink-0 min-w-[44px] min-h-[44px] -my-2 flex items-center justify-center text-text-secondary hover:text-text-primary",children:S.jsx(jm,{size:16})})]})})}function WS({children:e}){const{profile:t,loading:i}=Qn();return i?null:t?.isAdmin?S.jsx(S.Fragment,{children:e}):S.jsx(Hn,{to:"/",replace:!0})}const UA="s",r4="qr";function Bq(e){return`https://certbox.app/cert-verify/${encodeURIComponent(e)}?${UA}=${r4}`}function i4(e){try{const t=new URLSearchParams(e).get(UA);return t&&/^[a-z0-9_-]{1,16}$/i.test(t)?t:null}catch{return null}}const ZS="certbox_content_view_seen";function a4(){const{pathname:e,search:t}=n0();return Q.useEffect(()=>{if(!vU(e))return;const i=ZT(e),a=i4(t),c=a?`${i}?${a}`:i;try{const u=JSON.parse(sessionStorage.getItem(ZS)||"[]");if(u.includes(c))return;u.push(c),sessionStorage.setItem(ZS,JSON.stringify(u))}catch{}Bo("content_view",{path:i,...a?{source:a}:{}})},[e,t]),null}function s4(e){return e.loading?"loading":e.mfaPending?"send-to-login":e.user?"allow":"send-to-login"}async function Ll(){if(Jl()==="offline")return"offline";try{const{del:e}=await y(async()=>{const{del:t}=await Promise.resolve().then(()=>i0);return{del:t}},void 0);await e(So)}catch{}return window.location.replace("/"),null}const K_="You are offline, so restarting cannot fix this. Your saved work is still on this device - reconnect and try again.",o4=15e3,c4=3e4;function jA({children:e,label:t}){const[i,a]=Q.useState(!1),[c,u]=Q.useState(!1);return Q.useEffect(()=>{const f=setTimeout(()=>a(!0),o4),p=setTimeout(()=>{const m="certbox_auto_recover",h=Xn("sessionStorage",m),v=Date.now();h&&v-Number(h)<6e4||Jl()!=="offline"&&mi("sessionStorage",m,String(v))&&Ll()},c4);return()=>{clearTimeout(f),clearTimeout(p)}},[]),i?S.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background-secondary px-4",children:S.jsxs("div",{className:"text-center",children:[S.jsx("div",{className:"animate-spin h-8 w-8 border-2 border-primary border-t-transparent roun
34ded-full mx-auto mb-4"}),S.jsx("p",{className:"text-sm text-text-secondary mb-1",children:t||"Still loading..."}),S.jsx("p",{className:"text-sm text-text-secondary mb-4",children:"This is taking longer than expected."}),c&&S.jsx("p",{className:"text-sm text-text-secondary mb-4",children:K_}),S.jsx("button",{onClick:()=>{Ll().then(f=>u(f==="offline"))},className:"px-4 py-2 min-h-[44px] bg-primary text-white text-sm rounded-[6px] hover:bg-primary-dark transition-colors",children:"Restart app"})]})}):S.jsx(S.Fragment,{children:e})}const zA=F(()=>y(()=>import("./AppShell-C-RheLBE.js"),__vite__mapDeps([24,8,25,26,27,12,9,28,29,30,31,10,11])).then(e=>({default:e.AppShell}))),u4=F(()=>y(()=>import("./GoogleOneTap-DT9DEqVw.js"),__vite__mapDeps([32,8,9,10,11,12])).then(e=>({default:e.GoogleOneTap}))),l4=F(()=>y(()=>import("./LoginPage-D8tX3XjC.js"),__vite__mapDeps([33,8,34,35,12,36,37,10,31,9,11])).then(e=>({default:e.LoginPage}))),d4=F(()=>y(()=>import("./SignUpPage-CIj_hh-u.js"),__vite__mapDeps([38,8,34,35,12,36,37,10,31,39,29,40,30,41,42,9,11])).then(e=>({default:e.SignUpPage}))),f4=F(()=>y(()=>import("./AuthContinuePage-gKXcUvk3.js"),__vite__mapDeps([43,8,37,10,31,9,11,12])).then(e=>({default:e.AuthContinuePage}))),p4=F(()=>y(()=>import("./ResetPasswordPage-Baag0I7z.js"),__vite__mapDeps([44,8,34,35,12,37,10,31,9,11])).then(e=>({default:e.ResetPasswordPage}))),m4=F(()=>y(()=>import("./DashboardPage-DUJNAFtw.js"),__vite__mapDeps([45,8,25,40,37,10,31,13,46,47,48,49,12,9,50,42,29,1,41,51,52,53,54,11])).then(e=>({default:e.DashboardPage}))),_4=F(()=>y(()=>import("./DpaAcceptancePrompt-gRd23KIl.js"),__vite__mapDeps([55,8,9,10,11,12])).then(e=>({default:e.DpaAcceptancePrompt}))),h4=F(()=>y(()=>import("./ResumeProCheckout-B7W3SFgU.js"),__vite__mapDeps([56,8,29,9,10,11,12])).then(e=>({default:e.ResumeProCheckout}))),g4=F(()=>y(()=>import("./DpaAcceptancePrompt-gRd23KIl.js"),__vite__mapDeps([55,8,9,10,11,12])).then(e=>({default:e.RequireDpaAgreement})));function _r(e){return S.jsx(Q.Suspense,{fallback:null,children:S.jsx(g4,{children:e})})}const y4=F(()=>y(()=>import("./PropertiesPage-DaO6aeEm.js"),__vite__mapDeps([57,8,25,37,10,31,58,59,53,47,60,12,61,27,46,62,63,9,11])).then(e=>({default:e.PropertiesPage}))),v4=F(()=>y(()=>import("./AddPropertyPage-BAsIKnfr.js"),__vite__mapDeps([64,8,25,37,10,31,58,65,22,66,46,34,35,12,67,68,9,47,11])).then(e=>({default:e.AddPropertyPage}))),E4=F(()=>y(()=>import("./PropertyDetailPage-BRNEBANQ.js"),__vite__mapDeps([69,8,25,37,10,31,70,71,1,65,22,66,46,59,53,60,27,12,30,9,11])).then(e=>({default:e.PropertyDetailPage}))),S4=F(()=>y(()=>import("./CertificatesPage-Bzr4AC6f.js"),__vite__mapDeps([72,8,37,10,31,58,73,16,74,61,12,9,53,47,60,48,50,11])).then(e=>({default:e.CertificatesPage}))),b4=F(()=>y(()=>import("./AddCertificatePage-Sdx-wVXV.js"),__vite__mapDeps([75,8,37,10,31,58,76,65,22,77,46,19,18,20,21,23,50,78,9,11,12,34,35,67,40,25,79,47,42,52])).then(e=>({default:e.AddCertificatePage}))),T4=F(()=>y(()=>import("./CertificateDetailPage-CF14Ex_S.js"),__vite__mapDeps([80,8,48,37,10,31,58,16,17,70,81,73,74,61,12,9,82,83,84,85,86,87,65,22,77,46,19,59,53,27,88,89,90,34,35,1,25,91,23,68,29,30,11])).then(e=>({default:e.CertificateDetailPage}))),A4=F(()=>y(()=>import("./SearchPage-vXyg-Iax.js"),__vite__mapDeps([92,8,37,10,31,58,76,50,59,53,67,35,12,47,9,11])).then(e=>({default:e.SearchPage}))),R4=F(()=>y(()=>import("./AccountPage-CAqV4iS7.js"),__vite__mapDeps([93,8,29,27,5,14,9,10,11,12,37,31,34,35,1,67,21,59,53,40,49,15,94,95,46,96,47])).then(e=>({default:e.AccountPage}))),O4=F(()=>y(()=>import("./SharedCertificatePage-CaHL0OgJ.js"),__vite__mapDeps([97,8,37,10,31,59,53,27,83,84,85,98,12,9,11])).then(e=>({default:e.SharedCertificatePage}))),D4=F(()=>y(()=>import("./VerifyPropertyPage-Cox4TKWU.js"),__vite__mapDeps([99,8,37,10,31,59,53,27,12,9])).then(e=>({default:e.VerifyPropertyPage}))),w4=F(()=>y(()=>import("./LapsedAnswerPage-CQV8LsUg.js"),__vite__mapDeps([100,8,37,10,31,26,12,9,11])).then(e=>({default:e.LapsedAnswerPage}))),BA=F(()=>y(()=>import("./LandingPage--Aoofp8D.js"),__vite__mapDeps([101,8,10,37,31,39,102,103,26,12,9,104,47,42,11])).then(e=>({default:e.LandingPage}))),x4=F(()=>y(()=>import("./PricingPage-C8KJNe_m.js"),__vite__mapDeps([105,8,10,106,24,25,26,27,12,9,28,29,30,31,11,103,104,39,37])).then(e=>({default:e.PricingPage}))),I4=F(()=>y(()=>import("./CertificateInfoPage-CAfK-gUV.js"),__vite__mapDeps([107,8,10,103,26,12,9,104,39,31,108,37,29,21,79,47,11])).then(e=>({default:e.CertificateInfoPage}))),C4=F(()=>y(()=>import("./LettingAgentsPage-gPzn1If9.js"),__vite__mapDeps([109,8,10,103,26,12,9,104,39,31,37,110,11])).then(e=>({default:e.LettingAgentsPage}
34))),L4=F(()=>y(()=>import("./LandlordsPage-V_FXK-os.js"),__vite__mapDeps([111,8,10,103,26,12,9,104,39,31,37,110,11])).then(e=>({default:e.LandlordsPage}))),M4=F(()=>y(()=>import("./LandlordLegalRequirementsPage-qGf5YSds.js"),__vite__mapDeps([112,8,103,26,12,9,104,39,31,37,10,11])).then(e=>({default:e.LandlordLegalRequirementsPage}))),N4=F(()=>y(()=>import("./HolidayLetsPage-DGf3B5SU.js"),__vite__mapDeps([113,8,10,103,26,12,9,104,39,31,37,110,11])).then(e=>({default:e.HolidayLetsPage}))),k4=F(()=>y(()=>import("./CampervansPage-DJxUAa0q.js"),__vite__mapDeps([114,8,10,103,26,12,9,104,39,31,37,110,11])).then(e=>({default:e.CampervansPage}))),P4=F(()=>y(()=>import("./LegionellaPage--QO9wzov.js"),__vite__mapDeps([115,8,10,103,26,12,9,104,39,31,37,110,11])).then(e=>({default:e.LegionellaPage}))),U4=F(()=>y(()=>import("./GasEngineersPage-DSrOL9TY.js"),__vite__mapDeps([116,8,10,103,26,12,9,104,39,31,37,110,11])).then(e=>({default:e.GasEngineersPage}))),j4=F(()=>y(()=>import("./PlumbersPage-Bgm5inJ_.js"),__vite__mapDeps([117,8,10,103,26,12,9,104,39,31,37,110,11])).then(e=>({default:e.PlumbersPage}))),z4=F(()=>y(()=>import("./ElectriciansPage-D-7fZn96.js"),__vite__mapDeps([118,8,10,103,26,12,9,104,39,31,37,110,11])).then(e=>({default:e.ElectriciansPage}))),B4=F(()=>y(()=>import("./FireSafetyPage-D1k3lxkl.js"),__vite__mapDeps([119,8,10,103,26,12,9,104,39,31,37,110,11])).then(e=>({default:e.FireSafetyPage}))),V4=F(()=>y(()=>import("./HowItWorksPage-CQ7YztLj.js"),__vite__mapDeps([120,8,10,37,31,102,39,103,26,12,9,104,47,11])).then(e=>({default:e.HowItWorksPage}))),q4=F(()=>y(()=>import("./ComparisonPage-D75bS9qY.js"),__vite__mapDeps([121,8,10,103,26,12,9,104,39,31,108,37,122,110,11])).then(e=>({default:e.ComparisonPage}))),H4=F(()=>y(()=>import("./ComparisonsIndexPage-CXz7aj0L.js"),__vite__mapDeps([123,8,10,103,26,12,9,104,39,31,47,37,122,11])).then(e=>({default:e.ComparisonsIndexPage}))),F4=F(()=>y(()=>import("./FeaturesIndexPage-BXcAMg75.js"),__vite__mapDeps([124,8,37,10,31,103,26,12,9,104,39,47,125,11])).then(e=>({default:e.FeaturesIndexPage}))),G4=F(()=>y(()=>import("./FeatureInfoPage-BD--7nWK.js"),__vite__mapDeps([126,8,10,37,31,103,26,12,9,104,39,125,127,11])).then(e=>({default:e.FeatureInfoPage}))),Y4=F(()=>y(()=>import("./YourDataPage-BakQBJOk.js"),__vite__mapDeps([128,8,103,26,12,9,37,10,31,11])).then(e=>({default:e.YourDataPage}))),$4=F(()=>y(()=>import("./WhatsNewPage-DKpr8qnk.js"),__vite__mapDeps([129,8,103,26,12,9,104,39,31,37,10,11])).then(e=>({default:e.WhatsNewPage}))),X4=F(()=>y(()=>import("./AcsPortfolioGuidePage-BSjO9AXy.js"),__vite__mapDeps([130,8,10,103,26,12,9,47,104,39,31,131,132,108,37,11])).then(e=>({default:e.AcsPortfolioGuidePage}))),Q4=F(()=>y(()=>import("./GuidesListingPage-C99XMXRz.js"),__vite__mapDeps([133,8,106,24,25,26,27,12,9,28,29,30,31,10,11,103,104,39,47,37])).then(e=>({default:e.GuidesListingPage}))),K4=F(()=>y(()=>import("./AiFutureTradeCareersBlogPost-CLG67b9R.js"),__vite__mapDeps([134,8,10,103,26,12,9,47,108,104,39,31,37,131,132,11])).then(e=>({default:e.AiFutureTradeCareersBlogPost}))),J4=F(()=>y(()=>import("./CertificateDirectoryPage-Ul0dU-iT.js"),__vite__mapDeps([135,8,10,103,26,12,9,104,39,31,47,37,78,11,21,79])).then(e=>({default:e.CertificateDirectoryPage}))),W4=F(()=>y(()=>import("./PortfolioPage-BFzF3Bnx.js"),__vite__mapDeps([136,8,68,12,9,37,10,31,59,53,74,61,60,47,11])).then(e=>({default:e.PortfolioPage}))),Z4=F(()=>y(()=>import("./DownloadsPage-L2em0-mr.js"),__vite__mapDeps([137,8,37,10,31,12,9])).then(e=>({default:e.DownloadsPage}))),ez=F(()=>y(()=>import("./UsReferenceListingPage-DfJwB_cF.js"),__vite__mapDeps([138,8,103,26,12,9,104,39,31,108,10,37,139,11])).then(e=>({default:e.UsReferenceListingPage}))),tz=F(()=>y(()=>import("./UsReferenceGuidePage-CPT5ys1s.js"),__vite__mapDeps([140,8,10,103,26,12,9,104,39,31,108,132,37,139,78,11,21,79,47])).then(e=>({default:e.UsReferenceGuidePage}))),nz=F(()=>y(()=>import("./TradeSymbolsListingPage-BD04zc0_.js"),__vite__mapDeps([141,8,10,103,26,12,9,104,39,31,47,37,11])).then(e=>({default:e.TradeSymbolsListingPage}))),rz=F(()=>y(()=>import("./TradeSymbolGuidePage-CcxUKgjh.js"),__vite__mapDeps([142,8,10,132,103,26,12,9,104,39,31,108,37,11])).then(e=>({default:e.TradeSymbolGuidePage}))),iz=F(()=>y(()=>import("./RefrigerantReferencePage-BTYOEuok.js"),__vite__mapDeps([143,8,103,26,12,9,104,39,31,37,10,108,144,145,146,11])).then(e=>({default:e.RefrigerantReferencePage}))),az=F(()=>y(()=>import("./RefrigerantDetailPage-CqBSANNT.js"),__vite__mapDeps([147,8,10,103,26,12,9,104,39,31,37,145,108,144,146,11])).then(e=>({default:e.RefrigerantDetailPage}))),sz=F(()=>y(()=>import("./RefrigerantReplacementFinderPage-lxfBggaV.js"),__vite__mapDeps([148,8,103,26,12,9,104,39,31,37,10,108,144,145,11])).then(e=>({default:e.RefrigerantReplacementFinderPage}))),oz=F(()=>y(()=>import("./FGasTimelinePage-B4QTtvnG.js"),__vite__mapDeps([149,8,103,26,12,9,104,39,31,37,10,108,146,145,11])).then(e=>({default:e.FGasTimelinePage}))),cz=F(()=>y(()=>import("./HeatPumpRoutePage-Dc-iJzt9.js"),__vite__mapDeps([150,8,103,26,12,9,104,39,31,37,10,108,11])).then(e=>({default:e.HeatPumpRoutePage}))),uz=F(()=>y(()=>import("./ToolsIndexPage-DmbYAcam.js"),__vite__mapDeps([151,8,10,106,24,25,26,27,12,9,28,29,30,31,11,103,104,39,47,37,152])).then(e=>({default:e.ToolsIndexPage}))),lz=F(()=>y(()=>import("./GasRateCalculatorPage-CqNxadWO.js"),__vite__mapDeps([153,8,103,26,12,9,47,108,10,104,39,31,37,154,155,156,157,158,152,11])).then(e=>({default:e.GasRateCalculatorPage}))),dz=F(()=>y(()=>import("./CalculatorToolPage-CDSXJ6ks.js"),__vite__mapDeps([159,8,103,26,12,9,47,132,108,10,104,39,31,37,152,11])).then(e=>({default:e.FlueGasRatioCheckerPage}))),fz=F(()=>y(()=>import("./CalculatorToolPage-CDSXJ6ks.js"),__vite__mapDeps([159,8,103,26,12,9,47,132,108,10,104,39,31,37,152,11])).then(e=>({default:e.GasPipeSizingPage}))),pz=F(()=>y(()=>import("./CalculatorToolPage-CDSXJ6ks.js"),__vite__mapDeps([159,8,103,26,12,9,47,132,108,10,104,39,31,37,152,11])).then(e=>({default:e.FGasLeakCheckPage}))),Nm=F(()=>y(()=>import("./NotFoundPage-BZHNGl9O.js"),__vite__mapDeps([127,8,26,37,10,31,9,11,12])).then(e=>({default:e.NotFoundPage}
34))),mz=F(()=>y(()=>import("./AdminMetricsPage-DZbr3Zga.js"),__vite__mapDeps([160,8,47,12,9,10,11])).then(e=>({default:e.AdminMetricsPage}))),_z=F(()=>y(()=>import("./AdminArticlesPage-C9IgDiWL.js"),__vite__mapDeps([161,8,47,12,9,10,11])).then(e=>({default:e.AdminArticlesPage}))),hz=F(()=>y(()=>import("./TermsPage-B7enApTG.js"),__vite__mapDeps([162,8,37,10,31,9])).then(e=>({default:e.TermsPage}))),gz=F(()=>y(()=>import("./PrivacyPage-D7cdKeYJ.js"),__vite__mapDeps([163,8,37,10,31,9,11,12])).then(e=>({default:e.PrivacyPage}))),yz=F(()=>y(()=>import("./DpaPage-C-b89F13.js"),__vite__mapDeps([164,8,37,10,31,9])).then(e=>({default:e.DpaPage}))),vz=F(()=>y(()=>import("./DeleteDataPage-BptLr_oa.js"),__vite__mapDeps([165,8,37,10,31,9])).then(e=>({default:e.DeleteDataPage}))),Ez=F(()=>y(()=>import("./GenericCertFormPage-B4vdBxUx.js"),__vite__mapDeps([166,8,51,77,46,65,22,50,86,83,167,82,84,85,87,91,168,1,12,23,19,18,20,21,156,25,29,28,9,34,35,67,41,53,62,89,90,68,98,27,66,79,47,10,11]))),Sz=F(()=>y(()=>import("./JobsPage-DTB1calS.js"),__vite__mapDeps([169,8,37,10,31,168,71,47,59,53,60,48,12,9,11])).then(e=>({default:e.JobsPage}))),bz=F(()=>y(()=>import("./CreateJobPage-DQpKQp-H.js"),__vite__mapDeps([170,8,37,10,31,58,168,71,171,46,65,22,172,173,12,34,35,67,47,9,11])).then(e=>({default:e.CreateJobPage}))),Tz=F(()=>y(()=>import("./JobDetailPage-2Ca9dMoH.js"),__vite__mapDeps([174,8,37,10,31,168,71,175,176,171,46,65,22,27,177,14,9,11,12,158,157,85,88,61,89,90,178,5,34,35,179,6,67,59,53,50,30])).then(e=>({default:e.JobDetailPage}))),Az=F(()=>y(()=>import("./ClientsPage-Dabj2tKE.js"),__vite__mapDeps([180,8,37,10,31,168,47,60,46,62,12,63,9,11])).then(e=>({default:e.ClientsPage}
34))),Rz=F(()=>y(()=>import("./AddClientPage-D-C7eaMf.js"),__vite__mapDeps([181,8,37,10,31,65,22,172,46,34,35,12,47,9,11])).then(e=>({default:e.AddClientPage}))),Oz=F(()=>y(()=>import("./ClientDetailPage-Cb1j1xWD.js"),__vite__mapDeps([182,8,37,10,31,58,168,71,65,22,172,46,41,12,59,53,27,34,35,30,9,11])).then(e=>({default:e.ClientDetailPage}))),Dz=F(()=>y(()=>import("./QuotesPage-DaFzyJrP.js"),__vite__mapDeps([183,8,37,10,31,168,175,184,20,47,59,53,60,158,12,9,11])).then(e=>({default:e.QuotesPage}))),wz=F(()=>y(()=>import("./QuoteBuilderPage-Dp7GfCDd.js"),__vite__mapDeps([185,8,186,61,187,4,158,12,37,10,31,65,22,168,71,46,188,20,173,172,189,34,35,47,9,11])).then(e=>({default:e.QuoteBuilderPage}))),xz=F(()=>y(()=>import("./PendingQuotePage-Cq2FSJ5M.js"),__vite__mapDeps([190,8,20,47,158,12,9,10,11])).then(e=>({default:e.PendingQuotePage}))),Iz=F(()=>y(()=>import("./QuoteDetailPage-CbExcDQ5.js"),__vite__mapDeps([191,8,37,10,31,158,168,175,176,65,22,188,46,157,86,85,59,53,27,192,2,12,9,11])).then(e=>({default:e.QuoteDetailPage}))),Cz=F(()=>y(()=>import("./QuoteEditPage-CNUSJ70Q.js"),__vite__mapDeps([193,8,37,10,31,175,65,22,188,46,189,158,12,34,35,47,9,11])).then(e=>({default:e.QuoteEditPage}))),Lz=F(()=>y(()=>import("./QuoteAcceptPage-d7AnkRhs.js"),__vite__mapDeps([194,8,175,27,37,10,31,158,12,9,11])).then(e=>({default:e.QuoteAcceptPage}))),Mz=F(()=>y(()=>import("./InvoiceViewPage-CGckGfXu.js"),__vite__mapDeps([195,8,27,59,53,37,10,31,158,54,12,9,11])).then(e=>({default:e.InvoiceViewPage}))),Nz=F(()=>y(()=>import("./TimesheetsPage-CZPFuue2.js"),__vite__mapDeps([196,8,37,10,31,47,71,178,5,27,158,12,9,11])).then(e=>({default:e.TimesheetsPage}))),kz=F(()=>y(()=>import("./SchedulePage-BmKDlVKI.js"),__vite__mapDeps([197,8,37,10,31,7,9,11,12,168,71,47,59,53,60,171,46,65,22])).then(e=>({default:e.SchedulePage}))),Pz=F(()=>y(()=>import("./SubcontractorsPage-F-0otqoE.js"),__vite__mapDeps([198,8,37,10,31,199,3,179,6,65,22,63,47,34,35,12,27,59,53,67,9,11])).then(e=>({default:e.SubcontractorsPage}))),Uz=F(()=>y(()=>import("./PriceListPage-Bd_6rhYb.js"),__vite__mapDeps([200,8,37,10,31,199,187,4,65,22,47,34,35,12,27,158,9,11])).then(e=>({default:e.PriceListPage}))),jz=F(()=>y(()=>import("./InvoicesPage-DgXQmcIE.js"),__vite__mapDeps([201,8,37,10,31,168,176,184,20,47,59,53,60,54,30,12,158,9,11])).then(e=>({default:e.InvoicesPage}))),zz=F(()=>y(()=>import("./InvoiceBuilderPage-BxFvFCjD.js"),__vite__mapDeps([202,8,186,61,187,4,158,12,37,10,31,65,22,70,81,168,71,175,176,178,5,167,46,203,20,173,172,189,54,34,35,47,9,11])).then(e=>({default:e.InvoiceBuilderPage}))),Bz=F(()=>y(()=>import("./PendingCertificatePage-DF1uCF5f.js"),__vite__mapDeps([204,8,18,19,20,21,22,23,79,47,9,74,61,12,10,11])).then(e=>({default:e.PendingCertificatePage}))),Vz=F(()=>y(()=>import("./PendingInvoicePage-BzJMEY6M.js"),__vite__mapDeps([205,8,20,47,158,12,9,10,11])).then(e=>({default:e.PendingInvoicePage}))),qz=F(()=>y(()=>import("./InvoiceDetailPage-CbeNraxv.js"),__vite__mapDeps([206,8,37,10,31,158,168,176,94,46,65,22,203,54,95,96,157,86,85,59,53,27,192,2,12,9,11])).then(e=>({default:e.InvoiceDetailPage}))),Hz=F(()=>y(()=>import("./InvoiceEditPage-uGQk8kDp.js"),__vite__mapDeps([207,8,37,10,31,176,65,22,203,46,189,158,12,34,35,47,9,11])).then(e=>({default:e.InvoiceEditPage}))),Fz=F(()=>y(()=>import("./QbCallbackPage-CBznZd1Q.js"),__vite__mapDeps([208,8,95,46,9,10,11,12])).then(e=>({default:e.QbCallbackPage}))),Gz=F(()=>y(()=>import("./XeroCallbackPage-DhN5ylbo.js"),__vite__mapDeps([209,8,96,46,9,10,11,12])).then(e=>({default:e.XeroCallbackPage}))),Yz=F(()=>y(()=>import("./StripeCallbackPage-B4jv5ypb.js"),__vite__mapDeps([210,8,46,9,10,11,12])).then(e=>({default:e.StripeCallbackPage}))),$z=F(()=>y(()=>import("./CertificateVerifyPage-s-kE9065.js"),__vite__mapDeps([211,8,87,26,37,10,31,23,59,53,27,12,9,11])).then(e=>({default:e.CertificateVerifyPage}))),Xz=F(()=>y(()=>
34import("./TeamPage-DMm8EUeO.js"),__vite__mapDeps([212,8,37,10,31,34,35,12,47,27,59,53,7,9,11,68])).then(e=>({default:e.TeamPage}))),Qz=F(()=>y(()=>import("./AcceptInvitePage-BGFcpNsk.js"),__vite__mapDeps([213,8,37,10,31,7,9,11,12,27])).then(e=>({default:e.AcceptInvitePage}))),Kz=F(()=>y(()=>import("./ExpensesPage-CqDgBDD8.js"),__vite__mapDeps([214,8,37,10,31,71,177,14,9,11,12,27,47,158])).then(e=>({default:e.ExpensesPage}))),Jz=F(()=>y(()=>import("./AddExpensePage-BA7pddJ7.js"),__vite__mapDeps([215,8,14,9,10,11,12,71,177,27,90,37,31])).then(e=>({default:e.AddExpensePage})));function Wz({children:e}){const{user:t,loading:i,mfaPending:a}=Qn(),c=n0(),u=s4({user:t,loading:i,mfaPending:a});return u==="loading"?S.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background-secondary",children:S.jsxs("div",{className:"text-center",children:[S.jsx("div",{className:"text-base font-semibold text-primary mb-2",children:"CertBox"}),S.jsx("p",{className:"text-sm text-text-secondary",children:"Loading…"})]})}):u==="allow"?S.jsx(S.Fragment,{children:e}):S.jsx(Hn,{to:`/login?next=${encodeURIComponent(c.pathname+c.search)}`,replace:!0})}function Bu({children:e}){const{user:t,loading:i,mfaPending:a,recoveryMode:c}=Qn(),[u]=pO();return!i&&t&&!a&&!c?S.jsx(Hn,{to:Y_(u.get("next"),"/"),replace:!0}):S.jsx(S.Fragment,{children:e})}function Zz(){const e=window.location.pathname,t=`__guide_redirect_${e}`;return Xn("sessionStorage",t)?(jo("sessionStorage",t),S.jsx(Nm,{})):!mi("sessionStorage",t,"1")&&e.endsWith("/")?S.jsx(Nm,{}):(window.location.replace(e.endsWith("/")?e:e+"/"),null)}function eB(){const{signOut:e}=Qn(),[t,i]=Q.useState(!1),a=Q.useRef(!1);return Q.useEffect(()=>{a.current||(a.current=!0,e().finally(()=>i(!0)))},[e]),t?S.jsx(Hn,{to:"/",replace:!0}):S.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background-secondary",children:S.jsx("p",{className:"text-sm text-text-secondary",children:"Signing you out…"})})}function tB(){const e=new URLSearchParams(window.location.search);return e.set("type","GS-01"),S.jsx(Hn,{to:`/certificates/new/form?${e}`,replace:!0})}function nB(){const{user:e,loading:t,mfaPending:i}=Qn();return e&&!t&&!i?S.jsxs(zA,{children:[S.jsx(Q.Suspense,{fallback:null,children:S.jsx(h4,{})}),S.jsx(m4,{}),S.jsx(Q.Suspense,{fallback:null,children:S.jsx(_4,{})})]}):nA()&&t?S.jsx(jA,{label:"Signing you in...",children:S.jsx("div",{className:"min-h-screen flex items-center justify-center",children:S.jsx("div",{className:"animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full"})})}):S.jsx(BA,{})}class e0 extends Q.Component{state={hasError:!1,recoveryBlocked:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,i){console.error("Uncaught error:",t,i.componentStack),y(()=>import("./index-Dv7UZaVN.js"),__vite__mapDeps([216,8,9,10,11,12])).then(a=>{a.captureException(t,{contexts:{react:{componentStack:i.componentStack??""}}})}).catch(()=>{}),y(async()=>{const{trackReactError:a}=await Promise.resolve().then(()=>l0);return{trackReactError:a}},void 0).then(({trackReactError:a})=>{a(t,{componentStack:i.componentStack})}).catch(()=>{})}handleReload=()=>{Ll().then(t=>{t==="offline"&&this.setState({recoveryBlocked:!0})})};render(){if(this.state.hasError){const t=this.state.recoveryBlocked?"offline":Jl();return S.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background-secondary px-4",children:S.jsxs("div",{className:"text-center",children:[S.jsx("h1",{className:"text-xl font-semibold tracking-[-0.017em] text-text-primary mb-2",children:"App error"}),S.jsx("p",{className:"text-sm text-text-secondary mb-2",children:"Something went wrong. Your draft certificates are saved on this device."}),t==="offline"?S.jsx("p",{className:"text-sm text-text-secondary mb-4",children:K_}):t==="rate-limited"?S.jsx("p",{className:"text-sm text-text-secondary mb-4",children:"The app already tried to reload itself a moment ago. Tap below to try again."}):S.jsx("p",{className:"text-sm text-text-secondary mb-4",children:"Tap below to reload - this usually fixes it."}),S.jsx("button",{onClick:this.handleReload,className:"min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 bg-primary text-white text-sm rounded-[6px] hover:bg-primary-dark transition-colors",children:"Reload app"})]})})}return this.props.children}}function rB(){const[e,t]=Q.useState(!1);return S.jsx(jA,{label:"Loading page...",children:S.jsx(V2,{label:e?K_:"Loading...",onRetry:()=>{Ll().then(i=>t(i==="offline"))}})})}function iB(){return S.jsxs(S.Fragment,{children:[S.jsx(a4,{}),S.jsx(Q.Suspense,{fallback:S.jsx(rB,{}),children:S.jsxs(fO,{children:[S.jsx(V,{path:"/",element:S.jsx(nB,{})}),S.jsx(V,{path:"/dashboard",element:S.jsx(Hn,{to:"/",replace:!0})}),S.jsx(V,{path:"/shared/:token",element:S.jsx(O4,{})}),S.jsx(V,{path:"/verify/:token",element:S.jsx(D4,{})}),S.jsx(V,{path:"/answer/:token",element:S.jsx(w4,{})}),S.jsx(V,{path:"/landing",element:S.jsx(Bu,{children:S.jsx(BA,{})})}),S.jsx(V,{path:"/pricing",element:S.jsx(x4,{})}),S.jsx(V,{path:"/upgrade",element:S.jsx(Hn,{to:"/pricing",replace:!0})}),S.jsx(V,{path:"/checkout",element:S.jsx(Hn,{to:"/pricing",replace:!0})}),S.jsx(V,{path:"/billing",element:S.jsx(Hn,{to:"/account",replace:!0})}),S.jsx(V,{path:"/login",element:S.jsx(Bu,{children:S.jsx(l4,{})})}),S.jsx(V,{path:"/signup",element:S.jsx(Bu,{children:S.jsx(d4,{})})}),S.jsx(V,{path:"/reset-password",element:S.jsx(Bu,{children:S.jsx(p4,{})})}),S.jsx(V,{path:"/auth/continue",element:S.jsx(f4,{})}),S.jsx(V,{path:"/logout",element:S.jsx(eB,{})}),S.jsx(V,{path:"/terms",element:S.jsx(hz,{})}),S.jsx(V,{path:"/privacy",element:S.jsx(gz,{})}),S.jsx(V,{path:"/dpa",element:S.jsx(yz,{})}),S.jsx(V,{path:"/delete-my-certbox-data",element:S.jsx(vz,{})}),S.jsx(V,{path:"/letting-agents",element:S.jsx(C4,{})}),S.jsx(V,{path:"/landlords",element:S.jsx(L4,{})}),S.jsx(V,{path:"/landlord-legal-requirements",element:S.jsx(M4,{})}),S.jsx(V,{path:"/holiday-lets",element:S.jsx(N4,{})}),S.jsx(V,{path:"/campervans",element:S.jsx(k4,{})}),S.jsx(V,{path:"/legionella",element:S.jsx(P4,{})}),S.jsx(V,{path:"/plumbers",element:S.jsx(j4,{})}),S.jsx(V,{path:"/fire-safety",element:S.jsx(B4,{})}),S.jsx(V,{path:"/how-it-works",element:S.jsx(V4,{})}),S.jsx(V,{path:"/compare",element:S.jsx(H4,{})}),S.jsx(V,{path:"/compare/:slug",element:S.jsx(q4,{})}),S.jsx(V,{path:"/your-data",element:S.jsx(Y4,{})}),S.jsx(V,{path:"/whats-new",element:S.jsx($4,{})}),S.jsx(V,{path:"/gas-engineers",element:S.jsx(U4,{})}),S.jsx(V,{path:"/heat-pump-installer-route",element:S.jsx(cz,{})}),S.jsx(V,{path:"/electricians",element:S.jsx(z4,{})}),S.jsx(V,{path:"/guides/acs-portfolio",element:S.jsx(X4,{})}),S.jsx(V,{path:"/guides/ai-future-trade-careers",element:S.jsx(K4,{})}),S.jsx(V,{path:"/guides",element:S.jsx(Q4,{})}),S.jsx(V,{path:"/guides/*",element:S.jsx(Zz,{})}),S.jsx(V,{path:"/browse-certificates",element:S.jsx(J4,{})}),S.jsx(V,{path:"/certificate/:slug",element:S.jsx(I4,{})}),S.jsx(V,{path:"/features",element:S.jsx(F4,{})}),S.jsx(V,{path:"/features/:slug",element:S.jsx(G4,{})}
34),S.jsx(V,{path:"/symbols",element:S.jsx(nz,{})}),S.jsx(V,{path:"/symbols/:slug",element:S.jsx(rz,{})}),S.jsx(V,{path:"/reference",element:S.jsx(ez,{})}),S.jsx(V,{path:"/reference/:slug",element:S.jsx(tz,{})}),S.jsx(V,{path:"/refrigerants",element:S.jsx(iz,{})}),S.jsx(V,{path:"/refrigerants/replacements",element:S.jsx(sz,{})}),S.jsx(V,{path:"/refrigerants/f-gas-timeline",element:S.jsx(oz,{})}),S.jsx(V,{path:"/refrigerants/:slug",element:S.jsx(az,{})}),S.jsx(V,{path:"/quote/:id",element:S.jsx(Lz,{})}),S.jsx(V,{path:"/invoice/:id",element:S.jsx(Mz,{})}),S.jsx(V,{path:"/downloads",element:S.jsx(Z4,{})}),S.jsx(V,{path:"/tools",element:S.jsx(uz,{})}),S.jsx(V,{path:"/tools/gas-rate-calculator",element:S.jsx(lz,{})}),S.jsx(V,{path:"/tools/flue-gas-ratio-checker",element:S.jsx(dz,{})}),S.jsx(V,{path:"/tools/gas-pipe-sizing",element:S.jsx(fz,{})}),S.jsx(V,{path:"/tools/f-gas-leak-check",element:S.jsx(pz,{})}),S.jsx(V,{path:"/cert-verify/:certId",element:S.jsx($z,{})}),S.jsx(V,{path:"/invite/:token",element:S.jsx(Qz,{})}),S.jsxs(V,{element:S.jsx(Wz,{children:S.jsx(zA,{})}),children:[S.jsx(V,{path:"/properties",element:S.jsx(y4,{})}),S.jsx(V,{path:"/properties/new",element:_r(S.jsx(v4,{}))}),S.jsx(V,{path:"/properties/:id",element:S.jsx(E4,{})}),S.jsx(V,{path:"/portfolio",element:S.jsx(W4,{})}),S.jsx(V,{path:"/certificates",element:S.jsx(S4,{})}),S.jsx(V,{path:"/certificates/new",element:_r(S.jsx(b4,{}))}),S.jsx(V,{path:"/certificates/new/form",element:_r(S.jsx(Ez,{}))}),S.jsx(V,{path:"/certificates/new/cp12",element:S.jsx(tB,{})}),S.jsx(V,{path:"/certificates/pending/:localId",element:S.jsx(Bz,{})}),S.jsx(V,{path:"/certificates/:id",element:S.jsx(T4,{})}),S.jsx(V,{path:"/jobs",element:S.jsx(Sz,{})}),S.jsx(V,{path:"/jobs/new",element:_r(S.jsx(bz,{}))}),S.jsx(V,{path:"/jobs/:id",element:S.jsx(Tz,{})}),S.jsx(V,{path:"/clients",element:S.jsx(Az,{})}),S.jsx(V,{path:"/clients/new",element:_r(S.jsx(Rz,{}))}),S.jsx(V,{path:"/clients/:id",element:S.jsx(Oz,{})}),S.jsx(V,{path:"/quotes",element:S.jsx(Dz,{})}),S.jsx(V,{path:"/quotes/new",element:_r(S.jsx(wz,{}))}),S.jsx(V,{path:"/quotes/pending/:localId",element:S.jsx(xz,{})}),S.jsx(V,{path:"/quotes/:id",element:S.jsx(Iz,{})}),S.jsx(V,{path:"/quotes/:id/edit",element:_r(S.jsx(Cz,{}))}),S.jsx(V,{path:"/timesheets",element:S.jsx(Nz,{})}),S.jsx(V,{path:"/schedule",element:S.jsx(kz,{})}),S.jsx(V,{path:"/subcontractors",element:S.jsx(Pz,{})}),S.jsx(V,{path:"/price-list",element:S.jsx(Uz,{})}),S.jsx(V,{path:"/invoices",element:S.jsx(jz,{})}),S.jsx(V,{path:"/invoices/new",element:_r(S.jsx(zz,{}))}),S.jsx(V,{path:"/invoices/pending/:localId",element:S.jsx(Vz,{})}),S.jsx(V,{path:"/invoices/:id",element:S.jsx(qz,{})}),S.jsx(V,{path:"/invoices/:id/edit",element:_r(S.jsx(Hz,{}))}),S.jsx(V,{path:"/search",element:S.jsx(A4,{})}),S.jsx(V,{path:"/business",element:S.jsx(Xz,{})}),S.jsx(V,{path:"/team",element:S.jsx(Hn,{to:"/business",replace:!0})}),S.jsx(V,{path:"/expenses",element:S.jsx(Kz,{})}),S.jsx(V,{path:"/expenses/new",element:S.jsx(Jz,{})}),S.jsx(V,{path:"/account",element:S.jsx(R4,{})}),S.jsx(V,{path:"/admin",element:S.jsx(WS,{children:S.jsx(mz,{})})}),S.jsx(V,{path:"/admin/articles",element:S.jsx(WS,{children:S.jsx(_z,{})})}),S.jsx(V,{path:"/account/quickbooks/callback",element:S.jsx(Fz,{})}),S.jsx(V,{path:"/account/xero/callback",element:S.jsx(Gz,{})}),S.jsx(V,{path:"/account/stripe/callback",element:S.jsx(Yz,{})})]}),S.jsx(V,{path:"*",element:S.jsx(Nm,{})})]})})]})}function aB(){return S.jsx(e0,{children:S.jsx(dO,{children:S.jsx(M2,{children:S.jsxs(L2,{children:[S.jsx(Q.Suspense,{fallback:null,children:S.jsx(u4,{})}),S.jsxs(e0,{children:[S.jsx(j2,{}),S.jsx(H2,{}),S.jsx(n4,{}),S.jsx(q2,{}),S.jsx(iB,{})]})]})})})})}$3();u0();JT();SU();Ji.setOnline(navigator.onLine);CU();navigator.storage?.persist?.().catch(()=>{});PU();const sB=new oO({defaultOptions:{queries:{staleTime:300*1e3,gcTime:1e3*60*60*24,refetchOnWindowFocus:!1,retry:(e,t)=>{const i=t?.message??"",a=t?.code??"";return a==="42501"||a==="PGRST301"||i.includes("permission denied")||t?.name==="AbortError"||i.includes("abort")||i.includes("timeout")?!1:e<1},networkMode:"offlineFirst"},mutations:{networkMode:"offlineFirst",onError:e=>{const t=e?.message??"";(e?.name==="AbortError"||t.includes("Failed to fetch")||t.includes("NetworkError"))&&LU()}}}}),oB=NO(),km=document.getElementById("root");document.getElementById("ssr-cloak")?.remove();const Pm=window.location.pathname.replace(/\/$/,"")||"/",cB=new Set(["/","/
34pricing","/terms","/privacy","/letting-agents","/electricians","/gas-engineers","/fire-safety","/plumbers","/landlords","/browse-certificates","/guides","/guides/acs-portfolio","/guides/ai-future-trade-careers","/downloads"]),uB=cB.has(Pm)||Pm.startsWith("/certificate/"),lB=Pm==="/"&&nA();km.children.length>0&&(!uB||lB)&&(km.textContent="");AO.createRoot(km).render(S.jsx(Q.StrictMode,{children:S.jsx(cO,{client:sB,persistOptions:{persister:oB,maxAge:1e3*60*60*24,buster:"muflez73",dehydrateOptions:{shouldDehydrateQuery:e=>e.state.status==="success"&&!kO(e.state.data)}},children:S.jsx(mO,{children:S.jsx(aB,{})})})}));export{t5 as $,hq as A,Sq as B,br as C,z5 as D,q5 as E,Y5 as F,Q5 as G,S5 as H,IV as I,nq as J,cq as K,_5 as L,e2 as M,c2 as N,TA as O,wm as P,o5 as Q,$j as R,i2 as S,JV as T,Kj as U,Fj as V,ZV as W,I5 as X,N5 as Y,u2 as Z,xV as _,NV as a,c5 as a$,Wj as a0,MV as a1,fq as a2,vq as a3,lq as a4,uq as a5,dq as a6,_2 as a7,U5 as a8,gq as a9,r2 as aA,v5 as aB,yq as aC,aq as aD,_A as aE,O5 as aF,iq as aG,x5 as aH,b5 as aI,Xj as aJ,u5 as aK,s2 as aL,r5 as aM,G5 as aN,i5 as aO,l5 as aP,a5 as aQ,L5 as aR,_q as aS,j5 as aT,g5 as aU,fj as aV,tq as aW,p5 as aX,d5 as aY,V5 as aZ,E5 as a_,B5 as aa,H5 as ab,$5 as ac,P5 as ad,l2 as ae,WV as af,h2 as ag,d2 as ah,m2 as ai,A5 as aj,n2 as ak,LV as al,lj as am,pj as an,pA as ao,pq as ap,rq as aq,Z5 as ar,sq as as,W5 as at,J5 as au,p2 as av,e5 as aw,D5 as ax,PV as ay,w5 as az,n5 as b,rj as b$,m5 as b0,Qn as b1,nA as b2,g2 as b3,D as b4,Y_ as b5,Vo as b6,Bo as b7,JU as b8,Xn as b9,IA as bA,PA as bB,aV as bC,iV as bD,Nq as bE,RV as bF,QU as bG,mi as bH,pV as bI,vV as bJ,EV as bK,SV as bL,VO as bM,jo as bN,yV as bO,mV as bP,Im as bQ,hV as bR,gV as bS,_V as bT,GV as bU,Y as bV,F_ as bW,$V as bX,Mq as bY,zq as bZ,xq as b_,w2 as ba,R2 as bb,F2 as bc,aA as bd,Si as be,V2 as bf,HV as bg,oi as bh,vA as bi,H_ as bj,ZU as bk,rV as bl,Oq as bm,Dq as bn,Ot as bo,y as bp,sA as bq,ps as br,wl as bs,wr as bt,G_ as bu,yA as bv,tV as bw,eV as bx,F as by,jU as bz,C5 as c,ee as c$,tj as c0,bq as c1,mA as c2,U2 as c3,VU as c4,kq as c5,Pq as c6,AV as c7,bs as c8,C3 as c9,BV as cA,zV as cB,wj as cC,Tq as cD,FV as cE,qV as cF,VV as cG,YV as cH,EA as cI,jq as cJ,W2 as cK,Bq as cL,KV as cM,Uq as cN,JB as cO,ZB as cP,WB as cQ,bA as cR,Nj as cS,QV as cT,kj as cU,XV as cV,UV as cW,DV as cX,iw as cY,yx as cZ,lb as c_,L3 as ca,JT as cb,OV as cc,N2 as cd,nV as ce,TV as cf,bV as cg,Cq as ch,cV as ci,uV as cj,lV as ck,dV as cl,fV as cm,oV as cn,a_ as co,KB as cp,Lq as cq,Ij as cr,xm as cs,KU as ct,sV as cu,Rq as cv,j2 as cw,wq as cx,Iq as cy,Aq as cz,k5 as d,gr as d$,G as d0,UD as d1,Ww as d2,Ei as d3,Zp as d4,Ne as d5,zB as d6,HO as d7,aI as d8,Te as d9,hs as dA,X0 as dB,gs as dC,im as dD,jB as dE,_t as dF,TD as dG,Ue as dH,$i as dI,pn as dJ,na as dK,Yb as dL,sw as dM,MB as dN,UB as dO,qB as dP,DB as dQ,AI as dR,Ob as dS,$b as dT,Gi as dU,Z0 as dV,Px as dW,kx as dX,hB as dY,vB as dZ,yB as d_,Cr as da,ns as db,fE as dc,bb as dd,Nl as de,Ln as df,Io as dg,Zt as dh,Yp as di,bw as dj,Et as dk,Qm as dl,Rr as dm,Dt as dn,D0 as dp,fi as dq,oE as dr,qe as ds,Pt as dt,Ve as du,Jt as dv,BB as dw,ts as dx,VB as dy,TB as dz,mq as e,$B as e$,vr as e0,Qb as e1,Kb as e2,di as e3,fL as e4,bB as e5,fn as e6,bt as e7,Wm as e8,en as e9,iM as eA,uI as eB,FT as eC,NL as eD,kL as eE,nb as eF,Qx as eG,VI as eH,qI as eI,m_ as eJ,NB as eK,YB as eL,Yx as eM,DL as eN,TM as eO,XB as eP,Fu as eQ,DD as eR,Eb as eS,cM as eT,_M as eU,Kx as eV,I3 as eW,u3 as eX,$w as eY,PB as eZ,EM as e_,OB as ea,kt as eb,e_ as ec,Nn as ed,RB as ee,dM as ef,fM as eg,h_ as eh,vs as ei,jl as ej,R3 as ek,O3 as el,Rn as em,D3 as en,YI as eo,$m as ep,$n as eq,Xw as er,jL as es,QL as et,tM as eu,Rp as ev,TL as ew,kB as ex,AB as ey,Ex as ez,f2 as f,FB as f0,GB as f1,QD as f2,i3 as f3,eb as f4,LB as f5,Lx as f6,xB as f7,wB as f8,gw as f9,CB as fa,IB as fb,tb as fc,SB as fd,FD as fe,Tw as ff,LE as fg,EB as fh,HB as fi,gB as fj,QB as fk,jV as fl,F5 as g,dj as h,wV as i,eq as j,R5 as k,t2 as l,y5 as m,Yj as n,Eq as o,X5 as p,T5 as q,h5 as r,CV as s,oq as t,K5 as u,o2 as v,kV as w,s5 as x,f5 as y,M5 as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.