1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/terms-of-service.lazy-BzBDnhVC.js","assets/LegalPageLayout--fxVYPV1.js","assets/Footer-Cl6RVF4d.js","assets/privacy-policy.lazy-OCQd-UBo.js","assets/pricing.lazy-Ca4lN20S.js","assets/logout.lazy-DKlWGWXN.js","assets/native-launch-BoPzUomS.js","assets/home.lazy-CjCyXpPP.js","assets/NativeLaunch-CPcTmTBG.js","assets/MarketingShell-BibXB69c.js","assets/prices-ZTe5n38u.js","assets/poster-light-BUhBfYU2.js","assets/MarketingShell-BqH9Y1AS.css","assets/for-recruiters.lazy-DJodvDUs.js","assets/FaqDetails-BbCmLzam.js","assets/faqs-CAqznNhT.js","assets/for-candidates.lazy-CE3ype5q.js","assets/employer-terms.lazy-WM5fQ0Dr.js","assets/cookie-policy.lazy-D_VdcNL1.js","assets/contact.lazy-CWuKeshC.js","assets/community-standards-summary.lazy-x2-r6pzX.js","assets/community-standards.lazy-BpbpQbam.js","assets/careers.lazy-uwWgDEO5.js","assets/rocket-DSoFTKzX.js","assets/heart-DO2CxCvb.js","assets/account-disabled.lazy-D2G-i4wJ.js","assets/account-apis-DFwnm14o.js","assets/alert-circle-BgPekcq1.js","assets/acceptable-use-policy.lazy-C407W18I.js","assets/about.lazy-0nEGv26U.js","assets/index.lazy-h15H-Yoj.js","assets/redeem.lazy-Dx8HXagm.js","assets/PublicFooter-CqDdNQ11.js","assets/PublicNavbar-jpyHZe-p.js","assets/avatar-DRxsPhYg.js","assets/org-onboarding.lazy-BfDQ-zat.js","assets/step-indicator-BetfHOYi.js","assets/team-members-uH15oytw.js","assets/CultureValuesStep-CcB-7OSx.js","assets/CultureValuesEditor-CJamO5lr.js","assets/confirm-delete-dialog-CcVKnigs.js","assets/info-CSUG1NqV.js","assets/search-x-CjccI0o8.js","assets/tooltip-Bsh7qjGa.js","assets/create-org.lazy-BBkXd40s.js","assets/JobPortal.lazy-OXaWB0yJ.js","assets/rotate-ccw-DBBjJCWw.js","assets/sliders-horizontal-f_1T8stB.js","assets/saved-searches.lazy-8b57UeUI.js","assets/saved-searches-apis-B9Bc-Xif.js","assets/savedSearchSeed-DZEkS7-B.js","assets/ActivityPageHeader-BGVutuPU.js","assets/bookmark--vwaHjgi.js","assets/clock-3-DcjFkejF.js","assets/SaveSearchDialog-B8Gl3gsr.js","assets/jobAlertCriteria-CsC1YOE1.js","assets/map-pin-DiCVwn8t.js","assets/bell-ring-DYfLPq3R.js","assets/summarizeFilters-BIQpnySK.js","assets/exploreJobsFilterStore-Y4XUSJ7A.js","assets/saved-jobs.lazy-BECwQxZo.js","assets/JobCardSkeleton-BWeQcoWe.js","assets/jobShared-o2v6iG-K.js","assets/MatchReportDialog-CdZm9F5X.js","assets/use-ranking-dev-hZNcXqWF.js","assets/use-mobile-B-EF9v2F.js","assets/CVSelectionModal-wJiKQVwS.js","assets/InsufficientCreditsCopy-BswzSu0x.js","assets/LengthSelector-DNGlgm0Y.js","assets/hero-images-DwkhtOPN.js","assets/practice-interview-apis-BvGKDTf0.js","assets/bell-off-Dv_GX9j3.js","assets/clock-D4tkBG6G.js","assets/message-square-CN2C5Gkb.js","assets/InsufficientCreditsDialog-hMsWjTsA.js","assets/prod-jobs-actions-BDspo_QD.js","assets/usePracticeInterviewLaunch-CX-mFS1Z.js","assets/jobFacts-uaK22hhM.js","assets/lightbulb-Bb150vGz.js","assets/file-pen-BoTXqngt.js","assets/CompanyLogo-CWC-ciq_.js","assets/ShareJobButton-ChJ2CpGn.js","assets/index-DmKkFovj.js","assets/job-share-apis-DJu16uWs.js","assets/mail-DVrsqgN6.js","assets/banknote-YLodEXh5.js","assets/skeleton-CZ52oAcG.js","assets/storedScore-DauGNk2j.js","assets/PracticeComingSoon-Cur6TKo8.js","assets/onboarding-chat-apis-Dg1dUJ3O.js","assets/deltas-BEoNnIn8.js","assets/useResourceCostConfirmation-DYvsSU1b.js","assets/user-cog-BM4Q6vKv.js","assets/pendingAutoApply-DY50MSC-.js","assets/react-pdf.browser-CQiqw-jl.js","assets/index-D0UyVEDn.js","assets/cv-display-BNVdk2eh.js","assets/useOnePageCv-DMLvkEo4.js","assets/ResumePDFDocument-BDtkGNV3.js","assets/ResumeDocxDocument-C_vF4I05.js","assets/index-D7thAg6q.js","assets/parsedCvToFormData-Dd6N5k-n.js","assets/useWittyLine-BBOh3EE7.js","assets/JobDetailSheet-CJl-Vp8h.js","assets/purify.es-Cx4rtWv4.js","assets/layers-DFhddZmL.js","assets/building-2-CfSP8rk7.js","assets/graduation-cap-jLzkFSqL.js","assets/badge-check-DDi_Cgnj.js","assets/star-CS16awKF.js","assets/revenuecat-funnel-auth.lazy-CsEzC76L.js","assets/shield-check-BhZSLG4G.js","assets/recently-viewed.lazy-Dz9BGSmO.js","assets/profile.lazy-Dv3Od5JZ.js","assets/interview-history-apis-D2bFQnN3.js","assets/useProfileAvatar-DTHvuUVe.js","assets/camera-x05uh6tu.js","assets/ProfileSection-BoW4xGqd.js","assets/profileItems-DV3xTxem.js","assets/fingerprint-DjyzQ15l.js","assets/settings-2-DirIWM_o.js","assets/history-pOeqkNwi.js","assets/useEnh
1anceCv-BChB49bE.js","assets/useCvParse-DQNAvlCx.js","assets/profileErrors-CgR3-9mr.js","assets/display-date-CccXeRDy.js","assets/profileCounts-RcI58rGX.js","assets/notifications.lazy-DV0a73fr.js","assets/check-check-DvkwAvqS.js","assets/notification-preferences.lazy-qic4MatO.js","assets/my-activity.lazy-SEGrbII_.js","assets/interview-history.lazy-BWSN2Lvz.js","assets/interview-score-J6QmC5bx.js","assets/calendar-6iRZHzuI.js","assets/timer-Dgwmqv1S.js","assets/get-started.lazy-HezrB1Tc.js","assets/cv-intent-DUno79L2.js","assets/EnhanceProcessing-Bpg258Vw.js","assets/index.es-BQx_uyxU.js","assets/index-ChqOENst.js","assets/pencil-line-I6R9UZvl.js","assets/polishingStore-Bn0audxs.js","assets/dashboard.lazy-BhCxq0UN.js","assets/ShowingJobsInBanner-DuzrPj7B.js","assets/dashboardFeedLocation-D7rr6QZ6.js","assets/clipboard-list-BdO-gTfO.js","assets/WorkTypeDonut-BrUDmNN_.js","assets/PolarAngleAxis-B4mARRNh.js","assets/useRecommendationFeed-CSAqvMlA.js","assets/PolishingCvChip-DyEz9E4g.js","assets/InterviewNowSection-Dmkas68_.js","assets/CvPickerDialog-D218y6VZ.js","assets/AskBeforeMatches-Bx26yJXm.js","assets/candidate-job-titles-apis-Bgdn8ASx.js","assets/CountryMultiSelect-DR2UkKO-.js","assets/usePickedJobs-OkyAxPpp.js","assets/dailyAutoApplySettings-BmUNI7wc.js","assets/cover-letter.lazy-Cu6bjCAI.js","assets/download-outcome-VJ9VH_Z3.js","assets/CoverLetterPDFDocument-CGisj_fp.js","assets/templates-QN8tFbvp.js","assets/CoverLetterHTMLPreview-CGN2Y4oo.js","assets/candidate-billing.lazy-BbvWLlWd.js","assets/auto-apply-mailbox.lazy-BaS4zgG3.js","assets/auto-apply-activity.lazy-zq7QTslr.js","assets/RunDetailSheet-EhdgO4SY.js","assets/urls-Dpy4Y14n.js","assets/play-circle-CWMY5nSz.js","assets/runStatusLabels-DBpyI8L6.js","assets/radio-BSAVU_KX.js","assets/applications.lazy-C0ndLYTE.js","assets/jobHistory-C-8D4r2Y.js","assets/shield-alert-DX9lSznA.js","assets/traits.lazy-BIgi-66P.js","assets/CreateTraits-LvVqRNLv.js","assets/overview.lazy--CkAfW1G.js","assets/org-overview-apis-BK0u9t-r.js","assets/file-plus-2-DX4N2DSX.js","assets/org-settings.lazy-DvYgL3f0.js","assets/interview-language-BKrnS_rj.js","assets/my-profile.lazy-XxMkJbSt.js","assets/invite-user.lazy--1aQJQsR.js","assets/create-rubrics.lazy-DnDa_4O3.js","assets/FormLayout-4iFLysSL.js","assets/create-jd-v2.lazy-Cu1N-HgK.js","assets/useRequirements-QOzKBh3H.js","assets/file-utils-Dzz95H6U.js","assets/salary-budget-apis-NfbwVDp5.js","assets/DreamSelectionControl-D9b0sR2d.js","assets/jd-processing-BUHGP_pM.js","assets/useEvaluationCriteria-DdV3wUug.js","assets/list-checks-DRt_hXbw.js","assets/user-plus-3cxnOCmy.js","assets/create-jd.lazy-ByB2l6T0.js","assets/Confirmation-CxIQshnW.js","assets/billing.lazy-CB7zEEnD.js","assets/alert-CNdKIX_W.js","assets/chevron-left-B4TmET4p.js","assets/onboarding.lazy-CtEoLety.js","assets/arrow-down-BOaz20lg.js","assets/my-interviews.lazy-DB9ly5wz.js","assets/interview-start-B_mHcTON.js","assets/screening-ui-state-CCrplPWj.js","assets/UnifiedMediaTestDialog-Le0q3m1H.js","assets/interviewList-BxqBTwH7.js","assets/job-market.lazy-DZ_-Hvlw.js","assets/improve-cv.lazy-CevOnU6F.js","assets/LengthResultPanel-Hmyatd2C.js","assets/wand-2-DmkiLVAg.js","assets/explore-jobs.lazy-Dd2dEvuv.js","assets/FilterSidebar-BT5Ajc1M.js","assets/collapsible-DZrSgXvP.js","assets/index-Cegh03K5.js","assets/recsWarmGate-COrCDTlb.js","assets/create-resume.lazy-CAiPjImq.js","assets/EnhancePanels-BE5T5pvq.js","assets/phone-Bael98tX.js","assets/useShareApi-pt3MQR-c.js","assets/external-job-nav-DbpKmHoU.js","assets/resumeFilename-B1LNChuN.js","assets/award-DAQGDEdT.js","assets/bring-job.lazy-Cbg3LeA_.js","assets/documentDownload-COYTtlYb.js","assets/link-2-CK7tITbs.js","assets/auto-apply-profile.lazy-DaRvMHPd.js","assets/auto-apply.lazy-CqEgPMiD.js","assets/documents.index.lazy-DF4AksNZ.js","assets/reports.index.lazy-D9qMi1sD.js","assets/downloadTalentReport-DPPkdsUy.js","assets/pdfStyles-Dq69hVQY.js","assets/aiCheck-BR05sef1.js","assets/ReportTile-C2getary.js","assets/reportsIndexCopy-DkjOmbON.js","assets/r._shareToken.lazy-CI2DNOue.js","assets/jobs._slug.lazy-De_DD8_l.js","assets/JobContent-Bn3OLplS.js","assets/job-share._shareId.lazy-D5wQMoo9.js","assets/SharedJobPage-9NNzWI7M.js","assets/interviewLinkReturn-C-o64B4X.js","assets/j._shareId.lazy-CNK8WyLn.js","assets/i._c
1ode.lazy-DLuH2BGn.js","assets/for-you._token.lazy-C-7YZ16G.js","assets/apply._token.lazy-B9Kuywkm.js","assets/profile_.support.lazy-pn7SbAJb.js","assets/SupportPage-zQ991haI.js","assets/ProfileNestedPage-jy25NzkG.js","assets/profile_.security.lazy-ChTP0zvd.js","assets/SecurityPage-Cl5oBW7t.js","assets/profile_.job-history.lazy-Cf3RUlOf.js","assets/profile_.faq.lazy-gL_vElRR.js","assets/FaqPage-BOYkh51y.js","assets/profile_.edit.lazy-D9Wrmq32.js","assets/EditProfilePage-Bd1kxOSQ.js","assets/profile_.about.lazy-Co5Cbg0n.js","assets/AboutPage-Bdt5jEjh.js","assets/help-circle-DgGv-KSg.js","assets/profile-ready._cvId.lazy-a_UXUOeL.js","assets/practice-interview._interviewId.lazy-B00dTTY1.js","assets/PracticeInterviewEvaluation-B2T7guR1.js","assets/job-preview._jdId.lazy-Ojzge2SZ.js","assets/interview._interviewId.lazy-DQJfr3Vs.js","assets/interview-history._interviewId.lazy-DDXXW5ot.js","assets/explore-jobs._jobId.lazy-BuwRjSB4.js","assets/documents._documentId.lazy-D4lDVw_D.js","assets/reports.all-roles.lazy-BnC6xGO4.js","assets/reports-apis-REi0Js6Y.js","assets/my-profile_.support.lazy-KPQL6lR5.js","assets/my-profile_.shortlisted.lazy-DmoM7uoh.js","assets/my-profile_.security.lazy-C0yJ8kQs.js","assets/my-profile_.faq.lazy-Dyd_dBy0.js","assets/my-profile_.edit.lazy-C8HD4Tt9.js","assets/my-profile_.about.lazy-QHZMGKa_.js","assets/auto-apply_.daily.lazy-BD_PqdSQ.js","assets/sourcing.claim._token.lazy-BD92orKH.js","assets/reports.talent._jdId.lazy-DvD1edKv.js","assets/AICheckFlagView-DEYdyNLp.js","assets/jd-dashboard._jdId.sourcing.lazy-B60tpvpG.js","assets/candidateStatus-ufLtCLZD.js","assets/jd-dashboard._jdId.settings.lazy-BYEnCwuB.js","assets/ChartLoader-BOCzT7cu.js","assets/matrixConfiguration-CDZPOhCW.js","assets/jd-dashboard._jdId.reviews.lazy-RI84Hq9h.js","assets/jd-dashboard._jdId.overview.lazy-CDFIIfK2.js","assets/CandidateStatusChips-BAhJiTTj.js","assets/jd-dashboard._jdId.opportunity-matrix.lazy-CSntU5kD.js","assets/jd-dashboard._jdId.details.lazy-DI-GE5Cu.js","assets/jd-dashboard._jdId.candidates.index.lazy-BGG1WBlZ.js","assets/OverrideRejectionDialog-aS7h4w5s.js","assets/downloadSummaryReport-B6j9yorf.js","assets/reports.candidate._jdId._candidateId.lazy-DtLD0TJe.js","assets/jd-dashboard._jdId.candidates.invite.lazy-BEmSt5Tv.js","assets/jd-dashboard._jdId.candidates._candidateId.lazy-DYcLek0V.js"])))=>i.map(i=>d[i]); 2function zZ(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const sO="pushstate",aO="popstate",uU="beforeunload",dU=e=>(e.preventDefault(),e.returnValue=""),VZ=()=>{removeEventListener(uU,dU,{capture:!0})};function fU(e){let t=e.getLocation();const n=new Set;let r=[];const i=()=>{t=e.getLocation(),n.forEach(s=>s({location:t}))},o=async(s,a)=>{var c;if(!(a?.ignoreBlocker??!1)&&typeof document<"u"&&r.length){for(const d of r)if(!await d()){(c=e.onBlocked)==null||c.call(e,i);return}}s()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:s=>(n.add(s),()=>{n.delete(s)}),push:(s,a,c)=>{a=lO(a),o(()=>{e.pushState(s,a),i()},c)},replace:(s,a,c)=>{a=lO(a),o(()=>{e.replaceState(s,a),i()},c)},go:(s,a)=>{o(()=>{e.go(s),i()},a)},back:s=>{o(()=>{e.back(),i()},s)},forward:s=>{o(()=>{e.forward(),i()},s)},createHref:s=>e.createHref(s),block:s=>(r.push(s),r.length===1&&addEventListener(uU,dU,{capture:!0}),()=>{r=r.filter(a=>a!==s),r.length||VZ()}),flush:()=>{var s;return(s=e.flush)==null?void 0:s.call(e)},destroy:()=>{var s;return(s=e.destroy)==null?void 0:s.call(e)},notify:i}}function lO(e){return e||(e={}),{...e,key:WZ()}}function qZ(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState,i=g=>g,o=()=>Jv(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);let s=o(),a;const c=()=>s;let u,d;const f=()=>{u&&(m._ignoreSubscribers=!0,(u.isPush?t.history.pushState:t.history.replaceState)(u.state,"",u.href),m._ignoreSubscribers=!1,u=void 0,d=void 0,a=void 0)},h=(g,y,b)=>{const x=i(y);d||(a=s),s=Jv(y,b),u={href:x,state:b,isPush:u?.isPush||g==="push"},d||(d=Promise.resolve().then(()=>f()))},p=()=>{s=o(),m.notify()},m=fU({getLocation:c,getLength:()=>t.history.length,pushState:(g,y)=>h("push",g,y),replaceState:(g,y)=>h("replace",g,y),back:()=>t.history.back(),forward:()=>t.history.forward(),go:g=>t.history.go(g),createHref:g=>i(g),flush:f,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(sO,p),t.removeEventListener(aO,p)},onBlocked:g=>{a&&s!==a&&(s=a,g())}});return t.addEventListener(sO,p),t.addEventListener(aO,p),t.history.pushState=function(...g){const y=n.apply(t.history,g);return m._ignoreSubscribers||p(),y},t.history.replaceState=function(...g){const y=r.apply(t.history,g);return m._ignoreSubscribers||p(),y},m}function KZ(e={initialEntries:["/"]}){const t=e.initialEntries;let n=e.initialIndex??t.length-1;const r=t.map(()=>({}));return fU({getLocation:()=>Jv(t[n],r[n]),getLength:()=>t.length,pushState:(o,s)=>{n<t.length-1&&(t.splice(n+1),r.splice(n+1)),r.push(s),t.push(o),n=Math.max(t.length-1,0)},replaceState:(o,s)=>{r[n]=s,t[n]=o},back:()=>{n=Math.max(n-1,0)},forward:()=>{n=Math.min(n+1,t.length-1)},go:o=>{n=Math.min(Math.max(n+o,0),t.length-1)},createHref:o=>o})}function Jv(e,t){const n=e.indexOf("#"),r=e.indexOf("?");return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{}}}function WZ(){return(Math.random()+1).toString(36).substring(7)}var HZ="Invariant failed";function Yt(e,t){if(!e)throw new Error(HZ)}var Qf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};
vendor: 5,076 bytes, lines 2-10
2function ct(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Mot(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var hU={exports:{}},jb={},pU={exports:{}},qe={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var xm=Symbol.for("react.element"),GZ=Symbol.for("react.portal"),YZ=Symbol.for("react.fragment"),QZ=Symbol.for("react.strict_mode"),JZ=Symbol.for("react.profiler"),XZ=Symbol.for("react.provider"),ZZ=Symbol.for("react.context"),eee=Symbol.for("react.forward_ref"),tee=Symbol.for("react.suspense"),nee=Symbol.for("react.memo"),ree=Symbol.for("react.lazy"),cO=Symbol.iterator;function iee(e){return e===null||typeof e!="object"?null:(e=cO&&e[cO]||e["@@iterator"],typeof e=="function"?e:null)}var mU={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gU=Object.assign,vU={};function Ed(e,t,n){this.props=e,this.context=t,this.refs=vU,this.updater=n||mU}Ed.prototype.isReactComponent={};Ed.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ed.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function yU(){}yU.prototype=Ed.prototype;function GN(e,t,n){this.props=e,this.context=t,this.refs=vU,this.updater=n||mU}var YN=GN.prototype=new yU;YN.constructor=GN;gU(YN,Ed.prototype);YN.isPureReactComponent=!0;var uO=Array.isArray,xU=Object.prototype.hasOwnProperty,QN={current:null},bU={key:!0,ref:!0,__self:!0,__source:!0};function wU(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)xU.call(t,r)&&!bU.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:xm,type:e,key:o,ref:s,props:i,_owner:QN.current}}function oee(e,t){return{$$typeof:xm,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function JN(e){return typeof e=="object"&&e!==null&&e.$$typeof===xm}function see(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var dO=/\/+/g;function t_(e,t){return typeof e=="object"&&e!==null&&e.key!=null?see(""+e.key):t.toString(36)}function xv(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case xm:case GZ:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+t_(s,0):r,uO(i)?(n="",e!=null&&(n=e.replace(dO,"$&/")+"/"),xv(i,t,n,"",function(u){return u})):i!=null&&(JN(i)&&(i=oee(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(dO,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",uO(e))for(var a=0;a<e.length;a++){o=e[a];var c=r+t_(o,a);s+=xv(o,t,n,c,i)}else if(c=iee(e),typeof c=="function")for(e=c.call(e),a=0;!(o=e.next()).done;)o=o.value,c=r+t_(o,a++),s+=xv(o,t,n,c,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function ug(e,t,n){if(e==null)return e;var r=[],i=0;return xv(e,r,"","",function(o){return t.call(n,o,i++)}),r}function aee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Xn={current:null},bv={transition:null},lee={ReactCurrentDispatcher:Xn,ReactCurrentBatchConfig:bv,ReactCurrentOwner:QN};function _U(){throw Error("act(...) is not supported in production builds of React.")}qe.Children={map:ug,forEach:function(e,t,n){ug(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ug(e,function(){t++}),t},toArray:function(e){return ug(e,function(t){return t})||[]},only:function(e){if(!JN(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};qe.Component=Ed;qe.Fragment=YZ;qe.Profiler=JZ;qe.PureComponent=GN;qe.StrictMode=QZ;qe.Suspense=tee;
vendor: 6,166 bytes, lines 10-34
10qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lee;qe.act=_U;qe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=gU({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=QN.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)xU.call(t,c)&&!bU.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:xm,type:e.type,key:i,ref:o,props:r,_owner:s}};qe.createContext=function(e){return e={$$typeof:ZZ,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:XZ,_context:e},e.Consumer=e};qe.createElement=wU;qe.createFactory=function(e){var t=wU.bind(null,e);return t.type=e,t};qe.createRef=function(){return{current:null}};qe.forwardRef=function(e){return{$$typeof:eee,render:e}};qe.isValidElement=JN;qe.lazy=function(e){return{$$typeof:ree,_payload:{_status:-1,_result:e},_init:aee}};qe.memo=function(e,t){return{$$typeof:nee,type:e,compare:t===void 0?null:t}};qe.startTransition=function(e){var t=bv.transition;bv.transition={};try{e()}finally{bv.transition=t}};qe.unstable_act=_U;qe.useCallback=function(e,t){return Xn.current.useCallback(e,t)};qe.useContext=function(e){return Xn.current.useContext(e)};qe.useDebugValue=function(){};qe.useDeferredValue=function(e){return Xn.current.useDeferredValue(e)};qe.useEffect=function(e,t){return Xn.current.useEffect(e,t)};qe.useId=function(){return Xn.current.useId()};qe.useImperativeHandle=function(e,t,n){return Xn.current.useImperativeHandle(e,t,n)};qe.useInsertionEffect=function(e,t){return Xn.current.useInsertionEffect(e,t)};qe.useLayoutEffect=function(e,t){return Xn.current.useLayoutEffect(e,t)};qe.useMemo=function(e,t){return Xn.current.useMemo(e,t)};qe.useReducer=function(e,t,n){return Xn.current.useReducer(e,t,n)};qe.useRef=function(e){return Xn.current.useRef(e)};qe.useState=function(e){return Xn.current.useState(e)};qe.useSyncExternalStore=function(e,t,n){return Xn.current.useSyncExternalStore(e,t,n)};qe.useTransition=function(){return Xn.current.useTransition()};qe.version="18.3.1";pU.exports=qe;var v=pU.exports;const $=ct(v),XN=zZ({__proto__:null,default:$},[v]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var cee=v,uee=Symbol.for("react.element"),dee=Symbol.for("react.fragment"),fee=Object.prototype.hasOwnProperty,hee=cee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,pee={key:!0,ref:!0,__self:!0,__source:!0};function SU(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)fee.call(t,r)&&!pee.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:uee,type:e,key:o,ref:s,props:i,_owner:hee.current}}jb.Fragment=dee;jb.jsx=SU;jb.jsxs=SU;hU.exports=jb;var l=hU.exports;const n_=v.createContext(null);function jU(){return typeof document>"u"?n_:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=n_,n_)}function Ki(e){const t=v.useContext(jU());return e?.warn,t}var EU={exports:{}},CU={},NU={exports:{}},PU={};/** 19 * @license React 20 * use-sync-external-store-shim.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */var ku=v;function mee(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gee=typeof Object.is=="function"?Object.is:mee,vee=ku.useState,yee=ku.useEffect,xee=ku.useLayoutEffect,bee=ku.useDebugValue;function wee(e,t){var n=t(),r=vee({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return xee(function(){i.value=n,i.getSnapshot=t,r_(i)&&o({inst:i})},[e,n,t]),yee(function(){return r_(i)&&o({inst:i}),e(function(){r_(i)&&o({inst:i})})},[e]),bee(n),n}function r_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gee(e,n)}catch{return!0}}function _ee(e,t){return t()}var See=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?_ee:wee;PU.useSyncExternalStore=ku.useSyncExternalStore!==void 0?ku.useSyncExternalStore:See;NU.exports=PU;var jee=NU.exports;/** 27 * @license React 28 * use-sync-external-store-shim/with-selector.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var Eb=v,Eee=jee;function Cee(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Nee=typeof Object.is=="function"?Object.is:Cee,Pee=Eee.useSyncExternalStore,kee=Eb.useRef,Aee=Eb.useEffect,Tee=Eb.useMemo,Ree=Eb.useDebugValue;CU.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=kee(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Tee(function(){function c(p){if(!u){if(u=!0,d=p,p=r(p),i!==void 0&&s.hasValue){var m=s.value;if(i(m,p))return f=m}return f=p}if(m=f,Nee(d,p))return m;var g=r(p);return i!==void 0&&i(m,g)?m:(d=p,f=g)}var u=!1,d,f,h=n===void 0?null:n;return[function(){return c(t())},h===null?void 0:function(){return c(h())}]},[t,n,r,i]);var a=Pee(e,o[0],o[1]);return Aee(function(){s.hasValue=!0,s.value=a},[a]),Ree(a),a};EU.exports=CU;var Oee=EU.exports;class Iee{constructor(t,n){this.listeners=new Set,this._batching=!1,this._flushing=0,this.subscribe=r=>{var i,o;this.listeners.add(r);const s=(o=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:o.call(i,r,this);return()=>{this.listeners.delete(r),s?.()}},this.setState=r=>{var i,o,s;const a=this.state;this.state=(i=this.options)!=null&&i.updateFn?this.options.updateFn(a)(r):r(a),(s=(o=this.options)==null?void 0:o.onUp
34date)==null||s.call(o),this._flush()},this._flush=()=>{if(this._batching)return;const r=++this._flushing;this.listeners.forEach(i=>{this._flushing===r&&i()})},this.batch=r=>{if(this._batching)return r();this._batching=!0,r(),this._batching=!1,this._flush()},this.state=t,this.options=n}}function Mee(e,t=n=>n){return Oee.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,$ee)}function $ee(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}const Er="__root__";function Dee(e,t){let n,r,i,o="";for(n in e)if((i=e[n])!==void 0)if(Array.isArray(i))for(r=0;r<i.length;r++)o&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(i[r]);else o&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(i);return""+o}function fO(e){if(!e)return"";const t=decodeURIComponent(e);return t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t}function Lee(e,t){let n,r;const i={},o=e.split("&");for(;n=o.shift();){const s=n.indexOf("=");if(s!==-1){r=n.slice(0,s),r=decodeURIComponent(r);const a=n.slice(s+1);i[r]!==void 0?i[r]=[].concat(i[r],fO(a)):i[r]=fO(a)}else r=n,r=decodeURIComponent(r),i[r]=""}return i}const Fee=Uee(JSON.parse),Bee=zee(JSON.stringify,JSON.parse);function Uee(e){return t=>{t.substring(0,1)==="?"&&(t=t.substring(1));const n=Lee(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function zee(e,t){function n(r){if(typeof r=="object"&&r!==null)try{return e(r)}catch{}else if(typeof r=="string"&&typeof t=="function")try{return t(r),e(r)}catch{}return r}return r=>{r={...r},Object.keys(r).forEach(o=>{const s=r[o];typeof s>"u"||s===void 0?delete r[o]:r[o]=n(s)});const i=Dee(r).toString();return i?`?${i}`:""}}function fh(e){return e[e.length-1]}function Vee(e){return typeof e=="function"}function pl(e,t){return Vee(e)?e(t):e}function wv(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function Hr(e,t){if(e===t)return e;const n=t,r=pO(e)&&pO(n);if(r||Au(e)&&Au(n)){const i=r?e:Object.keys(e),o=i.length,s=r?n:Object.keys(n),a=s.length,c=r?[]:{};let u=0;for(let d=0;d<a;d++){const f=r?d:s[d];(!r&&i.includes(f)||r)&&e[f]===void 0&&n[f]===void 0?(c[f]=void 0,u++):(c[f]=Hr(e[f],n[f]),c[f]===e[f]&&e[f]!==void 0&&u++)}return o===a&&u===o?e:c}return n}function Au(e){if(!hO(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!hO(n)||!n.hasOwnProperty("isPrototypeOf"))}function hO(e){return Object.prototype.toString.call(e)==="[object Object]"}function pO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function mO(e,t){let n=Object.keys(e);return t&&(n=n.filter(r=>e[r]!==void 0)),n}function cu(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Au(e)&&Au(t)){const r=n?.ignoreUndefined??!0,i=mO(e,r),o=mO(t,r);return!n?.partial&&i.length!==o.length?!1:o.every(s=>cu(e[s],t[s],n))}return Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:!e.some((r,i)=>!cu(r,t[i],n)):!1}const Jf=typeof window<"u"?v.useLayoutEffect:v.useEffect;function Rc(e){let t,n;const r=new Promise((i,o)=>{t=i,n=o});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e?.(i)},r.reject=i=>{r.status="rejected",n(i)},r}function i_(e){const t=v.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function qee(e,t,n={},r={}){const i=v.useRef(typeof IntersectionObserver=="function"),o=v.useRef(null);return v.useEffect(()=>{if(!(!e.current||!i.current||r.disabled))return o.current=new IntersectionObserver(([s])=>{t(s)},n),o.current.observe(e.current),()=>{var s;(s=o.current)==null||s.disconnect()}},[t,n,r.disabled,e]),o.current}function Kee(e){const t=v.useRef(null);return v.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t}function ts(e){return Cb(e.filter(t=>t!==void 0).join("/"))}function Cb(e){return e.replace(/\/{2,}/g,"/")}function ZN(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ml(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Wee(e){return ml(ZN(e))}function Xv(e,t){return e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Hee(e,t,n){return Xv(e,n)===Xv(t,n)}function Gee({basepath:e,base:t,to:n,trailingSlash:r="never",caseSensitive:i}){var o,s;t=Zv(e,t,i),n=Zv(e,n,i);let a=Tu(t);const c=Tu(n);a.length>
341&&((o=fh(a))==null?void 0:o.value)==="/"&&a.pop(),c.forEach((d,f)=>{d.value==="/"?f?f===c.length-1&&a.push(d):a=[d]:d.value===".."?a.pop():d.value==="."||a.push(d)}),a.length>1&&(((s=fh(a))==null?void 0:s.value)==="/"?r==="never"&&a.pop():r==="always"&&a.push({type:"pathname",value:"/"}));const u=ts([e,...a.map(d=>d.value)]);return Cb(u)}function Tu(e){if(!e)return[];e=Cb(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map(r=>r==="$"||r==="*"?{type:"wildcard",value:r}:r.charAt(0)==="$"?{type:"param",value:r}:{type:"pathname",value:decodeURI(r)})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function dg({path:e,params:t,leaveWildcards:n,leaveParams:r,decodeCharMap:i}){const o=Tu(e),s={};for(const[a,c]of Object.entries(t)){const u=typeof c=="string";["*","_splat"].includes(a)?s[a]=u?encodeURI(c):c:s[a]=u?Yee(c,i):c}return ts(o.map(a=>{if(a.type==="wildcard"){const c=s._splat;return n?`${a.value}${c??""}`:c}if(a.type==="param"){if(r){const c=s[a.value];return`${a.value}${c??""}`}return s[a.value.substring(1)]??"undefined"}return a.value}))}function Yee(e,t){let n=encodeURIComponent(e);if(t)for(const[r,i]of t)n=n.replaceAll(r,i);return n}function fg(e,t,n){const r=Qee(e,t,n);if(!(n.to&&!r))return r??{}}function Zv(e,t,n=!1){const r=n?e:e.toLowerCase(),i=n?t:t.toLowerCase();switch(!0){case r==="/":return t;case i===r:return"";case t.length<e.length:return t;case i[r.length]!=="/":return t;case i.startsWith(r):return t.slice(e.length);default:return t}}function Qee(e,t,n){if(e!=="/"&&!t.startsWith(e))return;t=Zv(e,t,n.caseSensitive);const r=Zv(e,`${n.to??"$"}`,n.caseSensitive),i=Tu(t),o=Tu(r);t.startsWith("/")||i.unshift({type:"pathname",value:"/"}),r.startsWith("/")||o.unshift({type:"pathname",value:"/"});const s={};return(()=>{for(let c=0;c<Math.max(i.length,o.length);c++){const u=i[c],d=o[c],f=c>=i.length-1,h=c>=o.length-1;if(d){if(d.type==="wildcard"){const p=decodeURI(ts(i.slice(c).map(m=>m.value)));return s["*"]=p,s._splat=p,!0}if(d.type==="pathname"){if(d.value==="/"&&!u?.value)return!0;if(u){if(n.caseSensitive){if(d.value!==u.value)return!1}else if(d.value.toLowerCase()!==u.value.toLowerCase())return!1}}if(!u)return!1;if(d.type==="param"){if(u.value==="/")return!1;u.value.charAt(0)!=="$"&&(s[d.value.substring(1)]=decodeURIComponent(u.value))}}if(!f&&h)return s["**"]=ts(i.slice(c+1).map(p=>p.value)),!!n.fuzzy&&d?.value!=="/"}return!0})()?s:void 0}function gl(e){if(e.isRedirect=!0,e.statusCode=e.statusCode||e.code||307,e.headers=e.headers||{},e.throw)throw e;return e}function ol(e){return!!e?.isRedirect}function o_(e){return!!e?.isRedirect&&e.href}function eP(e){const t=e.errorComponent??Nb;return l.jsx(Jee,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?v.createElement(t,{error:n,reset:r}):e.children})}class Jee extends v.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Nb({error:e}){const[t,n]=v.useState(!1);return l.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[l.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),l.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),l.jsx("div",{style:{height:".25rem"}}),t?l.jsx("div",{children:l.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?l.jsx("code",{children:e.message}):null})}):null]})}function pt(e){const t=Ki({warn:e?.router===void 0}),n=e?.router||t,r=v.useRef();return Mee(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=Hr(r.current,e.
34select(i));return r.current=o,o}return e.select(i)}return i})}function Xee(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function bi(e){return!!e?.isNotFound}function Zee(e){const t=pt({select:n=>`not-found-${n.location.pathname}-${n.status}`});return l.jsx(eP,{getResetKey:()=>t,onCatch:(n,r)=>{var i;if(bi(n))(i=e.onCatch)==null||i.call(e,n,r);else throw n},errorComponent:({error:n})=>{var r;if(bi(n))return(r=e.fallback)==null?void 0:r.call(e,n);throw n},children:e.children})}function ete(){return l.jsx("p",{children:"Not Found"})}const tte={stringify:e=>JSON.stringify(e,function(n,r){const i=this[n],o=gO.find(s=>s.stringifyCondition(i));return o?o.stringify(i):r}),parse:e=>JSON.parse(e,function(n,r){const i=this[n],o=gO.find(s=>s.parseCondition(i));return o?o.parse(i):r})},gO=[{stringifyCondition:e=>e instanceof Date,stringify:e=>({$date:e.toISOString()}),parseCondition:e=>Au(e)&&e.$date,parse:e=>new Date(e.$date)},{stringifyCondition:e=>e===void 0,stringify:()=>({$undefined:""}),parseCondition:e=>Au(e)&&e.$undefined==="",parse:()=>{}}],kU=["component","errorComponent","pendingComponent","notFoundComponent"];function nte(e){var t;for(const n of kU)if((t=e.options[n])!=null&&t.preload)return!0;return!1}function s_(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if("value"in n)return n.value;throw n instanceof Promise?new g1("Async validation not supported"):new g1(JSON.stringify(n.issues,void 0,2))}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function rte(e){return new ite(e)}class ite{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.subscribers=new Set,this.startReactTransition=n=>
34n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options;this.options={...this.options,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(i=>[encodeURIComponent(i),i])):void 0,(!this.basepath||n.basepath&&n.basepath!==r.basepath)&&(n.basepath===void 0||n.basepath===""||n.basepath==="/"?this.basepath="/":this.basepath=`/${Wee(n.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?KZ({initialEntries:[this.basepath||"/"]}):qZ()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new Iee(ste(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(i=>!["redirected"].includes(i.status))}}}))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[n.id]=n);const r=s=>{s.forEach((a,c)=>{a.init({originalIndex:c,defaultSsr:this.options.defaultSsr});const u=this.routesById[a.id];if(Yt(!u,`Duplicate routes found with id: ${String(a.id)}`),this.routesById[a.id]=a,!a.isRoot&&a.path){const f=ml(a.fullPath);(!this.routesByPath[f]||a.fullPath.endsWith("/"))&&(this.routesByPath[f]=a)}const d=a.children;d?.length&&r(d)})};r([this.routeTree]);const i=[];Object.values(this.routesById).forEach((s,a)=>{var c;if(s.isRoot||!s.path)return;const u=ZN(s.fullPath),d=Tu(u);for(;d.length>1&&((c=d[0])==null?void 0:c.value)==="/";)d.shift();const f=d.map(h=>h.value==="/"?.75:h.type==="param"?.5:h.type==="wildcard"?.25:1);i.push({child:s,trimmed:u,parsed:d,index:a,scores:f})}),this.flatRoutes=i.sort((s,a)=>{const c=Math.min(s.scores.length,a.scores.length);for(let u=0;u<c;u++)if(s.scores[u]!==a.scores[u])return a.scores[u]-s.scores[u];if(s.scores.length!==a.scores.length)return a.scores.length-s.scores.length;for(let u=0;u<c;u++)if(s.parsed[u].value!==a.parsed[u].value)return s.parsed[u].value>a.parsed[u].value?1:-1;return s.index-a.index}).map((s,a)=>(s.child.rank=a,s.child))},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=n=>{const r=({pathname:a,search:c,hash:u,state:d})=>{const f=this.options.parseSearch(c),h=this.options.stringifySearch(f);return{pathname:a,searchStr:h,search:Hr(n?.search,f),hash:u.split("#").reverse()[0]??"",href:`${a}${h}${u}`,state:Hr(n?.state,d)}},i=r(this.history.location),{__tempLocation:o,__tempKey:s}=i.state;if(o&&(!s||s===this.tempLocationKey)){const a=r(o);return a.state.key=i.state.key,delete a.state.__tempLocation,{...a,maskedLocation:i}}return i},this.resolvePathWithBase=(n,r)=>Gee({basepath:this.basepath,base:n,to:Cb(r),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.getMatchedRoutes=(n,r)=>{let i={};const o=ml(n.pathname),s=d=>fg(this.basepath,o,{to:d.fullPath,caseSensitive:d.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let a=r?.to!==void 0?this.routesByPath[r.to]:void 0;a?i=s(a):a=this.flatRoutes.find(d=>{const f=s(d);return f?(i=f,!0):!1});let c=a||this.routesById[Er];const u=[c];for(;c.parentRoute;)c=c.parentRoute,u.unshift(c);return{matchedRoutes:u,routeParams:i,foundRoute:a}},this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r.pendingTimeout))},this.cancelMatches=()=>{var n;(n=this.state.pendingMatches)==null||n.forEach(r=>{this.cancelMatch(r.id)})},this.buildLocation=n=>{const r=(o={},s)=>{var a,c,u,d,f,h;const p=o._fromLocation?this.matchRoutes(o._fromLocation,{_buildLocation:!0}
34):this.state.matches,m=o.from!=null?p.find(P=>fg(this.basepath,ml(P.pathname),{to:o.from,caseSensitive:!1,fuzzy:!1})):void 0,g=m?.pathname||this.latestLocation.pathname;Yt(o.from==null||m!=null,"Could not find match for from: "+o.from);const y=(a=this.state.pendingMatches)!=null&&a.length?(c=fh(this.state.pendingMatches))==null?void 0:c.search:((u=fh(p))==null?void 0:u.search)||this.latestLocation.search,b=s?.matchedRoutes.filter(P=>p.find(A=>A.routeId===P.id));let x;if(o.to)x=this.resolvePathWithBase(g,`${o.to}`);else{const P=this.routesById[(d=b?.find(A=>{const L=dg({path:A.fullPath,params:s?.routeParams??{},decodeCharMap:this.pathParamsDecodeCharMap});return ts([this.basepath,L])===g}))==null?void 0:d.id];x=this.resolvePathWithBase(g,P?.to??g)}const w={...(f=fh(p))==null?void 0:f.params};let S=(o.params??!0)===!0?w:{...w,...pl(o.params,w)};Object.keys(S).length>0&&s?.matchedRoutes.map(P=>{var A;return((A=P.options.params)==null?void 0:A.stringify)??P.options.stringifyParams}).filter(Boolean).forEach(P=>{S={...S,...P(S)}}),x=dg({path:x,params:S??{},leaveWildcards:!1,leaveParams:n.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap});let _=y;if(n._includeValidateSearch&&((h=this.options.search)!=null&&h.strict)){let P={};s?.matchedRoutes.forEach(A=>{try{A.options.validateSearch&&(P={...P,...s_(A.options.validateSearch,{...P,..._})??{}})}catch{}}),_=P}_=(P=>{const A=s?.matchedRoutes.reduce((D,O)=>{var F;const T=[];if("search"in O.options)(F=O.options.search)!=null&&F.middlewares&&T.push(...O.options.search.middlewares);else if(O.options.preSearchFilters||O.options.postSearchFilters){const M=({search:V,next:B})=>{let I=V;"preSearchFilters"in O.options&&O.options.preSearchFilters&&(I=O.options.preSearchFilters.reduce((H,de)=>de(H),V));const z=B(I);return"postSearchFilters"in O.options&&O.options.postSearchFilters?O.options.postSearchFilters.reduce((H,de)=>de(H),z):z};T.push(M)}if(n._includeValidateSearch&&O.options.validateSearch){const M=({search:V,next:B})=>{try{const I=B(V);return{...I,...s_(O.options.validateSearch,I)??{}}}catch{}};T.push(M)}return D.concat(T)},[])??[],L=({search:D})=>o.search?o.search===!0?D:pl(o.search,D):{};A.push(L);const R=(D,O)=>{if(D>=A.length)return O;const F=A[D];return F({search:O,next:M=>R(D+1,M)})};return R(0,P)})(_),_=Hr(y,_);const E=this.options.stringifySearch(_),C=o.hash===!0?this.latestLocation.hash:o.hash?pl(o.hash,this.latestLocation.hash):void 0,N=C?`#${C}`:"";let k=o.state===!0?this.latestLocation.state:o.state?pl(o.state,this.latestLocation.state):{};return k=Hr(this.latestLocation.state,k),{pathname:x,search:_,searchStr:E,state:k,hash:C??"",href:`${x}${E}${N}`,unmaskOnReload:o.unmaskOnReload}},i=(o={},s)=>{var a;const c=r(o);let u=s?r(s):void 0;if(!u){let h={};const p=(a=this.options.routeMasks)==null?void 0:a.find(m=>{const g=fg(this.basepath,c.pathname,{to:m.from,caseSensitive:!1,fuzzy:!1});return g?(h=g,!0):!1});if(p){const{from:m,...g}=p;s={...wv(n,["from"]),...g,params:h},u=r(s)}}const d=this.getMatchedRoutes(c,o),f=r(o,d);if(u){const h=this.getMatchedRoutes(u,s),p=r(s,h);f.maskedLocation=p}return f};return n.mask?i(n,{...wv(n,["from"]),...n.mask}):i(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...i})=>{const o=()=>{i.state.key=this.latestLocation.state.key;const c=cu(i.state,this.latestLocation.state);return delete i.state.key,c},s=this.latestLocation.href===i.href,a=this.commitLocationPromise;if(this.commitLocationPromise=Rc(()=>{a?.resolve()}),s&&o())this.load();else{let{maskedLocation:c,...u}=i;c&&(u={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...u,search:u.searchStr,state:{...u.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(u.unmaskOnReload??this.options.unmaskOnReload??!1)&&(u.state.__tempKey=this.tempLocationKey)),this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](u.href,u.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,viewTransition:i,ignoreBlocker:o,...s}={})=>{const a=s.href;if(a){const u=Jv(a,{});s.to=u.pathname,s.search=this.options.parseSearch(u.search),s.hash=u.hash.slice(1)}const c=this.buildLocation({...s,_includeValidateSearch:!0});return this.commitLocation({...c,viewTransition:i,replace:n,resetScroll:r,ignoreBlocker:o})},this.navigate=({to:n,...r})=>{const i=String(n);let o;try{new URL(`${i}`),o=!0}catch{}return Yt(!o),this.buildAndCommitLocation({...r,to:n})},this.load=async()=>{this.latestLocation=this.parseLocation(this.latestLocation);let n,r,i;for(i=new Promise(o=>{this.startReactTransition(async()=>{var s;try{const a=this.latestLocation,c=this.state.resolvedLocation,u=c.href!==a.href;this.cancelMatches();let d;this.__store.batch(()=>{d=this.matchRoutes(a),this.__store.setState(f=>({...f,status:"pending",isLoading:!0,location:a,pendingMatches:d,cachedMatches:f.cachedMatches.filter(h=>!d.find(p=>p.id===h.id))}))}
34),this.state.redirect||this.emit({type:"onBeforeNavigate",fromLocation:c,toLocation:a,pathChanged:u}),this.emit({type:"onBeforeLoad",fromLocation:c,toLocation:a,pathChanged:u}),await this.loadMatches({matches:d,location:a,onReady:async()=>{this.startViewTransition(async()=>{let f,h,p;this.__store.batch(()=>{this.__store.setState(m=>{const g=m.matches,y=m.pendingMatches||m.matches;return f=g.filter(b=>!y.find(x=>x.id===b.id)),h=y.filter(b=>!g.find(x=>x.id===b.id)),p=g.filter(b=>y.find(x=>x.id===b.id)),{...m,isLoading:!1,loadedAt:Date.now(),matches:y,pendingMatches:void 0,cachedMatches:[...m.cachedMatches,...f.filter(b=>b.status!=="error")]}}),this.clearExpiredCache()}),[[f,"onLeave"],[h,"onEnter"],[p,"onStay"]].forEach(([m,g])=>{m.forEach(y=>{var b,x;(x=(b=this.looseRoutesById[y.routeId].options)[g])==null||x.call(b,y)})})})}})}catch(a){o_(a)?(n=a,this.isServer||this.navigate({...a,replace:!0,ignoreBlocker:!0})):bi(a)&&(r=a),this.__store.setState(c=>({...c,statusCode:n?n.statusCode:r?404:c.matches.some(u=>u.status==="error")?500:200,redirect:n}))}this.latestLoadPromise===i&&((s=this.commitLocationPromise)==null||s.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise},this.startViewTransition=n=>
34{const r=this.shouldViewTransition??this.options.defaultViewTransition;delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"?document.startViewTransition(n):n()},this.updateMatch=(n,r)=>{var i;let o;const s=(i=this.state.pendingMatches)==null?void 0:i.find(u=>u.id===n),a=this.state.matches.find(u=>u.id===n),c=s?"pendingMatches":a?"matches":"cachedMatches";return this.__store.setState(u=>{var d;return{...u,[c]:(d=u[c])==null?void 0:d.map(f=>f.id===n?o=r(f):f)}}),o},this.getMatch=n=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(r=>r.id===n),this.loadMatches=async({location:n,matches:r,preload:i,onReady:o,updateMatch:s=this.updateMatch})=>{let a,c=!1;const u=async()=>{c||(c=!0,await o?.())};!this.isServer&&!this.state.matches.length&&u();const d=(f,h)=>{var p,m,g;if(o_(h))throw h;if(ol(h)||bi(h)){if(s(f.id,y=>({...y,status:ol(h)?"redirected":bi(h)?"notFound":"error",isFetching:!1,error:h,beforeLoadPromise:void 0,loaderPromise:void 0})),h.routeId||(h.routeId=f.routeId),(p=f.beforeLoadPromise)==null||p.resolve(),(m=f.loaderPromise)==null||m.resolve(),(g=f.loadPromise)==null||g.resolve(),ol(h))throw c=!0,h=this.resolveRedirect({...h,_fromLocation:n}),h;if(bi(h))throw this._handleNotFound(r,h,{updateMatch:s}),h}};try{await new Promise((f,h)=>{(async()=>{var p,m,g;try{const y=(w,S,_)=>{var j,E;const{id:C,routeId:N}=r[w],k=this.looseRoutesById[N];if(S instanceof Promise)throw S;S.routerCode=_,a=a??w,d(this.getMatch(C),S);try{(E=(j=k.options).onError)==null||E.call(j,S)}catch(P){S=P,d(this.getMatch(C),S)}s(C,P=>{var A,L;return(A=P.beforeLoadPromise)==null||A.resolve(),(L=P.loadPromise)==null||L.resolve(),{...P,error:S,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[w,{id:S,routeId:_}]of r.entries()){const j=this.getMatch(S),E=(p=r[w-1])==null?void 0:p.id,C=this.looseRoutesById[_],N=C.options.pendingMs??this.options.defaultPendingMs,k=!!(o&&!this.isServer&&!i&&(C.options.loader||C.options.beforeLoad)&&typeof N=="number"&&N!==1/0&&(C.options.pendingComponent??this.options.defaultPendingComponent));if(j.beforeLoadPromise||j.loaderPromise)k&&setTimeout(()=>{try{u()}catch{}},N),await j.beforeLoadPromise;else{try{s(S,I=>({...I,loadPromise:Rc(()=>{var z;(z=I.loadPromise)==null||z.resolve()}),beforeLoadPromise:Rc()}));const P=new AbortController;let A;k&&(A=setTimeout(()=>{try{u()}catch{}},N));const{paramsError:L,searchError:R}=this.getMatch(S);L&&y(w,L,"PARSE_PARAMS"),R&&y(w,R,"VALIDATE_SEARCH");const D=()=>E?this.getMatch(E).context:this.options.context??{};s(S,I=>({...I,isFetching:"beforeLoad",fetchCount:I.fetchCount+1,abortController:P,pendingTimeout:A,context:{...D(),...I.__routeContext,...I.__beforeLoadContext}}));const{search:O,params:F,context:T,cause:M}=this.getMatch(S),V={search:O,abortController:P,params:F,preload:!!i,context:T,location:n,navigate:I=>this.navigate({...I,_fromLocation:n}),buildLocation:this.buildLocation,cause:i?"preload":M,matches:r};let B=await((g=(m=C.options).beforeLoad)==null?void 0:g.call(m,V))??{};this.serializeLoaderData&&(B=this.serializeLoaderData("__beforeLoadContext",B,{router:this,match:this.getMatch(S)})),(ol(B)||bi(B))&&y(w,B,"BEFORE_LOAD"),s(S,I=>({...I,__beforeLoadContext:B,context:{...D(),...I.__routeContext,...B},abortController:P}))}catch(P){y(w,P,"BEFORE_LOAD")}s(S,P=>{var A;return(A=P.beforeLoadPromise)==null||A.resolve(),{...P,beforeLoadPromise:void 0,isFetching:!1}})}}const b=r.slice(0,a),x=[];b.forEach(({id:w,routeId:S},_)=>{x.push((async()=>{const{loaderPromise:j}=this.getMatch(w);let E=!1;if(j)await j;else{const C=x[_-1],N=this.looseRoutesById[S],k=()=>{const{params:V,loaderDeps:B,abortController:I,context:z,cause:H}=this.getMatch(w);return{params:V,deps:B,preload:!!i,parentMatchPromise:C,abortController:I,context:z,location:n,navigate:de=>this.navigate({...de,_fromLocation:n}),cause:i?"preload":H,route:N}},P=Date.now()-this.getMatch(w).updatedAt,A=i?N.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:N.options.staleTime??this.options.defaultStaleTime??0,L=N.options.shouldReload,R=typeof L=="function"?L(k()):L;s(w,V=>({...V,loaderPromise:Rc(),preload:!!i&&!this.state.matches.find(B=>B.id===w)}));const D=async()=>{var V,B,I,z,H,de,ge,te;try{const ye=async()=>{const W=this.getMatch(w);W.minPendingPromise&&await W.minPendingPromise};try{N._lazyPromise===void 0&&(N.lazyFn?N._lazyPromise=N.lazyFn().then(ae=>{const{id:re,...He}=ae.options;Object.assign(N.options,He)}):N._lazyPromise=Promise.resolve()),N._componentsPromise===void 0&&(N._componentsPromise=N._lazyPromise.then(()=>Promise.all(kU.map(async ae=>{const re=N.options[ae];re?.preload&&await re.preload()})))),s(w,ae=>({...ae,isFetching:"loader"}));let W=await((B=(V=N.options).loader)==null?void 0:B.call(V,k()));
34this.serializeLoaderData&&(W=this.serializeLoaderData("loaderData",W,{router:this,match:this.getMatch(w)})),d(this.getMatch(w),W),await N._lazyPromise,await ye();const ne=(z=(I=N.options).head)==null?void 0:z.call(I,{matches:r,match:this.getMatch(w),params:this.getMatch(w).params,loaderData:W}),se=ne?.meta,U=(de=(H=N.options).headers)==null?void 0:de.call(H,{loaderData:W});s(w,ae=>({...ae,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:W,meta:se,headers:U}))}catch(W){let ne=W;await ye(),d(this.getMatch(w),W);try{(te=(ge=N.options).onError)==null||te.call(ge,W)}catch(se){ne=se,d(this.getMatch(w),se)}s(w,se=>({...se,error:ne,status:"error",isFetching:!1}))}await N._componentsPromise}catch(ye){s(w,W=>({...W,loaderPromise:void 0})),d(this.getMatch(w),ye)}},{status:O,invalid:F}=this.getMatch(w);E=O==="success"&&(F||(R??P>A)),i&&N.options.preload===!1||(E?(async()=>{try{await D()}catch(V){o_(V)&&await this.navigate(V)}})():O!=="success"&&await D());const{loaderPromise:T,loadPromise:M}=this.getMatch(w);T?.resolve(),M?.resolve()}return s(w,C=>({...C,isFetching:E?C.isFetching:!1,loaderPromise:void 0,invalid:!1})),this.getMatch(w)})())}),await Promise.all(x),f()}catch(y){h(y)}})()}),await u()}catch(f){if(ol(f)||bi(f))throw bi(f)&&!i&&await u(),f}return r},this.invalidate=n=>{const r=i=>{var o;return((o=n?.filter)==null?void 0:o.call(n,i))??!0?{...i,invalid:!0,...i.status==="error"?{status:"pending",error:void 0}:{}}:i};return this.__store.setState(i=>{var o;return{...i,matches:i.matches.map(r),cachedMatches:i.cachedMatches.map(r),pendingMatches:(o=i.pendingMatches)==null?void 0:o.map(r)}}),this.load()},this.resolveRedirect=n=>{const r=n;return r.href||(r.href=this.buildLocation(r).href),r},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(o=>!r(o))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!0;const o=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(r.status!=="error"&&Date.now()-r.updatedAt<o)};this.clearCache({filter:n})},this.preloadRoute=async n=>{const r=this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=Object.fromEntries([...this.state.matches,...this.state.pendingMatches??[],...this.state.cachedMatches].map(a=>[a.id,!0]));this.__store.batch(()=>{i.forEach(a=>{o[a.id]||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,a]}))})});const s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(a=>a.id));try{return i=await this.loadMatches({matches:i,location:r,preload:!0,updateMatch:(a,c)=>{s.has(a)?i=i.map(u=>u.id===a?c(u):u):this.updateMatch(a,c)}}),i}catch(a){if(ol(a))return await this.preloadRoute({...a,_fromLocation:r});console.error(a);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(i);if(r?.pending&&this.state.status!=="pending")return!1;const a=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation,c=fg(this.basepath,a.pathname,{...r,to:o.pathname});return!c||n.params&&!cu(c,n.params,{partial:!0})?!1:c&&(r?.includeSearch??!0)?cu(a.search,o.search,{partial:!0})?c:!1:c},this.dehydrate=()=>{var n;const r=((n=this.options.errorSerializer)==null?void 0:n.serialize)??ate;return{state:{dehydratedMatches:this.state.matches.map(i=>({...wv(i,["id","status","updatedAt"]),error:i.error?{data:r(i.error),__isServerError:!0}:void 0}))},manifest:this.manifest}},this.hydrate=()=>{var n,r,i;let o;typeof document<"u"&&(o=this.options.transformer.parse((n=window.__TSR__)==null?void 0:n.dehydrated)),Yt(o),this.dehydratedData=o.payload,(i=(r=this.options).hydrate)==null||i.call(r,o.payload);const s=o.router.state,a=this.matchRoutes(this.state.location).map(c=>{const u=s.dehydratedMatches.find(d=>d.id===c.id);return Yt(u,`Could not find a client-side match for dehydrated match with id: ${c.id}!`),{...c,...u}});this.__store.setState(c=>({...c,matches:a})),this.manifest=o.router.manifest},this.injectedHtml=[],this.injectHtml=n=>{const r=()=>(this.injectedHtml=this.injectedHtml.filter(i=>i!==r),n);this.injectedHtml.push(r)},this.injectScript=(n,r)=>{this.injectHtml(`<script class='tsr-once'>${n}; __TSR__.cleanScripts()<\/script>`)}
34,this.streamedKeys=new Set,this.getStreamedValue=n=>{var r;if(this.isServer)return;const i=(r=window.__TSR__)==null?void 0:r.streamedValues[n];if(i)return i.parsed||(i.parsed=this.options.transformer.parse(i.value)),i.parsed},this.streamValue=(n,r)=>{var i;this.streamedKeys.has(n),this.streamedKeys.add(n),this.injectScript(`__TSR__.streamedValues['${n}'] = { value: ${(i=this.serializer)==null?void 0:i.call(this,this.options.transformer.stringify(r))}}`)},this._handleNotFound=(n,r,{updateMatch:i=this.updateMatch}={})=>{const o=Object.fromEntries(n.map(c=>[c.routeId,c]));let s=(r.global?this.looseRoutesById[Er]:this.looseRoutesById[r.routeId])||this.looseRoutesById[Er];for(;!s.options.notFoundComponent&&!this.options.defaultNotFoundComponent&&s.id!==Er;)s=s.parentRoute,Yt(s);const a=o[s.id];Yt(a,"Could not find match for route: "+s.id),i(a.id,c=>({...c,status:"notFound",error:r,isFetching:!1})),r.routerCode==="BEFORE_LOAD"&&s.parentRoute&&(r.routeId=s.parentRoute.id,this._handleNotFound(n,r,{updateMatch:i}))},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Bee,parseSearch:t.parseSearch??Fee,transformer:t.transformer??tte}),typeof document<"u"&&(window.__TSR__ROUTER__=this)}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutes(t,n,r){return typeof t=="string"?this.matchRoutesInternal({pathname:t,search:n},r):this.matchRoutesInternal(t,n)}matchRoutesInternal(t,n){const{foundRoute:r,matchedRoutes:i,routeParams:o}=this.getMatchedRoutes(t,n?.dest);let s=!1;(r?r.path!=="/"&&o["**"]:ml(t.pathname))&&(this.options.notFoundRoute?i.push(this.options.notFoundRoute):s=!0);const a=(()=>{if(s){if(this.options.notFoundMode!=="root")for(let d=i.length-1;d>=0;d--){const f=i[d];if(f.children)return f.id}return Er}})(),c=i.map(d=>{var f;let h;const p=((f=d.options.params)==null?void 0:f.parse)??d.options.parseParams;if(p)try{const m=p(o);Object.assign(o,m)}catch(m){if(h=new ote(m.message,{cause:m}),n?.throwOnError)throw h;return h}}),u=[];return i.forEach((d,f)=>{var h,p,m,g,y,b,x,w;const S=u[f-1],[_,j]=(()=>{const T=S?.search??t.search;try{const M=s_(d.options.validateSearch,T)??{};return[{...T,...M},void 0]}catch(M){const V=new g1(M.message,{cause:M});if(n?.throwOnError)throw V;return[T,V]}})(),E=((p=(h=d.options).loaderDeps)==null?void 0:p.call(h,{search:_}))??"",C=E?JSON.stringify(E):"",N=dg({path:d.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),k=dg({path:d.id,params:o,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap})+C,P=this.getMatch(k),A=this.state.matches.find(T=>T.routeId===d.id),L=A?"stay":"enter";let R;if(P)R={...P,cause:L,params:A?Hr(A.params,o):o,search:Hr(A?A.search:P.search,_)};else{const T=d.options.loader||d.options.beforeLoad||d.lazyFn||nte(d)?"pending":"success";R={id:k,index:f,routeId:d.id,params:A?Hr(A.params,o):o,pathname:ts([this.basepath,N]),updatedAt:Date.now(),search:A?Hr(A.search,_):_,searchError:void 0,status:T,isFetching:!1,error:void 0,paramsError:c[f],__routeContext:{},__beforeLoadContext:{},context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:A?Hr(A.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,meta:void 0,staticData:d.options.staticData||{},loadPromise:Rc(),fullPath:d.fullPath}}const D=(g=(m=d.options).head)==null?void 0:g.call(m,{matches:u,match:R,params:R.params,loaderData:R.loaderData??void 0});R.links=D?.links,R.scripts=D?.scripts,R.meta=D?.meta,R.status==="success"&&(R.headers=(b=(y=d.options).headers)==null?void 0:b.call(y,{loaderData:R.loaderData})),n?.preload||(R.globalNotFound=a===d.id),R.searchError=j;const F=S?.id?S.context??this.options.context??{}:this.options.context??{};if(R.context={...F,...R.__routeContext,...R.__beforeLoadContext},!P&&n?._buildLocation!==!0){const T={deps:E,params:R.params,context:R.context,location:t,navigate:M=>this.navigate({...M,_fromLocation:t}),buildLocation:this.buildLocation,cause:R.cause,abortController:R.abortController,preload:!!R.preload,matches:u};
34R.__routeContext=((w=(x=d.options).context)==null?void 0:w.call(x,T))??{},R.context={...F,...R.__routeContext,...R.__beforeLoadContext}}u.push(R)}),u}}class g1 extends Error{}class ote extends Error{}function ste(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:{...e},location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function ate(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function vO(e){return!(typeof e=="object"&&e&&"data"in e)||!("__isServerError"in e&&e.__isServerError)||!(typeof e.data=="object"&&e.data)?!1:e.__isServerError===!0}function yO(e){if("name"in e&&"message"in e){const t=new Error(e.message);return t.name=e.name,t}return e.data}const Pb=v.createContext(void 0),lte=v.createContext(void 0);function Li(e){const t=v.useContext(e.from?lte:Pb);return pt({select:r=>{const i=r.matches.find(o=>e.from?e.from===o.routeId:o.id===t);if(Yt(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function tP(e){return Li({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function nP(e){const{select:t,...n}=e;return Li({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function kb(e){return Li({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.params):t.params})}function Ab(e){return Li({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Un(e){const{navigate:t}=Ki();return v.useCallback(n=>t({...n}),[t])}function $ot(e){const{navigate:t}=Ki();return v.useEffect(()=>{t({...e})},[]),null}function Dot(e){return new cte({id:e})}class cte{constructor({id:t}){this.useMatch=n=>Li({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Li({from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Ab({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>kb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>nP({...n,from:this.id,strict:!1}),this.useLoaderData=n=>tP({...n,from:this.id,strict:!1}),this.useNavigate=()=>Un({from:this.id}),this.notFound=n=>Xee({routeId:this.id,...n}),this.id=t}}let AU=class{constructor(t){this.init=n=>{var r,i;this.originalIndex=n.originalIndex;const o=this.options,s=!o?.path&&!o?.id;this.parentRoute=(i=(r=this.options).getParentRoute)==null?void 0:i.call(r),s?this._path=Er:Yt(this.parentRoute);let a=s?Er:o.path;a&&a!=="/"&&(a=ZN(a));const c=o?.id||a;let u=s?Er:ts([this.parentRoute.id===Er?"":this.parentRoute.id,c]);a===Er&&(a="/"),u!==Er&&(u=ts(["/",u]));const d=u===Er?"/":ts([this.parentRoute.fullPath,a]);this._path=a,this._id=u,this._fullPath=d,this._to=d,this._ssr=o?.ssr??n.defaultSsr??!0},this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.useMatch=n=>Li({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Li({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Ab({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>kb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>nP({...n,from:this.id}),this.useLoaderData=n=>tP({...n,from:this.id}),this.useNavigate=()=>Un({from:this.id}),this.options=t||{},this.isRoot=!t?.getParentRoute,Yt(!(t?.id&&t?.path)),this.$$typeof=Symbol.for("react.memo")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}get ssr(){return this._ssr}addChildren(t){return this._addFileChildren(t)}_addFileChildren(t){return Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this}};function ute(e){return new AU(e)}class dte extends AU{constructor(t){super(t)}addChildren(t){return super.addChildren(t),this}_addFileChildren(t){return super._addFileChildren(t),this}_addFileTypes(){return this}}function fte(e){return new dte(e)}function J(e){return new hte(e,{silent:!0}).createRoute}class hte{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const i=ute(r);return i.isRoot=!1,i},this.silent=n?.silent}}class pte{constructor(t){this.useMatch=n=>Li({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Li({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Ab({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>kb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>nP({...n,from:this.options.id}),this.useLoaderData=n=>tP({...n,from:this.options.id}),this.useNavigate=()=>Un({from:this.options.id}),this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Wi(e){return t=>new pte({id:e,...t})}function _v(e){return l.jsx(l.Fragment,{children:e.children})}
34function TU(e,t,n){return t.options.notFoundComponent?l.jsx(t.options.notFoundComponent,{data:n}):e.options.defaultNotFoundComponent?l.jsx(e.options.defaultNotFoundComponent,{data:n}):l.jsx(ete,{})}const RU=v.memo(function({matchId:t}){var n,r;const i=Ki(),o=pt({select:y=>{var b;return(b=y.matches.find(x=>x.id===t))==null?void 0:b.routeId}});Yt(o);const s=i.routesById[o],a=s.options.pendingComponent??i.options.defaultPendingComponent,c=a?l.jsx(a,{}):null,u=s.options.errorComponent??i.options.defaultErrorComponent,d=s.options.onCatch??i.options.defaultOnCatch,f=s.isRoot?s.options.notFoundComponent??((n=i.options.notFoundRoute)==null?void 0:n.options.component):s.options.notFoundComponent,h=(!s.isRoot||s.options.wrapInSuspense)&&(s.options.wrapInSuspense??a??((r=s.options.errorComponent)==null?void 0:r.preload))?v.Suspense:_v,p=u?eP:_v,m=f?Zee:_v,g=pt({select:y=>y.loadedAt});return l.jsx(Pb.Provider,{value:t,children:l.jsx(h,{fallback:c,children:l.jsx(p,{getResetKey:()=>g,errorComponent:u||Nb,onCatch:(y,b)=>{if(bi(y))throw y;d?.(y,b)},children:l.jsx(m,{fallback:y=>
34{if(!f||y.routeId&&y.routeId!==o||!y.routeId&&!s.isRoot)throw y;return v.createElement(f,y)},children:l.jsx(mte,{matchId:t})})})})})}),mte=v.memo(function({matchId:t}){var n,r,i,o,s;const a=Ki(),{match:c,matchIndex:u,routeId:d}=pt({select:m=>{const g=m.matches.findIndex(x=>x.id===t),y=m.matches[g];return{routeId:y.routeId,matchIndex:g,match:wv(y,["id","status","error"])}},structuralSharing:!0}),f=a.routesById[d],h=v.useMemo(()=>{const m=f.options.component??a.options.defaultComponent;return m?l.jsx(m,{}):l.jsx(Fa,{})},[f.options.component,a.options.defaultComponent]),p=(f.options.errorComponent??a.options.defaultErrorComponent)||Nb;if(c.status==="notFound"){let m;return vO(c.error)?m=(((n=a.options.errorSerializer)==null?void 0:n.deserialize)??yO)(c.error.data):m=c.error,Yt(bi(m)),TU(a,f,m)}if(c.status==="redirected")throw Yt(ol(c.error)),(r=a.getMatch(c.id))==null?void 0:r.loadPromise;if(c.status==="error"){if(a.isServer)return l.jsx(p,{error:c.error,info:{componentStack:""}});throw vO(c.error)?(((i=a.options.errorSerializer)==null?void 0:i.deserialize)??yO)(c.error.data):c.error}if(c.status==="pending"){const m=f.options.pendingMinMs??a.options.defaultPendingMinMs;if(m&&!((o=a.getMatch(c.id))!=null&&o.minPendingPromise)&&!a.isServer){const g=Rc();Promise.resolve().then(()=>{a.updateMatch(c.id,y=>({...y,minPendingPromise:g}))}),setTimeout(()=>{g.resolve(),a.updateMatch(c.id,y=>({...y,minPendingPromise:void 0}))},m)}throw(s=a.getMatch(c.id))==null?void 0:s.loadPromise}return l.jsxs(l.Fragment,{children:[h,a.AfterEachMatch?l.jsx(a.AfterEachMatch,{match:c,matchIndex:u}):null]})}),Fa=v.memo(function(){const t=Ki(),n=v.useContext(Pb),r=pt({select:u=>{var d;return(d=u.matches.find(f=>f.id===n))==null?void 0:d.routeId}}),i=t.routesById[r],o=pt({select:u=>{const f=u.matches.find(h=>h.id===n);return Yt(f),f.globalNotFound}}),s=pt({select:u=>{var d;const f=u.matches,h=f.findIndex(p=>p.id===n);return(d=f[h+1])==null?void 0:d.id}});if(o)return TU(t,i,void 0);if(!s)return null;const a=l.jsx(RU,{matchId:s}),c=t.options.defaultPendingComponent?l.jsx(t.options.defaultPendingComponent,{}):null;return n===Er?l.jsx(v.Suspense,{fallback:c,children:a}):a});var OU={exports:{}},Br={},IU={exports:{}},MU={};/** 35 * @license React 36 * scheduler.production.min.js 37 * 38 * Copyright (c) Facebook, Inc. and its affiliates. 39 * 40 * This source code is licensed under the MIT license found in the 41 * LICENSE file in the root directory of this source tree. 42 */(function(e){function t(T,M){var V=T.length;T.push(M);e:for(;0<V;){var B=V-1>>>1,I=T[B];if(0<i(I,M))T[B]=M,T[V]=I,V=B;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var M=T[0],V=T.pop();if(V!==M){T[0]=V;e:for(var B=0,I=T.length,z=I>>>1;B<z;){var H=2*(B+1)-1,de=T[H],ge=H+1,te=T[ge];if(0>i(de,V))ge<I&&0>i(te,de)?(T[B]=te,T[ge]=V,B=ge):(T[B]=de,T[H]=V,B=H);else if(ge<I&&0>i(te,V))T[B]=te,T[ge]=V,B=ge;else break e}}return M}function i(T,M){var V=T.sortIndex-M.sortIndex;return V!==0?V:T.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var c=[],u=[],d=1,f=null,h=3,p=!1,m=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(T){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=T)r(u),M.sortIndex=M.expirationTime,t(c,M);else break;M=n(u)}}function S(T){if(g=!1,w(T),!m)if(n(c)!==null)m=!0,O(_);else{var M=n(u);M!==null&&F(S,M.startTime-T)}}function _(T,M){m=!1,g&&(g=!1,b(C),C=-1),p=!0;var V=h;try{for(w(M),f=n(c);f!==null&&(!(f.expirationTime>M)||T&&!P());){var B=f.callback;if(typeof B=="function"){f.callback=null,h=f.priorityLevel;var I=B(f.expirationTime<=M);M=e.unstable_now(),typeof I=="function"?f.callback=I:f===n(c)&&r(c),w(M)}else r(c);f=n(c)}if(f!==null)var z=!0;else{var H=n(u);H!==null&&F(S,H.startTime-M),z=!1}return z}finally{f=null,h=V,p=!1}}var j=!1,E=null,C=-1,N=5,k=-1;function P(){return!(e.unstable_now()-k<N)}function A(){if(E!==null){var T=e.unstable_now();k=T;var M=!0;try{M=E(!0,T)}finally{M?L():(j=!1,E=null)}}else j=!1}var L;if(typeof x=="function")L=function(){x(A)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,D=R.port2;R.port1.onmessage=A,L=function(){D.postMessage(null)}}else L=function(){y(A,0)};function O(T){E=T,j||(j=!0,L())}function F(T,M){C=y(function(){T(e.unstable_now())},M)}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(T){T.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,O(_))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(T){switch(h){case 1:case 2:case 3:var M=3;break;default:M=h}var V=h;h=M;try{return T()}finally{h=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,M){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var V=h;h=T;try{return M()}finally{h=V}},e.unstable_scheduleCallback=function(T,M,V){var B=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?B+V:B):V=B,T){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=V+I,T={id:d++,callback:M,priorityLevel:T,startTime:V,expirationTime:I,sortIndex:-1},V>B?(T.sortIndex=V,t(u,T),n(c)===null&&T===n(u)&&(g?(b(C),C=-1):g=!0,F(S,V-B))):(T.sortIndex=I,t(c,T),m||p||(m=!0,O(_))),T},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(T){var M=h;return function(){var V=h;h=M;try{return T.apply(this,arguments)}finally{h=V}}}})(MU);IU.exports=MU;var gte=IU.exports;/** 43 * @license React 44 * react-dom.production.min.js 45 * 46 * Copyright (c) Facebook, Inc. and its affiliates. 47 * 48 * This source code is licensed under the MIT license found in the 49 * LICENSE file in the root directory of this source tree. 50 */var vte=v,$r=gte;function le(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var $U=new Set,Bh={};function ic(e,t){Ru(e,t),Ru(e+"Capture",t)}function Ru(e,t){for(Bh[e]=t,e=0;e<t.length;e++)$U.add(t[e])}var ds=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v1=Object.prototype.hasOwnProperty,yte=/^[: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]*$/,xO={},bO={};function xte(e){return v1.call(bO,e)?!0:v1.call(xO,e)?!1:yte.test(e)?bO[e]=!0:(xO[e]=!0,!1)}function bte(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function wte(e,t,n,r){if(t===null||typeof t>"u"||bte(e,t,n,r))return!0;
vendor: 5,203 bytes, lines 50-51
50if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Zn(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Sn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Sn[e]=new Zn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Sn[t]=new Zn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Sn[e]=new Zn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Sn[e]=new Zn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Sn[e]=new Zn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Sn[e]=new Zn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Sn[e]=new Zn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Sn[e]=new Zn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Sn[e]=new Zn(e,5,!1,e.toLowerCase(),null,!1,!1)});var rP=/[\-:]([a-z])/g;function iP(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(rP,iP);Sn[t]=new Zn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(rP,iP);Sn[t]=new Zn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(rP,iP);Sn[t]=new Zn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Sn[e]=new Zn(e,1,!1,e.toLowerCase(),null,!1,!1)});Sn.xlinkHref=new Zn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Sn[e]=new Zn(e,1,!1,e.toLowerCase(),null,!0,!0)});function oP(e,t,n,r){var i=Sn.hasOwnProperty(t)?Sn[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(wte(t,n,i,r)&&(n=null),r||i===null?xte(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Cs=vte.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hg=Symbol.for("react.element"),Fc=Symbol.for("react.portal"),Bc=Symbol.for("react.fragment"),sP=Symbol.for("react.strict_mode"),y1=Symbol.for("react.profiler"),DU=Symbol.for("react.provider"),LU=Symbol.for("react.context"),aP=Symbol.for("react.forward_ref"),x1=Symbol.for("react.suspense"),b1=Symbol.for("react.suspense_list"),lP=Symbol.for("react.memo"),Ws=Symbol.for("react.lazy"),FU=Symbol.for("react.offscreen"),wO=Symbol.iterator;function wf(e){return e===null||typeof e!="object"?null:(e=wO&&e[wO]||e["@@iterator"],typeof e=="function"?e:null)}var Ut=Object.assign,a_;function Xf(e){if(a_===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);a_=t&&t[1]||""}return` 51`+a_+e}var l_=!1;function c_(e,t){if(!e||l_)return"";l_=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 5,503 bytes, lines 51-54
51catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(` 52`),o=r.stack.split(` 53`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var c=` 54`+i[s].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=s&&0<=a);break}}}finally{l_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Xf(e):""}function _te(e){switch(e.tag){case 5:return Xf(e.type);case 16:return Xf("Lazy");case 13:return Xf("Suspense");case 19:return Xf("SuspenseList");case 0:case 2:case 15:return e=c_(e.type,!1),e;case 11:return e=c_(e.type.render,!1),e;case 1:return e=c_(e.type,!0),e;default:return""}}function w1(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Bc:return"Fragment";case Fc:return"Portal";case y1:return"Profiler";case sP:return"StrictMode";case x1:return"Suspense";case b1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case LU:return(e.displayName||"Context")+".Consumer";case DU:return(e._context.displayName||"Context")+".Provider";case aP:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case lP:return t=e.displayName||null,t!==null?t:w1(e.type)||"Memo";case Ws:t=e._payload,e=e._init;try{return w1(e(t))}catch{}}return null}function Ste(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return w1(t);case 8:return t===sP?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Sa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function BU(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jte(e){var t=BU(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pg(e){e._valueTracker||(e._valueTracker=jte(e))}function UU(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=BU(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ey(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function _1(e,t){var n=t.checked;return Ut({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _O(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Sa(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zU(e,t){t=t.checked,t!=null&&oP(e,"checked",t,!1)}function S1(e,t){zU(e,t);var n=Sa(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?j1(e,t.type,n):t.hasOwnProperty("defaultValue")&&j1(e,t.type,Sa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function SO(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function j1(e,t,n){(t!=="number"||ey(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Zf=Array.isArray;function uu(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Sa(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function E1(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(le(91));return Ut({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function jO(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(le(92));
vendor: 10,349 bytes, line 54
54if(Zf(n)){if(1<n.length)throw Error(le(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Sa(n)}}function VU(e,t){var n=Sa(t.value),r=Sa(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function EO(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function qU(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function C1(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?qU(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var mg,KU=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(mg=mg||document.createElement("div"),mg.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=mg.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Uh(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ete=["Webkit","ms","Moz","O"];Object.keys(hh).forEach(function(e){Ete.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hh[t]=hh[e]})});function WU(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hh.hasOwnProperty(e)&&hh[e]?(""+t).trim():t+"px"}function HU(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=WU(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Cte=Ut({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function N1(e,t){if(t){if(Cte[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(le(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(le(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(le(61))}if(t.style!=null&&typeof t.style!="object")throw Error(le(62))}}function P1(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 k1=null;function cP(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var A1=null,du=null,fu=null;function CO(e){if(e=_m(e)){if(typeof A1!="function")throw Error(le(280));var t=e.stateNode;t&&(t=Mb(t),A1(e.stateNode,e.type,t))}}function GU(e){du?fu?fu.push(e):fu=[e]:du=e}function YU(){if(du){var e=du,t=fu;if(fu=du=null,CO(e),t)for(e=0;e<t.length;e++)CO(t[e])}}function QU(e,t){return e(t)}function JU(){}var u_=!1;function XU(e,t,n){if(u_)return e(t,n);u_=!0;try{return QU(e,t,n)}finally{u_=!1,(du!==null||fu!==null)&&(JU(),YU())}}function zh(e,t){var n=e.stateNode;if(n===null)return null;var r=Mb(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(le(231,t,typeof n));return n}var T1=!1;if(ds)try{var _f={};Object.defineProperty(_f,"passive",{get:function(){T1=!0}}),window.addEventListener("test",_f,_f),window.removeEventListener("test",_f,_f)}catch{T1=!1}function Nte(e,t,n,r,i,o,s,a,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var ph=!1,ty=null,ny=!1,R1=null,Pte={onError:function(e){ph=!0,ty=e}};function kte(e,t,n,r,i,o,s,a,c){ph=!1,ty=null,Nte.apply(Pte,arguments)}function Ate(e,t,n,r,i,o,s,a,c){if(kte.apply(this,arguments),ph){if(ph){var u=ty;ph=!1,ty=null}else throw Error(le(198));ny||(ny=!0,R1=u)}}function oc(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ZU(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function NO(e){if(oc(e)!==e)throw Error(le(188))}function Tte(e){var t=e.alternate;if(!t){if(t=oc(e),t===null)throw Error(le(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return NO(i),e;if(o===r)return NO(i),t;o=o.sibling}throw Error(le(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s)throw Error(le(189))}}if(n.alternate!==r)throw Error(le(190))}if(n.tag!==3)throw Error(le(188));return n.stateNode.current===n?e:t}function e4(e){return e=Tte(e),e!==null?t4(e):null}function t4(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=t4(e);if(t!==null)return t;e=e.sibling}return null}var n4=$r.unstable_scheduleCallback,PO=$r.unstable_cancelCallback,Rte=$r.unstable_shouldYield,Ote=$r.unstable_requestPaint,Qt=$r.unstable_now,Ite=$r.unstable_getCurrentPriorityLevel,uP=$r.unstable_ImmediatePriority,r4=$r.unstable_UserBlockingPriority,ry=$r.unstable_NormalPriority,Mte=$r.unstable_LowPriority,i4=$r.unstable_IdlePriority,Tb=null,co=null;function $te(e){if(co&&typeof co.onCommitFiberRoot=="function")try{co.onCommitFiberRoot(Tb,e,void 0,(e.current.flags&128)===128)}catch{}}var Oi=Math.clz32?Math.clz32:Fte,Dte=Math.log,Lte=Math.LN2;function Fte(e){return e>>>=0,e===0?32:31-(Dte(e)/Lte|0)|0}var gg=64,vg=4194304;function eh(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function iy(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=eh(a):(o&=s,o!==0&&(r=eh(o)))}else s=n&~i,s!==0?r=eh(s):o!==0&&(r=eh(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Oi(t),i=1<<n,r|=e[n],t&=~i;return r}function Bte(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ute(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Oi(o),a=1<<s,c=i[s];c===-1?(!(a&n)||a&r)&&(i[s]=Bte(a,t)):c<=t&&(e.expiredLanes|=a),o&=~a}}function O1(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function o4(){var e=gg;return gg<<=1,!(gg&4194240)&&(gg=64),e}function d_(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function bm(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Oi(t),e[t]=n}function zte(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Oi(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function dP(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Oi(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var at=0;function s4(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var a4,fP,l4,c4,u4,I1=!1,yg=[],ca=null,ua=null,da=null,Vh=new Map,qh=new Map,Xs=[],Vte="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 submit".split(" ");function kO(e,t){switch(e){case"focusin":case"focusout":ca=null;break;case"dragenter":case"dragleave":ua=null;break;case"mouseover":case"mouseout":da=null;break;case"pointerover":case"pointerout":Vh.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qh.delete(t.pointerId)}}function Sf(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=_m(t),t!==null&&fP(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function qte(e,t,n,r,i){switch(t){case"focusin":return ca=Sf(ca,e,t,n,r,i),!0;case"dragenter":return ua=Sf(ua,e,t,n,r,i),!0;case"mouseover":return da=Sf(da,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;
vendor: 11,563 bytes, line 54
54return Vh.set(o,Sf(Vh.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,qh.set(o,Sf(qh.get(o)||null,e,t,n,r,i)),!0}return!1}function d4(e){var t=vl(e.target);if(t!==null){var n=oc(t);if(n!==null){if(t=n.tag,t===13){if(t=ZU(n),t!==null){e.blockedOn=t,u4(e.priority,function(){l4(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Sv(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=M1(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);k1=r,n.target.dispatchEvent(r),k1=null}else return t=_m(n),t!==null&&fP(t),e.blockedOn=n,!1;t.shift()}return!0}function AO(e,t,n){Sv(e)&&n.delete(t)}function Kte(){I1=!1,ca!==null&&Sv(ca)&&(ca=null),ua!==null&&Sv(ua)&&(ua=null),da!==null&&Sv(da)&&(da=null),Vh.forEach(AO),qh.forEach(AO)}function jf(e,t){e.blockedOn===t&&(e.blockedOn=null,I1||(I1=!0,$r.unstable_scheduleCallback($r.unstable_NormalPriority,Kte)))}function Kh(e){function t(i){return jf(i,e)}if(0<yg.length){jf(yg[0],e);for(var n=1;n<yg.length;n++){var r=yg[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ca!==null&&jf(ca,e),ua!==null&&jf(ua,e),da!==null&&jf(da,e),Vh.forEach(t),qh.forEach(t),n=0;n<Xs.length;n++)r=Xs[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Xs.length&&(n=Xs[0],n.blockedOn===null);)d4(n),n.blockedOn===null&&Xs.shift()}var hu=Cs.ReactCurrentBatchConfig,oy=!0;function Wte(e,t,n,r){var i=at,o=hu.transition;hu.transition=null;try{at=1,hP(e,t,n,r)}finally{at=i,hu.transition=o}}function Hte(e,t,n,r){var i=at,o=hu.transition;hu.transition=null;try{at=4,hP(e,t,n,r)}finally{at=i,hu.transition=o}}function hP(e,t,n,r){if(oy){var i=M1(e,t,n,r);if(i===null)w_(e,t,r,sy,n),kO(e,r);else if(qte(i,e,t,n,r))r.stopPropagation();else if(kO(e,r),t&4&&-1<Vte.indexOf(e)){for(;i!==null;){var o=_m(i);if(o!==null&&a4(o),o=M1(e,t,n,r),o===null&&w_(e,t,r,sy,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else w_(e,t,r,null,n)}}var sy=null;function M1(e,t,n,r){if(sy=null,e=cP(r),e=vl(e),e!==null)if(t=oc(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ZU(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return sy=e,null}function f4(e){switch(e){case"cancel":case"click":case"close":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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ite()){case uP:return 1;case r4:return 4;case ry:case Mte:return 16;case i4:return 536870912;default:return 16}default:return 16}}var sa=null,pP=null,jv=null;function h4(){if(jv)return jv;var e,t=pP,n=t.length,r,i="value"in sa?sa.value:sa.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return jv=i.slice(e,1<r?1-r:void 0)}function Ev(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function xg(){return!0}function TO(){return!1}function Ur(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?xg:TO,this.isPropagationStopped=TO,this}return Ut(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=xg)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=xg)},persist:function(){},isPersistent:xg}),t}var Cd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mP=Ur(Cd),wm=Ut({},Cd,{view:0,detail:0}),Gte=Ur(wm),f_,h_,Ef,Rb=Ut({},wm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gP,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ef&&(Ef&&e.type==="mousemove"?(f_=e.screenX-Ef.screenX,h_=e.screenY-Ef.screenY):h_=f_=0,Ef=e),f_)},movementY:function(e){return"movementY"in e?e.movementY:h_}}),RO=Ur(Rb),Yte=Ut({},Rb,{dataTransfer:0}),Qte=Ur(Yte),Jte=Ut({},wm,{relatedTarget:0}),p_=Ur(Jte),Xte=Ut({},Cd,{animationName:0,elapsedTime:0,pseudoElement:0}),Zte=Ur(Xte),ene=Ut({},Cd,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),tne=Ur(ene),nne=Ut({},Cd,{data:0}),OO=Ur(nne),rne={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ine={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"},one={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sne(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=one[e])?!!t[e]:!1}function gP(){return sne}var ane=Ut({},wm,{key:function(e){if(e.key){var t=rne[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ev(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ine[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gP,charCode:function(e){return e.type==="keypress"?Ev(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ev(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),lne=Ur(ane),cne=Ut({},Rb,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),IO=Ur(cne),une=Ut({},wm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gP}),dne=Ur(une),fne=Ut({},Cd,{propertyName:0,elapsedTime:0,pseudoElement:0}),hne=Ur(fne),pne=Ut({},Rb,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),mne=Ur(pne),gne=[9,13,27,32],vP=ds&&"CompositionEvent"in window,mh=null;ds&&"documentMode"in document&&(mh=document.documentMode);var vne=ds&&"TextEvent"in window&&!mh,p4=ds&&(!vP||mh&&8<mh&&11>=mh),MO=" ",$O=!1;function m4(e,t){switch(e){case"keyup":return gne.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function g4(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Uc=!1;function yne(e,t){switch(e){case"compositionend":return g4(t);case"keypress":return t.which!==32?null:($O=!0,MO);case"textInput":return e=t.data,e===MO&&$O?null:e;default:return null}}function xne(e,t){if(Uc)return e==="compositionend"||!vP&&m4(e,t)?(e=h4(),jv=pP=sa=null,Uc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return p4&&t.locale!=="ko"?null:t.data;default:return null}}var bne={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 DO(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bne[e.type]:t==="textarea"}function v4(e,t,n,r){GU(r),t=ay(t,"onChange"),0<t.length&&(n=new mP("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var gh=null,Wh=null;function wne(e){P4(e,0)}function Ob(e){var t=qc(e);if(UU(t))return e}function _ne(e,t){if(e==="change")return t}var y4=!1;if(ds){var m_;if(ds){var g_="oninput"in document;if(!g_){var LO=document.createElement("div");LO.setAttribute("oninput","return;"),g_=typeof LO.oninput=="function"}m_=g_}else m_=!1;y4=m_&&(!document.documentMode||9<document.documentMode)}function FO(){gh&&(gh.detachEvent("onpropertychange",x4),Wh=gh=null)}function x4(e){if(e.propertyName==="value"&&Ob(Wh)){var t=[];v4(t,Wh,e,cP(e)),XU(wne,t)}}function Sne(e,t,n){e==="focusin"?(FO(),gh=t,Wh=n,gh.attachEvent("onpropertychange",x4)):e==="focusout"&&FO()}function jne(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ob(Wh)}function Ene(e,t){if(e==="click")return Ob(t)}function Cne(e,t){if(e==="input"||e==="change")return Ob(t)}function Nne(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Fi=typeof Object.is=="function"?Object.is:Nne;function Hh(e,t){if(Fi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!v1.call(t,i)||!Fi(e[i],t[i]))return!1}return!0}function BO(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function UO(e,t){var n=BO(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=BO(n)}}function b4(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?b4(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function w4(){for(var e=window,t=ey();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ey(e.document)}return t}function yP(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Pne(e){var t=w4(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&b4(n.ownerDocument.documentElement,n)){if(r!==null&&yP(n)){if
vendor: 5,081 bytes, line 54
54(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=UO(n,o);var s=UO(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var kne=ds&&"documentMode"in document&&11>=document.documentMode,zc=null,$1=null,vh=null,D1=!1;function zO(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;D1||zc==null||zc!==ey(r)||(r=zc,"selectionStart"in r&&yP(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),vh&&Hh(vh,r)||(vh=r,r=ay($1,"onSelect"),0<r.length&&(t=new mP("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=zc)))}function bg(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Vc={animationend:bg("Animation","AnimationEnd"),animationiteration:bg("Animation","AnimationIteration"),animationstart:bg("Animation","AnimationStart"),transitionend:bg("Transition","TransitionEnd")},v_={},_4={};ds&&(_4=document.createElement("div").style,"AnimationEvent"in window||(delete Vc.animationend.animation,delete Vc.animationiteration.animation,delete Vc.animationstart.animation),"TransitionEvent"in window||delete Vc.transitionend.transition);function Ib(e){if(v_[e])return v_[e];if(!Vc[e])return e;var t=Vc[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in _4)return v_[e]=t[n];return e}var S4=Ib("animationend"),j4=Ib("animationiteration"),E4=Ib("animationstart"),C4=Ib("transitionend"),N4=new Map,VO="abort auxClick 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(" ");function Ba(e,t){N4.set(e,t),ic(t,[e])}for(var y_=0;y_<VO.length;y_++){var x_=VO[y_],Ane=x_.toLowerCase(),Tne=x_[0].toUpperCase()+x_.slice(1);Ba(Ane,"on"+Tne)}Ba(S4,"onAnimationEnd");Ba(j4,"onAnimationIteration");Ba(E4,"onAnimationStart");Ba("dblclick","onDoubleClick");Ba("focusin","onFocus");Ba("focusout","onBlur");Ba(C4,"onTransitionEnd");Ru("onMouseEnter",["mouseout","mouseover"]);Ru("onMouseLeave",["mouseout","mouseover"]);Ru("onPointerEnter",["pointerout","pointerover"]);Ru("onPointerLeave",["pointerout","pointerover"]);ic("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ic("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ic("onBeforeInput",["compositionend","keypress","textInput","paste"]);ic("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ic("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ic("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var th="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(" "),Rne=new Set("cancel close invalid load scroll toggle".split(" ").concat(th));function qO(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Ate(r,t,void 0,e),e.currentTarget=null}function P4(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==o&&i.isPropagationStopped())break e;qO(i,a,u),o=c}else for(s=0;s<r.length;s++){if(a=r[s],c=a.instance,u=a.currentTarget,a=a.listener,c!==o&&i.isPropagationStopped())break e;qO(i,a,u),o=c}}}if(ny)throw e=R1,ny=!1,R1=null,e}function Et(e,t){var n=t[z1];n===void 0&&(n=t[z1]=new Set);var r=e+"__bubble";n.has(r)||(k4(t,e,2,!1),n.add(r))}function b_(e,t,n){var r=0;t&&(r|=4),k4(n,e,r,t)}var wg="_reactListening"+Math.random().toString(36).slice(2);
vendor: 3,239 bytes, line 54
54function Gh(e){if(!e[wg]){e[wg]=!0,$U.forEach(function(n){n!=="selectionchange"&&(Rne.has(n)||b_(n,!1,e),b_(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wg]||(t[wg]=!0,b_("selectionchange",!1,t))}}function k4(e,t,n,r){switch(f4(t)){case 1:var i=Wte;break;case 4:i=Hte;break;default:i=hP}n=i.bind(null,t,n,e),i=void 0,!T1||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function w_(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var c=s.tag;if((c===3||c===4)&&(c=s.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;s=s.return}for(;a!==null;){if(s=vl(a),s===null)return;if(c=s.tag,c===5||c===6){r=o=s;continue e}a=a.parentNode}}r=r.return}XU(function(){var u=o,d=cP(n),f=[];e:{var h=N4.get(e);if(h!==void 0){var p=mP,m=e;switch(e){case"keypress":if(Ev(n)===0)break e;case"keydown":case"keyup":p=lne;break;case"focusin":m="focus",p=p_;break;case"focusout":m="blur",p=p_;break;case"beforeblur":case"afterblur":p=p_;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=RO;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Qte;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=dne;break;case S4:case j4:case E4:p=Zte;break;case C4:p=hne;break;case"scroll":p=Gte;break;case"wheel":p=mne;break;case"copy":case"cut":case"paste":p=tne;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=IO}var g=(t&4)!==0,y=!g&&e==="scroll",b=g?h!==null?h+"Capture":null:h;g=[];for(var x=u,w;x!==null;){w=x;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,b!==null&&(S=zh(x,b),S!=null&&g.push(Yh(x,S,w)))),y)break;x=x.return}0<g.length&&(h=new p(h,m,null,n,d),f.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==k1&&(m=n.relatedTarget||n.fromElement)&&(vl(m)||m[fs]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=u,m=m?vl(m):null,m!==null&&(y=oc(m),m!==y||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(g=RO,S="onMouseLeave",b="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(g=IO,S="onPointerLeave",b="onPointerEnter",x="pointer"),y=p==null?h:qc(p),w=m==null?h:qc(m),h=new g(S,x+"leave",p,n,d),h.target=y,h.relatedTarget=w,S=null,vl(d)===u&&(g=new g(b,x+"enter",m,n,d),g.target=w,g.relatedTarget=y,S=g),y=S,p&&m)t:{for(g=p,b=m,x=0,w=g;w;w=yc(w))x++;for(w=0,S=b;S;S=yc(S))w++;for(;0<x-w;)g=yc(g),x--;for(;0<w-x;)b=yc(b),w--;for(;x--;){if(g===b||b!==null&&g===b.alternate)break t;g=yc(g),b=yc(b)}g=null}else g=null;p!==null&&KO(f,h,p,g,!1),m!==null&&y!==null&&KO(f,y,m,g,!0)}}
vendor: 4,134 bytes, lines 54-55
54e:{if(h=u?qc(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var _=_ne;else if(DO(h))if(y4)_=Cne;else{_=jne;var j=Sne}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(_=Ene);if(_&&(_=_(e,u))){v4(f,_,n,d);break e}j&&j(e,h,u),e==="focusout"&&(j=h._wrapperState)&&j.controlled&&h.type==="number"&&j1(h,"number",h.value)}switch(j=u?qc(u):window,e){case"focusin":(DO(j)||j.contentEditable==="true")&&(zc=j,$1=u,vh=null);break;case"focusout":vh=$1=zc=null;break;case"mousedown":D1=!0;break;case"contextmenu":case"mouseup":case"dragend":D1=!1,zO(f,n,d);break;case"selectionchange":if(kne)break;case"keydown":case"keyup":zO(f,n,d)}var E;if(vP)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Uc?m4(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(p4&&n.locale!=="ko"&&(Uc||C!=="onCompositionStart"?C==="onCompositionEnd"&&Uc&&(E=h4()):(sa=d,pP="value"in sa?sa.value:sa.textContent,Uc=!0)),j=ay(u,C),0<j.length&&(C=new OO(C,e,null,n,d),f.push({event:C,listeners:j}),E?C.data=E:(E=g4(n),E!==null&&(C.data=E)))),(E=vne?yne(e,n):xne(e,n))&&(u=ay(u,"onBeforeInput"),0<u.length&&(d=new OO("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=E))}P4(f,t)})}function Yh(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ay(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=zh(e,n),o!=null&&r.unshift(Yh(e,o,i)),o=zh(e,t),o!=null&&r.push(Yh(e,o,i))),e=e.return}return r}function yc(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function KO(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var a=n,c=a.alternate,u=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&u!==null&&(a=u,i?(c=zh(n,o),c!=null&&s.unshift(Yh(n,c,a))):i||(c=zh(n,o),c!=null&&s.push(Yh(n,c,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var One=/\r\n?/g,Ine=/\u0000|\uFFFD/g;function WO(e){return(typeof e=="string"?e:""+e).replace(One,` 55`).replace(Ine,"")}function _g(e,t,n){if(t=WO(t),WO(e)!==t&&n)throw Error(le(425))}function ly(){}var L1=null,F1=null;function B1(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var U1=typeof setTimeout=="function"?setTimeout:void 0,Mne=typeof clearTimeout=="function"?clearTimeout:void 0,HO=typeof Promise=="function"?Promise:void 0,$ne=typeof queueMicrotask=="function"?queueMicrotask:typeof HO<"u"?function(e){return HO.resolve(null).then(e).catch(Dne)}:U1;function Dne(e){setTimeout(function(){throw e})}function __(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Kh(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Kh(t)}function fa(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function GO(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Nd=Math.random().toString(36).slice(2),so="__reactFiber$"+Nd,Qh="__reactProps$"+Nd,fs="__reactContainer$"+Nd,z1="__reactEvents$"+Nd,Lne="__reactListeners$"+Nd,Fne="__reactHandles$"+Nd;function vl(e){var t=e[so];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fs]||n[so]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=GO(e);e!==null;){if(n=e[so])return n;e=GO(e)}return t}e=n,n=e.parentNode}return null}function _m(e){return e=e[so]||e[fs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function qc(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(le(33))}function Mb(e){return e[Qh]||null}var V1=[],Kc=-1;function Ua(e){return{current:e}}function kt(e){0>
vendor: 14,940 bytes, line 55
55Kc||(e.current=V1[Kc],V1[Kc]=null,Kc--)}function St(e,t){Kc++,V1[Kc]=e.current,e.current=t}var ja={},Ln=Ua(ja),lr=Ua(!1),Dl=ja;function Ou(e,t){var n=e.type.contextTypes;if(!n)return ja;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function cr(e){return e=e.childContextTypes,e!=null}function cy(){kt(lr),kt(Ln)}function YO(e,t,n){if(Ln.current!==ja)throw Error(le(168));St(Ln,t),St(lr,n)}function A4(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(le(108,Ste(e)||"Unknown",i));return Ut({},n,r)}function uy(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ja,Dl=Ln.current,St(Ln,e),St(lr,lr.current),!0}function QO(e,t,n){var r=e.stateNode;if(!r)throw Error(le(169));n?(e=A4(e,t,Dl),r.__reactInternalMemoizedMergedChildContext=e,kt(lr),kt(Ln),St(Ln,e)):kt(lr),St(lr,n)}var Ko=null,$b=!1,S_=!1;function T4(e){Ko===null?Ko=[e]:Ko.push(e)}function Bne(e){$b=!0,T4(e)}function za(){if(!S_&&Ko!==null){S_=!0;var e=0,t=at;try{var n=Ko;for(at=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ko=null,$b=!1}catch(i){throw Ko!==null&&(Ko=Ko.slice(e+1)),n4(uP,za),i}finally{at=t,S_=!1}}return null}var Wc=[],Hc=0,dy=null,fy=0,Qr=[],Jr=0,Ll=null,Ho=1,Go="";function sl(e,t){Wc[Hc++]=fy,Wc[Hc++]=dy,dy=e,fy=t}function R4(e,t,n){Qr[Jr++]=Ho,Qr[Jr++]=Go,Qr[Jr++]=Ll,Ll=e;var r=Ho;e=Go;var i=32-Oi(r)-1;r&=~(1<<i),n+=1;var o=32-Oi(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Ho=1<<32-Oi(t)+i|n<<i|r,Go=o+e}else Ho=1<<o|n<<i|r,Go=e}function xP(e){e.return!==null&&(sl(e,1),R4(e,1,0))}function bP(e){for(;e===dy;)dy=Wc[--Hc],Wc[Hc]=null,fy=Wc[--Hc],Wc[Hc]=null;for(;e===Ll;)Ll=Qr[--Jr],Qr[Jr]=null,Go=Qr[--Jr],Qr[Jr]=null,Ho=Qr[--Jr],Qr[Jr]=null}var Tr=null,kr=null,Rt=!1,Ei=null;function O4(e,t){var n=Xr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function JO(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Tr=e,kr=fa(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Tr=e,kr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ll!==null?{id:Ho,overflow:Go}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Xr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Tr=e,kr=null,!0):!1;default:return!1}}function q1(e){return(e.mode&1)!==0&&(e.flags&128)===0}function K1(e){if(Rt){var t=kr;if(t){var n=t;if(!JO(e,t)){if(q1(e))throw Error(le(418));t=fa(n.nextSibling);var r=Tr;t&&JO(e,t)?O4(r,n):(e.flags=e.flags&-4097|2,Rt=!1,Tr=e)}}else{if(q1(e))throw Error(le(418));e.flags=e.flags&-4097|2,Rt=!1,Tr=e}}}function XO(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Tr=e}function Sg(e){if(e!==Tr)return!1;if(!Rt)return XO(e),Rt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!B1(e.type,e.memoizedProps)),t&&(t=kr)){if(q1(e))throw I4(),Error(le(418));for(;t;)O4(e,t),t=fa(t.nextSibling)}if(XO(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(le(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){kr=fa(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}kr=null}}else kr=Tr?fa(e.stateNode.nextSibling):null;return!0}function I4(){for(var e=kr;e;)e=fa(e.nextSibling)}function Iu(){kr=Tr=null,Rt=!1}function wP(e){Ei===null?Ei=[e]:Ei.push(e)}var Une=Cs.ReactCurrentBatchConfig;function Cf(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(le(309));var r=n.stateNode}if(!r)throw Error(le(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var a=i.refs;s===null?delete a[o]:a[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(le(284));if(!n._owner)throw Error(le(290,e))}return e}function jg(e,t){throw e=Object.prototype.toString.call(t),Error(le(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ZO(e){var t=e._init;return t(e._payload)}function M4(e){function t(b,x){if(e){var w=b.deletions;w===null?(b.deletions=[x],b.flags|=16):w.push(x)}}function n(b,x){if(!e)return null;for(;x!==null;)t(b,x),x=x.sibling;return null}function r(b,x){for(b=new Map;x!==null;)x.key!==null?b.set(x.key,x):b.set(x.index,x),x=x.sibling;return b}function i(b,x){return b=ga(b,x),b.index=0,b.sibling=null,b}function o(b,x,w){return b.index=w,e?(w=b.alternate,w!==null?(w=w.index,w<x?(b.flags|=2,x):w):(b.flags|=2,x)):(b.flags|=1048576,x)}function s(b){return e&&b.alternate===null&&(b.flags|=2),b}function a(b,x,w,S){return x===null||x.tag!==6?(x=A_(w,b.mode,S),x.return=b,x):(x=i(x,w),x.return=b,x)}function c(b,x,w,S){var _=w.type;return _===Bc?d(b,x,w.props.children,S,w.key):x!==null&&(x.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Ws&&ZO(_)===x.type)?(S=i(x,w.props),S.ref=Cf(b,x,w),S.return=b,S):(S=Rv(w.type,w.key,w.props,null,b.mode,S),S.ref=Cf(b,x,w),S.return=b,S)}function u(b,x,w,S){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=T_(w,b.mode,S),x.return=b,x):(x=i(x,w.children||[]),x.return=b,x)}function d(b,x,w,S,_){return x===null||x.tag!==7?(x=Al(w,b.mode,S,_),x.return=b,x):(x=i(x,w),x.return=b,x)}function f(b,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=A_(""+x,b.mode,w),x.return=b,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case hg:return w=Rv(x.type,x.key,x.props,null,b.mode,w),w.ref=Cf(b,null,x),w.return=b,w;case Fc:return x=T_(x,b.mode,w),x.return=b,x;case Ws:var S=x._init;return f(b,S(x._payload),w)}if(Zf(x)||wf(x))return x=Al(x,b.mode,w,null),x.return=b,x;jg(b,x)}return null}function h(b,x,w,S){var _=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return _!==null?null:a(b,x,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case hg:return w.key===_?c(b,x,w,S):null;case Fc:return w.key===_?u(b,x,w,S):null;case Ws:return _=w._init,h(b,x,_(w._payload),S)}if(Zf(w)||wf(w))return _!==null?null:d(b,x,w,S,null);jg(b,w)}return null}function p(b,x,w,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return b=b.get(w)||null,a(x,b,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case hg:return b=b.get(S.key===null?w:S.key)||null,c(x,b,S,_);case Fc:return b=b.get(S.key===null?w:S.key)||null,u(x,b,S,_);case Ws:var j=S._init;return p(b,x,w,j(S._payload),_)}if(Zf(S)||wf(S))return b=b.get(w)||null,d(x,b,S,_,null);jg(x,S)}return null}function m(b,x,w,S){for(var _=null,j=null,E=x,C=x=0,N=null;E!==null&&C<w.length;C++){E.index>C?(N=E,E=null):N=E.sibling;var k=h(b,E,w[C],S);if(k===null){E===null&&(E=N);break}e&&E&&k.alternate===null&&t(b,E),x=o(k,x,C),j===null?_=k:j.sibling=k,j=k,E=N}if(C===w.length)return n(b,E),Rt&&sl(b,C),_;if(E===null){for(;C<w.length;C++)E=f(b,w[C],S),E!==null&&(x=o(E,x,C),j===null?_=E:j.sibling=E,j=E);return Rt&&sl(b,C),_}for(E=r(b,E);C<w.length;C++)N=p(E,b,C,w[C],S),N!==null&&(e&&N.alternate!==null&&E.delete(N.key===null?C:N.key),x=o(N,x,C),j===null?_=N:j.sibling=N,j=N);return e&&E.forEach(function(P){return t(b,P)}),Rt&&sl(b,C),_}function g(b,x,w,S){var _=wf(w);if(typeof _!="function")throw Error(le(150));if(w=_.call(w),w==null)throw Error(le(151));for(var j=_=null,E=x,C=x=0,N=null,k=w.next();E!==null&&!k.done;C++,k=w.next()){E.index>C?(N=E,E=null):N=E.sibling;var P=h(b,E,k.value,S);if(P===null){E===null&&(E=N);break}e&&E&&P.alternate===null&&t(b,E),x=o(P,x,C),j===null?_=P:j.sibling=P,j=P,E=N}if(k.done)return n(b,E),Rt&&sl(b,C),_;if(E===null){for(;!k.done;C++,k=w.next())k=f(b,k.value,S),k!==null&&(x=o(k,x,C),j===null?_=k:j.sibling=k,j=k);return Rt&&sl(b,C),_}for(E=r(b,E);!k.done;C++,k=w.next())k=p(E,b,C,k.value,S),k!==null&&(e&&k.alternate!==null&&E.delete(k.key===null?C:k.key),x=o(k,x,C),j===null?_=k:j.sibling=k,j=k);return e&&E.forEach(function(A){return t(b,A)}),Rt&&sl(b,C),_}function y(b,x,w,S){if(typeof w=="object"&&w!==null&&w.type===Bc&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case hg:e:{for(var _=w.key,j=x;j!==null;){if(j.key===_){if(_=w.type,_===Bc){if(j.tag===7){n(b,j.sibling),x=i(j,w.props.children),x.return=b,b=x;break e}}else if(j.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Ws&&ZO(_)===j.type){n(b,j.sibling),x=i(j,w.props),x.ref=Cf(b,j,w),x.return=b,b=x;break e}n(b,j);break}else t(b,j);j=j.sibling}w.type===Bc?(x=Al(w.props.children,b.mode,S,w.key),x.return=b,b=x):(S=Rv(w.type,w.key,w.props,null,b.mode,S),S.ref=Cf(b,x,w),S.return=b,b=S)}return s(b);case Fc:e:{for(j=w.key;x!==null;){if(x.key===j)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(b,x.sibling),x=i(x,w.children||[]),x.return=b,b=x;break e}else{n(b,x);break}else t(b,x);x=x.sibling}x=T_(w,b.mode,S),x.return=b,b=x}return s(b);case Ws:return j=w._init,y(b,x,j(w._payload),S)}if(Zf(w))return m(b,x,w,S);if(wf(w))return g(b,x,w,S);jg(b,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(n(b,x.sibling),x=i(x,w),x.return=b,b=x):(n(b,x),x=A_(w,b.mode,S),x.return=b,b=x),s(b)):n(b,x)}return y}var Mu=M4(!0),$4=M4(!1),hy=Ua(null),py=null,Gc=null,_P=null;function SP(){_P=Gc=py=null}function jP(e){var t=hy.current;kt(hy),e._currentValue=t}function W1(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function pu(e,t){py=e,_P=Gc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(sr=!0),e.firstContext=null)}function ii(e){var t=e._currentValue;if(_P!==e)if(e={context:e,memoizedValue:t,next:null},Gc===null){if(py===null)throw Error(le(308));Gc=e,py.dependencies={lanes:0,firstContext:e}}else Gc=Gc.next=e;return t}var yl=null;function EP(e){yl===null?yl=[e]:yl.push(e)}function D4(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,EP(t)):(n.next=i.next,i.next=n),t.interleaved=n,hs(e,r)}function hs(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Hs=!1;function CP(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function L4(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ns(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ha(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ze&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,hs(e,n)}return i=r.interleaved,i===null?(t.next=t,EP(r)):(t.next=i.next,i.next=t),r.interleaved=t,hs(e,n)}function Cv(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dP(e,n)}}function eI(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function my(e,t,n,r){var i=e.updateQueue;Hs=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var c=a,u=c.next;c.next=null,s===null?o=u:s.next=u,s=c;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==s&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=i.baseState;s=0,d=u=c=null,a=o;do{var h=a.lane,p=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,g=a;switch(h=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){f=m.call(p,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,h=typeof m=="function"?m.call(p,f,h):m,h==null)break e;f=Ut({},f,h);break e;case 2:Hs=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,c=f):d=d.next=p,s|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(d===null&&(c=f),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Bl|=s,e.lanes=s,e.memoizedState=f}}function tI(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(le(191,i));i.call(r)}}}var Sm={},uo=Ua(Sm),Jh=Ua(Sm),Xh=Ua(Sm);function xl(e){if(e===Sm)throw Error(le(174));return e}function NP(e,t){switch(St(Xh,t),St(Jh,e),St(uo,Sm),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:C1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=C1(t,e)}kt(uo),St(uo,t)}function $u(){kt(uo),kt(Jh),kt(Xh)}function F4(e){xl(Xh.current);var t=xl(uo.current),n=C1(t,e.type);t!==n&&(St(Jh,e),St(uo,n))}function PP(e){Jh.current===e&&(kt(uo),kt(Jh))}var $t=Ua(0);function gy(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var j_=[];function kP(){for(var e=0;e<j_.length;e++)j_[e]._workInProgressVersionPrimary=null;j_.length=0}var Nv=Cs.ReactCurrentDispatcher,E_=Cs.ReactCurrentBatchConfig,Fl=0,Lt=null,an=null,hn=null,vy=!1,yh=!1,Zh=0,zne=0;function En(){throw Error(le(321))}function AP(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fi(e[n],t[n]))return!1;return!0}
vendor: 5,577 bytes, line 55
55function TP(e,t,n,r,i,o){if(Fl=o,Lt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Nv.current=e===null||e.memoizedState===null?Wne:Hne,e=n(r,i),yh){o=0;do{if(yh=!1,Zh=0,25<=o)throw Error(le(301));o+=1,hn=an=null,t.updateQueue=null,Nv.current=Gne,e=n(r,i)}while(yh)}if(Nv.current=yy,t=an!==null&&an.next!==null,Fl=0,hn=an=Lt=null,vy=!1,t)throw Error(le(300));return e}function RP(){var e=Zh!==0;return Zh=0,e}function ro(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return hn===null?Lt.memoizedState=hn=e:hn=hn.next=e,hn}function oi(){if(an===null){var e=Lt.alternate;e=e!==null?e.memoizedState:null}else e=an.next;var t=hn===null?Lt.memoizedState:hn.next;if(t!==null)hn=t,an=e;else{if(e===null)throw Error(le(310));an=e,e={memoizedState:an.memoizedState,baseState:an.baseState,baseQueue:an.baseQueue,queue:an.queue,next:null},hn===null?Lt.memoizedState=hn=e:hn=hn.next=e}return hn}function ep(e,t){return typeof t=="function"?t(e):t}function C_(e){var t=oi(),n=t.queue;if(n===null)throw Error(le(311));n.lastRenderedReducer=e;var r=an,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var a=s=null,c=null,u=o;do{var d=u.lane;if((Fl&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(a=c=f,s=r):c=c.next=f,Lt.lanes|=d,Bl|=d}u=u.next}while(u!==null&&u!==o);c===null?s=r:c.next=a,Fi(r,t.memoizedState)||(sr=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Lt.lanes|=o,Bl|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function N_(e){var t=oi(),n=t.queue;if(n===null)throw Error(le(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Fi(o,t.memoizedState)||(sr=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function B4(){}function U4(e,t){var n=Lt,r=oi(),i=t(),o=!Fi(r.memoizedState,i);if(o&&(r.memoizedState=i,sr=!0),r=r.queue,OP(q4.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||hn!==null&&hn.memoizedState.tag&1){if(n.flags|=2048,tp(9,V4.bind(null,n,r,i,t),void 0,null),mn===null)throw Error(le(349));Fl&30||z4(n,t,i)}return i}function z4(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Lt.updateQueue,t===null?(t={lastEffect:null,stores:null},Lt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function V4(e,t,n,r){t.value=n,t.getSnapshot=r,K4(t)&&W4(e)}function q4(e,t,n){return n(function(){K4(t)&&W4(e)})}function K4(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fi(e,n)}catch{return!0}}function W4(e){var t=hs(e,1);t!==null&&Ii(t,e,1,-1)}function nI(e){var t=ro();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ep,lastRenderedState:e},t.queue=e,e=e.dispatch=Kne.bind(null,Lt,e),[t.memoizedState,e]}function tp(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Lt.updateQueue,t===null?(t={lastEffect:null,stores:null},Lt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function H4(){return oi().memoizedState}function Pv(e,t,n,r){var i=ro();Lt.flags|=e,i.memoizedState=tp(1|t,n,void 0,r===void 0?null:r)}function Db(e,t,n,r){var i=oi();r=r===void 0?null:r;var o=void 0;if(an!==null){var s=an.memoizedState;if(o=s.destroy,r!==null&&AP(r,s.deps)){i.memoizedState=tp(t,n,o,r);return}}Lt.flags|=e,i.memoizedState=tp(1|t,n,o,r)}function rI(e,t){return Pv(8390656,8,e,t)}function OP(e,t){return Db(2048,8,e,t)}function G4(e,t){return Db(4,2,e,t)}function Y4(e,t){return Db(4,4,e,t)}function Q4(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function J4(e,t,n){return n=n!=null?n.concat([e]):null,Db(4,4,Q4.bind(null,t,e),n)}function IP(){}function X4(e,t){var n=oi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&AP(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Z4(e,t){var n=oi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&AP(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ez(e,t,n){return Fl&21?(Fi(n,t)||(n=o4(),Lt.lanes|=n,Bl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,sr=!0),e.memoizedState=n)}function Vne(e,t){var n=at;at=n!==0&&4>n?n:4,e(!0);var r=E_.transition;E_.transition={};try{e(!1),t()}finally{at=n,E_.transition=r}}function tz(){return oi().memoizedState}function qne(e,t,n){var r=ma(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},nz(e))rz(t,n);else if(n=D4(e,t,n,r),n!==null){var i=Yn();Ii(n,e,r,i),iz(n,t,r)}}function Kne(e,t,n){var r=ma(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(nz(e))rz(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Fi(a,s)){var c=t.interleaved;c===null?(i.next=i,EP(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=D4(e,t,i,r),n!==null&&(i=Yn(),Ii(n,e,r,i),iz(n,t,r))}}function nz(e){var t=e.alternate;return e===Lt||t!==null&&t===Lt}
vendor: 7,475 bytes, lines 55-57
55function rz(e,t){yh=vy=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function iz(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dP(e,n)}}var yy={readContext:ii,useCallback:En,useContext:En,useEffect:En,useImperativeHandle:En,useInsertionEffect:En,useLayoutEffect:En,useMemo:En,useReducer:En,useRef:En,useState:En,useDebugValue:En,useDeferredValue:En,useTransition:En,useMutableSource:En,useSyncExternalStore:En,useId:En,unstable_isNewReconciler:!1},Wne={readContext:ii,useCallback:function(e,t){return ro().memoizedState=[e,t===void 0?null:t],e},useContext:ii,useEffect:rI,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Pv(4194308,4,Q4.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Pv(4194308,4,e,t)},useInsertionEffect:function(e,t){return Pv(4,2,e,t)},useMemo:function(e,t){var n=ro();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ro();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=qne.bind(null,Lt,e),[r.memoizedState,e]},useRef:function(e){var t=ro();return e={current:e},t.memoizedState=e},useState:nI,useDebugValue:IP,useDeferredValue:function(e){return ro().memoizedState=e},useTransition:function(){var e=nI(!1),t=e[0];return e=Vne.bind(null,e[1]),ro().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Lt,i=ro();if(Rt){if(n===void 0)throw Error(le(407));n=n()}else{if(n=t(),mn===null)throw Error(le(349));Fl&30||z4(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,rI(q4.bind(null,r,o,e),[e]),r.flags|=2048,tp(9,V4.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ro(),t=mn.identifierPrefix;if(Rt){var n=Go,r=Ho;n=(r&~(1<<32-Oi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Zh++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=zne++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Hne={readContext:ii,useCallback:X4,useContext:ii,useEffect:OP,useImperativeHandle:J4,useInsertionEffect:G4,useLayoutEffect:Y4,useMemo:Z4,useReducer:C_,useRef:H4,useState:function(){return C_(ep)},useDebugValue:IP,useDeferredValue:function(e){var t=oi();return ez(t,an.memoizedState,e)},useTransition:function(){var e=C_(ep)[0],t=oi().memoizedState;return[e,t]},useMutableSource:B4,useSyncExternalStore:U4,useId:tz,unstable_isNewReconciler:!1},Gne={readContext:ii,useCallback:X4,useContext:ii,useEffect:OP,useImperativeHandle:J4,useInsertionEffect:G4,useLayoutEffect:Y4,useMemo:Z4,useReducer:N_,useRef:H4,useState:function(){return N_(ep)},useDebugValue:IP,useDeferredValue:function(e){var t=oi();return an===null?t.memoizedState=e:ez(t,an.memoizedState,e)},useTransition:function(){var e=N_(ep)[0],t=oi().memoizedState;return[e,t]},useMutableSource:B4,useSyncExternalStore:U4,useId:tz,unstable_isNewReconciler:!1};function vi(e,t){if(e&&e.defaultProps){t=Ut({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function H1(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ut({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Lb={isMounted:function(e){return(e=e._reactInternals)?oc(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Yn(),i=ma(e),o=ns(r,i);o.payload=t,n!=null&&(o.callback=n),t=ha(e,o,i),t!==null&&(Ii(t,e,i,r),Cv(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Yn(),i=ma(e),o=ns(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=ha(e,o,i),t!==null&&(Ii(t,e,i,r),Cv(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Yn(),r=ma(e),i=ns(n,r);i.tag=2,t!=null&&(i.callback=t),t=ha(e,i,r),t!==null&&(Ii(t,e,r,n),Cv(t,e,r))}};function iI(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!Hh(n,r)||!Hh(i,o):!0}function oz(e,t,n){var r=!1,i=ja,o=t.contextType;return typeof o=="object"&&o!==null?o=ii(o):(i=cr(t)?Dl:Ln.current,r=t.contextTypes,o=(r=r!=null)?Ou(e,i):ja),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Lb,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function oI(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Lb.enqueueReplaceState(t,t.state,null)}function G1(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},CP(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=ii(o):(o=cr(t)?Dl:Ln.current,i.context=Ou(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(H1(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Lb.enqueueReplaceState(i,i.state,null),my(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Du(e,t){try{var n="",r=t;do n+=_te(r),r=r.return;while(r);var i=n}catch(o){i=` 56Error generating stack: `+o.message+` 57`+o.stack}return{value:e,source:t,stack:i,digest:null}}function P_(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Y1(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Yne=typeof WeakMap=="function"?WeakMap:Map;function sz(e,t,n){n=ns(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){by||(by=!0,oj=r),Y1(e,t)},n}function az(e,t,n){n=ns(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Y1(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Y1(e,t),typeof r!="function"&&(pa===null?pa=new Set([this]):pa.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function sI(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Yne;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=cre.bind(null,e,t,n),t.then(e,e))}function aI(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function lI(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ns(-1,1),t.tag=2,ha(n,t,1))),n.lanes|=1),e)}var Qne=Cs.ReactCurrentOwner,sr=!1;function Wn(e,t,n,r){t.child=e===null?$4(t,null,n,r):Mu(t,e.child,n,r)}function cI(e,t,n,r,i){n=n.render;var o=t.ref;return pu(t,i),r=TP(e,t,n,r,o,i),n=RP(),e!==null&&!sr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ps(e,t,i)):(Rt&&n&&xP(t),t.flags|=1,Wn(e,t,r,i),t.child)}function uI(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!zP(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,lz(e,t,o,r,i)):(e=
vendor: 6,452 bytes, line 57
57Rv(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Hh,n(s,r)&&e.ref===t.ref)return ps(e,t,i)}return t.flags|=1,e=ga(o,r),e.ref=t.ref,e.return=t,t.child=e}function lz(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Hh(o,r)&&e.ref===t.ref)if(sr=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(sr=!0);else return t.lanes=e.lanes,ps(e,t,i)}return Q1(e,t,n,r,i)}function cz(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},St(Qc,Sr),Sr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,St(Qc,Sr),Sr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,St(Qc,Sr),Sr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,St(Qc,Sr),Sr|=r;return Wn(e,t,i,n),t.child}function uz(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Q1(e,t,n,r,i){var o=cr(n)?Dl:Ln.current;return o=Ou(t,o),pu(t,i),n=TP(e,t,n,r,o,i),r=RP(),e!==null&&!sr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ps(e,t,i)):(Rt&&r&&xP(t),t.flags|=1,Wn(e,t,n,i),t.child)}function dI(e,t,n,r,i){if(cr(n)){var o=!0;uy(t)}else o=!1;if(pu(t,i),t.stateNode===null)kv(e,t),oz(t,n,r),G1(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var c=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=ii(u):(u=cr(n)?Dl:Ln.current,u=Ou(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||c!==u)&&oI(t,s,r,u),Hs=!1;var h=t.memoizedState;s.state=h,my(t,r,s,i),c=t.memoizedState,a!==r||h!==c||lr.current||Hs?(typeof d=="function"&&(H1(t,n,d,r),c=t.memoizedState),(a=Hs||iI(t,n,a,r,h,c,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,L4(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:vi(t.type,a),s.props=u,f=t.pendingProps,h=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=ii(c):(c=cr(n)?Dl:Ln.current,c=Ou(t,c));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||h!==c)&&oI(t,s,r,c),Hs=!1,h=t.memoizedState,s.state=h,my(t,r,s,i);var m=t.memoizedState;a!==f||h!==m||lr.current||Hs?(typeof p=="function"&&(H1(t,n,p,r),m=t.memoizedState),(u=Hs||iI(t,n,u,r,h,m,c)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,m,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,m,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),s.props=r,s.state=m,s.context=c,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return J1(e,t,n,r,o,i)}function J1(e,t,n,r,i,o){uz(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&QO(t,n,!1),ps(e,t,o);r=t.stateNode,Qne.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Mu(t,e.child,null,o),t.child=Mu(t,null,a,o)):Wn(e,t,a,o),t.memoizedState=r.state,i&&QO(t,n,!0),t.child}function dz(e){var t=e.stateNode;t.pendingContext?YO(e,t.pendingContext,t.pendingContext!==t.context):t.context&&YO(e,t.context,!1),NP(e,t.containerInfo)}function fI(e,t,n,r,i){return Iu(),wP(i),t.flags|=256,Wn(e,t,n,r),t.child}var X1={dehydrated:null,treeContext:null,retryLane:0};function Z1(e){return{baseLanes:e,cachePool:null,transitions:null}}function fz(e,t,n){var r=t.pendingProps,i=$t.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),St($t,i&1),e===null)return K1(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Ub(s,r,0,null),e=Al(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Z1(n),t.memoizedState=X1,e):MP(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return Jne(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var c={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=ga(i,c),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=ga(a,o):(o=Al(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Z1(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=X1,r}return o=e.child,e=o.sibling,r=ga(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function MP(e,t){return t=Ub({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Eg(e,t,n,r){return r!==null&&wP(r),Mu(t,e.child,null,n),e=MP(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}
vendor: 9,884 bytes, line 57
57function Jne(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=P_(Error(le(422))),Eg(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Ub({mode:"visible",children:r.children},i,0,null),o=Al(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Mu(t,e.child,null,s),t.child.memoizedState=Z1(s),t.memoizedState=X1,o);if(!(t.mode&1))return Eg(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(le(419)),r=P_(o,r,void 0),Eg(e,t,s,r)}if(a=(s&e.childLanes)!==0,sr||a){if(r=mn,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,hs(e,i),Ii(r,e,i,-1))}return UP(),r=P_(Error(le(421))),Eg(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=ure.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,kr=fa(i.nextSibling),Tr=t,Rt=!0,Ei=null,e!==null&&(Qr[Jr++]=Ho,Qr[Jr++]=Go,Qr[Jr++]=Ll,Ho=e.id,Go=e.overflow,Ll=t),t=MP(t,r.children),t.flags|=4096,t)}function hI(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),W1(e.return,t,n)}function k_(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function hz(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Wn(e,t,r.children,n),r=$t.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hI(e,n,t);else if(e.tag===19)hI(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(St($t,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&gy(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),k_(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&gy(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}k_(t,!0,n,null,o);break;case"together":k_(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function kv(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ps(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Bl|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(le(153));if(t.child!==null){for(e=t.child,n=ga(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ga(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Xne(e,t,n){switch(t.tag){case 3:dz(t),Iu();break;case 5:F4(t);break;case 1:cr(t.type)&&uy(t);break;case 4:NP(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;St(hy,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(St($t,$t.current&1),t.flags|=128,null):n&t.child.childLanes?fz(e,t,n):(St($t,$t.current&1),e=ps(e,t,n),e!==null?e.sibling:null);St($t,$t.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return hz(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),St($t,$t.current),r)break;return null;case 22:case 23:return t.lanes=0,cz(e,t,n)}return ps(e,t,n)}var pz,ej,mz,gz;pz=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ej=function(){};mz=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,xl(uo.current);var o=null;switch(n){case"input":i=_1(e,i),r=_1(e,r),o=[];break;case"select":i=Ut({},i,{value:void 0}),r=Ut({},r,{value:void 0}),o=[];break;case"textarea":i=E1(e,i),r=E1(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ly)}N1(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Bh.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(a=i?.[u],r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&a[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Bh.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Et("scroll",e),o||a===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};gz=function(e,t,n,r){n!==r&&(t.flags|=4)};function Nf(e,t){if(!Rt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Cn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Zne(e,t,n){var r=t.pendingProps;switch(bP(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Cn(t),null;case 1:return cr(t.type)&&cy(),Cn(t),null;case 3:return r=t.stateNode,$u(),kt(lr),kt(Ln),kP(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Sg(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ei!==null&&(lj(Ei),Ei=null))),ej(e,t),Cn(t),null;case 5:PP(t);var i=xl(Xh.current);if(n=t.type,e!==null&&t.stateNode!=null)mz(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(le(166));return Cn(t),null}if(e=xl(uo.current),Sg(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[so]=t,r[Qh]=o,e=(t.mode&1)!==0,n){case"dialog":Et("cancel",r),Et("close",r);break;case"iframe":case"object":case"embed":Et("load",r);break;case"video":case"audio":for(i=0;i<th.length;i++)Et(th[i],r);break;case"source":Et("error",r);break;case"img":case"image":case"link":Et("error",r),Et("load",r);break;case"details":Et("toggle",r);break;case"input":_O(r,o),Et("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Et("invalid",r);break;case"textarea":jO(r,o),Et("invalid",r)}N1(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&_g(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&_g(r.textContent,a,e),i=["children",""+a]):Bh.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Et("scroll",r)}switch(n){case"input":pg(r),SO(r,o,!0);break;case"textarea":pg(r),EO(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=ly)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=qU(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[so]=t,e[Qh]=r,pz(e,t,!1,!1),t.stateNode=e;e:{switch(s=P1(n,r),n){case"dialog":Et("cancel",e),Et("close",e),i=r;break;case"iframe":case"object":case"embed":Et("load",e),i=r;break;case"video":case"audio":for(i=0;i<th.length;i++)Et(th[i],e);i=r;break;case"source":Et("error",e),i=r;break;case"img":case"image":case"link":Et("error",e),Et("load",e),i=r;break;case"details":Et("toggle",e),i=r;break;case"input":_O(e,r),i=_1(e,r),Et("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ut({},r,{value:void 0}),Et("invalid",e);break;case"textarea":jO(e,r),i=E1(e,r),Et("invalid",e);break;default:i=r}N1(n,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var c=a[o];o==="style"?HU(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&KU(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Uh(e,c):typeof c=="number"&&Uh(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Bh.hasOwnProperty(o)?c!=null&&o==="onScroll"&&Et("scroll",e):c!=null&&oP(e,o,c,s))}switch(n){case"input":pg(e),SO(e,r,!1);break;case"textarea":pg(e),EO(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Sa(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?uu(e,!!r.multiple,o,!1):r.defaultValue!=null&&uu(e,!!r.multiple,r.defaultValue,!0);break;
vendor: 28,969 bytes, line 57
57default:typeof i.onClick=="function"&&(e.onclick=ly)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Cn(t),null;case 6:if(e&&t.stateNode!=null)gz(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(le(166));if(n=xl(Xh.current),xl(uo.current),Sg(t)){if(r=t.stateNode,n=t.memoizedProps,r[so]=t,(o=r.nodeValue!==n)&&(e=Tr,e!==null))switch(e.tag){case 3:_g(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_g(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[so]=t,t.stateNode=r}return Cn(t),null;case 13:if(kt($t),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Rt&&kr!==null&&t.mode&1&&!(t.flags&128))I4(),Iu(),t.flags|=98560,o=!1;else if(o=Sg(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(le(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(le(317));o[so]=t}else Iu(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Cn(t),o=!1}else Ei!==null&&(lj(Ei),Ei=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||$t.current&1?ln===0&&(ln=3):UP())),t.updateQueue!==null&&(t.flags|=4),Cn(t),null);case 4:return $u(),ej(e,t),e===null&&Gh(t.stateNode.containerInfo),Cn(t),null;case 10:return jP(t.type._context),Cn(t),null;case 17:return cr(t.type)&&cy(),Cn(t),null;case 19:if(kt($t),o=t.memoizedState,o===null)return Cn(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)Nf(o,!1);else{if(ln!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=gy(e),s!==null){for(t.flags|=128,Nf(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return St($t,$t.current&1|2),t.child}e=e.sibling}o.tail!==null&&Qt()>Lu&&(t.flags|=128,r=!0,Nf(o,!1),t.lanes=4194304)}else{if(!r)if(e=gy(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Nf(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Rt)return Cn(t),null}else 2*Qt()-o.renderingStartTime>Lu&&n!==1073741824&&(t.flags|=128,r=!0,Nf(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Qt(),t.sibling=null,n=$t.current,St($t,r?n&1|2:n&1),t):(Cn(t),null);case 22:case 23:return BP(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Sr&1073741824&&(Cn(t),t.subtreeFlags&6&&(t.flags|=8192)):Cn(t),null;case 24:return null;case 25:return null}throw Error(le(156,t.tag))}function ere(e,t){switch(bP(t),t.tag){case 1:return cr(t.type)&&cy(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $u(),kt(lr),kt(Ln),kP(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return PP(t),null;case 13:if(kt($t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(le(340));Iu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return kt($t),null;case 4:return $u(),null;case 10:return jP(t.type._context),null;case 22:case 23:return BP(),null;case 24:return null;default:return null}}var Cg=!1,Tn=!1,tre=typeof WeakSet=="function"?WeakSet:Set,we=null;function Yc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Vt(e,t,r)}else n.current=null}function tj(e,t,n){try{n()}catch(r){Vt(e,t,r)}}var pI=!1;function nre(e,t){if(L1=oy,e=w4(),yP(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(a=s+i),f!==o||r!==0&&f.nodeType!==3||(c=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===i&&(a=s),h===o&&++d===r&&(c=s),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(F1={focusedElem:e,selectionRange:n},oy=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,y=m.memoizedState,b=t.stateNode,x=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:vi(t.type,g),y);b.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(le(163))}}catch(S){Vt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return m=pI,pI=!1,m}function xh(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&tj(t,n,o)}i=i.next}while(i!==r)}}function Fb(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function nj(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function vz(e){var t=e.alternate;t!==null&&(e.alternate=null,vz(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[so],delete t[Qh],delete t[z1],delete t[Lne],delete t[Fne])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function yz(e){return e.tag===5||e.tag===3||e.tag===4}function mI(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yz(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rj(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ly));else if(r!==4&&(e=e.child,e!==null))for(rj(e,t,n),e=e.sibling;e!==null;)rj(e,t,n),e=e.sibling}function ij(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ij(e,t,n),e=e.sibling;e!==null;)ij(e,t,n),e=e.sibling}var yn=null,wi=!1;function Ls(e,t,n){for(n=n.child;n!==null;)xz(e,t,n),n=n.sibling}function xz(e,t,n){if(co&&typeof co.onCommitFiberUnmount=="function")try{co.onCommitFiberUnmount(Tb,n)}catch{}switch(n.tag){case 5:Tn||Yc(n,t);case 6:var r=yn,i=wi;yn=null,Ls(e,t,n),yn=r,wi=i,yn!==null&&(wi?(e=yn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):yn.removeChild(n.stateNode));break;case 18:yn!==null&&(wi?(e=yn,n=n.stateNode,e.nodeType===8?__(e.parentNode,n):e.nodeType===1&&__(e,n),Kh(e)):__(yn,n.stateNode));break;case 4:r=yn,i=wi,yn=n.stateNode.containerInfo,wi=!0,Ls(e,t,n),yn=r,wi=i;break;case 0:case 11:case 14:case 15:if(!Tn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&tj(n,t,s),i=i.next}while(i!==r)}Ls(e,t,n);break;case 1:if(!Tn&&(Yc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Vt(n,t,a)}Ls(e,t,n);break;case 21:Ls(e,t,n);break;case 22:n.mode&1?(Tn=(r=Tn)||n.memoizedState!==null,Ls(e,t,n),Tn=r):Ls(e,t,n);break;default:Ls(e,t,n)}}function gI(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tre),t.forEach(function(r){var i=dre.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hi(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:yn=a.stateNode,wi=!1;break e;case 3:yn=a.stateNode.containerInfo,wi=!0;break e;case 4:yn=a.stateNode.containerInfo,wi=!0;break e}a=a.return}if(yn===null)throw Error(le(160));xz(o,s,i),yn=null,wi=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){Vt(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)bz(t,e),t=t.sibling}function bz(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hi(t,e),Xi(e),r&4){try{xh(3,e,e.return),Fb(3,e)}catch(g){Vt(e,e.return,g)}try{xh(5,e,e.return)}catch(g){Vt(e,e.return,g)}}break;case 1:hi(t,e),Xi(e),r&512&&n!==null&&Yc(n,n.return);break;case 5:if(hi(t,e),Xi(e),r&512&&n!==null&&Yc(n,n.return),e.flags&32){var i=e.stateNode;try{Uh(i,"")}catch(g){Vt(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&zU(i,o),P1(a,s);var u=P1(a,o);for(s=0;s<c.length;s+=2){var d=c[s],f=c[s+1];d==="style"?HU(i,f):d==="dangerouslySetInnerHTML"?KU(i,f):d==="children"?Uh(i,f):oP(i,d,f,u)}switch(a){case"input":S1(i,o);break;case"textarea":VU(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?uu(i,!!o.multiple,p,!1):h!==!!o.multiple&&(o.defaultValue!=null?uu(i,!!o.multiple,o.defaultValue,!0):uu(i,!!o.multiple,o.multiple?[]:"",!1))}i[Qh]=o}catch(g){Vt(e,e.return,g)}}break;case 6:if(hi(t,e),Xi(e),r&4){if(e.stateNode===null)throw Error(le(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(g){Vt(e,e.return,g)}}break;case 3:if(hi(t,e),Xi(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Kh(t.containerInfo)}catch(g){Vt(e,e.return,g)}break;case 4:hi(t,e),Xi(e);break;case 13:hi(t,e),Xi(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(LP=Qt())),r&4&&gI(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Tn=(u=Tn)||d,hi(t,e),Tn=u):hi(t,e),Xi(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(we=e,d=e.child;d!==null;){for(f=we=d;we!==null;){switch(h=we,p=h.child,h.tag){case 0:case 11:case 14:case 15:xh(4,h,h.return);break;case 1:Yc(h,h.return);var m=h.stateNode;if(typeof m.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){Vt(r,n,g)}}break;case 5:Yc(h,h.return);break;case 22:if(h.memoizedState!==null){yI(f);continue}}p!==null?(p.return=h,we=p):yI(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,c=f.memoizedProps.style,s=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=WU("display",s))}catch(g){Vt(e,e.return,g)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){Vt(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:hi(t,e),Xi(e),r&4&&gI(e);break;case 21:break;default:hi(t,e),Xi(e)}}function Xi(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(yz(n)){var r=n;break e}n=n.return}throw Error(le(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Uh(i,""),r.flags&=-33);var o=mI(e);ij(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,a=mI(e);rj(e,a,s);break;default:throw Error(le(161))}}catch(c){Vt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rre(e,t,n){we=e,wz(e)}function wz(e,t,n){for(var r=(e.mode&1)!==0;we!==null;){var i=we,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Cg;if(!s){var a=i.alternate,c=a!==null&&a.memoizedState!==null||Tn;a=Cg;var u=Tn;if(Cg=s,(Tn=c)&&!u)for(we=i;we!==null;)s=we,c=s.child,s.tag===22&&s.memoizedState!==null?xI(i):c!==null?(c.return=s,we=c):xI(i);for(;o!==null;)we=o,wz(o),o=o.sibling;we=i,Cg=a,Tn=u}vI(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,we=o):vI(e)}}function vI(e){for(;we!==null;){var t=we;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Tn||Fb(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Tn)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:vi(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&tI(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}tI(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Kh(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(le(163))}Tn||t.flags&512&&nj(t)}catch(h){Vt(t,t.return,h)}}if(t===e){we=null;break}if(n=t.sibling,n!==null){n.return=t.return,we=n;break}we=t.return}}function yI(e){for(;we!==null;){var t=we;if(t===e){we=null;break}var n=t.sibling;if(n!==null){n.return=t.return,we=n;break}we=t.return}}function xI(e){for(;we!==null;){var t=we;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Fb(4,t)}catch(c){Vt(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(c){Vt(t,i,c)}}var o=t.return;try{nj(t)}catch(c){Vt(t,o,c)}break;case 5:var s=t.return;try{nj(t)}catch(c){Vt(t,s,c)}}}catch(c){Vt(t,t.return,c)}if(t===e){we=null;break}var a=t.sibling;if(a!==null){a.return=t.return,we=a;break}we=t.return}}var ire=Math.ceil,xy=Cs.ReactCurrentDispatcher,$P=Cs.ReactCurrentOwner,ei=Cs.ReactCurrentBatchConfig,Ze=0,mn=null,tn=null,_n=0,Sr=0,Qc=Ua(0),ln=0,np=null,Bl=0,Bb=0,DP=0,bh=null,ir=null,LP=0,Lu=1/0,Uo=null,by=!1,oj=null,pa=null,Ng=!1,aa=null,wy=0,wh=0,sj=null,Av=-1,Tv=0;function Yn(){return Ze&6?Qt():Av!==-1?Av:Av=Qt()}function ma(e){return e.mode&1?Ze&2&&_n!==0?_n&-_n:Une.transition!==null?(Tv===0&&(Tv=o4()),Tv):(e=at,e!==0||(e=window.event,e=e===void 0?16:f4(e.type)),e):1}function Ii(e,t,n,r){if(50<wh)throw wh=0,sj=null,Error(le(185));bm(e,n,r),(!(Ze&2)||e!==mn)&&(e===mn&&(!(Ze&2)&&(Bb|=n),ln===4&&Zs(e,_n)),ur(e,r),n===1&&Ze===0&&!(t.mode&1)&&(Lu=Qt()+500,$b&&za()))}function ur(e,t){var n=e.callbackNode;Ute(e,t);var r=iy(e,e===mn?_n:0);if(r===0)n!==null&&PO(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&PO(n),t===1)e.tag===0?Bne(bI.bind(null,e)):T4(bI.bind(null,e)),$ne(function(){!(Ze&6)&&za()}),n=null;else{switch(s4(r)){case 1:n=uP;break;case 4:n=r4;break;case 16:n=ry;break;case 536870912:n=i4;break;default:n=ry}n=kz(n,_z.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function _z(e,t){if(Av=-1,Tv=0,Ze&6)throw Error(le(327));var n=e.callbackNode;if(mu()&&e.callbackNode!==n)return null;var r=iy(e,e===mn?_n:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=_y(e,r);else{t=r;var i=Ze;Ze|=2;var o=jz();(mn!==e||_n!==t)&&(Uo=null,Lu=Qt()+500,kl(e,t));do try{are();break}catch(a){Sz(e,a)}while(!0);SP(),xy.current=o,Ze=i,tn!==null?t=0:(mn=null,_n=0,t=ln)}if(t!==0){if(t===2&&(i=O1(e),i!==0&&(r=i,t=aj(e,i))),t===1)throw n=np,kl(e,0),Zs(e,r),ur(e,Qt()),n;if(t===6)Zs(e,r);else{if(i=e.current.alternate,!(r&30)&&!ore(i)&&(t=_y(e,r),t===2&&(o=O1(e),o!==0&&(r=o,t=aj(e,o))),t===1))throw n=np,kl(e,0),Zs(e,r),ur(e,Qt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(le(345));case 2:al(e,ir,Uo);break;case 3:if(Zs(e,r),(r&130023424)===r&&(t=LP+500-Qt(),10<t)){if(iy(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Yn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=U1(al.bind(null,e,ir,Uo),t);break}al(e,ir,Uo);break;case 4:if(Zs(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Oi(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=Qt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ire(r/1960))-r,10<r){e.timeoutHandle=U1(al.bind(null,e,ir,Uo),r);break}al(e,ir,Uo);break;case 5:al(e,ir,Uo);break;default:throw Error(le(329))}}}return ur(e,Qt()),e.callbackNode===n?_z.bind(null,e):null}function aj(e,t){var n=bh;return e.current.memoizedState.isDehydrated&&(kl(e,t).flags|=256),e=_y(e,t),e!==2&&(t=ir,ir=n,t!==null&&lj(t)),e}function lj(e){ir===null?ir=e:ir.push.apply(ir,e)}function ore(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Fi(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Zs(e,t){for(t&=~DP,t&=~Bb,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Oi(t),r=1<<n;e[n]=-1,t&=~r}}function bI(e){if(Ze&6)throw Error(le(327));mu();var t=iy(e,0);if(!(t&1))return ur(e,Qt()),null;var n=_y(e,t);if(e.tag!==0&&n===2){var r=O1(e);r!==0&&(t=r,n=aj(e,r))}if(n===1)throw n=np,kl(e,0),Zs(e,t),ur(e,Qt()),n;if(n===6)throw Error(le(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,al(e,ir,Uo),ur(e,Qt()),null}function FP(e,t){var n=Ze;Ze|=1;try{return e(t)}finally{Ze=n,Ze===0&&(Lu=Qt()+500,$b&&za())}}function Ul(e){aa!==null&&aa.tag===0&&!(Ze&6)&&mu();var t=Ze;Ze|=1;var n=ei.transition,r=at;try{if(ei.transition=null,at=1,e)return e()}finally{at=r,ei.transition=n,Ze=t,!(Ze&6)&&za()}}function BP(){Sr=Qc.current,kt(Qc)}function kl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Mne(n)),tn!==null)for(n=tn.return;n!==null;){var r=n;switch(bP(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&cy();break;case 3:$u(),kt(lr),kt(Ln),kP();break;case 5:PP(r);break;case 4:$u();break;case 13:kt($t);break;case 19:kt($t);break;case 10:jP(r.type._context);break;case 22:case 23:BP()}n=n.return}if(mn=e,tn=e=ga(e.current,null),_n=Sr=t,ln=0,np=null,DP=Bb=Bl=0,ir=bh=null,yl!==null){for(t=0;t<yl.length;t++)if(n=yl[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}yl=null}return e}function Sz(e,t){do{var n=tn;try{if(SP(),Nv.current=yy,vy){for(var r=Lt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}vy=!1}if(Fl=0,hn=an=Lt=null,yh=!1,Zh=0,$P.current=null,n===null||n.return===null){ln=1,np=t,tn=null;break}e:{var o=e,s=n.return,a=n,c=t;if(t=_n,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=aI(s);if(p!==null){p.flags&=-257,lI(p,s,a,o,t),p.mode&1&&sI(o,u,t),t=p,c=u;var m=t.updateQueue;if(m===null){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}else{if(!(t&1)){sI(o,u,t),UP();break e}c=Error(le(426))}}else if(Rt&&a.mode&1){var y=aI(s);if(y!==null){!(y.flags&65536)&&(y.flags|=256),lI(y,s,a,o,t),wP(Du(c,a));break e}}o=c=Du(c,a),ln!==4&&(ln=2),bh===null?bh=[o]:bh.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var b=sz(o,c,t);eI(o,b);break e;case 1:a=c;var x=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(pa===null||!pa.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var S=az(o,a,t);eI(o,S);break e}}o=o.return}while(o!==null)}Cz(n)}catch(_){t=_,tn===n&&n!==null&&(tn=n=n.return);continue}break}while(!0)}function jz(){var e=xy.current;return xy.current=yy,e===null?yy:e}function UP(){(ln===0||ln===3||ln===2)&&(ln=4),mn===null||!(Bl&268435455)&&!(Bb&268435455)||Zs(mn,_n)}function _y(e,t){var n=Ze;Ze|=2;var r=jz();(mn!==e||_n!==t)&&(Uo=null,kl(e,t));do try{sre();break}catch(i){Sz(e,i)}while(!0);if(SP(),Ze=n,xy.current=r,tn!==null)throw Error(le(261));return mn=null,_n=0,ln}function sre(){for(;tn!==null;)Ez(tn)}function are(){for(;tn!==null&&!Rte();)Ez(tn)}function Ez(e){var t=Pz(e.alternate,e,Sr);e.memoizedProps=e.pendingProps,t===null?Cz(e):tn=t,$P.current=null}function Cz(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=ere(n,t),n!==null){n.flags&=32767,tn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ln=6,tn=null;return}}else if(n=Zne(n,t,Sr),n!==null){tn=n;return}if(t=t.sibling,t!==null){tn=t;return}tn=t=e}while(t!==null);ln===0&&(ln=5)}function al(e,t,n){var r=at,i=ei.transition;try{ei.transition=null,at=1,lre(e,t,n,r)}finally{ei.transition=i,at=r}return null}function lre(e,t,n,r){do mu();while(aa!==null);if(Ze&6)throw Error(le(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(le(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(zte(e,o),e===mn&&(tn=mn=null,_n=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ng||(Ng=!0,kz(ry,function(){return mu(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=ei.transition,ei.transition=null;var s=at;at=1;var a=Ze;Ze|=4,$P.current=null,nre(e,n),bz(n,e),Pne(F1),oy=!!L1,F1=L1=null,e.current=n,rre(n),Ote(),Ze=a,at=s,ei.transition=o}else e.current=n;if(Ng&&(Ng=!1,aa=e,wy=i),o=e.pendingLanes,o===0&&(pa=null),$te(n.stateNode),ur(e,Qt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(by)throw by=!1,e=oj,oj=null,e;return wy&1&&e.tag!==0&&mu(),o=e.pendingLanes,o&1?e===sj?wh++:(wh=0,sj=e):wh=0,za(),null}function mu(){if(aa!==null){var e=s4(wy),t=ei.transition,n=at;try{if(ei.transition=null,at=16>e?16:e,aa===null)var r=!1;else{if(e=aa,aa=null,wy=0,Ze&6)throw Error(le(331));var i=Ze;for(Ze|=4,we=e.current;we!==null;){var o=we,s=o.child;if(we.flags&16){var a=o.deletions;if(a!==null){for(var c=0;c<a.length;c++){var u=a[c];for(we=u;we!==null;){var d=we;switch(d.tag){case 0:case 11:case 15:xh(8,d,o)}var f=d.child;if(f!==null)f.return=d,we=f;else for(;we!==null;){d=we;var h=d.sibling,p=d.return;if(vz(d),d===u){we=null;break}if(h!==null){h.return=p,we=h;break}we=p}}}var m=o.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(g!==null)}}we=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,we=s;else e:for(;we!==null;){if(o=we,o.flags&2048)switch(o.tag){case 0:case 11:case 15:xh(9,o,o.return)}var b=o.sibling;if(b!==null){b.return=o.return,we=b;break e}we=o.return}}var x=e.current;for(we=x;we!==null;){s=we;var w=s.child;if(s.subtreeFlags&2064&&w!==null)w.return=s,we=w;else e:for(s=x;we!==null;){if(a=we,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Fb(9,a)}}catch(_){Vt(a,a.return,_)}if(a===s){we=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,we=S;break e}we=a.return}}if(Ze=i,za(),co&&typeof co.onPostCommitFiberRoot=="function")try{co.onPostCommitFiberRoot(Tb,e)}catch{}r=!0}return r}finally{at=n,ei.transition=t}}return!1}function wI(e,t,n){t=Du(n,t),t=sz(e,t,1),e=ha(e,t,1),t=Yn(),e!==null&&(bm(e,1,t),ur(e,t))}function Vt(e,t,n){if(e.tag===3)wI(e,e,n);else for(;t!==null;){if(t.tag===3){wI(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(pa===null||!pa.has(r))){e=Du(n,e),e=az(t,e,1),t=ha(t,e,1),e=Yn(),t!==null&&(bm(t,1,e),ur(t,e));break}}t=t.return}}function cre(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Yn(),e.pingedLanes|=e.suspendedLanes&n,mn===e&&(_n&n)===n&&(ln===4||ln===3&&(_n&130023424)===_n&&500>Qt()-LP?kl(e,0):DP|=n),ur(e,t)}function Nz(e,t){t===0&&(e.mode&1?(t=vg,vg<<=1,!(vg&130023424)&&(vg=4194304)):t=1);var n=Yn();e=hs(e,t),e!==null&&(bm(e,t,n),ur(e,n))}function ure(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Nz(e,n)}function dre(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(le(314))}r!==null&&r.delete(t),Nz(e,n)}var Pz;Pz=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||lr.current)sr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return sr=!1,Xne(e,t,n);sr=!!(e.flags&131072)}else sr=!1,Rt&&t.flags&1048576&&R4(t,fy,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;kv(e,t),e=t.pendingProps;var i=Ou(t,Ln.current);pu(t,n),i=TP(null,t,r,e,i,n);var o=RP();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,cr(r)?(o=!0,uy(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,CP(t),i.updater=Lb,t.stateNode=i,i._reactInternals=t,G1(t,r,e,n),t=J1(null,t,r,!0,o,n)):(t.tag=0,Rt&&o&&xP(t),Wn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(kv(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=hre(r),e=vi(r,e),i){case 0:t=Q1(null,t,r,e,n);break e;case 1:t=dI(null,t,r,e,n);break e;case 11:t=cI(null,t,r,e,n);break e;case 14:t=uI(null,t,r,vi(r.type,e),n);break e}throw Error(le(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vi(r,i),Q1(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vi(r,i),dI(e,t,r,i,n);case 3:e:{if(dz(t),e===null)throw Error(le(387));r=t.pendingProps,o=t.memoizedState,i=o.element,L4(e,t),my(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Du(Error(le(423)),t),t=fI(e,t,r,n,i);break e}else if(r!==i){i=Du(Error(le(424)),t),t=fI(e,t,r,n,i);break e}else for(kr=fa(t.stateNode.containerInfo.firstChild),Tr=t,Rt=!0,Ei=null,n=$4(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Iu(),r===i){t=ps(e,t,n);break e}Wn(e,t,r,n)}t=t.child}return t;case 5:return F4(t),e===null&&K1(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,B1(r,i)?s=null:o!==null&&B1(r,o)&&(t.flags|=32),uz(e,t),Wn(e,t,s,n),t.child;case 6:return e===null&&K1(t),null;case 13:return fz(e,t,n);case 4:return NP(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Mu(t,null,r,n):Wn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vi(r,i),cI(e,t,r,i,n);case 7:return Wn(e,t,t.pendingProps,n),t.child;case 8:return Wn(e,t,t.pendingProps.children,n),t.child;case 12:return Wn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,St(hy,r._currentValue),r._currentValue=s,o!==null)if(Fi(o.value,s)){if(o.children===i.children&&!lr.current){t=ps(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=ns(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),W1(o.return,n,t),a.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(le(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),W1(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Wn(e,t,i.children,n),t=t.child}return t;
vendor: 6,450 bytes, line 57
57case 9:return i=t.type,r=t.pendingProps.children,pu(t,n),i=ii(i),r=r(i),t.flags|=1,Wn(e,t,r,n),t.child;case 14:return r=t.type,i=vi(r,t.pendingProps),i=vi(r.type,i),uI(e,t,r,i,n);case 15:return lz(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vi(r,i),kv(e,t),t.tag=1,cr(r)?(e=!0,uy(t)):e=!1,pu(t,n),oz(t,r,i),G1(t,r,i,n),J1(null,t,r,!0,e,n);case 19:return hz(e,t,n);case 22:return cz(e,t,n)}throw Error(le(156,t.tag))};function kz(e,t){return n4(e,t)}function fre(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(e,t,n,r){return new fre(e,t,n,r)}function zP(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hre(e){if(typeof e=="function")return zP(e)?1:0;if(e!=null){if(e=e.$$typeof,e===aP)return 11;if(e===lP)return 14}return 2}function ga(e,t){var n=e.alternate;return n===null?(n=Xr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Rv(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")zP(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Bc:return Al(n.children,i,o,t);case sP:s=8,i|=8;break;case y1:return e=Xr(12,n,t,i|2),e.elementType=y1,e.lanes=o,e;case x1:return e=Xr(13,n,t,i),e.elementType=x1,e.lanes=o,e;case b1:return e=Xr(19,n,t,i),e.elementType=b1,e.lanes=o,e;case FU:return Ub(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case DU:s=10;break e;case LU:s=9;break e;case aP:s=11;break e;case lP:s=14;break e;case Ws:s=16,r=null;break e}throw Error(le(130,e==null?e:typeof e,""))}return t=Xr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Al(e,t,n,r){return e=Xr(7,e,r,t),e.lanes=n,e}function Ub(e,t,n,r){return e=Xr(22,e,r,t),e.elementType=FU,e.lanes=n,e.stateNode={isHidden:!1},e}function A_(e,t,n){return e=Xr(6,e,null,t),e.lanes=n,e}function T_(e,t,n){return t=Xr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pre(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=d_(0),this.expirationTimes=d_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=d_(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function VP(e,t,n,r,i,o,s,a,c){return e=new pre(e,t,n,a,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Xr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},CP(o),e}function mre(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Fc,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Az(e){if(!e)return ja;e=e._reactInternals;e:{if(oc(e)!==e||e.tag!==1)throw Error(le(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(cr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(le(171))}if(e.tag===1){var n=e.type;if(cr(n))return A4(e,n,t)}return t}function Tz(e,t,n,r,i,o,s,a,c){return e=VP(n,r,!0,e,i,o,s,a,c),e.context=Az(null),n=e.current,r=Yn(),i=ma(n),o=ns(r,i),o.callback=t??null,ha(n,o,i),e.current.lanes=i,bm(e,i,r),ur(e,r),e}function zb(e,t,n,r){var i=t.current,o=Yn(),s=ma(i);return n=Az(n),t.context===null?t.context=n:t.pendingContext=n,t=ns(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ha(i,t,s),e!==null&&(Ii(e,i,s,o),Cv(e,i,s)),s}function Sy(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function _I(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function qP(e,t){_I(e,t),(e=e.alternate)&&_I(e,t)}function gre(){return null}var Rz=typeof reportError=="function"?reportError:function(e){console.error(e)};function KP(e){this._internalRoot=e}Vb.prototype.render=KP.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(le(409));zb(e,t,null,null)};Vb.prototype.unmount=KP.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ul(function(){zb(null,e,null,null)}),t[fs]=null}};function Vb(e){this._internalRoot=e}Vb.prototype.unstable_scheduleHydration=function(e){if(e){var t=c4();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xs.length&&t!==0&&t<Xs[n].priority;n++);Xs.splice(n,0,e),n===0&&d4(e)}};function WP(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function qb(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function SI(){}function vre(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=Sy(s);o.call(u)}}var s=Tz(t,r,e,0,null,!1,!1,"",SI);return e._reactRootContainer=s,e[fs]=s.current,Gh(e.nodeType===8?e.parentNode:e),Ul(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=Sy(c);a.call(u)}}var c=VP(e,0,!1,null,null,!1,!1,"",SI);return e._reactRootContainer=c,e[fs]=c.current,Gh(e.nodeType===8?e.parentNode:e),Ul(function(){zb(t,c,n,r)}),c}function Kb(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var a=i;i=function(){var c=Sy(s);a.call(c)}}zb(t,s,e,i)}else s=vre(n,t,e,i,r);return Sy(s)}a4=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=eh(t.pendingLanes);
57n!==0&&(dP(t,n|1),ur(t,Qt()),!(Ze&6)&&(Lu=Qt()+500,za()))}break;case 13:Ul(function(){var r=hs(e,1);if(r!==null){var i=Yn();Ii(r,e,1,i)}}),qP(e,1)}};fP=function(e){if(e.tag===13){var t=hs(e,134217728);if(t!==null){var n=Yn();Ii(t,e,134217728,n)}qP(e,134217728)}};l4=function(e){if(e.tag===13){var t=ma(e),n=hs(e,t);if(n!==null){var r=Yn();Ii(n,e,t,r)}qP(e,t)}};c4=function(){return at};u4=function(e,t){var n=at;try{return at=e,t()}finally{at=n}};A1=function(e,t,n){switch(t){case"input":if(S1(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Mb(r);if(!i)throw Error(le(90));UU(r),S1(r,i)}}}break;case"textarea":VU(e,n);break;case"select":t=n.value,t!=null&&uu(e,!!n.multiple,t,!1)}};QU=FP;JU=Ul;var yre={usingClientEntryPoint:!1,Events:[_m,qc,Mb,GU,YU,FP]},Pf={findFiberByHostInstance:vl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},xre={bundleType:Pf.bundleType,version:Pf.version,rendererPackageName:Pf.rendererPackageName,rendererConfig:Pf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Cs.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=e4(e),e===null?null:e.stateNode},findFiberByHostInstance:Pf.findFiberByHostInstance||gre,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pg.isDisabled&&Pg.supportsFiber)try{Tb=Pg.inject(xre),co=Pg}catch{}}Br.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yre;Br.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!WP(t))throw Error(le(200));return mre(e,t,null,n)};Br.createRoot=function(e,t){if(!WP(e))throw Error(le(299));var n=!1,r="",i=Rz;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=VP(e,1,!1,null,null,n,!1,r,i),e[fs]=t.current,Gh(e.nodeType===8?e.parentNode:e),new KP(t)};Br.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(le(188)):(e=Object.keys(e).join(","),Error(le(268,e)));return e=e4(t),e=e===null?null:e.stateNode,e};Br.flushSync=function(e){return Ul(e)};Br.hydrate=function(e,t,n){if(!qb(t))throw Error(le(200));return Kb(null,e,t,!0,n)};Br.hydrateRoot=function(e,t,n){if(!WP(e))throw Error(le(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=Rz;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Tz(t,null,e,1,n??null,i,!1,o,s),e[fs]=t.current,Gh(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Vb(t)};Br.render=function(e,t,n){if(!qb(t))throw Error(le(200));return Kb(null,e,t,!1,n)};Br.unmountComponentAtNode=function(e){if(!qb(e))throw Error(le(40));return e._reactRootContainer?(Ul(function(){Kb(null,null,e,!1,function(){e._reactRootContainer=null,e[fs]=null})}),!0):!1};Br.unstable_batchedUpdates=FP;Br.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!qb(n))throw Error(le(200));if(e==null||e._reactInternals===void 0)throw Error(le(38));return Kb(e,t,n,!1,r)};Br.version="18.3.1-next-f1338f8080-20240426";function Oz(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Oz)}catch(e){console.error(e)}}Oz(),OU.exports=Br;var Ns=OU.exports;const Iz=ct(Ns),bre="Error preloading route! âï¸";function wre(e,t){const n=Ki(),[r,i]=v.useState(!1),o=v.useRef(!1),s=Kee(t),{activeProps:a=()=>({className:"active"}),inactiveProps:c=()=>({}),activeOptions:u,to:d,preload:f,preloadDelay:h,replace:p,startTransition:m,resetScroll:g,viewTransition:y,children:b,target:x,disabled:w,style:S,className:_,onClick:j,onFocus:E,onMouseEnter:C,onMouseLeave:N,onTouchStart:k,ignoreBlocker:P,...A}=e,{params:L,search:R,hash:D,state:O,mask:F,...T}=A,M=v.useMemo(()=>{try{return new URL(`${d}`),"external"}catch{}return"internal"},[d]),V=pt({select:Ke=>Ke.location.search,structuralSharing:!0});e={from:Li({strict:!1,select:Ke=>Ke.pathname}),...e};const I=v.useMemo(()=>n.buildLocation(e),[n,e,V]),z=v.useMemo(()=>f??n.options.defaultPreload,[n.options.defaultPreload,f]),H=h??n.options.defaultPreloadDelay??0,de=pt({select:Ke=>{if(u?.exact){if(!Hee(Ke.location.pathname,I.pathname,n.basepath))return!1}else{const vt=Xv(Ke.location.pathname,n.basepath).split("/");
57if(!Xv(I.pathname,n.basepath).split("/").every((ui,di)=>ui===vt[di]))return!1}return(u?.includeSearch??!0)&&!cu(Ke.location.search,I.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?Ke.location.hash===I.hash:!0}}),ge=v.useCallback(()=>{n.preloadRoute(e).catch(Ke=>{console.warn(Ke),console.warn(bre)})},[e,n]),te=v.useCallback(Ke=>{Ke?.isIntersecting&&ge()},[ge]);if(qee(s,te,{rootMargin:"100px"},{disabled:!!w||z!=="viewport"}),Jf(()=>{o.current||!w&&z==="render"&&(ge(),o.current=!0)},[w,ge,z]),M==="external")return{...T,ref:s,type:M,href:d,...b&&{children:b},...x&&{target:x},...w&&{disabled:w},...S&&{style:S},..._&&{className:_},...j&&{onClick:j},...E&&{onFocus:E},...C&&{onMouseEnter:C},...N&&{onMouseLeave:N},...k&&{onTouchStart:k}};const ye=Ke=>{if(!w&&!_re(Ke)&&!Ke.defaultPrevented&&(!x||x==="_self")&&Ke.button===0){Ke.preventDefault(),Ns.flushSync(()=>{i(!0)});const vt=n.subscribe("onResolved",()=>{vt(),i(!1)});n.buildAndCommitLocation({...e,replace:p,resetScroll:g,startTransition:m,viewTransition:y,ignoreBlocker:P})}},W=Ke=>{w||z&&ge()},ne=W,se=Ke=>{if(w)return;const vt=Ke.target||{};if(z){if(vt.preloadTimeout)return;vt.preloadTimeout=setTimeout(()=>{vt.preloadTimeout=null,ge()},H)}},U=Ke=>{if(w)return;const vt=Ke.target||{};vt.preloadTimeout&&(clearTimeout(vt.preloadTimeout),vt.preloadTimeout=null)},ae=Ke=>vt=>{var zn;(zn=vt.persist)==null||zn.call(vt),Ke.filter(Boolean).forEach(xr=>{vt.defaultPrevented||xr(vt)})},re=de?pl(a,{})??{}:{},He=de?{}:pl(c,{}),Ge=[_,re.className,He.className].filter(Boolean).join(" "),gt={...S,...re.style,...He.style};return{...T,...re,...He,href:w?void 0:I.maskedLocation?n.history.createHref(I.maskedLocation.href):n.history.createHref(I.href),ref:s,onClick:ae([j,ye]),onFocus:ae([E,W]),onMouseEnter:ae([C,se]),onMouseLeave:ae([N,U]),onTouchStart:ae([k,ne]),disabled:!!w,target:x,...Object.keys(gt).length&&{style:gt},...Ge&&{className:Ge},...w&&{role:"link","aria-disabled":!0},...de&&{"data-status":"active","aria-current":"page"},...r&&{"data-transitioning":"transitioning"}}}const Re=v.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,ref:o,...s}=wre(r,t),a=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;return typeof n>"u"&&delete s.disabled,v.createElement(n||"a",{...s,ref:o},a)});function _re(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Sre(){const e=Ki(),t=v.useRef({router:e,mounted:!1}),n=pt({select:({isLoading:f})=>f}),[r,i]=v.useTransition(),o=pt({select:f=>f.matches.some(h=>h.status==="pending"),structuralSharing:!0}),s=i_(n),a=n||r||o,c=i_(a),u=n||o,d=i_(u);return e.isServer||(e.startReactTransition=i),v.useEffect(()=>{const f=e.history.subscribe(e.load),h=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ml(e.latestLocation.href)!==ml(h.href)&&e.commitLocation({...h,replace:!0}),()=>{f()}},[e,e.history]),Jf(()=>{var f;if(typeof window<"u"&&((f=window.__TSR__)!=null&&f.dehydrated)||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(p){console.error(p)}})()},[e]),Jf(()=>{if(s&&!n){const f=e.state.location,h=e.state.resolvedLocation,p=h.pathname!==f.pathname;e.emit({type:"onLoad",fromLocation:h,toLocation:f,pathChanged:p})}},[s,e,n]),Jf(()=>{if(d&&!u){const f=e.state.location,h=e.state.resolvedLocation,p=h.pathname!==f.pathname;e.emit({type:"onBeforeRouteMount",fromLocation:h,toLocation:f,pathChanged:p})}},[u,d,e]),Jf(()=>{if(c&&!a){const f=e.state.location,h=e.state.resolvedLocation,p=h.pathname!==f.pathname;if(e.emit({type:"onResolved",fromLocation:h,toLocation:f,pathChanged:p}),e.__store.setState(m=>({...m,status:"idle",resolvedLocation:m.location})),typeof document<"u"&&document.querySelector&&e.state.location.hash!==""){const m=document.getElementById(e.state.location.hash);m&&m.scrollIntoView()}}},[a,c,e]),null}function jre(){const e=Ki(),t=e.options.defaultPendingComponent?l.jsx(e.options.defaultPendingComponent,{}):null,n=e.isServer||typeof document<"u"&&window.__TSR__?_v:v.Suspense,r=l.jsxs(n,{fallback:t,children:[l.jsx(Sre,{}),l.jsx(Ere,{})]});return e.options.InnerWrap?l.jsx(e.options.InnerWrap,{children:r}):r}function Ere(){const e=pt({select:n=>{var r;return(r=n.matches[0])==null?void 0:r.id}}),t=pt({select:n=>n.loadedAt});return l.jsx(Pb.Provider,{value:e,children:l.jsx(eP,{getResetKey:()=>t,errorComponent:Nb,onCatch:n=>{n.message||n.toString()},children:e?l.jsx(RU,{matchId:e}):null})})}function Fot(e){return pt({select:t=>t.matches,structuralSharing:void 0})}function Cre({router:e,children:t,...n}
57){e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=jU(),i=l.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?l.jsx(e.options.Wrap,{children:i}):i}function Nre({router:e,...t}){return l.jsx(Cre,{router:e,...t,children:l.jsx(jre,{})})}const Pre=typeof window<"u"?v.useLayoutEffect:v.useEffect,R_="window",jI="___";let O_=new WeakSet;const kre=typeof window<"u"&&window.sessionStorage,yi=kre?(()=>{const e="tsr-scroll-restoration-v2";return{state:JSON.parse(window.sessionStorage.getItem(e)||"null")||{cached:{},next:{}},set:n=>{yi.state=pl(n,yi.state),window.sessionStorage.setItem(e,JSON.stringify(yi.state))}}})():void 0,Are=e=>e.state.key||e.href;function Tre(e){const t=Ki();Pre(()=>{const n=e?.getKey||Are,{history:r}=window;r.scrollRestoration="manual";const i=a=>{if(O_.has(a.target))return;O_.add(a.target);let c="";if(a.target===document||a.target===window)c=R_;else{const u=a.target.getAttribute("data-scroll-restoration-id");u?c=`[data-scroll-restoration-id="${u}"]`:c=Ore(a.target)}yi.state.next[c]||yi.set(u=>({...u,next:{...u.next,[c]:{scrollX:NaN,scrollY:NaN}}}))};typeof document<"u"&&document.addEventListener("scroll",i,!0);const o=t.subscribe("onBeforeLoad",a=>{if(a.pathChanged){const c=n(a.fromLocation);for(const u in yi.state.next){const d=yi.state.next[u];if(u===R_)d.scrollX=window.scrollX||0,d.scrollY=window.scrollY||0;else if(u){const f=document.querySelector(u);d.scrollX=f?.scrollLeft||0,d.scrollY=f?.scrollTop||0}yi.set(f=>{const h={...f.next};return delete h[u],{...f,next:h,cached:{...f.cached,[[c,u].join(jI)]:d}}})}}}),s=t.subscribe("onBeforeRouteMount",a=>{if(a.pathChanged){if(!t.resetNextScroll)return;t.resetNextScroll=!0;const c=n(a.toLocation);let u=!1;for(const d in yi.state.cached){const f=yi.state.cached[d],[h,p]=d.split(jI);if(h===c){if(p===R_)u=!0,window.scrollTo(f.scrollX,f.scrollY);else if(p){const m=document.querySelector(p);m&&(m.scrollLeft=f.scrollX,m.scrollTop=f.scrollY)}}}u||window.scrollTo(0,0),yi.set(d=>({...d,next:{}})),O_=new WeakSet}});return()=>{document.removeEventListener("scroll",i),o(),s()}},[e?.getKey,t])}function Rre(e){return Tre(e),null}function Ore(e){const t=[];let n;for(;n=e.parentNode;)t.unshift(`${e.tagName}:nth-child(${[].indexOf.call(n.children,e)+1})`),e=n;return`${t.join(" > ")}`.toLowerCase()}const Ire="modulepreload",Mre=function(e){return"/"+e},EI={},Z=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=s?.nonce||s?.getAttribute("nonce");i=Promise.allSettled(n.map(c=>{if(c=Mre(c),c in EI)return;EI[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":Ire,u||(f.as="script"),f.crossOrigin="",f.href=c,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})};let $re={data:""},Dre=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||$re,Lre=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Fre=/\/\*[^]*?\*\/| +/g,CI=/\n+/g,ea=(e,t)=>{let n="",r="",i="";for(let o in e){let s=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+s+";":r+=o[1]=="f"?ea(s,o):o+"{"+ea(s,o[1]=="k"?"":t)+"}":typeof s=="object"?r+=ea(s,t?t.replace(/([^,])+/g,a=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,a):a?a+" "+c:c)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=ea.p?ea.p(o,s):o+":"+s+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Mo={},Mz=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Mz(e[n]);return t}return e},Bre=(e,t,n,r,i)=>{let o=Mz(e),s=Mo[o]||(Mo[o]=(c=>{let u=0,d=11;for(;u<c.length;)d=101*d+c.charCodeAt(u++)>>>0;return"go"+d})(o));if(!Mo[s]){let c=o!==e?e:(u=>{let d,f,h=[{}];for(;d=Lre.exec(u.replace(Fre,""));)d[4]?h.shift():d[3]?(f=d[3].replace(CI," ").trim(),h.unshift(h[0][f]=h[0][f]||{})):h[0][d[1]]=d[2].replace(CI," ").trim();return h[0]})(e);Mo[s]=ea(i?{["@keyframes "+s]:c}:c,n?"":"."+s)}let a=n&&Mo.g?Mo.g:null;return n&&(Mo.g=Mo[s]),((c,u,d,f)=>{f?u.data=u.data.replace(f,c):u.data.indexOf(c)===-1&&(u.data=d?c+u.data:u.data+c)})(Mo[s],t,r,a),s}
57,Ure=(e,t,n)=>e.reduce((r,i,o)=>{let s=t[o];if(s&&s.call){let a=s(n),c=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=c?"."+c:a&&typeof a=="object"?a.props?"":ea(a,""):a===!1?"":a}return r+i+(s??"")},"");function Wb(e){let t=this||{},n=e.call?e(t.p):e;return Bre(n.unshift?n.raw?Ure(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,Dre(t.target),t.g,t.o,t.k)}let $z,cj,uj;Wb.bind({g:1});let ms=Wb.bind({k:1});function zre(e,t,n,r){ea.p=t,$z=e,cj=n,uj=r}function Va(e,t){let n=this||{};return function(){let r=arguments;function i(o,s){let a=Object.assign({},o),c=a.className||i.className;n.p=Object.assign({theme:cj&&cj()},a),n.o=/ *go\d+/.test(c),a.className=Wb.apply(n,r)+(c?" "+c:"");let u=e;return e[0]&&(u=a.as||e,delete a.as),uj&&u[0]&&uj(a),$z(u,a)}return i}}var Vre=e=>typeof e=="function",jy=(e,t)=>Vre(e)?e(t):e,qre=(()=>{let e=0;return()=>(++e).toString()})(),Dz=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Kre=20,Ov=new Map,Wre=1e3,NI=e=>{if(Ov.has(e))return;let t=setTimeout(()=>{Ov.delete(e),sc({type:4,toastId:e})},Wre);Ov.set(e,t)},Hre=e=>{let t=Ov.get(e);t&&clearTimeout(t)},dj=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Kre)};case 1:return t.toast.id&&Hre(t.toast.id),{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:n}=t;return e.toasts.find(o=>o.id===n.id)?dj(e,{type:1,toast:n}):dj(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?NI(r):e.toasts.forEach(o=>{NI(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+i}))}}},Iv=[],Mv={toasts:[],pausedAt:void 0},sc=e=>{Mv=dj(Mv,e),Iv.forEach(t=>{t(Mv)})},Gre={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Yre=(e={})=>{let[t,n]=v.useState(Mv);v.useEffect(()=>(Iv.push(n),()=>{let i=Iv.indexOf(n);i>-1&&Iv.splice(i,1)}),[t]);let r=t.toasts.map(i=>{var o,s;return{...e,...e[i.type],...i,duration:i.duration||((o=e[i.type])==null?void 0:o.duration)||e?.duration||Gre[i.type],style:{...e.style,...(s=e[i.type])==null?void 0:s.style,...i.style}}});return{...t,toasts:r}},Qre=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:n?.id||qre()}),jm=e=>(t,n)=>{let r=Qre(t,e,n);return sc({type:2,toast:r}),r.id},Ar=(e,t)=>jm("blank")(e,t);Ar.error=jm("error");Ar.success=jm("success");Ar.loading=jm("loading");Ar.custom=jm("custom");Ar.dismiss=e=>{sc({type:3,toastId:e})};Ar.remove=e=>sc({type:4,toastId:e});Ar.promise=(e,t,n)=>{let r=Ar.loading(t.loading,{...n,...n?.loading});return e.then(i=>(Ar.success(jy(t.success,i),{id:r,...n,...n?.success}),i)).catch(i=>{Ar.error(jy(t.error,i),{id:r,...n,...n?.error})}),e};var Jre=(e,t)=>{sc({type:1,toast:{id:e,height:t}})},Xre=()=>{sc({type:5,time:Date.now()})},Zre=e=>{let{toasts:t,pausedAt:n}=Yre(e);v.useEffect(()=>{if(n)return;let o=Date.now(),s=t.map(a=>{if(a.duration===1/0)return;let c=(a.duration||0)+a.pauseDuration-(o-a.createdAt);if(c<0){a.visible&&Ar.dismiss(a.id);return}return setTimeout(()=>Ar.dismiss(a.id),c)});return()=>{s.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=v.useCallback(()=>{n&&sc({type:6,time:Date.now()})},[n]),i=v.useCallback((o,s)=>{let{reverseOrder:a=!1,gutter:c=8,defaultPosition:u}=s||{},d=t.filter(p=>(p.position||u)===(o.position||u)&&p.height),f=d.findIndex(p=>p.id===o.id),h=d.filter((p,m)=>m<f&&p.visible).length;return d.filter(p=>p.visible).slice(...a?[h+1]:[0,h]).reduce((p,m)=>p+(m.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:Jre,startPause:Xre,endPause:r,calculateOffset:i}}},eie=ms` 58from { 59 transform: scale(0) rotate(45deg); 60 opacity: 0; 61} 62to { 63 transform: scale(1) rotate(45deg); 64 opacity: 1; 65}`,tie=ms` 66from { 67 transform: scale(0); 68 opacity: 0; 69} 70to { 71 transform: scale(1); 72 opacity: 1; 73}`,nie=ms` 74from { 75 transform: scale(0) rotate(90deg); 76 opacity: 0; 77} 78to { 79 transform: scale(1) rotate(90deg); 80 opacity: 1; 81}`,rie=Va("div")`
82 width: 20px; 83 opacity: 0; 84 height: 20px; 85 border-radius: 10px; 86 background: ${e=>e.primary||"#ff4b4b"}; 87 position: relative; 88 transform: rotate(45deg); 89 90 animation: ${eie} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 91 forwards; 92 animation-delay: 100ms; 93 94 &:after, 95 &:before { 96 content: ''; 97 animation: ${tie} 0.15s ease-out forwards; 98 animation-delay: 150ms; 99 position: absolute; 100 border-radius: 3px; 101 opacity: 0; 102 background: ${e=>e.secondary||"#fff"}; 103 bottom: 9px; 104 left: 4px; 105 height: 2px; 106 width: 12px; 107 } 108 109 &:before { 110 animation: ${nie} 0.15s ease-out forwards; 111 animation-delay: 180ms; 112 transform: rotate(90deg); 113 } 114`,iie=ms` 115 from { 116 transform: rotate(0deg); 117 } 118 to { 119 transform: rotate(360deg); 120 } 121`,oie=Va("div")` 122 width: 12px; 123 height: 12px; 124 box-sizing: border-box; 125 border: 2px solid; 126 border-radius: 100%; 127 border-color: ${e=>e.secondary||"#e0e0e0"}; 128 border-right-color: ${e=>e.primary||"#616161"}; 129 animation: ${iie} 1s linear infinite; 130`,sie=ms` 131from { 132 transform: scale(0) rotate(45deg); 133 opacity: 0; 134} 135to { 136 transform: scale(1) rotate(45deg); 137 opacity: 1; 138}`,aie=ms` 1390% { 140 height: 0; 141 width: 0; 142 opacity: 0; 143} 14440% { 145 height: 0; 146 width: 6px; 147 opacity: 1; 148} 149100% { 150 opacity: 1; 151 height: 10px; 152}`,lie=Va("div")` 153 width: 20px; 154 opacity: 0; 155 height: 20px; 156 border-radius: 10px; 157 background: ${e=>e.primary||"#61d345"}; 158 position: relative; 159 transform: rotate(45deg); 160 161 animation: ${sie} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 162 forwards; 163 animation-delay: 100ms; 164 &:after { 165 content: ''; 166 box-sizing: border-box; 167 animation: ${aie} 0.2s ease-out forwards; 168 opacity: 0; 169 animation-delay: 200ms; 170 position: absolute; 171 border-right: 2px solid; 172 border-bottom: 2px solid; 173 border-color: ${e=>e.secondary||"#fff"}; 174 bottom: 6px; 175 left: 6px; 176 height: 10px; 177 width: 6px; 178 } 179`,cie=Va("div")` 180 position: absolute; 181`,uie=Va("div")` 182 position: relative; 183 display: flex; 184 justify-content: center; 185 align-items: center; 186 min-width: 20px; 187 min-height: 20px; 188`,die=ms` 189from { 190 transform: scale(0.6); 191 opacity: 0.4; 192} 193to { 194 transform: scale(1); 195 opacity: 1; 196}`,fie=Va("div")` 197 position: relative; 198 transform: scale(0.6); 199 opacity: 0.4; 200 min-width: 20px; 201 animation: ${die} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) 202 forwards; 203`,hie=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?v.createElement(fie,null,t):t:n==="blank"?null:v.createElement(uie,null,v.createElement(oie,{...r}),n!=="loading"&&v.createElement(cie,null,n==="error"?v.createElement(rie,{...r}):v.createElement(lie,{...r})))},pie=e=>` 2040% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} 205100% {transform: translate3d(0,0,0) scale(1); opacity:1;} 206`,mie=e=>` 2070% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} 208100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} 209`,gie="0%{opacity:0;} 100%{opacity:1;}",vie="0%{opacity:1;} 100%{opacity:0;}",yie=Va("div")` 210 display: flex; 211 align-items: center; 212 background: #fff; 213 color: #363636; 214 line-height: 1.3; 215 will-change: transform; 216 box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); 217 max-width: 350px; 218 pointer-events: auto; 219 padding: 8px 10px; 220 border-radius: 8px; 221`,xie=Va("div")` 222 display: flex; 223 justify-content: center; 224 margin: 4px 10px; 225 color: inherit; 226 flex: 1 1 auto; 227 white-space: pre-line; 228`,bie=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=Dz()?[gie,vie]:[pie(n),mie(n)];return{animation:t?`${ms(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${ms(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},wie=v.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?bie(e.position||t||"top-center",e.visible):{opacity:0},o=v.createElement(hie,{toast:e}),s=v.createElement(xie,{...e.ariaProps},jy(e.message,e));return v.createElement(yie,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:o,message:s}):v.createElement(v.Fragment,null,o,s))});zre(v.createElement);var _ie=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let o=v.useCallback(s=>{if(s){let a=()=>{let c=s.getBoundingClientRect().height;r(e,c)};a(),new MutationObserver(a).observe(s,{subtree:!0,childList:!0,characterData:!0}
228)}},[e,r]);return v.createElement("div",{ref:o,className:t,style:n},i)},Sie=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Dz()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},jie=Wb` 229 z-index: 9999; 230 > * { 231 pointer-events: auto; 232 } 233`,kg=16,Eie=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,containerStyle:o,containerClassName:s})=>{let{toasts:a,handlers:c}=Zre(n);return v.createElement("div",{style:{position:"fixed",zIndex:9999,top:kg,left:kg,right:kg,bottom:kg,pointerEvents:"none",...o},className:s,onMouseEnter:c.startPause,onMouseLeave:c.endPause},a.map(u=>{let d=u.position||t,f=c.calculateOffset(u,{reverseOrder:e,gutter:r,defaultPosition:t}),h=Sie(d,f);return v.createElement(_ie,{id:u.id,key:u.id,onHeightUpdate:c.updateHeight,className:u.visible?jie:"",style:h},u.type==="custom"?jy(u.message,u):i?i(u):v.createElement(wie,{toast:u,position:d}))}))},Q=Ar;const fj="auth-callback-error",Cie="Sign-in failed. Please try again.",Nie=[{fragment:"registered as a recruiter account",message:"That email belongs to a recruiter account. Please sign in as a recruiter using your email and password."},{fragment:"account is disabled",message:"This account is closed. Sign in with your email and password to reactivate it."},{fragment:"did not confirm this email",message:"Your provider didn't confirm your email address, so we can't link it to your existing account. Please sign in with your email and password instead."},{fragment:"already exists",message:"An account with this email already exists. Please sign in instead."},{fragment:"cannot be used for a candidate account",message:"This email can't be used for a candidate account. If you were invited to an organisation, use the link in that invitation."},{fragment:"verification failed",message:"We couldn't verify that request. Please refresh the page and try again."}];function Lz(e){if(e.has("code"))return null;const t=e.get("error"),n=e.get("error_description");if(!t&&!n)return null;if(console.error("Sign-in was rejected by Cognito:",{error:t,description:n}),t==="access_denied"&&!n)return"Sign-in was cancelled.";const r=(n??"").toLowerCase(),i=Nie.find(({fragment:o})=>r.includes(o));return i?i.message:Cie}function Pie(e,t){let n;try{n=new URL(e)}catch{return null}const r=n.pathname.replace(/\/$/,"")||"/";if(!t.includes(r))return null;const i=Lz(n.searchParams);return i?{message:i,redirectTo:"/"}:null}function Fz(e){try{sessionStorage.setItem(fj,e)}catch{}}function kie(){try{const e=sessionStorage.getItem(fj);return e&&sessionStorage.removeItem(fj),e}catch{return null}}function Aie(){return v.useEffect(()=>{const e=kie();e&&Q.error(e,{duration:1e4})},[]),null}var Pd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},zl=typeof window>"u"||"Deno"in globalThis;function Yr(){}function Tie(e,t){return typeof e=="function"?e(t):e}function hj(e){return typeof e=="number"&&e>=0&&e!==1/0}function Bz(e,t){return Math.max(e+(t||0)-Date.now(),0)}function gu(e,t){return typeof e=="function"?e(t):e}function Ci(e,t){return typeof e=="function"?e(t):e}function PI(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==HP(s,t.options))return!1}else if(!rp(t.queryKey,s))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||o&&!o(t))}function kI(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Vl(t.options.mutationKey)!==Vl(o))return!1}else if(!rp(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function HP(e,t){return(t?.queryKeyHashFn||Vl)(e)}function Vl(e){return JSON.stringify(e,(t,n)=>pj(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function rp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!rp(e[n],t[n])):!1}function GP(e,t){if(e===t)return e;const n=AI(e)&&AI(t);if(n||pj(e)&&pj(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),s=o.length,a=n?[]:{};let c=0;for(let u=0;u<s;u++){const d=n?u:o[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=GP(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return i===s&&c===i?e:a}return t}function Ey(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function AI(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function pj(e){if(!TI(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;
vendor: 27,701 bytes, line 233
233return!(!TI(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function TI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Rie(e){return new Promise(t=>{setTimeout(t,e)})}function mj(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?GP(e,t):t}function Hb(e){return e}function Oie(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Iie(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var YP=Symbol();function Uz(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===YP?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Mie=class extends Pd{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!zl&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Gb=new Mie,$ie=class extends Pd{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!zl&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Cy=new $ie;function gj(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Die(e){return Math.min(1e3*2**e,3e4)}function zz(e){return(e??"online")==="online"?Cy.isOnline():!0}var Vz=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function I_(e){return e instanceof Vz}function qz(e){let t=!1,n=0,r=!1,i;const o=gj(),s=g=>{r||(h(new Vz(g)),e.abort?.())},a=()=>{t=!0},c=()=>{t=!1},u=()=>Gb.isFocused()&&(e.networkMode==="always"||Cy.isOnline())&&e.canRun(),d=()=>zz(e.networkMode)&&e.canRun(),f=g=>{r||(r=!0,e.onSuccess?.(g),i?.(),o.resolve(g))},h=g=>{r||(r=!0,e.onError?.(g),i?.(),o.reject(g))},p=()=>new Promise(g=>{i=y=>{(r||u())&&g(y)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),m=()=>{if(r)return;let g;const y=n===0?e.initialPromise:void 0;try{g=y??e.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(f).catch(b=>{if(r)return;const x=e.retry??(zl?0:3),w=e.retryDelay??Die,S=typeof w=="function"?w(n,b):w,_=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,b);if(t||!_){h(b);return}n++,e.onFail?.(n,b),Rie(S).then(()=>u()?void 0:p()).then(()=>{t?h(b):m()})})};return{promise:o,cancel:s,continue:()=>(i?.(),o),cancelRetry:a,continueRetry:c,canStart:d,start:()=>(d()?m():p().then(m),o)}}function Lie(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const o=a=>{t?e.push(a):i(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||s()}return c},batchCalls:a=>(...c)=>{o(()=>{a(...c)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Jt=Lie(),Kz=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hj(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zl?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},Fie=class extends Kz{#e;#t;#r;#n;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Bie(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=mj(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(Yr).catch(Yr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Ci(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===YP||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!Bz(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const a=this.observers.find(c=>c.options.queryFn);a&&this.setOptions(a.options)}const n=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const a=Uz(this.options,t),c={queryKey:this.queryKey,meta:this.meta};return r(c),this.#o=!1,this.options.persister?this.options.persister(a,c,this):a(c)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};r(o),this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#i({type:"fetch",meta:o.fetchOptions?.meta});const s=a=>{I_(a)&&a.silent||this.#i({type:"error",error:a}),I_(a)||(this.#r.config.onError?.(a,this),this.#r.config.onSettled?.(this.state.data,a,this)),this.scheduleGc()};return this.#n=qz({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:a=>{if(a===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(a)}catch(c){s(c);return}this.#r.config.onSuccess?.(a,this),this.#r.config.onSettled?.(a,this.state.error,this),this.scheduleGc()},onError:s,onFail:(a,c)=>{this.#i({type:"failed",failureCount:a,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#n.start()}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Wz(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return I_(r)&&r.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Jt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Wz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:zz(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Bie(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Uie=class extends Pd{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??HP(r,t);let o=this.get(i);return o||(o=new Fie({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Jt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>PI(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>PI(e,n)):t}notify(e){Jt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Jt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Jt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},zie=class extends Kz{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||Hz(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){this.#r=qz({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(r,i)=>{this.#n({type:"failed",failureCount:r,error:i})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const t=this.state.status==="pending",n=!this.#r.canStart();try{if(!t){this.#n({type:"pending",variables:e,isPaused:n}),await this.#t.config.onMutate?.(e,this);const i=await this.options.onMutate?.(e);i!==this.state.context&&this.#n({type:"pending",context:i,variables:e,isPaused:n})}const r=await this.#r.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#n({type:"success",data:r}),r}catch(r){try{throw await this.#t.config.onError?.(r,e,this.state.context,this),await this.options.onError?.(r,e,this.state.context),await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,e,this.state.context),r}finally{this.#n({type:"error",error:r})}}finally{this.#t.runNext(this)}}#n(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Jt.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Hz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Vie=class extends Pd{constructor(e={}){super(),this.config=e,this.#e=new Map,this.#t=Date.now()}#e;#t;build(e,t,n){const r=new zie({mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=Ag(e),n=this.#e.get(t)??[];n.push(e),this.#e.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=Ag(e);if(this.#e.has(t)){const n=this.#e.get(t)?.filter(r=>r!==e);n&&(n.length===0?this.#e.delete(t):this.#e.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#e.get(Ag(e))?.find(n=>n.state.status==="pending");return!t||t===e}runNext(e){return this.#e.get(Ag(e))?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve()}clear(){Jt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#e.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(n=>kI(t,n))}findAll(e={}){return this.getAll().filter(t=>kI(e,t))}notify(e){Jt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Jt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Yr))))}};function Ag(e){return e.options.scope?.id??String(e.mutationId)}function Ny(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],s=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},c=0;const u=async()=>{let d=!1;const f=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?d=!0:t.signal.addEventListener("abort",()=>{d=!0}),t.signal)})},h=Uz(t.options,t.fetchOptions),p=async(m,g,y)=>{if(d)return Promise.reject();if(g==null&&m.pages.length)return Promise.resolve(m);const b={queryKey:t.queryKey,pageParam:g,direction:y?"backward":"forward",meta:t.options.meta};f(b);const x=await h(b),{maxPages:w}=t.options,S=y?Iie:Oie;return{pages:S(m.pages,x,w),pageParams:S(m.pageParams,g,w)}};if(i&&o.length){const m=i==="backward",g=m?Gz:vj,y={pages:o,pageParams:s},b=g(r,y);a=await p(y,b,m)}else{const m=e??o.length;do{const g=c===0?s[0]??r.initialPageParam:vj(r,a);if(c>0&&g==null)break;a=await p(a,g),c++}while(c<m)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function vj(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Gz(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function qie(e,t){return t?vj(e,t)!=null:!1}function Kie(e,t){return!t||!e.getPreviousPageParam?!1:Gz(e,t)!=null}var Wie=class{#e;#t;#r;#n;#s;#o;#i;#a;constructor(e={}){this.#e=e.queryCache||new Uie,this.#t=e.mutationCache||new Vie,this.#r=e.defaultOptions||{},this.#n=new Map,this.#s=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=Gb.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Cy.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=this.#e.build(this,n);return e.revalidateIfStale&&r.isStaleByTime(gu(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,s=Tie(t,o);if(s!==void 0)return this.#e.build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Jt.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Jt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e,r={type:"active",...e};return Jt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Jt.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Yr).catch(Yr)}invalidateQueries(e={},t={}){return Jt.batch(()=>{if(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:t?.cancelRefetch??!0},r=Jt.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Yr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Yr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(gu(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Yr).catch(Yr)}fetchInfiniteQuery(e){return e.behavior=Ny(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Yr).catch(Yr)}ensureInfiniteQueryData(e){return e.behavior=Ny(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Cy.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#n.set(Vl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()];let n={};return t.forEach(r=>{rp(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){this.#s.set(Vl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()];let n={};return t.forEach(r=>{rp(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=HP(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===YP&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Yz=class extends Pd{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#i=gj(),this.options.experimental_prefetchInRender||this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#r=void 0;#n=void 0;#s;#o;#i;#a;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),RI(this.#t,this.options)?this.#d():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yj(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yj(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ci(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!Ey(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&OI(this.#t,r,this.options,n)&&this.#d(),this.updateResult(t),i&&(this.#t!==r||Ci(this.options.enabled,this.#t)!==Ci(n.enabled,this.#t)||gu(this.options.staleTime,this.#t)!==gu(n.staleTime,this.#t))&&this.#g();const o=this.#v();i&&(this.#t!==r||Ci(this.options.enabled,this.#t)!==Ci(n.enabled,this.#t)||o!==this.#l)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Gie(this,n)&&(this.#n=n,this.#o=this.options,this.#s=this.#t.state),n}getCurrentResult(){return this.#n}trackResult(e,t){const n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#d(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Yr)),t}#g(){this.#b();const e=gu(this.options.staleTime,this.#t);if(zl||this.#n.isStale||!hj(e))return;const n=Bz(this.#n.dataUpdatedAt,e)+1;this.#c=setTimeout(()=>{this.#n.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#l=e,!(zl||Ci(this.options.enabled,this.#t)===!1||!hj(this.#l)||this.#l===0)&&(this.#u=setInterval(()=>{(this.options.refetchIntervalInBackground||Gb.isFocused())&&this.#d()},this.#l))}#x(){this.#g(),this.#y(this.#v())}#b(){this.#c&&(clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#n,o=this.#s,s=this.#o,c=e!==n?e.state:this.#r,{state:u}=e;let d={...u},f=!1,h;if(t._optimisticResults){const E=this.hasListeners(),C=!E&&RI(e,t),N=E&&OI(e,n,t,r);(C||N)&&(d={...d,...Wz(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:g}=d;if(t.select&&d.data!==void 0)if(i&&d.data===o?.data&&t.select===this.#m)h=this.#f;else try{this.#m=t.select,h=t.select(d.data),h=mj(i?.data,h,t),this.#f=h,this.#a=null}catch(E){this.#a=E}else h=d.data;if(t.placeholderData!==void 0&&h===void 0&&g==="pending"){let E;if(i?.isPlaceholderData&&t.placeholderData===s?.placeholderData)E=i.data;else if(E=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,t.select&&E!==void 0)try{E=t.select(E),this.#a=null}catch(C){this.#a=C}E!==void 0&&(g="success",h=mj(i?.data,E,t),f=!0)}this.#a&&(p=this.#a,h=this.#f,m=Date.now(),g="error");const y=d.fetchStatus==="fetching",b=g==="pending",x=g==="error",w=b&&y,S=h!==void 0,j={status:g,fetchStatus:d.fetchStatus,isPending:b,isSuccess:g==="success",isError:x,isInitialLoading:w,isLoading:w,data:h,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:x&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&S,isStale:QP(e,t),refetch:this.refetch,promise:this.#i};if(this.options.experimental_prefetchInRender){const E=k=>{j.status==="error"?k.reject(j.error):j.data!==void 0&&k.resolve(j.data)},C=()=>{const k=this.#i=j.promise=gj();E(k)},N=this.#i;switch(N.status){case"pending":e.queryHash===n.queryHash&&E(N);break;case"fulfilled":(j.status==="error"||j.data!==N.value)&&C();break;case"rejected":(j.status!=="error"||j.error!==N.reason)&&C();break}}return j}updateResult(e){const t=this.#n,n=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#o=this.options,this.#s.data!==void 0&&(this.#h=this.#t),Ey(n,t))return;this.#n=n;const r={},i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!this.#p.size)return!0;const a=new Set(s??this.#p);return this.options.throwOnError&&a.add("error"),Object.keys(this.#n).some(c=>{const u=c;return this.#n[u]!==t[u]&&a.has(u)})};e?.listeners!==!1&&i()&&(r.listeners=!0),this.#S({...r,...e})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#S(e){Jt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Hie(e,t){return Ci(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function RI(e,t){return Hie(e,t)||e.state.data!==void 0&&yj(e,t,t.refetchOnMount)}function yj(e,t,n){if(Ci(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&QP(e,t)}return!1}function OI(e,t,n,r){return(e!==t||Ci(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&QP(e,n)}function QP(e,t){return Ci(t.enabled,e)!==!1&&e.isStaleByTime(gu(t.staleTime,e))}function Gie(e,t){return!Ey(e.getCurrentResult(),t)}var Yie=class extends Yz{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:Ny()},t)}getOptimisticResult(e){return e.behavior=Ny(),super.getOptimisticResult(e)}
233fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:o,isError:s,isRefetchError:a}=r,c=n.fetchMeta?.fetchMore?.direction,u=s&&c==="forward",d=i&&c==="forward",f=s&&c==="backward",h=i&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:qie(t,n.data),hasPreviousPage:Kie(t,n.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:f,isFetchingPreviousPage:h,isRefetchError:a&&!u&&!f,isRefetching:o&&!d&&!h}}},Qie=class extends Pd{#e;#t=void 0;#r;#n;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Ey(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),n?.mutationKey&&this.options.mutationKey&&Vl(n.mutationKey)!==Vl(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#s(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#s(),this.#o()}mutate(t,n){return this.#n=n,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(t)}#s(){const t=this.#r?.state??Hz();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Jt.batch(()=>{if(this.#n&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context;t?.type==="success"?(this.#n.onSuccess?.(t.data,n,r),this.#n.onSettled?.(t.data,null,
233n,r)):t?.type==="error"&&(this.#n.onError?.(t.error,n,r),this.#n.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#t)})})}},JP=v.createContext(void 0),oe=e=>{const t=v.useContext(JP);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Jie=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(JP.Provider,{value:e,children:t})),Qz=v.createContext(!1),Xie=()=>v.useContext(Qz);Qz.Provider;function Zie(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var eoe=v.createContext(Zie()),toe=()=>v.useContext(eoe);function Jz(e,t){return typeof e=="function"?e(...t):!!e}function xj(){}var noe=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},roe=e=>{v.useEffect(()=>{e.clearReset()},[e])},ioe=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&Jz(n,[e.error,r]),ooe=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},soe=(e,t)=>e.isLoading&&e.isFetching&&!t,aoe=(e,t)=>e?.suspense&&t.isPending,II=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Xz(e,t,n){const r=oe(n),i=Xie(),o=toe(),s=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(s),s._optimisticResults=i?"isRestoring":"optimistic",ooe(s),noe(s,o),roe(o);const a=!r.getQueryCache().get(s.queryHash),[c]=v.useState(()=>new t(r,s)),u=c.getOptimisticResult(s);if(v.useSyncExternalStore(v.useCallback(d=>{const f=i?xj:c.subscribe(Jt.batchCalls(d));return c.updateResult(),f},[c,i]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),v.useEffect(()=>{c.setOptions(s,{listeners:!1})},[s,c]),aoe(s,u))throw II(s,c,o);if(ioe({result:u,errorResetBoundary:o,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash)}))throw u.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(s,u),s.experimental_prefetchInRender&&!zl&&soe(u,i)&&(a?II(s,c,o):r.getQueryCache().get(s.queryHash)?.promise)?.catch(xj).finally(()=>{c.updateResult()}),s.notifyOnChangeProps?u:c.trackResult(u)}function ue(e,t){return Xz(e,Yz,t)}function loe(e,t){const n=oe(t),r=n.getQueryCache();return v.useSyncExternalStore(v.useCallback(i=>r.subscribe(Jt.batchCalls(i)),[r]),()=>n.isFetching(e),()=>n.isFetching(e))}function coe(e,t){const n=oe(t);return uoe({filters:{...e,status:"pending"}},n).length}function MI(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function uoe(e={},t){const n=oe(t).getMutationCache(),r=v.useRef(e),i=v.useRef(null);return i.current||(i.current=MI(n,e)),v.useEffect(()=>{r.current=e}),v.useSyncExternalStore(v.useCallback(o=>n.subscribe(()=>{const s=GP(i.current,MI(n,r.current));i.current!==s&&(i.current=s,Jt.schedule(o))}),[n]),()=>i.current,()=>i.current)}function ie(e,t){const n=oe(t),[r]=v.useState(()=>new Qie(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(s=>r.subscribe(Jt.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=v.useCallback((s,a)=>{r.mutate(s,a).catch(xj)},[r]);if(i.error&&Jz(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}function XP(e,t){return Xz(e,Yie,t)}const bj="dev.use_prod_jobs",doe=!1,wj=new Set;function Zz(){return!1}let ZP=Zz();function eV(){ZP=Zz();for(const e of wj)e()}const Uot={getSnapshot(){return ZP},subscribe(e){return wj.add(e),()=>wj.delete(e)},set(e){e?window.localStorage.setItem(bj,"true"):window.localStorage.removeItem(bj),eV()}};function foe(){return ZP}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===bj&&eV()});function xe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function hoe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ek(...e){return t=>e.forEach(n=>hoe(n,t))}function rt(...e){return v.useCallback(ek(...e),e)}function Ps(e,t=[]){let n=[];function r(o,s){const a=v.createContext(s),c=n.length;n=[...n,s];const u=f=>{const{scope:h,children:p,...m}=f,g=h?.[e]?.[c]||a,y=v.useMemo(()=>m,Object.values(m));return l.jsx(g.Provider,{value:y,children:p})};u.displayName=o+"Provider";function d(f,h){const p=h?.[e]?.[c]||a,m=v.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[u,d]}const i=()=>{const o=n.map(s=>v.createContext(s));return function(a){const c=a?.[e]||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,poe(i,...t)]}function poe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function ac(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>t.current?.(...n),[])}function si({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=moe({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=ac(n),c=v.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else i(u)},[o,e,i,a]);return[s,c]}function moe({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,i=v.useRef(r),o=ac(t);return v.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function Yb(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Qn=globalThis?.document?v.useLayoutEffect:()=>{};function Qb(e){const[t,n]=v.useState(void 0);return Qn(()=>
233{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function goe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function voe(...e){return t=>e.forEach(n=>goe(n,t))}var Bi=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),o=i.find(yoe);if(o){const s=o.props.children,a=i.map(c=>c===o?v.Children.count(s)>1?v.Children.only(null):v.isValidElement(s)?s.props.children:null:c);return l.jsx(_j,{...r,ref:t,children:v.isValidElement(s)?v.cloneElement(s,void 0,a):null})}return l.jsx(_j,{...r,ref:t,children:n})});Bi.displayName="Slot";var _j=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=boe(n);return v.cloneElement(n,{...xoe(r,n.props),ref:t?voe(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});_j.displayName="SlotClone";var tV=({children:e})=>l.jsx(l.Fragment,{children:e});function yoe(e){return v.isValidElement(e)&&e.type===tV}function xoe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function boe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var woe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Oe=woe.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Bi:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function _oe(e,t){e&&Ns.flushSync(()=>e.dispatchEvent(t))}var tk="Switch",[Soe,zot]=Ps(tk),[joe,Eoe]=Soe(tk),nV=v.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:u,form:d,...f}=e,[h,p]=v.useState(null),m=rt(t,w=>p(w)),g=v.useRef(!1),y=h?d||!!h.closest("form"):!0,[b=!1,x]=si({prop:i,defaultProp:o,onChange:u});return l.jsxs(joe,{scope:n,checked:b,disabled:a,children:[l.jsx(Oe.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":oV(b),"data-disabled":a?"":void 0,disabled:a,value:c,...f,ref:m,onClick:xe(e.onClick,w=>{x(S=>!S),y&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})}),y&&l.jsx(Coe,{control:h,bubbles:!g.current,name:r,value:c,checked:b,required:s,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});nV.displayName=tk;var rV="SwitchThumb",iV=v.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=Eoe(rV,n);return l.jsx(Oe.span,{"data-state":oV(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});iV.displayName=rV;var Coe=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=v.useRef(null),s=Yb(n),a=Qb(t);return v.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[s,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function oV(e){return e?"checked":"unchecked"}var sV=nV,Noe=iV;function aV(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=aV(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function et(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=aV(e))&&(r&&(r+=" "),r+=t);return r}const nk="-",Poe=e=>{const t=Aoe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(nk);return a[0]===""&&a.length!==1&&a.shift(),lV(a,t)||koe(s)},getConflictingClassGroupIds:(s,a)=>{const c=n[s]||[];return a&&r[s]?[...c,...r[s]]:c}
vendor: 5,605 bytes, line 233
233}},lV=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?lV(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(nk);return t.validators.find(({validator:s})=>s(o))?.classGroupId},$I=/^\[(.+)\]$/,koe=e=>{if($I.test(e)){const t=$I.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Aoe=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Roe(Object.entries(e.classGroups),n).forEach(([o,s])=>{Sj(s,r,o,t)}),r},Sj=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:DI(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(Toe(i)){Sj(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,s])=>{Sj(s,DI(t,o),n,r)})})},DI=(e,t)=>{let n=e;return t.split(nk).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Toe=e=>e.isThemeGetter,Roe=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,a])=>[t+s,a])):o);return[n,i]}):e,Ooe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,s)=>{n.set(o,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let s=n.get(o);if(s!==void 0)return s;if((s=r.get(o))!==void 0)return i(o,s),s},set(o,s){n.has(o)?n.set(o,s):i(o,s)}}},cV="!",Ioe=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,s=a=>{const c=[];let u=0,d=0,f;for(let y=0;y<a.length;y++){let b=a[y];if(u===0){if(b===i&&(r||a.slice(y,y+o)===t)){c.push(a.slice(d,y)),d=y+o;continue}if(b==="/"){f=y;continue}}b==="["?u++:b==="]"&&u--}const h=c.length===0?a:a.substring(d),p=h.startsWith(cV),m=p?h.substring(1):h,g=f&&f>d?f-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:s}):s},Moe=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},$oe=e=>({cache:Ooe(e.cacheSize),parseClassName:Ioe(e),...Poe(e)}),Doe=/\s+/,Loe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],s=e.trim().split(Doe);let a="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(u);let m=!!p,g=r(m?h.substring(0,p):h);if(!g){if(!m){a=u+(a.length>0?" "+a:a);continue}if(g=r(h),!g){a=u+(a.length>0?" "+a:a);continue}m=!1}const y=Moe(d).join(":"),b=f?y+cV:y,x=b+g;if(o.includes(x))continue;o.push(x);const w=i(g,m);for(let S=0;S<w.length;++S){const _=w[S];o.push(b+_)}a=u+(a.length>0?" "+a:a)}return a};function Foe(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=uV(t))&&(r&&(r+=" "),r+=n);return r}const uV=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=uV(e[r]))&&(n&&(n+=" "),n+=t);return n};function Boe(e,...t){let n,r,i,o=s;function s(c){const u=t.reduce((d,f)=>f(d),e());return n=$oe(u),r=n.cache.get,i=n.cache.set,o=a,a(c)}function a(c){const u=r(c);if(u)return u;const d=Loe(c,n);return i(c,d),d}return function(){return o(Foe.apply(null,arguments))}}const jt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},dV=/^\[(?:([a-z-]+):)?(.+)\]$/i,Uoe=/^\d+\/\d+$/,zoe=new Set(["px","full","screen"]),Voe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qoe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Koe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Woe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hoe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$o=e=>vu(e)||zoe.has(e)||Uoe.test(e),Fs=e=>kd(e,"length",tse),vu=e=>!!e&&!Number.isNaN(Number(e)),M_=e=>kd(e,"number",vu),kf=e=>!!e&&Number.isInteger(Number(e)),Goe=e=>e.endsWith("%")&&vu(e.slice(0,-1)),$e=e=>dV.test(e),Bs=e=>Voe.test(e),Yoe=new Set(["length","size","percentage"]),Qoe=e=>kd(e,Yoe,fV),Joe=e=>kd(e,"position",fV),Xoe=new Set(["image","url"]),Zoe=e=>kd(e,Xoe,rse),ese=e=>kd(e,"",nse),Af=()=>!0,kd=(e,t,n)=>{const r=dV.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},tse=e=>qoe.test(e)&&!Koe.test(e),fV=()=>!1,nse=e=>Woe.test(e),rse=e=>Hoe.test(e),ise=()=>{const e=jt("colors"),t=jt("spacing"),n=jt("blur"),r=jt("brightness"),i=jt("borderColor"),o=jt("borderRadius"),s=jt("borderSpacing"),a=jt("borderWidth"),c=jt("contrast"),u=jt("grayscale"),d=jt("hueRotate"),f=jt("invert"),h=jt("gap"),p=jt("gradientColorStops"),m=jt("gradientColorStopPositions"),g=jt("inset"),y=jt("margin"),b=jt("opacity"),x=jt("padding"),w=jt("saturate"),S=jt("scale"),_=jt("sepia"),j=jt("skew"),E=jt("space"),C=jt("translate"),N=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",$e,t],A=()=>[$e,t],L=()=>["",$o,Fs],R=()=>["auto",vu,$e],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",$e],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[vu,$e];return{cacheSize:500,separator:":",theme:{colors:[Af],spacing:[$o,Fs],blur:["none","",Bs,$e],brightness:B(),borderColor:[e],borderRadius:["n
233one","","full",Bs,$e],borderSpacing:A(),borderWidth:L(),contrast:B(),grayscale:M(),hueRotate:B(),invert:M(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[Goe,Fs],inset:P(),margin:P(),opacity:B(),padding:A(),saturate:B(),scale:B(),sepia:M(),skew:B(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[Bs]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...D(),$e]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",kf,$e]}],basis:[{basis:P()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",kf,$e]}],"grid-cols":[{"grid-cols":[Af]}],"col-start-end":[{col:["auto",{span:["full",kf,$e]},$e]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[Af]}],"row-start-end":[{row:["auto",{span:[kf,$e]},$e]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}
vendor: 8,342 bytes, line 233
233],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[Bs]},Bs]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Bs,Fs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",M_]}],"font-family":[{font:[Af]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$e]}],"line-clamp":[{"line-clamp":["none",vu,M_]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$o,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$o,Fs]}],"underline-offset":[{"underline-offset":["auto",$o,$e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),Joe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Qoe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Zoe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:O()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[$o,$e]}],"outline-w":[{outline:[$o,Fs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[$o,Fs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Bs,ese]}],"shadow-color":[{shadow:[Af]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Bs,$e]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[kf,$e]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
233],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$o,Fs,M_]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},ose=Boe(ise);function K(...e){return ose(et(e))}function Vot(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function qot(e){return e==null?"":e.toLocaleString(void 0,{notation:"compact",maximumFractionDigits:1})}const rk=v.forwardRef(({className:e,...t},n)=>l.jsx(sV,{className:K("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:l.jsx(Noe,{className:K("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));rk.displayName=sV.displayName;function sse(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var ks=e=>{const{present:t,children:n}=e,r=ase(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=rt(r.ref,lse(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};ks.displayName="Presence";function ase(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),o=v.useRef("none"),s=e?"mounted":"unmounted",[a,c]=sse(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=Tg(r.current);o.current=a==="mounted"?u:"none"},[a]),Qn(()=>{const u=r.current,d=i.current;if(d!==e){const h=o.current,p=Tg(u);e?c("MOUNT"):p==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Qn(()=>
vendor: 4,146 bytes, lines 233-243
233{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const g=Tg(r.current).includes(p.animationName);if(p.target===t&&g&&(c("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=p=>{p.target===t&&(o.current=Tg(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Tg(e){return e?.animationName||"none"}function lse(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ik="Checkbox",[cse,Kot]=Ps(ik),[use,dse]=cse(ik),hV=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:u,form:d,...f}=e,[h,p]=v.useState(null),m=rt(t,S=>p(S)),g=v.useRef(!1),y=h?d||!!h.closest("form"):!0,[b=!1,x]=si({prop:i,defaultProp:o,onChange:u}),w=v.useRef(b);return v.useEffect(()=>{const S=h?.form;if(S){const _=()=>x(w.current);return S.addEventListener("reset",_),()=>S.removeEventListener("reset",_)}},[h,x]),l.jsxs(use,{scope:n,state:b,disabled:a,children:[l.jsx(Oe.button,{type:"button",role:"checkbox","aria-checked":va(b)?"mixed":b,"aria-required":s,"data-state":gV(b),"data-disabled":a?"":void 0,disabled:a,value:c,...f,ref:m,onKeyDown:xe(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:xe(e.onClick,S=>{x(_=>va(_)?!0:!_),y&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})}),y&&l.jsx(fse,{control:h,bubbles:!g.current,name:r,value:c,checked:b,required:s,disabled:a,form:d,style:{transform:"translateX(-100%)"},defaultChecked:va(o)?!1:o})]})});hV.displayName=ik;var pV="CheckboxIndicator",mV=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=dse(pV,n);return l.jsx(ks,{present:r||va(o.state)||o.state===!0,children:l.jsx(Oe.span,{"data-state":gV(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});mV.displayName=pV;var fse=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...o}=e,s=v.useRef(null),a=Yb(n),c=Qb(t);v.useEffect(()=>{const d=s.current,f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(a!==n&&p){const m=new Event("click",{bubbles:r});d.indeterminate=va(n),p.call(d,va(n)?!1:n),d.dispatchEvent(m)}},[a,n,r]);const u=v.useRef(va(n)?!1:n);return l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??u.current,...o,tabIndex:-1,ref:s,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function va(e){return e==="indeterminate"}function gV(e){return va(e)?"indeterminate":e?"checked":"unchecked"}var vV=hV,hse=mV;/** 234 * @license lucide-react v0.344.0 - ISC 235 * 236 * This source code is licensed under the ISC license. 237 * See the LICENSE file in the root directory of this source tree. 238 */var pse={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 239 * @license lucide-react v0.344.0 - ISC 240 * 241 * This source code is licensed under the ISC license. 242 * See the LICENSE file in the root directory of this source tree. 243 */const mse=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),be=(e,t)=>{const n=v.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:a="",children:c,...u},d)=>v.createElement("svg",{ref:d,...pse,width:i,height:i,stroke:r,strokeWidth:s?Number(o)*24/Number(i):o,className:["lucide",`lucide-${mse(e)}`,a].join(" "),...u},[...t.map(([f,h])=>
243v.createElement(f,h)),...Array.isArray(c)?c:[c]]));return n.displayName=`${e}`,n};/** 244 * @license lucide-react v0.344.0 - ISC 245 * 246 * This source code is licensed under the ISC license. 247 * See the LICENSE file in the root directory of this source tree. 248 */const gs=be("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 249 * @license lucide-react v0.344.0 - ISC 250 * 251 * This source code is licensed under the ISC license. 252 * See the LICENSE file in the root directory of this source tree. 253 */const gse=be("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 254 * @license lucide-react v0.344.0 - ISC 255 * 256 * This source code is licensed under the ISC license. 257 * See the LICENSE file in the root directory of this source tree. 258 */const Ad=be("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 259 * @license lucide-react v0.344.0 - ISC 260 * 261 * This source code is licensed under the ISC license. 262 * See the LICENSE file in the root directory of this source tree. 263 */const vse=be("AudioLines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);/** 264 * @license lucide-react v0.344.0 - ISC 265 * 266 * This source code is licensed under the ISC license. 267 * See the LICENSE file in the root directory of this source tree. 268 */const yV=be("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 269 * @license lucide-react v0.344.0 - ISC 270 * 271 * This source code is licensed under the ISC license. 272 * See the LICENSE file in the root directory of this source tree. 273 */const $_=be("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** 274 * @license lucide-react v0.344.0 - ISC 275 * 276 * This source code is licensed under the ISC license. 277 * See the LICENSE file in the root directory of this source tree. 278 */const ok=be("Briefcase",[["rect",{width:"20",height:"14",x:"2",y:"7",rx:"2",ry:"2",key:"eto64e"}],["path",{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"zwj3tp"}]]);/** 279 * @license lucide-react v0.344.0 - ISC 280 * 281 * This source code is licensed under the ISC license. 282 * See the LICENSE file in the root directory of this source tree. 283 */const xV=be("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/** 284 * @license lucide-react v0.344.0 - ISC 285 * 286 * This source code is licensed under the ISC license. 287 * See the LICENSE file in the root directory of this source tree. 288 */const sk=be("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 289 * @license lucide-react v0.344.0 - ISC 290 * 291 * This source code is licensed under the ISC license. 292 * See the LICENSE file in the root directory of this source tree. 293 */const yse=be("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 294 * @license lucide-react v0.344.0 - ISC 295 * 296 * This source code is licensed under the ISC license. 297 * See the LICENSE file in the root directory of this source tree. 298 */const bo=be("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 299 * @license lucide-react v0.344.0 - ISC 300 * 301 * This source code is licensed under the ISC license. 302 * See the LICENSE file in the root directory of this source tree. 303 */const Td=be("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 304 * @license lucide-react v0.344.0 - ISC 305 * 306 * This source code is licensed under the ISC license. 307 * See the LICENSE file in the root directory of this source tree. 308 */const Em=be("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 309 * @license lucide-react v0.344.0 - ISC 310 * 311 * This source code is licensed under the ISC license. 312 * See the LICENSE file in the root directory of this source tree. 313 */const xse=be("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 314 * @license lucide-react v0.344.0 - ISC 315 * 316 * This source code is licensed under the ISC license. 317 * See the LICENSE file in the root directory of this source tree. 318 */const bse=be("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 319 * @license lucide-react v0.344.0 - ISC 320 * 321 * This source code is licensed under the ISC license. 322 * See the LICENSE file in the root directory of this source tree.
323 */const jj=be("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/** 324 * @license lucide-react v0.344.0 - ISC 325 * 326 * This source code is licensed under the ISC license. 327 * See the LICENSE file in the root directory of this source tree. 328 */const ip=be("Compass",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76",key:"m9r19z"}]]);/** 329 * @license lucide-react v0.344.0 - ISC 330 * 331 * This source code is licensed under the ISC license. 332 * See the LICENSE file in the root directory of this source tree. 333 */const wse=be("Contact",[["path",{d:"M17 18a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2",key:"1mghuy"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["circle",{cx:"12",cy:"10",r:"2",key:"1yojzk"}],["line",{x1:"8",x2:"8",y1:"2",y2:"4",key:"1ff9gb"}],["line",{x1:"16",x2:"16",y1:"2",y2:"4",key:"1ufoma"}]]);/** 334 * @license lucide-react v0.344.0 - ISC 335 * 336 * This source code is licensed under the ISC license. 337 * See the LICENSE file in the root directory of this source tree. 338 */const Ej=be("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 339 * @license lucide-react v0.344.0 - ISC 340 * 341 * This source code is licensed under the ISC license. 342 * See the LICENSE file in the root directory of this source tree. 343 */const _se=be("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 344 * @license lucide-react v0.344.0 - ISC 345 * 346 * This source code is licensed under the ISC license. 347 * See the LICENSE file in the root directory of this source tree. 348 */const Sse=be("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 349 * @license lucide-react v0.344.0 - ISC 350 * 351 * This source code is licensed under the ISC license. 352 * See the LICENSE file in the root directory of this source tree. 353 */const bV=be("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 354 * @license lucide-react v0.344.0 - ISC 355 * 356 * This source code is licensed under the ISC license. 357 * See the LICENSE file in the root directory of this source tree. 358 */const jse=be("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 359 * @license lucide-react v0.344.0 - ISC 360 * 361 * This source code is licensed under the ISC license. 362 * See the LICENSE file in the root directory of this source tree. 363 */const Ese=be("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 364 * @license lucide-react v0.344.0 - ISC 365 * 366 * This source code is licensed under the ISC license. 367 * See the LICENSE file in the root directory of this source tree. 368 */const Cse=be("FileCheck2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m3 15 2 2 4-4",key:"1lhrkk"}]]);/** 369 * @license lucide-react v0.344.0 - ISC 370 * 371 * This source code is licensed under the ISC license. 372 * See the LICENSE file in the root directory of this source tree. 373 */const Cm=be("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 374 * @license lucide-react v0.344.0 - ISC 375 * 376 * This source code is licensed under the ISC license. 377 * See the LICENSE file in the root directory of this source tree. 378 */const Nse=be("FileUp",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]]);/** 379 * @license lucide-react v0.344.0 - ISC 380 * 381 * This source code is licensed under the ISC license. 382 * See the LICENSE file in the root directory of this source tree. 383 */const wV=be("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** 384 * @license lucide-react v0.344.0 - ISC 385 * 386 * This source code is licensed under the ISC license. 387 * See the LICENSE file in the root directory of this source tree. 388 */const Pse=be("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** 389 * @license lucide-react v0.344.0 - ISC 390 * 391 * This source code is licensed under the ISC license. 392 * See the LICENSE file in the root directory of this source tree. 393 */const _V=be("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 394 * @license lucide-react v0.344.0 - ISC 395 * 396 * This source code is licensed under the ISC license. 397 * See the LICENSE file in the root directory of this source tree. 398 */const kse=be("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);/** 399 * @license lucide-react v0.344.0 - ISC 400 * 401 * This source code is licensed under the ISC license. 402 * See the LICENSE file in the root directory of this source tree. 403 */const Ase=be("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 404 * @license lucide-react v0.344.0 - ISC 405 * 406 * This source code is licensed under the ISC license. 407 * See the LICENSE file in the root directory of this source tree.
408 */const Tse=be("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 409 * @license lucide-react v0.344.0 - ISC 410 * 411 * This source code is licensed under the ISC license. 412 * See the LICENSE file in the root directory of this source tree. 413 */const Rse=be("LineChart",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/** 414 * @license lucide-react v0.344.0 - ISC 415 * 416 * This source code is licensed under the ISC license. 417 * See the LICENSE file in the root directory of this source tree. 418 */const Ose=be("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 419 * @license lucide-react v0.344.0 - ISC 420 * 421 * This source code is licensed under the ISC license. 422 * See the LICENSE file in the root directory of this source tree. 423 */const Ise=be("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 424 * @license lucide-react v0.344.0 - ISC 425 * 426 * This source code is licensed under the ISC license. 427 * See the LICENSE file in the root directory of this source tree. 428 */const Py=be("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 429 * @license lucide-react v0.344.0 - ISC 430 * 431 * This source code is licensed under the ISC license. 432 * See the LICENSE file in the root directory of this source tree. 433 */const Mse=be("Mailbox",[["path",{d:"M22 17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9.5C2 7 4 5 6.5 5H18c2.2 0 4 1.8 4 4v8Z",key:"1lbycx"}],["polyline",{points:"15,9 18,9 18,11",key:"1pm9c0"}],["path",{d:"M6.5 5C9 5 11 7 11 9.5V17a2 2 0 0 1-2 2v0",key:"n6nfvi"}],["line",{x1:"6",x2:"7",y1:"10",y2:"10",key:"1e2scm"}]]);/** 434 * @license lucide-react v0.344.0 - ISC 435 * 436 * This source code is licensed under the ISC license. 437 * See the LICENSE file in the root directory of this source tree. 438 */const SV=be("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 439 * @license lucide-react v0.344.0 - ISC 440 * 441 * This source code is licensed under the ISC license. 442 * See the LICENSE file in the root directory of this source tree. 443 */const jV=be("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** 444 * @license lucide-react v0.344.0 - ISC 445 * 446 * This source code is licensed under the ISC license. 447 * See the LICENSE file in the root directory of this source tree. 448 */const $se=be("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 449 * @license lucide-react v0.344.0 - ISC 450 * 451 * This source code is licensed under the ISC license. 452 * See the LICENSE file in the root directory of this source tree. 453 */const Dse=be("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** 454 * @license lucide-react v0.344.0 - ISC 455 * 456 * This source code is licensed under the ISC license. 457 * See the LICENSE file in the root directory of this source tree. 458 */const Lse=be("MoveVertical",[["polyline",{points:"8 18 12 22 16 18",key:"1uutw3"}],["polyline",{points:"8 6 12 2 16 6",key:"d60sxy"}],["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}]]);/** 459 * @license lucide-react v0.344.0 - ISC 460 * 461 * This source code is licensed under the ISC license. 462 * See the LICENSE file in the root directory of this source tree. 463 */const Fse=be("Navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);/** 464 * @license lucide-react v0.344.0 - ISC 465 * 466 * This source code is licensed under the ISC license. 467 * See the LICENSE file in the root directory of this source tree. 468 */const EV=be("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 469 * @license lucide-react v0.344.0 - ISC 470 * 471 * This source code is licensed under the ISC license. 472 * See the LICENSE file in the root directory of this source tree. 473 */const lc=be("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/** 474 * @license lucide-react v0.344.0 - ISC 475 * 476 * This source code is licensed under the ISC license. 477 * See the LICENSE file in the root directory of this source tree. 478 */const Jb=be("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 479 * @license lucide-react v0.344.0 - ISC 480 * 481 * This source code is licensed under the ISC license. 482 * See the LICENSE file in the root directory of this source tree. 483 */const ak=be("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 484 * @license lucide-react v0.344.0 - ISC 485 * 486 * This source code is licensed under the ISC license. 487 * See the LICENSE file in the root directory of this source tree. 488 */const Bse=be("ScatterChart",[["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}],["circle",{cx:"18.5",cy:"5.5",r:".5",fill:"currentColor",key:"lysivs"}],["circle",{cx:"11.5",cy:"11.5",r:".5",fill:"currentColor",key:"byv1b8"}],["circle",{cx:"7.5",cy:"16.5",r:".5",fill:"currentColor",key:"nkw3mc"}],["circle",{cx:"17.5",cy:"14.5",r:".5",fill:"currentColor",key:"1gjh6j"}],["path",{d:"M3 3v18h18",key:"1s2lah"}]]);/** 489 * @license lucide-react v0.344.0 - ISC 490 * 491 * This source code is licensed under the ISC license. 492 * See the LICENSE file in the root directory of this source tree. 493 */const Ea=be("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 494 * @license lucide-react v0.344.0 - ISC 495 * 496 * This source code is licensed under the ISC license. 497 * See the LICENSE file in the root directory of this source tree. 498 */const Use=be("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 499 * @license lucide-react v0.344.0 - ISC 500 * 501 * This source code is licensed under the ISC license. 502 * See the LICENSE file in the root directory of this source tree. 503 */const zse=be("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** 504 * @license lucide-react v0.344.0 - ISC 505 * 506 * This source code is licensed under the ISC license. 507 * See the LICENSE file in the root directory of this source tree. 508 */const Vse=be("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/** 509 * @license lucide-react v0.344.0 - ISC 510 * 511 * This source code is licensed under the ISC license. 512 * See the LICENSE file in the root directory of this source tree. 513 */const Rd=be("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** 514 * @license lucide-react v0.344.0 - ISC 515 * 516 * This source code is licensed under the ISC license. 517 * See the LICENSE file in the root directory of this source tree. 518 */const qse=be("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** 519 * @license lucide-react v0.344.0 - ISC 520 * 521 * This source code is licensed under the ISC license. 522 * See the LICENSE file in the root directory of this source tree. 523 */const CV=be("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 524 * @license lucide-react v0.344.0 - ISC 525 * 526 * This source code is licensed under the ISC license. 527 * See the LICENSE file in the root directory of this source tree. 528 */const Kse=be("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
vendor: 8,438 bytes, lines 528-578
528],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 529 * @license lucide-react v0.344.0 - ISC 530 * 531 * This source code is licensed under the ISC license. 532 * See the LICENSE file in the root directory of this source tree. 533 */const NV=be("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/** 534 * @license lucide-react v0.344.0 - ISC 535 * 536 * This source code is licensed under the ISC license. 537 * See the LICENSE file in the root directory of this source tree. 538 */const Wse=be("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 539 * @license lucide-react v0.344.0 - ISC 540 * 541 * This source code is licensed under the ISC license. 542 * See the LICENSE file in the root directory of this source tree. 543 */const PV=be("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/** 544 * @license lucide-react v0.344.0 - ISC 545 * 546 * This source code is licensed under the ISC license. 547 * See the LICENSE file in the root directory of this source tree. 548 */const Hse=be("UserSearch",[["circle",{cx:"10",cy:"7",r:"4",key:"e45bow"}],["path",{d:"M10.3 15H7a4 4 0 0 0-4 4v2",key:"3bnktk"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}]]);/** 549 * @license lucide-react v0.344.0 - ISC 550 * 551 * This source code is licensed under the ISC license. 552 * See the LICENSE file in the root directory of this source tree. 553 */const Gse=be("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 554 * @license lucide-react v0.344.0 - ISC 555 * 556 * This source code is licensed under the ISC license. 557 * See the LICENSE file in the root directory of this source tree. 558 */const lk=be("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 559 * @license lucide-react v0.344.0 - ISC 560 * 561 * This source code is licensed under the ISC license. 562 * See the LICENSE file in the root directory of this source tree. 563 */const ck=be("Wallet",[["path",{d:"M21 12V7H5a2 2 0 0 1 0-4h14v4",key:"195gfw"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h16v-5",key:"195n9w"}],["path",{d:"M18 12a2 2 0 0 0 0 4h4v-4Z",key:"vllfpd"}]]);/** 564 * @license lucide-react v0.344.0 - ISC 565 * 566 * This source code is licensed under the ISC license. 567 * See the LICENSE file in the root directory of this source tree. 568 */const Cj=be("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 569 * @license lucide-react v0.344.0 - ISC 570 * 571 * This source code is licensed under the ISC license. 572 * See the LICENSE file in the root directory of this source tree. 573 */const Dr=be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 574 * @license lucide-react v0.344.0 - ISC 575 * 576 * This source code is licensed under the ISC license. 577 * See the LICENSE file in the root directory of this source tree. 578 */const kV=be("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),ql=v.forwardRef(({className:e,...t},n)=>l.jsx(vV,{ref:n,className:K("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:l.jsx(hse,{className:K("flex items-center justify-center text-current"),children:l.jsx(bo,{className:"h-4 w-4"})})}));ql.displayName=vV.displayName;function Yse(e,t=[]){let n=[];function r(o,s){const a=v.createContext(s),c=n.length;n=[...n,s];function u(f){const{scope:h,children:p,...m}=f,g=h?.[e][c]||a,y=v.useMemo(()=>m,Object.values(m));return l.jsx(g.Provider,{value:y,children:p})}function d(f,h){const p=h?.[e][c]||a,m=v.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=n.map(s=>v.createContext(s));return function(a){const c=a?.[e]||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,Qse(i,...t)]}function Qse(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Jse(e,t=[]){let n=[];function r(o,s){const a=v.createContext(s),c=n.length;n=[...n,s];function u(f){const{scope:h,children:p,...m}=f,g=h?.[e][c]||a,y=v.useMemo(()=>m,Object.values(m));return l.jsx(g.Provider,{value:y,children:p})}function d(f,h){const p=h?.[e][c]||a,m=v.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=n.map(s=>v.createContext(s));return function(a){const c=a?.[e]||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,Xse(i,...t)]}function Xse(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Xb(e){const t=e+"CollectionProvider",[n,r]=Jse(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:m,children:g}=p,y=$.useRef(null),b=$.useRef(new Map).current;return l.jsx(i,{scope:m,itemMap:b,collectionRef:y,children:g})};s.displayName=t;const a=e+"CollectionSlot",c=$.forwardRef((p,m)=>{const{scope:g,children:y}=p,b=o(a,g),x=rt(m,b.collectionRef);return l.jsx(Bi,{ref:x,children:y})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=$.forwardRef((p,m)=>{const{scope:g,children:y,...b}=p,x=$.useRef(null),w=rt(m,x),S=o(u,g);return $.useEffect(()=>(S.itemMap.set(x,{ref:x,...b}),()=>void S.itemMap.delete(x))),l.jsx(Bi,{[d]:"",ref:w,children:y})});f.displayName=u;function h(p){const m=o(e+"CollectionConsumer",p);return $.useCallback(()=>{const y=m.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(m.itemMap.values()).sort((S,_)=>b.indexOf(S.ref.current)-b.indexOf(_.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:s,Slot:c,ItemSlot:f},h,r]}function Zse(e,t=[]){let n=[];function r(o,s){const a=v.createContext(s),c=n.length;n=[...n,s];function u(f){const{scope:h,children:p,...m}=f,g=h?.[e][c]||a,y=v.useMemo(()=>m,Object.values(m));return l.jsx(g.Provider,{value:y,children:p})}function d(f,h){const p=h?.[e][c]||a,m=v.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=n.map(s=>v.createContext(s));return function(a){const c=a?.[e]||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,eae(i,...t)]}function eae(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var tae=XN.useId||(()=>{}),nae=0;function Ca(e){const[t,n]=v.useState(tae());return Qn(()=>{n(r=>r??String(nae++))},[e]),t?`radix-${t}`:""}var rae=v.createContext(void 0);function Od(e){const t=v.useContext(rae);return e||t||"ltr"}var D_="rovingFocusGroup.onEntryFocus",iae={bubbles:!1,cancelable:!0},Zb="RovingFocusGroup",[Nj,AV,oae]=Xb(Zb),[sae,Id]=Zse(Zb,[oae]),[aae,lae]=sae(Zb),TV=v.forwardRef((e,t)=>
vendor: 3,126 bytes, line 578
578l.jsx(Nj.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Nj.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(cae,{...e,ref:t})})}));TV.displayName=Zb;var cae=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=v.useRef(null),p=rt(t,h),m=Od(o),[g=null,y]=si({prop:s,defaultProp:a,onChange:c}),[b,x]=v.useState(!1),w=ac(u),S=AV(n),_=v.useRef(!1),[j,E]=v.useState(0);return v.useEffect(()=>{const C=h.current;if(C)return C.addEventListener(D_,w),()=>C.removeEventListener(D_,w)},[w]),l.jsx(aae,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:g,onItemFocus:v.useCallback(C=>y(C),[y]),onItemShiftTab:v.useCallback(()=>x(!0),[]),onFocusableItemAdd:v.useCallback(()=>E(C=>C+1),[]),onFocusableItemRemove:v.useCallback(()=>E(C=>C-1),[]),children:l.jsx(Oe.div,{tabIndex:b||j===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:xe(e.onMouseDown,()=>{_.current=!0}),onFocus:xe(e.onFocus,C=>{const N=!_.current;if(C.target===C.currentTarget&&N&&!b){const k=new CustomEvent(D_,iae);if(C.currentTarget.dispatchEvent(k),!k.defaultPrevented){const P=S().filter(O=>O.focusable),A=P.find(O=>O.active),L=P.find(O=>O.id===g),D=[A,L,...P].filter(Boolean).map(O=>O.ref.current);IV(D,d)}}_.current=!1}),onBlur:xe(e.onBlur,()=>x(!1))})})}),RV="RovingFocusGroupItem",OV=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,a=Ca(),c=o||a,u=lae(RV,n),d=u.currentTabStopId===c,f=AV(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=u;return v.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),l.jsx(Nj.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:l.jsx(Oe.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:xe(e.onMouseDown,m=>{r?u.onItemFocus(c):m.preventDefault()}),onFocus:xe(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:xe(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){u.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const g=fae(m,u.orientation,u.dir);if(g!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let b=f().filter(x=>x.focusable).map(x=>x.ref.current);if(g==="last")b.reverse();else if(g==="prev"||g==="next"){g==="prev"&&b.reverse();const x=b.indexOf(m.currentTarget);b=u.loop?hae(b,x+1):b.slice(x+1)}setTimeout(()=>IV(b))}})})})});OV.displayName=RV;var uae={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dae(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function fae(e,t,n){const r=dae(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return uae[r]}function IV(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function hae(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uk=TV,dk=OV,pae="Toggle",fk=v.forwardRef((e,t)=>
578{const{pressed:n,defaultPressed:r=!1,onPressedChange:i,...o}=e,[s=!1,a]=si({prop:n,onChange:i,defaultProp:r});return l.jsx(Oe.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:xe(e.onClick,()=>{e.disabled||a(!s)})})});fk.displayName=pae;var MV=fk,Md="ToggleGroup",[$V,Wot]=Yse(Md,[Id]),DV=Id(),hk=$.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return l.jsx(mae,{...i,ref:t})}if(n==="multiple"){const i=r;return l.jsx(gae,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Md}\``)});hk.displayName=Md;var[LV,FV]=$V(Md),mae=$.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s,a]=si({prop:n,defaultProp:r,onChange:i});return l.jsx(LV,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:a,onItemDeactivate:$.useCallback(()=>a(""),[a]),children:l.jsx(BV,{...o,ref:t})})}),gae=$.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s=[],a]=si({prop:n,defaultProp:r,onChange:i}),c=$.useCallback(d=>a((f=[])=>[...f,d]),[a]),u=$.useCallback(d=>a((f=[])=>f.filter(h=>h!==d)),[a]);return l.jsx(LV,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:c,onItemDeactivate:u,children:l.jsx(BV,{...o,ref:t})})});hk.displayName=Md;var[vae,yae]=$V(Md),BV=$.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:o,dir:s,loop:a=!0,...c}=e,u=DV(n),d=Od(s),f={role:"group",dir:d,...c};return l.jsx(vae,{scope:n,rovingFocus:i,disabled:r,children:i?l.jsx(uk,{asChild:!0,...u,orientation:o,dir:d,loop:a,children:l.jsx(Oe.div,{...f,ref:t})}):l.jsx(Oe.div,{...f,ref:t})})}),ky="ToggleGroupItem",UV=$.forwardRef((e,t)=>{const n=FV(ky,e.__scopeToggleGroup),r=yae(ky,e.__scopeToggleGroup),i=DV(e.__scopeToggleGroup),o=n.value.includes(e.value),s=r.disabled||e.disabled,a={...e,pressed:o,disabled:s},c=$.useRef(null);return r.rovingFocus?l.jsx(dk,{asChild:!0,...i,focusable:!s,active:o,ref:c,children:l.jsx(LI,{...a,ref:t})}):l.jsx(LI,{...a,ref:t})});UV.displayName=ky;var LI=$.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,o=FV(ky,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},a=o.type==="single"?s:void 0;return l.jsx(fk,{...a,...i,ref:t,onPressedChange:c=>{c?o.onItemActivate(r):o.onItemDeactivate(r)}})}),zV=hk,VV=UV;function qV(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=qV(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function xae(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=qV(e))&&(r&&(r+=" "),r+=t);return r}const FI=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,BI=xae,Nm=(e,t)=>n=>{var r;if(t?.variants==null)return BI(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const d=n?.[u],f=o?.[u];if(d===null)return null;const h=FI(d)||FI(f);return i[u][h]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(m=>{let[g,y]=m;return Array.isArray(y)?y.includes({...o,...a}[g]):{...o,...a}[g]===y})?[...u,f,h]:u},[]);return BI(e,s,c,n?.class,n?.className)},KV=Nm("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3 min-w-10",sm:"h-9 px-2.5 min-w-9",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"default",size:"default"}}),bae=v.forwardRef(({className:e,variant:t,size:n,...r},i)=>l.jsx(MV,{ref:i,className:K(KV({variant:t,size:n,className:e})),...r}));bae.displayName=MV.displayName;const WV=v.createContext({size:"default",variant:"default"}),pk=v.forwardRef(({className:e,variant:t,size:n,children:r,...i},o)=>l.jsx(zV,{ref:o,className:K("flex items-center justify-center gap-1",e),...i,children:l.jsx(WV.Provider,{value:{variant:t,size:n},children:r})}));pk.displayName=zV.displayName;const yu=v.forwardRef(({className:e,children:t,variant:n,size:r,...i},o)=>{const s=v.useContext(WV);return l.jsx(VV,{ref:o,className:K(KV({variant:s.variant||n,size:s.size||r}),e),...i,children:t})});yu.displayName=VV.displayName;function wae(e){return"profile_v2"}const _ae=wae();function _h(e,t,n){return["jobs-recommendations-warm",e??0,[...t??[]].sort((r,i)=>r-i),n??""]}const Pm={portalEntry:"portal_entry",cvUpdated:"cv_updated",primaryCvChanged:"primary_cv_changed",exploreJobs:"explore_jobs"},Sae=_ae,HV="dev.ranking_variant",GV="dev.ranking_explain",Hot=doe,jae={variant:Sae,explain:!1},Pj=new Set;function UI(e,t){try{t===null&&window.localStorage.removeItem(e)}catch{}}function YV(){return jae}let Sh=YV();function QV(){const e=YV();(e.variant!==Sh.variant||e.explain!==Sh.explain)&&(Sh=e);for(const t of Pj)t()}const Got={getSnapshot(){return Sh},subscribe(e){return Pj.add(e),()=>{Pj.delete(e)}},setVariant(e){},setExplain(e){},reset(){UI(HV,null),UI(GV,null),QV()}};function Eae(){return Sh.variant}typeof window<"u"&&window.addEventListener("storage",e=>{(e.key===HV||e.key===GV)&&QV()});function Cae(){return null}
578class nh extends Error{}nh.prototype.name="InvalidTokenError";function Nae(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function Pae(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Nae(t)}catch{return atob(t)}}function kae(e,t){if(typeof e!="string")throw new nh("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new nh(`Invalid token specified: missing part #${n+1}`);let i;try{i=Pae(r)}catch(o){throw new nh(`Invalid token specified: invalid base64 for part #${n+1} (${o.message})`)}try{return JSON.parse(i)}catch(o){throw new nh(`Invalid token specified: invalid json for part #${n+1} (${o.message})`)}}var Aae={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},io,oo,Ay=(e=>(e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e))(Ay||{});(e=>{function t(){io=3,oo=Aae}e.reset=t;function n(i){if(!(0<=i&&i<=4))throw new Error("Invalid log level");io=i}e.setLevel=n;function r(i){oo=i}e.setLogger=r})(Ay||(Ay={}));var Qe=class to{constructor(t){this._name=t}debug(...t){io>=4&&oo.debug(to._format(this._name,this._method),...t)}info(...t){io>=3&&oo.info(to._format(this._name,this._method),...t)}warn(...t){io>=2&&oo.warn(to._format(this._name,this._method),...t)}error(...t){io>=1&&oo.error(to._format(this._name,this._method),...t)}throw(t){throw this.error(t),t}create(t){const n=Object.create(this);return n._method=t,n.debug("begin"),n}static createStatic(t,n){const r=new to(`${t}.${n}`);return r.debug("begin"),r}static _format(t,n){const r=`[${t}]`;return n?`${r} ${n}:`:r}static debug(t,...n){io>=4&&oo.debug(to._format(t),...n)}static info(t,...n){io>=3&&oo.info(to._format(t),...n)}static warn(t,...n){io>=2&&oo.warn(to._format(t),...n)}static error(t,...n){io>=1&&oo.error(to._format(t),...n)}};Ay.reset();var Ty=class{static decode(e){try{return kae(e)}catch(t){throw Qe.error("JwtUtils.decode",t),t}}static async generateSignedJwt(e,t,n){const r=dr.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e))),i=dr.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t))),o=`${r}.${i}`,s=await window.crypto.subtle.sign({name:"ECDSA",hash:{name:"SHA-256"}},n,new TextEncoder().encode(o)),a=dr.encodeBase64Url(new Uint8Array(s));return`${o}.${a}`}},Tae="10000000-1000-4000-8000-100000000000",kj=e=>btoa([...new Uint8Array(e)].map(t=>String.fromCharCode(t)).join("")),JV=class no{static _randomWord(){const t=new Uint32Array(1);return crypto.getRandomValues(t),t[0]}static generateUUIDv4(){return Tae.replace(/[018]/g,n=>(+n^no._randomWord()&15>>+n/4).toString(16)).replace(/-/g,"")}static generateCodeVerifier(){return no.generateUUIDv4()+no.generateUUIDv4()+no.generateUUIDv4()}static async generateCodeChallenge(t){if(!crypto.subtle)throw new Error("Crypto.subtle is available only in secure contexts (HTTPS).");try{const r=new TextEncoder().encode(t),i=await crypto.subtle.digest("SHA-256",r);return kj(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(n){throw Qe.error("CryptoUtils.generateCodeChallenge",n),n}}static generateBasicAuth(t,n){const i=new TextEncoder().encode([t,n].join(":"));return kj(i)}static async hash(t,n){const r=new TextEncoder().encode(n),i=await crypto.subtle.digest(t,r);return new Uint8Array(i)}static async customCalculateJwkThumbprint(t){let n;switch(t.kty){case"RSA":n={e:t.e,kty:t.kty,n:t.n};break;case"EC":n={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case"OKP":n={crv:t.crv,kty:t.kty,x:t.x};break;case"oct":n={crv:t.k,kty:t.kty};break;default:throw new Error("Unknown jwk type")}const r=await no.hash("SHA-256",JSON.stringify(n));return no.encodeBase64Url(r)}static async generateDPoPProof({url:t,accessToken:n,httpMethod:r,keyPair:i,nonce:o}){let s,a;const c={jti:window.crypto.randomUUID(),htm:r??"GET",htu:t,iat:Math.floor(Date.now()/1e3)};
578n&&(s=await no.hash("SHA-256",n),a=no.encodeBase64Url(s),c.ath=a),o&&(c.nonce=o);try{const u=await crypto.subtle.exportKey("jwk",i.publicKey),d={alg:"ES256",typ:"dpop+jwt",jwk:{crv:u.crv,kty:u.kty,x:u.x,y:u.y}};return await Ty.generateSignedJwt(d,c,i.privateKey)}catch(u){throw u instanceof TypeError?new Error(`Error exporting dpop public key: ${u.message}`):u}}static async generateDPoPJkt(t){try{const n=await crypto.subtle.exportKey("jwk",t.publicKey);return await no.customCalculateJwkThumbprint(n)}catch(n){throw n instanceof TypeError?new Error(`Could not retrieve dpop keys from storage: ${n.message}`):n}}static async generateDPoPKeys(){return await window.crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign","verify"])}};JV.encodeBase64Url=e=>kj(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_");var dr=JV,Gs=class{constructor(t){this._name=t,this._callbacks=[],this._logger=new Qe(`Event('${this._name}')`)}addHandler(t){return this._callbacks.push(t),()=>this.removeHandler(t)}removeHandler(t){const n=this._callbacks.lastIndexOf(t);n>=0&&this._callbacks.splice(n,1)}async raise(...t){this._logger.debug("raise:",...t);for(const n of this._callbacks)await n(...t)}},zI=class{static center({...e}){var t,n,r;return e.width==null&&(e.width=(t=[800,720,600,480].find(i=>i<=window.outerWidth/1.618))!=null?t:360),(n=e.left)!=null||(e.left=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2))),e.height!=null&&((r=e.top)!=null||(e.top=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2)))),e}static serialize(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}=${typeof n!="boolean"?n:n?"yes":"no"}`).join(",")}},vs=class $v extends Gs{constructor(){super(...arguments),this._logger=new Qe(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{const t=this._expiration-$v.getEpochTime();this._logger.debug("timer completes in",t),this._expiration<=$v.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(t){const n=this._logger.create("init");t=Math.max(Math.floor(t),1);const r=$v.getEpochTime()+t;if(this.expiration===r&&this._timerHandle){n.debug("skipping since already initialized for expiration at",this.expiration);return}this.cancel(),n.debug("using duration",t),this._expiration=r;const i=Math.min(t,5);this._timerHandle=setInterval(this._callback,i*1e3)}get expiration(){return this._expiration}cancel(){this._logger.create("cancel"),this._timerHandle&&(clearInterval(this._timerHandle),this._timerHandle=null)}},Aj=class{static readParams(e,t="query"){if(!e)throw new TypeError("Invalid URL");const r=new URL(e,"http://127.0.0.1")[t==="fragment"?"hash":"search"];
578return new URLSearchParams(r.slice(1))}},Fu=";",ys=class extends Error{constructor(e,t){var n,r,i;if(super(e.error_description||e.error||""),this.form=t,this.name="ErrorResponse",!e.error)throw Qe.error("ErrorResponse","No error passed"),new Error("No error passed");this.error=e.error,this.error_description=(n=e.error_description)!=null?n:null,this.error_uri=(r=e.error_uri)!=null?r:null,this.state=e.userState,this.session_state=(i=e.session_state)!=null?i:null,this.url_state=e.url_state}},mk=class extends Error{constructor(e){super(e),this.name="ErrorTimeout"}},Rae=class{constructor(e){this._logger=new Qe("AccessTokenEvents"),this._expiringTimer=new vs("Access token expiring"),this._expiredTimer=new vs("Access token expired"),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}async load(e){const t=this._logger.create("load");if(e.access_token&&e.expires_in!==void 0){const n=e.expires_in;if(t.debug("access token present, remaining duration:",n),n>0){let i=n-this._expiringNotificationTimeInSeconds;i<=0&&(i=1),t.debug("registering expiring timer, raising in",i,"seconds"),this._expiringTimer.init(i)}else t.debug("canceling existing expiring timer because we're past expiration."),this._expiringTimer.cancel();const r=n+1;t.debug("registering expired timer, raising in",r,"seconds"),this._expiredTimer.init(r)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()}async unload(){this._logger.debug("unload: canceling existing access token timers"),this._expiringTimer.cancel(),this._expiredTimer.cancel()}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},Oae=class{constructor(e,t,n,r,i){this._callback=e,this._client_id=t,this._intervalInSeconds=r,this._stopOnError=i,this._logger=new Qe("CheckSessionIFrame"),this._timer=null,this._session_state=null,this._message=s=>{s.origin===this._frame_origin&&s.source===this._frame.contentWindow&&(s.data==="error"?(this._logger.error("error message from check session op iframe"),this._stopOnError&&this.stop()):s.data==="changed"?(this._logger.debug("changed message from check session op iframe"),this.stop(),this._callback()):this._logger.debug(s.data+" message from check session op iframe"))};const o=new URL(n);this._frame_origin=o.origin,this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="fixed",this._frame.style.left="-1000px",this._frame.style.top="0",this._frame.width="0",this._frame.height="0",this._frame.src=o.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener("message",this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create("start"),this.stop(),this._session_state=e;const t=()=>{!this._frame.contentWindow||!this._session_state||this._frame.contentWindow.postMessage(this._client_id+" "+this._session_state,this._frame_origin)};t(),this._timer=setInterval(t,this._intervalInSeconds*1e3)}stop(){this._logger.create("stop"),this._session_state=null,this._timer&&(clearInterval(this._timer),this._timer=null)}},XV=class{constructor(){this._logger=new Qe("InMemoryWebStorage"),this._data={}}clear(){this._logger.create("clear"),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,t){this._logger.create(`setItem('${e}')`),this._data[e]=t}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}},Tj=class extends Error{constructor(e,t){super(t),this.name="ErrorDPoPNonce",this.nonce=e}},gk=class{constructor(e=[],t=null,n={}){this._jwtHandler=t,this._extraHeaders=n,this._logger=new Qe("JsonService"),this._contentTypes=[],this._contentTypes.push(...e,"application/json"),t&&this._contentTypes.push("application/jwt")}async fetchWithTimeout(e,t={}){const{timeoutInSeconds:n,...r}=t;if(!n)return await fetch(e,r);const i=new AbortController,o=setTimeout(()=>i.abort(),n*1e3);try{return await fetch(e,{...t,signal:i.signal})}catch(s){throw s instanceof DOMException&&s.name==="AbortError"?new mk("Network timed out"):s}finally{clearTimeout(o)}}async getJson(e,{token:t,credentials:n,timeoutInSeconds:r}={}){const i=this._logger.create("getJson"),o={Accept:this._contentTypes.join(", ")};t&&(i.debug("token passed, setting Authorization header"),o.Authorization="Bearer "+t),this._appendExtraHeaders(o);let s;try{i.debug("url:",e),s=await this.fetchWithTimeout(e,{method:"GET",headers:o,timeoutInSeconds:r,credentials:n})}catch(u){throw i.error("Network Error"),u}i.debug("HTTP response received, status",s.status);const a=s.headers.get("Content-Type");if(a&&!this._contentTypes.find(u=>a.startsWith(u))&&i.throw(new Error(`Invalid response Content-Type: ${a??"undefined"}, from URL: ${e}`)),s.ok&&this._jwtHandler&&a?.startsWith("application/jwt"))return await this._jwtHandler(await s.text());let c;try{c=await s.json()}catch(u){throw i.error("Error parsing JSON response",u),s.ok?u:new Error(`${s.statusText} (${s.status})`)}if(!s.ok)throw i.error("Error from server:",c),c.error?new ys(c):new Error(`${s.statusText} (${s.status}): ${JSON.stringify(c)}`);return c}async postForm(e,{body:t,basicAuth:n,timeoutInSeconds:r,initCredentials:i,extraHeaders:o}){const s=this._logger.create("postForm"),a={Accept:this._contentTypes.join(", "),"Content-Type":"application/x-www-form-urlencoded",...o};n!==void 0&&(a.Authorization="Basic "+n),this._appendExtraHeaders(a);let c;try{s.debug("url:",e),c=await this.fetchWithTimeout(e,{method:"POST",headers:a,body:t,timeoutInSeconds:r,credentials:i})}catch(h){throw s.error("Network error"),h}s.debug("HTTP response received, status",c.status);const u=c.headers.get("Content-Type");if(u&&!this._contentTypes.find(h=>u.startsWith(h)))throw new Error(`Invalid response Content-Type: ${u??"undefined"}, from URL: ${e}`);const d=await c.text();let f={};
578if(d)try{f=JSON.parse(d)}catch(h){throw s.error("Error parsing JSON response",h),c.ok?h:new Error(`${c.statusText} (${c.status})`)}if(!c.ok){if(s.error("Error from server:",f),c.headers.has("dpop-nonce")){const h=c.headers.get("dpop-nonce");throw new Tj(h,`${JSON.stringify(f)}`)}throw f.error?new ys(f,t):new Error(`${c.statusText} (${c.status}): ${JSON.stringify(f)}`)}return f}_appendExtraHeaders(e){const t=this._logger.create("appendExtraHeaders"),n=Object.keys(this._extraHeaders),r=["accept","content-type"],i=["authorization"];n.length!==0&&n.forEach(o=>{if(r.includes(o.toLocaleLowerCase())){t.warn("Protected header could not be set",o,r);return}if(i.includes(o.toLocaleLowerCase())&&Object.keys(e).includes(o)){t.warn("Header could not be overridden",o,i);return}const s=typeof this._extraHeaders[o]=="function"?this._extraHeaders[o]():this._extraHeaders[o];s&&s!==""&&(e[o]=s)})}},Iae=class{constructor(e){this._settings=e,this._logger=new Qe("MetadataService"),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new gk(["application/jwk-set+json"],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug("using signingKeys from settings"),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug("using metadata from settings"),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug("using fetchRequestCredentials from settings"),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}async getMetadata(){const e=this._logger.create("getMetadata");if(this._metadata)return e.debug("using cached values"),this._metadata;if(!this._metadataUrl)throw e.throw(new Error("No authority or metadataUrl configured on settings")),null;e.debug("getting metadata from",this._metadataUrl);const t=await this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return e.debug("merging remote JSON with seed metadata"),this._metadata=Object.assign({},t,this._settings.metadataSeed),this._metadata}getIssuer(){return this._getMetadataProperty("issuer")}getAuthorizationEndpoint(){return this._getMetadataProperty("authorization_endpoint")}getUserInfoEndpoint(){return this._getMetadataProperty("userinfo_endpoint")}getTokenEndpoint(e=!0){return this._getMetadataProperty("token_endpoint",e)}getCheckSessionIframe(){return this._getMetadataProperty("check_session_iframe",!0)}getEndSessionEndpoint(){return this._getMetadataProperty("end_session_endpoint",!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty("revocation_endpoint",e)}getKeysEndpoint(e=!0){return this._getMetadataProperty("jwks_uri",e)}async _getMetadataProperty(e,t=!1){const n=this._logger.create(`_getMetadataProperty('${e}')`),r=await this.getMetadata();if(n.debug("resolved"),r[e]===void 0){if(t===!0){n.warn("Metadata does not contain optional property");return}n.throw(new Error("Metadata does not contain property "+e))}return r[e]}async getSigningKeys(){const e=this._logger.create("getSigningKeys");if(this._signingKeys)return e.debug("returning signingKeys from cache"),this._signingKeys;const t=await this.getKeysEndpoint(!1);e.debug("got jwks_uri",t);const n=await this._jsonService.getJson(t,{timeoutInSeconds:this._settings.requestTimeoutInSeconds});if(e.debug("got key set",n),!Array.isArray(n.keys))throw e.throw(new Error("Missing keys on keyset")),null;return this._signingKeys=n.keys,this._signingKeys}},vk=class{constructor({prefix:e="oidc.",store:t=localStorage}={}){this._logger=new Qe("WebStorageStateStore"),this._store=t,this._prefix=e}async set(e,t){this._logger.create(`set('${e}')`),e=this._prefix+e,await this._store.setItem(e,t)}async get(e){return this._logger.create(`get('${e}')`),e=this._prefix+e,await this._store.getItem(e)}async remove(e){this._logger.create(`remove('${e}')`),e=this._prefix+e;const t=await this._store.getItem(e);return await this._store.removeItem(e),t}async getAllKeys(){this._logger.create("getAllKeys");const e=await this._store.length,t=[];for(let n=0;n<e;n++){const r=await this._store.key(n);r&&r.indexOf(this._prefix)===0&&t.push(r.substr(this._prefix.length))}return t}},Mae="code",$ae="openid",Dae="client_secret_post",Lae=60*15,Rj=class{constructor({authority:e,metadataUrl:t,metadata:n,signingKeys:r,metadataSeed:i,client_id:o,client_secret:s,response_type:a=Mae,scope:c=$ae,redirect_uri:u,post_logout_redirect_uri:d,client_authentication:f=Dae,prompt:h,display:p,max_age:m,ui_locales:g,acr_values:y,resource:b,response_mode:x,filterProtocolClaims:w=!0,loadUserInfo:S=!1,requestTimeoutInSeconds:_,staleStateAgeInSeconds:j=Lae,mergeClaimsStrategy:E={array:"replace"},disablePKCE:C=!1,stateStore:N,revokeTokenAdditionalContentTypes:k,fetchRequestCredentials:P,refreshTokenAllowedScope:A,extraQueryParams:L={},extraTokenParams:R={},extraHeaders:D={},dpop:O,omitScopeWhenRequesting:F=!1}){var T;if(this.authority=e,t?this.metadataUrl=t:(this.metadataUrl=e,e&&(this.metadataUrl.endsWith("/")||(this.metadataUrl+="/"),this.metadataUrl+=".well-known/openid-configuration")),this.metadata=n,this.metadataSeed=i,this.signingKeys=r,this.client_id=o,this.client_secret=s,this.response_type=a,this.scope=c,this.redirect_uri=u,this.post_logout_redirect_uri=d,this.client_authentication=f,this.prompt=h,this.display=p,this.max_age=m,this.ui_locales=g,this.acr_values=y,this.resource=b,this.response_mode=x,this.filterProtocolClaims=w??!0,this.loadUserInfo=!!S,this.staleStateAgeInSeconds=j,this.mergeClaimsStrategy=E,this.omitScopeWhenRequesting=F,this.disablePKCE=!!C,this.revokeTokenAdditionalContentTypes=k,this.fetchRequestCredentials=P||"same-origin",this.requestTimeoutInSeconds=_,N)this.stateStore=N;else{const M=typeof window<"u"?window.localStorage:new XV;this.stateStore=new vk({store:M})}if(this.refreshTokenAllowedScope=A,this.extraQueryParams=L,this.extraTokenParams=R,this.extraHeaders=D,this.dpop=O,this.dpop&&!((T=this.dpop)!=null&&T.store))throw new Error("A DPoPStore is required when dpop is enabled")}},Fae=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new Qe("UserInfoService"),this._getClaimsFromJwt=async n=>{const r=this._logger.create("_getClaimsFromJwt");try{const i=Ty.decode(n);return r.debug("JWT decoding successful"),i}catch(i){throw r.error("Error parsing JWT response"),i}},this._jsonService=new gk(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}async getClaims(e){const t=this._logger.create("getClaims");e||this._logger.throw(new Error("No token passed"));const n=await this._metadataService.getUserInfoEndpoint();t.debug("got userinfo url",n);const r=await this._jsonService.getJson(n,{token:e,credentials:this._settings.fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return t.debug("got claims",r),r}},ZV=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new Qe("TokenClient"),this._jsonService=new gk(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}async exchangeCode({grant_type:e="authorization_code",redirect_uri:t=this._settings.redirect_uri,client_id:n=this._settings.client_id,client_secret:r=this._settings.client_secret,extraHeaders:i,...o}){const s=this._logger.create("exchangeCode");n||s.throw(new Error("A client_id is required")),t||s.throw(new Error("A redirect_uri is required")),o.code||s.throw(new Error("A code is required"));const a=new URLSearchParams({grant_type:e,redirect_uri:t});for(const[f,h]of Object.entries(o))h!=null&&a.set(f,h);let c;switch(this._settings.client_authentication){case"client_secret_basic":if(r==null)throw s.throw(new Error("A client_secret is required")),null;c=dr.generateBasicAuth(n,r);break;case"client_secret_post":a.append("client_id",n),r&&a.append("client_secret",r);break}const u=await this._metadataService.getTokenEndpoint(!1);s.debug("got token endpoint");const d=await this._jsonService.postForm(u,{body:a,basicAuth:c,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:i});return s.debug("got response"),d}async exchangeCredentials({grant_type:e="password",client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,scope:r=this._settings.scope,...i}){const o=this._logger.create("exchangeCredentials");t||o.throw(new Error("A client_id is required"));const s=new URLSearchParams({grant_type:e});this._settings.omitScopeWhenRequesting||s.set("scope",r);for(const[d,f]of Object.entries(i))f!=null&&s.set(d,f);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(n==null)throw o.throw(new Error("A client_secret is required")),null;a=dr.generateBasicAuth(t,n);break;case"client_secret_post":s.append("client_id",t),n&&s.append("client_secret",n);break}const c=await this._metadataService.getTokenEndpoint(!1);o.debug("got token endpoint");const u=await this._jsonService.postForm(c,{body:s,basicAuth:a,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials});return o.debug("got response"),u}async exchangeRefreshToken({grant_type:e="refresh_token",client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,timeoutInSeconds:r,extraHeaders:i,...o}){const s=this._logger.create("exchangeRefreshToken");t||s.throw(new Error("A client_id is required")),o.refresh_token||s.throw(new Error("A refresh_token is required"));const a=new URLSearchParams({grant_type:e});for(const[f,h]of Object.entries(o))Array.isArray(h)?h.forEach(p=>a.append(f,p)):h!=null&&a.set(f,h);let c;switch(this._settings.client_authentication){case"client_secret_basic":if(n==null)throw s.throw(new Error("A client_secret is required")),null;c=dr.generateBasicAuth(t,n);break;case"client_secret_post":a.append("client_id",t),n&&a.append("client_secret",n);break}const u=await this._metadataService.getTokenEndpoint(!1);s.debug("got token endpoint");const d=await this._jsonService.postForm(u,{body:a,basicAuth:c,timeoutInSeconds:r,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:i});return s.debug("got response"),d}async revoke(e){var t;const n=this._logger.create("revoke");e.token||n.throw(new Error("A token is required"));const r=await this._metadataService.getRevocationEndpoint(!1);n.debug(`got revocation endpoint, revoking ${(t=e.token_type_hint)!=null?t:"default token type"}`);const i=new URLSearchParams;for(const[o,s]of Object.entries(e))s!=null&&i.set(o,s);i.set("client_id",this._settings.client_id),this._settings.client_secret&&i.set("client_secret",this._settings.client_secret),await this._jsonService.postForm(r,{body:i,timeoutInSeconds:this._settings.requestTimeoutInSeconds}),n.debug("got response")}},Bae=class{constructor(e,t,n){this._settings=e,this._metadataService=t,this._claimsService=n,this._logger=new Qe("ResponseValidator"),this._userInfoService=new Fae(this._settings,this._metadataService),this._tokenClient=new ZV(this._settings,this._metadataService)}async validateSigninResponse(e,t,n){const r=this._logger.create("validateSigninResponse");this._processSigninState(e,t),r.debug("state processed"),await this._processCode(e,t,n),r.debug("code processed"),e.isOpenId&&this._val
578idateIdTokenAttributes(e),r.debug("tokens validated"),await this._processClaims(e,t?.skipUserInfo,e.isOpenId),r.debug("claims processed")}async validateCredentialsResponse(e,t){const n=this._logger.create("validateCredentialsResponse"),r=e.isOpenId&&!!e.id_token;r&&this._validateIdTokenAttributes(e),n.debug("tokens validated"),await this._processClaims(e,t,r),n.debug("claims processed")}async validateRefreshResponse(e,t){var n,r;const i=this._logger.create("validateRefreshResponse");e.userState=t.data,(n=e.session_state)!=null||(e.session_state=t.session_state),(r=e.scope)!=null||(e.scope=t.scope),e.isOpenId&&e.id_token&&(this._validateIdTokenAttributes(e,t.id_token),i.debug("ID Token validated")),e.id_token||(e.id_token=t.id_token,e.profile=t.profile);const o=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,o),i.debug("claims processed")}validateSignoutResponse(e,t){const n=this._logger.create("validateSignoutResponse");if(t.id!==e.state&&n.throw(new Error("State does not match")),n.debug("state validated"),e.userState=t.data,e.error)throw n.warn("Response was error",e.error),new ys(e)}_processSigninState(e,t){var n;const r=this._logger.create("_processSigninState");if(t.id!==e.state&&r.throw(new Error("State does not match")),t.client_id||r.throw(new Error("No client_id on state")),t.authority||r.throw(new Error("No authority on state")),this._settings.authority!==t.authority&&r.throw(new Error("authority mismatch on settings vs. signin state")),this._settings.client_id&&this._settings.client_id!==t.client_id&&r.throw(new Error("client_id mismatch on settings vs. signin state")),r.debug("state validated"),e.userState=t.data,e.url_state=t.url_state,(n=e.scope)!=null||(e.scope=t.scope),e.error)throw r.warn("Response was error",e.error),new ys(e);t.code_verifier&&!e.code&&r.throw(new Error("Expected code in response"))}async _processClaims(e,t=!1,n=!0){const r=this._logger.create("_processClaims");if(e.profile=this._claimsService.filterProtocolClaims(e.profile),t||!this._settings.loadUserInfo||!e.access_token){r.debug("not loading user info");return}r.debug("loading user info");const i=await this._userInfoService.getClaims(e.access_token);r.debug("user info claims received from user info endpoint"),n&&i.sub!==e.profile.sub&&r.throw(new Error("subject from UserInfo response does not match subject in ID Token")),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(i)),r.debug("user info claims received, updated profile:",e.profile)}async _processCode(e,t,n){const r=this._logger.create("_processCode");if(e.code){r.debug("Validating code");const i=await this._tokenClient.exchangeCode({client_id:t.client_id,client_secret:t.client_secret,code:e.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier,extraHeaders:n,...t.extraTokenParams});Object.assign(e,i)}else r.debug("No code to process")}_validateIdTokenAttributes(e,t){var n;const r=this._logger.create("_validateIdTokenAttributes");r.debug("decoding ID Token JWT");const i=Ty.decode((n=e.id_token)!=null?n:"");if(i.sub||r.throw(new Error("ID Token is missing a subject claim")),t){const o=Ty.decode(t);i.sub!==o.sub&&r.throw(new Error("sub in id_token does not match current sub")),i.auth_time&&i.auth_time!==o.auth_time&&r.throw(new Error("auth_time in id_token does not match original auth_time")),i.azp&&i.azp!==o.azp&&r.throw(new Error("azp in id_token does not match original azp")),!i.azp&&o.azp&&r.throw(new Error("azp not in id_token, but present in original id_token"))}e.profile=i}},Ry=class Oj{constructor(t){this.id=t.id||dr.generateUUIDv4(),this.data=t.data,t.created&&t.created>0?this.created=t.created:this.created=vs.getEpochTime(),this.request_type=t.request_type,this.url_state=t.url_state}toStorageString(){return new Qe("State").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state})}static fromStorageString(t){return Qe.createStatic("State","fromStorageString"),Promise.resolve(new Oj(JSON.parse(t)))}static async clearStaleState(t,n){const r=Qe.createStatic("State","clearStaleState"),i=vs.getEpochTime()-n,o=await t.getAllKeys();r.debug("got keys",o);for(let s=0;s<o.length;s++){const a=o[s],c=await t.get(a);let u=!1;if(c)try{const d=await Oj.fromStorageString(c);r.debug("got item from key:",a,d.created),d.created<=i&&(u=!0)}catch(d){r.error("Error parsing state for key:",a,d),u=!0}else r.debug("no item in storage for key:",a),u=!0;u&&(r.debug("removed item for key:",a),t.remove(a))}}},e5=class Ij extends Ry{constructor(t){super(t),this.code_verifier=t.code_verifier,this.co
578de_challenge=t.code_challenge,this.authority=t.authority,this.client_id=t.client_id,this.redirect_uri=t.redirect_uri,this.scope=t.scope,this.client_secret=t.client_secret,this.extraTokenParams=t.extraTokenParams,this.response_mode=t.response_mode,this.skipUserInfo=t.skipUserInfo}static async create(t){const n=t.code_verifier===!0?dr.generateCodeVerifier():t.code_verifier||void 0,r=n?await dr.generateCodeChallenge(n):void 0;return new Ij({...t,code_verifier:n,code_challenge:r})}toStorageString(){return new Qe("SigninState").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state,code_verifier:this.code_verifier,authority:this.authority,client_id:this.client_id,redirect_uri:this.redirect_uri,scope:this.scope,client_secret:this.client_secret,extraTokenParams:this.extraTokenParams,response_mode:this.response_mode,skipUserInfo:this.skipUserInfo})}static fromStorageString(t){Qe.createStatic("SigninState","fromStorageString");const n=JSON.parse(t);return Ij.create(n)}},t5=class n5{constructor(t){this.url=t.url,this.state=t.state}static async create({url:t,authority:n,client_id:r,redirect_uri:i,response_type:o,scope:s,state_data:a,response_mode:c,request_type:u,client_secret:d,nonce:f,url_state:h,resource:p,skipUserInfo:m,extraQueryParams:g,extraTokenParams:y,disablePKCE:b,dpopJkt:x,omitScopeWhenRequesting:w,...S}){if(!t)throw this._logger.error("create: No url passed"),new Error("url");if(!r)throw this._logger.error("create: No client_id passed"),new Error("client_id");if(!i)throw this._logger.error("create: No redirect_uri passed"),new Error("redirect_uri");if(!o)throw this._logger.error("create: No response_type passed"),new Error("response_type");if(!s)throw this._logger.error("create: No scope passed"),new Error("scope");if(!n)throw this._logger.error("create: No authority passed"),new Error("authority");const _=await e5.create({data:a,request_type:u,url_state:h,code_verifier:!b,client_id:r,authority:n,redirect_uri:i,response_mode:c,client_secret:d,scope:s,extraTokenParams:y,skipUserInfo:m}),j=new URL(t);j.searchParams.append("client_id",r),j.searchParams.append("redirect_uri",i),j.searchParams.append("response_type",o),w||j.searchParams.append("scope",s),f&&j.searchParams.append("nonce",f),x&&j.searchParams.append("dpop_jkt",x);let E=_.id;h&&(E=`${E}${Fu}${h}`),j.searchParams.append("state",E),_.code_challenge&&(j.searchParams.append("code_challenge",_.code_challenge),j.searchParams.append("code_challenge_method","S256")),p&&(Array.isArray(p)?p:[p]).forEach(N=>j.searchParams.append("resource",N));for(const[C,N]of Object.entries({response_mode:c,...S,...g}))N!=null&&j.searchParams.append(C,N.toString());return new n5({url:j.href,state:_})}};t5._logger=new Qe("SigninRequest");var Uae=t5,zae="openid",L_=class{constructor(e){if(this.access_token="",this.token_type="",this.profile={},this.state=e.get("state"),this.session_state=e.get("session_state"),this.state){const t=decodeURIComponent(this.state).split(Fu);this.state=t[0],t.length>1&&(this.url_state=t.slice(1).join(Fu))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri"),this.code=e.get("code")}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-vs.getEpochTime()}set expires_in(e){typeof e=="string"&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+vs.getEpochTime())}get isOpenId(){var e;return((e=this.scope)==null?void 0:e.split(" ").includes(zae))||!!this.id_token}},Vae=class{constructor({url:e,state_data:t,id_token_hint:n,post_logout_redirect_uri:r,extraQueryParams:i,request_type:o,client_id:s,url_state:a}){if(this._logger=new Qe("SignoutRequest"),!e)throw this._logger.error("ctor: No url passed"),new Error("url");const c=new URL(e);if(n&&c.searchParams.append("id_token_hint",n),s&&c.searchParams.append("client_id",s),r&&(c.searchParams.append("post_logout_redirect_uri",r),t||a)){this.state=new Ry({data:t,request_type:o,url_state:a});let u=this.state.id;a&&(u=`${u}${Fu}${a}`),c.searchParams.append("state",u)}for(const[u,d]of Object.entries({...i}))d!=null&&c.searchParams.append(u,d.toString());this.url=c.href}},qae=class{constructor(e){if(this.state=e.get("state"),this.state){const t=decodeURIComponent(this.state).split(Fu);this.state=t[0],t.length>1&&(this.url_state=t.slice(1).join(Fu))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri")}},Kae=["nbf","jti","auth_time","nonce","acr","amr","azp","at_hash"],Wae=["sub","iss","aud","exp","iat"],Hae=class{constructor(e){this._settings=e,this._logger=new Qe("ClaimsService")}filterProtocolClaims(e){const t={...e};if(this._settings.filterProtocolClaims){let n;Array.isArray(this._settings.filterProtocolClaims)?n=this._settings.filterProtocolClaims:n=Kae;for(const r of n)Wae.includes(r)||delete t[r]}return t}mergeClaims(e,t){const n={...e};for(const[r,i]of Object.entries(t))if(n[r]!==i)if(Array.isArray(n[r])||Array.isArray(i))if(this._settings.mergeClaimsStrategy.array=="replace")n[r]=i;else{const o=Array.isArray(n[r])?n[r]:[n[r]];for(const s of Array.isArray(i)?i:[i])o.includes(s)||o.push(s);n[r]=o}else typeof n[r]=="object"&&typeof i=="object"?n[r]=this.mergeClaims(n[r],i):n[r]=i;return n}},r5=class{constructor(e,t){this.keys=e,this.nonce=t}},Gae=class{constructor(e,t){this._logger=new Qe("OidcClient"),this.settings=e instanceof Rj?e:new Rj(e),this.metadataService=t??new Iae(this.settings),this._claimsService=new Hae(this.settings),this._val
578idator=new Bae(this.settings,this.metadataService,this._claimsService),this._tokenClient=new ZV(this.settings,this.metadataService)}async createSigninRequest({state:e,request:t,request_uri:n,request_type:r,id_token_hint:i,login_hint:o,skipUserInfo:s,nonce:a,url_state:c,response_type:u=this.settings.response_type,scope:d=this.settings.scope,redirect_uri:f=this.settings.redirect_uri,prompt:h=this.settings.prompt,display:p=this.settings.display,max_age:m=this.settings.max_age,ui_locales:g=this.settings.ui_locales,acr_values:y=this.settings.acr_values,resource:b=this.settings.resource,response_mode:x=this.settings.response_mode,extraQueryParams:w=this.settings.extraQueryParams,extraTokenParams:S=this.settings.extraTokenParams,dpopJkt:_,omitScopeWhenRequesting:j=this.settings.omitScopeWhenRequesting}){const E=this._logger.create("createSigninRequest");if(u!=="code")throw new Error("Only the Authorization Code flow (with PKCE) is supported");const C=await this.metadataService.getAuthorizationEndpoint();E.debug("Received authorization endpoint",C);const N=await Uae.create({url:C,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:f,response_type:u,scope:d,state_data:e,url_state:c,prompt:h,display:p,max_age:m,ui_locales:g,id_token_hint:i,login_hint:o,acr_values:y,dpopJkt:_,resource:b,request:t,request_uri:n,extraQueryParams:w,extraTokenParams:S,request_type:r,response_mode:x,client_secret:this.settings.client_secret,skipUserInfo:s,nonce:a,disablePKCE:this.settings.disablePKCE,omitScopeWhenRequesting:j});await this.clearStaleState();const k=N.state;return await this.settings.stateStore.set(k.id,k.toStorageString()),N}async readSigninResponseState(e,t=!1){const n=this._logger.create("readSigninResponseState"),r=new L_(Aj.readParams(e,this.settings.response_mode));if(!r.state)throw n.throw(new Error("No state in response")),null;const i=await this.settings.stateStore[t?"remove":"get"](r.state);if(!i)throw n.throw(new Error("No matching state found in storage")),null;return{state:await e5.fromStorageString(i),response:r}}async processSigninResponse(e,t,n=!0){const r=this._logger.create("processSigninResponse"),{state:i,response:o}=await this.readSigninResponseState(e,n);if(r.debug("received state from storage; validating response"),this.settings.dpop&&this.settings.dpop.store){const s=await this.getDpopProof(this.settings.dpop.store);t={...t,DPoP:s}}try{await this._validator.validateSigninResponse(o,i,t)}catch(s){if(s instanceof Tj&&this.settings.dpop){const a=await this.getDpopProof(this.settings.dpop.store,s.nonce);t.DPoP=a,await this._validator.validateSigninResponse(o,i,t)}else throw s}return o}async getDpopProof(e,t){let n,r;return(await e.getAllKeys()).includes(this.settings.client_id)?(r=await e.get(this.settings.client_id),r.nonce!==t&&t&&(r.nonce=t,await e.set(this.settings.client_id,r))):(n=await dr.generateDPoPKeys(),r=new r5(n,t),await e.set(this.settings.client_id,r)),await dr.generateDPoPProof({url:await this.metadataService.getTokenEndpoint(!1),httpMethod:"POST",keyPair:r.keys,nonce:r.nonce})}async processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n=!1,extraTokenParams:r={}}){const i=await this._tokenClient.exchangeCredentials({username:e,password:t,...r}),o=new L_(new URLSearchParams);return Object.assign(o,i),await this._validator.validateCredentialsResponse(o,n),o}async useRefreshToken({state:e,redirect_uri:t,resource:n,timeoutInSeconds:r,extraHeaders:i,extraTokenParams:o}){var s;const a=this._logger.create("useRefreshToken");let c;if(this.settings.refreshTokenAllowedScope===void 0)c=e.scope;else{const f=this.settings.refreshTokenAllowedScope.split(" ");c=(((s=e.scope)==null?void 0:s.split(" "))||[]).filter(p=>f.includes(p)).join(" ")}if(this.settings.dpop&&this.settings.dpop.store){const f=await this.getDpopProof(this.settings.dpop.store);i={...i,DPoP:f}}let u;try{u=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:c,redirect_uri:t,resource:n,timeoutInSeconds:r,extraHeaders:i,...o})}catch(f){if(f instanceof Tj&&this.settings.dpop)i.DPoP=await this.getDpopProof(this.settings.dpop.store,f.nonce),u=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:c,redirect_uri:t,resource:n,timeoutInSeconds:r,extraHeaders:i,...o});else throw f}const d=new L_(new URLSearchParams);return Object.assign(d,u),a.debug("validating response",d),await this._val
578idator.validateRefreshResponse(d,{...e,scope:c}),d}async createSignoutRequest({state:e,id_token_hint:t,client_id:n,request_type:r,url_state:i,post_logout_redirect_uri:o=this.settings.post_logout_redirect_uri,extraQueryParams:s=this.settings.extraQueryParams}={}){const a=this._logger.create("createSignoutRequest"),c=await this.metadataService.getEndSessionEndpoint();if(!c)throw a.throw(new Error("No end session endpoint")),null;a.debug("Received end session endpoint",c),!n&&o&&!t&&(n=this.settings.client_id);const u=new Vae({url:c,id_token_hint:t,client_id:n,post_logout_redirect_uri:o,state_data:e,extraQueryParams:s,request_type:r,url_state:i});await this.clearStaleState();const d=u.state;return d&&(a.debug("Signout request has state to persist"),await this.settings.stateStore.set(d.id,d.toStorageString())),u}async readSignoutResponseState(e,t=!1){const n=this._logger.create("readSignoutResponseState"),r=new qae(Aj.readParams(e,this.settings.response_mode));if(!r.state){if(n.debug("No state in response"),r.error)throw n.warn("Response was error:",r.error),new ys(r);return{state:void 0,response:r}}const i=await this.settings.stateStore[t?"remove":"get"](r.state);if(!i)throw n.throw(new Error("No matching state found in storage")),null;return{state:await Ry.fromStorageString(i),response:r}}async processSignoutResponse(e){const t=this._logger.create("processSignoutResponse"),{state:n,response:r}=await this.readSignoutResponseState(e,!0);return n?(t.debug("Received state from storage; validating response"),this._validator.validateSignoutResponse(r,n)):t.debug("No state from storage; skipping response validation"),r}clearStaleState(){return this._logger.create("clearStaleState"),Ry.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}async revokeToken(e,t){return this._logger.create("revokeToken"),await this._tokenClient.revoke({token:e,token_type_hint:t})}},Yae=class{constructor(e){this._userManager=e,this._logger=new Qe("SessionMonitor"),this._start=async t=>{const n=t.session_state;if(!n)return;const r=this._logger.create("_start");if(t.profile?(this._sub=t.profile.sub,r.debug("session_state",n,", sub",this._sub)):(this._sub=void 0,r.debug("session_state",n,", anonymous user")),this._checkSessionIFrame){this._checkSessionIFrame.start(n);return}try{const i=await this._userManager.metadataService.getCheckSessionIframe();if(i){r.debug("initializing check session iframe");const o=this._userManager.settings.client_id,s=this._userManager.settings.checkSessionIntervalInSeconds,a=this._userManager.settings.stopCheckSessionOnError,c=new Oae(this._callback,o,i,s,a);await c.load(),this._checkSessionIFrame=c,c.start(n)}else r.warn("no check session iframe found in the metadata")}catch(i){r.error("Error from getCheckSessionIframe:",i instanceof Error?i.message:i)}},this._stop=()=>{const t=this._logger.create("_stop");if(this._sub=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){const n=setInterval(async()=>{clearInterval(n);try{const r=await this._userManager.querySessionStatus();if(r){const i={session_state:r.session_state,profile:r.sub?{sub:r.sub}:null};this._start(i)}}catch(r){t.error("error from querySessionStatus",r instanceof Error?r.message:r)}},1e3)}},this._callback=async()=>{const t=this._logger.create("_callback");try{const n=await this._userManager.querySessionStatus();let r=!0;n&&this._checkSessionIFrame?n.sub===this._sub?(r=!1,this._checkSessionIFrame.start(n.session_state),t.debug("same sub still logged in at OP, session state has changed, restarting check session iframe; session_state",n.session_state),await this._userManager.events._raiseUserSessionChanged()):t.debug("different subject signed into OP",n.sub):t.debug("subject no longer signed into OP"),r?this._sub?await this._userManager.events._raiseUserSignedOut():await this._userManager.events._raiseUserSignedIn():t.debug("no change in session detected, no event to raise")}catch(n){this._sub&&(t.debug("Error calling queryCurrentSigninSession; raising signed out event",n),await this._userManager.events._raiseUserSignedOut())}},e||this._logger.throw(new Error("No user manager passed")),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(t=>{this._logger.error(t)})}async _init(){this._logger.create("_init");const e=await this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){const t=await this._userManager.querySessionStatus();if(t){const n={session_state:t.session_state,profile:t.sub?{sub:t.sub}:null};this._start(n)}}}},F_=class i5{constructor(t){var n;this.id_token=t.id_token,this.session_state=(n=t.session_state)!=null?n:null,this.access_token=t.access_token,this.refresh_token=t.refresh_token,this.token_type=t.token_type,this.scope=t.scope,this.profile=t.profile,this.expires_at=t.expires_at,this.state=t.userState,this.url_state=t.url_state}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-vs.getEpochTime()}set expires_in(t){t!==void 0&&(this.expires_at=Math.floor(t)+vs.getEpochTime())}get expired(){const t=this.expires_in;if(t!==void 0)return t<=0}get scopes(){var t,n;return(n=(t=this.scope)==null?void 0:t.split(" "))!=null?n:[]}toStorageString(){return new Qe("User").create("toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(t){return Qe.createStatic("User","fromStorageString"),new i5(JSON.parse(t))}},VI="oidc-client",o5=class{constructor(){this._abort=new Gs("Window navigation aborted"),this._disposeHandlers=new Set,this._window=null}async navigate(e){const t=this._logger.create("navigate");if(!this._window)throw new Error("Attempted to navigate on a disposed window");t.debug("setting URL in window"),this._window.location.replace(e.url);const{url:n,keepOpen:r}=await new Promise((i,o)=>{const s=c=>{var u;const d=c.data,f=(u=e.scriptOrigin)!=null?u:window.location.origin;if(!(c.origin!==f||d?.source!==VI)){try{const h=Aj.readParams(d.url,e.response_mode).get("state");if(h||t.warn("no state found in response url"),c.source!==this._window&&h!==e.state)return}catch{this._dispose(),o(new Error("Invalid response from window"))}i(d)}};window.addEventListener("message",s,!1),this._disposeHandlers.add(()=>window.removeEventListener("message",s,!1));const a=new BroadcastChannel(`oidc-client-popup-${e.state}`);a.addEventListener("message",s,!1),this._disposeHandlers.add(()=>a.close()),this._disposeHandlers.add(this._abort.addHandler(c=>{this._dispose(),o(c)}))});return t.debug("got response from window"),this._dispose(),r||this.close(),{url:n}}_dispose(){this._logger.create("_dispose");for(const e of this._disposeHandlers)e();this._disposeHandlers.clear()}static _notifyParent(e,t,n=!1,r=window.location.origin){const i={source:VI,url:t,keepOpen:n},o=new Qe("_notifyParent");
578if(e)o.debug("With parent. Using parent.postMessage."),e.postMessage(i,r);else{o.debug("No parent. Using BroadcastChannel.");const s=new URL(t).searchParams.get("state");if(!s)throw new Error("No parent and no state in URL. Can't complete notification.");const a=new BroadcastChannel(`oidc-client-popup-${s}`);a.postMessage(i),a.close()}}},s5={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},a5="_blank",Qae=60,Jae=2,l5=10,Xae=class extends Rj{constructor(e){const{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:n=e.post_logout_redirect_uri,popupWindowFeatures:r=s5,popupWindowTarget:i=a5,redirectMethod:o="assign",redirectTarget:s="self",iframeNotifyParentOrigin:a=e.iframeNotifyParentOrigin,iframeScriptOrigin:c=e.iframeScriptOrigin,requestTimeoutInSeconds:u,silent_redirect_uri:d=e.redirect_uri,silentRequestTimeoutInSeconds:f,automaticSilentRenew:h=!0,validateSubOnSilentRenew:p=!0,includeIdTokenInSilentRenew:m=!1,monitorSession:g=!1,monitorAnonymousSession:y=!1,checkSessionIntervalInSeconds:b=Jae,query_status_response_type:x="code",stopCheckSessionOnError:w=!0,revokeTokenTypes:S=["access_token","refresh_token"],revokeTokensOnSignout:_=!1,includeIdTokenInSilentSignout:j=!1,accessTokenExpiringNotificationTimeInSeconds:E=Qae,userStore:C}=e;if(super(e),this.popup_redirect_uri=t,this.popup_post_logout_redirect_uri=n,this.popupWindowFeatures=r,this.popupWindowTarget=i,this.redirectMethod=o,this.redirectTarget=s,this.iframeNotifyParentOrigin=a,this.iframeScriptOrigin=c,this.silent_redirect_uri=d,this.silentRequestTimeoutInSeconds=f||u||l5,this.automaticSilentRenew=h,this.validateSubOnSilentRenew=p,this.includeIdTokenInSilentRenew=m,this.monitorSession=g,this.monitorAnonymousSession=y,this.checkSessionIntervalInSeconds=b,this.stopCheckSessionOnError=w,this.query_status_response_type=x,this.revokeTokenTypes=S,this.revokeTokensOnSignout=_,this.includeIdTokenInSilentSignout=j,this.accessTokenExpiringNotificationTimeInSeconds=E,C)this.userStore=C;else{const N=typeof window<"u"?window.sessionStorage:new XV;this.userStore=new vk({store:N})}}},qI=class c5 extends o5{constructor({silentRequestTimeoutInSeconds:t=l5}){super(),this._logger=new Qe("IFrameWindow"),this._timeoutInSeconds=t,this._frame=c5.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){const t=window.document.createElement("iframe");return t.style.visibility="hidden",t.style.position="fixed",t.style.left="-1000px",t.style.top="0",t.width="0",t.height="0",window.document.body.appendChild(t),t}async navigate(t){this._logger.debug("navigate: Using timeout of:",this._timeoutInSeconds);const n=setTimeout(()=>void this._abort.raise(new mk("IFrame timed out without a response")),this._timeoutInSeconds*1e3);return this._disposeHandlers.add(()=>clearTimeout(n)),await super.navigate(t)}close(){var t;this._frame&&(this._frame.parentNode&&(this._frame.addEventListener("load",n=>{var r;const i=n.target;(r=i.parentNode)==null||r.removeChild(i),this._abort.raise(new Error("IFrame removed from DOM"))},!0),(t=this._frame.contentWindow)==null||t.location.replace("about:blank")),this._frame=null),this._window=null}static notifyParent(t,n){return super._notifyParent(window.parent,t,!1,n)}},Zae=class{constructor(e){this._settings=e,this._logger=new Qe("IFrameNavigator")}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new qI({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create("callback"),qI.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},ele=500,tle=1e3,KI=class extends o5{constructor({popupWindowTarget:e=a5,popupWindowFeatures:t={},popupSignal:n}){super(),this._logger=new Qe("PopupWindow");const r=zI.center({...s5,...t});this._window=window.open(void 0,e,zI.serialize(r)),n&&n.addEventListener("abort",()=>{var i;this._abort.raise(new Error((i=n.reason)!=null?i:"Popup aborted"))}),t.closePopupWindowAfterInSeconds&&t.closePopupWindowAfterInSeconds>0&&setTimeout(()=>{if(!this._window||typeof this._window.closed!="boolean"||this._window.closed){this._abort.raise(new Error("Popup blocked by user"));return}this.close()},t.closePopupWindowAfterInSeconds*tle)}async navigate(e){var t;(t=this._window)==null||t.focus();const n=setInterval(()=>{(!this._window||this._window.closed)&&(this._logger.debug("Popup closed by user or isolated by redirect"),r(),this._disposeHandlers.delete(r))},ele),r=()=>clearInterval(n);return this._disposeHandlers.add(r),await super.navigate(e)}close(){this._window&&(this._window.closed||(this._window.close(),this._abort.raise(new Error("Popup closed")))),this._window=null}static notifyOpener(e,t){super._notifyParent(window.opener,e,t),!t&&!window.opener&&window.close()}},nle=class{constructor(e){this._settings=e,this._logger=new Qe("PopupNavigator")}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget,popupSignal:n}){return new KI({popupWindowFeatures:e,popupWindowTarget:t,popupSignal:n})}async callback(e,{keepOpen:t=!1}){this._logger.create("callback"),KI.notifyOpener(e,t)}},rle=class{constructor(e){this._settings=e,this._logger=new Qe("RedirectNavigator")}async prepare({redirectMethod:e=this._settings.redirectMethod,redirectTarget:t=this._settings.redirectTarget}){var n;this._logger.create("prepare");let r=window.self;t==="top"&&(r=(n=window.top)!=null?n:window.self);const i=r.location[e].bind(r.location);let o;return{navigate:async s=>{this._logger.create("navigate");const a=new Promise((c,u)=>{o=u});return i(s.url),await a},close:()=>{this._logger.create("close"),o?.(new Error("Redirect aborted")),r.stop()}}}async callback(){}},ile=class extends Rae{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new Qe("UserManagerEvents"),this._userLoaded=new Gs("User loaded"),this._userUnloaded=new Gs("User unloaded"),this._silentRenewError=ne
578w Gs("Silent renew error"),this._userSignedIn=new Gs("User signed in"),this._userSignedOut=new Gs("User signed out"),this._userSessionChanged=new Gs("User session changed")}async load(e,t=!0){await super.load(e),t&&await this._userLoaded.raise(e)}async unload(){await super.unload(),await this._userUnloaded.raise()}addUserLoaded(e){return this._userLoaded.addHandler(e)}removeUserLoaded(e){return this._userLoaded.removeHandler(e)}addUserUnloaded(e){return this._userUnloaded.addHandler(e)}removeUserUnloaded(e){return this._userUnloaded.removeHandler(e)}addSilentRenewError(e){return this._silentRenewError.addHandler(e)}removeSilentRenewError(e){return this._silentRenewError.removeHandler(e)}async _raiseSilentRenewError(e){await this._silentRenewError.raise(e)}addUserSignedIn(e){return this._userSignedIn.addHandler(e)}removeUserSignedIn(e){this._userSignedIn.removeHandler(e)}async _raiseUserSignedIn(){await this._userSignedIn.raise()}addUserSignedOut(e){return this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}async _raiseUserSignedOut(){await this._userSignedOut.raise()}addUserSessionChanged(e){return this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}async _raiseUserSessionChanged(){await this._userSessionChanged.raise()}},ole=class{constructor(e){this._userManager=e,this._logger=new Qe("SilentRenewService"),this._isStarted=!1,this._retryTimer=new vs("Retry Silent Renew"),this._tokenExpiring=async()=>{const t=this._logger.create("_tokenExpiring");try{await this._userManager.signinSilent(),t.debug("silent token renewal successful")}catch(n){if(n instanceof mk){t.warn("ErrorTimeout from signinSilent:",n,"retry in 5s"),this._retryTimer.init(5);return}t.error("Error from signinSilent:",n),await this._userManager.events._raiseSilentRenewError(n)}}}async start(){const e=this._logger.create("start");if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{await this._userManager.getUser()}catch(t){e.error("getUser error",t)}}}stop(){this._isStarted&&(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),this._isStarted=!1)}},sle=class{constructor(e){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.data=e.state}},Mj=class{constructor(e,t,n,r){this._logger=new Qe("UserManager"),this.settings=new Xae(e),this._client=new Gae(e),this._redirectNavigator=t??new rle(this.settings),this._popupNavigator=n??new nle(this.settings),this._iframeNavigator=r??new Zae(this.settings),this._events=new ile(this.settings),this._silentRenewService=new ole(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new Yae(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}async getUser(e=!1){const t=this._logger.create("getUser"),n=await this._loadUser();return n?(t.info("user loaded"),await this._events.load(n,e),n):(t.info("user not found in storage"),null)}async removeUser(){const e=this._logger.create("removeUser");await this.storeUser(null),e.info("user removed from storage"),await this._events.unload()}async signinRedirect(e={}){var t;this._logger.create("signinRedirect");const{redirectMethod:n,...r}=e;let i;(t=this.settings.dpop)!=null&&t.bind_authorization_code&&(i=await this.generateDPoPJkt(this.settings.dpop));const o=await this._redirectNavigator.prepare({redirectMethod:n});await this._signinStart({request_type:"si:r",dpopJkt:i,...r},o)}async signinRedirectCallback(e=window.location.href){const t=this._logger.create("signinRedirectCallback"),n=await this._signinEnd(e);return n.profile&&n.profile.sub?t.info("success, signed in subject",n.profile.sub):t.info("no subject"),n}async signinResourceOwnerCredentials({username:e,password:t,skipUserInfo:n=!1}){const r=this._logger.create("signinResourceOwnerCredential"),i=await this._client.processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n,extraTokenParams:this.settings.extraTokenParams});r.debug("got signin response");const o=await this._buildUser(i);return o.profile&&o.profile.sub?r.info("success, signed in subject",o.profile.sub):r.info("no subject"),o}async signinPopup(e={}){var t;const n=this._logger.create("signinPopup");let r;(t=this.settings.dpop)!=null&&t.bind_authorization_code&&(r=await this.generateDPoPJkt(this.settings.dpop));const{popupWindowFeatures:i,popupWindowTarget:o,popupSignal:s,...a}=e,c=this.settings.popup_redirect_uri;c||n.throw(new Error("No popup_redirect_uri configured"));const u=await this._popupNavigator.prepare({popupWindowFeatures:i,popupWindowTarget:o,popupSignal:s}),d=await this._signin({request_type:"si:p",redirect_uri:c,display:"popup",dpopJkt:r,...a},u);return d&&(d.profile&&d.profile.sub?n.info("success, signed in subject",d.profile.sub):n.info("no subject")),d}async signinPopupCallback(e=window.location.href,t=!1){const n=this._logger.create("signinPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),n.info("success")}async signinSilent(e={}){var t,n;const r=this._logger.create("signinSilent"),{silentRequestTimeoutInSeconds:i,...o}=e;let s=await this._loadUser();if(s?.refresh_token){r.debug("using refresh token");const f=new sle(s);return await this._useRefreshToken({state:f,redirect_uri:o.redirect_uri,resource:o.resource,extraTokenParams:o.extraTokenParams,timeoutInSeconds:i})}let a;(t=this.settings.dpop)!=null&&t.bind_authorization_code&&(a=await this.generateDPoPJkt(this.settings.dpop));const c=this.settings.silent_redirect_uri;c||r.throw(new Error("No silent_redirect_uri configured"));let u;
578s&&this.settings.validateSubOnSilentRenew&&(r.debug("subject prior to silent renew:",s.profile.sub),u=s.profile.sub);const d=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:i});return s=await this._signin({request_type:"si:s",redirect_uri:c,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?s?.id_token:void 0,dpopJkt:a,...o},d,u),s&&((n=s.profile)!=null&&n.sub?r.info("success, signed in subject",s.profile.sub):r.info("no subject")),s}async _useRefreshToken(e){const t=await this._client.useRefreshToken({timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds,...e}),n=new F_({...e.state,...t});return await this.storeUser(n),await this._events.load(n),n}async signinSilentCallback(e=window.location.href){const t=this._logger.create("signinSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async signinCallback(e=window.location.href){const{state:t}=await this._client.readSigninResponseState(e);switch(t.request_type){case"si:r":return await this.signinRedirectCallback(e);case"si:p":await this.signinPopupCallback(e);break;case"si:s":await this.signinSilentCallback(e);break;default:throw new Error("invalid response_type in state")}}async signoutCallback(e=window.location.href,t=!1){const{state:n}=await this._client.readSignoutResponseState(e);if(n)switch(n.request_type){case"so:r":return await this.signoutRedirectCallback(e);case"so:p":await this.signoutPopupCallback(e,t);break;case"so:s":await this.signoutSilentCallback(e);break;default:throw new Error("invalid response_type in state")}}async querySessionStatus(e={}){const t=this._logger.create("querySessionStatus"),{silentRequestTimeoutInSeconds:n,...r}=e,i=this.settings.silent_redirect_uri;i||t.throw(new Error("No silent_redirect_uri configured"));const o=await this._loadUser(),s=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n}),a=await this._signinStart({request_type:"si:s",redirect_uri:i,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?o?.id_token:void 0,response_type:this.settings.query_status_response_type,scope:"openid",skipUserInfo:!0,...r},s);try{const c={},u=await this._client.processSigninResponse(a.url,c);return t.debug("got signin response"),u.session_state&&u.profile.sub?(t.info("success for subject",u.profile.sub),{session_state:u.session_state,sub:u.profile.sub}):(t.info("success, user not authenticated"),null)}catch(c){if(this.settings.monitorAnonymousSession&&c instanceof ys)switch(c.error){case"login_required":case"consent_required":case"interaction_required":case"account_selection_required":return t.info("success for anonymous user"),{session_state:c.session_state}}throw c}}async _signin(e,t,n){const r=await this._signinStart(e,t);return await this._signinEnd(r.url,n)}async _signinStart(e,t){const n=this._logger.create("_signinStart");try{const r=await this._client.createSigninRequest(e);return n.debug("got signin request"),await t.navigate({url:r.url,state:r.state.id,response_mode:r.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(r){throw n.debug("error after preparing navigator, closing navigator window"),t.close(),r}}async _signinEnd(e,t){const n=this._logger.create("_signinEnd"),r={},i=await this._client.processSigninResponse(e,r);return n.debug("got signin response"),await this._buildUser(i,t)}async _buildUser(e,t){const n=this._logger.create("_buildUser"),r=new F_(e);if(t){if(t!==r.profile.sub)throw n.debug("current user does not match user returned from signin. sub from signin:",r.profile.sub),new ys({...e,error:"login_required"});n.debug("current user matches user returned from signin")}return await this.storeUser(r),n.debug("user stored"),await this._events.load(r),r}async signoutRedirect(e={}){const t=this._logger.create("signoutRedirect"),{redirectMethod:n,...r}=e,i=await this._redirectNavigator.prepare({redirectMethod:n});await this._signoutStart({request_type:"so:r",post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...r},i),t.info("success")}async signoutRedirectCallback(e=window.location.href){const t=this._logger.create("signoutRedirectCallback"),n=await this._signoutEnd(e);return t.info("success"),n}async signoutPopup(e={}){const t=this._logger.create("signoutPopup"),{popupWindowFeatures:n,popupWindowTarget:r,popupSignal:i,...o}=e,s=this.settings.popup_post_logout_redirect_uri,a=await this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:r,popupSignal:i});await this._signout({request_type:"so:p",post_logout_redirect_uri:s,state:s==null?void 0:{},...o},a),t.info("success")}async signoutPopupCallback(e=window.location.href,t=!1){const n=this._logger.create("signoutPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),n.info("success")}async _signout(e,t){const n=await this._signoutStart(e,t);return await this._signoutEnd(n.url)}async _signoutStart(e={},t){var n;const r=this._logger.create("_signoutStart");try{const i=await this._loadUser();r.debug("loaded current user from storage"),this.settings.revokeTokensOnSignout&&await this._revokeInternal(i);const o=e.id_token_hint||i&&i.id_token;o&&(r.debug("setting id_token_hint in signout request"),e.id_token_hint=o),await this.removeUser(),r.debug("user removed, creating signout request");
578const s=await this._client.createSignoutRequest(e);return r.debug("got signout request"),await t.navigate({url:s.url,state:(n=s.state)==null?void 0:n.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(i){throw r.debug("error after preparing navigator, closing navigator window"),t.close(),i}}async _signoutEnd(e){const t=this._logger.create("_signoutEnd"),n=await this._client.processSignoutResponse(e);return t.debug("got signout response"),n}async signoutSilent(e={}){var t;const n=this._logger.create("signoutSilent"),{silentRequestTimeoutInSeconds:r,...i}=e,o=this.settings.includeIdTokenInSilentSignout?(t=await this._loadUser())==null?void 0:t.id_token:void 0,s=this.settings.popup_post_logout_redirect_uri,a=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:r});await this._signout({request_type:"so:s",post_logout_redirect_uri:s,id_token_hint:o,...i},a),n.info("success")}async signoutSilentCallback(e=window.location.href){const t=this._logger.create("signoutSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async revokeTokens(e){const t=await this._loadUser();await this._revokeInternal(t,e)}async _revokeInternal(e,t=this.settings.revokeTokenTypes){const n=this._logger.create("_revokeInternal");if(!e)return;const r=t.filter(i=>typeof e[i]=="string");if(!r.length){n.debug("no need to revoke due to no token(s)");return}for(const i of r)await this._client.revokeToken(e[i],i),n.info(`${i} revoked successfully`),i!=="access_token"&&(e[i]=null);await this.storeUser(e),n.debug("user stored"),await this._events.load(e)}startSilentRenew(){this._logger.create("startSilentRenew"),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}async _loadUser(){const e=this._logger.create("_loadUser"),t=await this.settings.userStore.get(this._userStoreKey);return t?(e.debug("user storageString loaded"),F_.fromStorageString(t)):(e.debug("no user storageString"),null)}async storeUser(e){const t=this._logger.create("storeUser");if(e){t.debug("storing user");const n=e.toStorageString();await this.settings.userStore.set(this._userStoreKey,n)}else this._logger.debug("removing user"),await this.settings.userStore.remove(this._userStoreKey),this.settings.dpop&&await this.settings.dpop.store.remove(this.settings.client_id)}async clearStaleState(){await this._client.clearStaleState()}async dpopProof(e,t,n,r){var i,o;const s=await((o=(i=this.settings.dpop)==null?void 0:i.store)==null?void 0:o.get(this.settings.client_id));if(s)return await dr.generateDPoPProof({url:e,accessToken:t?.access_token,httpMethod:n,keyPair:s.keys,nonce:r})}async generateDPoPJkt(e){let t=await e.store.get(this.settings.client_id);if(!t){const n=await dr.generateDPoPKeys();t=new r5(n),await e.store.set(this.settings.client_id,t)}return await dr.generateDPoPJkt(t.keys)}},ew=$.createContext(void 0);ew.displayName="AuthContext";var ale={isLoading:!0,isAuthenticated:!1},lle=(e,t)=>{switch(t.type){case"INITIALISED":case"USER_LOADED":return{...e,user:t.user,isLoading:!1,isAuthenticated:t.user?!t.user.expired:!1,error:void 0};case"USER_SIGNED_OUT":case"USER_UNLOADED":return{...e,user:void 0,isAuthenticated:!1};case"NAVIGATOR_INIT":return{...e,isLoading:!0,activeNavigator:t.method};case"NAVIGATOR_CLOSE":return{...e,isLoading:!1,activeNavigator:void 0};case"ERROR":{const n=t.error;return n.toString=()=>`${n.name}: ${n.message}`,{...e,isLoading:!1,error:n}}default:{const n=new TypeError(`unknown type ${t.type}`),r={name:n.name,message:n.message,innerError:n,stack:n.stack,source:"unknown"};return r.toString=()=>`${r.name}: ${r.message}`,{...e,isLoading:!1,error:r}}}},cle=(e=window.location)=>{let t=new URLSearchParams(e.search);return!!((t.get("code")||t.get("error"))&&t.get("state")||(t=new URLSearchParams(e.hash.replace("#","?")),(t.get("code")||t.get("error"))&&t.get("state")))},ule=yk("signinCallback","Sign-in failed"),dle=yk("signoutCallback","Sign-out failed"),fle=yk("renewSilent","Renew silent failed");function u5(e,t){return{name:B_(e,"name",()=>"Error"),message:B_(e,"message",()=>t),stack:B_(e,"stack",()=>new Error().stack),innerError:e}}function yk(e,t){return n=>({...u5(n,t),source:e})}function B_(e,t,n){if(e&&typeof e=="object"){const r=e[t];if(typeof r=="string")return r}return n()}var hle=["clearStaleState","querySessionStatus","revokeTokens","
578startSilentRenew","stopSilentRenew"],ple=["signinPopup","signinSilent","signinRedirect","signinResourceOwnerCredentials","signoutPopup","signoutRedirect","signoutSilent"],WI=e=>()=>{throw new Error(`UserManager#${e} was called from an unsupported context. If this is a server-rendered page, defer this call with useEffect() or pass a custom UserManager implementation.`)},HI=typeof window>"u"?null:Mj,mle=e=>{const{children:t,onSigninCallback:n,skipSigninCallback:r,matchSignoutCallback:i,onSignoutCallback:o,onRemoveUser:s,userManager:a=null,...c}=e,[u]=$.useState(()=>a??(HI?new HI(c):{settings:c})),[d,f]=$.useReducer(lle,ale),h=$.useMemo(()=>Object.assign({settings:u.settings,events:u.events},Object.fromEntries(hle.map(y=>{var b,x;return[y,(x=(b=u[y])==null?void 0:b.bind(u))!=null?x:WI(y)]})),Object.fromEntries(ple.map(y=>[y,u[y]?async b=>{f({type:"NAVIGATOR_INIT",method:y});try{return await u[y](b)}catch(x){return f({type:"ERROR",error:{...u5(x,`Unknown error while executing ${y}(...).`),source:y,args:b}}),null}finally{f({type:"NAVIGATOR_CLOSE"})}}:WI(y)]))),[u]),p=$.useRef(!1);$.useEffect(()=>{!u||p.current||(p.current=!0,(async()=>{try{let y=null;cle()&&!r&&(y=await u.signinCallback(),n&&await n(y)),y=y||await u.getUser(),f({type:"INITIALISED",user:y})}catch(y){f({type:"ERROR",error:ule(y)})}try{if(i&&i(u.settings)){const y=await u.signoutCallback();o&&await o(y)}}catch(y){f({type:"ERROR",error:dle(y)})}})())},[u,r,n,o,i]),$.useEffect(()=>{if(!u)return;const y=S=>{f({type:"USER_LOADED",user:S})};u.events.addUserLoaded(y);const b=()=>{f({type:"USER_UNLOADED"})};u.events.addUserUnloaded(b);const x=()=>{f({type:"USER_SIGNED_OUT"})};u.events.addUserSignedOut(x);const w=S=>{f({type:"ERROR",error:fle(S)})};return u.events.addSilentRenewError(w),()=>{u.events.removeUserLoaded(y),u.events.removeUserUnloaded(b),u.events.removeUserSignedOut(x),u.events.removeSilentRenewError(w)}},[u]);const m=$.useCallback(async()=>{await u.removeUser(),s&&await s()},[u,s]),g=$.useMemo(()=>({...d,...h,removeUser:m}),[d,h,m]);return $.createElement(ew.Provider,{value:g},t)},tt=()=>{const e=$.useContext(ew);return e||console.warn("AuthProvider context is undefined, please verify you are calling useAuth() as child of a <AuthProvider> component."),e};function km(){const e=pt();return v.useMemo(()=>e.location.pathname,[e.location.pathname])}function Qot(){return"/onboarding"}function gle(){return"/auto-apply-profile"}function d5(){return"/org-onboarding"}const op="/dashboard";function vle(e){const t=e.split("?")[0];return t==="/onboarding"||t.startsWith("/onboarding/")||t==="/auto-apply-profile"||t.startsWith("/auto-apply-profile/")}const yle="/overview";function $d(){return yle}const f5="/welcome";function xle(e){const t=$d();return e.pendingJobSlug?e.role==="ADMIN"||e.role==="RECRUITER"?{to:t,blockedAsOrgMember:!0}:{to:`/jobs/${e.pendingJobSlug}`}:e.role==="CANDIDATE"?e.returnTo&&e.returnTo!==op&&!vle(e.returnTo)?{to:e.returnTo}:{to:op}:e.orgId?{to:t}:{to:d5()}}var ble=Object.defineProperty,Dd=(e,t)=>ble(e,"name",{value:t,configurable:!0}),h5=!!(typeof window<"u"&&window.document&&window.document.createElement);function Dv(e,t,{checkForDefaultPrevented:n=!0}={}){return Dd(function(i){if(e?.(i),n===!1||!i||!i.defaultPrevented)return t?.(i)},"handleEvent")}Dd(Dv,"composeEventHandlers");function wle(e){if(!h5)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}Dd(wle,"getOwnerWindow");function $j(e){if(!h5)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}Dd($j,"getOwnerDocument");function p5(e,t=!1){const{activeElement:n}=$j(e);if(!n?.nodeName)return null;if(m5(n)&&n.contentDocument)return p5(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=$j(n).getElementById(r);if(i)return i}}return n}Dd(p5,"getActiveElement");function m5(e){return e.tagName==="IFRAME"}Dd(m5,"isFrame");var _le=Object.defineProperty,xk=(e,t)=>_le(e,"name",{value:t,configurable:!0});function Dj(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}xk(Dj,"setRef");function g5(...e){return t=>{let n=!1;const r=e.map(i=>{const o=Dj(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():Dj(e[i],null)}}}}xk(g5,"composeRefs");function tw(...e){return v.useCallback(g5(...e),e)}xk(tw,"useComposedRefs");var Sle=Object.defineProperty,Hi=(e,t)=>Sle(e,"name",{value:t,configurable:!0});function v5(e){const t=v.forwardRef((n,r)=>{let{children:i,...o}=n,s=null,a=!1;const c=[];Lj(i)&&typeof Rg=="function"&&(i=Rg(i._payload)),v.Children.forEac
578h(i,h=>{if(w5(h)){a=!0;const p=h;let m="child"in p.props?p.props.child:p.props.children;Lj(m)&&typeof Rg=="function"&&(m=Rg(m._payload)),s=Ele(p,m),c.push(s?.props?.children)}else c.push(h)}),s?s=v.cloneElement(s,void 0,c):!a&&v.Children.count(i)===1&&v.isValidElement(i)&&(s=i);const u=s?b5(s):void 0,d=tw(r,u);if(!s){if(i||i===0)throw new Error(a?Ple(e):Nle(e));return i}const f=x5(o,s.props??{});return s.type!==v.Fragment&&(f.ref=r?d:u),v.cloneElement(s,f)});return t.displayName=`${e}.Slot`,t}Hi(v5,"createSlot");var y5=Symbol.for("radix.slottable");function jle(e){const t=Hi(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=y5,t}Hi(jle,"createSlottable");var Ele=Hi((e,t)=>{if("child"in e.props){const n=e.props.child;return v.isValidElement(n)?v.cloneElement(n,void 0,e.props.children(n.props.children)):null}return v.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function x5(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const c=o(...a);return i(...a),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}Hi(x5,"mergeProps");function b5(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Hi(b5,"getElementRef");function w5(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===y5}Hi(w5,"isSlottable");var Cle=Symbol.for("react.lazy");function Lj(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Cle&&"_payload"in e&&_5(e._payload)}Hi(Lj,"isLazyComponent");function _5(e){return typeof e=="object"&&e!==null&&"then"in e}Hi(_5,"isPromiseLike");var Nle=Hi(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Ple=Hi(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Rg=XN[" use ".trim().toString()],kle=Object.defineProperty,Ale=(e,t)=>kle(e,"name",{value:t,configurable:!0}),Tle=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],S5=Tle.reduce((e,t)=>{const n=v5(`Primitive.${t}`),r=v.forwardRef((i,o)=>{const{asChild:s,...a}=i,c=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function j5(e,t){e&&Ns.flushSync(()=>e.dispatchEvent(t))}Ale(j5,"dispatchDiscreteCustomEvent");var Rle=Object.defineProperty,Ole=(e,t)=>Rle(e,"name",{value:t,configurable:!0});function Bu(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>t.current?.(...n),[])}Ole(Bu,"useCallbackRef");var Ile=Object.defineProperty,pn=(e,t)=>Ile(e,"name",{value:t,configurable:!0}),Fj="dismissableLayer.update",Mle="dismissableLayer.pointerDownOutside",$le="dismissableLayer.focusOutside",GI,E5=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),nw=v.forwardRef(pn(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:c,onDismiss:u,...d}=t,f=v.useContext(E5),[h,p]=v.useState(null),m=h?.ownerDocument??globalThis?.document,[,g]=v.useState({}),y=tw(n,p),b=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=x?b.indexOf(x):-1,S=h?b.indexOf(h):-1,_=f.layersWithOutsidePointerEventsDisabled.size>0,j=S>=w,E=v.useRef(!1),C=C5(A=>{s?.(A),c?.(A),A.defaultPrevented||u?.()},{ownerDocument:m,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:v.useCallback(A=>{if(!(A instanceof Node))return!1;const L=[...f.branches].some(R=>R.contains(A));return j&&!L},[f.branches,j])}),N=N5(A=>{if(i&&E.current)return;const L=A.target;[...f.branches].some(D=>D.contains(L))||(a?.(A),c?.(A),A.defaultPrevented||u?.())},m),k=h?S===b.length-1:!1,P=Bu(A=>{A.key==="Escape"&&(o?.(A),!A.defaultPrevented&&u&&(A.preventDefault(),u()))});return v.useEffect(()=>{if(k)return m.addEventListener("keydown",P,{capture:!0}),()=>m.removeEventListener("keydown",P,{capture:!0})},[m,k,P]),v.useEffect(()=>{if(h)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(GI=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),Bj(),()=>{r&&(f.layersWithOutsidePointerEventsDisabled.delete(h),f.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=GI))}},[h,m,r,f]),v.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),Bj())},[h,f]),v.useEffect(()=>{const A=pn(()=>g({}),"handleUpdate");return document.addEventListener(Fj,A),()=>document.removeEventListener(Fj,A)},[]),l.jsx(S5.div,{...d,ref:y,style:{pointerEvents:_?j?"auto":"none":void 0,...t.style},onFocusCapture:Dv(t.onFocusCapture,N.onFocusCapture),onBlurCapture:Dv(t.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Dv(t.onPointerDownCapture,C.onPointerDownCapture)})},"DismissableLayer"));function Dle(){const e=v.useContext(E5),[t,n]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}pn(Dle,"useDismissableLayerSurface");var Lle=pn(()=>!0,"IS_TRUE");function C5(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o,shouldHandlePointerDownOutside:s=Lle}=t,a=Bu(e),c=v.useRef(!1),u=v.useRef(!1),d=v.useRef(new Map),f=v.useRef(()=>{});return v.useEffect(()=>{function h(){u.current=!1,i.current=!1,d.current.clear()}pn(h,"resetOutsideInteraction");function p(){return Array.from(d.current.values()).some(Boolean)}pn(p,"isOutsideInteractionIntercepted");function m(w){if(!u.current)return;const S=w.target;S instanceof Node&&[...o].some(j=>j.contains(S))||d.current.set(w.type,!0),w.type==="click"&&window.setTimeout(()=>{u.current&&f.current()},0)}pn(m,"handleInteractionCapture");function g(w){u.current&&d.current.set(w.type,!1)}pn(g,"handleInteractionBubble");const y=pn(w=>{if(w.target&&!c.current){let S=function(){n.removeEventListener("click",f.current);const j=p();h(),j||bk(Mle,a,_,{discrete:!0})};if(pn(S,"handleAndDispatchPointerDownOutsideEvent"),!s(w.target)){n.removeEventListener("click",f.current),h(),c.current=!1;return}const _={originalEvent:w};u.current=!0,i.current=r&&w.button===0,d.current.clear(),!r||w.button!==0?S():(n.removeEventListener("click",f.current),f.current=S,n.addEventListener("click",f.current,{once:!0}))}else n.removeEventListener("click",f.current),h();c.current=!1},"handlePointerDown"),b=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const w of b)n.addEventListener(w,m,!0),n.addEventListener(w,g);const x=window.setTimeout(()=>{n.addEventListener("pointerdown",y)},0);return()=>{window.clearTimeout(x),n.removeEventListener("pointerdown",y),n.removeEventListener("click",f.current);for(const w of b)n.removeEventListener(w,m,!0),n.removeEventListener(w,g)}},[n,a,r,i,o,s]),{onPointerDownCapture:pn(()=>c.current=!0,"onPointerDownCapture")}}pn(C5,"usePointerDownOutside");function N5(e,t=globalThis?.document){const n=Bu(e),r=v.useRef(!1);return v.useEffect(()=>{const i=pn(o=>{o.target&&!r.current&&bk($le,n,{originalEvent:o},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:pn(()=>r.current=!0,"onFocusCapture"),onBlurCapture:pn(()=>r.current=!1,"onBlurCapture")}}pn(N5,"useFocusOutside");function Bj(){const e=new CustomEvent(Fj);document.dispatchEvent(e)}pn(Bj,"dispatchUpdate");function bk(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?j5(i,o):i.dispatchEvent(o)}pn(bk,"handleAndDispatchCustomEvent");var U_=0;function wk(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??YI()),document.body.insertAdjacentElement("beforeend",e[1]??YI()),U_++,()=>{U_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),U_--}},[])}function YI(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
578style.position="fixed",e.style.pointerEvents="none",e}var Fle=Object.defineProperty,Hn=(e,t)=>Fle(e,"name",{value:t,configurable:!0}),z_="focusScope.autoFocusOnMount",V_="focusScope.autoFocusOnUnmount",QI={bubbles:!1,cancelable:!0},rw=v.forwardRef(Hn(function(t,n){const{loop:r=!1,trapped:i=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=t,[c,u]=v.useState(null),d=Bu(o),f=Bu(s),h=v.useRef(null),p=tw(n,u),m=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(i){let y=function(S){if(m.paused||!c)return;const _=S.target;c.contains(_)?h.current=_:zo(h.current,{select:!0})},b=function(S){if(m.paused||!c)return;const _=S.relatedTarget;_!==null&&(c.contains(_)||zo(h.current,{select:!0}))},x=function(S){if(document.activeElement===document.body)for(const j of S)j.removedNodes.length>0&&zo(c)};Hn(y,"handleFocusIn"),Hn(b,"handleFocusOut"),Hn(x,"handleMutations"),document.addEventListener("focusin",y),document.addEventListener("focusout",b);const w=new MutationObserver(x);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),w.disconnect()}}},[i,c,m.paused]),v.useEffect(()=>{if(c){JI.add(m);const y=document.activeElement;if(!c.contains(y)){const x=new CustomEvent(z_,QI);c.addEventListener(z_,d),c.dispatchEvent(x),x.defaultPrevented||(P5(O5(_k(c)),{select:!0}),document.activeElement===y&&zo(c))}return()=>{c.removeEventListener(z_,d),setTimeout(()=>{const x=new CustomEvent(V_,QI);c.addEventListener(V_,f),c.dispatchEvent(x),x.defaultPrevented||zo(y??document.body,{select:!0}),c.removeEventListener(V_,f),JI.remove(m)},0)}}},[c,d,f,m]);const g=v.useCallback(y=>{if(!r&&!i||m.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,x=document.activeElement;if(b&&x){const w=y.currentTarget,[S,_]=k5(w);S&&_?!y.shiftKey&&x===_?(y.preventDefault(),r&&zo(S,{select:!0})):y.shiftKey&&x===S&&(y.preventDefault(),r&&zo(_,{select:!0})):x===w&&y.preventDefault()}},[r,i,m.paused]);return l.jsx(S5.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})},"FocusScope"));function P5(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(zo(r,{select:t}),document.activeElement!==n)return}Hn(P5,"focusFirst");function k5(e){const t=_k(e),n=Uj(t,e),r=Uj(t.reverse(),e);return[n,r]}Hn(k5,"getTabbableEdges");function _k(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Hn(r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}Hn(_k,"getTabbableCandidates");function Uj(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):A5(r,{upTo:t})))return r}Hn(Uj,"findVisible");function A5(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}Hn(A5,"isHidden");function T5(e){return e instanceof HTMLInputElement&&"select"in e}Hn(T5,"isSelectableInput");function zo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&T5(e)&&t&&e.select()}}Hn(zo,"focus");var JI=R5();function R5(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=zj(e,t),e.unshift(t)},remove(t){e=zj(e,t),e[0]?.resume()}}}Hn(R5,"createFocusScopesStack");function zj(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Hn(zj,"arrayRemove");function O5(e){return e.filter(t=>t.tagName!=="A")}Hn(O5,"removeLinks");const Ble=["top","right","bottom","left"],Na=Math.min,Cr=Math.max,Oy=Math.round,Og=Math.floor,fo=e=>({x:e,y:e}),Ule={left:"right",right:"left",bottom:"top",top:"bottom"},zle={start:"end",end:"start"};function Vj(e,t,n){return Cr(e,Na(t,n))}function xs(e,t){return typeof e=="function"?e(t):e}function bs(e){return e.split("-")[0]}function Ld(e){return e.split("-")[1]}function Sk(e){return e==="x"?"y":"x"}function jk(e){return e==="y"?"height":"width"}function Pa(e){return["top","bottom"].includes(bs(e))?"y":"x"}function Ek(e){return Sk(Pa(e))}function Vle(e,t,n){n===void 0&&(n=!1);const r=Ld(e),i=Ek(e),o=jk(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Iy(s)),[s,Iy(s)]}function qle(e){const t=Iy(e);return[qj(e),t,qj(t)]}function qj(e){return e.replace(/start|end/g,t=>zle[t])}function Kle(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}function Wle(e,t,n,r){const i=Ld(e);let o=Kle(bs(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(qj)))),o}function Iy(e){return e.replace(/left|right|bottom|top/g,t=>Ule[t])}function Hle(e){return{top:0,right:0,bottom:0,left:0,...e}}function I5(e){return typeof e!="number"?Hle(e):{top:e,right:e,bottom:e,left:e}}function My(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function XI(e,t,n){let{reference:r,floating:i}=e;const o=Pa(t),s=Ek(t),a=jk(s),c=bs(t),u=o==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(c){case"top":p={x:d,y:r.y-i.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Ld(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}const Gle=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}
vendor: 9,706 bytes, line 578
578=n,a=o.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=XI(u,r,c),h=r,p={},m=0;for(let g=0;g<a.length;g++){const{name:y,fn:b}=a[g],{x,y:w,data:S,reset:_}=await b({x:d,y:f,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});d=x??d,f=w??f,p={...p,[y]:{...p[y],...S}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(u=_.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:d,y:f}=XI(u,h,c)),g=-1)}return{x:d,y:f,placement:h,strategy:i,middlewareData:p}};async function sp(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=xs(t,e),m=I5(p),y=a[h?f==="floating"?"reference":"floating":f],b=My(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(y)))==null||n?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),x=f==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),S=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},_=My(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:w,strategy:c}):x);return{top:(b.top-_.top+m.top)/S.y,bottom:(_.bottom-b.bottom+m.bottom)/S.y,left:(b.left-_.left+m.left)/S.x,right:(_.right-b.right+m.right)/S.x}}const Yle=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:c}=t,{element:u,padding:d=0}=xs(e,t)||{};if(u==null)return{};const f=I5(d),h={x:n,y:r},p=Ek(i),m=jk(p),g=await s.getDimensions(u),y=p==="y",b=y?"top":"left",x=y?"bottom":"right",w=y?"clientHeight":"clientWidth",S=o.reference[m]+o.reference[p]-h[p]-o.floating[m],_=h[p]-o.reference[p],j=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let E=j?j[w]:0;(!E||!await(s.isElement==null?void 0:s.isElement(j)))&&(E=a.floating[w]||o.floating[m]);const C=S/2-_/2,N=E/2-g[m]/2-1,k=Na(f[b],N),P=Na(f[x],N),A=k,L=E-g[m]-P,R=E/2-g[m]/2+C,D=Vj(A,R,L),O=!c.arrow&&Ld(i)!=null&&R!==D&&o.reference[m]/2-(R<A?k:P)-g[m]/2<0,F=O?R<A?R-A:R-L:0;return{[p]:h[p]+F,data:{[p]:D,centerOffset:R-D-F,...O&&{alignmentOffset:F}},reset:O}}}),Qle=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=xs(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=bs(i),x=Pa(a),w=bs(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=h||(w||!g?[Iy(a)]:qle(a)),j=m!=="none";!h&&j&&_.push(...Wle(a,g,m,S));const E=[a,..._],C=await sp(t,y),N=[];let k=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&N.push(C[b]),f){const R=Vle(i,s,S);N.push(C[R[0]],C[R[1]])}if(k=[...k,{placement:i,overflows:N}],!N.every(R=>R<=0)){var P,A;const R=(((P=o.flip)==null?void 0:P.index)||0)+1,D=E[R];if(D)return{data:{index:R,overflows:k},reset:{placement:D}};let O=(A=k.filter(F=>F.overflows[0]<=0).sort((F,T)=>F.overflows[1]-T.overflows[1])[0])==null?void 0:A.placement;if(!O)switch(p){case"bestFit":{var L;const F=(L=k.filter(T=>{if(j){const M=Pa(T.placement);return M===x||M==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(M=>M>0).reduce((M,V)=>M+V,0)]).sort((T,M)=>T[1]-M[1])[0])==null?void 0:L[0];F&&(O=F);break}case"initialPlacement":O=a;break}if(i!==O)return{reset:{placement:O}}}return{}}}};function ZI(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eM(e){return Ble.some(t=>e[t]>=0)}const Jle=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=xs(e,t);switch(r){case"referenceHidden":{const o=await sp(t,{...i,elementContext:"reference"}),s=ZI(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:eM(s)}}}case"escaped":{const o=await sp(t,{...i,altBoundary:!0}),s=ZI(o,n.floating);return{data:{escapedOffsets:s,escaped:eM(s)}}}default:return{}}}}};async function Xle(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=bs(n),a=Ld(n),c=Pa(n)==="y",u=["left","top"].includes(s)?-1:1,d=o&&c?-1:1,f=xs(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),c?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const Zle=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,c=await Xle(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:s}}}}},ece=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:y=>{let{x:b,y:x}=y;return{x:b,y:x}}},...c}=xs(e,t),u={x:n,y:r},d=await sp(t,c),f=Pa(bs(i)),h=Sk(f);let p=u[h],m=u[f];if(o){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=p+d[y],w=p-d[b];p=Vj(x,p,w)}if(s){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=m+d[y],w=m-d[b];m=Vj(x,m,w)}const g=a.fn({...t,[h]:p,[f]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:o,[f]:s}}}}}},tce=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=xs(e,t),d={x:n,y:r},f=Pa(i),h=Sk(f);let p=d[h],m=d[f];const g=xs(a,t),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=h==="y"?"height":"width",S=o.reference[h]-o.floating[w]+y.mainAxis,_=o.reference[h]+o.reference[w]-y.mainAxis;p<S?p=S:p>_&&(p=_)}if(u){var b,x;const w=h==="y"?"width":"height",S=["top","left"].includes(bs(i)),_=o.reference[f]-o.floating[w]+(S&&((b=s.offset)==null?void 0:b[f])||0)+(S?0:y.crossAxis),j=o.reference[f]+o.reference[w]+(S?0:((x=s.offset)==null?void 0:x[f])||0)-(S?y.crossAxis:0);m<_?m=_:m>j&&(m=j)}return{[h]:p,[f]:m}}}},nce=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:c=()=>{},...u}=xs(e,t),d=await sp(t,u),f=bs(i),h=Ld(i),p=Pa(i)==="y",{width:m,height:g}=o.floating;let y,b;f==="top"||f==="bottom"?(y=f,b=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,y=h==="end"?"top":"bottom");const x=g-d.top-d.bottom,w=m-d.left-d.right,S=Na(g-d[y],x),_=Na(m-d[b],w),j=!t.middlewareData.shift;let E=S,C=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=x),j&&!h){const k=Cr(d.left,0),P=Cr(d.right,0),A=Cr(d.top,0),L=Cr(d.bottom,0);p?C=m-2*(k!==0||P!==0?k+P:Cr(d.left,d.right)):E=g-2*(A!==0||L!==0?A+L:Cr(d.top,d.bottom))}await c({...t,availableWidth:C,availableHeight:E});const N=await s.getDimensions(a.floating);return m!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function iw(){return typeof window<"u"}function Fd(e){return M5(e)?(e.nodeName||"").toLowerCase():"#document"}function Rr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Co(e){var t;return(t=(M5(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function M5(e){return iw()?e instanceof Node||e instanceof Rr(e).Node:!1}function Ui(e){return iw()?e instanceof Element||e instanceof Rr(e).Element:!1}function wo(e){return iw()?e instanceof HTMLElement||e instanceof Rr(e).HTMLElement:!1}function tM(e){return!iw()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rr(e).ShadowRoot}function Am(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=zi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function rce(e){return["table","td","th"].includes(Fd(e))}function ow(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ck(e){const t=Nk(),n=Ui(e)?zi(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function ice(e){let t=ka(e);for(;wo(t)&&!Uu(t);){if(Ck(t))return t;if(ow(t))return null;t=ka(t)}return null}function Nk(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Uu(e){return["html","body","#document"].includes(Fd(e))}function zi(e){return Rr(e).getComputedStyle(e)}function sw(e){return Ui(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ka(e){if(Fd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||tM(e)&&e.host||Co(e);return tM(t)?t.host:t}function $5(e){const t=ka(e);return Uu(t)?e.ownerDocument?e.ownerDocument.body:e.body:wo(t)&&Am(t)?t:$5(t)}function ap(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=$5(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=Rr(i);if(o){const a=Kj(s);
vendor: 7,298 bytes, line 578
578return t.concat(s,s.visualViewport||[],Am(i)?i:[],a&&n?ap(a):[])}return t.concat(i,ap(i,[],n))}function Kj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function D5(e){const t=zi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=wo(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Oy(n)!==o||Oy(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Pk(e){return Ui(e)?e:e.contextElement}function xu(e){const t=Pk(e);if(!wo(t))return fo(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=D5(t);let s=(o?Oy(n.width):n.width)/r,a=(o?Oy(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const oce=fo(0);function L5(e){const t=Rr(e);return!Nk()||!t.visualViewport?oce:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sce(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rr(e)?!1:t}function Kl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Pk(e);let s=fo(1);t&&(r?Ui(r)&&(s=xu(r)):s=xu(e));const a=sce(o,n,r)?L5(o):fo(0);let c=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,d=i.width/s.x,f=i.height/s.y;if(o){const h=Rr(o),p=r&&Ui(r)?Rr(r):r;let m=h,g=Kj(m);for(;g&&r&&p!==m;){const y=xu(g),b=g.getBoundingClientRect(),x=zi(g),w=b.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,S=b.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=w,u+=S,m=Rr(g),g=Kj(m)}}return My({width:d,height:f,x:c,y:u})}function kk(e,t){const n=sw(e).scrollLeft;return t?t.left+n:Kl(Co(e)).left+n}function F5(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:kk(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function ace(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=Co(r),a=t?ow(t.floating):!1;if(r===s||a&&o)return n;let c={scrollLeft:0,scrollTop:0},u=fo(1);const d=fo(0),f=wo(r);if((f||!f&&!o)&&((Fd(r)!=="body"||Am(s))&&(c=sw(r)),wo(r))){const p=Kl(r);u=xu(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=s&&!f&&!o?F5(s,c,!0):fo(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-c.scrollTop*u.y+d.y+h.y}}function lce(e){return Array.from(e.getClientRects())}function cce(e){const t=Co(e),n=sw(e),r=e.ownerDocument.body,i=Cr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Cr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+kk(e);const a=-n.scrollTop;return zi(r).direction==="rtl"&&(s+=Cr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function uce(e,t){const n=Rr(e),r=Co(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;const u=Nk();(!u||u&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:a,y:c}}function dce(e,t){const n=Kl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=wo(e)?xu(e):fo(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,c=i*o.x,u=r*o.y;return{width:s,height:a,x:c,y:u}}function nM(e,t,n){let r;if(t==="viewport")r=uce(e,n);else if(t==="document")r=cce(Co(e));else if(Ui(t))r=dce(t,n);else{const i=L5(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return My(r)}function B5(e,t){const n=ka(e);return n===t||!Ui(n)||Uu(n)?!1:zi(n).position==="fixed"||B5(n,t)}function fce(e,t){const n=t.get(e);if(n)return n;let r=ap(e,[],!1).filter(a=>Ui(a)&&Fd(a)!=="body"),i=null;const o=zi(e).position==="fixed";let s=o?ka(e):e;for(;Ui(s)&&!Uu(s);){const a=zi(s),c=Ck(s);!c&&a.position==="fixed"&&(i=null),(o?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Am(s)&&!c&&B5(e,s))?r=r.filter(d=>d!==s):i=a,s=ka(s)}return t.set(e,r),r}function hce(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?ow(t)?[]:fce(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((u,d)=>{const f=nM(t,d,i);return u.top=Cr(f.top,u.top),u.right=Na(f.right,u.right),u.bottom=Na(f.bottom,u.bottom),u.left=Cr(f.left,u.left),u},nM(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function pce(e){const{width:t,height:n}=D5(e);return{width:t,height:n}}function mce(e,t,n){const r=wo(t),i=Co(t),o=n==="fixed",s=Kl(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=fo(0);if(r||!r&&!o)if((Fd(t)!=="body"||Am(i))&&(a=sw(t)),r){const h=Kl(t,!0,o,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else i&&(c.x=kk(i));const u=i&&!r&&!o?F5(i,a):fo(0),d=s.left+a.scrollLeft-c.x-u.x,f=s.top+a.scrollTop-c.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function q_(e){return zi(e).position==="static"}function rM(e,t){if(!wo(e)||zi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Co(e)===n&&(n=n.ownerDocument.body),n}function U5(e,t){const n=Rr(e);if(ow(e))return n;if(!wo(e)){let i=ka(e);for(;i&&!Uu(i);){if(Ui(i)&&!q_(i))return i;i=ka(i)}return n}let r=rM(e,t);for(;r&&rce(r)&&q_(r);)r=rM(r,t);return r&&Uu(r)&&q_(r)&&!Ck(r)?n:r||ice(e)||n}const gce=async function(e){const t=this.getOffsetParent||U5,n=this.getDimensions,r=await n(e.floating);return{reference:mce(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vce(e){return zi(e).direction==="rtl"}const yce={convertOffsetParentRelativeRectToViewportRelativeRect:ace,getDocumentElement:Co,getClippingRect:hce,getOffsetParent:U5,getElementRects:gce,getClientRects:lce,getDimensions:pce,getScale:xu,isElement:Ui,isRTL:vce};function xce(e,t){let n=null,r;const i=Co(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const p=Og(d),m=Og(i.clientWidth-(u+f)),g=Og(i.clientHeight-(d+h)),y=Og(u),x={rootMargin:-p+"px "+-m+"px "+-g+"px "+-y+"px",threshold:Cr(0,Na(1,c))||1};let w=!0;function S(_){const j=_[0].intersectionRatio;if(j!==c){if(!w)return s();j?s(!1,j):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(S,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return s(!0),o}function bce(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Pk(e),d=i||o?[...u?ap(u):[],...ap(t)]:[];d.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const f=u&&a?xce(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(b=>{let[x]=b;x&&x.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let m,g=c?Kl(e):null;c&&y();function y(){const b=Kl(e);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&n(),g=b,m=requestAnimationFrame(y)}return n(),()=>{var b;d.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),f?.(),(b=p)==null||b.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const wce=Zle,_ce=ece,Sce=Qle,jce=nce,Ece=Jle,iM=Yle,Cce=tce,Nce=(e,t,n)=>{const r=new Map,i={platform:yce,...n},o={...i.platform,_c:r};return Gle(e,t,{...i,platform:o})};var Lv=typeof document<"u"?v.useLayoutEffect:v.useEffect;function $y(e,t){if(e===t)return!0;
vendor: 4,390 bytes, line 578
578if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!$y(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!$y(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function z5(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oM(e,t){const n=z5(e);return Math.round(t*n)/n}function K_(e){const t=v.useRef(e);return Lv(()=>{t.current=e}),t}function Pce(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,f]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=v.useState(r);$y(h,r)||p(r);const[m,g]=v.useState(null),[y,b]=v.useState(null),x=v.useCallback(T=>{T!==j.current&&(j.current=T,g(T))},[]),w=v.useCallback(T=>{T!==E.current&&(E.current=T,b(T))},[]),S=o||m,_=s||y,j=v.useRef(null),E=v.useRef(null),C=v.useRef(d),N=c!=null,k=K_(c),P=K_(i),A=K_(u),L=v.useCallback(()=>{if(!j.current||!E.current)return;const T={placement:t,strategy:n,middleware:h};P.current&&(T.platform=P.current),Nce(j.current,E.current,T).then(M=>{const V={...M,isPositioned:A.current!==!1};R.current&&!$y(C.current,V)&&(C.current=V,Ns.flushSync(()=>{f(V)}))})},[h,t,n,P,A]);Lv(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(T=>({...T,isPositioned:!1})))},[u]);const R=v.useRef(!1);Lv(()=>(R.current=!0,()=>{R.current=!1}),[]),Lv(()=>{if(S&&(j.current=S),_&&(E.current=_),S&&_){if(k.current)return k.current(S,_,L);L()}},[S,_,L,k,N]);const D=v.useMemo(()=>({reference:j,floating:E,setReference:x,setFloating:w}),[x,w]),O=v.useMemo(()=>({reference:S,floating:_}),[S,_]),F=v.useMemo(()=>{const T={position:n,left:0,top:0};if(!O.floating)return T;const M=oM(O.floating,d.x),V=oM(O.floating,d.y);return a?{...T,transform:"translate("+M+"px, "+V+"px)",...z5(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:V}},[n,a,O.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:L,refs:D,elements:O,floatingStyles:F}),[d,L,D,O,F])}const kce=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?iM({element:r.current,padding:i}).fn(n):{}:r?iM({element:r,padding:i}).fn(n):{}}}},Ace=(e,t)=>({...wce(e),options:[e,t]}),Tce=(e,t)=>({..._ce(e),options:[e,t]}),Rce=(e,t)=>({...Cce(e),options:[e,t]}),Oce=(e,t)=>({...Sce(e),options:[e,t]}),Ice=(e,t)=>({...jce(e),options:[e,t]}),Mce=(e,t)=>({...Ece(e),options:[e,t]}),$ce=(e,t)=>({...kce(e),options:[e,t]});var Dce="Arrow",V5=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return l.jsx(Oe.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});V5.displayName=Dce;var Lce=V5;function Fce(e,t=[]){let n=[];function r(o,s){const a=v.createContext(s),c=n.length;n=[...n,s];function u(f){const{scope:h,children:p,...m}=f,g=h?.[e][c]||a,y=v.useMemo(()=>m,Object.values(m));return l.jsx(g.Provider,{value:y,children:p})}function d(f,h){const p=h?.[e][c]||a,m=v.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=n.map(s=>v.createContext(s));return function(a){const c=a?.[e]||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,Bce(i,...t)]}function Bce(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var Ak="Popper",[q5,Bd]=Fce(Ak),[Uce,K5]=q5(Ak),W5=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return l.jsx(Uce,{scope:t,anchor:r,onAnchorChange:i,children:n})};W5.displayName=Ak;var H5="PopperAnchor",G5=v.forwardRef((e,t)=>
vendor: 4,519 bytes, line 578
578{const{__scopePopper:n,virtualRef:r,...i}=e,o=K5(H5,n),s=v.useRef(null),a=rt(t,s);return v.useEffect(()=>{o.onAnchorChange(r?.current||s.current)}),r?null:l.jsx(Oe.div,{...i,ref:a})});G5.displayName=H5;var Tk="PopperContent",[zce,Vce]=q5(Tk),Y5=v.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...g}=e,y=K5(Tk,n),[b,x]=v.useState(null),w=rt(t,te=>x(te)),[S,_]=v.useState(null),j=Qb(S),E=j?.width??0,C=j?.height??0,N=r+(o!=="center"?"-"+o:""),k=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},P=Array.isArray(u)?u:[u],A=P.length>0,L={padding:k,boundary:P.filter(Kce),altBoundary:A},{refs:R,floatingStyles:D,placement:O,isPositioned:F,middlewareData:T}=Pce({strategy:"fixed",placement:N,whileElementsMounted:(...te)=>bce(...te,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[Ace({mainAxis:i+C,alignmentAxis:s}),c&&Tce({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Rce():void 0,...L}),c&&Oce({...L}),Ice({...L,apply:({elements:te,rects:ye,availableWidth:W,availableHeight:ne})=>{const{width:se,height:U}=ye.reference,ae=te.floating.style;ae.setProperty("--radix-popper-available-width",`${W}px`),ae.setProperty("--radix-popper-available-height",`${ne}px`),ae.setProperty("--radix-popper-anchor-width",`${se}px`),ae.setProperty("--radix-popper-anchor-height",`${U}px`)}}),S&&$ce({element:S,padding:a}),Wce({arrowWidth:E,arrowHeight:C}),h&&Mce({strategy:"referenceHidden",...L})]}),[M,V]=X5(O),B=ac(m);Qn(()=>{F&&B?.()},[F,B]);const I=T.arrow?.x,z=T.arrow?.y,H=T.arrow?.centerOffset!==0,[de,ge]=v.useState();return Qn(()=>{b&&ge(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:F?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[T.transformOrigin?.x,T.transformOrigin?.y].join(" "),...T.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(zce,{scope:n,placedSide:M,onArrowChange:_,arrowX:I,arrowY:z,shouldHideArrow:H,children:l.jsx(Oe.div,{"data-side":M,"data-align":V,...g,ref:w,style:{...g.style,animation:F?void 0:"none"}})})})});Y5.displayName=Tk;var Q5="PopperArrow",qce={top:"bottom",right:"left",bottom:"top",left:"right"},J5=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Vce(Q5,r),s=qce[o.placedSide];return l.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:l.jsx(Lce,{...i,ref:n,style:{...i.style,display:"block"}})})});J5.displayName=Q5;function Kce(e){return e!==null}var Wce=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,d]=X5(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(i.arrow?.x??0)+a/2,p=(i.arrow?.y??0)+c/2;let m="",g="";return u==="bottom"?(m=s?f:`${h}px`,g=`${-c}px`):u==="top"?(m=s?f:`${h}px`,g=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,g=s?f:`${p}px`):u==="left"&&(m=`${r.floating.width+c}px`,g=s?f:`${p}px`),{data:{x:m,y:g}}}});function X5(e){const[t,n="center"]=e.split("-");return[t,n]}var Rk=W5,aw=G5,Ok=Y5,Ik=J5,Hce="Portal",lw=v.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=v.useState(!1);Qn(()=>o(!0),[]);const s=n||i&&globalThis?.document?.body;return s?Iz.createPortal(l.jsx(Oe.div,{...r,ref:t}),s):null});lw.displayName=Hce;var Gce=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xc=new WeakMap,Ig=new WeakMap,Mg={},W_=0,Z5=function(e){return e&&(e.host||Z5(e.parentNode))},Yce=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Z5(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Qce=function(e,t,n,r){var i=Yce(t,Array.isArray(e)?e:[e]);Mg[n]||(Mg[n]=new WeakMap);var o=Mg[n],s=[],a=new Set,c=new Set(i),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};
vendor: 6,780 bytes, lines 578-593
578i.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))d(h);else try{var p=h.getAttribute(r),m=p!==null&&p!=="false",g=(xc.get(h)||0)+1,y=(o.get(h)||0)+1;xc.set(h,g),o.set(h,y),s.push(h),g===1&&m&&Ig.set(h,!0),y===1&&h.setAttribute(n,"true"),m||h.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",h,b)}})};return d(t),a.clear(),W_++,function(){s.forEach(function(f){var h=xc.get(f)-1,p=o.get(f)-1;xc.set(f,h),o.set(f,p),h||(Ig.has(f)||f.removeAttribute(r),Ig.delete(f)),p||f.removeAttribute(n)}),W_--,W_||(xc=new WeakMap,xc=new WeakMap,Ig=new WeakMap,Mg={})}},cw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Gce(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Qce(r,i,n,"aria-hidden")):function(){return null}},In=function(){return In=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},In.apply(this,arguments)};function Mk(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Jot(e,t,n,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,n,o):s(t,n))||o);return i>3&&o&&Object.defineProperty(t,n,o),o}function eq(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var jh="right-scroll-bar-position",Eh="width-before-scroll-bar",Jce="with-scroll-bars-hidden",Xce="--removed-body-scroll-bar-size";function H_(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Zce(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var eue=typeof window<"u"?v.useLayoutEffect:v.useEffect,sM=new WeakMap;function tq(e,t){var n=Zce(null,function(r){return e.forEach(function(i){return H_(i,r)})});return eue(function(){var r=sM.get(n);if(r){var i=new Set(r),o=new Set(e),s=n.current;i.forEach(function(a){o.has(a)||H_(a,null)}),o.forEach(function(a){i.has(a)||H_(a,s)})}sM.set(n,e)},[e]),n}function tue(e){return e}function nue(e,t){t===void 0&&(t=tue);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var c=function(){var d=s;s=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return i}function nq(e){e===void 0&&(e={});var t=nue(null);return t.options=In({async:!0,ssr:!1},e),t}var rq=function(e){var t=e.sideCar,n=Mk(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,In({},n))};rq.isSideCarExport=!0;function iq(e,t){return e.useMedium(t),rq}var oq=nq(),G_=function(){},uw=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:G_,onWheelCapture:G_,onTouchMoveCapture:G_}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,x=e.gapMode,w=Mk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,_=tq([n,t]),j=In(In({},w),i);return v.createElement(v.Fragment,null,d&&v.createElement(S,{sideCar:oq,removeScrollBar:u,shards:f,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:x}),s?v.cloneElement(v.Children.only(a),In(In({},j),{ref:_})):v.createElement(b,In({},j,{className:c,ref:_}),a))});uw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};uw.classNames={fullWidth:Eh,zeroRight:jh};var rue=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function iue(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=rue();return t&&e.setAttribute("nonce",t),e}function oue(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function sue(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var aue=function(){var e=0,t=null;return{add:function(n){e==0&&(t=iue())&&(oue(t,n),sue(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},lue=function(){var e=aue();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},$k=function(){var e=lue(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},cue={left:0,top:0,right:0,gap:0},Y_=function(e){return parseInt(e||"",10)||0},uue=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Y_(n),Y_(r),Y_(i)]},due=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return cue;var t=uue(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},fue=$k(),bu="data-scroll-locked",hue=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` 579 .`.concat(Jce,` { 580 overflow: hidden `).concat(r,`; 581 padding-right: `).concat(a,"px ").concat(r,`; 582 } 583 body[`).concat(bu,`] { 584 overflow: hidden `).concat(r,`; 585 overscroll-behavior: contain; 586 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 587 padding-left: `.concat(i,`px; 588 padding-top: `).concat(o,`px; 589 padding-right: `).concat(s,`px; 590 margin-left:0; 591 margin-top:0; 592 margin-right: `).concat(a,"px ").concat(r,`; 593 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
593")].filter(Boolean).join(""),` 594 } 595 596 .`).concat(jh,` { 597 right: `).concat(a,"px ").concat(r,`; 598 } 599 600 .`).concat(Eh,` { 601 margin-right: `).concat(a,"px ").concat(r,`; 602 } 603 604 .`).concat(jh," .").concat(jh,` { 605 right: 0 `).concat(r,`; 606 } 607 608 .`).concat(Eh," .").concat(Eh,` { 609 margin-right: 0 `).concat(r,`; 610 } 611 612 body[`).concat(bu,`] { 613 `).concat(Xce,": ").concat(a,`px; 614 } 615`)},aM=function(){var e=parseInt(document.body.getAttribute(bu)||"0",10);return isFinite(e)?e:0},pue=function(){v.useEffect(function(){return document.body.setAttribute(bu,(aM()+1).toString()),function(){var e=aM()-1;e<=0?document.body.removeAttribute(bu):document.body.setAttribute(bu,e.toString())}},[])},sq=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;pue();var o=v.useMemo(function(){return due(i)},[i]);return v.createElement(fue,{styles:hue(o,!t,i,n?"":"!important")})},Wj=!1;if(typeof window<"u")try{var $g=Object.defineProperty({},"passive",{get:function(){return Wj=!0,!0}});window.addEventListener("test",$g,$g),window.removeEventListener("test",$g,$g)}catch{Wj=!1}var bc=Wj?{passive:!1}:!1,mue=function(e){return e.tagName==="TEXTAREA"},aq=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!mue(e)&&n[t]==="visible")},gue=function(e){return aq(e,"overflowY")},vue=function(e){return aq(e,"overflowX")},lM=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=lq(e,r);if(i){var o=cq(e,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},yue=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},xue=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},lq=function(e,t){return e==="v"?gue(t):vue(t)},cq=function(e,t){return e==="v"?yue(t):xue(t)},bue=function(e,t){return e==="h"&&t==="rtl"?-1:1},wue=function(e,t,n,r,i){var o=bue(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,c=t.contains(a),u=!1,d=s>0,f=0,h=0;do{var p=cq(e,a),m=p[0],g=p[1],y=p[2],b=g-y-o*m;(m||b)&&lq(e,a)&&(f+=b,h+=m),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!i)||!d&&(Math.abs(h)<1||!i))&&(u=!0),u},Dg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},cM=function(e){return[e.deltaX,e.deltaY]},uM=function(e){return e&&"current"in e?e.current:e},_ue=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Sue=function(e){return` 616 .block-interactivity-`.concat(e,` {pointer-events: none;} 617 .allow-interactivity-`).concat(e,` {pointer-events: all;} 618`)},jue=0,wc=[];function Eue(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(jue++)[0],o=v.useState($k)[0],s=v.useRef(e);v.useEffect(function(){s.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var g=eq([e.lockRef.current],(e.shards||[]).map(uM),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=v.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var b=Dg(g),x=n.current,w="deltaX"in g?g.deltaX:x[0]-b[0],S="deltaY"in g?g.deltaY:x[1]-b[1],_,j=g.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in g&&E==="h"&&j.type==="range")return!1;var C=lM(E,j);if(!C)return!0;if(C?_=E:(_=E==="v"?"h":"v",C=lM(E,j)),!C)return!1;if(!r.current&&"changedTouches"in g&&(w||S)&&(r.current=_),!_)return!0;var N=r.current||_;return wue(N,y,g,N==="h"?w:S,!0)},[]),c=v.useCallback(function(g){var y=g;if(!(!wc.length||wc[wc.length-1]!==o)){var b="deltaY"in y?cM(y):Dg(y),x=t.current.filter(function(_){return _.name===y.type&&(_.target===y.target||y.target===_.shadowParent)&&_ue(_.delta,b)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}
vendor: 17,623 bytes, line 618
618if(!x){var w=(s.current.shards||[]).map(uM).filter(Boolean).filter(function(_){return _.contains(y.target)}),S=w.length>0?a(y,w[0]):!s.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),u=v.useCallback(function(g,y,b,x){var w={name:g,delta:y,target:b,should:x,shadowParent:Cue(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=v.useCallback(function(g){n.current=Dg(g),r.current=void 0},[]),f=v.useCallback(function(g){u(g.type,cM(g),g.target,a(g,e.lockRef.current))},[]),h=v.useCallback(function(g){u(g.type,Dg(g),g.target,a(g,e.lockRef.current))},[]);v.useEffect(function(){return wc.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,bc),document.addEventListener("touchmove",c,bc),document.addEventListener("touchstart",d,bc),function(){wc=wc.filter(function(g){return g!==o}),document.removeEventListener("wheel",c,bc),document.removeEventListener("touchmove",c,bc),document.removeEventListener("touchstart",d,bc)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(o,{styles:Sue(i)}):null,p?v.createElement(sq,{gapMode:e.gapMode}):null)}function Cue(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Nue=iq(oq,Eue);var dw=v.forwardRef(function(e,t){return v.createElement(uw,In({},e,{ref:t,sideCar:Nue}))});dw.classNames=uw.classNames;var Hj=["Enter"," "],Pue=["ArrowDown","PageUp","Home"],uq=["ArrowUp","PageDown","End"],kue=[...Pue,...uq],Aue={ltr:[...Hj,"ArrowRight"],rtl:[...Hj,"ArrowLeft"]},Tue={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Tm="Menu",[lp,Rue,Oue]=Xb(Tm),[cc,dq]=Ps(Tm,[Oue,Bd,Id]),fw=Bd(),fq=Id(),[Iue,uc]=cc(Tm),[Mue,Rm]=cc(Tm),hq=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:s=!0}=e,a=fw(t),[c,u]=v.useState(null),d=v.useRef(!1),f=ac(o),h=Od(i);return v.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),l.jsx(Rk,{...a,children:l.jsx(Iue,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:l.jsx(Mue,{scope:t,onClose:v.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:s,children:r})})})};hq.displayName=Tm;var $ue="MenuAnchor",Dk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=fw(n);return l.jsx(aw,{...i,...r,ref:t})});Dk.displayName=$ue;var Lk="MenuPortal",[Due,pq]=cc(Lk,{forceMount:void 0}),mq=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=uc(Lk,t);return l.jsx(Due,{scope:t,forceMount:n,children:l.jsx(ks,{present:n||o.open,children:l.jsx(lw,{asChild:!0,container:i,children:r})})})};mq.displayName=Lk;var ti="MenuContent",[Lue,Fk]=cc(ti),gq=v.forwardRef((e,t)=>{const n=pq(ti,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=uc(ti,e.__scopeMenu),s=Rm(ti,e.__scopeMenu);return l.jsx(lp.Provider,{scope:e.__scopeMenu,children:l.jsx(ks,{present:r||o.open,children:l.jsx(lp.Slot,{scope:e.__scopeMenu,children:s.modal?l.jsx(Fue,{...i,ref:t}):l.jsx(Bue,{...i,ref:t})})})})}),Fue=v.forwardRef((e,t)=>{const n=uc(ti,e.__scopeMenu),r=v.useRef(null),i=rt(t,r);return v.useEffect(()=>{const o=r.current;if(o)return cw(o)},[]),l.jsx(Bk,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:xe(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Bue=v.forwardRef((e,t)=>{const n=uc(ti,e.__scopeMenu);return l.jsx(Bk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Bk=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:m,...g}=e,y=uc(ti,n),b=Rm(ti,n),x=fw(n),w=fq(n),S=Rue(n),[_,j]=v.useState(null),E=v.useRef(null),C=rt(t,E,y.onContentChange),N=v.useRef(0),k=v.useRef(""),P=v.useRef(0),A=v.useRef(null),L=v.useRef("right"),R=v.useRef(0),D=m?dw:v.Fragment,O=m?{as:Bi,allowPinchZoom:!0}:void 0,F=M=>{const V=k.current+M,B=S().filter(te=>!te.disabled),I=document.activeElement,z=B.find(te=>te.ref.current===I)?.textValue,H=B.map(te=>te.textValue),de=Xue(H,V,z),ge=B.find(te=>te.textValue===de)?.ref.current;(function te(ye){k.current=ye,window.clearTimeout(N.current),ye!==""&&(N.current=window.setTimeout(()=>te(""),1e3))})(V),ge&&setTimeout(()=>ge.focus())};v.useEffect(()=>()=>window.clearTimeout(N.current),[]),wk();const T=v.useCallback(M=>L.current===A.current?.side&&ede(M,A.current?.area),[]);return l.jsx(Lue,{scope:n,searchRef:k,onItemEnter:v.useCallback(M=>{T(M)&&M.preventDefault()},[T]),onItemLeave:v.useCallback(M=>{T(M)||(E.current?.focus(),j(null))},[T]),onTriggerLeave:v.useCallback(M=>{T(M)&&M.preventDefault()},[T]),pointerGraceTimerRef:P,onPointerGraceIntentChange:v.useCallback(M=>{A.current=M},[]),children:l.jsx(D,{...O,children:l.jsx(rw,{asChild:!0,trapped:i,onMountAutoFocus:xe(o,M=>{M.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:l.jsx(nw,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p,children:l.jsx(uk,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:j,onEntryFocus:xe(c,M=>{b.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Ok,{role:"menu","aria-orientation":"vertical","data-state":Rq(y.open),"data-radix-menu-content":"",dir:b.dir,...x,...g,ref:C,style:{outline:"none",...g.style},onKeyDown:xe(g.onKeyDown,M=>{const B=M.target.closest("[data-radix-menu-content]")===M.currentTarget,I=M.ctrlKey||M.altKey||M.metaKey,z=M.key.length===1;B&&(M.key==="Tab"&&M.preventDefault(),!I&&z&&F(M.key));const H=E.current;if(M.target!==H||!kue.includes(M.key))return;M.preventDefault();const ge=S().filter(te=>!te.disabled).map(te=>te.ref.current);uq.includes(M.key)&&ge.reverse(),Que(ge)}),onBlur:xe(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(N.current),k.current="")}),onPointerMove:xe(e.onPointerMove,cp(M=>{const V=M.target,B=R.current!==M.clientX;if(M.currentTarget.contains(V)&&B){const I=M.clientX>R.current?"right":"left";L.current=I,R.current=M.clientX}}))})})})})})})});gq.displayName=ti;var Uue="MenuGroup",Uk=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Oe.div,{role:"group",...r,ref:t})});Uk.displayName=Uue;var zue="MenuLabel",vq=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Oe.div,{...r,ref:t})});vq.displayName=zue;var Dy="MenuItem",dM="menu.itemSelect",hw=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=v.useRef(null),s=Rm(Dy,e.__scopeMenu),a=Fk(Dy,e.__scopeMenu),c=rt(t,o),u=v.useRef(!1),d=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(dM,{bubbles:!0,cancelable:!0});f.addEventListener(dM,p=>r?.(p),{once:!0}),_oe(f,h),h.defaultPrevented?u.current=!1:s.onClose()}};return l.jsx(yq,{...i,ref:c,disabled:n,onClick:xe(e.onClick,d),onPointerDown:f=>{e.onPointerDown?.(f),u.current=!0},onPointerUp:xe(e.onPointerUp,f=>{u.current||f.currentTarget?.click()}),onKeyDown:xe(e.onKeyDown,f=>{const h=a.searchRef.current!=="";n||h&&f.key===" "||Hj.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});hw.displayName=Dy;var yq=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,s=Fk(Dy,n),a=fq(n),c=v.useRef(null),u=rt(t,c),[d,f]=v.useState(!1),[h,p]=v.useState("");return v.useEffect(()=>{const m=c.current;m&&p((m.textContent??"").trim())},[o.children]),l.jsx(lp.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:l.jsx(dk,{asChild:!0,...a,focusable:!r,children:l.jsx(Oe.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:u,onPointerMove:xe(e.onPointerMove,cp(m=>{r?s.onItemLeave(m):(s.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:xe(e.onPointerLeave,cp(m=>s.onItemLeave(m))),onFocus:xe(e.onFocus,()=>f(!0)),onBlur:xe(e.onBlur,()=>f(!1))})})})}),Vue="MenuCheckboxItem",xq=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return l.jsx(jq,{scope:e.__scopeMenu,checked:n,children:l.jsx(hw,{role:"menuitemcheckbox","aria-checked":Ly(n)?"mixed":n,...i,ref:t,"data-state":Vk(n),onSelect:xe(i.onSelect,()=>r?.(Ly(n)?!0:!n),{checkForDefaultPrevented:!1})})})});xq.displayName=Vue;var bq="MenuRadioGroup",[que,Kue]=cc(bq,{value:void 0,onValueChange:()=>{}}),wq=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=ac(r);return l.jsx(que,{scope:e.__scopeMenu,value:n,onValueChange:o,children:l.jsx(Uk,{...i,ref:t})})});wq.displayName=bq;var _q="MenuRadioItem",Sq=v.forwardRef((e,t)=>{const{value:n,...r}=e,i=Kue(_q,e.__scopeMenu),o=n===i.value;return l.jsx(jq,{scope:e.__scopeMenu,checked:o,children:l.jsx(hw,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Vk(o),onSelect:xe(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Sq.displayName=_q;var zk="MenuItemIndicator",[jq,Wue]=cc(zk,{checked:!1}),Eq=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=Wue(zk,n);return l.jsx(ks,{present:r||Ly(o.checked)||o.checked===!0,children:l.jsx(Oe.span,{...i,ref:t,"data-state":Vk(o.checked)})})});Eq.displayName=zk;var Hue="MenuSeparator",Cq=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Oe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Cq.displayName=Hue;var Gue="MenuArrow",Nq=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=fw(n);return l.jsx(Ik,{...i,...r,ref:t})});Nq.displayName=Gue;var Yue="MenuSub",[Xot,Pq]=cc(Yue),rh="MenuSubTrigger",kq=v.forwardRef((e,t)=>{const n=uc(rh,e.__scopeMenu),r=Rm(rh,e.__scopeMenu),i=Pq(rh,e.__scopeMenu),o=Fk(rh,e.__scopeMenu),s=v.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},d=v.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return v.useEffect(()=>d,[d]),v.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),c(null)}},[a,c]),l.jsx(Dk,{asChild:!0,...u,children:l.jsx(yq,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":Rq(n.open),...e,ref:ek(t,i.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:xe(e.onPointerMove,cp(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:xe(e.onPointerLeave,cp(f=>{d();const h=n.content?.getBoundingClientRect();if(h){const p=n.content?.dataset.side,m=p==="right",g=m?-5:5,y=h[m?"left":"right"],b=h[m?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+g,y:f.clientY},{x:y,y:h.top},{x:b,y:h.top},{x:b,y:h.bottom},{x:y,y:h.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:xe(e.onKeyDown,f=>{const h=o.searchRef.current!=="";e.disabled||h&&f.key===" "||Aue[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});kq.displayName=rh;var Aq="MenuSubContent",Tq=v.forwardRef((e,t)=>{const n=pq(ti,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=uc(ti,e.__scopeMenu),s=Rm(ti,e.__scopeMenu),a=Pq(Aq,e.__scopeMenu),c=v.useRef(null),u=rt(t,c);return l.jsx(lp.Provider,{scope:e.__scopeMenu,children:l.jsx(ks,{present:r||o.open,children:l.jsx(lp.Slot,{scope:e.__scopeMenu,children:l.jsx(Bk,{id:a.contentId,"aria-labelledby":a.triggerId,...i,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{s.isUsingKeyboardRef.current&&c.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:xe(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:xe(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:xe(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),h=Tue[s.dir].includes(d.key);f&&h&&(o.onOpenChange(!1),a.trigger?.focus(),d.preventDefault())})})})})})});Tq.displayName=Aq;function Rq(e){return e?"open":"closed"}function Ly(e){return e==="indeterminate"}function Vk(e){return Ly(e)?"indeterminate":e?"checked":"unchecked"}function Que(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Jue(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Xue(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=Jue(e,Math.max(o,0));i.length===1&&(s=s.filter(u=>u!==n));const c=s.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function Zue(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const a=t[o].x,c=t[o].y,u=t[s].x,d=t[s].y;c>r!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(i=!i)}return i}function ede(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Zue(n,t)}function cp(e){return t=>t.pointerType==="mouse"?e(t):void 0}var tde=hq,nde=Dk,rde=mq,ide=gq,ode=Uk,sde=vq,ade=hw,lde=xq,cde=wq,ude=Sq,dde=Eq,fde=Cq,hde=Nq,pde=kq,mde=Tq,qk="DropdownMenu",[gde,Zot]=Ps(qk,[dq]),er=dq(),[vde,Oq]=gde(qk),Iq=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,c=er(t),u=v.useRef(null),[d=!1,f]=si({prop:i,defaultProp:o,onChange:s});return l.jsx(vde,{scope:t,triggerId:Ca(),triggerRef:u,contentId:Ca(),open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(h=>!h),[f]),modal:a,children:l.jsx(tde,{...c,open:d,onOpenChange:f,dir:r,modal:a,children:n})})};Iq.displayName=qk;var Mq="DropdownMenuTrigger",$q=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=Oq(Mq,n),s=er(n);return l.jsx(nde,{asChild:!0,...s,children:l.jsx(Oe.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:ek(t,o.triggerRef),onPointerDown:xe(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:xe(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});$q.displayName=Mq;var yde="DropdownMenuPortal",Dq=e=>{const{__scopeDropdownMenu:t,...n}=e,r=er(t);return l.jsx(rde,{...r,...n})};Dq.displayName=yde;var Lq="DropdownMenuContent",Fq=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Oq(Lq,n),o=er(n),s=v.useRef(!1);return l.jsx(ide,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:xe(e.onCloseAutoFocus,a=>{s.current||i.triggerRef.current?.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:xe(e.onInteractOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!i.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Fq.displayName=Lq;var xde="DropdownMenuGroup",bde=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return l.jsx(ode,{...i,...r,ref:t})});bde.displayName=xde;var wde="DropdownMenuLabel",Bq=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return l.jsx(sde,{...i,...r,ref:t})});Bq.displayName=wde;var _de="DropdownMenuItem",Uq=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return l.jsx(ade,{...i,...r,ref:t})});Uq.displayName=_de;var Sde="DropdownMenuCheckboxItem",zq=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return l.jsx(lde,{...i,...r,ref:t})});zq.displayName=Sde;var jde="DropdownMenuRadioGroup",Ede=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return l.jsx(cde,{...i,...r,ref:t})});Ede.displayName=jde;var Cde="DropdownMenuRadioItem",Vq=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return l.jsx(ude,{...i,...r,ref:t})});Vq.displayName=Cde;var Nde="DropdownMenuItemIndicator",qq=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return l.jsx(dde,{...i,...r,ref:t})});qq.displayName=Nde;var Pde="DropdownMenuSeparator",Kq=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return l.jsx(fde,{...i,...r,ref:t})});Kq.displayName=Pde;var kde="DropdownMenuArrow",Wq=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return l.jsx(hde,{...i,...r,ref:t})});Wq.displayName=kde;var Ade="DropdownMenuSubTrigger",Hq=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return l.jsx(pde,{...i,...r,ref:t})});
618Hq.displayName=Ade;var Tde="DropdownMenuSubContent",Gq=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return l.jsx(mde,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Gq.displayName=Tde;var Rde=Iq,Ode=$q,Ide=Dq,Yq=Fq,Qq=Bq,Jq=Uq,Xq=zq,Zq=Vq,eK=qq,tK=Kq,nK=Wq,rK=Hq,iK=Gq;const Gj=Rde,Yj=Ode,Mde=v.forwardRef(({className:e,inset:t,children:n,...r},i)=>l.jsxs(rK,{ref:i,className:K("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,l.jsx(Em,{className:"ml-auto"})]}));Mde.displayName=rK.displayName;const $de=v.forwardRef(({className:e,...t},n)=>l.jsx(iK,{ref:n,className:K("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));$de.displayName=iK.displayName;const Fy=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(Ide,{children:l.jsx(Yq,{ref:r,sideOffset:t,className:K("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Fy.displayName=Yq.displayName;const Dde=v.forwardRef(({className:e,...t},n)=>l.jsx(nK,{ref:n,className:K("fill-popover",e),...t}));Dde.displayName=nK.displayName;const _i=v.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(Jq,{ref:r,className:K("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n}));_i.displayName=Jq.displayName;const Lde=v.forwardRef(({className:e,children:t,checked:n,...r},i)=>l.jsxs(Xq,{ref:i,className:K("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center shrink-0",children:l.jsx(eK,{children:l.jsx(bo,{className:"h-4 w-4"})})}),t]}));Lde.displayName=Xq.displayName;const Fde=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Zq,{ref:r,className:K("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center shrink-0",children:l.jsx(eK,{children:l.jsx(bse,{className:"h-2 w-2 fill-current"})})}),t]}));Fde.displayName=Zq.displayName;const oK=v.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(Qq,{ref:r,className:K("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));oK.displayName=Qq.displayName;const wu=v.forwardRef(({className:e,...t},n)=>l.jsx(tK,{ref:n,className:K("-mx-1 my-1 h-px bg-muted",e),...t}));wu.displayName=tK.displayName;function Bde(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?null:Math.min(100,Math.round(e))}const Ude=3e4,zde=20;function Vde(e,t){return!e?.hasCv||e.score!=null?!1:t<zde?Ude:!1}function qde(e){return e.isError||!e.enabled?"unknown":e.isPending?"loading":!e.data||e.data.hasCv===void 0?"unknown":e.data.hasCv?"some":"none"}function Kde(){const e=tt(),t=e.user?.profile?.sub,n=!!t&&!!e.user?.id_token,{data:r,isLoading:i,isPending:o,isError:s}=ue({queryKey:["cv-completion",t],queryFn:async()=>{const a="https://da09e772vjcit.cloudfront.net/app/v1",u={Authorization:`Bearer ${e.user?.id_token}`},d=await fetch(`${a}/parsed-cvs/${t}`,{headers:u});if(!d.ok)return null;const f=await d.json(),h=Array.isArray(f)?f.length===0?void 0:(f.find(g=>g?.isPrimary)??f[0])?.cvId:f?.data?.cvId;if(!h)return Array.isArray(f)&&f.length===0?{percent:0,score:null,hasCv:!1}:null;const p=await fetch(`${a}/parsed-cvs/${t}/${h}/enhance-status`,{headers:u});if(!p.ok)return{percent:0,score:null,cvId:h,hasCv:!0};const m=await p.json();return{percent:m.analysis?.ats_score??0,score:Bde(m.analysis?.ats_score),cvId:h,hasCv:!0}},enabled:n,staleTime:1e3*60*5,refetchInterval:a=>Vde(a.state.data,a.state.dataUpdateCount)});return{completionPercent:r?.percent??0,scorePercent:r?.score??null,hasCv:r?r.hasCv:void 0,cvStatus:qde({enabled:n,isPending:o,isError:s,data:r}),primaryCvId:r?.cvId,isLoading:i,userId:t??""}}function q(){return{Authorization:`Bearer ${tt().user?.id_token}`}}function sK(e,t){return function(){return e.apply(t,arguments)}}const{toString:Wde}=Object.prototype,{getPrototypeOf:Kk}=Object,pw=(e=>t=>{const n=Wde.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gi=e=>(e=e.toLowerCase(),t=>pw(t)===e),mw=e=>t=>typeof t===e,{isArray:Ud}
vendor: 2,801 bytes, line 618
618=Array,up=mw("undefined");function Hde(e){return e!==null&&!up(e)&&e.constructor!==null&&!up(e.constructor)&&Or(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const aK=Gi("ArrayBuffer");function Gde(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&aK(e.buffer),t}const Yde=mw("string"),Or=mw("function"),lK=mw("number"),gw=e=>e!==null&&typeof e=="object",Qde=e=>e===!0||e===!1,Fv=e=>{if(pw(e)!=="object")return!1;const t=Kk(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Jde=Gi("Date"),Xde=Gi("File"),Zde=Gi("Blob"),efe=Gi("FileList"),tfe=e=>gw(e)&&Or(e.pipe),nfe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Or(e.append)&&((t=pw(e))==="formdata"||t==="object"&&Or(e.toString)&&e.toString()==="[object FormData]"))},rfe=Gi("URLSearchParams"),[ife,ofe,sfe,afe]=["ReadableStream","Request","Response","Headers"].map(Gi),lfe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Om(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Ud(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(r=0;r<s;r++)a=o[r],t.call(null,e[a],a,e)}}function cK(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const bl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,uK=e=>!up(e)&&e!==bl;function Qj(){const{caseless:e}=uK(this)&&this||{},t={},n=(r,i)=>{const o=e&&cK(t,i)||i;Fv(t[o])&&Fv(r)?t[o]=Qj(t[o],r):Fv(r)?t[o]=Qj({},r):Ud(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Om(arguments[r],n);return t}const cfe=(e,t,n,{allOwnKeys:r}={})=>(Om(t,(i,o)=>{n&&Or(i)?e[o]=sK(i,n):e[o]=i},{allOwnKeys:r}),e),ufe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),dfe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ffe=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Kk(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},hfe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},pfe=e=>{if(!e)return null;if(Ud(e))return e;let t=e.length;if(!lK(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},mfe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Kk(Uint8Array)),gfe=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;
618(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},vfe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},yfe=Gi("HTMLFormElement"),xfe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),fM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),bfe=Gi("RegExp"),dK=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Om(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},wfe=e=>{dK(e,(t,n)=>{if(Or(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Or(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},_fe=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Ud(e)?r(e):r(String(e).split(t)),n},Sfe=()=>{},jfe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Q_="abcdefghijklmnopqrstuvwxyz",hM="0123456789",fK={DIGIT:hM,ALPHA:Q_,ALPHA_DIGIT:Q_+Q_.toUpperCase()+hM},Efe=(e=16,t=fK.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Cfe(e){return!!(e&&Or(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Nfe=e=>{const t=new Array(10),n=(r,i)=>{if(gw(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Ud(r)?[]:{};return Om(r,(s,a)=>{const c=n(s,i+1);!up(c)&&(o[a]=c)}),t[i]=void 0,o}}return r};return n(e,0)},Pfe=Gi("AsyncFunction"),kfe=e=>e&&(gw(e)||Or(e))&&Or(e.then)&&Or(e.catch),hK=((e,t)=>e?setImmediate:t?((n,r)=>(bl.addEventListener("message",({source:i,data:o})=>{i===bl&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),bl.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Or(bl.postMessage)),Afe=typeof queueMicrotask<"u"?queueMicrotask.bind(bl):typeof process<"u"&&process.nextTick||hK,Y={isArray:Ud,isArrayBuffer:aK,isBuffer:Hde,isFormData:nfe,isArrayBufferView:Gde,isString:Yde,isNumber:lK,isBoolean:Qde,isObject:gw,isPlainObject:Fv,isReadableStream:ife,isRequest:ofe,isResponse:sfe,isHeaders:afe,isUndefined:up,isDate:Jde,isFile:Xde,isBlob:Zde,isRegExp:bfe,isFunction:Or,isStream:tfe,isURLSearchParams:rfe,isTypedArray:mfe,isFileList:efe,forEach:Om,merge:Qj,extend:cfe,trim:lfe,stripBOM:ufe,inherits:dfe,toFlatObject:ffe,kindOf:pw,kindOfTest:Gi,endsWith:hfe,toArray:pfe,forEachEntry:gfe,matchAll:vfe,isHTMLForm:yfe,hasOwnProperty:fM,hasOwnProp:fM,reduceDescriptors:dK,freezeMethods:wfe,toObjectSet:_fe,toCamelCase:xfe,noop:Sfe,toFiniteNumber:jfe,findKey:cK,global:bl,isContextDefined:uK,ALPHABET:fK,generateString:Efe,isSpecCompliantForm:Cfe,toJSONObject:Nfe,isAsyncFn:Pfe,isThenable:kfe,setImmediate:hK,asap:Afe};function Ie(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}Y.inherits(Ie,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.status}}});const pK=Ie.prototype,mK={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{mK[e]={value:e}});Object.defineProperties(Ie,mK);Object.defineProperty(pK,"isAxiosError",{value:!0});Ie.from=(e,t,n,r,i,o)=>{const s=Object.create(pK);return Y.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),Ie.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const Tfe=null;function Jj(e){return Y.isPlainObject(e)||Y.isArray(e)}function gK(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function pM(e,t,n){return e?e.concat(t).map(function(i,o){return i=gK(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Rfe(e){return Y.isArray(e)&&!e.some(Jj)}const Ofe=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});
vendor: 4,670 bytes, line 618
618function vw(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,y){return!Y.isUndefined(y[g])});const r=n.metaTokens,i=n.visitor||d,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&Y.isSpecCompliantForm(t);if(!Y.isFunction(i))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(Y.isDate(m))return m.toISOString();if(!c&&Y.isBlob(m))throw new Ie("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(m)||Y.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,g,y){let b=m;if(m&&!y&&typeof m=="object"){if(Y.endsWith(g,"{}"))g=r?g:g.slice(0,-2),m=JSON.stringify(m);else if(Y.isArray(m)&&Rfe(m)||(Y.isFileList(m)||Y.endsWith(g,"[]"))&&(b=Y.toArray(m)))return g=gK(g),b.forEach(function(w,S){!(Y.isUndefined(w)||w===null)&&t.append(s===!0?pM([g],S,o):s===null?g:g+"[]",u(w))}),!1}return Jj(m)?!0:(t.append(pM(y,g,o),u(m)),!1)}const f=[],h=Object.assign(Ofe,{defaultVisitor:d,convertValue:u,isVisitable:Jj});function p(m,g){if(!Y.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(m),Y.forEach(m,function(b,x){(!(Y.isUndefined(b)||b===null)&&i.call(t,b,Y.isString(x)?x.trim():x,g,h))===!0&&p(b,g?g.concat(x):[x])}),f.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return p(e),t}function mM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Wk(e,t){this._pairs=[],e&&vw(e,this,t)}const vK=Wk.prototype;vK.append=function(t,n){this._pairs.push([t,n])};vK.toString=function(t){const n=t?function(r){return t.call(this,r,mM)}:mM;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Ife(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yK(e,t,n){if(!t)return e;const r=n&&n.encode||Ife,i=n&&n.serialize;let o;if(i?o=i(t,n):o=Y.isURLSearchParams(t)?t.toString():new Wk(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class gM{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const xK={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mfe=typeof URLSearchParams<"u"?URLSearchParams:Wk,$fe=typeof FormData<"u"?FormData:null,Dfe=typeof Blob<"u"?Blob:null,Lfe={isBrowser:!0,classes:{URLSearchParams:Mfe,FormData:$fe,Blob:Dfe},protocols:["http","https","file","blob","url","data"]},Hk=typeof window<"u"&&typeof document<"u",Xj=typeof navigator=="object"&&navigator||void 0,Ffe=Hk&&(!Xj||["ReactNative","NativeScript","NS"].indexOf(Xj.product)<0),Bfe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ufe=Hk&&window.location.href||"http://localhost",zfe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hk,hasStandardBrowserEnv:Ffe,hasStandardBrowserWebWorkerEnv:Bfe,navigator:Xj,origin:Ufe},Symbol.toStringTag,{value:"Module"})),fr={...zfe,...Lfe};function Vfe(e,t){return vw(e,new fr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return fr.isNode&&Y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function qfe(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Kfe(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function bK(e){function t(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=o>=n.length;return s=!s&&Y.isArray(i)?i.length:s,c?(Y.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!Y.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&Y.isArray(i[s])&&(i[s]=Kfe(i[s])),!a)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,i)=>{t(qfe(r),i,n,0)}),n}return null}function Wfe(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Im={transitional:xK,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=Y.isObject(t);
vendor: 4,640 bytes, lines 618-620
618if(o&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return i?JSON.stringify(bK(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t)||Y.isReadableStream(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Vfe(t,this.formSerializer).toString();if((a=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return vw(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Wfe(t)):t}],transformResponse:[function(t){const n=this.transitional||Im.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(Y.isResponse(t)||Y.isReadableStream(t))return t;if(t&&Y.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?Ie.from(a,Ie.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fr.classes.FormData,Blob:fr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch"],e=>{Im.headers[e]={}});const Hfe=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Gfe=e=>{const t={};let n,r,i;return e&&e.split(` 619`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&Hfe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},vM=Symbol("internals");function Tf(e){return e&&String(e).trim().toLowerCase()}function Bv(e){return e===!1||e==null?e:Y.isArray(e)?e.map(Bv):String(e)}function Yfe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Qfe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function J_(e,t,n,r,i){if(Y.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!Y.isString(t)){if(Y.isString(r))return t.indexOf(r)!==-1;if(Y.isRegExp(r))return r.test(t)}}function Jfe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Xfe(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let hr=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,c,u){const d=Tf(c);if(!d)throw new Error("header name must be a non-empty string");const f=Y.findKey(i,d);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||c]=Bv(a))}const s=(a,c)=>Y.forEach(a,(u,d)=>o(u,d,c));if(Y.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(Y.isString(t)&&(t=t.trim())&&!Qfe(t))s(Gfe(t),n);else if(Y.isHeaders(t))for(const[a,c]of t.entries())o(c,a,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Tf(t),t){const r=Y.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Yfe(i);if(Y.isFunction(n))return n.call(this,i,r);if(Y.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Tf(t),t){const r=Y.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||J_(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=Tf(s),s){const a=Y.findKey(r,s);a&&(!n||J_(r,r[a],a,n))&&(delete r[a],i=!0)}}return Y.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||J_(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return Y.forEach(this,(i,o)=>{const s=Y.findKey(r,o);if(s){n[s]=Bv(i),delete n[o];return}const a=t?Jfe(o):String(o).trim();a!==o&&delete n[o],n[a]=Bv(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Y.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&Y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` 620`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);
620return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[vM]=this[vM]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=Tf(s);r[a]||(Xfe(i,s),r[a]=!0)}return Y.isArray(t)?t.forEach(o):o(t),this}};hr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Y.reduceDescriptors(hr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Y.freezeMethods(hr);function X_(e,t){const n=this||Im,r=t||n,i=hr.from(r.headers);let o=r.data;return Y.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function wK(e){return!!(e&&e.__CANCEL__)}function zd(e,t,n){Ie.call(this,e??"canceled",Ie.ERR_CANCELED,t,n),this.name="CanceledError"}Y.inherits(zd,Ie,{__CANCEL__:!0});function _K(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ie("Request failed with status code "+n.status,[Ie.ERR_BAD_REQUEST,Ie.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Zfe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ehe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=r[o];s||(s=u),n[i]=c,r[i]=u;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-s<t)return;const p=d&&u-d;return p?Math.round(h*1e3/p):void 0}}function the(e,t){let n=0,r=1e3/t,i,o;const s=(u,d=Date.now())=>{n=d,i=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),f=d-n;f>=r?s(u,d):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const By=(e,t,n=3)=>{let r=0;const i=ehe(50,250);return the(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,c=s-r,u=i(c),d=s<=a;r=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&d?(a-s)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},n)},yM=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},xM=e=>(...t)=>Y.asap(()=>e(...t)),nhe=fr.hasStandardBrowserEnv?function(){const t=fr.navigator&&/(msie|trident)/i.test(fr.navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=Y.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}(),rhe=fr.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];Y.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),Y.isString(r)&&s.push("path="+r),Y.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ihe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ohe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function SK(e,t){return e&&!ihe(t)?ohe(e,t):t}const bM=e=>e instanceof hr?{...e}:e;function Wl(e,t){t=t||{};const n={};function r(u,d,f){return Y.isPlainObject(u)&&Y.isPlainObject(d)?Y.merge.call({caseless:f},u,d):Y.isPlainObject(d)?Y.merge({},d):Y.isArray(d)?d.slice():d}function i(u,d,f){if(Y.isUndefined(d)){if(!Y.isUndefined(u))return r(void 0,u,f)}else return r(u,d,f)}function o(u,d){if(!Y.isUndefined(d))return r(void 0,d)}function s(u,d){if(Y.isUndefined(d)){if(!Y.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function a(u,d,f){if(f in t)return r(u,d);if(f in e)return r(void 0,u)}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,d)=>i(bM(u),bM(d),!0)};return Y.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=c[d]||i,h=f(e[d],t[d],d);Y.isUndefined(h)&&f!==a||(n[d]=h)}),n}const jK=e=>{const t=Wl({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;t.headers=s=hr.from(s),t.url=yK(SK(t.baseURL,t.url),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(Y.isFormData(n)){if(fr.hasStandardBrowserEnv||fr.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...d]=c?c.split(";").map(f=>
620f.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...d].join("; "))}}if(fr.hasStandardBrowserEnv&&(r&&Y.isFunction(r)&&(r=r(t)),r||r!==!1&&nhe(t.url))){const u=i&&o&&rhe.read(o);u&&s.set(i,u)}return t},she=typeof XMLHttpRequest<"u",ahe=she&&function(e){return new Promise(function(n,r){const i=jK(e);let o=i.data;const s=hr.from(i.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=i,d,f,h,p,m;function g(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(d),i.signal&&i.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function b(){if(!y)return;const w=hr.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),_={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:w,config:e,request:y};_K(function(E){n(E),g()},function(E){r(E),g()},_),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(r(new Ie("Request aborted",Ie.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new Ie("Network Error",Ie.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const _=i.transitional||xK;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new Ie(S,_.clarifyTimeoutError?Ie.ETIMEDOUT:Ie.ECONNABORTED,e,y)),y=null},o===void 0&&s.setContentType(null),"setRequestHeader"in y&&Y.forEach(s.toJSON(),function(S,_){y.setRequestHeader(_,S)}),Y.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),a&&a!=="json"&&(y.responseType=i.responseType),u&&([h,m]=By(u,!0),y.addEventListener("progress",h)),c&&y.upload&&([f,p]=By(c),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(d=w=>{y&&(r(!w||w.type?new zd(null,e,y):w),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(d),i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d)));const x=Zfe(i.url);if(x&&fr.protocols.indexOf(x)===-1){r(new Ie("Unsupported protocol "+x+":",Ie.ERR_BAD_REQUEST,e));return}y.send(o||null)})},lhe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,a();const d=u instanceof Error?u:this.reason;r.abort(d instanceof Ie?d:new zd(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{s=null,o(new Ie(`timeout ${t} of ms exceeded`,Ie.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>Y.asap(a),c}},che=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},uhe=async function*(e,t){for await(const n of dhe(e))yield*che(n,t)},dhe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},wM=(e,t,n,r)=>{const i=uhe(e,t);let o=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await i.next();if(u){a(),c.close();return}let f=d.byteLength;if(n){let h=o+=f;n(h)}c.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},yw=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",EK=yw&&typeof ReadableStream=="function",fhe=yw&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),CK=(e,...t)=>{try{return!!e(...t)}catch{return!1}},hhe=EK&&CK(()=>{let e=!1;const t=new Request(fr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),_M=64*1024,Zj=EK&&CK(()=>Y.isReadableStream(new Response("").body)),Uy={stream:Zj&&(e=>e.body)};yw&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Uy[t]&&(Uy[t]=Y.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ie(`Response type '${t}' is not supported`,Ie.ERR_NOT_SUPPORT,r)})})})(new Response);const phe=async e=>{if(e==null)return 0;if(Y.isBlob(e))return e.size;
620if(Y.isSpecCompliantForm(e))return(await new Request(fr.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Y.isArrayBufferView(e)||Y.isArrayBuffer(e))return e.byteLength;if(Y.isURLSearchParams(e)&&(e=e+""),Y.isString(e))return(await fhe(e)).byteLength},mhe=async(e,t)=>{const n=Y.toFiniteNumber(e.getContentLength());return n??phe(t)},ghe=yw&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:h}=jK(e);u=u?(u+"").toLowerCase():"text";let p=lhe([i,o&&o.toAbortSignal()],s),m;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(c&&hhe&&n!=="get"&&n!=="head"&&(y=await mhe(d,r))!==0){let _=new Request(t,{method:"POST",body:r,duplex:"half"}),j;if(Y.isFormData(r)&&(j=_.headers.get("content-type"))&&d.setContentType(j),_.body){const[E,C]=yM(y,By(xM(c)));r=wM(_.body,_M,E,C)}}Y.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;m=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:b?f:void 0});let x=await fetch(m);const w=Zj&&(u==="stream"||u==="response");if(Zj&&(a||w&&g)){const _={};["status","statusText","headers"].forEach(N=>{_[N]=x[N]});const j=Y.toFiniteNumber(x.headers.get("content-length")),[E,C]=a&&yM(j,By(xM(a),!0))||[];x=new Response(wM(x.body,_M,E,()=>{C&&C(),g&&g()}),_)}u=u||"text";let S=await Uy[Y.findKey(Uy,u)||"text"](x,e);return!w&&g&&g(),await new Promise((_,j)=>{_K(_,j,{data:S,headers:hr.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new Ie("Network Error",Ie.ERR_NETWORK,e,m),{cause:b.cause||b}):Ie.from(b,b&&b.code,e,m)}}),eE={http:Tfe,xhr:ahe,fetch:ghe};Y.forEach(eE,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const SM=e=>`- ${e}`,vhe=e=>Y.isFunction(e)||e===null||e===!1,NK={getAdapter:e=>{e=Y.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o<t;o++){n=e[o];let s;if(r=n,!vhe(n)&&(r=eE[(s=String(n)).toLowerCase()],r===void 0))throw new Ie(`Unknown adapter '${s}'`);if(r)break;i[s||"#"+o]=r}if(!r){const o=Object.entries(i).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=t?o.length>1?`since : 621`+o.map(SM).join(` 622`):" "+SM(o[0]):"as no adapter specified";throw new Ie("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:eE};function Z_(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zd(null,e)}function jM(e){return Z_(e),e.headers=hr.from(e.headers),e.data=X_.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),NK.getAdapter(e.adapter||Im.adapter)(e).then(function(r){return Z_(e),r.data=X_.call(e,e.transformResponse,r),r.headers=hr.from(r.headers),r},function(r){return wK(r)||(Z_(e),r&&r.response&&(r.response.data=X_.call(e,e.transformResponse,r.response),r.response.headers=hr.from(r.response.headers))),Promise.reject(r)})}const PK="1.7.7",Gk={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gk[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const EM={};Gk.transitional=function(t,n,r){function i(o,s){return"[Axios v"+PK+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new Ie(i(s," has been removed"+(n?" in "+n:"")),Ie.ERR_DEPRECATED);return n&&!EM[s]&&(EM[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};function yhe(e,t,n){if(typeof e!="object")throw new Ie("options must be an object",Ie.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],c=a===void 0||s(a,o,e);if(c!==!0)throw new Ie("option "+o+" must be "+c,Ie.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ie("Unknown option "+o,Ie.ERR_BAD_OPTION)}}const tE={assertOptions:yhe,validators:Gk},Us=tE.validators;let Tl=class{constructor(t){this.defaults=t,this.interceptors={request:new gM,response:new gM}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` 623`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Wl(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&tE.assertOptions(r,{silentJSONParsing:Us.transitional(Us.boolean),forcedJSONParsing:Us.transitional(Us.boolean),clarifyTimeoutError:Us.transitional(Us.boolean)}
vendor: 2,752 bytes, line 623
623,!1),i!=null&&(Y.isFunction(i)?n.paramsSerializer={serialize:i}:tE.assertOptions(i,{encode:Us.function,serialize:Us.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&Y.merge(o.common,o[n.method]);o&&Y.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=hr.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let d,f=0,h;if(!c){const m=[jM.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,u),h=m.length,d=Promise.resolve(n);f<h;)d=d.then(m[f++],m[f++]);return d}h=a.length;let p=n;for(f=0;f<h;){const m=a[f++],g=a[f++];try{p=m(p)}catch(y){g.call(this,y);break}}try{d=jM.call(this,p)}catch(m){return Promise.reject(m)}for(f=0,h=u.length;f<h;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=Wl(this.defaults,t);const n=SK(t.baseURL,t.url);return yK(n,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){Tl.prototype[t]=function(n,r){return this.request(Wl(r||{},{method:t,url:n,data:(r||{}).data}))}});Y.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,a){return this.request(Wl(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Tl.prototype[t]=n(),Tl.prototype[t+"Form"]=n(!0)});let xhe=class kK{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new zd(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new kK(function(i){t=i}),cancel:t}}};function bhe(e){return function(n){return e.apply(null,n)}}function whe(e){return Y.isObject(e)&&e.isAxiosError===!0}const nE={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
vendor: 1,786 bytes, line 623
623alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(nE).forEach(([e,t])=>{nE[t]=e});function AK(e){const t=new Tl(e),n=sK(Tl.prototype.request,t);return Y.extend(n,Tl.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return AK(Wl(e,i))},n}const ot=AK(Im);ot.Axios=Tl;ot.CanceledError=zd;ot.CancelToken=xhe;ot.isCancel=wK;ot.VERSION=PK;ot.toFormData=vw;ot.AxiosError=Ie;ot.Cancel=ot.CanceledError;ot.all=function(t){return Promise.all(t)};ot.spread=bhe;ot.isAxiosError=whe;ot.mergeConfig=Wl;ot.AxiosHeaders=hr;ot.formToJSON=e=>bK(Y.isHTMLForm(e)?new FormData(e):e);ot.getAdapter=NK.getAdapter;ot.HttpStatusCode=nE;ot.default=ot;const{Axios:nst,AxiosError:rst,CanceledError:ist,isCancel:ost,CancelToken:sst,VERSION:ast,all:lst,Cancel:cst,isAxiosError:rE,spread:u
623st,toFormData:dst,AxiosHeaders:fst,HttpStatusCode:hst,formToJSON:pst,getAdapter:mst,mergeConfig:gst}=ot,zy="super_admin.impersonated_org",Lg={orgId:null,orgName:null,setBy:null},iE=new Set;function TK(){if(typeof window>"u")return Lg;const e=window.sessionStorage.getItem(zy);if(!e)return Lg;try{const t=JSON.parse(e);return!t.orgId||!t.setBy?Lg:{orgId:t.orgId,orgName:t.orgName??null,setBy:t.setBy}}catch{return Lg}}let Jc=TK();function oE(){Jc=TK();for(const e of iE)e()}const Rf={getSnapshot(){return Jc},subscribe(e){return iE.add(e),()=>iE.delete(e)},set(e,t,n){if(!n){console.warn("[impersonation] ignoring set() with no acting subject");return}const r={orgId:e,orgName:t,setBy:n};window.sessionStorage.setItem(zy,JSON.stringify(r)),oE()},clear(){window.sessionStorage.removeItem(zy),oE()}};function _he(e){if(!e)return null;const n=e.replace(/^Bearer\s+/i,"").split(".")[1];if(!n)return null;try{let r=n.replace(/-/g,"+").replace(/_/g,"/");for(;r.length%4!==0;)r+="=";const i=decodeURIComponent(atob(r).split("").map(s=>"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)).join("")),o=JSON.parse(i);return typeof o.sub=="string"?o.sub:null}catch{return null}}function She(e){return!Jc.orgId||!Jc.setBy?null:_he(e)===Jc.setBy?Jc.orgId:null}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===zy&&oE()});const jhe="ACCOUNT_DISABLED",sE="/account-disabled";function Ehe(e){if(!e||typeof e!="object")return!1;const{response:t}=e;return t?.status!==403?!1:t?.data?.reason===jhe}function Che(e,t){return Ehe(e)?!Nhe(t):!1}function Nhe(e){return e===sE||e.startsWith(sE+"/")}function Phe(e){return e.headers["X-Correlation-Id"]=crypto.randomUUID(),e}function khe(e){const t=She(e.headers?.Authorization);return t&&(e.headers["X-Impersonate-Org"]=t),e}function Ahe(e){return foe()&&(e.headers["X-Use-Prod-Jobs"]="true"),e}const Be=ot.create({baseURL:"https://da09e772vjcit.cloudfront.net/api/v1"}),xw=ot.create({baseURL:"https://da09e772vjcit.cloudfront.net/api/v1"}),ee=ot.create({baseURL:"https://da09e772vjcit.cloudfront.net/app/v1",paramsSerializer:{indexes:null}}),dc=ot.create({baseURL:"https://da09e772vjcit.cloudfront.net/app/v1".replace("/app/v1","/app/v2")||""}),Se=ot.create({baseURL:"https://da09e772vjcit.cloudfront.net/app/v1".replace("/app/v1","")||""});[Be,xw,ee,dc,Se].forEach(e=>{e.interceptors.request.use(Phe),e.interceptors.request.use(khe)});[ee,dc].forEach(e=>{e.interceptors.request.use(Ahe)});function The(e){return typeof window>"u"||Che(e,window.location.pathname)&&window.location.replace(sE),Promise.reject(e)}[Be,xw,ee,dc,Se].forEach(e=>{e.interceptors.response.use(t=>t,The)});const Rhe=6e4;function qa(){const e=tt(),t=q(),n=e.user?.profile?.role==="CANDIDATE",r=ue({queryKey:["candidate-platform-access"],queryFn:async({signal:i})=>(await Be.get("/candidate/platform-access",{headers:t,signal:i})).data,enabled:!!e.isAuthenticated&&n,refetchInterval:Rhe,refetchOnWindowFocus:!0,staleTime:0,retry:1});return{...r,access:r.data,isLocked:r.data?!r.data.unlocked:!1}}async function Ohe(e,t){try{await Be.post("/candidate/platform-access/arrival",{slug:e??""},{headers:t})}catch{}}function vst(){const e=q(),t=tt();return v.useCallback(n=>{t.isAuthenticated&&Ohe(n,e)},[t.isAuthenticated,e])}const wl="asgard.candidate.postInterviewActivation",Ihe=1e3*60*60*24*7;function Yk(){return typeof window>"u"?void 0:window.sessionStorage}function yst(e,t=Yk()){t&&t.setItem(wl,JSON.stringify({completedAt:e.completedAt??new Date().toISOString(),interviewId:e.interviewId,jobTitle:e.jobTitle,companyName:e.companyName,kind:e.kind}))}function xst(e=Yk(),t=Date.now()){if(typeof window<"u"&&e===window.sessionStorage&&window.localStorage.removeItem(wl),!e)return null;const n=e.getItem(wl);if(!n)return null;try{const r=JSON.parse(n),i=Date.parse(r.completedAt);return!r.completedAt||Number.isNaN(i)||t-i>Ihe?(e.removeItem(wl),null):r}catch{return e.removeItem(wl),null}}function bst(e=Yk()){e?.removeItem(wl),typeof window<"u"&&e===window.sessionStorage&&window.localStorage.removeItem(wl)}function wst(e,t){return e.interviewId?new Set(t).has(e.interviewId):!1}const RK=!0,Mhe=["/my-interviews","/interview","/create-resume","/profile-ready","/get-started","/revenuecat-funnel-auth","/account-disabled","/logout"],$he="/my-interviews";function Qk(e,t=RK){return!t||e===void 0?!1:!e}function OK(e,t=Mhe){return t.some(n=>e===n||e.startsWith(n+"/"))}function CM(e,t){return t?e.filter(n=>OK(n.to)):[...e]}const Dhe=["screening_rejected","interview_rejected","shortlist_window_closed"];function Mm(e){return e?Dhe.includes(e):!1}const Oc=["notification-preferences"],Pi=["candidate-notifications"];function Lhe(){const e=q();return ue({queryKey:Pi,queryFn:async({signal:t})=>(await ee.get("/notifications?limit=100",{headers:e,signal:t})).data.notifications??[],staleTime:3e4})}function Fhe(){const e=q(),t=oe();return ie({mutationFn:async()=>{await ee.post("/notifications/read-all",void 0,{headers:e})},onMutate:async()=>{await t.cancelQueries({queryKey:Pi});const n=t.getQueryData(Pi),r=new Date().toISOString();return t.setQueryData(Pi,(i=[])=>i.map(o=>({...o,read_at:o.read_at??r}))),{previous:n}},onError:(n,r,i)=>{i?.previous&&t.setQueryData(Pi,i.previous)},onSettled:()=>
623t.invalidateQueries({queryKey:Pi})})}function Bhe(){const e=q(),t=oe();return ie({mutationFn:async n=>{await ee.post(`/notifications/${encodeURIComponent(n)}/read`,void 0,{headers:e})},onMutate:async n=>{await t.cancelQueries({queryKey:Pi});const r=t.getQueryData(Pi),i=new Date().toISOString();return t.setQueryData(Pi,(o=[])=>o.map(s=>s.notification_id===n?{...s,read_at:s.read_at??i}:s)),{previous:r}},onError:(n,r,i)=>{i?.previous&&t.setQueryData(Pi,i.previous)},onSettled:()=>t.invalidateQueries({queryKey:Pi})})}function _st(){const e=q();return ue({queryKey:Oc,queryFn:async({signal:t})=>(await ee.get("/notification-preferences",{headers:e,signal:t})).data.preferences??[],staleTime:1e3*60})}function Sst(){const e=q(),t=oe();return ie({mutationFn:async({campaign:n,subscribed:r})=>(await ee.put(`/notification-preferences/${encodeURIComponent(n)}`,{subscribed:r},{headers:{...e,"Content-Type":"application/json"}})).data,onMutate:async({campaign:n,subscribed:r})=>{await t.cancelQueries({queryKey:Oc});const i=t.getQueryData(Oc);return t.setQueryData(Oc,o=>o?.map(s=>s.campaign===n?{...s,subscribed:r}:s)??o),{previous:i}},onError:(n,r,i)=>{i?.previous&&t.setQueryData(Oc,i.previous)},onSettled:()=>{t.invalidateQueries({queryKey:Oc})}})}const jst=6048e5,Est=864e5,Fg=43200,NM=1440,PM=Symbol.for("constructDateFrom");function Jk(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&PM in e?e[PM](t):e instanceof Date?new e.constructor(t):new Date(t)}function Aa(e,t){return Jk(t||e,e)}let Uhe={};function zhe(){return Uhe}function kM(e){const t=Aa(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Xk(e,...t){const n=Jk.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function Uv(e,t){const n=+Aa(e)-+Aa(t);return n<0?-1:n>0?1:n}function Vhe(e){return Jk(e,Date.now())}function qhe(e,t,n){const[r,i]=Xk(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),s=r.getMonth()-i.getMonth();return o*12+s}function Khe(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function Whe(e,t){return+Aa(e)-+Aa(t)}function Hhe(e,t){const n=Aa(e,t?.in);return n.setHours(23,59,59,999),n}function Ghe(e,t){const n=Aa(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Yhe(e,t){const n=Aa(e,t?.in);return+Hhe(n,t)==+Ghe(n,t)}function Qhe(e,t,n){const[r,i,o]=Xk(n?.in,e,e,t),s=Uv(i,o),a=Math.abs(qhe(i,o));if(a<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-s*a);let c=Uv(i,o)===-s;Yhe(r)&&a===1&&Uv(r,o)===1&&(c=!1);const u=s*(a-+c);return u===0?0:u}function Jhe(e,t,n){const r=Whe(e,t)/1e3;return Khe(n?.roundingMethod)(r)}const Xhe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Zhe=(e,t,n)=>{let r;const i=Xhe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function eS(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const epe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},tpe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},npe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},rpe={date:eS({formats:epe,defaultWidth:"full"}),time:eS({formats:tpe,defaultWidth:"full"}),dateTime:eS({formats:npe,defaultWidth:"full"})},ipe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ope=(e,t,n,r)=>ipe[e];function Of(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):s;i=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;i=e.values[a]||e.values[s]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const spe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ape={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},lpe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},cpe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
623ay","Saturday"]},upe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},dpe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},fpe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},hpe={ordinalNumber:fpe,era:Of({values:spe,defaultWidth:"wide"}),quarter:Of({values:ape,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Of({values:lpe,defaultWidth:"wide"}),day:Of({values:cpe,defaultWidth:"wide"}),dayPeriod:Of({values:upe,defaultWidth:"wide",formattingValues:dpe,defaultFormattingWidth:"wide"})};function If(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const s=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?mpe(a,f=>f.test(s)):ppe(a,f=>f.test(s));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(s.length);return{value:u,rest:d}}}function ppe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function mpe(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function gpe(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(i.length);return{value:s,rest:a}}}const vpe=/^(\d+)(th|st|nd|rd)?/i,ype=/\d+/i,xpe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},bpe={any:[/^b/i,/^(a|c)/i]},wpe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},_pe={any:[/1/i,/2/i,/3/i,/4/i]},Spe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},jpe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Epe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Cpe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Npe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ppe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},kpe={ordinalNumber:gpe({matchPattern:vpe,parsePattern:ype,valueCallback:e=>parseInt(e,10)}),era:If({matchPatterns:xpe,defaultMatchWidth:"wide",parsePatterns:bpe,defaultParseWidth:"any"}),quarter:If({matchPatterns:wpe,defaultMatchWidth:"wide",parsePatterns:_pe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:If({matchPatterns:Spe,defaultMatchWidth:"wide",parsePatterns:jpe,defaultParseWidth:"any"}),day:If({matchPatterns:Epe,defaultMatchWidth:"wide",parsePatterns:Cpe,defaultParseWidth:"any"}),dayPeriod:If({matchPatterns:Npe,defaultMatchWidth:"any",parsePatterns:Ppe,defaultParseWidth:"any"})},Ape={code:"en-US",formatDistance:Zhe,formatLong:rpe,formatRelative:ope,localize:hpe,match:kpe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Tpe(e,t,n){const r=zhe(),i=n?.locale??r.locale??Ape,o=2520,s=Uv(e,t);if(isNaN(s))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:s}),[c,u]=Xk(n?.in,...s>0?[t,e]:[e,t]),d=Jhe(u,c),f=(kM(u)-kM(c))/1e3,h=Math.round((d-f)/60);let p;if(h<2)return n?.includeSeconds?d<5?i.formatDistance("lessThanXSeconds",5,a):d<10?i.formatDistance("lessThanXSeconds",10,a):d<20?i.formatDistance("lessThanXSeconds",20,a):d<4
6230?i.formatDistance("halfAMinute",0,a):d<60?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",1,a):h===0?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",h,a);if(h<45)return i.formatDistance("xMinutes",h,a);if(h<90)return i.formatDistance("aboutXHours",1,a);if(h<NM){const m=Math.round(h/60);return i.formatDistance("aboutXHours",m,a)}else{if(h<o)return i.formatDistance("xDays",1,a);if(h<Fg){const m=Math.round(h/NM);return i.formatDistance("xDays",m,a)}else if(h<Fg*2)return p=Math.round(h/Fg),i.formatDistance("aboutXMonths",p,a)}if(p=Qhe(u,c),p<12){const m=Math.round(h/Fg);return i.formatDistance("xMonths",m,a)}else{const m=p%12,g=Math.trunc(p/12);return m<3?i.formatDistance("aboutXYears",g,a):m<9?i.formatDistance("overXYears",g,a):i.formatDistance("almostXYears",g+1,a)}}function Rpe(e,t){return Tpe(e,Vhe(e),t)}const Ope=["interview-scheduled:","interview-reminder:","interview-status:","candidate-action:","main-interview-ready:"];function AM(e,t){return e.startsWith(t)&&e.slice(t.length).split(":",1)[0]?.trim()||void 0}function Ipe(e){if(e.deep_link==="/auto-apply/daily"||e.deep_link.startsWith("/auto-apply/daily?"))return{to:"/auto-apply/daily",...e.dedup_key?{search:{batch_id:e.dedup_key,intent:"review"}}:{}};if(e.deep_link.startsWith("/auto-apply")&&e.dedup_key)return{to:"/auto-apply",search:{run_id:e.dedup_key}};if(e.deep_link.startsWith("/my-interviews")){const t=AM(e.dedup_key,"screening-ready:");if(t)return{to:"/my-interviews",search:{round_id:t}};for(const n of Ope){const r=AM(e.dedup_key,n);if(r)return{to:"/my-interviews",search:{interview_id:r}}}}return{to:e.deep_link||"/notifications"}}function Mpe(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":Rpe(t,{addSuffix:!0})}function $pe({notification:e,compact:t=!1,onRead:n}){const r=!!e.body?.trim(),i=Mpe(e.created_at);return l.jsxs(Re,{...Ipe(e),onClick:()=>{e.read_at||n?.(e.notification_id)},className:K("group relative block cursor-pointer rounded-xl border bg-card transition-colors hover:border-primary/40 hover:bg-muted/50 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",t?"px-3 py-3":"p-4 sm:p-5",e.read_at?"border-border":"border-primary/40 bg-primary/10"),children:[!e.read_at&&l.jsx("span",{className:"absolute right-3 top-3 h-2 w-2 rounded-full bg-primary","aria-label":"Unread"}),l.jsxs("div",{className:"pr-5",children:[l.jsx("h2",{className:K("font-bold text-foreground",t?"text-sm":"text-base"),children:e.title}),i&&l.jsx("p",{className:"mt-0.5 text-[11px] font-medium text-muted-foreground",children:i})]}),l.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[l.jsx("div",{className:"min-w-0 flex-1",children:r&&l.jsx("p",{className:K("line-clamp-2 text-muted-foreground",t?"text-xs leading-5":"text-sm leading-6"),children:e.body})}),l.jsx(Ad,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5 group-hover:text-primary"})]})]})}function Ch({initials:e,imageUrl:t,className:n}){return l.jsxs("span",{className:K("relative flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-primary/10 font-bold text-primary",n),children:[e,t&&l.jsx("img",{src:t,alt:"",className:"absolute inset-0 h-full w-full object-cover",onError:r=>{r.currentTarget.style.display="none"}})]})}const Hl=["user-profile"];function IK(e=!0){const t=q();return ue({queryKey:Hl,queryFn:async({signal:n})=>(await ee.get("/user/profile",{headers:t,signal:n})).data,enabled:e,staleTime:1e3*60})}function Cst(){const e=q(),t=oe();return ie({mutationFn:async n=>(await ee.put("/user/profile",n,{headers:e})).data,onSuccess:n=>{t.setQueryData(Hl,n),t.invalidateQueries({queryKey:Hl})}})}function Nst(){const e=q(),t=oe();return ie({mutationFn:async n=>{const r=new FormData;return r.append("image",n,"avatar.jpg"),(await ee.post("/user/profile/image",r,{headers:e})).data},onSuccess:n=>{t.setQueryData(Hl,n),t.invalidateQueries({queryKey:Hl})}})}function Pst(){const e=q(),t=oe();return ie({mutationFn:async()=>(await ee.delete("/user/profile/image",{headers:e})).data,onSuccess:n=>{t.setQueryData(Hl,n),t.invalidateQueries({queryKey:Hl})}})}function MK(e){return e==="fresh"?{start:"fresh"}:{}}function kst(e){return{job:e}}const Dpe="/assets/mark-oNnYSrqu.webp";function ft({size:e=32,spin:t=!1,tile:n=!1,title:r="Asgard",className:i}){const o=r==="",s=l.jsx("img",{src:Dpe,width:e,height:e,alt:o?"":r,"aria-hidden":o||void 0,draggable:!1,style:{width:e,height:e},className:K("block shrink-0 select-none",t&&"motion-safe:animate-tq-spin",!n&&i)});if(!n)return s;const a=Math.round(e/.75);return l.jsx("span",{style:{width:a,height:a,borderRadius:Math.round(a/4)},className:K("grid shrink-0 place-items-center bg-[#383163]",i),children:s})}function $K({size:e,busy:t}){return l.jsx(ft,{size:e,tile:!0,spin:t,title:"asgardhire.ai",className:K("[&>img]:transition-transform [&>img]:duration-[600ms] [&>img]:ease-brand",!t&&"motion-safe:group-hover:[&>img]:rotate-120")})}function Lpe({size:e}){const t=loe()+coe()>0;return l.jsx($K,{size:e,busy:t})}function Zk({size:e=22,className:t,wordmarkClassName:n}){const r=!!v.useContext(JP);return l.jsxs("span",{className:K("group flex shrink-0 items-center gap-2.5",t),children:[r?l.jsx(Lpe,{size:e}):l.jsx($K,{size:e,busy:!1}),l.jsx("span",{className:K("text-lg font-extrabold tracking-[-0.03em] sm:text-xl",n),children:"asgardhire.ai"})]})}const DK="ah-theme";function eA(){try{const e=localStorage.getItem(DK);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"light"}function Fpe(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches}
623function Bpe(e){return e==="system"?Fpe()?"dark":"light":e}function LK(e){const t=Bpe(e),n=document.documentElement;n.classList.toggle("dark",t==="dark"),n.style.colorScheme=t}function Upe(e){try{localStorage.setItem(DK,e)}catch{}LK(e)}function FK(){LK(eA())}function zpe(){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};const e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{eA()==="system"&&FK()};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}function TM(){return typeof document<"u"&&document.documentElement.classList.contains("dark")?"dark":"light"}function Ast(){const[e,t]=v.useState(TM),n=v.useRef(e);return n.current=e,v.useEffect(()=>{const r=()=>{const o=TM();o!==n.current&&(n.current=o,t(o))};r();const i=new MutationObserver(r);return i.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>i.disconnect()},[]),e}function BK({className:e}){const[t,n]=v.useState("light");v.useEffect(()=>n(eA()),[]);const r=t==="dark"||t==="system"&&typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: dark)").matches,i=r?"light":"dark";return l.jsx("button",{type:"button",onClick:()=>{Upe(i),n(i)},"aria-label":`Switch to ${i} theme`,title:`Switch to ${i} theme`,className:K("inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground","transition-colors duration-fast ease-brand hover:bg-muted hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),children:r?l.jsx(qse,{className:"h-4 w-4 shrink-0","aria-hidden":!0}):l.jsx(Dse,{className:"h-4 w-4 shrink-0","aria-hidden":!0})})}function Tst(e,t){const n=q();return ue({queryKey:["cv-theme",e,t],queryFn:async({signal:r})=>{try{const o=(await ee.get(`/parsed-cvs/${encodeURIComponent(e??"")}/${encodeURIComponent(t??"")}`,{headers:n,signal:r})).data?.data?.theme;return o&&typeof o=="object"&&o.layout&&o.id?o:null}catch{return null}},enabled:!!(e&&t),staleTime:1e3*60*5})}function fc(e=!0){const t=q();return ue({queryKey:["user-cvs"],queryFn:async({signal:n})=>{const r=await ee.get("/user/cvs",{headers:t,signal:n});return Array.isArray(r.data)?r.data:[]},enabled:e,staleTime:1e3*60*2})}function Rst(e){const t=q(),n=oe();return ie({mutationFn:async r=>{if(!e)throw new Error("Not signed in");return(await ee.post(`/parsed-cvs/${encodeURIComponent(e)}/${encodeURIComponent(r)}/primary`,{},{headers:t})).data},onMutate:async r=>{await n.cancelQueries({queryKey:["user-cvs"]});const i=n.getQueryData(["user-cvs"]);return i&&n.setQueryData(["user-cvs"],i.map(o=>({...o,is_primary:o.cv_id===r}))),{previous:i}},onError:(r,i,o)=>{o?.previous&&n.setQueryData(["user-cvs"],o.previous)},onSettled:()=>{n.invalidateQueries({queryKey:["user-cvs"]}),n.invalidateQueries({queryKey:["cv-completion"]}),n.invalidateQueries({queryKey:["enhance-status"]})}})}function Ost(){const e=q(),t=oe();return ie({mutationFn:async({signal:n,...r})=>(await ee.post("/cv/generate",r,{headers:e,timeout:9e4,signal:n})).data,onSuccess:n=>{t.invalidateQueries({queryKey:["document",n.document_id]})}})}function Ist(){const e=q(),t=oe();return ie({mutationFn:async({signal:n,...r})=>(await ee.post("/cover-letter/generate",r,{headers:e,timeout:9e4,signal:n})).data,onSuccess:n=>{t.invalidateQueries({queryKey:["document",n.document_id]})}})}function Mst(){const e=q();return ie({mutationFn:async({signal:t,...n})=>(await ee.post("/cover-letter/generate-standalone",n,{headers:e,timeout:9e4,signal:t})).data})}function $st(e){const t=q();return ue({queryKey:["user-cv-detail",e],queryFn:async({signal:n})=>(await ee.get(`/user/cvs/${encodeURIComponent(e)}`,{headers:t,signal:n,timeout:3e4})).data,enabled:!!e,staleTime:0,retry:1})}function Dst(e,t){const n=q();return ue({queryKey:["document",e],queryFn:async({signal:r})=>(await ee.get(`/documents/${encodeURIComponent(e)}`,{headers:n,signal:r,timeout:3e4})).data,enabled:!!e,staleTime:0,retry:1,refetchInterval:t?.refetchInterval})}const $m=["my-documents"];function Lst(e=!0){const t=q();return ue({queryKey:$m,queryFn:async({signal:n})=>{try{const r=await ee.get("/documents",{headers:t,signal:n,timeout:3e4});return{documents:Array.isArray(r.data?.documents)?r.data.documents:[],available:!0}}catch(r){const i=r?.response?.status;if(i===404||i===405)return{documents:[],available:!1};throw r}},enabled:e,staleTime:1e3*30,retry:1})}
623function Fst(){const e=q(),t=oe();return ie({mutationFn:async n=>{const r={title:n.title,content:n.content};n.cv_id&&(r.cv_id=n.cv_id),n.job_id&&(r.job_id=n.job_id);const o=(await ee.post("/documents/cover-letters",r,{headers:e,timeout:3e4})).data;return o?.document??o},onSuccess:()=>{t.invalidateQueries({queryKey:$m})}})}function Bst(){const e=q(),t=oe();return ie({mutationFn:async({id:n,...r})=>(await ee.patch(`/documents/${encodeURIComponent(n)}`,r,{headers:e})).data,onSuccess:(n,r)=>{t.invalidateQueries({queryKey:$m}),t.invalidateQueries({queryKey:["document",r.id]})}})}function Ust(){const e=q(),t=oe();return ie({mutationFn:async n=>(await ee.delete(`/documents/${encodeURIComponent(n)}`,{headers:e}),n),onSuccess:n=>{t.setQueryData($m,r=>r&&{...r,documents:r.documents.filter(i=>i.document_id!==n)}),t.removeQueries({queryKey:["document",n]}),t.invalidateQueries({queryKey:["user-cvs"]})}})}function zst(e){const t=q(),n=oe();return ie({mutationFn:async r=>{if(!e)throw new Error("Not signed in");return await ee.delete(`/parsed-cvs/${encodeURIComponent(e)}/${encodeURIComponent(r)}`,{headers:t}),r},onSuccess:r=>{n.setQueryData(["user-cvs"],i=>i?.filter(o=>o.cv_id!==r)),n.invalidateQueries({queryKey:["user-cvs"]}),n.invalidateQueries({queryKey:["cv-completion"]}),n.invalidateQueries({queryKey:["parsed-cvs"]}),n.invalidateQueries({queryKey:["jobs-recommendations"]}),n.invalidateQueries({queryKey:$m})}})}const Vpe=["COMPLETED","PARTIAL"];function UK(e){return Vpe.includes(e)}function Vst(e){return!!e?.some(t=>UK(t.status))}function qst(e){if(!e||e.length===0)return"not_started";const t=e.filter(n=>UK(n.status));return t.length>0?t.every(n=>n.status==="COMPLETED")?"completed":"partial":e.some(tA)?"in_progress":e.some(zK)?"failed":"in_progress"}const qpe=["PENDING","RUNNING"];function tA(e){return qpe.includes(e.status??"")}function zK(e){return e.status==="FAILED"}function Kst(e){return(e??[]).some(t=>!!t.custom_transcript)}function Kpe(e,t){return t?e.filter(n=>!n.interview_id||n.interview_id===t):e}const Wpe=30*60*1e3;function Hpe(e,t,n=Date.now()){return e?.some(tA)?n-t<Wpe:!1}function Wst(e,t){if(!t)return 0;const n=e.indexOf(t);if(n>=0)return n;if(t.startsWith("round-")){let r=-1;if(e.forEach((i,o)=>{i.startsWith("round-")&&(r=o)}),r>=0)return r}return 0}function Hst(e){const t=n=>n.started_at?new Date(n.started_at).getTime():0;return e.slice().sort((n,r)=>(n.round_number??0)-(r.round_number??0)||t(n)-t(r))}function Gst(e,t){return tA(e)?`Round ${t} · Evaluatingâ¦`:zK(e)?`Round ${t} · Failed`:e.evaluation_source==="CUSTOM_TRANSCRIPT"?`Round ${t} · Uploaded transcript`:`Round ${t} · AI interview`}function Yst(e,t){return e!==void 0?e:Gpe(t)}function Gpe(e){return!!e?.some(t=>t.data?.some(n=>n.hasSecondRound))}function tS(e,t){const n=Math.round(e),r=Math.round(t),i=r-n,o=i>0?`+${i}`:i<0?`â${Math.abs(i)}`:"±0";return{from:n,to:r,delta:i,label:o}}function Qst(e){const t=[];return e.round1Score!=null&&e.overallScore!=null&&t.push({name:"Overall score",...tS(e.round1Score,e.overallScore)}),t.push({name:"Job fit",...tS(e.x,e.x)}),e.round1CultureFit!=null&&t.push({name:"Culture fit",...tS(e.round1CultureFit,e.y)}),t}async function Ype({jdId:e,search:t,candidateStatus:n,stage:r,stages:i,hasDecision:o,sortBy:s,sortDir:a,page:c,limit:u,headers:d}){return(await ee.post("/search-candidates",{jd_id:e,page:c,limit:u,search:t,candidate_status:n,stage:r,...i&&i.length>0?{stages:i}:{},...o===void 0?{}:{has_decision:o},sort_by:s,sort_dir:a},{headers:d})).data}const VK="candidate-search",Jst=({jdId:e,search:t="",decision:n="all",stage:r="all",stages:i,hasDecision:o,sortBy:s,sortDir:a,page:c=1,limit:u=10})=>{const d=q();return ue({queryKey:[VK,e,t,n,r,i?[...i].join(","):"",o===void 0?"":String(o),s,a,c,u],queryFn:()=>Ype({jdId:e,search:t,candidateStatus:n==="all"?"":n,stage:r==="all"?"":r,stages:i,hasDecision:o,sortBy:s,sortDir:a,page:c,limit:u,headers:d}),enabled:!!e,staleTime:3e4,placeholderData:f=>f})},Qpe=async({candidateId:e,jdId:t,headers:n})=>(await ee.get(`/candidates/${e}/jobs/${t}`,{headers:n})).data,Xst=({candidateId:e,jdId:t})=>{const n=q(),r=v.useRef(Date.now());return ue({queryKey:["candidate",e],queryFn:async()=>Qpe({candidateId:e,jdId:t,headers:n}),refetchInterval:i=>{const o=i.state.data,s=Kpe(o?.interview_rounds??[],o?.interview_id);return Hpe(s,r.current)?1e4:!1}})},Zst=e=>{const t=q();return ie({mutationFn:async n=>(await ee.put("/interviews/candidate-status",n,{headers:t})).data,...e})},nA=e=>{const t=q();return ue({queryKey:["candidate-interviews"],enabled:e?.enabled??!0,queryFn:async()=>{const n=await Be.get("/candidate/interviews",{headers:t});return Array.isArray(n.data)?n.data:[]}})},eat=({interviewId:e})=>{const t=q();return ue({queryKey:["draft-interview",e],queryFn:async()=>(await Be.get(`/interviews/${e}`,{headers:t})).data,enabled:!!e})},tat=()=>{const e=q();return ie({mutationFn:async({interviewId:t})=>{await ee.delete(`/interviews/${t}/candidate`,{headers:e})},onSuccess(){Q.success("Candidate deleted successfully")},onError(){Q.error("Failed to delete candidate")}})},nat=()=>{const e=q();return ie({mutationFn:async({interviewId:t,emailSubject:n,emailBody:r})=>{await ee.post(`/interviews/${t}/reset`,{email_subject:n,email_body:r},{headers:e})},onSuccess(){Q.success("Interview reset successfully")},onError(){Q.error("Failed to reset interview")}})},rat=()=>{const e=q();return ie({mutationFn:async({interviewId:t,orgId:n,emailSubject:r,emailBody:i})=>{await Be.post(`/orgs/${n}/interviews/${t}/resend-invite`,{email_subject:r,email_body:i},{headers:e})},onSuccess(){Q.success("Invitation resent successfully")},onError(){Q.error("Failed to resend invitation")}})},rA="asgard.tour.v1";function qK(e,t){return`${rA}.${e}.${t}`}function dp(e,t){if(!t)return!0;try{return window.localStorage.getItem(qK(e,t))!==null}catch{return!0}}function RM(e,t,n,r=new Date){if(t)try{window.localStorage.setItem(qK(e,t),JSON.stringify({outcome:n,at:r.toISOString()}))}catch{}}let Xc=null;const aE=new Set;
623function KK(){aE.forEach(e=>e())}function lE(e){Xc=e,KK()}function Jpe(){return Xc}function Xpe(e){if(Xc===null||!e.includes(Xc))return null;const t=Xc;return Xc=null,KK(),t}function Zpe(e){return aE.add(e),()=>{aE.delete(e)}}function eme(){return v.useSyncExternalStore(Zpe,Jpe,()=>null)}const WK=new Set;function HK(e){return`${rA}.dueAfterWelcome.${e}`}function tme(e){if(e){try{window.localStorage.setItem(HK(e),"1")}catch{}WK.forEach(t=>t())}}function nme(e){if(e){try{window.localStorage.removeItem(HK(e))}catch{}WK.forEach(t=>t())}}function GK(e){return`${rA}.candidateAutoShown.${e}`}function rme(e){if(!e)return!0;try{return window.localStorage.getItem(GK(e))!==null}catch{return!0}}function ime(e,t=new Date){if(e)try{window.localStorage.setItem(GK(e),t.toISOString())}catch{}}const ome=3;function OM(e){if(typeof e!="string"||!e)return null;const t=Date.parse(e);return Number.isFinite(t)?t:null}function sme(e,t=new Date){const n=t.getTime()-ome*24*60*60*1e3,r=[];for(const i of e.cvs??[])r.push(OM(i?.uploaded_at));if(Array.isArray(e.interviews))for(const i of e.interviews)r.push(OM(i?.created_at));return r.some(i=>i!==null&&i<n)}function ame(e){return!e.userId||e.established||rme(e.userId)?!1:!dp("candidate-cold",e.userId)&&!dp("candidate-invited",e.userId)}function iA(e){const n=(e.status||e.generation_status||e.interview_status||"").toLowerCase();if(n==="screening_pre_screen"){const r=e.screening_round?.status;return r==="in_progress"||r==="completed"?"screening":"screening-interview"}return n==="screening_in_review"?"under-review":n==="screening_rejected"?"screening-rejected":n==="screening"?"screening":n==="completed"||e.protected?"completed":n==="in_progress"||n==="in-progress"?"in-progress":e.expires_at&&new Date(e.expires_at)<new Date?"expired":"pending"}function iat(e){if(!e)return null;const t=new Date(e),n=new Date,r=t.getTime()-n.getTime();return Math.ceil(r/(1e3*60*60*24))}function oat(e){return e?new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"-"}function lme(e){return e.jd_title?e.jd_title:e.job_description&&e.job_description.length>60?e.job_description.slice(0,60)+"â¦":e.job_description||"Interview"}function sat(e,t){return e?e.split(" ").slice(0,2).map(n=>n[0]).join("").toUpperCase():t&&t.length>0?t.charAt(0).toUpperCase():"?"}function cme(e){return Array.isArray(e)?e.filter(t=>{const n=iA(t);return n==="pending"||n==="screening-interview"}).length:0}const IM={id:"recruiter-home",label:"Tour of AsgardHire for recruiters",homes:["/overview","/jd-list"],steps:[{id:"create-job",anchors:["rec-create-job","rec-nav-jobs","rec-menu"],title:"Create a job",body:"Start by writing the role. We build the trait rubric that each interview is scored against."},{id:"invite",anchors:["rec-nav-jobs","rec-menu"],title:"Invite candidates",body:"Open a job, go to Candidates and choose Invite. Each candidate gets an interview link by email."},{id:"review",anchors:["rec-stats","rec-nav-jobs","rec-menu"],title:"Review results",body:"Finished interviews show here and on each job. Open a candidate to see a score for each trait, with the evidence."},{id:"reports",anchors:["rec-nav-reports","rec-menu"],title:"Where reports live",body:"Reports holds the report for every candidate and every role, ready to share with your team."},{id:"replay",anchors:["rec-account","rec-menu"],title:"See this again",body:"Choose Show me around in your account menu to replay this tour."}]};function ume(e){const t=IM.homes.filter(n=>n!==e);return{...IM,homes:[e,...t]}}const zv={id:"candidate-invited",label:"Tour for your interview",homes:["/my-interviews","/dashboard"],steps:[{id:"interview",anchors:["interview-start","interview-list","dash-tile-interviews"],title:"Do your interview first",body:"The recruiter is waiting for this interview. Check your camera and microphone, then start when you are ready."},{id:"cv",anchors:["nav-cv","nav-menu"],title:"Your CV",body:"Add or update your CV here. It goes with your interview to the recruiter."},{id:"after",anchors:[],title:"After your interview",body:"You can also search jobs, get match reports and use auto-apply. Would you like a quick tour of job search?"}]},dme={id:"after",anchors:[],title:"After your interview",body:"Job search, match reports and auto-apply open once the recruiter has reviewed your interview."},cE={id:"candidate-cold",label:"Tour of your dashboard",homes:["/dashboard"],steps:[{id:"upload",anchors:["dash-setup-upload-cv","dash-setup"],title:"Upload your CV",body:"Start here. We read your CV to find jobs that fit you."},{id:"primary",anchors:["dash-setup-primary-cv","dash-setup"],title:"Make it your primary CV",body:"If you have more than one CV, the primary one drives your job matches and auto-apply."},{id:"locations",anchors:["dash-setup-locations","dash-setup"],title:"Cho
623ose where you want to work",body:"Pick countries and cities. Your matches follow them."},{id:"matches",anchors:["dash-tile-jobs","dash-matches"],title:"Your first matches",body:"Jobs ranked against your primary CV show here. Open one to see why it fits."},{id:"auto-apply",anchors:["dash-tile-auto-apply"],title:"Meet auto-apply",body:"Add jobs to your queue and auto-apply sends the applications for you."},{id:"bring-job",anchors:["dash-bring-job","dash-matches"],title:"Bring your own job",body:"Found a job somewhere else? Paste it in to get a CV and cover letter written for it."}]};function fme(e){const t=e.access;if(t?.unlocked===!1)return"candidate-invited";const n=!!t?.locked_reason||!!t?.source_jd_id||Mm(t?.unlock_reason);return e.pendingRecruiterInterviews>0&&(n||e.cvCount===0)?"candidate-invited":"candidate-cold"}function hme(e){return e.seen||!e.ready?!1:e.tour.homes.includes(e.pathname)}function pme(e,t){return e.homes.includes(t)}const mme=5,qn={upload:{id:"upload",anchors:["dash-setup-upload-cv","nav-documents","nav-menu"],title:"Add your CV",body:"Start here. We read your CV to find jobs that fit you."},mainCv:{id:"main-cv",anchors:["dash-setup-primary-cv","nav-documents"],title:"Choose your main CV",body:"We use your main CV to find your jobs and to apply for you."},locations:{id:"locations",anchors:["dash-setup-locations","dash-locations","dash-setup"],title:"Choose where you want to work",body:"Pick countries and cities. Your jobs follow them."},matches:{id:"matches",anchors:["dash-matches"],title:"Your matches",body:"Jobs that fit your main CV show here. Open one to see why it fits."},jobs:{id:"jobs",anchors:["nav-jobs"],title:"Jobs",body:"Search every job here. You can also add a job you found somewhere else."},applications:{id:"applications",anchors:["nav-applications"],title:"My jobs",body:"Jobs you saved, made a CV for or applied to, and the jobs we apply to for you."},applyForMe:{id:"applications",anchors:["nav-applications"],title:"Let us apply for you",body:"Choose Apply for me on a job and we send the application. Follow it in My jobs."},interviews:{id:"interviews",anchors:["nav-interviews"],title:"Interviews",body:"Your interviews, and practice interviews for any job."},documents:{id:"documents",anchors:["nav-documents"],title:"My CV",body:"Your CVs. Improve your CV or tailor it to a job. Your cover letters are here too."},interviewFirst:{id:"interview",anchors:["interview-start","interview-list","nav-interviews"],title:"Do your interview first",body:"The recruiter is waiting for this interview. Check your camera and microphone, then start when you are ready."},invitedCv:{id:"cv",anchors:["nav-documents","nav-menu"],title:"Your CV",body:"Add your CV here. It goes to the recruiter with your interview."}},gme={id:"after",anchors:[],title:"After your interview",body:"You can also search jobs and let us apply for you. Would you like a quick tour of job search?"},vme={id:"after",anchors:[],title:"After your interview",body:"Job search and auto-apply open once the recruiter has reviewed your interview."};function yme(e,t){switch(e.id){case"upload":case"cv":return t.cvCount>0;case"main-cv":return t.cvCount===0||t.hasMainCv;case"locations":return t.locationCount===null||t.locationCount>0;case"matches":return t.cvCount===0;case"interview":return t.pendingInterviews===0;default:return!1}}function MM(e){let t,n;e.kind==="candidate-invited"?(t=zv,n=[qn.interviewFirst,qn.invitedCv,e.locked?vme:gme]):e.decidedArrival?(t=cE,n=[qn.matches,qn.applyForMe,qn.interviews,qn.documents,qn.jobs]):(t=cE,n=[qn.upload,qn.mainCv,qn.locations,qn.matches,qn.jobs,qn.applications,qn.interviews,qn.documents]);const r=n.filter(i=>e.decidedArrival&&i.id==="matches"?!0:!yme(i,e));return{...t,steps:r.slice(0,mme)}}function aat(e=typeof window<"u"?window.location.hostname:""){return e==="localhost"||e==="127.0.0.1"||e.startsWith("dev.")}function bw(){return"cloud"}function xme(){return"cloud"}function lat(){}function cat(e){return e.recording_url?"stored":e.cloud_session_id?"cloud":null}function YK(e){return`/auto-apply/runs/${encodeURIComponent(e)}/replay`}function uat(e,t){return`${YK(e)}/${encodeURIComponent(t)}`}function oA(e=!0){const t=q();return ue({queryKey:["auto-apply-profile"],queryFn:async({signal:n})=>(await ee.get("/auto-apply/profile",{headers:t,signal:n})).data??{},enabled:e,staleTime:1e3*60})}function bme(){const e=q(),t=oe();return ie({mutationFn:async n=>(await ee.put("/auto-apply/profile",n,{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:["auto-apply-profile"]})}})}function dat({enabled:e=!0}={}){const t=q();return ue({queryKey:["auto-apply-has-cv"],queryFn:async({signal:n})=>{const r=await ee.get("/user/cvs",{headers:t,signal:n});return Array.isArray(r.data)&&r.data.length>0},enabled:e,staleTime:1e3*60})}const Vy=2500,wme=6e4,_me=new Set(["SUCCEEDED","FAILED","BLOCKED","CANCELLED","EXPIRED"]);function Sme(e){return _me.has(e)}function fat(){const e=q();return ue({queryKey:["auto-apply-connected-providers"],queryFn:async({signal:t})=>(await ee.get("/auto-apply/connected-providers",{headers:e,signal:t})).data?.providers??[],refetchInterval:Vy})}function jme(e=!0){const t=q();
623return ue({queryKey:["auto-apply-pool"],enabled:e,queryFn:async({signal:n})=>(await ee.get("/auto-apply/pool",{headers:t,signal:n})).data?.pool??[]})}function hat(){const e=q(),t=oe();return ie({mutationFn:async n=>(await ee.post("/auto-apply/pool",n,{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:["auto-apply-pool"]})}})}function pat(){const e=q(),t=oe();return ie({mutationFn:async n=>(await ee.delete(`/auto-apply/pool/${encodeURIComponent(n)}`,{headers:e}),n),onSuccess:()=>{t.invalidateQueries({queryKey:["auto-apply-pool"]})}})}class Eme extends Error{appliedCount;constructor(t){super("insufficient auto-apply credits"),this.name="InsufficientCreditsError",this.appliedCount=t}}class Cme extends Error{quote;constructor(t){super("auto-apply cost changed"),this.name="CostChangedError",this.quote=t}}class Nme extends Error{jobId;runId;status;constructor(t,n,r){super("auto-apply run already exists for this job"),this.name="DuplicateRunError",this.jobId=t,this.runId=n,this.status=r}}class Pme extends Error{constructor(){super("auto-apply is paused"),this.name="AutoApplyPausedError"}}class kme extends Error{constructor(){super("this job is temporarily unavailable"),this.name="JobUnavailableError"}}function ww(e){const t=e.response;if(t?.status===402){const n=t.data?.applied??[];throw new Eme(n.length)}throw t?.status===409&&t.data?.error==="cost_changed"&&t.data.quote?new Cme(t.data.quote):t?.status===409&&t.data?.error==="auto_apply_paused"?new Pme:t?.status===409&&t.data?.error==="duplicate_run"?new Nme(t.data.job_id??"",t.data.run_id??"",t.data.status??""):t?.status===409&&t.data?.reason==="JOB_TEMPORARILY_UNAVAILABLE"?new kme:e}function mat(){const e=q(),t=oe();return ie({mutationFn:async({jobIds:n,acknowledgedCost:r,acknowledgementState:i})=>{try{const o=await ee.post("/auto-apply/pool/apply",{job_ids:n,presubmit_review:!1,executor_preference:bw(),entry_point:"auto_apply_page",...r!==void 0?{acknowledged_cost:r}:{},...i?{acknowledgement_state:i}:{}},{headers:e});return{applied:o.data?.applied??[],skipped:o.data?.skipped??[]}}catch(o){ww(o)}},onSettled:()=>
623{t.invalidateQueries({queryKey:["auto-apply-pool"]}),t.invalidateQueries({queryKey:["auto-apply-runs"]})}})}function gat(){const e=q(),t=oe();return ie({mutationFn:async({job:n,entryPoint:r,acknowledgedCost:i,acknowledgementState:o})=>{try{return(await ee.post("/auto-apply/apply-job",{job_id:n.job_id,job_url:n.job_url,...n.title?{title:n.title}:{},...n.company?{company:n.company}:{},...n.location?{location:n.location}:{},executor_preference:xme(),entry_point:r,...i!==void 0?{acknowledged_cost:i}:{},...o?{acknowledgement_state:o}:{}},{headers:e})).data}catch(s){ww(s)}},onSettled:()=>{t.invalidateQueries({queryKey:["auto-apply-pool"]}),t.invalidateQueries({queryKey:["auto-apply-runs"]}),t.invalidateQueries({queryKey:["candidate-billing-status"]})}})}function vat(){const e=q(),t=oe();return ie({mutationFn:async({jobUrl:n})=>{const r=`dev-manual-${crypto.randomUUID()}`,i=new URL(n).hostname;return await ee.post("/auto-apply/pool",{job_id:r,job_url:n,title:i,company:"Manual dev URL"},{headers:e}),(await ee.post("/auto-apply/pool/apply",{job_ids:[r],presubmit_review:!1,executor_preference:bw()},{headers:e})).data?.applied?.[0]},onSettled:()=>
623{t.invalidateQueries({queryKey:["auto-apply-pool"]}),t.invalidateQueries({queryKey:["auto-apply-runs"]})}})}function Ame(e,t){return!e||e.length===0?!1:e.some(r=>!Sme(r.status))||e.some(r=>{if(r.recording_url||!r.completed_at)return!1;const i=Date.parse(r.completed_at);return!Number.isNaN(i)&&t-i<wme})?Vy:!1}function Tme(e=!0){const t=q();return ue({queryKey:["auto-apply-runs"],enabled:e,queryFn:async({signal:n})=>(await ee.get("/auto-apply/runs",{headers:t,signal:n})).data?.runs??[],refetchInterval:n=>Ame(n.state.data,Date.now())})}function yat(e,t){const n=q();return ue({queryKey:["auto-apply-runs",e,"events"],queryFn:async({signal:r})=>(await ee.get(`/auto-apply/runs/${encodeURIComponent(e)}/events`,{headers:n,signal:r})).data?.events??[],enabled:!!e,refetchInterval:t?Vy:!1})}function xat(){const e=q(),t=oe();return ie({mutationFn:async n=>(await ee.delete(`/auto-apply/runs/${encodeURIComponent(n)}`,{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:["auto-apply-runs"]})}})}function bat(){const e=q(),t=oe();return ie({mutationFn:async({runId:n,action:r})=>(await ee.post(`/auto-apply/runs/${encodeURIComponent(n)}/handback`,{action:r},{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:["auto-apply-runs"]})}})}function wat(){const e=q(),t=oe();return ie({mutationFn:async({runId:n,acknowledgedCost:r,acknowledgementState:i})=>{try{return(await ee.post(`/auto-apply/runs/${encodeURIComponent(n)}/retry`,{executor_preference:bw(),...r!==void 0?{acknowledged_cost:r}:{},...i?{acknowledgement_state:i}:{}},{headers:e})).data}catch(o){ww(o)}},onSuccess:()=>{t.invalidateQueries({queryKey:["auto-apply-runs"]})}})}function _at(e,t){const n=q();return ue({queryKey:["auto-apply-runs",e,"recording"],queryFn:async({signal:r})=>(await ee.get(`/auto-apply/runs/${encodeURIComponent(e)}/recording`,{headers:n,signal:r})).data?.url??null,enabled:t&&!!e,staleTime:1e3*60,retry:!1})}function Sat(e,t){const n=q();return ue({queryKey:["auto-apply-runs",e,"replay-tabs"],queryFn:async({signal:r})=>(await ee.get(YK(e),{headers:n,signal:r})).data?.pages??[],enabled:t&&!!e,retry:!1})}function jat(){const e=q();return ue({queryKey:["auto-apply-mailbox"],queryFn:async({signal:t})=>[...(await ee.get("/auto-apply/mailbox",{headers:e,signal:t})).data??[]].sort((r,i)=>new Date(i.received_at).getTime()-new Date(r.received_at).getTime()),staleTime:1e3*30})}function Eat(){const e=q(),t=oe();return ie({mutationFn:async n=>(await ee.delete(`/auto-apply/mailbox/${encodeURIComponent(n)}`,{headers:e}),n),onSuccess:()=>{t.invalidateQueries({queryKey:["auto-apply-mailbox"]})}})}function Cat(e){const t=q();return ue({queryKey:["auto-apply-mailbox",e],queryFn:async({signal:n})=>(await ee.get(`/auto-apply/mailbox/${encodeURIComponent(e??"")}`,{headers:t,signal:n})).data,enabled:!!e,staleTime:1e3*60*5,retry:!1})}function Rme(e=!0){const t=q();return ue({queryKey:["auto-apply-daily-settings"],queryFn:async({signal:n})=>(await ee.get("/auto-apply/daily/settings",{headers:t,signal:n})).data,enabled:e,staleTime:1e3*30})}function Nat(){const e=q(),t=oe();return ie({mutationFn:async n=>(await ee.put("/auto-apply/daily/settings",n,{headers:e})).data,onSuccess:n=>{t.setQueryData(["auto-apply-daily-settings"],n),t.invalidateQueries({queryKey:["auto-apply-daily-today"]})}})}function Ome(e=!0){const t=q();return ue({queryKey:["auto-apply-daily-today"],queryFn:async({signal:n})=>(await ee.get("/auto-apply/daily/today",{headers:t,signal:n})).data??{items:[],pending_count:0},enabled:e,staleTime:1e3*15})}function Pat(){const e=q(),t=oe();return ie({mutationFn:async n=>(await ee.post(`/auto-apply/daily/items/${encodeURIComponent(n)}/skip`,{},{headers:e})).data,onSettled:()=>{t.invalidateQueries({queryKey:["auto-apply-daily-today"]}
623),t.invalidateQueries({queryKey:["auto-apply-pool"]})}})}function kat(){const e=q(),t=oe();return ie({mutationFn:async({jobIds:n,acknowledgedCost:r,acknowledgementState:i})=>{try{return(await ee.post("/auto-apply/daily/approve",{...n&&n.length>0?{job_ids:n}:{},executor_preference:bw(),...r!==void 0?{acknowledged_cost:r}:{},...i?{acknowledgement_state:i}:{}},{headers:e})).data?.applied??[]}catch(o){ww(o)}},onSettled:()=>{t.invalidateQueries({queryKey:["auto-apply-daily-today"]}),t.invalidateQueries({queryKey:["auto-apply-pool"]}),t.invalidateQueries({queryKey:["auto-apply-runs"]})}})}function Vv(e){return e.length<=1?e[0]??"":`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`}function Bg(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function $M(e){const t=typeof e=="number"?e:typeof e=="string"?Number(e):NaN;return Number.isInteger(t)&&t>0?t:void 0}function DM(e){return typeof e=="string"?e.trim():""}function sA(e){const n=Bg(Bg(e)?.application)?.search_locations;if(!Array.isArray(n))return[];const r=[];for(const i of n){const o=Bg(i);if(!o)continue;const s=$M(o.country_id),a=DM(o.country_name);if(!s&&!a)continue;const c=new Set,u=[];for(const d of Array.isArray(o.cities)?o.cities:[]){const f=Bg(d),h=$M(f?.city_id??f?.id),p=DM(f?.city_name??f?.name);!h||!p||c.has(h)||(c.add(h),u.push({id:h,name:p}))}r.push({...s?{countryId:s}:{},countryName:a,cities:u})}return r}function Aat(e,t){const n=new Map,r=new Map;for(const s of t??[])n.set(s.name.trim().toLowerCase(),s),r.set(s.id,s);const i=new Set,o=[];for(const s of e){const a=s.countryId??n.get(s.countryName.toLowerCase())?.id;!a||i.has(a)||(i.add(a),o.push({...s,countryId:a,countryName:s.countryName||r.get(a)?.name||""}))}return o}function Tat(e){return e.some(t=>!t.countryId)}function Rat(e,t){if(e.length===0)return;const n=e.map(o=>o.countryId),r=e.flatMap(o=>o.cities.map(s=>s.id));return r.length===0?{country_ids:n}:t==="profile_v2"?{country_ids:n,city_ids:r}:e.every(o=>o.cities.length>0)?{country_ids:n,city_ids:r}:{country_ids:n}}const Ime={"united kingdom":"UK","united kingdom of great britain and northern ireland":"UK","united states":"US","united states of america":"US","united arab emirates":"UAE"};function _w(e){return Ime[e.trim().toLowerCase()]??e.trim()}const Mme=new Set(["uk","us","uae","netherlands","philippines","czech republic"]);function $me(e){const t=_w(e);return Mme.has(t.toLowerCase())?`the ${t}`:t}const qy=5;function Dme(e){const t=e.filter(r=>r.country.trim()||r.cities.length>0),n=[];if(t.forEach((r,i)=>{const o=_w(r.country);if(r.cities.length===0){o&&n.push(o);return}for(const s of r.cities)n.push(i===0||!o?s:`${s}, ${o}`)}),n.length>qy){const r=n.slice(0,qy-1),i=n.length-r.length;return`${r.join(", ")} and ${i} more places`}return Vv(n)}function Oat(e){const t=Dme(e);return t?`in ${t}`:""}const Lme=60;function Fme(e){return e.length<=2?e.join(" and "):`${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}`}function Iat(e){const t=e.map(f=>({country:_w(f.country),cities:f.cities.filter(h=>h.trim())})).filter(f=>f.country||f.cities.length>0),n=[...t.flatMap(f=>f.cities.map(h=>({country:f.country,city:h}))),...t.filter(f=>f.cities.length===0).map(f=>({country:$me(f.country)}))];if(n.length===0)return"";const r=n.length>qy?n.slice(0,qy-1):n,i=n.length-r.length,o=new Map,s=[];for(const f of r){if(f.city===void 0){s.push(f.country);continue}const h=o.get(f.country)??[];h.push(f.city),o.set(f.country,h)}const a=[];for(const[f,h]of o)a.push(f?`${Vv(h)} (${f})`:Vv(h));if(o.size===0&&i>0)return`anywhere in ${s.join(", ")} and ${i} more countries`;s.length&&a.push(`anywhere in ${Vv(s)}`),i>0&&a.push(`${i} more places`);const c=Fme(a),u=o.size>0?`in ${c}`:c;if(t.some(f=>f.cities.length>0)&&i===0){const f=`${u} plus remote jobs`;if(f.length<=Lme)return f}return u}function aA(e){return(e??[]).some(t=>t.is_primary)}function QK(e,t=!1){const n=e??[],r=n[n.length-1],i=r?.total_is_lower_bound===!0,o=Bme(r?.matching_total,r?.total,r?.pagination?.total);return o!==void 0?{count:o,lowerBound:i}:{count:n.reduce((a,c)=>a+(c.data?.length??0),0),lowerBound:t}}function Bme(...e){for(const t of e)if(typeof t=="number"&&Number.isFinite(t))return t}
623function Mat(e){if(!e.cvsLoaded)return{kind:"loading"};if(!aA(e.cvs))return{kind:"no-primary",hasCv:(e.cvs??[]).length>0};if(e.feedLoading)return{kind:"loading"};if(e.feedError)return{kind:"preparing",failed:!0};const{count:t,lowerBound:n}=QK(e.pages,e.hasNextPage),r=(e.pages??[]).some(i=>(i.data?.length??0)>0);return t<=0&&!r?{kind:"preparing",failed:!1}:{kind:"ready",count:Math.max(t,1),lowerBound:n}}function $at(e){const t=e.cvs??[],n=t.length>0,r=aA(t);return[{id:"upload-cv",label:"Upload your CV",hint:"We read it to find jobs that fit you.",done:n,action:"Upload your CV"},{id:"primary-cv",label:"Choose your primary CV",hint:"Your primary CV drives your job matches.",done:n&&r,action:"Choose your primary CV"},{id:"locations",label:"Choose where you want to work",hint:"Pick countries and cities for your matches.",done:e.searchLocationCount>0,action:"Choose where to work"},{id:"matches",label:"See your matches",hint:"Jobs ranked against your primary CV.",done:e.matches.kind==="ready",action:"See your matches"}]}function Ume(e){return e.find(t=>!t.done)}function Dat(e){return e.every(t=>t.done)}function Lat(e){const t=Ume(e.steps);if(t&&t.id!=="matches")return`Step ${e.steps.indexOf(t)+1} of ${e.steps.length}: ${Vme(t.label)}.`;const n=[];return e.matches.kind==="ready"?n.push(`${zme(e.matches.count,e.matches.lowerBound)} ${e.matches.count===1&&!e.matches.lowerBound?"job matches":"jobs match"} you`):(e.matches.kind==="preparing"||e.matches.kind==="loading")&&n.push("We're finding jobs for your primary CV"),e.interviewsToDo>0&&n.push(`${e.interviewsToDo} ${e.interviewsToDo===1?"interview":"interviews"} to do`),n.length===0?"You're set up. Here is where your search stands.":`${n.join(". ")}.`}function zme(e,t=!1){return`${e.toLocaleString("en-GB")}${t?"+":""}`}function Vme(e){return e.charAt(0).toLowerCase()+e.slice(1)}function Fat(e){let t=0;for(const n of e??[])for(const r of n.data??[])r.has_report&&(t+=1);return t}function Bat(e,t){return t?e===null?"Unlimited":e.toLocaleString("en-GB"):"-"}const JK=60;function lA(){if(typeof window>"u")return 0;const e=document.documentElement?.clientHeight??0;return e>0?e:window.innerHeight}function qme(e,t,n){const r=e-(n+t);return r>=JK?Math.round(r):0}function Kme(e,t,n,r){if(!(e>0))return 0;const i=Math.max(0,t-n),o=e-i-Math.max(0,r);return o>=JK?Math.round(o):0}function Wme(e){return{top:typeof window>"u"?0:window.visualViewport?.offsetTop??0,bottom:lA()-e}}const Hme=16;function Gme(e,t,n=Hme){const r=t.top+n,i=t.bottom-n;return e.top>=r&&e.bottom<=i?0:e.bottom-e.top>i-r?Math.round(e.top-r):Math.round((e.top+e.bottom)/2-(r+i)/2)}const Yme=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);function XK(e){return!e||!(e instanceof HTMLElement)?!1:e instanceof HTMLTextAreaElement?!e.readOnly&&!e.disabled:e instanceof HTMLInputElement?!Yme.has(e.type)&&!e.readOnly&&!e.disabled:e.isContentEditable===!0}const qv=new Set;let Ky=0,Wy=0,Ug=0,LM=0,Ic=null;function Qme(){if(typeof window>"u")return 0;const e=lA(),t=window.innerWidth;t!==LM?(LM=t,Ug=e):e>Ug&&(Ug=e);const n=window.visualViewport,r=n?.offsetTop??0,i=n?qme(e,n.height,r):0,o=Kme(Wy,Ug,e,r);return Math.max(i,o)}function Do(){const e=Qme();e!==Ky&&(Ky=e,qv.forEach(t=>t()))}function Jme(){const e=window.visualViewport,t=r=>{const i=Number(r.keyboardHeight);Wy=Number.isFinite(i)&&i>0?i:0,Do()},n=()=>{Wy=0,Do()};return e?.addEventListener("resize",Do),e?.addEventListener("scroll",Do),window.addEventListener("resize",Do),window.addEventListener("keyboardWillShow",t),window.addEventListener("keyboardDidShow",t),window.addEventListener("keyboardWillHide",n),window.addEventListener("keyboardDidHide",n),Do(),()=>{e?.removeEventListener("resize",Do),e?.removeEventListener("scroll",Do),window.removeEventListener("resize",Do),window.removeEventListener("keyboardWillShow",t),window.removeEventListener("keyboardDidShow",t),window.removeEventListener("keyboardWillHide",n),window.removeEventListener("keyboardDidHide",n)}}function Xme(e){return typeof window>"u"?()=>{}:(qv.add(e),Ic||(Ic=Jme()),()=>{qv.delete(e),qv.size===0&&Ic&&(Ic(),Ic=null,Ky=0,Wy=0)})}function ZK(){return Ic?Ky:0}const FM="(max-width: 639px)";function Sw(){const e=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(FM).matches,[t,n]=v.useState(e);return v.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const r=window.matchMedia(FM),i=()=>n(r.matches);
623return i(),r.addEventListener?.("change",i),()=>r.removeEventListener?.("change",i)},[]),t}function Zme(e){const[t,n]=v.useState(null);return v.useEffect(()=>{if(!e||typeof window>"u")return;const r=window.visualViewport;if(!r){n(null);return}const i=()=>n({height:r.height,offsetTop:r.offsetTop});return i(),r.addEventListener("resize",i),r.addEventListener("scroll",i),()=>{r.removeEventListener("resize",i),r.removeEventListener("scroll",i)}},[e]),t}function ege(e,t,n=lA()){if(!e||t<=0||n<=0)return e;const r=n-t-e.offsetTop;return r>0&&r<e.height?{...e,height:r}:e}const zg=12;function tge(e){return!e||!(e.height>0)?{top:`calc(${zg}px + env(safe-area-inset-top))`,bottom:"auto",height:`calc(100dvh - ${zg}px - env(safe-area-inset-top))`}:{top:`calc(${Math.round(e.offsetTop)+zg}px + env(safe-area-inset-top))`,bottom:"auto",height:`calc(${Math.round(e.height)-zg}px - env(safe-area-inset-top))`}}const eW=v.createContext(!1);function Uat(){return v.useContext(eW)}function jw(e,t=document){for(const n of e){const r=t.querySelectorAll(`[data-tour="${nge(n)}"]`);for(const i of Array.from(r))if(rge(i))return i}return null}function nge(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/["\\]/g,"\\$&")}function rge(e){if(typeof e.getClientRects!="function"||e.getClientRects().length===0)return!1;const n=e.getBoundingClientRect();return n.width>0||n.height>0}const Vo=6,BM=352,Fo=16,UM=72;function ige(e,t,n){const r=Math.min(t.width,n.width-Fo*2),i=c=>Math.max(Fo,Math.min(c,n.width-r-Fo));if(!e)return{top:Math.max(Fo,(n.height-t.height)/2),left:i((n.width-r)/2)};const o=e.top+e.height+Vo+12,s=e.top-Vo-12-t.height,a=i(e.left);return o+t.height<=n.height-Fo?{top:o,left:a}:s>=Fo?{top:s,left:a}:{top:Math.max(Fo,n.height-t.height-Fo),left:a}}const oge=.2,Vg=12;function tW(){const e=typeof window<"u"?window.visualViewport:void 0;return e&&e.height>0?e.height:window.innerHeight}function nW(e=document){const t=e.querySelector("[data-sticky-header]");if(!t||t.getClientRects().length===0)return UM;const n=t.getBoundingClientRect();return n.height<=0?UM:Math.max(0,Math.min(n.bottom,200))}function sge(e,t=document){const n=t.querySelector('[data-testid="bottom-tab-bar"]');if(!n||n.getClientRects().length===0)return 0;const r=n.getBoundingClientRect();return r.height<=0?0:Math.max(0,e-r.top)}function age(e){const t=e.ratio??oge,n=e.headerBottom,r=Math.max(n,e.viewportHeight-e.bottomCover),i=r-n;let o=n+t*i;e.targetHeight<=i-Vg*2&&o+e.targetHeight>r-Vg&&(o=r-Vg-e.targetHeight),o=Math.max(o,n+Vg);const s=e.scrollY+e.targetTop-o;return Math.round(Math.max(0,Math.min(s,Math.max(0,e.maxScroll))))}function lge(e,t,n){const r=Math.max(e.top,t),i=Math.min(e.top+e.height,n);return i-r<24?e:{...e,top:r,height:i-r}}function cge(e,t=document){const n=e.filter(r=>r.anchors.length===0||jw(r.anchors,t)!==null);return n.length>0?n:[...e]}const uge=400;function dge(e,t){const n=tW(),r=e.getBoundingClientRect(),i=t?t.getBoundingClientRect().height:0,o=document.scrollingElement??document.documentElement;return age({targetTop:r.top,targetHeight:r.height,scrollY:window.scrollY,viewportHeight:n,headerBottom:nW(),bottomCover:Math.max(i,sge(n)),maxScroll:o.scrollHeight-n})}function fge(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function hge(e){if(typeof window.getComputedStyle!="function")return!1;let t=e;for(;t&&t!==document.body;){if(window.getComputedStyle(t).position==="fixed")return!0;t=t.parentElement}return!1}function pge(e){return Array.from(e.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), [tabindex]:not([tabindex="-1"])'))}function mge({steps:e,label:t,onFinish:n,finalAction:r}){const[i,o]=v.useState(0),[s,a]=v.useState(null),[c,u]=v.useState({width:BM,height:200}),d=Sw(),f=v.useRef(null),h=v.useRef(null),p=v.useId(),m=v.useId(),[g]=v.useState(()=>cge(e)),y=g[Math.min(i,g.length-1)],b=i>=g.length-1;v.useEffect(()=>{const E=document.activeElement;return()=>{E&&E.isConnected&&typeof E.focus=="function"&&E.focus({preventScroll:!0})}},[]),v.useLayoutEffect(()=>{if(!y)return;const E=jw(y.anchors);if(!E){a(null);return}const C=fge()?"auto":"smooth";let N=null;hge(E)||(N=dge(E,d?f.current:null),Math.abs(window.scrollY-N)>1&&window.scrollTo?.({top:N,behavior:C}));let k=0;const P=()=>{const O=E.getBoundingClientRect();
623a({top:O.top,left:O.left,width:O.width,height:O.height})},A=()=>{cancelAnimationFrame(k),k=requestAnimationFrame(P)};P();let L=!1;const R=()=>{L=!0};window.addEventListener("touchstart",R,{passive:!0}),window.addEventListener("wheel",R,{passive:!0});const D=window.setTimeout(()=>{N!==null&&!L&&Math.abs(window.scrollY-N)>4&&window.scrollTo?.({top:N,behavior:"auto"}),A()},uge);return window.addEventListener("scroll",A,!0),window.addEventListener("resize",A),window.visualViewport?.addEventListener("resize",A),()=>{cancelAnimationFrame(k),window.clearTimeout(D),window.removeEventListener("touchstart",R),window.removeEventListener("wheel",R),window.removeEventListener("scroll",A,!0),window.removeEventListener("resize",A),window.visualViewport?.removeEventListener("resize",A)}},[y,d]),v.useLayoutEffect(()=>{const E=f.current;if(!E)return;const C=E.getBoundingClientRect();C.width>0&&C.height>0&&u({width:C.width,height:C.height})},[i,d]),v.useEffect(()=>{h.current?.focus()},[i]);const x=v.useRef(n);if(x.current=n,v.useEffect(()=>{const E=C=>gge(C,f.current,()=>x.current("skipped"));return document.addEventListener("keydown",E,!0),()=>document.removeEventListener("keydown",E,!0)},[]),!y)return null;const w={width:window.innerWidth,height:tW()},S=d?null:ige(s,c,w),_=d&&s&&s.top>w.height/2?Math.max(0,w.height-s.top+Vo+8):null,j=s&&d&&_===null?lge(s,nW()+Vo,w.height-c.height-Vo-4):s;return Ns.createPortal(l.jsxs("div",{className:"fixed inset-0 z-[80]","data-testid":"coach-marks",children:[j?l.jsx("div",{"aria-hidden":!0,"data-testid":"coach-mark-highlight","data-step":y.id,className:"pointer-events-none fixed rounded-xl border-2 border-primary transition-all duration-200",style:{to
623p:j.top-Vo,left:j.left-Vo,width:j.width+Vo*2,height:j.height+Vo*2,boxShadow:"0 0 0 9999px rgb(0 0 0 / 0.55)"}}):l.jsx("div",{"aria-hidden":!0,className:"fixed inset-0 bg-black/55"}),l.jsxs("div",{ref:f,role:"dialog","aria-modal":"true","aria-labelledby":p,"aria-describedby":m,"data-testid":d?"coach-mark-sheet":"coach-mark-card",className:K("fixed border border-border bg-card text-card-foreground shadow-xl",d?_!==null?"inset-x-2 rounded-2xl px-4 pt-4":"inset-x-0 bottom-0 rounded-t-2xl px-4 pt-4":"rounded-2xl p-5"),style:d?_!==null?{bottom:_,paddingBottom:"1rem"}:{paddingBottom:"calc(1rem + env(safe-area-inset-bottom))"}:{top:S?.top,left:S?.left,width:Math.min(BM,w.width-Fo*2)},children:[l.jsxs("p",{className:"text-xs font-semibold text-muted-foreground",children:[l.jsxs("span",{className:"sr-only",children:[t,". "]}),"Step ",i+1," of ",g.length]}),l.jsx("h2",{id:p,className:"mt-1 text-base font-bold text-foreground",children:y.title}),l.jsx("p",{id:m,className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:y.body}),l.jsx("div",{className:"mt-3 flex items-center gap-1.5","aria-hidden":!0,children:g.map((E,C)=>l.jsx("span",{"data-testid":"coach-mark-dot",className:K("h-1.5 rounded-full transition-all",C===i?"w-5 bg-primary":"w-1.5 bg-muted-foreground/30")},E.id))}),l.jsxs("div",{className:K("mt-4 flex items-center gap-2",d?"flex-wrap":""),children:[l.jsx("button",{type:"button",onClick:()=>n("skipped"),className:"min-h-11 rounded-lg px-2 text-sm font-semibold text-muted-foreground hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",children:"Skip tour"}),l.jsx("span",{className:"flex-1"}),i>0&&l.jsx("button",{type:"button",onClick:()=>o(E=>Math.max(0,E-1)),className:"min-h-11 rounded-lg border border-border px-3 text-sm font-semibold text-foreground hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",children:"Back"}),b&&r&&l.jsx("button",{type:"button",onClick:r.onSelect,className:"min-h-11 rounded-lg border border-primary/40 px-3 text-sm font-semibold text-primary hover:bg-primary/5 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",children:r.label}),l.jsx("button",{ref:h,type:"button",onClick:()=>b?n("done"):o(E=>E+1),className:"min-h-11 rounded-lg bg-primary px-4 text-sm font-bold text-primary-foreground hover:bg-primary/90 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",children:b?"Done":"Next"})]})]})]}),document.body)}function gge(e,t,n){if(e.key==="Escape"){e.preventDefault(),e.stopPropagation(),n();return}if(e.key!=="Tab"||!t)return;const r=pge(t);if(r.length===0)return;const i=r[0],o=r[r.length-1],s=document.activeElement;e.shiftKey&&(s===i||!t.contains(s))?(e.preventDefault(),o.focus()):!e.shiftKey&&(s===o||!t.contains(s))&&(e.preventDefault(),i.focus())}function vge(e=document){return e.querySelector("main h1")??e.querySelector("h1")??e.querySelector("main h2")}function yge(){try{return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}catch{return!1}}function xge(){if(typeof window>"u")return;const e=yge()?"auto":"smooth";try{window.scrollTo({top:0,left:0,behavior:e})}catch{}const t=vge();t&&(t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1"),t.focus({preventScroll:!0}))}function bge(){typeof window>"u"||window.setTimeout(xge,0)}const wge=500,_ge=15e3,zM=4e3,Sge=150;function VM(e){const t=e.filter(n=>n.anchors.length>0);return t.length===0||t.some(n=>jw(n.anchors)!==null)}function jge(){return!!document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"], [aria-modal="true"]')}function Kv({tour:e,userId:t,pathname:n,ready:r,accepts:i,finalAction:o,replayReady:s=!0,autoStartEnabled:a=!0,onAutoStart:c}){const[u,d]=v.useState(!1),f=v.useRef(e.steps);u||(f.current=e.steps);const h=f.current,p=eme(),m=pme(e,n),[g,y]=v.useState(!1);v.useEffect(()=>{!m||!s||p===null||!i.includes(p)||Xpe(i)&&(VM(e.steps)?d(!0):y(!0))},[m,s,p,i,e.steps]),v.useEffect(()=>{if(!g)return;const x=Date.now(),w=window.setInterval(()=>{(VM(e.steps)||Date.now()-x>=zM)&&(window.clearInterval(w),y(!1),d(!0))},Sge);return()=>window.clearInterval(w)},[g,e.steps]);const b=a&&hme({tour:e,pathname:n,seen:dp(e.id,t),ready:r});return v.useEffect(()=>{if(!b||u)return;const x=Date.now(),w=window.setInterval(()=>{const S=Date.now()-x;if(S>_ge){window.clearInterval(w);return}if(jge())return;const _=e.steps[0]?.anchors??[];_.length>0&&!jw(_)&&S<zM||(window.clearInterval(w),c?.(),d(!0))},wge);return()=>window.clearInterval(w)},[b,u,e,c]),v.useEffect(()=>{m||(d(!1),y(!1))},[m]),u?l.jsx(mge,{steps:h,label:e.label,onFinish:x=>{RM(e.id,t,x),d(!1),bge()},finalAction:o&&{label:o.label,onSelect:()=>{RM(e.id,t,"done"),d(!1),o.onSelect()}}},e.id):null}const Ege={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_CLOUD_ONLY:"false",VITE_DESKTOP_DOWNLOAD_BASE:"https://asgard-autoapply-desktop-releases-prod.s3.eu-west-2.amazonaws.com/releases",VITE_DOGRAH_API_ENDPOINT:"https://voice.asgardhire.ai",VITE_DOGRAH_EMBED_TOKEN:"emb_qyEymUieBpeu6SU9mWIPeD1lB0W2BwQ3gER4YKseltw",V
623ITE_DOGRAH_WIDGET_URL:"https://voice.asgardhire.ai/embed/dograh-widget.js",VITE_ENABLE_AI_DOCUMENTS:"true",VITE_ENABLE_CANDIDATE_JOURNEY_GATE:"true",VITE_ENABLE_CV_SHARE:"true",VITE_ENABLE_LIVEKIT_PROVIDER:"true",VITE_ENABLE_NEW_CV_TEMPLATES:"true",VITE_ENABLE_ONBOARDING_CHAT:"true",VITE_ENABLE_PROD_JOBS_TOGGLE:"false",VITE_ENABLE_RECRUITER_ONBOARDING:"true",VITE_ENABLE_REUSE_CV_AT_APPLY:"true",VITE_ENABLE_SIMPLE_UX:"true",VITE_ENABLE_VOICE_PREVIEW_UPLOAD:"true",VITE_EXTENSION_STORE_URL:"https://chromewebstore.google.com/detail/asgard-auto-apply/cpklckoakbmekioingkbahmhoipcpmnc",VITE_NATIVE_URL_SCHEME:"asgardhire",VITE_PRACTICE_INTERVIEW_COMING_SOON:"true",VITE_PUBLIC_COGNITO_AUTHORITY:"https://cognito-idp.eu-west-2.amazonaws.com/eu-west-2_U098rdSas",VITE_PUBLIC_COGNITO_CANDIDATE_CLIENT_ID:"5b75u4sh29fuj5iqle01m9j2rn",VITE_PUBLIC_COGNITO_CLIENT_ID:"11a4dran1036uttjhpbb516jju",VITE_PUBLIC_COGNITO_DOMAIN:"https://auth.asgardhire.ai",VITE_PUBLIC_URL:"https://da09e772vjcit.cloudfront.net/api/v1",VITE_PUBLIC_URL_APP:"https://da09e772vjcit.cloudfront.net/app/v1",VITE_REVENUECAT_ANDROID_API_KEY:"goog_vUoLrPUdrAiQGtSsYDqWwlBAVJH",VITE_REVENUECAT_IOS_API_KEY:"appl_nrHvfWEEoixjAnnmwRFMDVXUhdX"};function Cge(e){const t=e.VITE_ENABLE_SIMPLE_UX;return t==="true"?!0:t==="false"?!1:e.VITE_ENABLE_PROD_JOBS_TOGGLE==="true"}const Nge=Cge(Ege);function zr(){try{if(typeof window<"u"&&window.localStorage.getItem("ux.classic")==="1")return!1}catch{}return Nge}const Pge="asgard.recruiter.v1";function fp(e,t){return`${Pge}.${e}.${t}`}function zat(e,t){if(!t)return!1;try{return window.localStorage.getItem(fp(e,t))!==null}catch{return!1}}function kge(e,t){if(t)try{if(window.localStorage.getItem(fp(e,t))!==null)return;window.localStorage.setItem(fp(e,t),new Date().toISOString())}catch{}}function Vat(e){if(!e)return!1;try{return window.localStorage.getItem(fp("checklist-hidden",e))!==null}catch{return!1}}function qat(e){if(e)try{window.localStorage.setItem(fp("checklist-hidden",e),"1")}catch{}}function Age(e){return e==="/reports"||e.startsWith("/reports/")?"opened-reports":/^\/jd-dashboard\/[^/]+\/candidates\/[^/]+/.test(e)&&!e.endsWith("/invite")||/^\/candidate\/[^/]+\/[^/]+/.test(e)?"reviewed-result":null}function Kat(e){return[{id:"create-job",label:"Create your first job",hint:"Write the role. We build the rubric.",to:"/create-jd-v2",done:e.jobsTotal>0},{id:"invite",label:"Invite candidates",hint:"Open a job, then Candidates, then Invite.",to:"/jd-list",done:e.applicationsTotal>0},{id:"review",label:"Review a result",hint:"Open a candidate to see their scores.",to:"/jd-list",done:e.reviewedResult},{id:"reports",label:"Find your reports",hint:"Every report, for every role.",to:"/reports",done:e.openedReports}]}const Tge=["candidate","candidate-invited","candidate-cold"],Rge=["recruiter-home"];function Oge(){const t=tt().user?.profile?.sub,n=km(),r=Un(),i=n==="/dashboard"||n==="/my-interviews",[o]=v.useState(()=>zr()),{access:s,isFetched:a,isError:c}=qa(),u=nA({enabled:i}),d=fc(i&&!!t),f=oA(o&&i),h=cme(u.data),p=fme({access:s,pendingRecruiterInterviews:h,cvCount:d.data?.length??0}),m=s?.unlocked===!1,g=!!t&&(a||c)&&(u.isFetched||u.isError)&&(d.isFetched||d.isError),y=d.data,x=f.isFetched&&!f.isError?sA(f.data).length:null,w=v.useMemo(()=>({locked:m,decidedArrival:!m&&Mm(s?.unlock_reason),cvCount:y?.length??0,hasMainCv:aA(y),locationCount:x,pendingInterviews:h}),[m,s?.unlock_reason,y,x,h]),S=v.useMemo(()=>o?MM({...w,kind:"candidate-invited"}):m?{...zv,steps:[...zv.steps.slice(0,-1),dme]}:zv,[o,w,m]),_=v.useMemo(()=>o?MM({...w,kind:"candidate-cold"}):cE,[o,w]),j=v.useMemo(()=>m?void 0:{label:"Show me job search",onSelect:()=>{lE("candidate-cold"),n!=="/dashboard"&&r({to:"/dashboard"})}},[m,r,n]),E=sme({cvs:y,interviews:u.data}),C=ame({userId:t,established:E}),N=!o&&C,k=v.useCallback(()=>{ime(t),o&&nme(t)},[o,t]);return p==="candidate-invited"?l.jsxs(l.Fragment,{children:[l.jsx(Kv,{tour:S,userId:t,pathname:n,ready:g,autoStartEnabled:N,onAutoStart:k,accepts:Ige,finalAction:j,replayReady:g}),l.jsx(Kv,{tour:_,userId:t,pathname:n,ready:!1,accepts:Mge,replayReady:g})]}):l.jsx(Kv,{tour:_,userId:t,pathname:n,ready:g&&(!o||f.isFetched||f.isError),autoStartEnabled:N,onAutoStart:k,accepts:Tge,replayReady:g})}const Ige=["candidate","candidate-invited"],Mge=["candidate-cold"];function $ge(){const e=tt(),t=e.user?.profile?.sub,n=km(),r=$d();v.useEffect(()=>{const o=Age(n);o&&kge(o,t)},[n,t]);const i=v.useMemo(()=>({...ume(r),homes:[r]}),[r]);return l.jsx(Kv,{tour:i,userId:t,pathname:n,ready:!!t&&e.user?.profile?.role!=="CANDIDATE",accepts:Rge})}function rW(e){const t=Un(),n=km();return v.useCallback((r="/dashboard")=>{if(e==="recruiter"){lE("recruiter-home");const i=$d();n!==i&&t({to:i});return}lE("candidate"),n!=="/dashboard"&&n!=="/my-interviews"&&t({to:r})},[e,t,n])}function Wat(e=zr()){return e?{cv:"main CV",Cv:"Main CV",badge:"Main CV",make:"Make main CV"}:{cv:"primary CV",Cv:"Primary CV",badge:"Primary",make:"Make primary"}}function Hat(e=zr()){return e?"CV score":"ATS score"}const Dge="How well your CV reads to employers' screening software. It updates each time you save your CV.";function qM(e){return`CV score ${e}/100`}const Gat="How well this job fits your main CV, location and preferences";function Yat(e,t=zr()){return(t?{complete:"Ready",processing:"Reading",pending:"Reading",failed:"Could not read"}:{complete:"Parsed",processing:"Processing",pending:"Pending",failed:"Parse failed"})[e]??"Unknown"}
623function Qat(e=zr()){return e?{tag:"Still reading",warning:"We're still reading this CV. Choose one that says Ready."}:{tag:"Not yet parsed",warning:"This CV hasn't been parsed yet. Please select a fully parsed CV."}}const Lge="Your CV is well prepared for ATS systems.",KM="Hiring software can read your CV easily.";function Jat(e,t=zr()){if(!t||!e)return e;const n={[Lge]:KM,"Your CV is well prepared for ATS systems":KM,"ATS-friendly":"Easy for hiring software to read","Check for ATS":"Check it reads well","ATS issues":"Problems for hiring software","Adding ATS-friendly keywordsâ¦":"Adding keywords hiring software looks forâ¦"},r=e.trim();return n[r]?n[r]:e.replace(/\bATS[- ]friendl(y|iness)\b/gi,(i,o)=>o.toLowerCase()==="y"?"easy for hiring software to read":"how easily hiring software can read it").replace(/\bATS score\b/g,"CV score").replace(/\bATS[- ]ready\b/gi,"easy for hiring software to read").replace(/\b(an )?ATS (systems?|software|scanners?|tools?)\b/gi,"hiring software").replace(/\bATSs?\b/g,"hiring software")}function nS(e){return typeof e!="string"?void 0:e.trim()||void 0}function iW(e){const t=nS(e.start),n=nS(e.interview_id),r=nS(e.round_id);return{...t?{start:t}:{},...n?{interview_id:n}:{},...r?{round_id:r}:{}}}function cA(e,t){return(e.replace(/\/$/,"")||"/")!=="/my-interviews"?!1:!!(t.start||t.interview_id||t.round_id)}function Fge(e,t){if(e.round_id)return t.find(r=>r.screening_round?.round_id===e.round_id);const n=e.start??e.interview_id;if(n)return t.find(r=>r.interview_id===n)}function Bge(e){const t=iA(e);return t==="pending"||t==="screening-interview"}function Uge(e){if(!cA(e.pathname,e.search))return"none";if(e.interviews===void 0)return e.interviewsLoading?"loading":"none";const t=Fge(e.search,e.interviews);return t&&Bge(t)?"exempt":"none"}function zge(e,t){return cA(e,t)?JSON.stringify([t.start??"",t.interview_id??"",t.round_id??""]):null}function Vge(e){return e.currentTarget===null?{exemption:e.fresh,grantedTarget:null}:e.grantedTarget===e.currentTarget?{exemption:"exempt",grantedTarget:e.currentTarget}:e.fresh==="exempt"?{exemption:"exempt",grantedTarget:e.currentTarget}:{exemption:e.fresh,grantedTarget:null}}function qge(e){return!e.signedIn||e.excluded?"stay":e.cvsSettled?e.hasParsedCv?"stay":e.deepLink==="loading"?"wait":e.deepLink==="exempt"?"stay":"redirect":"wait"}function Kge(e){return e.startsWith("/get-started")||e.startsWith("/profile-ready")||e.startsWith("/interview")||e.startsWith("/practice-interview")||e.startsWith("/create-resume")}function oW(e){return Array.isArray(e)?e.some(t=>t?.parsed_status==="complete"):!1}function Wge(){const t=tt().user?.profile?.sub,n=pt({select:m=>m.location.pathname}),r=pt({select:m=>m.location.search}),i=Kge(n),o=fc(!!t),s=o.data,a=iW(r??{}),c=!!t&&cA(n,a),u=nA({enabled:c}),d=Uge({pathname:n,search:a,interviews:c?u.data:void 0,interviewsLoading:c&&u.isPending}),f=v.useRef(null),h=Vge({grantedTarget:f.current,currentTarget:zge(n,a),fresh:d}),p=h.exemption;return v.useEffect(()=>{f.current=h.grantedTarget},[h.grantedTarget]),qge({signedIn:!!t,excluded:i,cvsSettled:!o.isFetching&&s!==void 0,hasParsedCv:oW(s),deepLink:p}),null}function Hge(e){const t=e.replace(/\/+$/,"")||"/";return t==="/dashboard"||t==="/"?"home":t==="/explore-jobs"?"jobs":t.startsWith("/auto-apply")||t==="/onboarding"?"auto-apply":t==="/improve-cv"||t==="/bring-job"?"other":null}function sW(){const t=tt().user?.profile?.sub,n=pt({select:o=>o.location.pathname}),r=fc(!!t),i=Hge(n);return!t||!i||r.isError||r.data===void 0||oW(r.data)?null:i}const hp="/explore-jobs",zu="/dashboard";function pp(e,t){return e===t||e.startsWith(`${t}/`)}function Gge(e){return e.action.kind==="link"?e.action.to.split("?")[0]:void 0}function Yge(e,t){const n=Gge(e);return n?pp(t,n):!1}function WM(e,t){return!t.dismissed.has(e.id)&&!Yge(e,t.pathname)}function uE(e,t,n){return e===1?t:n}function uA(e){return e.toLocaleString("en-GB")}function aW(e){return`${uA(e.count)}${e.lowerBound?"+":""}`}const Qge=[e=>e.pendingInterview===void 0?"wait":e.pendingInterview?e.simpleUx&&e.pathname===zu?"wait":{id:"recruiter-interview",text:`You have an interview for ${e.pendingInterview.role}.`,button:"Start it",action:{kind:"link",to:"/my-interviews",search:{start:e.pendingInterview.id}}}:null,e=>e.cvs?e.cvs.count>0?null:{id:"upload-cv",text:"Upload your CV to see jobs that fit you.",button:"Upload CV",action:{kind:"link",to:"/get-started"}}:"wait",e=>
623!e.cvs||e.cvs.anyRead||!e.cvs.anyReading?null:{id:"cv-reading",text:"Reading your CV. Your jobs will appear here in a moment.",action:{kind:"none"},progress:!0,autoRefresh:!0},e=>e.locked?"wait":null,e=>!e.cvs||e.cvs.hasMain?null:{id:"choose-main-cv",text:"Choose your main CV. We use it to find your jobs.",button:"Choose",action:{kind:"link",to:"/profile"}},e=>e.placeCount===void 0?"wait":null,e=>e.placeCityCount>0||(e.urlCityCount??0)>0||e.simpleUx&&pp(e.pathname,"/explore-jobs")?null:e.cvLocationMissing===void 0?"wait":e.cvLocationMissing?{id:"add-city",text:"Add your city to see local jobs first.",button:"Add city",action:{kind:"edit-places"}}:null,e=>e.matches.kind!=="preparing"?null:{id:"matches-preparing",text:"Finding jobs for your CV...",action:{kind:"none"},progress:!0,autoRefresh:!0},e=>{if(e.matches.kind!=="ready")return null;if(e.viewedAJob===void 0)return"wait";if(e.viewedAJob)return null;const t=e.matches.jobs;if(!t||t.count<=0)return{id:"see-matches",text:"Your job matches are ready.",button:"See them",action:{kind:"link",to:hp,search:{start:"fresh"}}};const n=t.count;return{id:"see-matches",text:`${aW(t)} ${uE(n,"job fits","jobs fit")} you.`,button:n===1?"See it":"See the best ones",action:{kind:"link",to:hp,search:t.search}}},e=>e.simpleUx||e.matches.kind!=="ready"||e.pathname===zu?null:e.autoApplySetUp===void 0?"wait":e.autoApplySetUp?null:{id:"set-up-auto-apply",text:"Let us apply for you. Pick 5 jobs.",button:"Start",action:{kind:"link",to:"/auto-apply",hash:"picks"}},e=>{const t=Math.max(0,e.toApprove),n=Math.max(0,e.staged??0),r=t+n;return r<=0||e.simpleUx&&(e.autoApplyOn!==!0||!Jge.some(i=>pp(e.pathname,i)))?null:{id:"approve-queue",text:`Auto-apply: ${uA(r)} ${uE(r,"job","jobs")} waiting for your approval.`,button:"Review",action:t>0?{kind:"link",to:"/auto-apply/daily"}:{kind:"link",to:"/auto-apply",hash:"activity"}}},e=>e.cvDetailsMissing?{id:"add-details",text:"Add your skills and level to get better matches.",button:"Add them",action:{kind:"quick-fields"}}:null],Jge=[zu,hp,"/applications"],Xge=[zu,"/my-interviews","/interview-history"],Zge=["/auto-apply"],eve=new Set(["recruiter-interview","upload-cv","cv-reading","choose-main-cv"]);function tve(e){return!!e.simpleUx&&Zge.some(t=>pp(e.pathname,t))}function nve(e){const t=[],n=!e.simpleUx||Xge.some(o=>pp(e.pathname,o));e.practiceAvailable&&e.savedJob&&n&&!e.pendingInterview&&t.push({id:"practise-saved",text:`Do a practice interview for ${e.savedJob.title}.`,button:"Practice",action:{kind:"link",to:hp,search:{job:e.savedJob.id}}});const r=e.matches.kind==="ready"?e.matches.jobs:void 0;return r&&r.count>0&&e.newMatches>0&&t.push({id:"new-matches",text:`${aW(r)} ${uE(r.count,"job fits","jobs fit")} you, ${uA(e.newMatches)} more than on your last visit.`,button:"See them",action:{kind:"link",to:hp,search:r.search}}),(e.simpleUx?e.pathname===zu&&e.addedAJob===!1:!0)&&t.push({id:"bring-job",text:"Add a job you found on another site. We tailor your CV to it.",button:"Add a job",action:{kind:"link",to:"/bring-job",search:{for:"both"}}}),t}function lW(e){const t=tve(e);for(const i of Qge){const o=i(e);if(o==="wait"||o&&t&&!eve.has(o.id))return null;if(o&&WM(o,e))return o}if(t)return null;const n=nve(e).filter(i=>WM(i,e));if(n.length===0)return null;const r=Math.abs(Math.trunc(e.rotation))%n.length;return n[r]}function rve(e){return e.startsWith("/get-started")||e.startsWith("/profile-ready")||e.startsWith("/onboarding")||e.startsWith("/interview/")||e.startsWith("/practice-interview")||e.startsWith("/revenuecat-funnel-auth")||e.startsWith("/welcome")}const ive=1200,ove=6e3,Xat=1500;function Zat(e){return!(e??[]).some(t=>t.is_primary||t.isPrimary)}function cW(e){return!!(e&&typeof e=="object"&&e.feed_ready===!0)}async function elt(e,t={}){const n=t.floorMs??ive,r=t.ceilingMs??ove;let i,o,s;const a=new Promise(h=>{i=setTimeout(h,n)}),c=new Promise(h=>{o=setTimeout(h,r)}),u=async()=>{let h;try{h=await Promise.resolve(e())}catch(p){if(t.retryIfNotReadyMs==null)throw p;h=null}return t.retryIfNotReadyMs!=null&&!cW(h)&&(await new Promise(p=>{s=setTimeout(p,t.retryIfNotReadyMs)}),h=await Promise.resolve(e())),h};let d;try{d=u()}catch(h){d=Promise.reject(h)}const f=Promise.allSettled([d,a]).then(()=>{});
623await Promise.race([f,c]),i&&clearTimeout(i),o&&clearTimeout(o),s&&clearTimeout(s)}const uW={findingMatches:["Sifting millions of jobs so you don't have to","Matching jobs to your CV, one good fit at a time","Kneading the listings into something worth reading","Sorting the gems from the also-rans","Checking which roles deserve your attention","Lining up the jobs that fit you best","Reading job ads so you can skip the waffle","Weighing each role against your experience","Putting the best fits at the top of the pile","Brewing a fresh batch of matches","Noodling through the newest postings","Shuffling roles until the good ones rise","Nearly there. Your best matches are taking shape"],searching:["Checking every listing for your keywords","Rummaging through the listings for you","Turning over every job ad for a match","Following the trail of your search terms","Scanning titles, skills and descriptions","Looking in all the usual places, and a few more","Combing through today's jobs for you","Your search is on. The jobs are being rounded up","Fetching jobs that fit your search","Asking the job boards nicely","Rounding up the likely suspects, er, jobs"],marketLoading:["Taking the pulse of the job market","Counting who's hiring and for what","Mapping the market, one employer at a time","Totting up salaries, roles and hiring trends","Checking which companies are on a hiring spree","Reading the market so you can read the room","Crunching this week's hiring numbers","Gathering the big picture on who's hiring","Sizing up the market for your next move","Charting where the jobs are right now","Tallying fresh openings across the market"],tailoringCv:["Polishing your bullet points","Nudging your best work to the top","Matching your words to what they're after","Trimming the waffle, keeping the facts","Giving your CV a job-specific makeover","Sharpening your skills section","Kneading your experience into shape","Leading every bullet with a strong verb","Tweaking the wording, never the truth","Dusting off your achievements","Making your CV speak the employer's language","Tidying the edges. Nearly ready"],writingCoverLetter:["Finding the right opening line","Drafting a letter that sounds like you","Choosing words a hiring manager will enjoy","Connecting your experience to their needs","Warming up the pen","Keeping it short, warm and to the point","Weaving your best stories into a letter","Crossing out the clichés","Noodling on why you're a great fit","Giving it a final read-through","Picking three reasons they should meet you"],readingCv:["Reading your CV closely","Getting to know your career so far","Taking notes on your experience","Spotting your skills, even the modest ones","Following your career from the top","Making sense of your dates and roles","Reading between the bullet points","Learning what you're brilliant at","Turning the pages, metaphorically","Filing your experience in all the right places","Nearly done. Just the last few lines"],savingJob:["Saved. It will wait patiently in your saved jobs.","Tucked away in your saved jobs for later.","Good find. It's in your saved jobs.","Saved for later. Future you will thank you.","Bookmarked. Find it in your saved jobs whenever you're ready.","Saved. One step closer to your next role.","Popped into your saved jobs. No rush.","Saved. It's safe and sound in your saved jobs.","Noted and saved. Come back to it any time.","Saved. This one has potential.","Into your saved jobs it goes."],autoApplyQueued:["We're on it. Your application is in the queue.","Leave it with us. We'll fill in the forms.","Queued up. We'll handle the paperwork.","Your application is on its way. Put the kettle on.","We're applying for you. Feel free to stretch your legs.","In the queue. We'll do the typing so you don't have to.","Consider it handled. We'll apply shortly.","Added to the queue. We'll take it from here.","Application underway. Your fingers can rest.","We've got this one. Check the queue for progress.","On the list. We'll apply on your behalf shortly."],emptyResults:["Nothing here yet. Let's widen the net.","These filters are a little too picky.","Slim pickings with these filters.","The r
623ight job might be just outside these filters.","Quiet here. Try loosening a filter or two.","Even great searches come up empty sometimes.","Nothing matches just yet. A small tweak often helps.","Tumbleweed. Try a wider search.","A blank page, for now. A wider search should help.","These filters found nothing. A few changes should do it."],rateLimit:["Whoa, speed reader. Give it a few seconds and we'll keep up.","Easy, tiger. Grab a sip of coffee, we'll be ready in a moment.","You're scrolling faster than we can pour. Back in a few seconds.","Slow down a bit and smell the coffee. More jobs in a moment.","That was quick. Take a breath and we'll have more jobs ready shortly.","Our job finder needs a quick sip of coffee. Try again in a few seconds.","Hold that thumb. More jobs are on their way in a moment.","Nice pace. Give us a few seconds to catch up with you.","Quick fingers. We'll be ready again in a few seconds.","A short pause while we catch our breath. Back in a moment."]},sve=3,dW=e=>`witty.${e}.recent`,HM=new Map;function ave(e){try{const t=window.localStorage.getItem(dW(e));if(t===null)return null;const n=JSON.parse(t);return Array.isArray(n)?n.filter(r=>Number.isInteger(r)):null}catch{return null}}function lve(e,t){try{window.localStorage.setItem(dW(e),JSON.stringify(t))}catch{}}function cve(e,t=Math.random){const n=uW[e],r=Math.min(sve,n.length-1),i=(ave(e)??HM.get(e)??[]).slice(-r),o=n.map((u,d)=>d).filter(u=>!i.includes(u)),s=Math.min(Math.max(t(),0),.999999),a=o[Math.floor(s*o.length)],c=r>0?[...i,a].slice(-r):[];return HM.set(e,c),lve(e,c),n[a]}uW.rateLimit;function uve(e=Math.random){return cve("rateLimit",e)}const _c={excellent:{tone:"excellent",label:"Excellent match",badgeClassName:"bg-success/15 text-success border-success/50",textClassName:"text-success",ringClassName:"stroke-success"},very_good:{tone:"very_good",label:"Very good match",badgeClassName:"bg-success/10 text-success border-success/40",textClassName:"text-success",ringClassName:"stroke-success"},good:{tone:"good",label:"Good match",badgeClassName:"bg-info/10 text-info border-info/40",textClassName:"text-info",ringClassName:"stroke-info"},fair:{tone:"fair",label:"Fair match",badgeClassName:"bg-warning/10 text-warning border-warning/40",textClassName:"text-warning",ringClassName:"stroke-warning"},average:{tone:"average",label:"Average match",badgeClassName:"bg-warning/15 text-warning border-warning/50",textClassName:"text-warning",ringClassName:"stroke-warning"},low:{tone:"low",label:"Low match",badgeClassName:"bg-destructive/10 text-destructive border-destructive/40",textClassName:"text-destructive",ringClassName:"stroke-destructive"}};function fW(e){return Number.isFinite(e)?Math.round(Math.min(100,Math.max(0,e))):0}function dve(e){const t=fW(e);return t>=90?_c.excellent:t>=80?_c.very_good:t>=70?_c.good:t>=60?_c.fair:t>=50?_c.average:_c.low}function tlt(e){return`${fW(e)}% · ${dve(e).label}`}function Vd(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}const hW="v71.cardScores",pW=200,ta=new Map;let GM=!1;function mW(){if(!GM){GM=!0;try{const e=window.sessionStorage.getItem(hW),t=e?JSON.parse(e):{};for(const[n,r]of Object.entries(t))Vd(r)&&ta.set(n,r)}catch{}}}function fve(){try{window.sessionStorage.setItem(hW,JSON.stringify(Object.fromEntries(ta)))}catch{}}function nlt(e,t){if(!(!e||!Vd(t))){for(mW(),ta.delete(e),ta.set(e,t);ta.size>pW;){const n=ta.keys().next().value;if(n===void 0)break;ta.delete(n)}fve()}}function hve(e){if(e)return mW(),ta.get(e)}function rlt(e,t){return yW(e)??hve(e)??(Vd(t)?t:void 0)}const gW="b1.reportScores",Ys=new Map;let YM=!1;function vW(){if(!YM){YM=!0;try{const e=window.sessionStorage.getItem(gW),t=e?JSON.parse(e):{};for(const[n,r]of Object.entries(t))Vd(r)&&Ys.set(n,r)}catch{}}}function ilt(e,t){if(!(!e||!Vd(t))){for(vW(),Ys.delete(e),Ys.set(e,t);Ys.size>pW;){const n=Ys.keys().next().value;if(n===void 0)break;Ys.delete(n)}try{window.sessionStorage.setItem(gW,JSON.stringify(Object.fromEntries(Ys)))}catch{}}}function yW(e){if(e)return vW(),Ys.get(e)}const dA="ux.applyMyself.pending",pve=3e3,mve=24*60*60*1e3;function fA(){try{return typeof window<"u"?window.sessionStorage:null}catch{return null}}function gve(e,t=Date.now()){const n=fA();if(!(!n||!e.job_id))try{n.setItem(dA,JSON.stringify({...e,at:t}))}catch{}}function vve(){const e=fA();if(!e)return null;try{const t=e.getItem(dA);if(!t)return null;const n=JSON.parse(t);return n&&typeof n.job_id=="string"&&typeof n.at=="number"?n:null}catch{return null}}function xW(){try{fA()?.removeItem(dA)}catch{}}function yve(e=Date.now()){const t=vve();return t?e-t.at>mve?(xW(),null):e-t.at>=pve?t:null:null}const QM=new Set;function xve(e){return QM.add(e),()=>{QM.delete(e)}}function JM(e){if(!e)return{countryIds:void 0,cityIds:void 0};const t=e.default_country_ids?.length?e.default_country_ids:e.default_country_id!=null?[e.default_country_id]:void 0,n=e.default_city_ids?.length?e.default_city_ids:e.default_city_id!=null?[e.default_city_id]:void 0;return{countryIds:t,cityIds:n}}const bve=["company_name","industry","salary_range","benefits","experience_level","job_function","visa_sponsorship"],bW=new Set(["country","cities"]);function wW(e){if(typeof e=="string")return e;if(e!==null&&typeof e=="object"){const t=e;if(typeof t.name=="string")return t.name;if(typeof t.id=="string")return t.id}return String(e)}function hA(e){if(e===null||typeof e!="object")return null;const t=e,n=typeof t.id=="number"?t.id:Number(t.id),r=typeof t.name=="string"?t.name:String(t.name??"");return!Number.isFinite(n)||!r?null:{id:n,name:r}}const Hy=10,_W=3,wve=2;function SW(e){return e<=1?_W:wve}function _ve(e){const t=Math.max(1,e);return Array.from({length:SW(t)}
623,(n,r)=>t+r)}function dE(...e){return e.find(t=>typeof t=="number"&&Number.isFinite(t))}function XM(e){if(e.length===1)return e[0];const[t]=e,n=[...e].reverse(),r={...t,data:e.flatMap(c=>c.data??[])},i=dE(...n.map(c=>c.total));i!==void 0&&(r.total=i);const o=dE(...n.map(c=>c.matching_total));o!==void 0&&(r.matching_total=o);const s=n.find(c=>typeof c.total_is_lower_bound=="boolean")?.total_is_lower_bound;s!==void 0&&(r.total_is_lower_bound=s);const a=n.find(c=>c.pagination)?.pagination;return a&&(r.pagination=a),e.some(c=>c.results_truncated)&&(r.results_truncated=!0),e.some(c=>(c.data?.length??0)===0)&&(r.list_end=!0),r}async function jW(e,t){const n=_ve(e),r=[];let i=n;if(n[0]===1){const s=await t(1);if(r.push(s),s.results_truncated||(s.data?.length??0)===0)return XM(r);i=n.slice(1)}const o=await Promise.all(i.map(s=>t(s)));for(const s of o)if(r.push(s),s.results_truncated||(s.data?.length??0)===0)break;return XM(r)}function EW(e,t,n){if(e.results_truncated)return;const r=e.data?.length??0;if(r===0)return;const i=typeof t=="number"&&t>=1?t:1,o=SW(i);if(e.list_end||r<Hy*o){if(e.list_end)return;const s=dE(e.matching_total,e.total,e.pagination?.total),a=(n??[e]).reduce((c,u)=>c+(u.data?.length??0),0);if(s===void 0||a>=s)return}return i+o}function olt(e){return e?.response?.status===429}const Sve="You have reached today's search limit. Try again tomorrow.";function slt(e){const t=e?.response?.data;return t?.reason!=="quota"?uve():typeof t?.message=="string"&&t.message.trim()?t.message:Sve}function CW(e,t){const n=t?.response?.status;return n===502||n===503||n===504?e<2:typeof n=="number"&&n>=400&&n<500?!1:e<1}const NW=2*60*1e3;function Ew(e,t){if(!e)return t;const n=Object.fromEntries(Object.entries(t).filter(([,r])=>r!==void 0));return n.match_score===null&&typeof e.match_score=="number"&&delete n.match_score,{...e,...n}}function jve(e,t){if(!e)return e;if(!t)return ZM(e);let n=e;return t.source&&!e.source&&(n={...n,source:t.source,apply_url:e.apply_url??t.apply_url}),Vd(t.match_score)&&e.match_score!==t.match_score&&(n={...n,match_score:t.match_score}),(!e.match_reasons||e.match_reasons.length===0)&&t.match_reasons?.length&&(n={...n,match_reasons:t.match_reasons}),!e.match_explain&&t.match_explain&&(n={...n,match_explain:t.match_explain}),ZM(n)}function ZM(e){const t=yW(e.job_id);return t===void 0||e.match_score===t?e:{...e,match_score:t}}function pA(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch{return""}}function PW(e,t){return t?.searchVariant==="v2"&&t.wholeCountry===!0&&(e.country_ids?.length??0)>0&&!e.city_ids?.length}function Eve(e,t){return t?.searchVariant!=="v2"?["jobs",e]:["jobs",e,"search_v2",t.explain?"explain":"",PW(e,t)?"whole_country":""]}function Cve(e,t){const n={page:e.page??1,page_size:e.page_size??10};return e.search_term&&(n.search_term=e.search_term),e.date_posted&&(n.date_posted=e.date_posted),e.country_ids?.length&&(n.country_ids=e.country_ids),e.city_ids?.length&&(n.city_ids=e.city_ids),e.job_type?.length&&(n.job_type=e.job_type),e.work_type?.length&&(n.work_type=e.work_type),e.industry?.length&&(n.industry=e.industry),e.salary_range?.length&&(n.salary_range=e.salary_range),e.benefits?.length&&(n.benefits=e.benefits),e.experience_level?.length&&(n.experience_level=e.experience_level),e.job_function?.length&&(n.job_function=e.job_function),e.company_name?.length&&(n.company_name=e.company_name),e.visa_sponsorship&&(n.visa_sponsorship=e.visa_sponsorship),e.sort_by&&(n.sort_by=e.sort_by),t?.searchVariant==="v2"&&(n.search_variant="v2",PW(e,t)&&(n.whole_country=!0),t.explain&&(n.explain=!0)),n}function kW(e){return e.trim().toLowerCase()}const AW=new Map,Nve=new Map;function TW(e){return Array.isArray(e)?e.map(t=>{const n=t,r=typeof n.id=="number"?n.id:Number(n.id),i=typeof n.name=="string"?n.name:String(n.name??"");if(!Number.isFinite(r)||!i)return null;const o=typeof n.country_id=="number"?n.country_id:Number.isFinite(Number(n.country_id))?Number(n.country_id):void 0,s=typeof n.country_name=="string"?n.country_name:void 0,a=typeof n.label=="string"&&n.label?n.label:void 0,c=s??(o!=null?AW.get(o):void 0);return c&&Nve.set(r,kW(c)),{id:r,name:i,label:a,country_id:o,country_name:s}}).filter(t=>t!==null):[]}function Pve(e,t,n={}){const r=q(),i=t?[...t].sort((o,s)=>o-s):void 0;return ue({queryKey:["city-search",e.trim().toLowerCase(),i??"all"],queryFn:async({signal:o})=>{const s={limit:20};e.trim()&&(s.q=e.trim()),i&&i.length>0&&(s.country_ids=i);const a=await ee.get("/cities/search",{headers:r,params:s,signal:o});return TW(a.data?.cities)},enabled:n.enabled??!0,staleTime:1e3*60,placeholderData:Hb})}function kve(e){return Array.isArray(e)?e.map(t=>{const n=t,r=typeof n.key=="string"?n.key:"",i=typeof n.name=="string"?n.name:"",o=Array.isArray(n.city_ids)?n.city_ids.map(Number).filter(s=>Number.isFinite(s)&&s>0):[];return!r||!i||o.length===0?null:{key:r,name:i,country_id:Number(n.country_id)||0,city_ids:o,city_count:Number(n.city_count)||o.length,truncated:n.truncated===!0}}).filter(t=>t!==null):[]}function Ave(e,t,n={}){const r=q(),i=t?[...t].sort((s,a)=>s-a):void 0,o=e.trim();return ue({queryKey:["region-search",o.toLowerCase(),i??"all"],queryFn:async({signal:s})=>{const a={q:o};i&&i.length>0&&(a.country_ids=i);const c=await ee.get("/regions/search",{headers:r,params:a,signal:s});return kve(c.data?.regions)},enabled:(n.enabled??!0)&&o.length>=3,staleTime:1e3*60*5})}function Tve(e){const t=q(),n=e&&e.length>0?[...e].sort((r,i)=>r-i):[];return ue({queryKey:["city-labels",n],queryFn:async({signal:r})=>{const i=await ee.get("/cities/search",{headers:t,params:{ids:n},signal:r});return TW(i.data?.cities)},enabled:n.length>0,staleTime:1e3*60*5})}function RW(){const e=q();return ue({queryKey:["countries-all"],queryFn:async({signal:t})=>{const r=(await ee.get("/countries",{headers:e,signal:t})).data?.countries;if(!Array.isArray(r))return[];const i=r.map(hA).filter(o=>o!==null);
623return i.forEach(o=>AW.set(o.id,kW(o.name))),i},staleTime:1e3*60*60})}function alt(e,t={}){const n=q();return ue({queryKey:["market-insights",e??"global"],queryFn:async({signal:r})=>{const i=await ee.get("/jobs/market-insights",{headers:n,signal:r,params:e?{country_id:e}:{}});if(!i.data?.insights)throw new Error("empty market insights payload");return i.data.insights},enabled:t.enabled??!0,staleTime:1e3*60*30,retry:1,placeholderData:Hb})}function llt(e){const t=q(),n=oe();return ue({queryKey:["job",e],queryFn:async({signal:r})=>{const o=(await ee.get(`/jobs/${encodeURIComponent(e)}`,{headers:t,signal:r})).data.data,s=n.getQueryData(["job",e]);return jve(o,s)},staleTime:0,enabled:!!e,retry:Rve,retryDelay:800})}function Rve(e,t){const n=t?.response?.status;return n!==void 0&&n!==404&&n<500?!1:e<2}function e2(e){return["job-filter-options",(e?[...e].sort((n,r)=>n-r):void 0)??"defaults",pA()]}async function t2(e,t,n){const r={timezone:pA()},o=(await ee.get("/job-search-filters",{headers:e,params:r,signal:n})).data,s=o?.filters?.all_available_options;if(s&&typeof s=="object")for(const a of Object.keys(s)){const c=s[a];Array.isArray(c)&&(bW.has(a)?s[a]=c.map(hA).filter(u=>u!==null):s[a]=c.map(wW))}return o}function Ove(e){const t=q(),n=e?[...e].sort((i,o)=>i-o):void 0,r=pA();return ue({queryKey:["job-filter-options",n??"defaults",r],queryFn:async({signal:i})=>{const o={timezone:r};n&&n.length>0&&(o.country_ids=n);const a=(await ee.get("/job-search-filters",{headers:t,params:o,signal:i})).data,c=a?.filters?.all_available_options;if(c&&typeof c=="object")for(const u of Object.keys(c)){const d=c[u];Array.isArray(d)&&(bW.has(u)?c[u]=d.map(hA).filter(f=>f!==null):c[u]=d.map(wW))}return a},staleTime:1e3*60*5,placeholderData:Hb})}function clt(e,t={}){const n=q(),r=oe(),i=t.enabled??!0;return XP({queryKey:Eve(e,t.search),enabled:i,queryFn:async({pageParam:o,signal:s})=>{const a=o,c=async(d,f)=>{const h=Cve({...e,page:d,page_size:f},t.search);return(await ee.post("/job-listing",h,{headers:{...n,"Content-Type":"application/json"},signal:s})).data},u=a<=1?await c(1,Hy*_W):await jW(a,d=>c(d,Hy));return[...u.data??[],...u.thin_results?.related_jobs??[]].forEach(d=>{r.setQueryData(["job",d.job_id],f=>Ew(f,d))}),u},initialPageParam:1,getNextPageParam:(o,s,a)=>EW(o,a,s),staleTime:NW,retry:CW})}function Ive(e,t){if(t==="profile_v2")return e;const n={...e};for(const r of bve)delete n[r];return n}function OW(e,t){return t.wholeCountry===!0&&t.rankingVariant==="profile_v2"&&(e.country_ids?.length??0)>0&&!e.city_ids?.length}function Mve(e,t){return["jobs-recommendations",Ive(e,t.rankingVariant),t.rankingVariant??"",t.mode,[...t.jobTitles].sort(),t.explain?"explain":"",OW(e,t)?"whole_country":""]}function $ve(e,t){const n={page:t.page,page_size:Hy,country_id:e.country_ids};return e.city_ids?.length&&(n.city_id=e.city_ids),e.work_type?.length&&(n.work_type=e.work_type),e.job_type?.length&&(n.employment_type=e.job_type),e.date_posted&&(n.date_posted=e.date_posted),e.sort_by==="most_recent"&&(n.sort_by="most_recent"),t.rankingVariant==="profile_v2"&&(e.company_name?.length&&(n.company_name=e.company_name),e.industry?.length&&(n.industry=e.industry),e.salary_range?.length&&(n.salary_range=e.salary_range),e.benefits?.length&&(n.benefits=e.benefits),e.experience_level?.length&&(n.experience_level=e.experience_level),e.job_function?.length&&(n.job_function=e.job_function),e.visa_sponsorship&&(n.visa_sponsorship=e.visa_sponsorship)),t.rankingVariant&&(n.ranking_variant=t.rankingVariant),t.explain&&(n.explain=1),OW(e,t)&&(n.whole_country=1),t.mode==="title"&&(n.mode="title",t.jobTitles.length&&(n.job_title=t.jobTitles)),n}function ult(e,t={}){const n=q(),r=oe(),i=(t.enabled??!0)&&(e.country_ids?.length??0)>0,o=t.mode??"skills",s=o==="title"?t.jobTitles??[]:[];return XP({queryKey:Mve(e,{rankingVariant:t.rankingVariant,mode:o,jobTitles:s,explain:t.explain,wholeCountry:t.wholeCountry}),enabled:i,queryFn:async({pageParam:a,signal:c})=>{const u=await jW(a,async d=>{const f=$ve(e,{page:d,rankingVariant:t.rankingVariant,mode:o,jobTitles:s,explain:t.explain,wholeCountry:t.wholeCountry});return(await ee.get("/jobs/recommendations",{headers:n,params:f,signal:c})).data});return u.data?.forEach(d=>
623{r.setQueryData(["job",d.job_id],f=>Ew(f,d))}),u},initialPageParam:1,getNextPageParam:(a,c,u)=>EW(a,u,c),staleTime:NW,retry:CW,retryDelay:a=>Math.min(1e3*2**a,4e3)})}const IW=4e3,fE=15e3,rS=new Map;function Dve(e,t,n){return JSON.stringify(_h(e,t,n))}async function hE(e,t,n,r,i,o,s=IW){const a=Dve(t,n,r),c=rS.get(a);if(c)return c;const u=(async()=>{try{return(await ee.post("/jobs/recommendations/warm",{country_id:t,city_ids:n??[],ranking_variant:r??"",source:i},{headers:e,timeout:s})).data}catch{return null}finally{rS.delete(a)}})();return rS.set(a,u),u}function dlt(e,t={}){const n=q(),r=v.useRef(n);r.current=n;const i=oe(),o=e.country_ids?.[0],s=(t.enabled??!0)&&!!o,a=_h(o,e.city_ids,t.rankingVariant);return ue({queryKey:a,enabled:s,queryFn:()=>{const c=hE(r.current,o,e.city_ids,t.rankingVariant,Pm.exploreJobs,void 0,fE);return c.then(u=>{u&&i.setQueryData(a,u)}),Promise.race([c,new Promise(u=>{setTimeout(()=>u(null),IW)})])},staleTime:1e3*60*5,retry:!1,refetchOnWindowFocus:!1})}function mA(e,t={}){const n=q(),r=oe(),i=t.resolveDefaults??!0,o=v.useRef(n);return o.current=n,v.useCallback(async()=>{const s=Eae();if(!i){const h=_h(void 0,[],s),p=r.fetchQuery({queryKey:h,queryFn:()=>hE(o.current,void 0,[],s,e,void 0,fE),staleTime:1e3*60*5,retry:!1}),m=r.fetchQuery({queryKey:e2(),queryFn:()=>t2(o.current,void 0,void 0),staleTime:0}).catch(()=>null),[g,y]=await Promise.all([p,m]),b=y?.filters?.default_values,{countryIds:x,cityIds:w}=JM(b),S=x?.[0];S&&r.setQueryData(_h(S,w??[],s),g);return}let a;try{a=(await r.fetchQuery({queryKey:e2(),queryFn:()=>t2(o.current,void 0,void 0),staleTime:0}))?.filters?.default_values}catch{return}const{countryIds:c,cityIds:u}=JM(a),d=c?.[0],f=_h(d,u??[],s);if(e===Pm.primaryCvChanged)r.removeQueries({queryKey:["jobs-recommendations-warm"]});else{const h=r.getQueryData(f);if(cW(h))return h}await r.fetchQuery({queryKey:f,queryFn:()=>hE(o.current,d,u,s,e,void 0,fE),staleTime:0,retry:!1})},[r,i,e])}function flt(){const e=q(),t=oe();return ie({mutationFn:async({jobId:n,save:r})=>{const i=`/jobs/${encodeURIComponent(n)}/save`;return(r?await ee.post(i,{},{headers:e}):await ee.delete(i,{headers:e})).data},onSuccess:(n,{jobId:r,save:i})=>{t.invalidateQueries({queryKey:["jobs"]}),t.invalidateQueries({queryKey:["job",r]}),t.invalidateQueries({queryKey:["saved-jobs"]}),i||t.invalidateQueries({queryKey:["recently-viewed"]})}})}function hlt(){const e=q(),t=oe();return ie({mutationFn:async n=>(await ee.post(`/jobs/${encodeURIComponent(n)}/not-interested`,{},{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:["jobs"]}),t.invalidateQueries({queryKey:["recently-viewed"]})}})}function Lve(e=!0){const t=q(),n=oe();return ue({queryKey:["saved-jobs"],enabled:e,queryFn:async({signal:r})=>{const i=await ee.get("/jobs/saved",{headers:t,signal:r});return i.data.data?.forEach(o=>{n.setQueryData(["job",o.job_id],s=>Ew(s,o))}),i.data},staleTime:0})}function Fve(e,t={}){const n=q(),r=oe(),i=e?.page,o=e?.page_size;return ue({queryKey:["recently-viewed",{page:i,pageSize:o}],enabled:t.enabled??!0,queryFn:async({signal:s})=>{const a=await ee.get("/jobs/recently-viewed",{headers:n,signal:s,params:{...i?{page:i}:{},...o?{page_size:o}:{}}});return a.data.data?.forEach(c=>{c.job&&r.setQueryData(["job",c.job_id],u=>Ew(u,c.job))}),a.data},staleTime:0})}function plt(){const e=q(),t=oe();return ie({onMutate:({jobId:n,payload:r,applyMyself:i})=>{if(!i||r?.action!=="apply_click"||!zr())return;const o=t.getQueryData(["job",n]);gve({job_id:n,title:o?.title,company:o?.company_name,job_url:o?.url,location:o?.location})},mutationFn:async({jobId:n,payload:r})=>(await ee.post(`/jobs/${encodeURIComponent(n)}/interactions`,r,{headers:{...e,"Content-Type":"application/json"}})).data,onError:()=>{}})}var Bve="Label",MW=v.forwardRef((e,t)=>l.jsx(Oe.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));MW.displayName=Bve;var $W=MW;const Uve=Nm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 "),Kt=v.forwardRef(({className:e,...t},n)=>l.jsx($W,{ref:n,className:K(Uve(),e),...t}));Kt.displayName=$W.displayName;const Le=v.forwardRef(({className:e,containerClassName:t,type:n,error:r,label:i,size:o,...s},a)=>l.jsxs("div",{className:K("flex flex-col",t),children:[l.jsx("input",{type:n,className:K(`flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 624 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm 625 file:font-medium file:text-foreground placeholder:text-muted-foreground placeholder:text-sm 626 md:placeholder:text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring 627 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm 628 placeholder:opacity-60 629 `,r&&"border-destructive",e),ref:a,...s}),l.jsx("span",{className:"text-destructive text-[10px] pl-2 pt-1 h-[10px]",children:r||""})]}));
629Le.displayName="Input";const iS=12;function zve({countryIds:e,value:t,onChange:n,placeholder:r="Search cityâ¦",variant:i="default",fill:o=!1,allowEmpty:s=!1,onChangeNamed:a,noCountryHint:c="Select a country to see cities.",regions:u=!1}){const[d,f]=v.useState(""),[h,p]=v.useState("");v.useEffect(()=>{const B=setTimeout(()=>p(d),250);return()=>clearTimeout(B)},[d]);const m=e.length>0,g=h.trim(),{data:y,isFetching:b}=Pve(h,e,{enabled:m&&g.length>0}),x=v.useMemo(()=>g.length>0?y??[]:[],[g,y]),{data:w}=Ave(h,e,{enabled:u&&m&&g.length>0}),S=v.useMemo(()=>u&&g.length>0?w??[]:[],[u,g,w]),[_,j]=v.useState(!1),{data:E=[]}=Tve(t),C=v.useMemo(()=>{const B=new Map;return E.forEach(I=>B.set(I.id,I.label||I.name)),x.forEach(I=>B.set(I.id,I.label||I.name)),B},[E,x]),N=v.useMemo(()=>{const B=new Map;return E.forEach(I=>B.set(I.id,I.name)),x.forEach(I=>B.set(I.id,I.name)),B},[E,x]),k=B=>{const I=t.includes(B)?t.filter(z=>z!==B):[...t,B];n(I),a?.(I.map(z=>({id:z,name:N.get(z)??""})))},P=B=>{const z=B.city_ids.every(H=>t.includes(H))?t.filter(H=>!B.city_ids.includes(H)):[...t,...B.city_ids.filter(H=>!t.includes(H))];n(z),a?.(z.map(H=>({id:H,name:N.get(H)??""})))},A=()=>{n([]),a?.([]),j(!1)},L=i==="chat";if(!m)return l.jsx("p",{className:K("py-1 text-xs","text-muted-foreground"),children:c});const R=t.length>iS&&!_,D=R?t.slice(0,iS-2):t,O=t.length>0&&l.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[D.map(B=>{const I=C.get(B)??String(B),z=t.length===1&&!s&&e.length===0;return l.jsxs("span",{className:K("inline-flex items-center gap-0.5 rounded-full bg-primary/15 pl-2.5 pr-0.5 py-0.5 text-xs font-medium text-primary",L&&"min-h-9"),children:[l.jsx("span",{className:"max-w-[140px] truncate",children:I}),!z&&l.jsx("button",{type:"button",onClick:H=>{H.stopPropagation(),k(B)},className:"inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full hover:bg-primary/20 hover:text-primary/80","aria-label":`Remove ${I}`,children:l.jsx(Dr,{size:14})})]},B)}),t.length>iS&&l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button",onClick:()=>j(B=>!B),className:"inline-flex min-h-8 items-center rounded-full px-2.5 text-xs font-medium text-primary hover:bg-primary/10",children:R?`+${t.length-D.length} more`:"Show fewer"}),l.jsx("button",{type:"button",onClick:A,className:"inline-flex min-h-8 items-center rounded-full px-2.5 text-xs text-muted-foreground hover:bg-muted",children:"Clear all"})]})]}),F=B=>B.truncated?`All of ${B.name} (first ${B.city_ids.length} of ${B.city_count} cities)`:`All of ${B.name} (${B.city_count} ${B.city_count===1?"city":"cities"})`,T=B=>B.city_ids.every(I=>t.includes(I)),M=x.length===0&&S.length===0,V=g.length===0?"Start typing to search cities":b?"Searchingâ¦":"No matching cities";return L?l.jsxs("div",{className:K("min-w-0 space-y-2",o&&"flex h-full min-h-0 flex-col"),children:[O,l.jsxs("div",{className:K("overflow-hidden rounded-xl border bg-background",o&&"flex min-h-0 flex-1 flex-col"),children:[l.jsxs("div",{className:"relative shrink-0 border-b",children:[l.jsx(Ea,{size:16,className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{type:"text",inputMode:"search",autoComplete:"off",autoCorrect:"off",spellCheck:!1,placeholder:r,value:d,onChange:B=>f(B.target.value),className:"h-11 w-full bg-transparent pl-10 pr-3 text-base outline-none placeholder:text-muted-foreground sm:text-sm focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"})]}),l.jsxs("div",{className:K("overflow-y-auto overscroll-contain py-1",o?"min-h-0 flex-1":"max-h-[min(13rem,36svh)] sm:max-h-56"),children:[S.map(B=>{const I=T(B);return l.jsxs("button",{type:"button",onClick:()=>P(B),className:K("flex min-h-11 w-full cursor-pointer items-center justify-between gap-2 px-3 text-left text-sm font-medium transition-colors sm:min-h-9",I?"bg-primary/5 text-primary":"text-foreground hover:bg-muted/60"),children:[l.jsx("span",{className:"min-w-0 truncate",children:F(B)}),I&&l.jsx(bo,{size:16,className:"shrink-0"})]},B.key)}),M?l.jsx("p",{className:"px-3 py-2.5 text-xs text-muted-foreground",children:V}):x.map(B=>{const I=t.includes(B.id);return l.jsxs("button",{type:"button",onClick:()=>k(B.id),className:K("flex min-h-11 w-full cursor-pointer items-center justify-between gap-2 px-3 text-left text-sm transition-colors sm:min-h-9",I?"bg-primary/5 font-medium text-primary":"text-foreground hover:bg-muted/60"),
629children:[l.jsxs("span",{className:"min-w-0 truncate",children:[B.label||B.name,!B.label&&B.country_name?l.jsx("span",{className:"text-muted-foreground",children:` · ${B.country_name}`}):null]}),I&&l.jsx(bo,{size:16,className:"shrink-0"})]},B.id)})]})]})]}):l.jsxs("div",{className:"space-y-2",children:[O,l.jsxs("div",{className:"relative",children:[l.jsx(Ea,{size:13,className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),l.jsx(Le,{placeholder:r,value:d,onChange:B=>f(B.target.value),className:"h-9 bg-card pl-7 text-sm"})]}),l.jsxs("div",{className:"max-h-44 space-y-2 overflow-y-auto overscroll-contain pr-1",children:[S.map(B=>{const I=`region-${B.key}`;return l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(ql,{id:I,checked:T(B),onCheckedChange:()=>P(B),className:"h-[18px] w-[18px] shrink-0"}),l.jsx(Kt,{htmlFor:I,className:"cursor-pointer truncate text-sm font-medium leading-tight text-foreground",children:F(B)})]},B.key)}),M?l.jsx("p",{className:"py-1 text-xs text-muted-foreground",children:V}):x.map(B=>{const I=`city-${B.id}`;return l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(ql,{id:I,checked:t.includes(B.id),onCheckedChange:()=>k(B.id),className:"h-[18px] w-[18px] shrink-0"}),l.jsxs(Kt,{htmlFor:I,className:"cursor-pointer truncate text-sm font-normal leading-tight text-muted-foreground",children:[B.label||B.name,!B.label&&B.country_name?l.jsx("span",{className:"text-muted-foreground",children:` · ${B.country_name}`}):null]})]},B.id)})]})]})}function Vve({id:e,countryId:t,countryName:n,cities:r,onChange:i,variant:o}){const s=new Map(r.map(c=>[c.id,c.name])),a=n.trim();return l.jsxs("div",{className:"space-y-2","data-testid":e,children:[l.jsx(Kt,{className:"text-sm font-medium",children:a?`Cities in ${a}`:"Cities"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave empty to search the whole country."}),l.jsx(zve,{countryIds:t?[t]:[],value:r.map(c=>c.id),onChange:()=>{},onChangeNamed:c=>i(c.map(u=>({id:u.id,name:s.get(u.id)||u.name})).filter(u=>u.name)),allowEmpty:!0,variant:o,placeholder:"Search cityâ¦",noCountryHint:a?"Enter a country we recognise to add cities.":"Enter a country to add cities."})]})}const Cw=Nm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-[color,background-color,border-color,box-shadow] duration-fast ease-brand focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:bg-primary/95",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-primary bg-background text-primary font-semibold hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/70",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{xs:"h-6 px-2 text-xs rounded-sm",sm:"h-7 px-3 text-sm rounded-sm",default:"h-10 px-6 py-2 text-base",md:"h-9 px-4 text-sm rounded-md",lg:"h-11 px-8 text-lg rounded-md",xl:"h-12 px-10 text-xl rounded-lg",icon:"h-10 w-10 p-0"}},defaultVariants:{variant:"default",size:"default"}}),G=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isLoading:i=!1,children:o,...s},a)=>{const c=r?Bi:"button";return l.jsx(c,{className:K(Cw({variant:t,size:n,className:e})),ref:a,disabled:i,...s,children:i?l.jsx(ft,{size:16,variant:"current",spin:!0,title:"Loading"}):o})});G.displayName="Button";function Nh(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function qve(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Kve(...e){return t=>e.forEach(n=>qve(n,t))}function Nw(...e){return v.useCallback(Kve(...e),e)}function Wve(e,t){const n=v.createContext(t),r=o=>{const{children:s,...a}=o,c=v.useMemo(()=>a,Object.values(a));return l.jsx(n.Provider,{value:c,children:s})};r.displayName=e+"Provider";function i(o){const s=v.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function Hve(e,t=[]){let n=[];function r(o,s){const a=v.createContext(s),c=n.length;n=[...n,s];const u=f=>{const{scope:h,children:p,...m}=f,g=h?.[e]?.[c]||a,y=v.useMemo(()=>m,Object.values(m));return l.jsx(g.Provider,{value:y,children:p})};u.displayName=o+"Provider";function d(f,h){const p=h?.[e]?.[c]||a,m=v.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[u,d]}const i=()=>{const o=n.map(s=>v.createContext(s));return function(a){const c=a?.[e]||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,Gve(i,...t)]}function Gve(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var Gy=globalThis?.document?v.useLayoutEffect:()=>{},Yve=XN.useId||(()=>{}),Qve=0;function oS(e){const[t,n]=v.useState(Yve());return Gy(()=>{e||n(r=>r??String(Qve++))},[e]),e||(t?`radix-${t}`:"")}function DW(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>t.current?.(...n),[])}function Jve({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Xve({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=DW(n),c=v.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else i(u)},[o,e,i,a]);return[s,c]}function Xve({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,i=v.useRef(r),o=DW(t);return v.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var Zve=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],qd=Zve.reduce((e,t)=>
vendor: 4,353 bytes, line 629
629{const n=v.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Bi:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),eye="Portal",LW=v.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=v.useState(!1);Gy(()=>o(!0),[]);const s=n||i&&globalThis?.document?.body;return s?Iz.createPortal(l.jsx(qd.div,{...r,ref:t}),s):null});LW.displayName=eye;function tye(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Pw=e=>{const{present:t,children:n}=e,r=nye(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=Nw(r.ref,rye(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};Pw.displayName="Presence";function nye(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),o=v.useRef("none"),s=e?"mounted":"unmounted",[a,c]=tye(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=qg(r.current);o.current=a==="mounted"?u:"none"},[a]),Gy(()=>{const u=r.current,d=i.current;if(d!==e){const h=o.current,p=qg(u);e?c("MOUNT"):p==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Gy(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const g=qg(r.current).includes(p.animationName);if(p.target===t&&g&&(c("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=p=>{p.target===t&&(o.current=qg(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function qg(e){return e?.animationName||"none"}function rye(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sS=0;function iye(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??n2()),document.body.insertAdjacentElement("beforeend",e[1]??n2()),sS++,()=>{sS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),sS--}},[])}function n2(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var FW=nq(),aS=function(){},kw=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:aS,onWheelCapture:aS,onTouchMoveCapture:aS}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,x=e.gapMode,w=Mk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,_=tq([n,t]),j=In(In({},w),i);return v.createElement(v.Fragment,null,d&&v.createElement(S,{sideCar:FW,removeScrollBar:u,shards:f,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:x}),s?v.cloneElement(v.Children.only(a),In(In({},j),{ref:_})):v.createElement(b,In({},j,{className:c,ref:_}),a))});kw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};kw.classNames={fullWidth:Eh,zeroRight:jh};var pE=!1;if(typeof window<"u")try{var Kg=Object.defineProperty({},"passive",{get:function(){return pE=!0,!0}});window.addEventListener("test",Kg,Kg),window.removeEventListener("test",Kg,Kg)}catch{pE=!1}var Sc=pE?{passive:!1}:!1,oye=function(e){return e.tagName==="TEXTAREA"},BW=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!oye(e)&&n[t]==="visible")},sye=function(e){return BW(e,"overflowY")}
vendor: 4,745 bytes, lines 629-632
629,aye=function(e){return BW(e,"overflowX")},r2=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=UW(e,r);if(i){var o=zW(e,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},lye=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},cye=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},UW=function(e,t){return e==="v"?sye(t):aye(t)},zW=function(e,t){return e==="v"?lye(t):cye(t)},uye=function(e,t){return e==="h"&&t==="rtl"?-1:1},dye=function(e,t,n,r,i){var o=uye(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,c=t.contains(a),u=!1,d=s>0,f=0,h=0;do{var p=zW(e,a),m=p[0],g=p[1],y=p[2],b=g-y-o*m;(m||b)&&UW(e,a)&&(f+=b,h+=m),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!i)||!d&&(Math.abs(h)<1||!i))&&(u=!0),u},Wg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},i2=function(e){return[e.deltaX,e.deltaY]},o2=function(e){return e&&"current"in e?e.current:e},fye=function(e,t){return e[0]===t[0]&&e[1]===t[1]},hye=function(e){return` 630 .block-interactivity-`.concat(e,` {pointer-events: none;} 631 .allow-interactivity-`).concat(e,` {pointer-events: all;} 632`)},pye=0,jc=[];function mye(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(pye++)[0],o=v.useState($k)[0],s=v.useRef(e);v.useEffect(function(){s.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var g=eq([e.lockRef.current],(e.shards||[]).map(o2),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=v.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var b=Wg(g),x=n.current,w="deltaX"in g?g.deltaX:x[0]-b[0],S="deltaY"in g?g.deltaY:x[1]-b[1],_,j=g.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in g&&E==="h"&&j.type==="range")return!1;var C=r2(E,j);if(!C)return!0;if(C?_=E:(_=E==="v"?"h":"v",C=r2(E,j)),!C)return!1;if(!r.current&&"changedTouches"in g&&(w||S)&&(r.current=_),!_)return!0;var N=r.current||_;return dye(N,y,g,N==="h"?w:S,!0)},[]),c=v.useCallback(function(g){var y=g;if(!(!jc.length||jc[jc.length-1]!==o)){var b="deltaY"in y?i2(y):Wg(y),x=t.current.filter(function(_){return _.name===y.type&&(_.target===y.target||y.target===_.shadowParent)&&fye(_.delta,b)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}if(!x){var w=(s.current.shards||[]).map(o2).filter(Boolean).filter(function(_){return _.contains(y.target)}),S=w.length>0?a(y,w[0]):!s.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),u=v.useCallback(function(g,y,b,x){var w={name:g,delta:y,target:b,should:x,shadowParent:gye(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=v.useCallback(function(g){n.current=Wg(g),r.current=void 0},[]),f=v.useCallback(function(g){u(g.type,i2(g),g.target,a(g,e.lockRef.current))},[]),h=v.useCallback(function(g){u(g.type,Wg(g),g.target,a(g,e.lockRef.current))},[]);v.useEffect(function(){return jc.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Sc),document.addEventListener("touchmove",c,Sc),document.addEventListener("touchstart",d,Sc),function(){jc=jc.filter(function(g){return g!==o}),document.removeEventListener("wheel",c,Sc),document.removeEventListener("touchmove",c,Sc),document.removeEventListener("touchstart",d,Sc)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(o,{styles:hye(i)}):null,p?v.createElement(sq,{gapMode:e.gapMode}):null)}function gye(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const vye=iq(FW,mye);var VW=v.forwardRef(function(e,t){return v.createElement(kw,In({},e,{ref:t,sideCar:vye}))});VW.classNames=kw.classNames;var gA="Dialog",[qW,KW]=Hve(gA),[yye,Yi]=qW(gA),WW=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=v.useRef(null),c=v.useRef(null),[u=!1,d]=Jve({prop:r,defaultProp:i,onChange:o});return l.jsx(yye,{scope:t,triggerRef:a,contentRef:c,contentId:oS(),titleId:oS(),descriptionId:oS(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(f=>!f),[d]),modal:s,children:n})};WW.displayName=gA;var HW="DialogTrigger",GW=v.forwardRef((e,t)=>
vendor: 5,401 bytes, lines 632-636
632{const{__scopeDialog:n,...r}=e,i=Yi(HW,n),o=Nw(t,i.triggerRef);return l.jsx(qd.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":xA(i.open),...r,ref:o,onClick:Nh(e.onClick,i.onOpenToggle)})});GW.displayName=HW;var vA="DialogPortal",[xye,YW]=qW(vA,{forceMount:void 0}),QW=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Yi(vA,t);return l.jsx(xye,{scope:t,forceMount:n,children:v.Children.map(r,s=>l.jsx(Pw,{present:n||o.open,children:l.jsx(LW,{asChild:!0,container:i,children:s})}))})};QW.displayName=vA;var Yy="DialogOverlay",JW=v.forwardRef((e,t)=>{const n=YW(Yy,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Yi(Yy,e.__scopeDialog);return o.modal?l.jsx(Pw,{present:r||o.open,children:l.jsx(bye,{...i,ref:t})}):null});JW.displayName=Yy;var bye=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Yi(Yy,n);return l.jsx(VW,{as:Bi,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(qd.div,{"data-state":xA(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Gl="DialogContent",XW=v.forwardRef((e,t)=>{const n=YW(Gl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Yi(Gl,e.__scopeDialog);return l.jsx(Pw,{present:r||o.open,children:o.modal?l.jsx(wye,{...i,ref:t}):l.jsx(_ye,{...i,ref:t})})});XW.displayName=Gl;var wye=v.forwardRef((e,t)=>{const n=Yi(Gl,e.__scopeDialog),r=v.useRef(null),i=Nw(t,n.contentRef,r);return v.useEffect(()=>{const o=r.current;if(o)return cw(o)},[]),l.jsx(ZW,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Nh(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Nh(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:Nh(e.onFocusOutside,o=>o.preventDefault())})}),_ye=v.forwardRef((e,t)=>{const n=Yi(Gl,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return l.jsx(ZW,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;n.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),ZW=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=Yi(Gl,n),c=v.useRef(null),u=Nw(t,c);return iye(),l.jsxs(l.Fragment,{children:[l.jsx(rw,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:l.jsx(nw,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":xA(a.open),...s,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(jye,{titleId:a.titleId}),l.jsx(Cye,{contentRef:c,descriptionId:a.descriptionId})]})]})}),yA="DialogTitle",eH=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Yi(yA,n);return l.jsx(qd.h2,{id:i.titleId,...r,ref:t})});eH.displayName=yA;var tH="DialogDescription",nH=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Yi(tH,n);return l.jsx(qd.p,{id:i.descriptionId,...r,ref:t})});nH.displayName=tH;var rH="DialogClose",iH=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Yi(rH,n);return l.jsx(qd.button,{type:"button",...r,ref:t,onClick:Nh(e.onClick,()=>i.onOpenChange(!1))})});iH.displayName=rH;function xA(e){return e?"open":"closed"}var oH="DialogTitleWarning",[Sye,sH]=Wve(oH,{contentName:Gl,titleName:yA,docsSlug:"dialog"}),jye=({titleId:e})=>{const t=sH(oH),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 633 634If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 635 636For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Eye="DialogDescriptionWarning",Cye=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${sH(Eye).contentName}}.`;return v.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Aw=WW,Tw=GW,Rw=QW,Kd=JW,Wd=XW,Hd=eH,Gd=nH,Yd=iH;const At=Aw,Nye=Tw,aH=Rw,Pye=Yd,bA=v.forwardRef(({className:e,...t},n)=>l.jsx(Kd,{ref:n,className:K("fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));bA.displayName=Kd.displayName;const xt=v.forwardRef(({className:e,children:t,hideClose:n=!1,...r},i)=>l.jsxs(aH,{children:[l.jsx(bA,{}),l.jsxs(Wd,{ref:i,className:K("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
636nded-lg",e),...r,children:[t,!n&&l.jsxs(Yd,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(Dr,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));xt.displayName=Wd.displayName;const Wt=({className:e,...t})=>l.jsx("div",{className:K("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Wt.displayName="DialogHeader";const pr=({className:e,...t})=>l.jsx("div",{className:K("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});pr.displayName="DialogFooter";const Ft=v.forwardRef(({className:e,...t},n)=>l.jsx(Hd,{ref:n,className:K("text-lg font-semibold leading-none tracking-tight",e),...t}));Ft.displayName=Hd.displayName;const Bt=v.forwardRef(({className:e,...t},n)=>l.jsx(Gd,{ref:n,className:K("text-sm text-muted-foreground",e),...t}));Bt.displayName=Gd.displayName;const mlt=Object.freeze(Object.defineProperty({__proto__:null,Dialog:At,DialogClose:Pye,DialogContent:xt,DialogDescription:Bt,DialogFooter:pr,DialogHeader:Wt,DialogOverlay:bA,DialogPortal:aH,DialogTitle:Ft,DialogTrigger:Nye},Symbol.toStringTag,{value:"Module"})),lH=Aw,glt=Tw,kye=Rw,cH=v.forwardRef(({className:e,...t},n)=>l.jsx(Kd,{className:K("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));cH.displayName=Kd.displayName;const Aye=Nm("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),wA=v.forwardRef(({side:e="right",className:t,style:n,children:r,hideClose:i=!1,...o},s)=>l.jsxs(kye,{children:[l.jsx(cH,{className:"opacity-50"}),l.jsxs(Wd,{ref:s,className:K(Aye({side:e}),t),style:{...e!=="bottom"?{paddingTop:"env(safe-area-inset-top)"}:{},...n},...o,children:[r,!i&&l.jsxs(Yd,{className:"absolute right-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",style:{top:"calc(1rem + env(safe-area-inset-top))"},children:[l.jsx(Dr,{className:"h-6 w-6"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));wA.displayName=Wd.displayName;const Tye=({className:e,...t})=>l.jsx("div",{className:K("flex flex-col space-y-2 text-center sm:text-left",e),...t});Tye.displayName="SheetHeader";const uH=v.forwardRef(({className:e,...t},n)=>l.jsx(Hd,{ref:n,className:K("text-lg font-semibold text-foreground",e),...t}));uH.displayName=Hd.displayName;const dH=v.forwardRef(({className:e,...t},n)=>l.jsx(Gd,{ref:n,className:K("text-sm text-muted-foreground",e),...t}));dH.displayName=Gd.displayName;function fH(){return v.useSyncExternalStore(Xme,ZK,()=>0)}const Rye="data-keyboard-managed",Oye=350,Iye=120,Qy="keyboard-inset-spacer";function Mye(e){let t=document.getElementById(Qy);t||(t=document.createElement("div"),t.id=Qy,t.setAttribute("aria-hidden","true"),t.style.pointerEvents="none",document.body.appendChild(t)),t.style.height=`${e}px`}function s2(){document.getElementById(Qy)?.remove()}function $ye(){const e=document.activeElement;if(!XK(e)||e.closest(`[${Rye}]`))return 0;const t=ZK();if(t<=0)return 0;const n=Gme(e.getBoundingClientRect(),Wme(t));return n===0?0:(n>0&&Mye(t),window.scrollBy({top:n,behavior:"auto"}),n)}function Dye(){const e=fH(),t=v.useRef(void 0),n=v.useCallback(r=>{window.clearTimeout(t.current),t.current=window.setTimeout($ye,r)},[]);v.useEffect(()=>{const r=i=>{XK(i.target)&&n(Oye)};return document.addEventListener("focusin",r),()=>{document.removeEventListener("focusin",r),window.clearTimeout(t.current),s2
636()}},[n]),v.useEffect(()=>{if(e>0){const r=document.getElementById(Qy);r&&(r.style.height=`${e}px`),n(Iye)}else s2()},[e,n])}const Lye=300;function _A({open:e,onOpenChange:t,title:n,description:r,children:i,doneLabel:o="Done",footer:s,testId:a}){const c=Zme(e),u=fH(),d=ege(c,u),f=h=>{const p=h.target;if(p.tagName!=="INPUT"||p.type==="checkbox")return;const m=p.closest("[data-picker-section]")??p;window.setTimeout(()=>{m.isConnected&&m.scrollIntoView?.({block:"start",behavior:"smooth"})},Lye)};return l.jsx(lH,{open:e,onOpenChange:t,children:l.jsxs(wA,{side:"bottom",hideClose:!0,"data-testid":a,"data-keyboard-managed":!0,style:tge(d),className:"flex flex-col gap-0 rounded-t-2xl p-0",onOpenAutoFocus:h=>h.preventDefault(),children:[l.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3 border-b border-border px-4 py-2",children:[l.jsx(uH,{className:"text-base font-semibold",children:n}),l.jsx(dH,{className:"sr-only",children:r??`Choose ${n.toLowerCase()}. Changes apply straight away.`}),l.jsx("button",{type:"button",onClick:()=>t(!1),"aria-label":"Close",className:"-mr-2 inline-flex h-11 w-11 items-center justify-center rounded-full text-muted-foreground hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",children:l.jsx(Dr,{size:20,"aria-hidden":!0})})]}),l.jsx("div",{onFocusCapture:f,className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-4",children:l.jsx(eW.Provider,{value:!0,children:i})}),l.jsx("div",{className:"shrink-0 border-t border-border bg-background px-4 pt-3",style:{paddingBottom:"calc(0.75rem + env(safe-area-inset-bottom))"},children:s??l.jsx("button",{type:"button",onClick:()=>t(!1),className:K("inline-flex h-12 w-full items-center justify-center rounded-xl bg-primary text-sm font-bold text-primary-foreground","hover:bg-primary/90 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40"),children:o})})]})})}let a2=0;function hH(){return a2+=1,`place-${a2}`}function pH(){return{key:hH(),countryName:"",cities:[]}}function mE(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function ya(e){return e.trim().toLowerCase()}function Fye(e,t){const n=new Map((t??[]).map(s=>[ya(s.name),s])),r=new Map((t??[]).map(s=>[s.id,s])),i=sA(e).map(s=>{const a=s.countryId?r.get(s.countryId):n.get(ya(s.countryName));return{key:hH(),countryId:s.countryId??a?.id,countryName:s.countryName||a?.name||"",cities:s.cities}}
636),o=mE(e?.application);return{rows:i.length>0?i:[pH()],openToRelocating:o.willing_to_relocate===!0||o.willing_to_relocate==="true"}}function SA(e){const t=new Set,n=[];for(const r of e){if(!r.countryId&&!r.countryName.trim())continue;const i=r.countryId?`id:${r.countryId}`:`name:${ya(r.countryName)}`;t.has(i)||(t.add(i),n.push(r))}return n}function Bye(e){return SA(e.rows).length===0?"Add at least one country.":null}function Uye(e,t){const n={...mE(e?.application)},r=Array.isArray(n.search_locations)?n.search_locations.map(mE):[],i=s=>r.find(a=>{const c=Number(a.country_id);return s.countryId&&Number.isInteger(c)&&c>0?c===s.countryId:typeof a.country_name=="string"&&ya(a.country_name)===ya(s.countryName)});n.search_locations=SA(t.rows).map(s=>{const a={...i(s)??{}};return s.countryId?a.country_id=s.countryId:delete a.country_id,a.country_name=s.countryName.trim(),s.cities.length>0?a.cities=s.cities.map(c=>({city_id:c.id,city_name:c.name})):delete a.cities,a}),t.openToRelocating?n.willing_to_relocate=!0:(n.willing_to_relocate===!0||n.willing_to_relocate==="true")&&(n.willing_to_relocate=!1);const o={application:n};return e?.profile!==void 0&&(o.profile=e.profile),o}function vlt(e){return SA(e.rows).map(t=>{const n=_w(t.countryName)||t.countryName.trim(),r=t.cities.map(i=>i.name.trim()).filter(Boolean);return r.length>0?`${n} (${r.join(", ")})`:n}).join(", ")}const zye=["United Kingdom","United States","Canada","India","Australia","Germany","Ireland","Netherlands","Singapore","United Arab Emirates","France"],Vye={"united kingdom":["uk","gb","great britain","britain","england","scotland","wales"],"united states":["us","usa","america"],"united states of america":["us","usa","america"],"united arab emirates":["uae","emirates","dubai"],netherlands:["holland"]};function qye(e,t={}){const n=new Map(e.map(c=>[ya(c.name),c])),r=new Map(e.map(c=>[c.id,c])),i=[],o=c=>{c&&!i.some(u=>u.id===c.id)&&i.push(c)};t.cvCountryName&&o(n.get(ya(t.cvCountryName)));for(const c of t.chosenIds??[])o(r.get(c));for(const c of zye)o(n.get(ya(c))??(c==="United States"?n.get("united states of america"):void 0));const s=new Set(i.map(c=>c.id)),a=e.filter(c=>!s.has(c.id)).sort((c,u)=>c.name.localeCompare(u.name));return{suggested:i,rest:a}}function Kye(e,t){const n=t.trim().toLowerCase();if(!n)return[...e];const r=i=>{const o=i.name.toLowerCase();return o.startsWith(n)?0:(Vye[o]??[]).some(s=>s===n||s.startsWith(n))?1:o.split(/[\s(),-]+/).some(s=>s.startsWith(n))?2:o.includes(n)?3:-1};return e.map((i,o)=>({c:i,i:o,r:r(i)})).filter(i=>i.r>=0).sort((i,o)=>i.r-o.r||i.i-o.i).map(i=>i.c)}function Wye(e,t){if(!e||e.default_source&&e.default_source!=="cv")return;const n=e.default_country_name?.trim();if(n)return n;const r=e.default_country_id;return r?t?.find(i=>i.id===r)?.name:void 0}function Hye({id:e,countryId:t,countryName:n,countries:r,takenIds:i,cvCountryName:o,onSelect:s}){const a=Sw(),[c,u]=v.useState(!1),d=v.useRef(null),f=n.trim(),h=g=>{u(!1),g&&window.setTimeout(()=>d.current?.focus({preventScroll:!0}),0)},p=g=>{s(g),h(!0)},m=l.jsx(Gye,{countries:r,takenIds:i,selectedId:t,cvCountryName:o,autoFocus:!a,fill:a,onPick:p,onEscape:()=>h(!0)});return l.jsxs("div",{className:"relative min-w-0",children:[l.jsxs("button",{ref:d,id:e,type:"button","aria-haspopup":"listbox","aria-expanded":c,onClick:()=>u(g=>!g),className:"flex h-11 w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-md border border-input bg-background px-3 text-left text-base outline-none focus-visible:ring-2 focus-visible:ring-ring sm:text-sm","data-testid":"country-combobox",children:[l.jsx("span",{className:K("truncate",!f&&"text-muted-foreground"),children:f||"Choose a country"}),l.jsx(Td,{className:"size-4 shrink-0 opacity-60","aria-hidden":!0})]}),a?l.jsx(_A,{open:c,onOpenChange:g=>g?u(!0):h(!0),title:"Choose a country",description:"Type to find a country.",doneLabel:"Cancel",testId:"country-combobox-sheet",children:m}):c?l.jsx("div",{className:"mt-1 rounded-md border border-border bg-popover shadow-md",onBlur:g=>{!g.currentTarget.contains(g.relatedTarget)&&g.relatedTarget!==d.current&&h(!1)},children:m}):null]})}function Gye({countries:e,takenIds:t,selectedId:n,cvCountryName:r,autoFocus:i,fill:o,onPick:s,onEscape:a}){const[c,u]=v.useState(""),[d,f]=v.useState(0),h=v.useId(),p=v.useRef(null),m=v.useMemo(()=>[...n?[n]:[],...t],[n,t]),g=v.useMemo(()=>qye(e,{cvCountryName:r,chosenIds:m}),[e,r,m]),y=c.trim()!=="",b=v.useMemo(()=>y?Kye([...g.suggested,...g.rest],c):[],[y,g,c]),x=y?b:[...g.suggested,...g.rest],w=C=>!t.has(C.id)||C.id===n;v.useEffect(()=>f(0),[c]),v.useEffect(()=>{p.current?.querySelector(`[data-index="${d}"]`)?.scrollIntoView?.({block:"nearest"})},[d]);const S=C=>{if(C.key==="ArrowDown")C.preventDefault(),f(N=>Math.min(x.length-1,N+1));else if(C.key==="ArrowUp")C.preventDefault(),f(N=>Math.max(0,N-1));else if(C.key==="Enter"){C.preventDefault();const N=x[d];N&&w(N)&&s(N)}else C.key==="Escape"&&(C.preventDefault(),C.stopPropagation(),a())};let _=-1;const j=C=>{_+=1;const N=_,k=!w(C),P=C.id===n;return l.jsxs("li",{id:`${h}-${N}`,role:"option","data-index":N,"aria-selected":P,"aria-disabled":k||void 0,onMouseDown:A=>A.preventDefault(),onClick:()=>!k&&s(C),className:K("flex min-h-11 cursor-pointer items-center justify-between gap-2 px-3 text-sm sm:min-h-9",N===d&&"bg-muted",P&&"font-semibold text-primary",k&&"cursor-not-allowed opacity-50"),children:[l.jsx("span",{className:"min-w-0 truncate",children:C.name}),P?l.jsx(bo,{className:"size-4 shrink-0","aria-hidden":!0}):null,k?l.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:"Added"}):null]},C.id)},E=C=>l.jsx("li",{role:"presentation",className:"px-3 pb-1 pt-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:C});return l.jsxs("div",{className:K("flex min-h-0 flex-col",o&&"h-full"),"data-picker-section":!0,children:[l.jsxs("div",{className:"relative shrink-0 border-b border-border",children:[l.jsx(Ea,{className:"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground","aria-hidden":!0}),l.jsx("input",{type:"text",role:"combobox","aria-label":"Search countries","aria-expanded":!0,"aria-controls":h,"aria-activedescendant":x.length>0?`${h}-${d}`:void 0,autoFocus:i,autoComplete:"off",enterKeyHint:"search",value:c,onChange:C=>u(C.target.value),onKeyDown:S,placeholder:"Type a country",className:"h-11 w-full bg-transparent pl-9 pr-3 text-base outline-none placeholder:text-muted-foreground sm:text-sm","data-testid":"country-combobox-search"})]}),l.jsx("ul",{ref:p,id:h,role:"listbox","aria-label":"Countries",className:K("overflow-y-auto overscroll-contain py-1",o?"min-h-0 flex-1":"max-h-64"),children:y?b.length===0?l.jsx("li",{className:"px-3 py-2 text-sm text-muted-foreground",children:"No countries found"}):b.map(j):l.jsxs(l.Fragment,{children:[g.suggested.length>0?E("Suggested"):null,g.suggested.map(j),g.rest.length>0?E("All countries"):null,g.rest.map(j)]})})]})}const l2="Where you want to work",Yye="Saved. Your matches will update.",Qye=[["auto-apply-profile"],["jobs-recommendations"],["jobs-recommendations-warm"],["jobs"],["job-filter-options"]];function Jye(e){if(ot.isAxiosError(e)){const t=e.response?.data?.error;if(t?.trim())return t}return"Couldn't save. Please try again."}function Xye({row:e,index:t,countries:n,takenIds:r,canRemove:i,cvCountryName:o,onChange:s,onRemove:a}
636){const c=`wyw-country-${t}`,u=v.useMemo(()=>new Set([...r].filter(d=>d!==e.countryId)),[r,e.countryId]);return l.jsxs("div",{className:"space-y-3 border-b border-border pb-4 last:border-b-0 last:pb-0","data-testid":"wyw-row","data-picker-section":!0,children:[l.jsxs("div",{className:"flex items-end gap-2",children:[l.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[l.jsx(Kt,{htmlFor:c,children:"Country"}),l.jsx(Hye,{id:c,countryId:e.countryId,countryName:e.countryName,countries:n,takenIds:u,cvCountryName:o,onSelect:d=>{d.id!==e.countryId&&s({...e,countryId:d.id,countryName:d.name,cities:[]})}})]}),l.jsx(G,{type:"button",variant:"ghost",size:"icon",className:"size-11 shrink-0 cursor-pointer","aria-label":e.countryName?`Remove ${e.countryName}`:"Remove country",disabled:!i,onClick:a,children:l.jsx(Kse,{className:"size-4"})})]}),l.jsx(Vve,{id:`wyw-cities-${t}`,countryId:e.countryId,countryName:e.countryName,cities:e.cities,onChange:d=>s({...e,cities:d}),variant:"chat"})]})}const c2="Pick the countries you want jobs in. Add cities to narrow a country down.";function Zye({draft:e,setDraft:t,countries:n,error:r,onNavigateAway:i,cvCountryName:o}){const s=new Set(e.rows.map(c=>c.countryId).filter(c=>typeof c=="number")),a=c=>t(u=>u&&c(u));return l.jsxs("div",{className:"space-y-4",children:[e.rows.map((c,u)=>l.jsx(Xye,{row:c,index:u,countries:n,takenIds:s,canRemove:e.rows.length>1,cvCountryName:o,onChange:d=>a(f=>({...f,rows:f.rows.map(h=>h.key===c.key?d:h)})),onRemove:()=>a(d=>({...d,rows:d.rows.filter(f=>f.key!==c.key)}))},c.key)),r?l.jsx("p",{className:"text-sm text-destructive",role:"alert",children:r}):null,l.jsxs(G,{type:"button",variant:"outline",className:"h-11 cursor-pointer",onClick:()=>a(c=>({...c,rows:[...c.rows,pH()]})),children:[l.jsx(Jb,{className:"size-4"}),"Add country"]}),l.jsxs("div",{className:"flex min-h-11 items-center justify-between gap-3 rounded-lg border border-border px-3 py-2",children:[l.jsx(Kt,{htmlFor:"wyw-relocate",className:"cursor-pointer text-sm font-medium",children:"I'm open to relocating"}),l.jsx(rk,{id:"wyw-relocate",checked:e.openToRelocating,onCheckedChange:c=>a(u=>({...u,openToRelocating:c}))})]}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Want us to apply for you?"," ",l.jsx(Re,{to:gle(),onClick:i,className:"font-semibold text-primary hover:underline",children:"Set up auto-apply"})]})]})}function exe({open:e,onOpenChange:t,onSaved:n}){const r=Sw(),i=oe(),o=oA(e),{data:s,isFetched:a}=RW(),c=bme(),u=Ove().data?.filters?.default_values,[d,f]=v.useState(null),[h,p]=v.useState(null),m=o.isFetched||o.isError;v.useEffect(()=>{if(!e){f(null),p(null);return}d||!m||!a||f(Fye(o.data,s))},[e,d,m,a,o.data,s]);const g=async()=>{if(!d)return;const x=Bye(d);if(x){p(x);return}const w=Uye(o.data,d);try{await c.mutateAsync(w)}catch(S){p(Jye(S));return}for(const S of Qye)i.invalidateQueries({queryKey:[...S]});Q.success(Yye),n?.(w),t(!1)},y=d?l.jsx(Zye,{draft:d,setDraft:x=>{p(null),f(x)},countries:s??[],error:h,onNavigateAway:()=>t(!1),cvCountryName:Wye(u,s)}):l.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"Loadingâ¦"}),b=l.jsx(G,{type:"button",className:"h-12 w-full cursor-pointer rounded-xl text-sm font-bold sm:h-11 sm:w-auto",disabled:!d||c.isPending,onClick:()=>void g(),children:c.isPending?"Savingâ¦":"Save"});return r?l.jsx(_A,{open:e,onOpenChange:t,title:l2,description:c2,footer:b,testId:"where-you-work-sheet",children:y}):l.jsx(At,{open:e,onOpenChange:t,children:l.jsxs(xt,{className:"max-h-[90dvh] overflow-y-auto sm:max-w-lg","data-testid":"where-you-work-dialog",children:[l.jsx(Ft,{children:l2}),l.jsx(Bt,{children:c2}),y,l.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[l.jsx(G,{type:"button",variant:"ghost",className:"h-11 cursor-pointer",onClick:()=>t(!1),children:"Cancel"}),b]})]})})}var jA="Popover",[mH,ylt]=Ps(jA,[Bd]),Dm=Bd(),[txe,Ka]=mH(jA),gH=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=e,a=Dm(t),c=v.useRef(null),[u,d]=v.useState(!1),[f=!1,h]=si({prop:r,defaultProp:i,onChange:o});return l.jsx(Rk,{...a,children:l.jsx(txe,{scope:t,contentId:Ca(),triggerRef:c,open:f,onOpenChange:h,onOpenToggle:v.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:u,onCustomAnchorAdd:v.useCallback(()=>d(!0),[]),onCustomAnchorRemove:v.useCallback(()=>d(!1),[]),modal:s,children:n})})};gH.displayName=jA;var vH="PopoverAnchor",yH=v.forwardRef((e,t)=>
vendor: 3,563 bytes, line 636
636{const{__scopePopover:n,...r}=e,i=Ka(vH,n),o=Dm(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=i;return v.useEffect(()=>(s(),()=>a()),[s,a]),l.jsx(aw,{...o,...r,ref:t})});yH.displayName=vH;var xH="PopoverTrigger",bH=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ka(xH,n),o=Dm(n),s=rt(t,i.triggerRef),a=l.jsx(Oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":EH(i.open),...r,ref:s,onClick:xe(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?a:l.jsx(aw,{asChild:!0,...o,children:a})});bH.displayName=xH;var EA="PopoverPortal",[nxe,rxe]=mH(EA,{forceMount:void 0}),wH=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Ka(EA,t);return l.jsx(nxe,{scope:t,forceMount:n,children:l.jsx(ks,{present:n||o.open,children:l.jsx(lw,{asChild:!0,container:i,children:r})})})};wH.displayName=EA;var Vu="PopoverContent",_H=v.forwardRef((e,t)=>{const n=rxe(Vu,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Ka(Vu,e.__scopePopover);return l.jsx(ks,{present:r||o.open,children:o.modal?l.jsx(ixe,{...i,ref:t}):l.jsx(oxe,{...i,ref:t})})});_H.displayName=Vu;var ixe=v.forwardRef((e,t)=>{const n=Ka(Vu,e.__scopePopover),r=v.useRef(null),i=rt(t,r),o=v.useRef(!1);return v.useEffect(()=>{const s=r.current;if(s)return cw(s)},[]),l.jsx(dw,{as:Bi,allowPinchZoom:!0,children:l.jsx(SH,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xe(e.onCloseAutoFocus,s=>{s.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:xe(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,u=a.button===2||c;o.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:xe(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),oxe=v.forwardRef((e,t)=>{const n=Ka(Vu,e.__scopePopover),r=v.useRef(!1),i=v.useRef(!1);return l.jsx(SH,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;n.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),SH=v.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=e,h=Ka(Vu,n),p=Dm(n);return wk(),l.jsx(rw,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:l.jsx(nw,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:l.jsx(Ok,{"data-state":EH(h.open),role:"dialog",id:h.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),jH="PopoverClose",sxe=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ka(jH,n);return l.jsx(Oe.button,{type:"button",...r,ref:t,onClick:xe(e.onClick,()=>i.onOpenChange(!1))})});
636sxe.displayName=jH;var axe="PopoverArrow",lxe=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Dm(n);return l.jsx(Ik,{...i,...r,ref:t})});lxe.displayName=axe;function EH(e){return e?"open":"closed"}var cxe=gH,uxe=yH,dxe=bH,fxe=wH,CH=_H;const hxe=cxe,pxe=dxe,xlt=uxe,NH=v.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>l.jsx(fxe,{children:l.jsx(CH,{ref:i,align:t,sideOffset:n,className:K("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));NH.displayName=CH.displayName;function mxe(e){return e.replace(/\s*\(optional\)\s*$/i,"").replace(/[.â¦]+$/,"").trim()||"Choose one"}function u2({options:e,value:t,onChange:n,placeholder:r="Selectâ¦",searchPlaceholder:i="Searchâ¦",emptyMessage:o="No results",disabled:s=!1,loading:a=!1,className:c,sheetTitle:u}){const d=Sw(),[f,h]=v.useState(!1),[p,m]=v.useState(""),g=v.useMemo(()=>{const _=new Map;return e.forEach(j=>_.set(j.value,j.label)),_},[e]),y=v.useMemo(()=>{const _=p.trim().toLowerCase();return _?e.filter(j=>j.label.toLowerCase().includes(_)):e},[e,p]),b=_=>{n(_),h(!1),m("")},x=t!==void 0&&g.has(t)?g.get(t):a?"Loadingâ¦":r,w=l.jsxs("button",{type:"button",disabled:s,onClick:d?()=>!s&&h(!0):void 0,className:K("flex w-full items-center justify-between rounded-lg border border-border bg-card px-3 py-2 text-sm text-left transition-colors","hover:border-muted-foreground/40 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary",s&&"opacity-60 cursor-not-allowed",t===void 0&&"text-muted-foreground",c),children:[l.jsx("span",{className:"truncate",children:x}),l.jsx(Td,{size:15,className:"text-muted-foreground ml-2 flex-shrink-0"})]}),S=y.length===0?l.jsx("p",{className:"text-xs text-muted-foreground px-3 py-2",children:o}):y.slice(0,500).map(_=>{const j=_.value===t;return l.jsxs("button",{type:"button",onClick:()=>b(_.value),className:K("flex w-full items-center justify-between gap-2 text-left transition-colors",d?"min-h-11 px-4 py-2 text-base":"px-3 py-1.5 text-sm",j?"bg-primary/5 text-primary font-medium":"text-muted-foreground hover:bg-muted/50"),children:[l.jsx("span",{className:"truncate",children:_.label}),j&&l.jsx(bo,{size:14,className:"flex-shrink-0"})]},String(_.value))});return d?l.jsxs(l.Fragment,{children:[w,l.jsx(_A,{open:f,onOpenChange:_=>{h(_),_||m("")},title:u??mxe(r),description:"Search the list and tap one to choose it.",doneLabel:"Close",children:l.jsxs("div",{"data-picker-section":!0,children:[l.jsx("div",{className:"sticky top-0 z-10 -mx-4 -mt-4 bg-background px-4 pb-3 pt-4",children:l.jsxs("div",{className:"relative",children:[l.jsx(Ea,{size:15,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"}),l.jsx(Le,{placeholder:i,value:p,onChange:_=>m(_.target.value),className:"pl-8 text-base"})]})}),l.jsx("div",{className:"-mx-4",children:S})]})})]}):l.jsxs(hxe,{modal:!0,open:f,onOpenChange:_=>!s&&h(_),children:[l.jsx(pxe,{asChild:!0,children:w}),l.jsxs(NH,{className:"p-0 w-[var(--radix-popover-trigger-width)] min-w-[240px] flex flex-col max-h-[min(24rem,var(--radix-popover-content-available-height))]",align:"start",collisionPadding:8,children:[l.jsx("div",{className:"shrink-0 p-2 border-b border-border/50",children:l.jsxs("div",{className:"relative",children:[l.jsx(Ea,{size:13,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"}),l.jsx(Le,{autoFocus:!0,placeholder:i,value:p,onChange:_=>m(_.target.value),className:"text-sm pl-7 h-8"})]})}),l.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto py-1",children:S})]})]})}const gE="explore-jobs:defaults-dirty";function gxe(){try{sessionStorage.setItem(gE,"1")}catch{}}function blt(){try{return sessionStorage.getItem(gE)?(sessionStorage.removeItem(gE),!0):!1}catch{return!1}}function vxe(e){e.removeQueries({queryKey:["job-filter-options"]}),gxe()}function Ow(e,t,n={}){const r=q();return ue({queryKey:["profile-gap",e,t],queryFn:async({signal:i})=>(await ee.get(`/parsed-cvs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/gap-analysis`,{headers:r,signal:i,timeout:3e4})).data,enabled:!!e&&!!t&&(n.enabled??!0),staleTime:0,retry:1})}function PH(e){return e?(e.missing?.length??0)>0:!1}function yxe(e){const t=r=>r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return`<ul>${e.map(r=>
636r.trim()).filter(Boolean).map(r=>`<li>${t(r)}</li>`).join("")}</ul>`}function xxe(){const e=q(),t=oe(),n=mA(Pm.cvUpdated);return ie({mutationFn:async({userId:r,cvId:i,patch:o})=>{const a=(await ee.get(`/parsed-cvs/${encodeURIComponent(r)}/${encodeURIComponent(i)}`,{headers:e,timeout:3e4})).data?.data;if(!a)throw new Error("CV not found");const c={...a,personal:{...a.personal??{}}};return o.country&&(c.personal.country=o.country.name,c.personal.countryId=o.country.id),o.city&&(c.personal.city=o.city.name,c.personal.cityId=o.city.id),o.expLevels&&o.expLevels.length&&(c.personal.expLevels=o.expLevels),o.skills&&o.skills.length&&(c.skills=yxe(o.skills)),await ee.put(`/parsed-cvs/${encodeURIComponent(r)}/${encodeURIComponent(i)}`,c,{headers:e,timeout:3e4}),c},onSuccess:(r,i)=>{t.invalidateQueries({queryKey:["profile-gap",i.userId,i.cvId]}),t.invalidateQueries({queryKey:["user-cvs"]}),t.invalidateQueries({queryKey:["jobs"]}),(i.patch.country||i.patch.city)&&vxe(t),n()}})}function bxe(e){const t=q();return ue({queryKey:["cities-by-country",e],queryFn:async({signal:n})=>{const i=(await ee.get(`/countries/${e}/cities`,{headers:t,signal:n})).data?.cities;return Array.isArray(i)?i.map(o=>({id:Number(o.id),name:String(o.name??o.label??""),country_id:o.country_id!=null?Number(o.country_id):void 0})).filter(o=>Number.isFinite(o.id)&&o.name!==""):[]},enabled:!!e,staleTime:1e3*60*10})}const kH=["Internship","Entry Level","Associate","Mid-Senior Level","Senior Level","Executive Level"];function wlt(e){return e?kH.indexOf(e.trim()):-1}const wxe=[...kH];function _xe(e,t=!1){return t?{title:"Your job matches are ready",body:"That role has been decided, so we've opened up the rest of asgardhire.ai for you. Add a few quick details and we'll match you to roles that fit your background.",cta:"Save & see my matches",toast:"Saved - here are your matches"}:e?{title:"Your application is on its way",body:"asgardhire.ai isn't just for this role - we match you to other jobs that fit your background. Add a few quick details to unlock roles picked for you.",cta:"Save & explore jobs",toast:"Saved - here are more roles for you"}:{title:"Find more roles that fit you",body:"asgardhire.ai recommends jobs tailored to your background. Add a few quick details to unlock roles picked for you.",cta:"Save & explore jobs",toast:"Saved - here are your matches"}}const Sxe={title:"Add a few details",body:"Your CV does not show these. Add them and your matches get better.",cta:"Save",toast:"Saved. Your matches will update."},ih={country:"Country",city:"City",skills:"Skills",experience_level:"Experience level"};function AH({userId:e,cvId:t,open:n,appliedContext:r=!1,unlockContext:i=!1,onClose:o}){const s=Ow(e,t,{enabled:n}),a=s.data,c=o?Sxe:_xe(r,i),u=xxe(),d=RW(),f=d.data??[],[h,p]=v.useState(),[m,g]=v.useState(""),[y,b]=v.useState(),[x,w]=v.useState(""),[S,_]=v.useState([]),[j,E]=v.useState(""),[C,N]=v.useState(""),k=bxe(h),P=k.data??[],A=v.useRef(!1),L=v.useRef(!1),R=v.useRef(!1),D=v.useRef(!1);v.useEffect(()=>{n||(A.current=!1,L.current=!1,R.current=!1,D.current=!1,p(void 0),g(""),b(void 0),w(""),_([]),E(""),N(""))},[n]);const{isParsed:O,resolvedField:F,resolvedValue:T,resolvedValues:M,missingByField:V}=Exe(a),B=!O("city"),I=!O("country")||B,z=!O("skills"),H=!O("experience_level"),de=I||B||z||H,ge=V.experience_level?.options??wxe;v.useEffect(()=>{if(!a||A.current||f.length===0)return;const U=F("country"),ae=U?d2(f,U.id,U.value):void 0;ae&&(p(ae.id),g(ae.name)),A.current=!0},[a,f,F]),v.useEffect(()=>{if(!(!a||L.current||P.length===0)){if(y===void 0){const U=F("city"),ae=U?d2(P,U.id,U.value):void 0;ae&&(b(ae.id),w(ae.name))}L.current=!0}},[a,P,y,F]),v.useEffect(()=>{if(!a||R.current)return;const U=M("skills");U&&U.length&&_(U),R.current=!0},[a,M]),v.useEffect(()=>{if(!a||D.current)return;const U=T("experience_level");U&&ge.includes(U)&&N(U),D.current=!0},[a,T,ge]);const te=U=>{const ae=U.trim();ae&&_(re=>re.some(He=>He.toLowerCase()===ae.toLowerCase())?re:[...re,ae])},ye=(!I||h!==void 0)&&(!B||y!==void 0)&&(!z||S.length>0)&&(!H||C!==""),W=async()=>{if(!e||!t||!de)return;const U={};I&&h!==void 0&&(U.country={id:h,name:m}),B&&y!==void 0&&(U.city={id:y,name:x}),z&&(U.skills=S),H&&(U.expLevels=[C]);try{await u.mutateAsync({userId:e,cvId:t,patch:U}),Q.success(c.toast),o?.()}catch{Q.error("Couldn't save your details. Please try again.")}},ne=(V.skills?.suggestions??[]).filter(U=>!S.some(ae=>ae.toLowerCase()===U.toLowerCase())),se=s.isLoading;return l.jsx(At,{open:n,onOpenChange:o?U=>{U||o()}:void 0,children:l.jsxs(xt,{className:"max-w-md",hideClose:!o,onEscapeKeyDown:o?void 0:U=>U.preventDefault(),onPointerDownOutside:o?void 0:U=>U.preventDefault(),onInteractOutside:o?void 0:U=>U.preventDefault(),children:[l.jsxs(Wt,{children:[l.jsxs(Ft,{className:"flex items-center gap-2",children:[l.jsx(Vse,{className:"h-4 w-4 text-primary"}),c.title]}),l.jsx(Bt,{children:c.body})]}),se?l.jsx("div",{className:"flex items-center justify-center py-10 text-muted-foreground",children:l.jsx(ft,{size:20,variant:"current",spin:!0,title:""})}):l.jsxs("div",{className:"space-y-4",children:[l.jsx(jxe,{report:a}),I&&l.jsx(Hg,{label:ih.country,children:l.jsx(u2,{options:f.map(U=>({value:U.id,label:U.name})),value:h,loading:d.isLoading,placeholder:"Select your country",searchPlaceholder:"Search countriesâ¦",onChange:U=>{p(U),g(f.find(ae=>ae.id===U)?.name??""),b(void 0),w("")}})}),B&&l.jsx(Hg,{label:ih.city,children:l.jsx(u2,{options:P.map(U=>({value:U.id,label:U.name})),value:y,loading:k.isLoading,disabled:h===void 0,placeholder:h===void 0?"Pick a country first":"Select your city",searchPlaceholder:"Search citiesâ¦",onChange:U=>{b(U),w(P.find(ae=>ae.id===U)?.name??"")}})}),H&&l.jsx(Hg,{label:ih.experience_level,children:l.jsx("div",{className:"flex flex-wrap gap-2",children:ge.map(U=>l.jsx("button",{type:"button",onClick:()=>N(U),className:"rounded-full border px-3 py-1 text-xs transition-colors "+(C===U?"border-primary bg-primary/10 text-primary font-medium":"border-border text-muted-foreground hover:border-muted-foreground
636/40"),children:U},U))})}),z&&l.jsxs(Hg,{label:ih.skills,children:[l.jsx(Le,{value:j,placeholder:"Type a skill and press Enter",onChange:U=>E(U.target.value),onKeyDown:U=>{U.key==="Enter"&&(U.preventDefault(),te(j),E(""))}}),S.length>0&&l.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:S.map(U=>l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-primary/10 px-2.5 py-1 text-xs text-primary",children:[U,l.jsx("button",{type:"button",onClick:()=>_(ae=>ae.filter(re=>re!==U)),className:"hover:text-primary/70",children:l.jsx(Dr,{className:"h-3 w-3"})})]},U))}),ne.length>0&&l.jsxs("div",{className:"mt-2",children:[l.jsx("p",{className:"mb-1 text-[11px] text-muted-foreground",children:"Suggested from your CV"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:ne.map(U=>l.jsxs("button",{type:"button",onClick:()=>te(U),className:"rounded-full border border-dashed border-muted-foreground/40 px-2.5 py-1 text-xs text-muted-foreground hover:border-primary hover:text-primary",children:["+ ",U]},U))})]})]}),l.jsx("div",{className:"pt-2",children:l.jsx(G,{className:"w-full",onClick:W,disabled:!ye||u.isPending,children:u.isPending?l.jsx(ft,{size:18,variant:"current",spin:!0,title:""}):c.cta})})]})]})})}function jxe({report:e}){return!e||!e.resolved||e.resolved.length===0?null:l.jsx("div",{className:"rounded-lg bg-muted/50 px-3 py-2",children:l.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:e.resolved.map(t=>{const n=t.values&&t.values.length?t.values.slice(0,3).join(", ")+(t.values.length>3?"â¦":""):t.value||"on file";return l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(bo,{className:"h-3 w-3 text-success"}),l.jsxs("span",{className:"font-medium text-muted-foreground",children:[ih[t.field],":"]})," ",n]},t.field)})})})}function Hg({label:e,children:t}){return l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs font-medium text-muted-foreground",children:e}),t]})}function d2(e,t,n){if(t!==void 0){const r=e.find(i=>i.id===t);if(r)return r}if(n&&n.trim()){const r=n.trim().toLowerCase();return e.find(i=>i.name.trim().toLowerCase()===r)}}function Exe(e){return v.useMemo(()=>{const t=new Map((e?.resolved??[]).map(r=>[r.field,r])),n=Object.fromEntries((e?.missing??[]).map(r=>[r.field,r]));return{isParsed:r=>t.get(r)?.source==="parsed",resolvedField:r=>t.get(r),resolvedValue:r=>t.get(r)?.value,resolvedValues:r=>t.get(r)?.values,missingByField:n}},[e])}/*! Capacitor: https://capacitorjs.com/ - MIT License */var qu;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(qu||(qu={}));class lS extends Error{constructor(t,n,r){super(t),this.message=t,this.code=n,this.data=r}}const Cxe=e=>{var t,n;return e?.androidBridge?"android":!((n=(t=e?.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},Nxe=e=>{const t=e.CapacitorCustomPlatform||null,n=e.Capacitor||{},r=n.Plugins=n.Plugins||{},i=()=>t!==null?t.name:Cxe(e),o=()=>i()!=="web",s=f=>{const h=u.get(f);return!!(h?.platforms.has(i())||a(f))},a=f=>{var h;return(h=n.PluginHeaders)===null||h===void 0?void 0:h.find(p=>p.name===f)},c=f=>e.console.error(f),u=new Map,d=(f,h={})=>{const p=u.get(f);if(p)return console.warn(`Capacitor plugin "${f}" already registered. Cannot register plugins twice.`),p.proxy;const m=i(),g=a(f);let y;const b=async()=>(!y&&m in h?y=typeof h[m]=="function"?y=await h[m]():y=h[m]:t!==null&&!y&&"web"in h&&(y=typeof h.web=="function"?y=await h.web():y=h.web),y),x=(C,N)=>{var k,P;if(g){const A=g?.methods.find(L=>N===L.name);if(A)return A.rtype==="promise"?L=>n.nativePromise(f,N.toString(),L):(L,R)=>n.nativeCallback(f,N.toString(),L,R);if(C)return(k=C[N])===null||k===void 0?void 0:k.bind(C)}else{if(C)return(P=C[N])===null||P===void 0?void 0:P.bind(C);throw new lS(`"${f}" plugin is not implemented on ${m}`,qu.Unimplemented)}},w=C=>{let N;const k=(...P)=>{const A=b().then(L=>{const R=x(L,C);if(R){const D=R(...P);return N=D?.remove,D}else throw new lS(`"${f}.${C}()" is not implemented on ${m}`,qu.Unimplemented)});return C==="addListener"&&(A.remove=async()=>N()),A};return k.toString=()=>`${C.toString()}() { [capacitor code] }
636`,Object.defineProperty(k,"name",{value:C,writable:!1,configurable:!1}),k},S=w("addListener"),_=w("removeListener"),j=(C,N)=>{const k=S({eventName:C},N),P=async()=>{const L=await k;_({eventName:C,callbackId:L},N)},A=new Promise(L=>k.then(()=>L({remove:P})));return A.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await P()},A},E=new Proxy({},{get(C,N){switch(N){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return g?j:S;case"removeListener":return _;default:return w(N)}}});return r[f]=E,u.set(f,{name:f,proxy:E,platforms:new Set([...Object.keys(h),...g?[m]:[]])}),E};return n.convertFileSrc||(n.convertFileSrc=f=>f),n.getPlatform=i,n.handleError=c,n.isNativePlatform=o,n.isPluginAvailable=s,n.registerPlugin=d,n.Exception=lS,n.DEBUG=!!n.DEBUG,n.isLoggingEnabled=!!n.isLoggingEnabled,n},Pxe=e=>e.Capacitor=Nxe(e),lt=Pxe(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Wa=lt.registerPlugin;class CA{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(t,n){let r=!1;this.listeners[t]||(this.listeners[t]=[],r=!0),this.listeners[t].push(n);const o=this.windowListeners[t];o&&!o.registered&&this.addWindowListener(o),r&&this.sendRetainedArgumentsForEvent(t);const s=async()=>this.removeListener(t,n);return Promise.resolve({remove:s})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,r){const i=this.listeners[t];if(!i){if(r){let o=this.retainedEventArguments[t];o||(o=[]),o.push(n),this.retainedEventArguments[t]=o}return}i.forEach(o=>o(n))}hasListeners(t){var n;return!!(!((n=this.listeners[t])===null||n===void 0)&&n.length)}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:r=>{this.notifyListeners(n,r)}}}unimplemented(t="not implemented"){return new lt.Exception(t,qu.Unimplemented)}unavailable(t="not available"){return new lt.Exception(t,qu.Unavailable)}async removeListener(t,n){const r=this.listeners[t];if(!r)return;const i=r.indexOf(n);this.listeners[t].splice(i,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(r=>{this.notifyListeners(t,r)}))}}const f2=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),h2=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class kxe extends CA{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(r=>{if(r.length<=0)return;let[i,o]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");i=h2(i).trim(),o=h2(o).trim(),n[i]=o}),n}async setCookie(t){try{const n=f2(t.key),r=f2(t.value),i=t.expires?`; expires=${t.expires.replace("expires=","")}`:"",o=(t.path||"/").replace("path=",""),s=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${r||""}${i}; path=${o}; ${s};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}Wa("CapacitorCookies",{web:()=>new kxe});const Axe=async e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const i=r.result;t(i.indexOf(",")>=0?i.split(",")[1]:i)},r.onerror=i=>n(i),r.readAsDataURL(e)}),Txe=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(i=>i.toLocaleLowerCase()).reduce((i,o,s)=>(i[o]=e[t[s]],i),{})},Rxe=(e,t=!0)=>e?Object.entries(e).reduce((r,i)=>{const[o,s]=i;let a,c;
636return Array.isArray(s)?(c="",s.forEach(u=>{a=t?encodeURIComponent(u):u,c+=`${o}=${a}&`}),c.slice(0,-1)):(a=t?encodeURIComponent(s):s,c=`${o}=${a}`),`${r}&${c}`},"").substr(1):null,Oxe=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),i=Txe(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(i.includes("application/x-www-form-urlencoded")){const o=new URLSearchParams;for(const[s,a]of Object.entries(e.data||{}))o.set(s,a);n.body=o.toString()}else if(i.includes("multipart/form-data")||e.data instanceof FormData){const o=new FormData;if(e.data instanceof FormData)e.data.forEach((a,c)=>{o.append(c,a)});else for(const a of Object.keys(e.data))o.append(a,e.data[a]);n.body=o;const s=new Headers(n.headers);s.delete("content-type"),n.headers=s}else(i.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class Ixe extends CA{async request(t){const n=Oxe(t,t.webFetchExtra),r=Rxe(t.params,t.shouldEncodeUrlParams),i=r?`${t.url}?${r}`:t.url,o=await fetch(i,n),s=o.headers.get("content-type")||"";let{responseType:a="text"}=o.ok?t:{};s.includes("application/json")&&(a="json");let c,u;switch(a){case"arraybuffer":case"blob":u=await o.blob(),c=await Axe(u);break;case"json":c=await o.json();break;case"document":case"text":default:c=await o.text()}const d={};return o.headers.forEach((f,h)=>{d[h]=f}),{data:c,headers:d,status:o.status,url:o.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}Wa("CapacitorHttp",{web:()=>new Ixe});var p2;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(p2||(p2={}));var m2;(function(e){e.StatusBar="StatusBar",e.NavigationBar="NavigationBar"})(m2||(m2={}));class Mxe extends CA{async setStyle(){this.unavailable("not available for web")}async setAnimation(){this.unavailable("not available for web")}async show(){this.unavailable("not available for web")}async hide(){this.unavailable("not available for web")}}Wa("SystemBars",{web:()=>new Mxe});var nr;(function(e){e.UNKNOWN_ERROR="0",e.PURCHASE_CANCELLED_ERROR="1",e.STORE_PROBLEM_ERROR="2",e.PURCHASE_NOT_ALLOWED_ERROR="3",e.PURCHASE_INVALID_ERROR="4",e.PRODUCT_NOT_AVAILABLE_FOR_PURCHASE_ERROR="5",e.PRODUCT_ALREADY_PURCHASED_ERROR="6",e.RECEIPT_ALREADY_IN_USE_ERROR="7",e.INVALID_RECEIPT_ERROR="8",e.MISSING_RECEIPT_FILE_ERROR="9",e.NETWORK_ERROR="10",e.INVALID_CREDENTIALS_ERROR="11",e.UNEXPECTED_BACKEND_RESPONSE_ERROR="12",e.RECEIPT_IN_USE_BY_OTHER_SUBSCRIBER_ERROR="13",e.INVALID_APP_USER_ID_ERROR="14",e.OPERATION_ALREADY_IN_PROGRESS_ERROR="15",e.UNKNOWN_BACKEND_ERROR="16",e.INVALID_APPLE_SUBSCRIPTION_KEY_ERROR="17",e.INELIGIBLE_ERROR="18",e.INSUFFICIENT_PERMISSIONS_ERROR="19",e.PAYMENT_PENDING_ERROR="20",e.INVALID_SUBSCRIBER_ATTRIBUTES_ERROR="21",e.LOG_OUT_ANONYMOUS_USER_ERROR="22",e.CONFIGURATION_ERROR="23",e.UNSUPPORTED_ERROR="24",e.EMPTY_SUBSCRIBER_ATTRIBUTES_ERROR="25",e.PRODUCT_DISCOUNT_MISSING_IDENTIFIER_ERROR="26",e.PRODUCT_DISCOUNT_MISSING_SUBSCRIPTION_GROUP_IDENTIFIER_ERROR="28",e.CUSTOMER_INFO_ERROR="29",e.SYSTEM_INFO_ERROR="30",e.BEGIN_REFUND_REQUEST_ERROR="31",e.PRODUCT_REQUEST_TIMED_OUT_ERROR="32",e.API_ENDPOINT_BLOCKED="33",e.INVALID_PROMOTIONAL_OFFER_ERROR="34",e.OFFLINE_CONNECTION_ERROR="35",e.TEST_STORE_SIMULATED_PURCHASE_ERROR="42"})(nr||(nr={}));var TH=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}
636t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(e){TH(t,e);function t(){var n=e.call(this,"There is no singleton instance. Make sure you configure Purchases before trying to get the default instance. More info here: https://errors.rev.cat/configuring-sdk")||this;return Object.setPrototypeOf(n,t.prototype),n}return t})(Error);(function(e){TH(t,e);function t(){var n=e.call(this,"This method is not available in the current platform.")||this;return Object.setPrototypeOf(n,t.prototype),n}return t})(Error);var g2;(function(e){e.UNKNOWN="UNKNOWN",e.CUSTOM="CUSTOM",e.LIFETIME="LIFETIME",e.ANNUAL="ANNUAL",e.SIX_MONTH="SIX_MONTH",e.THREE_MONTH="THREE_MONTH",e.TWO_MONTH="TWO_MONTH",e.MONTHLY="MONTHLY",e.WEEKLY="WEEKLY"})(g2||(g2={}));var v2;(function(e){e[e.INTRO_ELIGIBILITY_STATUS_UNKNOWN=0]="INTRO_ELIGIBILITY_STATUS_UNKNOWN",e[e.INTRO_ELIGIBILITY_STATUS_INELIGIBLE=1]="INTRO_ELIGIBILITY_STATUS_INELIGIBLE",e[e.INTRO_ELIGIBILITY_STATUS_ELIGIBLE=2]="INTRO_ELIGIBILITY_STATUS_ELIGIBLE",e[e.INTRO_ELIGIBILITY_STATUS_NO_INTRO_OFFER_EXISTS=3]="INTRO_ELIGIBILITY_STATUS_NO_INTRO_OFFER_EXISTS"})(v2||(v2={}));var vE;(function(e){e.NON_SUBSCRIPTION="NON_SUBSCRIPTION",e.SUBSCRIPTION="SUBSCRIPTION",e.UNKNOWN="UNKNOWN"})(vE||(vE={}));var y2;(function(e){e.CONSUMABLE="CONSUMABLE",e.NON_CONSUMABLE="NON_CONSUMABLE",e.NON_RENEWABLE_SUBSCRIPTION="NON_RENEWABLE_SUBSCRIPTION",e.AUTO_RENEWABLE_SUBSCRIPTION="AUTO_RENEWABLE_SUBSCRIPTION",e.PREPAID_SUBSCRIPTION="PREPAID_SUBSCRIPTION",e.UNKNOWN="UNKNOWN"})(y2||(y2={}));var x2;(function(e){e[e.UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY=0]="UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY",e[e.IMMEDIATE_WITH_TIME_PRORATION=1]="IMMEDIATE_WITH_TIME_PRORATION",e[e.IMMEDIATE_AND_CHARGE_PRORATED_PRICE=2]="IMMEDIATE_AND_CHARGE_PRORATED_PRICE",e[e.IMMEDIATE_WITHOUT_PRORATION=3]="IMMEDIATE_WITHOUT_PRORATION",e[e.DEFERRED=6]="DEFERRED",e[e.IMMEDIATE_AND_CHARGE_FULL_PRICE=5]="IMMEDIATE_AND_CHARGE_FULL_PRICE"})(x2||(x2={}));var b2;(function(e){e.WITHOUT_PRORATION="WITHOUT_PRORATION",e.WITH_TIME_PRORATION="WITH_TIME_PRORATION",e.CHARGE_FULL_PRICE="CHARGE_FULL_PRICE",e.CHARGE_PRORATED_PRICE="CHARGE_PRORATED_PRICE",e.DEFERRED="DEFERRED"})(b2||(b2={}));var w2;(function(e){e[e.INFINITE_RECURRING=1]="INFINITE_RECURRING",e[e.FINITE_RECURRING=2]="FINITE_RECURRING",e[e.NON_RECURRING=3]="NON_RECURRING"})(w2||(w2={}));var _2;(function(e){e.FREE_TRIAL="FREE_TRIAL",e.SINGLE_PAYMENT="SINGLE_PAYMENT",e.DISCOUNTED_RECURRING_PAYMENT="DISCOUNTED_RECURRING_PAYMENT"})(_2||(_2={}));var S2;(function(e){e.DAY="DAY",e.WEEK="WEEK",e.MONTH="MONTH",e.YEAR="YEAR",e.UNKNOWN="UNKNOWN"})(S2||(S2={}));var j2;(function(e){e.INAPP="inapp",e.SUBS="subs"})(j2||(j2={}));var E2;(function(e){e[e.SUBSCRIPTIONS=0]="SUBSCRIPTIONS",e[e.SUBSCRIPTIONS_UPDATE=1]="SUBSCRIPTIONS_UPDATE",e[e.IN_APP_ITEMS_ON_VR=2]="IN_APP_ITEMS_ON_VR",e[e.SUBSCRIPTIONS_ON_VR=3]="SUBSCRIPTIONS_ON_VR",e[e.PRICE_CHANGE_CONFIRMATION=4]="PRICE_CHANGE_CONFIRMATION"})(E2||(E2={}));var C2;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.USER_CANCELLED=1]="USER_CANCELLED",e[e.ERROR=2]="ERROR"})(C2||(C2={}));var N2;(function(e){e.VERBOSE="VERBOSE",e.DEBUG="DEBUG",e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"})(N2||(N2={}));var P2;(function(e){e[e.BILLING_ISSUE=0]="BILLING_ISSUE",e[e.PRICE_INCREASE_CONSENT=1]="PRICE_INCREASE_CONSENT",e[e.GENERIC=2]="GENERIC",e[e.WIN_BACK_OFFER=3]="WIN_BACK_OFFER"})(P2||(P2={}));var k2;(function(e){e.DISABLED="DISABLED",e.INFORMATIONAL="INFORMATIONAL"})(k2||(k2={}));var A2;(function(e){e.NOT_REQUESTED="NOT_REQUESTED",e.VERIFIED="VERIFIED",e.FAILED="FAILED",e.VERIFIED_ON_DEVICE="VERIFIED_ON_DEVICE"})(A2||(A2={}));var T2;(function(e){e.NOT_PRESENTED="NOT_PRESENTED",e.ERROR="ERROR",e.CANCELLED="CANCELLED",e.PURCHASED="PURCHASED",e.RESTORED="RESTORED"})(T2||(T2={}));var R2;(function(e){e.STOREKIT_1="STOREKIT_1",e.STOREKIT_2="STOREKIT_2",e.DEFAULT="DEFAULT"})(R2||(R2={}));var O2;(function(e){e.MY_APP="MY_APP",e.REVENUECAT="REVENUECAT"})(O2||(O2={}));var I2;(function(e){e.SUCCESS="SUCCESS",e.ERROR="ERROR",e.PURCHASE_BELONGS_TO_OTHER_USER="PURCHASE_BELONGS_TO_OTHER_USER",e.INVALID_TOKEN="INVALID_TOKEN",e.EXPIRED="EXPIRED"})(I2||(I2={}));const $xe=Wa("Purchases",{web:()=>Z(()=>import("./web-DmjZDmtU.js"),[]).then(e=>new e.PurchasesWeb)});function Dxe(e){var t;const n=e?.offering,r={};if(e?.paywallId!=null&&(r.paywallId=e.paywallId),n!=null){r.offeringId=n.identifier;const i=(t=n.availablePackages[0])===null||t===void 0?void 0:t.presentedOfferingContext;i!=null&&(r.presentedOfferingContext=i)}else e?.offeringId!=null&&(r.offeringId=e.offeringId);return r}const Iw=new Proxy($xe,{get(e,t,n){return t==="trackCustomPaywallImpression"?r=>e.trackCustomPaywallImpression(Dxe(r)):Reflect.get(e,t,n)}}),Lxe="appl_nrHvfWEEoixjAnnmwRFMDVXUhdX",Fxe="goog_vUoLrPUdrAiQGtSsYDqWwlBAVJH";function RH(){if(lt.isNativePlatform())return lt.getPlatform()==="ios"?Lxe:Fxe}const Bxe={ios:["appl_","test_"],android:["goog_","amzn_","test_"]};function Uxe(e,t){const n=Bxe[t];return n?n.some(r=>e.startsWith(r)):!0}function _lt(){return!!RH()}let Mw=!1,cS=null;function $w(){return cS||(cS=(async()=>{const e=RH();if(!e)return;const t=lt.getPlatform();if(!Uxe(e,t)){const n=e.indexOf("_"),r=n>0&&n<=5?e.slice(0,n+1):"(no store prefix)";console.error(`[purchases] The RevenueCat key for ${t} has prefix ${r}, which is not a key for the ${t==="ios"?"App Store":"Play Store"}. Check VITE_REVENUECAT_${t==="ios"?"IOS":"ANDROID"}_API_KEY in this deployment's Amplify environment.`)}await Iw.configure({apiKey:e}),Mw=!0})()),cS}async function zxe(){await $w()}let M2=null;async function Vxe(e){await $w(),!(!Mw||M2===e)&&(await Iw.logIn({appUserID:e}),M2=e)}async function qxe(){if(await $w(),!Mw)return[];let e;try{e=await Iw.getOfferings()}catch(n){const r=new OH(n);throw console.error("[purchases] RevenueCat getOfferings failed",{platform:lt.getPlatform(),kind:r.kind,code:r.code,readableErrorCode:r.readableErrorCode,message:r.message,underlyingErrorMessage:r.underlyingErrorMessage}),r}const t=new Map;for(const n of Object.values(e.all??{}))for(const r of n.availablePackages??[])t.has(r.identifier)||t.set(r.identifier,r);for(const n of e.current?.availablePackages??[])t.has(n.identifier)||t.set(n.identifier,n);return[...t.values()]}
636const Kxe=new Set([nr.NETWORK_ERROR,nr.OFFLINE_CONNECTION_ERROR,nr.PRODUCT_REQUEST_TIMED_OUT_ERROR,nr.UNKNOWN_BACKEND_ERROR]),Wxe=new Set([nr.CONFIGURATION_ERROR,nr.PRODUCT_NOT_AVAILABLE_FOR_PURCHASE_ERROR,nr.STORE_PROBLEM_ERROR,nr.INVALID_CREDENTIALS_ERROR,nr.PURCHASE_NOT_ALLOWED_ERROR,nr.UNSUPPORTED_ERROR,nr.INSUFFICIENT_PERMISSIONS_ERROR]);function Mc(e,t){if(typeof e!="object"||e===null)return;const n=e[t];return typeof n=="string"?n:void 0}function Hxe(e){const t=Mc(e,"code");return t&&Kxe.has(t)?"network":t&&Wxe.has(t)?"store_unavailable":"unknown"}class OH extends Error{kind;code;readableErrorCode;underlyingErrorMessage;constructor(t){super(Mc(t,"message")??(t instanceof Error?t.message:"RevenueCat getOfferings failed")),this.name="NativeOfferingsError",this.kind=Hxe(t),this.code=Mc(t,"code"),this.readableErrorCode=Mc(t?.userInfo,"readableErrorCode")??Mc(t,"readableErrorCode"),this.underlyingErrorMessage=Mc(t,"underlyingErrorMessage")}}function Gxe(e){return e instanceof OH?e.kind:"unknown"}function Slt(e=window.location.hostname){return e==="dev.asgardhire.ai"||e==="localhost"||e==="127.0.0.1"}function Yxe(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code===nr.PURCHASE_CANCELLED_ERROR}function Qxe(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:"Purchase failed"}async function jlt(e,t){try{return await $w(),Mw?(t&&await Vxe(t),await Iw.purchasePackage({aPackage:e}),{status:"purchased"}):{status:"error",message:"Purchases aren't set up for this build yet."}}catch(n){return Yxe(n)?{status:"cancelled"}:{status:"error",message:Qxe(n)}}}const Jxe=-1;function Xxe(e,t){if(!e)return null;const n=e.quota_usage.find(o=>o.scope===t),r=t==="AUTO_APPLY"?e.credits_auto_apply:t==="PRACTICE_INTERVIEW"?e.credits_practice_interview:e.credits_cv_document;return!n||n.allowance===0?r:n.allowance===Jxe?null:Math.max(0,n.allowance-n.used)+r}async function Elt(e,t,n,r){try{const{data:i}=await ee.get("/candidate/billing/quote",{headers:e,params:{scope:t,units:n}});return i}catch(i){throw i}}function Zxe(e){switch(e){case"opt1-weekly":return{name:"Weekly plan",price:"$12.99 / week"};case"opt1-monthly":return{name:"Monthly plan",price:"$19.99 / month"};case"opt1-quarterly":return{name:"Quarterly plan",price:"$49.99 / 3 months"};default:return null}}function Clt(e){const t=e?.pending_subscription_product_id;if(!t)return null;const n=ebe(e?.pending_subscription_effective_at),r=Zxe(t);if(!r)return n?`Your plan changes on ${n}`:"Your plan changes at the end of the current period";const i=`${r.name} (${r.price})`;return n?`Changes to ${i} on ${n}`:`Changes to ${i} at the end of the current period`}function ebe(e){if(!e)return null;const t=new Date(e);return Number.isNaN(t.getTime())?null:t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"})}function Nlt(e){return e<6e4?5e3:e<18e4?15e3:null}function tbe(e){return e?JSON.stringify([e.has_active_subscription,e.subscription_product_id??"",e.subscription_expires_at??"",e.pending_subscription_product_id??"",e.credits_auto_apply,e.credits_practice_interview,e.credits_cv_document,[...e.active_entitlements].sort()]):null}const NA="candidate-billing-pre-checkout",nbe=6*60*60*1e3;function Plt(e,t=Date.now()){const n=tbe(e);if(n!==null)try{localStorage.setItem(NA,JSON.stringify({fingerprint:n,at:t}))}catch{}}function klt(e=Date.now()){try{const t=localStorage.getItem(NA);if(!t)return null;const n=JSON.parse(t);return typeof n.fingerprint!="string"||typeof n.at!="number"||e-n.at>nbe?null:n.fingerprint}catch{return null}}function Alt(){try{localStorage.removeItem(NA)}catch{}}const rbe="candidate-billing-status",ibe="candidate-billing-offerings",obe="candidate-billing-server-catalog";function Dw(){const e=q();return ue({queryKey:[rbe],queryFn:async()=>{const{data:t}=await Be.get("/candidate/billing/status",{headers:e});return t}})}function Tlt(e,t){return!t||t==="OPTION_1"?!0:e==="AUTO_APPLY"}function Rlt(e,t){const n=e?.quota_usage.find(i=>i.scope===t);if(!n||n.allowance<=0||n.period_days<=0||!n.resets_at)return null;const r=new Date(n.resets_at);return Number.isNaN(r.getTime())?null:r}function Olt(){const e=q();return ie({mutationFn:async()=>{const{data:t}=await Be.get("/candidate/billing/checkout",{headers:e});return t}})}function Ilt(){return ue({queryKey:[ibe],queryFn:()=>qxe(),enabled:lt.isNativePlatform(),retry:(e,t)=>Gxe(t)==="network"&&e<2})}function $2(){return lt.isNativePlatform()?lt.getPlatform()==="ios"?"ios":"android":"web"}function Mlt(){const e=q();return ue({queryKey:[obe,$2()],queryFn:async()=>{const{data:t}=await Be.get("/candidate/billing/offerings",{headers:e,params:{platform:$2()}});return t??[]}})}function D2(e){const t=e.split(":")[0];return t&&t!==e?[e,t]:[e]}function $lt(e,t,n){if(!t||!n)return[];const r=new Set(n.flatMap(i=>i.provider_product_id?D2(i.provider_product_id):[]));return e.filter(i=>D2(i.product.identifier).some(s=>r.has(s))?i.product.productCategory!==vE.SUBSCRIPTION?!0:!t.has_active_subscription:!1)}function Dlt(){const e=q();return ie({mutationFn:async()=>{const{data:t}=await Be.get("/candidate/billing/manage",{headers:e});return t}})}function Llt(){const e=q();return ie({mutationFn:async({redirectUri:t,state:n})=>{const{data:r}=await Be.post("/candidate/billing/funnel-auth",{redirect_uri:t,state:n},{headers:e});return r}})}const Ku=["external-jobs"],Qd=e=>["external-job",e],IH={too_short:"That's too short to be a job description. Paste the whole posting.",too_long:"That's longer than a
636job posting. Paste just the job.",not_a_job:"This doesn't look like a job posting. Check you copied the job itself.",invalid_url:"That link doesn't look right. Check it, or leave it empty.",import_limit:"You've added 50 jobs today. Try again tomorrow."};function sbe(e){return e?IH[e]??null:null}function Flt(e,t){const n=e?.response,r=sbe(n?.data?.reason);return r||(n?.status===429?IH.import_limit:t)}const abe=100,lbe=5e4;function Blt(e,t){const n=e.trim().length;if(n<abe)return"too_short";if(n>lbe)return"too_long";const r=t.trim();if(r)try{const i=new URL(r);if(i.protocol!=="http:"&&i.protocol!=="https:")return"invalid_url"}catch{return"invalid_url"}return null}function cbe(e=!0){const t=q();return ue({queryKey:Ku,queryFn:async({signal:n})=>{const r=await ee.get("/external-jobs",{headers:t,signal:n});return Array.isArray(r.data?.external_jobs)?r.data.external_jobs:[]},enabled:e,staleTime:1e3*60})}function Ult(e){const t=q();return ue({queryKey:Qd(e??""),queryFn:async({signal:n})=>(await ee.get(`/external-jobs/${encodeURIComponent(e??"")}`,{headers:t,signal:n})).data,enabled:!!e,staleTime:1e3*60})}function zlt(){const e=q(),t=oe();return ie({mutationFn:async n=>{const r={text:n.text};return n.source_url?.trim()&&(r.source_url=n.source_url.trim()),n.file_name&&(r.file_name=n.file_name),(await ee.post("/external-jobs",r,{headers:e,timeout:9e4})).data},onSuccess:n=>{t.setQueryData(Qd(n.external_job_id),n),t.invalidateQueries({queryKey:Ku})}})}function Vlt(){const e=q(),t=oe();return ie({mutationFn:async({id:n,...r})=>(await ee.patch(`/external-jobs/${encodeURIComponent(n)}`,r,{headers:e})).data,onSuccess:n=>{t.setQueryData(Qd(n.external_job_id),n),t.invalidateQueries({queryKey:Ku})}})}function qlt(){const e=q(),t=oe();return ie({mutationFn:async n=>(await ee.delete(`/external-jobs/${encodeURIComponent(n)}`,{headers:e}),n),onSuccess:n=>{t.setQueryData(Ku,r=>r?.filter(i=>i.external_job_id!==n)),t.removeQueries({queryKey:Qd(n)}),t.invalidateQueries({queryKey:Ku})}})}const ube=2e3,dbe=6e4,Mf={login_wall:"LinkedIn and Indeed need you to be signed in, so we can't read the page. Open the job, copy the text and paste it here.",unreadable:"We couldn't read that page. Paste the job text instead.",not_a_job:"That page doesn't look like a job posting.",too_short:"We could only read a little of that page. Paste the job text instead.",invalid:"That doesn't look like a link. Check it and try again."};function Klt(e){const t=e.trim();if(!t)return null;const n=t.match(/https?:\/\/[^\s<>"']+/i);let r=n?n[0]:t;if(r=r.replace(/[),.;!?]+$/,""),!/^https?:\/\//i.test(r)){if(/\s/.test(r)||!/^[a-z0-9-]+(\.[a-z0-9-]+)+(\/|$|\?)/i.test(r))return null;r=`https://${r}`}try{const i=new URL(r);return i.protocol!=="http:"&&i.protocol!=="https:"||!i.hostname.includes(".")?null:i.toString()}catch{return null}}function Wlt(e){if(e==="timeout")return{kind:"needs_text",message:Mf.unreadable};if(e.status==="PARSED")return{kind:"parsed",job:e};switch(e.failure_reason){case"login_wall":return{kind:"needs_text",message:Mf.login_wall,job:e};case"not_a_job":return{kind:"not_a_job",message:Mf.not_a_job,job:e};case"too_short":return{kind:"needs_text",message:Mf.too_short,job:e};default:return{kind:"needs_text",message:Mf.unreadable,job:e}}}function Hlt(e){const t=e?.response?.status;return t===400||t===422}function fbe(e){return e?.response?.status}function L2(){const e=new Error("Aborted");return e.name="AbortError",e}function hbe(e,t){return new Promise((n,r)=>{if(t?.aborted){r(L2());return}const i=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e),o=()=>{clearTimeout(i),r(L2())};t?.addEventListener("abort",o,{once:!0})})}async function Glt(e,t={}){const n=t.intervalMs??ube,r=t.timeoutMs??dbe,i=t.wait??hbe,o=t.now??(()=>Date.now()),s=o()+r;for(;;){if(o()>=s)return"timeout";await i(n,t.signal);try{const a=await e(t.signal);if(a?.status!=="FETCHING")return a}catch(a){if(a?.name==="AbortError"||t.signal?.aborted)throw a;const c=fbe(a);if(c===401||c===403||c===404)throw a}}}function Ylt(){const e=q(),t=oe();return ie({mutationFn:async n=>(await ee.post("/external-jobs",{url:n},{headers:e,timeout:3e4})).data,onSuccess:n=>{n?.external_job_id&&t.setQueryData(Qd(n.external_job_id),n)}})}function Qlt(){const e=q(),t=oe();return v.useCallback(async(n,r)=>{const o=(await ee.get(`/external-jobs/${encodeURIComponent(n)}`,{headers:e,signal:r})).data;return o?.status&&o.status!=="FETCHING"&&(t.setQueryData(Qd(n),o),t.invalidateQueries({queryKey:Ku})),o},[e.Authorization,t])}function MH(e){return e.startsWith("/interview")||e.startsWith("/practice-interview")||e.startsWith("/create-resume")||e.startsWith("/onboarding")||e.startsWith("/get-started")}function PA(e){const t=(e??[]).filter(r=>r.parsed_status==="complete");return(t.find(r=>r.is_primary)??t[0])?.cv_id}function pbe(e){return e.excluded?!1:e.resolving||e.needsAttention}function mbe(){const t=tt().user?.profile?.sub,n=pt({select:h=>h.location.pathname}),{access:r}=qa(),i=r?.unlocked===!1,o=MH(n)||i,s=fc(!!t),a=v.useMemo(()=>PA(s.data),[s.data]),c=!!t&&!!a&&!o,u=Ow(t,a,{enabled:c}),d=!!t&&!s.isFetched&&!s.isError,f=c&&!u.isFetched&&!u.isError;return pbe({excluded:o,resolving:d||f,needsAttention:PH(u.data)})}const Jlt=[{id:"skills",label:"Jobs by Skills",shortLabel:"Skills"},{id:"title",label:"Jobs by Title",shortLabel:"Title"}],yE="skills";function gbe(e){return e==="skills"||e==="title"}function Xlt(e,t){return e!=="title"?{mode:"skills",jobTitles:[]}:{mode:"title",jobTitles:t}}function Zlt(e){return e==="skills"}function ect(e,t,n=[]){const r=new Map(t.map(a=>[a.title.toLowerCase(),a.title])),i=new Set(n.map(a=>a.toLowerCase())),o=new Set,s=[];for(const a of e){const c=a.toLowerCase(),u=r.get(c)??(i.has(c)?a:void 0);!u||o.has(c)||(o.add(c),s.push(u))}return s}function tct({fromSavedSearch:e,urlFeedTab:t,seedFeedTab:n,persistedFeedTab:r}){return e?n??yE:t??n??r??yE}function nct(e){if(!e.isKeywordSearch&&e.tab==="title"&&e.hasTitles!==void 0)return vbe(e.tab,e.hasTitles)}function vbe(e,t){return e!=="title"?"No jobs found":t?"No jobs found for these titles - try adding another title or widening your location":"Add a job title to see roles matched by title"}function F2(e){if(!Array.isArray(e))return;const t=e.map(Number).filter(n=>Number.isFinite(n));return t.length?t:void 0}function zs(e){if(!Array.isArray(e))return;const t=e.map(n=>
636String(n).trim()).filter(Boolean);return t.length?t:void 0}function Qs(e){if(typeof e!="string")return;const t=e.trim();return t||void 0}function ybe(e){const t={},n=Qs(e.q);n&&(t.q=n);const r=F2(e.country_ids);r&&(t.country_ids=r);const i=F2(e.city_ids);i&&(t.city_ids=i);const o=zs(e.job_type);o&&(t.job_type=o);const s=zs(e.work_type);s&&(t.work_type=s);const a=zs(e.industry);a&&(t.industry=a);const c=zs(e.experience_level);c&&(t.experience_level=c);const u=zs(e.job_function);u&&(t.job_function=u);const d=zs(e.salary_range);d&&(t.salary_range=d);const f=zs(e.benefits);f&&(t.benefits=f);const h=zs(e.company_name);h&&(t.company_name=h);const p=Qs(e.date_posted);p&&(t.date_posted=p);const m=Qs(e.visa_sponsorship);(m==="yes"||m==="no")&&(t.visa_sponsorship=m);const g=Qs(e.sort_by);(g==="most_recent"||g==="best_match")&&(t.sort_by=g);const y=Qs(e.job);return y&&(t.job=y),Qs(e.start)==="fresh"&&(t.start="fresh"),gbe(e.feed_tab)&&(t.feed_tab=e.feed_tab),t}function rct(e){if(!e.country_ids||e.country_ids.length===0)return;const t={sort_by:e.sort_by??"best_match",country_ids:e.country_ids};return e.city_ids&&(t.city_ids=e.city_ids),e.job_type&&(t.job_type=e.job_type),e.work_type&&(t.work_type=e.work_type),e.industry&&(t.industry=e.industry),e.experience_level&&(t.experience_level=e.experience_level),e.job_function&&(t.job_function=e.job_function),e.salary_range&&(t.salary_range=e.salary_range),e.benefits&&(t.benefits=e.benefits),e.company_name&&(t.company_name=e.company_name),e.date_posted&&(t.date_posted=e.date_posted),e.visa_sponsorship&&(t.visa_sponsorship=e.visa_sponsorship),{filters:t,searchTerm:e.q??""}}function xbe(e,t,n){const r={},i=Qs(e.search_term);i&&(r.q=i),e.country_ids?.length&&(r.country_ids=e.country_ids),e.city_ids?.length&&(r.city_ids=e.city_ids),e.job_type?.length&&(r.job_type=e.job_type),e.work_type?.length&&(r.work_type=e.work_type),e.industry?.length&&(r.industry=e.industry),e.experience_level?.length&&(r.experience_level=e.experience_level),e.job_function?.length&&(r.job_function=e.job_function),e.salary_range?.length&&(r.salary_range=e.salary_range),e.benefits?.length&&(r.benefits=e.benefits),e.company_name?.length&&(r.company_name=e.company_name),e.date_posted&&(r.date_posted=e.date_posted),e.visa_sponsorship&&(r.visa_sponsorship=e.visa_sponsorship),e.sort_by&&(r.sort_by=e.sort_by);const o=Qs(t??void 0);return o&&(r.job=o),n&&n!==yE&&(r.feed_tab=n),r}const bbe=new Set(["country_ids","city_ids","sort_by"]);function wbe(e){return!e||typeof e!="object"?!1:Object.entries(e).some(([t,n])=>bbe.has(t)||n==null||n===""?!1:!(Array.isArray(n)&&n.length===0))}function _be(e){if(!e||typeof e!="object")return;const t=e.pages;return Array.isArray(t)?t:void 0}function Sbe(e){if(e[3]!==void 0&&e[3]!=="skills"||Array.isArray(e[4])&&e[4].length>0)return!1;const t=e[1];return!(!t?.country_ids?.length||e[2]==="profile_v2"&&!t.city_ids?.length&&e[6]!=="whole_country")}function jbe(e){let t=0,n=!1,r;for(const i of e){const o=i.key[0];if(o==="jobs-recommendations"){if(i.key[3]==="title")continue;const s=_be(i.data);if(!s||s.length===0)continue;const{count:a,lowerBound:c}=QK(s),u=s.reduce((f,h)=>f+(h.data?.length??0),0),d=Math.max(a,u);if(a>0&&Sbe(i.key)&&(!r||a>r.count)){const f={...xbe(i.key[1])};r={count:a,...c?{lowerBound:!0}:{},search:f}}d>0?t=Math.max(t,d):wbe(i.key[1])||(n=!0)}else if(o==="jobs-recommendations-warm"){const s=i.data;if(!s||typeof s!="object"||!s.feed_ready)continue;const a=typeof s.job_count=="number"?s.job_count:0;a>0?t=Math.max(t,a):n=!0}}return t>0?r?{kind:"ready",count:t,jobs:r}:{kind:"ready",count:t}:n?{kind:"preparing"}:{kind:"unknown"}}function Ebe(e){return e.getQueryCache().getAll().filter(t=>t.queryKey[0]==="jobs-recommendations"||t.queryKey[0]==="jobs-recommendations-warm").map(t=>({key:t.queryKey,data:t.state.data}))}function $H(e){return JSON.stringify(e)}function Cbe(e){try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.kind=="string")return t}catch{}return{kind:"unknown"}}const Nbe=$H({kind:"unknown"});function Pbe(){const e=oe(),t=v.useCallback(i=>{let o=!0;const s=e.getQueryCache().subscribe(a=>{const c=a?.query?.queryKey?.[0];c!=="jobs-recommendations"&&c!=="jobs-recommendations-warm"||queueMicrotask(()=>{o&&i()})});return()=>{o=!1,s()}},[e]),n=v.useCallback(()=>$H(jbe(Ebe(e))),[e]),r=v.useSyncExternalStore(t,n,()=>Nbe);return v.useMemo(()=>Cbe(r),[r])}const DH="ux.nextStep.dismissed",xE=new Set;let oh=null;function bE(){if(oh)return oh;let e=[];try{const t=window.sessionStorage.getItem(DH),n=t?JSON.parse(t):[];Array.isArray(n)&&(e=n.filter(r=>typeof r=="string"))}catch{}return oh=new Set(e),oh}const kbe=new Set(["bring-job"]);function LH(e){return`ux.nextStep.hidden.${e}`}function FH(e){if(!e)return[];try{const t=window.localStorage.getItem(LH(e)),n=t?JSON.parse(t):[];return Array.isArray(n)?n.filter(r=>typeof r=="string"):[]}catch{return[]}}function B2(e,t){const n=new Set(bE());n.add(e),oh=n;try{window.sessionStorage.setItem(DH,JSON.stringify([...n]))}catch{}if(t&&kbe.has(e)){const r=new Set(FH(t));r.add(e);try{window.localStorage.setItem(LH(t),JSON.stringify([...r]))}catch{}}xE.forEach(r=>r())}function Abe(e){const t=v.useSyncExternalStore(n=>(xE.add(n),()=>xE.delete(n)),bE,bE);return v.useMemo(()=>{const n=FH(e);return n.length===0?t:new Set([...t,...n])},[t,e])}function BH(e){return`ux.viewedJob.${e}`}function U2(e){if(!e)return!1;try{return window.localStorage.getItem(BH(e))==="1"}catch{return!1}}function Tbe(e){if(e)try{window.localStorage.setItem(BH(e),"1")}catch{}}function z2(e){return`ux.matchCount.${e}`}const V2="ux.matchBaseline";function Rbe(e){try{const t=JSON.parse(e);if(typeof t=="number")return Number.isFinite(t)?{count:t,request:""}:null;if(t&&typeof t=="object"){const{count:n,request:r}=t;if(typeof n=="number"&&Number.isFinite(n)&&typeof r=="string")return{count:n,request:r}}}catch{}return null}function Obe(e,t,n=""){if(!e||t===void 0)return 0;try{const r=JSON.stringify({count:t,request:n});let i=window.sessionStorage.getItem(V2);i===null&&(i=window.localStorage.getItem(z2(e))??r,window.sessionStorage.setItem(V2,i)),window.localStorage.setItem(z2(e),r);const o=Rbe(i);return!o||o.request!==n?0:Math.max(0,t-o.count)}
636catch{return 0}}const ict=!0,Ibe=!0,oct="Practice interviews are coming soon.",Mbe=24*60*60*1e3;function $be(e){if(!Array.isArray(e))return null;const n=e.filter(r=>{const i=iA(r);return i==="pending"||i==="screening-interview"}).sort((r,i)=>{const o=r.expires_at?Date.parse(r.expires_at):Number.POSITIVE_INFINITY,s=i.expires_at?Date.parse(i.expires_at):Number.POSITIVE_INFINITY;return o-s})[0];return n?{id:n.interview_id,role:lme(n)||"a role"}:null}function q2(e){return{count:e.length,anyRead:e.some(t=>t.parsed_status==="complete"),anyReading:e.some(t=>t.parsed_status==="pending"||t.parsed_status==="processing"),hasMain:e.some(t=>t.is_primary)}}function Dbe(e){const t=e?.missing??[];return{location:t.some(n=>n.field==="city"||n.field==="country"),details:t.some(n=>n.field==="skills"||n.field==="experience_level")}}function Lbe(e,t){if(e!=="/explore-jobs")return 0;const n=t?.city_ids;return Array.isArray(n)?n.filter(r=>Number.isFinite(Number(r))&&Number(r)>0).length:(typeof n=="string"||typeof n=="number")&&Number(n)>0?1:0}function Fbe(e,t){return e.startsWith("/explore-jobs/")?!0:e==="/explore-jobs"&&typeof t.job=="string"&&t.job!==""}function UH(){const t=tt().user?.profile?.sub,n=pt({select:Ge=>Ge.location.pathname}),r=pt({select:Ge=>Ge.location.search}),{access:i}=qa(),o=Qk(i?.unlocked),s=nA({enabled:!!t}),a=fc(!!t),c=a.data,u=c?q2(c):a.isError?q2([]):void 0,d=v.useMemo(()=>PA(c),[c]),f=!o&&(u?.count??0)>0,h=oA(f),p=v.useMemo(()=>sA(h.data),[h.data]),g=h.isFetched||h.isError?p.length:void 0,y=p.reduce((Ge,gt)=>Ge+gt.cities.length,0),b=Ow(t,d,{enabled:f&&!!d}),x=Dbe(b.data),w=b.data?x.location:b.isError?!1:void 0,S=Pbe(),_=S.kind==="ready",j=f&&(g??0)>0&&S.kind!=="preparing",[E,C]=v.useState(()=>U2(t));v.useEffect(()=>C(U2(t)),[t]),v.useEffect(()=>{t&&Fbe(n,r??{})&&(Tbe(t),C(!0))},[n,r,t]);const N=Fve({page:1,page_size:1},{enabled:j&&_&&!E}),k=E?!0:N.data?(N.data.total??N.data.data?.length??0)>0:N.isError?!0:void 0,P=j&&_&&k===!0,A=Rme(j),L=jme(P),R=Tme(P),O=(A.isFetched||A.isError)&&(L.isFetched||L.isError)&&(R.isFetched||R.isError)?!!A.data?.enabled||(L.data?.length??0)>0||(R.data?.length??0)>0:void 0,T=Ome(j&&!!A.data?.enabled).data?.pending_count??0,M=L.data?.length??0,V=Dw();V.data&&Xxe(V.data,"PRACTICE_INTERVIEW");const B=!Ibe,z=Lve(j&&B).data?.data?.[0],[H,de]=v.useState(0),ge=_?S.jobs:void 0,te=ge?.count,ye=ge?JSON.stringify(ge.search):"";v.useEffect(()=>{de(Obe(t,te,ye))},[t,te,ye]);const W=Abe(t),ne=zr(),se=cbe(ne&&j&&n===zu&&!W.has("bring-job")),U=se.data?se.data.length>0:se.isError?!1:void 0,ae=v.useRef(()=>{});ae.current=()=>{a.refetch()};const re=v.useCallback(()=>ae.current(),[]);return{state:{pathname:n,simpleUx:ne,locked:o,pendingInterview:s.isFetched||s.isError?$be(s.data):void 0,cvs:u,placeCount:g,placeCityCount:y,urlCityCount:Lbe(n,r),cvLocationMissing:w,cvDetailsMissing:x.details,matches:S,viewedAJob:k,autoApplySetUp:O,autoApplyOn:A.data?!!A.data.enabled:void 0,toApprove:T,staged:M,practiceAvailable:B,savedJob:z?{id:z.job_id,title:z.title}:null,newMatches:H,addedAJob:U,dismissed:W,rotation:Math.floor(Date.now()/Mbe)},refetch:re,gapReport:b.data,mainCvId:d}}const Bbe=5e3,Ube=2e4,zbe="inline-flex min-h-10 shrink-0 items-center justify-center gap-1.5 rounded-lg bg-card px-4 text-sm font-bold text-primary shadow-sm transition-colors hover:bg-card/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-card focus-visible:ring-offset-2 focus-visible:ring-offset-primary",Vbe="inline-flex min-h-10 shrink-0 items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-4 text-sm font-bold text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";function wE(e){return e.id==="bring-job"}function K2({step:e,onEditPlaces:t,onQuickFields:n}){if(!e.button)return null;const r=wE(e)?Vbe:zbe,i=l.jsxs(l.Fragment,{children:[e.button," ",l.jsx(Ad,{size:15,"aria-hidden":!0})]});switch(e.action.kind){case"link":return l.jsx(Re,{to:e.action.to,search:e.action.search,hash:e.action.hash,className:r,"data-testid":"next-step-button",children:i});case"edit-places":return l.jsx("button",{type:"button",onClick:t,className:r,"data-testid":"next-step-button",children:i});case"quick-fields":return l.jsx("button",{type:"button",onClick:n,className:r,"data-testid":"next-step-button",children:i});default:return null}}function W2({pathname:e}){const t=sW();return rve(e)||t?null:l.jsx(qbe,{})}function qbe(){const t=tt().user?.profile?.sub,n=oe(),{state:r,refetch:i,mainCvId:o}=UH(),s=lW(r),[a,c]=v.useState(!1),[u,d]=v.useState(!1),f=mA(Pm.portalEntry),h=v.useRef(f);h.current=f;const p=s?.id;return v.useEffect(()=>{if(p==="cv-reading"){const m=window.setInterval(i,Bbe);return()=>window.clearInterval(m)}if(p==="matches-preparing"){const m=window.setInterval(()=>{h.current(),n.invalidateQueries({queryKey:["jobs-recommendations"]})},Ube);return()=>window.clearInterval(m)}},[p,i,n]),l.jsxs(l.Fragment,{children:[s&&wE(s)&&l.jsx("div",{className:"w-full",children:l.jsx("div",{className:"mx-auto w-full max-w-7xl px-4 pt-3 sm:px-6 lg:px-8",children:l.jsxs("div",{role:"region","aria-label":"Your next step","data-testid":"next-step-bar","data-step":s.id,"data-quiet":"true",className:"flex flex-wrap items-center gap-x-3 gap-y-2 rounded-2xl border border-border bg-card px-4 py-2.5 sm:flex-nowrap",children:[l.jsx("p",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground","aria-live":"polite",children:s.text}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(K2,{step:s,onEditPlaces:()=>c(!0),onQuickFields:()=>d(!0)}),l.jsx("button",{type:"button",onClick:()=>B2(s.id,t),"aria-label":"Hide this step",className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground",children:l.jsx(Dr,{size:16,"aria-hidden":!0})})]})]})})}),s&&!wE(s)&&l.jsxs("div",{role:"region","aria-label":"Your next step","data-testid":"next-step-bar","data-step":s.id,className:"relative w-full bg-primary text-primary-foreground",children:[l.jsxs("div",{className:"edge-swipe-safe mx-auto flex w-full max-w-7xl flex-wrap items-center gap-x-3 gap-y-2 px-4 py-2.5 sm:flex-nowrap sm:px-6 lg:px-8",children:[l.jsx("p",{className:"min-w-0 flex-1 text-sm font-semibold leading-snug","aria-live":"polite",children:s.text}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(K2,{step:s,onEditPlaces:()=>c(!0),onQuickFields:()=>d(!0)}),l.jsx("button",{type:"button",onClick:()=>B2(s.id,t),"aria-label":"Hide this step",className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-primary-foreground
636/80 hover:bg-primary-foreground/10 hover:text-primary-foreground",children:l.jsx(Dr,{size:16,"aria-hidden":!0})})]})]}),s.progress&&l.jsx("div",{className:"h-0.5 w-full overflow-hidden bg-primary-foreground/20","aria-hidden":!0,children:l.jsx("div",{className:K("h-full w-1/3 animate-pulse bg-primary-foreground/80")})})]}),a?l.jsx(exe,{open:!0,onOpenChange:c}):null,u&&t&&o?l.jsx(AH,{userId:t,cvId:o,open:!0,onClose:()=>d(!1)}):null]})}const _E=[{id:"home",label:"Home",to:"/dashboard",tour:"nav-home",match:["/dashboard"]},{id:"jobs",label:"Jobs",to:"/explore-jobs",search:MK("return"),tour:"nav-jobs",match:["/explore-jobs","/bring-job","/saved-jobs","/saved-searches","/recently-viewed"]},{id:"market",label:"Job market",shortLabel:"Market",to:"/job-market",tour:"nav-market",match:["/job-market"]},{id:"applications",label:"My jobs",to:"/applications",tour:"nav-applications",match:["/applications","/auto-apply","/auto-apply-profile","/auto-apply-mailbox"]},{id:"interviews",label:"Interviews",to:"/my-interviews",tour:"nav-interviews",match:["/my-interviews","/job-preview","/interview","/interview-history","/practice-interview"]},{id:"documents",label:"My CV",to:"/create-resume",tour:"nav-documents",match:["/documents","/create-resume","/cover-letter","/improve-cv","/profile-ready"]}];function Kbe(e){return e?_E.filter(t=>t.id==="interviews"||t.id==="documents"):[..._E]}function SE(e,t){return e==="/create-resume"&&Yl(t,"/create-resume")}function Yl(e,t){return e===t||e.startsWith(t+"/")}function zH(e){for(const t of _E)if(t.match.some(n=>Yl(e,n)))return t.id;return null}function Wbe(e,t){return t?null:e==="/applications"||Yl(e,"/auto-apply")?{label:"My jobs",tabs:[{label:"Auto-apply",to:"/auto-apply",active:Yl(e,"/auto-apply")},{label:"All jobs",to:"/applications",active:e==="/applications"}]}:e==="/my-interviews"||e==="/interview-history"?{label:"Interviews",tabs:[{label:"Interviews",to:"/my-interviews",active:e==="/my-interviews"},{label:"Practice",to:"/interview-history",active:e==="/interview-history"}]}:null}function Hbe(e,t={}){return t.hasCv&&(Yl(e,"/get-started")||e==="/create-resume"&&t.cvHub)?!1:["/interview","/practice-interview","/create-resume","/improve-cv","/profile-ready","/get-started","/onboarding","/welcome"].some(n=>Yl(e,n))}function Gbe(e,t,n){return!Yl(e,"/get-started")||n===!0||t==="some"?!1:t==="loading"||n===!1||t==="none"}const Ybe={home:kse,jobs:Ea,market:yV,applications:ok,interviews:jV,documents:wV};let jE=!1;const EE=new Set;function H2(e){jE!==e&&(jE=e,EE.forEach(t=>t()))}function Qbe(e){return EE.add(e),()=>EE.delete(e)}function sct(e){v.useEffect(()=>(H2(e),()=>H2(!1)),[e])}function Jbe({items:e,pathname:t,badge:n,hasCv:r}){const i=v.useSyncExternalStore(Qbe,()=>jE,()=>!1),o=Hbe(t,{hasCv:r,cvHub:i});if(v.useEffect(()=>{if(o)return;const a=document.documentElement;return a.classList.add("has-bottom-tabs"),()=>a.classList.remove("has-bottom-tabs")},[o]),o)return null;const s=zH(t);return l.jsx("nav",{"aria-label":"Main","data-testid":"bottom-tab-bar",className:"fixed inset-x-0 bottom-0 z-40 border-t border-border bg-card/95 pb-[env(safe-area-inset-bottom)] backdrop-blur-md lg:hidden",children:l.jsx("ul",{className:"mx-auto flex max-w-xl items-stretch justify-around",children:e.map(a=>{const c=Ybe[a.id],u=s===a.id;return l.jsx("li",{className:"min-w-0 flex-1",children:l.jsxs(Re,{to:a.to,search:a.search,"data-tour":a.tour,onClick:d=>{SE(a.to,t)&&(d.preventDefault(),window.dispatchEvent(new CustomEvent("cv-wizard-reset")))},"aria-current":u?"page":void 0,className:K("relative flex h-[60px] flex-col items-center justify-center gap-0.5 px-0 text-[11px] font-semibold tracking-[-0.01em] transition-colors sm:px-1 sm:text-xs sm:tracking-normal",u?"text-primary":"text-foreground/75 hover:text-foreground"),children:[l.jsx("span",{className:K("flex h-7 w-11 items-center justify-center rounded-full transition-colors sm:w-12",u&&"bg-primary/15"),children:l.jsx(c,{size:20,"aria-hidden":!0})}),l.jsxs("span",{className:"flex max-w-full items-center gap-1 truncate",children:[a.shortLabel??a.label,a.id==="documents"&&n]})]})},a.id)})})})}function Xbe({pathname:e,locked:t}){const n=Wbe(e,t);return n?l.jsx("div",{className:"border-b border-border bg-card",children:l.jsx("div",{role:"tablist","aria-label":n.label,className:"mx-auto flex max-w-7xl gap-1 px-4 sm:px-6 lg:px-8 2xl:max-w-[90rem]",children:n.tabs.map(r=>l.jsx(Re,{to:r.to,role:"tab","aria-selected":r.active,className:K("-mb-px border-b-2 px-3 py-3 text-sm font-semibold transition-colors",r.active?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:r.label},r.to))})}):null}const Zbe=[{label:"Dashboard",to:"/dashboard"},{label:"Explore Jobs",to:"/explore-jobs",search:MK("return")},{label:"Job market",to:"/job-market"},{label:"Auto-apply",to:"/auto-apply"},{label:"Interviews",to:"/my-interviews"},{label:"Cover Letter",to:"/cover-letter"}],ewe=[{label:"Profile",to:"/profile"},{label:"Applications",to:"/applications"},{label:"My documents",to:"/documents"},{label:"Billing",to:"/candidate-billing"}],twe=[{label:"Profile",to:"/profile"},{label:"Billing",to:"/candidate-billing"}];function G2({to:e,size:t}){const n="text-muted-foreground shrink-0";return e==="/profile"?l.jsx(PV,{size:t,className:n}):e==="/documents"?l.jsx(wV,{size:t,className:n}):e==="/applications"?l.jsx(ok,{size:t,className:n}):l.jsx(_se,{size:t,className:n})}function nwe({percent:e}){const t=e>=80?"bg-success/10 text-success":e>=40?"bg-warning/10 text-warning":"bg-destructive/10 text-destructive";return l.jsxs("span",{title:`${qM(e)}. ${Dge}`,className:K("shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-bold leading-none tabular-nums whitespace-nowrap",t),children:[l.jsxs("span",{"aria-hidden":"true",children:["Score ",e]}),l.jsx("span",{className:"sr-only",children:qM(e)})]})}function VH(){const e=tt(),t=km(),{scorePercent:n,hasCv:r,cvStatus:i,isLoading:o}=Kde(),{access:s}=qa(),a=Qk(s?.unlocked),c=CM(Zbe,a),u=zr(),d=Kbe(a),f=zH(t),h=u&&Gbe(t,i,r),p=h?[]:CM(u?twe:ewe,a),m=u?"lg:flex":"xl:flex",g=u?"lg:block":"xl:block",y=u?"lg:hidden":"xl:hidden",b=!u&&!o&&n!==null?l.jsx(nwe,{percent:n}):void 0,[x,w]=v.useState(!1),{data:S=[]}=Lhe(),_=Bhe(),j=Fhe(),E=S.filter(z=>!z.read_at).length,C=S.slice(0,5),N=e.user?.profile?.given_name??"",k=e.user?.profile?.fam
636ily_name??"",A=(N+" "+k).trim()||"User",L=e.user?.profile?.email??"",R=((N[0]??"")+(k[0]??"")).toUpperCase()||A[0]?.toUpperCase()||"U",{data:D}=IK(),O=D?.avatar_url,F=()=>w(!1),T=rW("candidate"),M=()=>{F(),T(a?"/my-interviews":"/dashboard")},V=t==="/auto-apply-mailbox",B=z=>{F(),V&&(z.preventDefault(),window.history.length>1?window.history.back():window.location.assign("/auto-apply"))},I=l.jsxs("nav",{"data-sticky-header":!0,className:"pt-safe sticky top-0 z-50 w-full border-b border-border bg-card/80 backdrop-blur-md",children:[l.jsx("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 2xl:max-w-[90rem]",children:l.jsxs("div",{className:"flex h-16 items-center justify-between gap-4",children:[l.jsx("div",{className:"flex min-w-0 shrink-0 items-center",children:l.jsx(Re,{to:a?"/my-interviews":op,className:"flex items-center gap-2 shrink-0",children:l.jsx(Zk,{})})}),l.jsxs("div",{className:K("hidden min-w-0 flex-1 items-center justify-center gap-0.5 2xl:gap-1",m),children:[u&&!h&&d.map(z=>{const H=f===z.id;return l.jsxs(Re,{to:z.to,search:z.search,"data-tour":z.tour,onClick:de=>{SE(z.to,t)&&(de.preventDefault(),window.dispatchEvent(new CustomEvent("cv-wizard-reset")))},"aria-current":H?"page":void 0,className:K("flex items-center gap-1 whitespace-nowrap text-sm font-medium py-5 px-2 2xl:px-3 border-b-2 transition-colors",H?"text-primary border-primary":"text-muted-foreground border-transparent hover:text-muted-foreground hover:border-muted-foreground/40"),children:[z.label,z.id==="documents"&&b]},z.id)}),!u&&c.map(z=>{const H=t===z.to||t.startsWith(z.to+"/");return l.jsx(Re,{to:z.to,search:"search"in z?z.search:void 0,"aria-current":H?"page":void 0,className:K("flex items-center gap-1 whitespace-nowrap text-sm font-medium py-5 px-2 2xl:px-3 border-b-2 transition-colors",H?"text-primary border-primary":"text-muted-foreground border-transparent hover:text-muted-foreground hover:border-muted-foreground/40"),children:z.label},z.to)}),!u&&l.jsxs(Re,{to:"/create-resume","data-tour":"nav-cv",onClick:z=>{(t==="/create-resume"||t.startsWith("/create-resume/"))&&(z.preventDefault(),window.dispatchEvent(new CustomEvent("cv-wizard-reset")))},className:K("flex items-center gap-1 whitespace-nowrap text-sm font-medium py-5 px-2 2xl:px-3 border-b-2 transition-colors",t==="/create-resume"||t.startsWith("/create-resume/")?"text-primary border-primary":"text-muted-foreground border-transparent hover:text-muted-foreground hover:border-muted-foreground/40"),children:["CV",b]})]}),l.jsxs("div",{className:"flex shrink-0 items-center gap-2 2xl:gap-3",children:[!h&&l.jsx(BK,{}),!a&&!h&&l.jsxs(Gj,{modal:!1,children:[l.jsx(Yj,{asChild:!0,children:l.jsxs("button",{type:"button",title:"Notifications","aria-label":"Notifications",className:K("relative flex h-9 items-center justify-center gap-2 rounded-lg border px-2.5 text-xs font-bold transition-colors",t==="/notifications"||t==="/notification-preferences"?"border-primary bg-primary text-primary-foreground":"border-primary/40 bg-accent/60 text-primary hover:bg-accent"),children:[l.jsx($_,{className:"h-[17px] w-[17px]"}),l.jsx("span",{className:"hidden 2xl:inline",children:"Notifications"}),E>0&&l.jsx("span",{className:"absolute -right-1 -top-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-destructive px-1 text-[10px] font-bold leading-none text-destructive-foreground",children:E>99?"99+":E})]})}),l.jsxs(Fy,{align:"end",className:"w-[min(24rem,calc(100vw-1rem))] p-2",children:[l.jsxs("div",{className:"flex items-center justify-between px-1 py-2",children:[l.jsx("div",{className:"text-xs font-bold uppercase tracking-wide text-muted-foreground",children:"Recent notifications"}),E>0&&l.jsx("button",{type:"button",disabled:j.isPending,onClick:()=>j.mutate(),className:"text-xs font-bold text-primary hover:text-primary/80 disabled:opacity-50",children:"Mark all read"})]}),C.length===0?l.jsx("div",{className:"px-2 py-5 text-sm text-muted-foreground",children:u?"No new messages.":"Youâre all caught up."}):l.jsx("div",{className:"max-h-[min(32rem,calc(100vh-10rem))] space-y-2 overflow-y-auto pr-1",children:C.map(z=>l.jsx($pe,{notification:z,compact:!0,onRead:H=>_.mutate(H)},z.notification_id))}),l.jsx(wu,{}),l.jsx(_i,{asChild:!0,children:l.jsx(Re,{to:"/notifications",className:"cursor-pointer font-bold text-primary",children:"View all notifications"})}),l.jsx(_i,{asChild:!0,children:l.jsx(Re,{to:"/saved-searches",className:"cursor-pointer",children:"Job alerts"})}),l.jsx(_i,{asChild:!0,children:l.jsx(Re,{to:"/notification-preferences",className:"cursor-pointer",children:"Email settings"})})]})]}),!a&&!h&&l.jsxs(Re,{to:"/auto-apply-mailbox",title:V?"Close messages":"Auto-apply messages","aria-label":V?"Close messages":"Auto-apply messages","aria-pressed":V&&!x,onClick:B,className:K("flex items-center justify-center w-9 h-9 rounded-lg border transition-colors",V&&!x?"bg-primary text-primary-foreground border-primary":"bg-primary/10 text-primary border-primary/20 hover:bg-primary/20"),children:[l.jsx(Mse,{className:"h-[18px] w-[18px]"}),l.jsx("span",{className:"sr-only",children:"Auto-apply messages"})]}),l.jsx("div",{className:K("hidden",g),children:l.jsxs(Gj,{modal:!1,children:[l.jsx(Yj,{asChild:!0,children:l.jsxs("button",{type:"button","data-tour":"nav
636-account",className:"flex items-center gap-2 rounded-lg border border-border py-1 pl-1 pr-2 transition-colors hover:bg-muted/50 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",title:A,children:[l.jsx(Ch,{initials:R,imageUrl:O,className:"h-7 w-7 text-xs"}),l.jsx("span",{className:"hidden max-w-[140px] truncate text-sm font-medium text-muted-foreground 2xl:inline",children:A}),l.jsx(Td,{size:14,className:"shrink-0 text-muted-foreground"})]})}),l.jsxs(Fy,{align:"end",className:"min-w-[15rem]",children:[l.jsxs("div",{className:"flex items-center gap-2.5 px-2 py-2",children:[l.jsx(Ch,{initials:R,imageUrl:O,className:"h-9 w-9 text-sm"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"truncate text-sm font-semibold text-foreground",children:A}),L&&l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:L})]})]}),l.jsx(wu,{}),p.map(z=>l.jsx(_i,{asChild:!0,children:l.jsxs(Re,{to:z.to,className:"flex cursor-pointer items-center gap-2",children:[l.jsx(G2,{to:z.to,size:14}),z.label]})},z.to)),!a&&!h&&l.jsx(l.Fragment,{children:l.jsx(_i,{asChild:!0,children:l.jsxs(Re,{to:"/notification-preferences",className:"flex cursor-pointer items-center gap-2",children:[l.jsx($_,{size:14,className:"text-muted-foreground"}),"Email settings"]})})}),!h&&l.jsxs(_i,{onSelect:M,className:"flex cursor-pointer items-center gap-2",children:[l.jsx(i
636p,{size:14,className:"text-muted-foreground"}),"Show me around"]}),l.jsx(wu,{}),l.jsx(_i,{asChild:!0,children:l.jsxs("a",{href:"/logout",className:"flex cursor-pointer items-center gap-2 text-destructive focus:text-destructive",children:[l.jsx(Py,{size:14}),"Sign out"]})})]})]})}),l.jsx("button",{type:"button","data-tour":"nav-menu",onClick:()=>w(z=>!z),className:K(y,"flex items-center justify-center w-10 h-10 rounded-lg text-muted-foreground hover:bg-muted transition-colors shrink-0"),"aria-label":x?"Close menu":"Open menu",children:x?l.jsx(Dr,{size:20}):l.jsx(SV,{size:20})})]})]})}),x&&l.jsxs("div",{className:K(y,"h-[calc(100dvh-4rem-env(safe-area-inset-top))] overflow-y-auto overscroll-contain border-t border-border bg-card shadow-lg"),children:[l.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/50",children:[l.jsx(Ch,{initials:R,imageUrl:O,className:"h-9 w-9 text-sm"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"truncate text-sm font-semibold text-muted-foreground",children:A}),L&&l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:L})]})]}),u&&!h&&l.jsx("div",{"data-testid":"menu-main-nav",className:"px-2 pt-2 pb-1 space-y-0.5 border-b border-border/50",children:d.map(z=>{const H=f===z.id;return l.jsxs(Re,{to:z.to,search:z.search,onClick:de=>{SE(z.to,t)&&(de.preventDefault(),window.dispatchEvent(new CustomEvent("cv-wizard-reset"))),F()},"aria-current":H?"page":void 0,className:K("flex items-center gap-3 px-3 py-3 rounded-lg text-sm font-medium transition-colors",H?"bg-primary/5 text-primary":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[z.label,z.id==="documents"&&b]},z.id)})}),!a&&!h&&l.jsxs("div",{className:"px-2 pt-2 space-y-0.5",children:[p.map(z=>l.jsxs(Re,{to:z.to,onClick:F,"aria-current":t===z.to?"page":void 0,className:K("flex items-center gap-3 px-3 py-3 rounded-lg text-sm font-medium transition-colors",t===z.to||t.startsWith(z.to+"/")?"bg-primary/5 text-primary":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[l.jsx(G2,{to:z.to,size:16}),z.label]},z.to)),l.jsxs(Re,{to:"/notification-preferences",onClick:F,className:K("flex items-center gap-3 px-3 py-3 rounded-lg text-sm font-medium transition-colors",t==="/notification-preferences"?"bg-primary/5 text-primary":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[l.jsx($_,{size:16,className:"text-muted-foreground shrink-0"}),"Email settings"]})]}),!u&&l.jsxs("div",{className:"px-2 py-2 space-y-0.5",children:[c.map(z=>{const H=t===z.to||t.startsWith(z.to+"/");return l.jsx(Re,{to:z.to,search:"search"in z?z.search:void 0,onClick:F,"aria-current":H?"page":void 0,className:K("flex items-center gap-3 px-3 py-3 rounded-lg text-sm font-medium transition-colors",H?"bg-primary/5 text-primary":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:z.label},z.to)}),l.jsxs(Re,{to:"/create-resume","data-tour":"nav-cv",onClick:z=>{(t==="/create-resume"||t.startsWith("/create-resume/"))&&(z.preventDefault(),window.dispatchEvent(new CustomEvent("cv-wizard-reset"))),F()},className:K("flex items-center gap-3 px-3 py-3 rounded-lg text-sm font-medium transition-colors",t==="/create-resume"||t.startsWith("/create-resume/")?"bg-primary/5 text-primary":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:["CV",b]})]}),l.jsxs("div",{className:"px-2 py-2 border-t border-border/50",children:[!h&&l.jsxs("button",{type:"button",onClick:M,className:"flex w-full items-center gap-3 px-3 py-3 rounded-lg text-sm font-medium text-muted-foreground hover:bg-muted/50 hover:text-foreground transition-colors",children:[l.jsx(i
636p,{size:16,className:"text-muted-foreground shrink-0"}),"Show me around"]}),l.jsxs("a",{href:"/logout",className:"flex items-center gap-3 px-3 py-3 rounded-lg text-sm font-medium text-muted-foreground hover:bg-muted/50 hover:text-destructive transition-colors",children:[l.jsx(Py,{size:16,className:"text-muted-foreground shrink-0"}),"Sign out"]})]})]}),l.jsx(Oge,{})]});return u?h?l.jsxs(l.Fragment,{children:[I,l.jsx(W2,{pathname:t})]}):l.jsxs(l.Fragment,{children:[I,l.jsx(W2,{pathname:t}),l.jsx(Xbe,{pathname:t,locked:a}),l.jsx(Jbe,{items:d,pathname:t,hasCv:r===!0||i==="some"})]}):I}function rwe(){const e=tt();if(!zr())return l.jsx("p",{children:"Not Found"});const t=e.isAuthenticated&&e.user?.profile?.role==="CANDIDATE",n=t?"/dashboard":"/";return l.jsx("div",{className:t?"candidate-theme":void 0,children:l.jsxs("div",{className:"flex min-h-screen flex-col bg-muted/50 font-funnel",children:[t?l.jsx(VH,{}):l.jsx("header",{className:"border-b border-border bg-card",children:l.jsx("div",{className:"mx-auto flex h-16 max-w-7xl items-center px-4 sm:px-6 lg:px-8",children:l.jsx(Re,{to:"/",className:"text-lg font-bold text-foreground",children:"asgardhire.ai"})})}),l.jsxs("main",{className:"mx-auto flex w-full max-w-lg flex-1 flex-col items-center justify-center px-4 py-16 text-center",children:[l.jsx("p",{className:"text-sm font-semibold text-muted-foreground",children:"Page not found"}),l.jsx("h1",{className:"mt-2 text-2xl font-bold text-foreground",children:"We can't find that page"}),l.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The link may be old, or the address may have a typo."}),l.jsx(Re,{to:n,"data-testid":"not-found-home",className:"mt-6 inline-flex h-11 items-center justify-center rounded-xl bg-primary px-5 text-sm font-bold text-primary-foreground hover:bg-primary/90",children:t?"Go to Home":"Go to the home page"})]})]})})}function iwe(){return Dye(),l.jsxs(l.Fragment,{children:[l.jsx(Rre,{}),l.jsx(Fa,{}),l.jsx(Aie,{}),l.jsx(Cae,{})]})}const zt=fte({component:iwe,notFoundComponent:rwe});function Fn({label:e="Loading",size:t=34,className:n}){return l.jsxs("div",{role:"status","aria-live":"polite",className:K("flex min-h-96 w-full flex-col items-center justify-center gap-3",n),children:[l.jsx(ft,{size:t,variant:"brand",spin:!0,title:""}),l.jsx("span",{className:"text-sm text-muted-foreground",children:e})]})}function Lm(){const e=v.useSyncExternalStore(Rf.subscribe,Rf.getSnapshot,Rf.getSnapshot),t=oe(),r=tt().user?.profile.sub??null,i=v.useMemo(()=>e.setBy!==null&&e.setBy===r?{orgId:e.orgId,orgName:e.orgName}:{orgId:null,orgName:null},[e,r]),o=v.useCallback((a,c)=>{t.removeQueries(),Rf.set(a,c,r)},[t,r]),s=v.useCallback(()=>{t.removeQueries(),Rf.clear()},[t]);return{orgId:i.orgId,orgName:i.orgName,isImpersonating:i.orgId!==null,impersonate:o,exit:s}}const act=["shortlisted","hired","on_hold","rejected"],lct={shortlisted:"Shortlisted",hired:"Hired",on_hold:"On hold",rejected:"Rejected"};function Lw(){const e=tt(),{orgId:t}=Lm(),n=e.user?.profile;return t??n?.org_id??n?.organization_id??""}const owe=e=>["org-candidates",e.status??"all",e.page??1,e.limit??20,e.sortBy??"created_at",e.sortDir??"desc"];function cct(e={}){const t=q(),n=Lw(),{status:r="all",page:i=1,limit:o=20,sortBy:s,sortDir:a,enabled:c=!0}=e;return ue({queryKey:owe({status:r,page:i,limit:o,sortBy:s,sortDir:a}),queryFn:async({signal:u})=>(await ee.get(`/orgs/${encodeURIComponent(n)}/candidates`,{headers:t,signal:u,params:{...r==="all"?{}:{status:r},page:i,limit:o,...s?{sort_by:s}:{},...a?{sort_dir:a}:{}}})).data,enabled:c&&!!n,placeholderData:u=>u})}const swe=[{code:"AF",label:"Afghanistan"},{code:"AX",label:"Ã
land Islands"},{code:"AL",label:"Albania"},{code:"DZ",label:"Algeria"},{code:"AS",label:"American Samoa"},{code:"AD",label:"Andorra"},{code:"AO",label:"Angola"},{code:"AI",label:"Anguilla"},{code:"AQ",label:"Antarctica"},{code:"AG",label:"Antigua & Barbuda"},{code:"AR",label:"Argentina"},{code:"AM",label:"Armenia"},{code:"AW",label:"Aruba"},{code:"AU",label:"Australia"},{code:"AT",label:"Austria"},{code:"AZ",label:"Azerbaijan"},{code:"BS",label:"Bahamas"},{code:"BH",label:"Bahrain"},{code:"BD",label:"Bangladesh"},{code:"BB",label:"Barbados"},{code:"BY",label:"Belarus"},{code:"BE",label:"Belgium"},{code:"BZ",label:"Belize"},{code:"BJ",label:"Benin"},{code:"BM",label:"Bermuda"},{code:"BT",label:"Bhutan"},{code:"BO",label:"Bolivia"},{code:"BA",label:"Bosnia & Herzegovina"},{code:"BW",label:"Botswana"},{code:"BV",label:"Bouvet Island"},{code:"BR",label:"Brazil"},{code:"IO",label:"British Indian Ocean Territory"},{code:"VG",label:"British Virgin Islands"},{code:"BN",label:"Brunei"},{code:"BG",label:"Bulgaria"},{code:"BF",label:"Burkina Faso"},{code:"BI",label:"Burundi"},{code:"KH",label:"Cambodia"},{code:"CM",label:"Cameroon"},{code:"CA",label:"Canada"},{code:"CV",label:"Cape Verde"},{code:"BQ",label:"Caribbean Netherlands"},{code:"KY",label:"Cayman Islands"},{code:"CF",label:"Central African Republic"},{code:"TD",label:"Chad"},{code:"CL",label:"Chile"},{code:"CN",label:"China"},{code:"CX",label:"Christmas Island"},{code:"CC",label:"Cocos (Keeling) Islands"},{code:"CO",label:"Colombia"},{code:"KM",label:"Comoros"},{code:"CG",label:"Congo - Brazzaville"},{code:"CD",label:"Congo - Kinshasa"},{code:"CK",label:"Cook Islands"},{code:"CR",label:"Costa Rica"},{code:"CI",label:"Côte dâIvoire"},{code:"HR",label:"Croatia"},{code:"CU",label:"Cuba"},{code:"CW",label:"Curaçao"},{code:"CY",label:"Cyprus"},{code:"CZ",label:"Czechia"},{code:"DK",label:"Denmark"},{code:"DJ",label:"Djibouti"},{code:"DM",label:"Dominica"},{code:"DO",label:"Dominican Republic"},{code:"EC",label:"Ecuador"},{code:"EG",label:"Egypt"},{code:"SV",label:"El Salvador"},{code:"GQ",label:"Equatorial Guinea"},{code:"ER",label:"Eritrea"},{code:"EE",label:"Estonia"},{code:"SZ",label:"Eswatini"},{code:"ET",label:"Ethiopia"},{code:"FK",label:"Falkland Islands"},{code:"FO",label:"Faroe Islands"},{code:"FJ",label:"Fiji"},{code:"FI",label:"Finland"},{code:"FR",label:"France"},{code:"GF",label:"French Guiana"},{code:"PF",label:"French Polynesia"},{code:"TF",label:"French Southern Territories"},{code:"GA",label:"Gabon"},{code:"GM",label:"Gambia"},{code:"GE",label:"Georgia"},{code:"DE",label:"Germany"},{code:"GH",label:"Ghana"},{code:"GI",label:"Gibraltar"},{code:"GR",label:"Greece"},{code:"GL",label:"Greenland"},{code:"GD",label:"Grenada"},{code:"GP",label:"Guadeloupe"},{code:"GU",label:"Guam"},{code:"GT",label:"Guatemala"},{code:"GG",label:"Guernsey"},{code:"GN",label:"Guinea"},{code:"GW",label:"Guinea-Bissau"},{code:"GY",label:"Guyana"},{code:"HT",label:"Haiti"},{code:"HM",label:"Heard & McDonald Islands"},{code:"HN",label:"Honduras"},{code:"HK",label:"Hong Kong SAR China"},{code:"HU",label:"Hungary"},{code:"IS",label:"Iceland"},{code:"IN",label:"India"},{code:"ID",label:"Indonesia"},{code:"IR",label:"Iran"},{code:"IQ",label:"Iraq"},{code:"IE",label:"Ireland"},{code:"IM",label:"Isle of Man"},{code:"IL",label:"Israel"},{code:"IT",label:"Italy"},{code:"JM",label:"Jamaica"},{code:"JP",label:"Japan"},{code:"JE",label:"Jersey"},{code:"JO",label:"Jordan"},{code:"KZ",label:"Kazakhstan"},{code:"KE",label:"Kenya"},{code:"KI",label:"Kiribati"},{code:"XK",label:"Kosovo"},{code:"KW",label:"Kuwait"},{code:"KG",label:"Kyrgyzstan"},{code:"LA",label:"Laos"},{code:"LV",label:"Latvia"},{code:"LB",label:"Lebanon"},{code:"LS",label:"Lesotho"},{code:"LR",label:"Liberia"},{code:"LY",label:"Libya"},{code:"LI",label:"Liechtenstein"},{code:"LT",label:"Lithuania"},{code:"LU",label:"Luxembourg"},{code:"MO",label:"Macao SAR China"},{code:"MG",label:"Madagascar"},{code:"MW",label:"Malawi"},{code:"MY",label:"Malaysia"},{code:"MV",label:"Maldives"},{code:"ML",label:"Mali"},{code:"MT",label:"Malta"},{code:"MH",label:"Marshall Islands"},{code:"MQ",label:"Martinique"},{code:"MR",label:"Mauritania"},{code:"MU",label:"Mauritius"},{code:"YT",label:"Mayotte"},{code:"MX",label:"Mexico"},{code:"FM",label:"Micronesia"},{code:"MD",label:"Moldova"},{code:"MC",label:"Monaco"},{code:"MN",label:"Mongolia"},{code:"ME",label:"Montenegro"},{code:"MS",label:"Montserrat"},{code:"MA",label:"Morocco"},{code:"MZ",label:"Mozambique"},{code:"MM",label:"Myanmar (Burma)"},{code:"NA",label:"Namibia"},{code:"NR",label:"Nauru"},{code:"NP",label:"Nepal"},{code:"NL",label:"Netherlands"},{code:"NC",label:"New Caledonia"},{code:"NZ",label:"New Zealand"},{code:"NI",label:"Nicaragua"},{code:"NE",label:"Niger"},{code:"NG",label:"Nigeria"},{code:"NU",label:"Niue"},{code:"NF",label:"Norfolk Island"},{code:"KP",label:"North Korea"},{code:"MK",label:"North Macedonia"},{code:"MP",label:"Northern Mariana Islands"},{code:"NO",label:"Norway"},{code:"OM",label:"Oman"},{code:"PK",label:"Pakistan"},{code:"PW",label:"Palau"},{code:"PS",label:"Palestinian Territories"},{code:"PA",label:"Panama"},{code:"PG",label:"Papua New Guinea"},{code:"PY",label:"Paraguay"},{code:"PE",label:"Peru"},{code:"PH",label:"Philippines"},{code:"PN",label:"Pitcairn Islands"},{code:"PL",label:"Poland"},{code:"PT",label:"Portugal"},{code:"PR",label:"Puerto Rico"},{code:"QA",label:"Qatar"},{code:"RE",label:"Réunion"},{code:"RO",label:"Romania"},{code:"RU",label:"Russia"},{code:"RW",label:"Rwanda"},{code:"WS",label:"Samoa"},{code:"SM",label:"San Marino"},{code:"ST",label:"São Tomé & PrÃncipe"},{code:"SA",label:"Saudi Arabia"},{code:"SN",label:"Senegal"},{code:"RS",label:"Serbia"},{code:"SC",label:"Seychelles"},{code:"SL",label:"Sierra Leone"},{code:"SG",label:"Singapore"},{code:"SX",label:"Sint Maarten"},{code:"SK",label:"Slovakia"},{code:"SI",label:"Slovenia"}
636,{code:"SB",label:"Solomon Islands"},{code:"SO",label:"Somalia"},{code:"ZA",label:"South Africa"},{code:"GS",label:"South Georgia & South Sandwich Islands"},{code:"KR",label:"South Korea"},{code:"SS",label:"South Sudan"},{code:"ES",label:"Spain"},{code:"LK",label:"Sri Lanka"},{code:"BL",label:"St. Barthélemy"},{code:"SH",label:"St. Helena"},{code:"KN",label:"St. Kitts & Nevis"},{code:"LC",label:"St. Lucia"},{code:"MF",label:"St. Martin"},{code:"PM",label:"St. Pierre & Miquelon"},{code:"VC",label:"St. Vincent & Grenadines"},{code:"SD",label:"Sudan"},{code:"SR",label:"Suriname"},{code:"SJ",label:"Svalbard & Jan Mayen"},{code:"SE",label:"Sweden"},{code:"CH",label:"Switzerland"},{code:"SY",label:"Syria"},{code:"TW",label:"Taiwan"},{code:"TJ",label:"Tajikistan"},{code:"TZ",label:"Tanzania"},{code:"TH",label:"Thailand"},{code:"TL",label:"Timor-Leste"},{code:"TG",label:"Togo"},{code:"TK",label:"Tokelau"},{code:"TO",label:"Tonga"},{code:"TT",label:"Trinidad & Tobago"},{code:"TN",label:"Tunisia"},{code:"TR",label:"Türkiye"},{code:"TM",label:"Turkmenistan"},{code:"TC",label:"Turks & Caicos Islands"},{code:"TV",label:"Tuvalu"},{code:"UM",label:"U.S. Outlying Islands"},{code:"VI",label:"U.S. Virgin Islands"},{code:"UG",label:"Uganda"},{code:"UA",label:"Ukraine"},{code:"AE",label:"United Arab Emirates"},{code:"GB",label:"United Kingdom"},{code:"US",label:"United States"},{code:"UY",label:"Uruguay"},{code:"UZ",label:"Uzbekistan"},{code:"VU",label:"Vanuatu"},{code:"VA",label:"Vatican City"},{code:"VE",label:"Venezuela"},{code:"VN",label:"Vietnam"},{code:"WF",label:"Wallis & Futuna"},{code:"EH",label:"Western Sahara"},{code:"YE",label:"Yemen"},{code:"ZM",label:"Zambia"},{code:"ZW",label:"Zimbabwe"}],qH=new Set(swe.map(e=>e.code));function uct(e){return typeof e=="string"&&qH.has(e)}function awe(e){if(!e)return;const t=e.replace(/_/g,"-").split("-");for(const n of t.slice(1)){if(!/^[A-Za-z]{2}$/.test(n))continue;const r=n.toUpperCase();if(qH.has(r))return r}}function dct(e=typeof navigator>"u"?void 0:navigator.languages??(navigator.language?[navigator.language]:void 0)){for(const t of e??[]){const n=awe(t);if(n)return n}}const fct=["1-10","11-50","50-200","200-500","500-1000","1000+"];function kA({orgId:e}){const t=q();return ue({enabled:!!e,queryKey:["org",e],queryFn:async()=>{if(!e)throw new Error("orgId is required");return(await Be.get("/orgs/"+e,{headers:t})).data},staleTime:1e3*30,retry:!1,refetchOnWindowFocus:!0})}function hct({orgId:e}){const t=q(),n=oe();return ie({mutationFn:async r=>(await Be.put(`/orgs/${e}/culture-values`,{culture_values:r},{headers:t})).data,onSuccess:()=>{n.invalidateQueries({queryKey:["org",e]})}})}function pct({orgId:e}){const t=q(),n=oe();return ie({mutationFn:async r=>{const i=encodeURIComponent(r);return(await Be.delete(`/orgs/${e}/culture-values/${i}`,{headers:t})).data},onSuccess:()=>{n.invalidateQueries({queryKey:["org",e]})}})}function mct({orgId:e}){const t=q(),n=oe();return ie({mutationFn:async r=>(await Be.patch(`/orgs/${e}/profile`,r,{headers:t})).data,onSuccess:()=>{n.invalidateQueries({queryKey:["org",e]})}})}function gct(){const e=q();return ie({mutationFn:async t=>(await Be.post("/orgs",t,{headers:e})).data})}function vct({orgId:e}){const t=q(),n=oe();return ie({mutationFn:async({email:r,role:i})=>(await Be.post(`/orgs/${e}/invitations`,{email:r.trim().toLowerCase(),role:i},{headers:t})).data,onSuccess:()=>{n.invalidateQueries({queryKey:["invited",e]})}})}function lwe(e){return e==="SUCCEEDED"||e==="FAILED"}const cwe=2500;function yct({orgId:e}){const t=q();return ie({mutationFn:async n=>{const r=n?.website;return(await Be.post(`/orgs/${e}/culture-values/derive`,r?{website:r}:{},{headers:t})).data}})}function xct({orgId:e,jobId:t,enabled:n=!0}){const r=q();return ue({enabled:!!e&&!!t&&n,queryKey:["culture-derivation",e,t],queryFn:async()=>(await Be.get(`/orgs/${e}/culture-values/derivation-status/${t}`,{headers:r})).data,refetchInterval:i=>i.state.status==="error"||lwe(i.state.data?.status)?!1:cwe,staleTime:1/0,retry:!1})}const Y2="super-admin";function CE(e){if(!e)return!1;const t=e.profile["cognito:groups"];return Array.isArray(t)?t.includes(Y2):typeof t=="string"?t.split(",").map(n=>n.trim()).includes(Y2):!1}const Q2={cv_analysis:"CV analysis",screening:"Screening interview",main_interview:"Interview",sourcing_expansion:"Sourcing expansion",trial_overdraft:"Trial balance carried over"};function bct(e){if(e.charge_type&&e.charge_type in Q2)return Q2[e.charge_type];switch(e.transaction_type){case"purchase":return"Credit purchase";case"adjustment":return"Adjustment";case"refund":return"Refund";default:return e.description||"Charge"}}function wct({orgId:e}){const t=q();return ue({enabled:!!e,queryKey:["billing",e],queryFn:async()=>
636{if(!e)throw new Error("orgId is required");return(await Be.get(`/orgs/${e}/billing/transactions`,{headers:t})).data},staleTime:1e3*30,refetchOnWindowFocus:!0})}function _ct({orgId:e}){const t=q();return ie({mutationFn:async n=>(await Be.post(`/orgs/${e}/billing/checkout`,{credits:n},{headers:t})).data})}function Sct({orgId:e}){const t=q(),n=oe();return ie({mutationFn:async r=>(await Be.post(`/orgs/${e}/billing/verify`,{session_id:r},{headers:t})).data,onSuccess:()=>{n.invalidateQueries({queryKey:["billing",e]}),n.invalidateQueries({queryKey:["org",e]}),n.invalidateQueries({queryKey:["credit-ledger"]})}})}function jct({orgId:e}){const t=q();return ie({mutationFn:async()=>(await Be.post(`/orgs/${e}/billing/portal`,{},{headers:t})).data})}const uwe=20;function Ect({page:e=1,limit:t=uwe}={}){const n=q(),r=Lw();return ue({queryKey:["credit-ledger",r,e,t],queryFn:async({signal:i})=>(await ee.get(`/orgs/${encodeURIComponent(r)}/credit-transactions`,{headers:n,signal:i,params:{page:e,limit:t}})).data,enabled:!!r,placeholderData:i=>i,refetchOnWindowFocus:!0})}function Ir(e){const n=(Math.abs(e)/100).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});return e<0?`-$${n}`:`$${n}`}function dwe(e){return e<0?`You owe ${Ir(e).replace("-","")}`:`${Ir(e)} available`}const Yo=1e3;function J2(e){return e%Yo===0?(e/Yo).toLocaleString("en-US"):Ir(e)}function KH(e,t){return e%Yo===0&&t%Yo===0?[(e/Yo).toLocaleString("en-US"),(t/Yo).toLocaleString("en-US")]:[Ir(e),Ir(t)]}function Cct(e){return e.transaction_type==="usage"&&e.amount_cents===0&&(e.charge_type==="cv_analysis"||e.charge_type==="screening"||e.charge_type==="main_interview")}const Nct="Included - already covered by an earlier charge for this candidate";function WH(e){return e<0?`Owes ${Ir(e*Yo).replace("-","")}`:`${e.toLocaleString("en-US")}`}function fwe(e){if(e<0)return`Owes ${Ir(e).replace("-","")}`;if(e%Yo===0){const t=e/Yo;return`${t.toLocaleString("en-US")} credit${t===1?"":"s"}`}return Ir(e)}const Gg=1e3;function hwe(e){if(!e)return null;if(e.is_paid){const o=e.credits_balance_cents??e.credits_balance*Gg;return{text:fwe(o),tone:o<=0?"red":o<=2*Gg?"amber":"neutral",title:`Credits balance: ${Ir(o)}`}}const t=e.trial_used_cents??e.trial_used*Gg,n=e.trial_total_cents??e.trial_total*Gg,[r,i]=KH(t,n);return{text:`${r}/${i} trial`,tone:t>=n?"amber":"neutral",title:`Trial interviews used: ${Ir(t)} of ${Ir(n)}`}}function pwe(e){return e==="ADMIN"?"Admin":e==="RECRUITER"?"Recruiter":null}const X2=[{label:"Overview",to:"/overview"},{label:"Jobs",to:"/jd-list"},{label:"Reports",to:"/reports"},{label:"Users",to:"/users"},{label:"Billing",to:"/billing"},{label:"Profile",to:"/my-profile"}],Z2="/billing",e$=[{label:"Platform Overview",to:"/super-admin/overview"},{label:"All Organizations",to:"/super-admin/orgs"},{label:"Platform Analytics",to:"/super-admin/analytics"},{label:"Job Analytics",to:"/super-admin/jobs"},{label:"Audit Log",to:"/super-admin/audit"},{label:"Voices",to:"/super-admin/voices"},{label:"Interview QA",to:"/super-admin/interview-qa"},{label:"Founder codes",to:"/super-admin/founder-codes"}],mwe={"/jd-list":"rec-nav-jobs","/reports":"rec-nav-reports"},gwe={neutral:"bg-muted text-muted-foreground",amber:"bg-warning/20 text-warning",red:"bg-destructive/20 text-destructive"};function t$({text:e,tone:t,title:n}){return l.jsxs("span",{title:n,className:K("ml-1 shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-bold leading-none tabular-nums",gwe[t]),children:[e,l.jsxs("span",{className:"sr-only",children:[" - ",n]})]})}function vwe(){const e=tt(),t=km(),[n,r]=v.useState(!1),i=Lw(),{data:o}=kA({orgId:i}),s=hwe(o),a=e.user?.profile?.given_name??"",c=e.user?.profile?.family_name??"",u=(a+" "+c).trim()||"User",d=((a[0]??"")+(c[0]??"")).toUpperCase()||u[0]?.toUpperCase()||"U",f=pwe(e.user?.profile?.role),h=CE(e.user??null),{data:p}=IK(),m=p?.avatar_url,g=()=>r(!1),y=rW("recruiter"),b=()=>{g(),y()},x=_=>t===_||t.startsWith(_+"/"),w=[f,o?.name].filter(Boolean).join(" · "),S=l.jsxs(l.Fragment,{children:[l.jsx(Ch,{initials:d,imageUrl:m,className:"h-9 w-9 text-sm"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"truncate text-sm font-semibold text-foreground",children:u}),w&&l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:w})]})]});return l.jsxs("nav",{"data-sticky-header":!0,className:"pt-safe sticky top-0 z-50 w-full border-b border-border bg-card/80 backdrop-blur-md",children:[l.jsx("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:l.jsxs("div",{className:"flex h-16 items-center justify-between gap-4",children:[l.jsx("div",{className:"flex min-w-0 shrink-0 items-center",children:l.jsx(Re,{to:$d(),className:"flex shrink-0 items-center gap-2",children:l.jsx(Zk,{})})}),l.jsx("div",{className:"hidden flex-1 items-center justify-center gap-0.5 lg:flex xl:gap-1",children:X2.map(_=>l.jsxs(Re,{to:_.to,"data-tour":mwe[_.to],"aria-current":x(_.to)?"page":void 0,className:K("flex items-center whitespace-nowrap border-b-2 px-2.5 py-5 text-sm font-medium transition-colors xl:px-3",x(_.to)?"border-primary text-primary":"border-transparent text-muted-foreground hover:border-muted-foreground
636/40 hover:text-muted-foreground"),children:[_.label,_.to===Z2&&s&&l.jsx(t$,{...s})]},_.to))}),l.jsxs("div",{className:"flex shrink-0 items-center gap-2 lg:gap-3",children:[l.jsx(BK,{}),l.jsx("div",{className:"hidden lg:block",children:l.jsxs(Gj,{children:[l.jsx(Yj,{asChild:!0,children:l.jsxs("button",{type:"button","data-tour":"rec-account",className:"flex items-center gap-2 rounded-lg border border-border py-1 pl-1 pr-2 transition-colors hover:bg-muted/50 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",title:u,children:[l.jsx(Ch,{initials:d,imageUrl:m,className:"h-7 w-7 text-xs"}),l.jsx("span",{className:"max-w-[140px] truncate text-sm font-medium text-muted-foreground",children:u}),l.jsx(Td,{size:14,className:"shrink-0 text-muted-foreground"})]})}),l.jsxs(Fy,{align:"end",className:"min-w-[15rem]",children:[l.jsx("div",{className:"flex items-center gap-2.5 px-2 py-2",children:S}),h&&l.jsxs(l.Fragment,{children:[l.jsx(wu,{}),l.jsx(oK,{className:"text-xs font-bold uppercase tracking-wide text-muted-foreground",children:"Platform"}),e$.map(_=>l.jsx(_i,{asChild:!0,children:l.jsx(Re,{to:_.to,className:"cursor-pointer",children:_.label})},_.to))]}),l.jsx(wu,{}),l.jsxs(_i,{onSelect:b,className:"flex cursor-pointer items-center gap-2",children:[l.jsx(i
636p,{size:14,className:"text-muted-foreground"}),"Show me around"]}),l.jsx(_i,{asChild:!0,children:l.jsxs("a",{href:"/logout",className:"flex cursor-pointer items-center gap-2 text-destructive focus:text-destructive",children:[l.jsx(Py,{size:14}),"Sign out"]})})]})]})}),l.jsx("button",{type:"button","data-tour":"rec-menu",onClick:()=>r(_=>!_),className:"flex h-10 w-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted lg:hidden shrink-0","aria-label":n?"Close menu":"Open menu",children:n?l.jsx(Dr,{size:20}):l.jsx(SV,{size:20})})]})]})}),n&&l.jsxs("div",{"data-testid":"admin-mobile-menu",className:"h-[calc(100dvh-4rem-env(safe-area-inset-top))] overflow-y-auto overscroll-contain border-t border-border bg-card shadow-lg lg:hidden",children:[l.jsx("div",{className:"flex items-center gap-3 border-b border-border/50 px-4 py-3",children:S}),l.jsx("div",{className:"space-y-0.5 px-2 py-2",children:X2.map(_=>l.jsxs(Re,{to:_.to,onClick:g,"aria-current":x(_.to)?"page":void 0,className:K("flex items-center gap-3 rounded-lg px-3 py-3 text-sm font-medium transition-colors",x(_.to)?"bg-primary/5 text-primary":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[_.label,_.to===Z2&&s&&l.jsx(t$,{...s})]},_.to))}),h&&l.jsxs("div",{className:"space-y-0.5 border-t border-border/50 px-2 py-2",children:[l.jsx("p",{className:"px-3 py-1 text-xs font-bold uppercase tracking-wide text-muted-foreground",children:"Platform"}),e$.map(_=>l.jsx(Re,{to:_.to,onClick:g,className:K("flex items-center gap-3 rounded-lg px-3 py-3 text-sm font-medium transition-colors",x(_.to)?"bg-primary/5 text-primary":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:_.label},_.to))]}),l.jsxs("div",{className:"border-t border-border/50 px-2 py-2",children:[l.jsxs("button",{type:"button",onClick:b,className:"flex w-full items-center gap-3 rounded-lg px-3 py-3 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground",children:[l.jsx(i
636p,{size:16,className:"shrink-0 text-muted-foreground"}),"Show me around"]}),l.jsxs("a",{href:"/logout",className:"flex items-center gap-3 rounded-lg px-3 py-3 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted/50 hover:text-destructive",children:[l.jsx(Py,{size:16,className:"shrink-0 text-muted-foreground"}),"Sign out"]})]})]}),l.jsx($ge,{})]})}function HH({children:e}){const t=tt(),n=!!t.user?.profile.org_id;return v.useEffect(()=>{if(!t.isLoading&&!t.isAuthenticated){window.location.href="/";return}if(!n&&t.isAuthenticated&&t.user?.profile.role!="CANDIDATE"){window.location.href=d5();return}if(t.isAuthenticated&&t.user?.profile.role=="CANDIDATE"){window.location.href=op;return}},[t.user?.profile]),t.isLoading?l.jsx(Fn,{}):t.isAuthenticated?l.jsxs("div",{className:"min-h-screen bg-secondary",children:[l.jsx(vwe,{}),l.jsx("div",{className:"flex flex-col gap-4 bg-secondary p-0 sm:p-2 md:p-4",children:l.jsx("div",{className:"flex-1 overflow-x-hidden rounded-2xl bg-background p-3 pt-6 sm:p-4 sm:pt-4",children:e})})]}):(window.location.href="/",null)}function GH(){const{orgName:e,orgId:t,isImpersonating:n,exit:r}=Lm(),i=Un();return n?l.jsxs("div",{className:"sticky top-0 z-50 flex items-center justify-between gap-3 border-b border-warning bg-warning/20 px-4 py-2 text-warning",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx("span",{"aria-hidden":!0,children:"ð"}),l.jsxs("span",{children:["Viewing ",l.jsx("strong",{children:e??t})," as super admin. Every action you take is logged against your account."]})]}),l.jsxs(G,{size:"sm",variant:"outline",className:"border-warning bg-card text-warning hover:bg-warning/10",onClick:()=>{r(),i({to:"/super-admin/orgs"})},children:[l.jsx(Dr,{className:"mr-1 h-4 w-4"}),"Exit"]})]}):null}function ywe(){const{orgId:e}=Lm(),t=oe(),n=v.useRef(!0);v.useEffect(()=>{if(n.current){n.current=!1;return}t.removeQueries()},[e,t])}function YH(){return ywe(),null}function xwe(){const e=q();return ue({queryKey:["super-admin","overview"],queryFn:async()=>(await Se.get("/super-admin/overview",{headers:e})).data,staleTime:1e3*60,retry:!1})}function QH({search:e="",limit:t=100,offset:n=0}){const r=q();return ue({queryKey:["super-admin","orgs",e,t,n],queryFn:async()=>(await Se.get("/super-admin/orgs",{headers:r,params:{search:e,limit:t,offset:n}})).data.orgs??[],staleTime:1e3*30,retry:!1})}function bwe({search:e="",limit:t=100,offset:n=0}){const r=q();return ue({queryKey:["super-admin","analytics","jobs",e,t,n],queryFn:async()=>(await Se.get("/super-admin/analytics/jobs",{headers:r,params:{search:e,limit:t,offset:n}})).data.jobs??[],staleTime:1e3*30,retry:!1})}function AA(e,t){const n=q();return ue({queryKey:["super-admin","analytics",e,t],queryFn:async()=>(await Se.get(`/super-admin/analytics/${e}`,{headers:n,params:{days:t}})).data,staleTime:1e3*60,retry:!1})}const wwe=(e=30)=>AA("usage",e),_we=(e=30)=>AA("volume",e),Swe=(e=30)=>AA("quality",e);function jwe(e){const t=q();return ue({queryKey:["super-admin","audit",e],queryFn:async()=>(await Se.get("/super-admin/audit",{headers:t,params:e})).data.entries??[],staleTime:1e3*15,retry:!1})}function Ewe(){const e=q(),t=oe();return ie({mutationFn:async n=>{await Se.post(`/super-admin/orgs/${n.orgId}/credits`,{amount:n.amount,reason:n.reason},{headers:e})},onSuccess:()=>{t.invalidateQueries({queryKey:["super-admin","orgs"]}),t.invalidateQueries({queryKey:["super-admin","overview"]}),t.invalidateQueries({queryKey:["super-admin","audit"]})}})}function Cwe(){const e=q(),t=oe();return ie({mutationFn:async n=>{const r=n.active?"unsuspend":"suspend";await Se.post(`/super-admin/orgs/${n.orgId}/${r}`,{},{headers:e})},onSuccess:()=>{t.invalidateQueries({queryKey:["super-admin","orgs"]}),t.invalidateQueries({queryKey:["super-admin","audit"]})}})}function Nwe(){const e=q(),t=oe();return ie({mutationFn:async n=>{await Se.post(`/super-admin/orgs/${n.orgId}/second-evaluation`,{enabled:n.enabled},{headers:e})},onSuccess:()=>{t.invalidateQueries({queryKey:["super-admin","orgs"]}),t.invalidateQueries({queryKey:["super-admin","audit"]})}})}function Fw(){const e=q(),t=oe();return ie({mutationFn:async n=>{await Se.post(`/super-admin/orgs/${n.orgId}/voice-provider`,{...n.provider!==void 0?{provider:n.provider}:{},...n.overrides!==void 0?{overrides:n.overrides}:{},...n.settings!==void 0?{settings:n.settings}:{}},{headers:e})},onSuccess:(n,r)=>{t.invalidateQueries({queryKey:["super-admin","orgs"]}),t.invalidateQueries({queryKey:["super-admin","audit"]}),t.invalidateQueries({queryKey:["super-admin","org-voice-provider",r.orgId]})}})}function TA({orgId:e,enabled:t}){const n=q();return ue({enabled:t&&!!e,queryKey:["super-admin","org-voice-provider",e],queryFn:async()=>(await Se.get(`/super-admin/orgs/${e}/voice-provider`,{headers:n})).data,staleTime:0,retry:!1})}function Pwe(){const e=q();return ue({queryKey:["super-admin","llm-models"],queryFn:async()=>(await Se.get("/super-admin/llm-models",{headers:e})).data.models??[],staleTime:1e3*60*10,retry:!1})}function kwe(){const e=q(),t=oe();return ie({mutationFn:async n=>{await Se.post(`/super-admin/orgs/${n.orgId}/llm-model`,{model:n.model},{headers:e})},onSuccess:()=>{t.invalidateQueries({queryKey:["super-admin","orgs"]}),t.invalidateQueries({queryKey:["super-admin","audit"]})}})}function Awe(){const e=q();return ue({queryKey:["super-admin","candidate-subscribers"],queryFn:async()=>(await Se.get("/super-admin/candidate-subscribers",{headers:e})).data,staleTime:1e3*60,retry:!1})}const Ce=v.forwardRef(({className:e,...t},n)=>
636l.jsx("div",{ref:n,className:K("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Ce.displayName="Card";const na=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:K("flex flex-col space-y-1.5 p-6",e),...t}));na.displayName="CardHeader";const ra=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:K("text-2xl font-semibold leading-none tracking-tight",e),...t}));ra.displayName="CardTitle";const $c=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:K("text-sm text-muted-foreground",e),...t}));$c.displayName="CardDescription";const Wo=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:K("p-6 pt-0",e),...t}));Wo.displayName="CardContent";const Wv=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:K("flex items-center p-6 pt-0",e),...t}));Wv.displayName="CardFooter";function Ee({label:e,value:t,hint:n,className:r}){return l.jsxs(Ce,{className:K("bg-card border border-border shadow-sm rounded-2xl",r),children:[l.jsx(na,{className:"pb-2",children:l.jsx(ra,{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e})}),l.jsxs(Wo,{children:[l.jsx("div",{className:"text-2xl font-semibold tabular-nums text-foreground",children:t}),n&&l.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:n})]})]})}const Twe=Nm("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ao({className:e,variant:t,...n}){return l.jsx("div",{className:K(Twe({variant:t}),e),...n})}const mr=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:n,className:K("w-full caption-bottom text-sm",e),...t})}));mr.displayName="Table";const gr=v.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:K("[&_tr]:border-b",e),...t}));gr.displayName="TableHeader";const vr=v.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:K("[&_tr:last-child]:border-0",e),...t}));vr.displayName="TableBody";const JH=v.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:K("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));JH.displayName="TableFooter";const bt=v.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:K("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));bt.displayName="TableRow";const pe=v.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:K("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));pe.displayName="TableHead";const he=v.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:K("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));he.displayName="TableCell";const XH=v.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:K("mt-4 text-sm text-muted-foreground",e),...t}));XH.displayName="TableCaption";const Pct=Object.freeze(Object.defineProperty({__proto__:null,Table:mr,TableBody:vr,TableCaption:XH,TableCell:he,TableFooter:JH,TableHead:pe,TableHeader:gr,TableRow:bt},Symbol.toStringTag,{value:"Module"})),Rwe=[{key:"new",label:"New this week"},{key:"active",label:"Current subscribers"},{key:"lapsed",label:"Lapsed"}];function n$(e,t){return t==="new"?e.new_subscribers??[]:t==="active"?e.active_subscribers??[]:e.lapsed_subscribers??[]}function NE(e){if(!e)return"-";const t=new Date(e);return Number.isNaN(t.getTime())?"-":t.toLocaleDateString()}function Owe(e){return e.started_at?NE(e.started_at):"Before tracking"}function Iwe(e){return e.status==="lapsed"?`Lapsed ${NE(e.lapsed_at)}`:e.cancelled_at?`Cancelled, ends ${NE(e.period_end)}`:"Active"}function Mwe(){const{data:e,isLoading:t,error:n}=Awe(),[r,i]=v.useState("new");if(t)return l.jsx(Fn,{});if(n||!e)return l.jsxs("div",{className:"text-destructive",children:["Failed to load candidate subscribers",n?`: ${n.message}`:""]});const o=e.report,s=n$(o,r);return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[l.jsx(Ee,{label:"New today",value:o.new_today}),l.jsx(Ee,{label:"New this week",value:o.new_this_week,hint:"since Monday, UTC"}),l.jsx(Ee,{label:"Current subscribers",value:o.active}),l.jsx(Ee,{label:"Lapsed this week",value:o.lapsed_this_week,hint:`${o.lapsed_today} today, ${o.lapsed_total} in total`})]}),l.jsx("div",{className:"flex flex-wrap gap-2",role:"tablist","aria-label":"Subscriber list",children:Rwe.map(a=>l.jsxs("button",{type:"button",role:"tab","aria-selected":r===a.key,onClick:()=>
636i(a.key),className:K("rounded-full border px-3 py-1 text-sm",r===a.key?"border-primary bg-primary text-primary-foreground":"border-border text-muted-foreground hover:text-foreground"),children:[a.label," (",n$(o,a.key).length,")"]},a.key))}),l.jsx(Ce,{className:"overflow-hidden border border-border shadow-sm rounded-2xl",children:s.length===0?l.jsx("div",{className:"p-6 text-muted-foreground",children:"Nobody in this list."}):l.jsxs(mr,{children:[l.jsx(gr,{children:l.jsxs(bt,{children:[l.jsx(pe,{children:"Name"}),l.jsx(pe,{children:"Email"}),l.jsx(pe,{children:"Plan"}),l.jsx(pe,{children:"Start"}),l.jsx(pe,{children:"Status"})]})}),l.jsx(vr,{children:s.map(a=>l.jsxs(bt,{children:[l.jsx(he,{className:"font-medium text-foreground",children:a.name||"-"}),l.jsx(he,{className:"text-sm",children:a.email||"-"}),l.jsxs(he,{className:"text-sm",children:[a.plan||a.product_id||"-",a.store&&l.jsx(ao,{variant:"outline",className:"ml-1",children:a.store})]}),l.jsx(he,{className:"text-sm",children:Owe(a)}),l.jsx(he,{className:"text-sm",children:Iwe(a)})]},a.candidate_id))})]})})]})}function rn(e){return e==null?"-":e.toLocaleString()}function $we(e){return e==null?"-":`${Math.round(e*100)}%`}function Dwe(){const{data:e,isLoading:t,error:n}=xwe();return t?l.jsx(Fn,{}):n?l.jsxs("div",{className:"p-6 text-destructive",children:["Failed to load overview: ",n.message]}):l.jsxs("div",{className:"flex flex-col gap-6 p-2",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Platform Overview"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Cross-org snapshot. Numbers refresh every minute."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-muted-foreground",children:"Organizations"}),l.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[l.jsx(Ee,{label:"Total orgs",value:rn(e?.total_orgs)}),l.jsx(Ee,{label:"Active (7 days)",value:rn(e?.active_orgs_7d),hint:"orgs with â¥1 interview"}),l.jsx(Ee,{label:"Active (30 days)",value:rn(e?.active_orgs_30d),hint:"orgs with â¥1 interview"}
636),l.jsx(Ee,{label:"New signups (7d)",value:rn(e?.new_signups_7d),hint:`${rn(e?.total_users)} users total`})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-muted-foreground",children:"Interview volume"}),l.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[l.jsx(Ee,{label:"Today",value:rn(e?.interviews_today)}),l.jsx(Ee,{label:"Last 7 days",value:rn(e?.interviews_7d)}),l.jsx(Ee,{label:"Last 30 days",value:rn(e?.interviews_30d)}),l.jsx(Ee,{label:"Completion rate (30d)",value:$we(e?.completion_rate_30d),hint:`${rn(e?.interviews_completed_30d)} completed`})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-muted-foreground",children:"Jobs"}),l.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[l.jsx(Ee,{label:"Total Jobs",value:rn(e?.total_jds)}),l.jsx(Ee,{label:"Published Jobs",value:rn(e?.published_jds),hint:`${rn(e?.total_job_ads)} job ads live`}),l.jsx(Ee,{label:"Applications (total)",value:rn(e?.total_applications),hint:"interviews started via a job ad"}),l.jsx(Ee,{label:"Candidates enrolled",value:rn(e?.enrolled_candidates),hint:"distinct candidates via job ads"})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-muted-foreground",children:"Marketplace"}),l.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[l.jsx(Ee,{label:"Job seekers",value:rn(e?.job_seekers_total),hint:"candidates searching AsgardHire"}),l.jsx(Ee,{label:"Interviews (all-time)",value:rn(e?.total_interviews_all_time)})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-muted-foreground",children:"Health"}),l.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[l.jsx(Ee,{label:"Credits consumed (30d)",value:rn(e?.credits_consumed_30d)}),l.jsx(Ee,{label:"Credits remaining (sum)",value:rn(e?.credits_remaining_sum),hint:"sum of every organisation's balance"}),l.jsx(Ee,{label:"Interview resets (7d)",value:rn(e?.interview_resets_7d),hint:"spikes may indicate a prompt or voice bug"})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-muted-foreground",children:"Paying candidates"}),l.jsx(Mwe,{})]})]})}const Lwe=Wi("/super-admin/overview")({component:Dwe}),Fwe=Object.freeze(Object.defineProperty({__proto__:null,Route:Lwe},Symbol.toStringTag,{value:"Module"})),Wu=({title:e="Delete",message:t="Are you sure you want to delete?",confirmText:n="Yes",cancelText:r="Cancel",onConfirm:i,onClose:o,isOpen:s})=>{if(!s)return null;const[a,c]=v.useState(!1),u=async()=>{c(!0);try{await i?.(),o?.()}catch(d){console.error("error",d)}finally{c(!1)}};return l.jsxs("div",{className:"min-h-28 flex flex-col gap-3",children:[l.jsx("h1",{className:"text-lg font-medium text-foreground",children:e}),l.jsx("p",{children:t}),l.jsxs("div",{className:"flex gap-4 justify-end mt-5",children:[l.jsx(G,{onClick:u,isLoading:a,children:n}),l.jsx(G,{variant:"outline",onClick:o,disabled:a,children:r})]})]})},RA="__app_default__";function Bwe(e){const t=(e??"").trim();return t===""?RA:t}function Uwe(e){return e===RA?"":e}function zwe(e,t){const n=(t??"").trim();return n!==""&&!e.includes(n)?[...e,n]:[...e]}function Jy(e,[t,n]){return Math.min(n,Math.max(t,e))}var Vwe="VisuallyHidden",OA=v.forwardRef((e,t)=>l.jsx(Oe.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));OA.displayName=Vwe;var kct=OA,qwe=[" ","Enter","ArrowUp","ArrowDown"],Kwe=[" ","Enter"],Fm="Select",[Bw,Uw,Wwe]=Xb(Fm),[Jd,Act]=Ps(Fm,[Wwe,Bd]),zw=Bd(),[Hwe,Ha]=Jd(Fm),[Gwe,Ywe]=Jd(Fm),ZH=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:a,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:p,form:m}=e,g=zw(t),[y,b]=v.useState(null),[x,w]=v.useState(null),[S,_]=v.useState(!1),j=Od(u),[E=!1,C]=si({prop:r,defaultProp:i,onChange:o}),[N,k]=si({prop:s,defaultProp:a,onChange:c}),P=v.useRef(null),A=y?m||!!y.closest("form"):!0,[L,R]=v.useState(new Set),D=Array.from(L).map(O=>O.props.value).join(";");return l.jsx(Rk,{...g,children:l.jsxs(Hwe,{required:p,scope:t,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:_,contentId:Ca(),value:N,onValueChange:k,open:E,onOpenChange:C,dir:j,triggerPointerDownPosRef:P,disabled:h,children:[l.jsx(Bw.Provider,{scope:t,children:l.jsx(Gwe,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(O=>{R(F=>new Set(F).add(O))},[]),onNativeOptionRemove:v.useCallback(O=>{R(F=>{const T=new Set(F);return T.delete(O),T})},[]),children:n})}),A?l.jsxs(E6,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:N,onChange:O=>k(O.target.value),disabled:h,form:m,children:[N===void 0?l.jsx("option",{value:""}):null,Array.from(L)]},D):null]})})};ZH.displayName=Fm;var e6="SelectTrigger",t6=v.forwardRef((e,t)=>
vendor: 5,815 bytes, line 636
636{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=zw(n),s=Ha(e6,n),a=s.disabled||r,c=rt(t,s.onTriggerChange),u=Uw(n),d=v.useRef("touch"),[f,h,p]=C6(g=>{const y=u().filter(w=>!w.disabled),b=y.find(w=>w.value===s.value),x=N6(y,g,b);x!==void 0&&s.onValueChange(x.value)}),m=g=>{a||(s.onOpenChange(!0),p()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return l.jsx(aw,{asChild:!0,...o,children:l.jsx(Oe.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":j6(s.value)?"":void 0,...i,ref:c,onClick:xe(i.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&m(g)}),onPointerDown:xe(i.onPointerDown,g=>{d.current=g.pointerType;const y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(m(g),g.preventDefault())}),onKeyDown:xe(i.onKeyDown,g=>{const y=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(y&&g.key===" ")&&qwe.includes(g.key)&&(m(),g.preventDefault())})})})});t6.displayName=e6;var n6="SelectValue",r6=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:s="",...a}=e,c=Ha(n6,n),{onValueNodeHasChildrenChange:u}=c,d=o!==void 0,f=rt(t,c.onValueNodeChange);return Qn(()=>{u(d)},[u,d]),l.jsx(Oe.span,{...a,ref:f,style:{pointerEvents:"none"},children:j6(c.value)?l.jsx(l.Fragment,{children:s}):o})});r6.displayName=n6;var Qwe="SelectIcon",i6=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return l.jsx(Oe.span,{"aria-hidden":!0,...i,ref:t,children:r||"â¼"})});i6.displayName=Qwe;var Jwe="SelectPortal",o6=e=>l.jsx(lw,{asChild:!0,...e});o6.displayName=Jwe;var Ql="SelectContent",s6=v.forwardRef((e,t)=>{const n=Ha(Ql,e.__scopeSelect),[r,i]=v.useState();if(Qn(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Ns.createPortal(l.jsx(a6,{scope:e.__scopeSelect,children:l.jsx(Bw.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),o):null}return l.jsx(l6,{...e,ref:t})});s6.displayName=Ql;var gi=10,[a6,Ga]=Jd(Ql),Xwe="SelectContentImpl",l6=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:y,...b}=e,x=Ha(Ql,n),[w,S]=v.useState(null),[_,j]=v.useState(null),E=rt(t,te=>S(te)),[C,N]=v.useState(null),[k,P]=v.useState(null),A=Uw(n),[L,R]=v.useState(!1),D=v.useRef(!1);v.useEffect(()=>{if(w)return cw(w)},[w]),wk();const O=v.useCallback(te=>{const[ye,...W]=A().map(U=>U.ref.current),[ne]=W.slice(-1),se=document.activeElement;for(const U of te)if(U===se||(U?.scrollIntoView({block:"nearest"}),U===ye&&_&&(_.scrollTop=0),U===ne&&_&&(_.scrollTop=_.scrollHeight),U?.focus(),document.activeElement!==se))return},[A,_]),F=v.useCallback(()=>O([C,w]),[O,C,w]);v.useEffect(()=>{L&&F()},[L,F]);const{onOpenChange:T,triggerPointerDownPosRef:M}=x;v.useEffect(()=>{if(w){let te={x:0,y:0};const ye=ne=>{te={x:Math.abs(Math.round(ne.pageX)-(M.current?.x??0)),y:Math.abs(Math.round(ne.pageY)-(M.current?.y??0))}},W=ne=>{te.x<=10&&te.y<=10?ne.preventDefault():w.contains(ne.target)||T(!1),document.removeEventListener("pointermove",ye),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",W,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",W,{capture:!0})}}},[w,T,M]),v.useEffect(()=>{const te=()=>T(!1);return window.addEventListener("blur",te),window.addEventListener("resize",te),()=>{window.removeEventListener("blur",te),window.removeEventListener("resize",te)}},[T]);const[V,B]=C6(te=>{const ye=A().filter(se=>!se.disabled),W=ye.find(se=>se.ref.current===document.activeElement),ne=N6(ye,te,W);ne&&setTimeout(()=>ne.ref.current.focus())}),I=v.useCallback((te,ye,W)=>{const ne=!D.current&&!W;(x.value!==void 0&&x.value===ye||ne)&&(N(te),ne&&(D.current=!0))},[x.value]),z=v.useCallback(()=>w?.focus(),[w]),H=v.useCallback((te,ye,W)=>{const ne=!D.current&&!W;(x.value!==void 0&&x.value===ye||ne)&&P(te)},[x.value]),de=r==="popper"?PE:c6,ge=de===PE?{side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:y}:{};return l.jsx(a6,{scope:n,content:w,viewport:_,onViewportChange:j,itemRefCallback:I,selectedItem:C,onItemLeave:z,itemTextRefCallback:H,focusSelectedItem:F,selectedItemText:k,position:r,isPositioned:L,searchRef:V,children:l.jsx(dw,{as:Bi,allowPinchZoom:!0,children:l.jsx(rw,{asChild:!0,trapped:x.open,onMountAutoFocus:te=>{te.preventDefault()},onUnmountAutoFocus:xe(i,te=>{x.trigger?.focus({preventScroll:!0}),te.preventDefault()}),children:l.jsx(nw,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:te=>te.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:l.jsx(de,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:te=>te.preventDefault(),...b,...ge,onPlaced:()=>R(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:xe(b.onKeyDown,te=>{const ye=te.ctrlKey||te.altKey||te.metaKey;if(te.key==="Tab"&&te.preventDefault(),!ye&&te.key.length===1&&B(te.key),["ArrowUp","ArrowDown","Home","End"].includes(te.key)){let ne=A().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(te.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(te.key)){const se=te.target,U=ne.indexOf(se);
vendor: 8,856 bytes, line 636
636ne=ne.slice(U+1)}setTimeout(()=>O(ne)),te.preventDefault()}})})})})})})});l6.displayName=Xwe;var Zwe="SelectItemAlignedPosition",c6=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Ha(Ql,n),s=Ga(Ql,n),[a,c]=v.useState(null),[u,d]=v.useState(null),f=rt(t,E=>d(E)),h=Uw(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=s,w=v.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&u&&g&&y&&b){const E=o.trigger.getBoundingClientRect(),C=u.getBoundingClientRect(),N=o.valueNode.getBoundingClientRect(),k=b.getBoundingClientRect();if(o.dir!=="rtl"){const se=k.left-C.left,U=N.left-se,ae=E.left-U,re=E.width+ae,He=Math.max(re,C.width),Ge=window.innerWidth-gi,gt=Jy(U,[gi,Math.max(gi,Ge-He)]);a.style.minWidth=re+"px",a.style.left=gt+"px"}else{const se=C.right-k.right,U=window.innerWidth-N.right-se,ae=window.innerWidth-E.right-U,re=E.width+ae,He=Math.max(re,C.width),Ge=window.innerWidth-gi,gt=Jy(U,[gi,Math.max(gi,Ge-He)]);a.style.minWidth=re+"px",a.style.right=gt+"px"}const P=h(),A=window.innerHeight-gi*2,L=g.scrollHeight,R=window.getComputedStyle(u),D=parseInt(R.borderTopWidth,10),O=parseInt(R.paddingTop,10),F=parseInt(R.borderBottomWidth,10),T=parseInt(R.paddingBottom,10),M=D+O+L+T+F,V=Math.min(y.offsetHeight*5,M),B=window.getComputedStyle(g),I=parseInt(B.paddingTop,10),z=parseInt(B.paddingBottom,10),H=E.top+E.height/2-gi,de=A-H,ge=y.offsetHeight/2,te=y.offsetTop+ge,ye=D+O+te,W=M-ye;if(ye<=H){const se=P.length>0&&y===P[P.length-1].ref.current;a.style.bottom="0px";const U=u.clientHeight-g.offsetTop-g.offsetHeight,ae=Math.max(de,ge+(se?z:0)+U+F),re=ye+ae;a.style.height=re+"px"}else{const se=P.length>0&&y===P[0].ref.current;a.style.top="0px";const ae=Math.max(H,D+g.offsetTop+(se?I:0)+ge)+W;a.style.height=ae+"px",g.scrollTop=ye-H+g.offsetTop}a.style.margin=`${gi}px 0`,a.style.minHeight=V+"px",a.style.maxHeight=A+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,a,u,g,y,b,o.dir,r]);Qn(()=>w(),[w]);const[S,_]=v.useState();Qn(()=>{u&&_(window.getComputedStyle(u).zIndex)},[u]);const j=v.useCallback(E=>{E&&m.current===!0&&(w(),x?.(),m.current=!1)},[w,x]);return l.jsx(t0e,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:j,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:l.jsx(Oe.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});c6.displayName=Zwe;var e0e="SelectPopperPosition",PE=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=gi,...o}=e,s=zw(n);return l.jsx(Ok,{...s,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});PE.displayName=e0e;var[t0e,IA]=Jd(Ql,{}),kE="SelectViewport",u6=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Ga(kE,n),s=IA(kE,n),a=rt(t,o.onViewportChange),c=v.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(Bw.Slot,{scope:n,children:l.jsx(Oe.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:xe(i.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=s;if(h?.current&&f){const p=Math.abs(c.current-d.scrollTop);if(p>0){const m=window.innerHeight-gi*2,g=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),b=Math.max(g,y);if(b<m){const x=b+p,w=Math.min(m,x),S=x-w;f.style.height=w+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});u6.displayName=kE;var d6="SelectGroup",[n0e,r0e]=Jd(d6),f6=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ca();return l.jsx(n0e,{scope:n,id:i,children:l.jsx(Oe.div,{role:"group","aria-labelledby":i,...r,ref:t})})});f6.displayName=d6;var h6="SelectLabel",p6=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=r0e(h6,n);return l.jsx(Oe.div,{id:i.id,...r,ref:t})});p6.displayName=h6;var Xy="SelectItem",[i0e,m6]=Jd(Xy),g6=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=e,a=Ha(Xy,n),c=Ga(Xy,n),u=a.value===r,[d,f]=v.useState(o??""),[h,p]=v.useState(!1),m=rt(t,x=>c.itemRefCallback?.(x,r,i)),g=Ca(),y=v.useRef("touch"),b=()=>{i||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(i0e,{scope:n,value:r,disabled:i,textId:g,isSelected:u,onItemTextChange:v.useCallback(x=>{f(w=>w||(x?.textContent??"").trim())},[]),children:l.jsx(Bw.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:l.jsx(Oe.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:m,onFocus:xe(s.onFocus,()=>p(!0)),onBlur:xe(s.onBlur,()=>p(!1)),onClick:xe(s.onClick,()=>{y.current!=="mouse"&&b()}),onPointerUp:xe(s.onPointerUp,()=>{y.current==="mouse"&&b()}),onPointerDown:xe(s.onPointerDown,x=>{y.current=x.pointerType}),onPointerMove:xe(s.onPointerMove,x=>{y.current=x.pointerType,i?c.onItemLeave?.():y.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:xe(s.onPointerLeave,x=>{x.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:xe(s.onKeyDown,x=>{c.searchRef?.current!==""&&x.key===" "||(Kwe.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});g6.displayName=Xy;var sh="SelectItemText",v6=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,s=Ha(sh,n),a=Ga(sh,n),c=m6(sh,n),u=Ywe(sh,n),[d,f]=v.useState(null),h=rt(t,b=>f(b),c.onItemTextChange,b=>a.itemTextRefCallback?.(b,c.value,c.disabled)),p=d?.textContent,m=v.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=u;return Qn(()=>(g(m),()=>y(m)),[g,y,m]),l.jsxs(l.Fragment,{children:[l.jsx(Oe.span,{id:c.textId,...o,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ns.createPortal(o.children,s.valueNode):null]})});v6.displayName=sh;var y6="SelectItemIndicator",x6=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m6(y6,n).isSelected?l.jsx(Oe.span,{"aria-hidden":!0,...r,ref:t}):null});x6.displayName=y6;var AE="SelectScrollUpButton",b6=v.forwardRef((e,t)=>{const n=Ga(AE,e.__scopeSelect),r=IA(AE,e.__scopeSelect),[i,o]=v.useState(!1),s=rt(t,r.onScrollButtonChange);return Qn(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;o(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?l.jsx(_6,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});b6.displayName=AE;var TE="SelectScrollDownButton",w6=v.forwardRef((e,t)=>{const n=Ga(TE,e.__scopeSelect),r=IA(TE,e.__scopeSelect),[i,o]=v.useState(!1),s=rt(t,r.onScrollButtonChange);return Qn(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;o(d)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?l.jsx(_6,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});w6.displayName=TE;var _6=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Ga("SelectScrollButton",n),s=v.useRef(null),a=Uw(n),c=v.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Qn(()=>{a().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),l.jsx(Oe.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:xe(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:xe(i.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:xe(i.onPointerLeave,()=>{c()})})}),o0e="SelectSeparator",S6=v.forwardRef((e,t)=>
636{const{__scopeSelect:n,...r}=e;return l.jsx(Oe.div,{"aria-hidden":!0,...r,ref:t})});S6.displayName=o0e;var RE="SelectArrow",s0e=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=zw(n),o=Ha(RE,n),s=Ga(RE,n);return o.open&&s.position==="popper"?l.jsx(Ik,{...i,...r,ref:t}):null});s0e.displayName=RE;function j6(e){return e===""||e===void 0}var E6=v.forwardRef((e,t)=>{const{value:n,...r}=e,i=v.useRef(null),o=rt(t,i),s=Yb(n);return v.useEffect(()=>{const a=i.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[s,n]),l.jsx(OA,{asChild:!0,children:l.jsx("select",{...r,ref:o,defaultValue:n})})});E6.displayName="BubbleSelect";function C6(e){const t=ac(e),n=v.useRef(""),r=v.useRef(0),i=v.useCallback(s=>{const a=n.current+s;t(a),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),o=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function N6(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=a0e(e,Math.max(o,0));i.length===1&&(s=s.filter(u=>u!==n));const c=s.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function a0e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var l0e=ZH,P6=t6,c0e=r6,u0e=i6,d0e=o6,k6=s6,f0e=u6,h0e=f6,A6=p6,T6=g6,p0e=v6,m0e=x6,R6=b6,O6=w6,I6=S6;const ho=l0e,Tct=h0e,po=c0e,Mi=v.forwardRef(({className:e,children:t,error:n,hideDownIcon:r=!1,...i},o)=>l.jsxs(P6,{ref:o,className:K("border-input ring-offset-background placeholder:text-muted-foreground flex h-9 w-full items-center justify-between whitespace-nowrap rounded-[0.75rem] border bg-transparent px-3 py-2 text-xs shadow-sm placeholder:text-xs focus:outline-none focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n?"ring-destructive ring-1":"focus:ring-ring",e),...i,children:[l.jsx("span",{className:"w-full text-start",children:t}),!r&&l.jsx(u0e,{asChild:!0,children:l.jsx(Td,{className:"h-4 w-4 opacity-50"})})]}));Mi.displayName=P6.displayName;const M6=v.forwardRef(({className:e,...t},n)=>l.jsx(R6,{ref:n,className:K("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(xse,{className:"h-4 w-4"})}));M6.displayName=R6.displayName;const $6=v.forwardRef(({className:e,...t},n)=>l.jsx(O6,{ref:n,className:K("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Td,{className:"h-4 w-4"})}));$6.displayName=O6.displayName;const $i=v.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>l.jsx(d0e,{children:l.jsxs(k6,{ref:i,className:K("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[l.jsx(M6,{}),l.jsx(f0e,{className:K("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx($6,{})]})}));$i.displayName=k6.displayName;const g0e=v.forwardRef(({className:e,...t},n)=>l.jsx(A6,{ref:n,className:K("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));g0e.displayName=A6.displayName;const Nt=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(T6,{ref:r,className:K("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center shrink-0",children:l.jsx(m0e,{children:l.jsx(bo,{className:"h-4 w-4"})})}),l.jsx(p0e,{children:t})]}));Nt.displayName=T6.displayName;const v0e=v.forwardRef(({className:e,...t},n)=>l.jsx(I6,{ref:n,className:K("-mx-1 my-1 h-px bg-muted",e),...t}));v0e.displayName=I6.displayName;const D6=["warm","professional","calm","energetic","authoritative","friendly"],y0e=["voices","livekit"];function x0e(e){return[...y0e,e]}function Rct({language:e,enabled:t=!0}){const n=q();return ue({enabled:t&&!!e,queryKey:x0e(e),queryFn:async()=>(await ee.get("/voices",{headers:n,params:{voice_provider:"livekit",language:e}})).data,staleTime:5*60*1e3})}const b0e=["patient","balanced","quick"],uS={thinking_time:"balanced",expressive:!0,keyterms:[]},OE=50,IE=50,L6=["accent","gender","age"],Oct={accent:"Accent",gender:"Gender",age:"Age"},bn="__any__",Ph="__unspecified__",w0e="Not specified",Ict={accent:bn,gender:bn,age:bn};function Zy(e){const t=(e??"").toLowerCase().replace(/[^a-z0-9]+/g," ").trim();return t===""?Ph:t}function _0e(e){return e.split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Mct(e,t){return MA(e,n=>n[t])}function MA(e,t){const n=new Map;for(const r of e){const i=t(r),o=Zy(i),s=n.get(o);if(s){s.count+=1;continue}n.set(o,{value:o,label:o===Ph?w0e:(i??"").trim()||_0e(o),count:1})}return[...n.values()].sort((r,i)=>r.value===Ph?1:i.value===Ph?-1:r.count!==i.count?i.count-r.count:r.label.localeCompare(i.label))}function $A(e,t){return t===bn||Zy(e)===t}function S0e(e){return e.filter(t=>t.value!==Ph).length>1}
636function $ct(e,t=""){return t.trim()!==""||L6.some(n=>e[n]!==bn)}function j0e(e,t,n=""){for(const i of L6)if(!$A(e[i],t[i]))return!1;const r=n.trim().toLowerCase();return r===""?!0:(e.voice_name??"").toLowerCase().includes(r)||e.voice_id.toLowerCase().includes(r)||(e.language??"").toLowerCase().includes(r)}function Dct(e,{filters:t,search:n="",alwaysVisibleIds:r=[]}){const i=new Set(r.filter(a=>!!a)),o=[],s=[];for(const a of e){if(j0e(a,t,n)){o.push(a);continue}i.has(a.voice_id)&&(o.push(a),s.push(a))}return{voices:o,pinnedOutsideFilter:s}}const E0e={warm:"Warm",professional:"Professional",calm:"Calm",energetic:"Energetic",authoritative:"Authoritative",friendly:"Friendly"},Vw="other";function C0e(e){return e===Vw?"Other":E0e[e]??e.charAt(0).toUpperCase()+e.slice(1)}function N0e(e){const t=(e.primary_tone??e.tones?.[0]??"").toLowerCase().trim();return D6.includes(t)?t:Vw}const F6=["gender","age","accent","vendor"],Lct={gender:"Gender",age:"Age",accent:"Accent",vendor:"Vendor"},Fct={gender:bn,age:bn,accent:bn,vendor:bn};function B6(e,t){switch(t){case"gender":return e.gender;case"age":return e.age;case"accent":return e.accent;case"vendor":return e.tts_vendor}}function Bct(e,t){return MA(e,n=>B6(n,t))}function Uct(e,t=""){return t.trim()!==""||F6.some(n=>e[n]!==bn)}function P0e(e,t,n=""){for(const i of F6)if(!$A(B6(e,i),t[i]))return!1;const r=n.trim().toLowerCase();return r===""?!0:(e.voice_name??"").toLowerCase().includes(r)||e.voice_id.toLowerCase().includes(r)||(e.description??"").toLowerCase().includes(r)}const r$=6;function zct(e,t){const n=e.filter(a=>P0e(a,t.filters,t.search)),r=n.filter(a=>typeof a.recommended_rank=="number"&&a.recommended_rank>=1&&a.recommended_rank<=r$).sort((a,c)=>a.recommended_rank-c.recommended_rank).slice(0,r$),i=t.repeatRecommendedInGroups?new Set:new Set(r.map(a=>a.voice_id)),o=new Map;for(const a of n){if(i.has(a.voice_id))continue;const c=N0e(a),u=o.get(c);u?u.push(a):o.set(c,[a])}const s=[];for(const a of[...D6,Vw]){const c=o.get(a);c&&c.length>0&&s.push({tone:a,label:C0e(a),voices:c})}return{recommended:r,groups:s,visible:n,shown:n.length}}const U6="recommended";function Vct(e){const t=[];e.recommended.length>0&&t.push({id:U6,label:"Recommended",voices:e.recommended});for(const n of e.groups)t.push({id:n.tone,label:n.label,voices:n.voices});return t}function qct(e){return e[0]?.id??null}const k0e={warm:"Reassuring and personable. Puts nervous candidates at ease.",professional:"Clear and neutral. A safe choice for most roles.",calm:"Measured and unhurried. Good for long or technical interviews.",energetic:"Upbeat and quick. Suits sales and customer-facing roles.",authoritative:"Confident and formal. Suits senior and leadership roles.",friendly:"Casual and approachable. Suits early-career roles.",[Vw]:"Voices without a tone label yet."};function Kct(e,t={}){if(e===U6){const n=t.countryLabel?.trim(),r=t.languageName?.trim();return n&&r?`The best matches for ${n} and ${r}.`:n?`The best matches for ${n}.`:r?`The best matches for ${r}.`:"The best matches for this interview."}return k0e[e]??""}function Wct(e,t){return`${e} ${e===1?"voice matches":"voices match"} "${t.trim()}", across all tones.`}function Hct(e,t){return e?t?t.some(n=>n.voice_id===e):null:!0}const A0e={patient:"Patient",balanced:"Balanced",quick:"Quick"},T0e={patient:"Waits longer before answering. Good for candidates who pause to think.",balanced:"The default. A natural pace for most interviews.",quick:"Replies sooner. Suits a brisk, back-and-forth style."};function R0e(e){const t={};return e&&(e.thinking_time!==void 0&&e.thinking_time!==null&&(t.thinking_time=e.thinking_time),e.expressive!==void 0&&e.expressive!==null&&(t.expressive=e.expressive),e.keyterms!==void 0&&e.keyterms!==null&&(t.keyterms=[...e.keyterms])),t}function i$(e){const t=R0e(e);return t.keyterms!==void 0?{keyterms:t.keyterms}:{}}function Gct(e,t){const n=i$(e).keyterms,r=i$(t).keyterms;return n===void 0||r===void 0?n===r:n.length===r.length&&n.every((i,o)=>i===r[o])}function O0e(e,t){return{thinking_time:e?.thinking_time??t?.thinking_time??uS.thinking_time,expressive:e?.expressive??t?.expressive??uS.expressive,keyterms:e?.keyterms??t?.keyterms??[...uS.keyterms]}}function I0e(e,t){const n=[...e],r=new Set(n.map(i=>i.toLowerCase()));for(const i of t){const o=i.trim();if(o==="")continue;if(Array.from(o).length>IE)return{ok:!1,error:`"${o.slice(0,20)}..." is too long. Each word or phrase can be up to ${IE} characters.`};const s=o.toLowerCase();if(!r.has(s)){if(n.length>=OE)return{ok:!1,error:`You can add up to ${OE} words or phrases.`};r.add(s),n.push(o)}}return{ok:!0,terms:n}}function M0e(e){return e.split(/[\n,]/).map(t=>t.trim()).filter(t=>t!=="")}
636function $0e({value:e,onChange:t,disabled:n=!1,id:r}){const[i,o]=v.useState(""),[s,a]=v.useState(null),c=u=>{const d=M0e(u);if(d.length===0){o("");return}const f=I0e(e,d);if(!f.ok){a(f.error);return}a(null),o(""),t(f.terms)};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 rounded-md border border-input bg-background px-2 py-1.5 focus-within:ring-2 focus-within:ring-ring",children:[e.map(u=>l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:[u,l.jsx("button",{type:"button",disabled:n,onClick:()=>t(e.filter(d=>d!==u)),"aria-label":`Remove ${u}`,className:"rounded-full hover:bg-primary/20 disabled:cursor-not-allowed",children:l.jsx(Dr,{className:"h-3 w-3"})})]},u)),l.jsx("input",{id:r,type:"text",value:i,disabled:n,maxLength:IE*4,onChange:u=>{const d=u.target.value;if(/[\n,]/.test(d)){c(d);return}o(d),s&&a(null)},onKeyDown:u=>{u.key==="Enter"?(u.preventDefault(),c(i)):u.key==="Backspace"&&i===""&&e.length>0&&t(e.slice(0,-1))},onBlur:()=>{i.trim()!==""&&c(i)},placeholder:e.length===0?"Add a word, then press Enter":"","aria-label":"Words to recognise",className:"min-w-[8rem] flex-1 bg-transparent py-1 text-sm outline-none placeholder:text-muted-foreground/70 disabled:cursor-not-allowed"})]}),l.jsxs("div",{className:"mt-1 flex items-start justify-between gap-2",children:[l.jsx("p",{className:"text-xs text-destructive",role:s?"alert":void 0,children:s}),l.jsxs("p",{className:"shrink-0 text-xs text-muted-foreground",children:[e.length,"/",OE]})]})]})}const D0e={all:["thinking_time","expressive","keyterms"],keyterms:["keyterms"],interviewer:["thinking_time","expressive"]};function L0e({value:e,onChange:t,inheritedFrom:n,inheritedLabel:r="organisation defaults",voiceSupportsExpressive:i,disabled:o=!1,idPrefix:s="livekit",compact:a=!1,fields:c="all"}){const u=O0e(e,n),d=g=>t({...e,...g}),f=g=>e[g]===void 0,h=D0e[c],p=h.some(g=>e[g]!==void 0),m=()=>{const g={...e};for(const y of h)delete g[y];t(g)};return l.jsxs("div",{className:"space-y-5",children:[h.includes("thinking_time")&&l.jsxs("fieldset",{disabled:o,children:[l.jsx("legend",{className:"text-sm font-medium text-foreground",children:"Thinking time"}),l.jsxs("p",{className:"mb-2 text-xs text-muted-foreground",children:["How long the interviewer waits before replying.",f("thinking_time")&&n?.thinking_time?` Currently from your ${r}.`:""]}),l.jsx("div",{role:"radiogroup","aria-label":"Thinking time",className:`grid gap-2 ${a?"":"sm:grid-cols-3"}`,children:b0e.map(g=>{const y=u.thinking_time===g;return l.jsxs("button",{type:"button",role:"radio","aria-checked":y,disabled:o,onClick:()=>d({thinking_time:g}),className:`rounded-lg border-2 px-3 py-2 text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60 ${y?"border-primary bg-primary/5":"border-border bg-card hover:border-primary/40"}`,children:[l.jsx("span",{className:"block text-sm font-semibold text-foreground",children:A0e[g]}),l.jsx("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:T0e[g]})]},g)})})]}),h.includes("expressive")&&i===!0&&l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:`${s}-expressive`,className:"text-sm font-medium text-foreground",children:"Expressive voice"}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Lets the interviewer vary tone and emotion as it speaks.",f("expressive")&&n?.expressive!==void 0?` Currently from your ${r}.`:""]})]}),l.jsx(rk,{id:`${s}-expressive`,checked:u.expressive,disabled:o,onCheckedChange:g=>d({expressive:g})})]}),h.includes("keyterms")&&l.jsxs("div",{children:[l.jsx("label",{htmlFor:`${s}-keyterms`,className:"text-sm font-medium text-foreground",children:"Words to recognise"}),l.jsxs("p",{className:"mb-2 text-xs text-muted-foreground",children:["Names, tools and jargon the interviewer should hear correctly, such as a product or a technology. Up to 50.",f("keyterms")&&n?.keyterms!==void 0?` Currently from your ${r}.`:""]}),l.jsx($0e,{id:`${s}-keyterms`,value:u.keyterms,disabled:o,onChange:g=>d({keyterms:g})})]}),p&&l.jsx("button",{type:"button",disabled:o,onClick:m,className:"text-sm text-muted-foreground underline hover:text-foreground disabled:cursor-not-allowed",children:n!==void 0?`Use ${r}`:"Reset to platform defaults"})]})}const mi={livekit:"LiveKit",retell:"Retell"};function z6(e){const t=e.voice_provider==="retell"||e.voice_provider==="livekit"?e.voice_provider:null;return{provider:e.effective_voice_provider??t??"retell",followsPlatformDefault:t===null&&e.effective_voice_provider!==void 0}}function F0e(e){return e.voice_provider==="retell"||e.voice_provider==="livekit"}const br=e=>e==null?"":String(e),mp=[{path:"agent_name",label:"Agent name",help:"Dispatches a different deployed agent. Blank uses this environment's agent.",kind:"text",group:"Session",defaultOf:e=>br(e.agent_name)},{path:"recording",label:"Recording",kind:"bool",group:"Session",defaultOf:e=>e.recording?"On":"Off"},{path:"language_mode",label:"Language mode",help:"jd: the job's interview language drives speech. org: the organisation's languages do.",kind:"choice",choices:["jd","org"],group:"Session",defaultOf:e=>br(e.language_mode)},{path:"session.llm.model",label:"Model",kind:"text",group:"Language model",defaultOf:e=>br(e.session.llm.model)},{path:"session.llm.temperature",label:"Temperature",help:"0 to 2.",kind:"number",group:"Language model",defaultOf:e=>br(e.session.llm.temperature)},{path:"session.llm.max_completion_tokens",label:"Max tokens per reply",kind:"int",group:"Language model",defaultOf:e=>br(e.session.llm.max_completion_tokens)},{path:"session.stt.model",label:"Speech-to-text model",kind:"text",group:"Speech",defaultOf:e=>br(e.session.stt.model)}
636,{path:"session.tts.model",label:"Text-to-speech model",help:"Must be a model of the same vendor as the organisation's default LiveKit voice. A voice normally brings its own model.",kind:"text",group:"Speech",defaultOf:e=>br(e.session.tts.model)},{path:"session.noise_cancellation",label:"Noise cancellation",kind:"choice",choices:["krisp_viva","bvc","none"],group:"Audio and turns",defaultOf:e=>br(e.session.noise_cancellation)},{path:"session.noise_suppression_level",label:"Noise suppression level",help:"0 to 100. krisp_viva only.",kind:"int",group:"Audio and turns",defaultOf:e=>br(e.session.noise_suppression_level)},{path:"session.turn.interruption_mode",label:"Interruption mode",kind:"choice",choices:["adaptive","vad"],group:"Audio and turns",defaultOf:e=>br(e.session.turn.interruption_mode)},{path:"session.turn.interruption_min_words",label:"Interruption: minimum words",kind:"int",group:"Audio and turns",defaultOf:e=>br(e.session.turn.interruption_min_words)},{path:"session.turn.interruption_min_duration_s",label:"Interruption: minimum seconds",kind:"number",group:"Audio and turns",defaultOf:e=>br(e.session.turn.interruption_min_duration_s)},{path:"session.turn.user_away_timeout_s",label:"Away timeout (seconds)",help:"5 or more.",kind:"number",group:"Audio and turns",defaultOf:e=>br(e.session.turn.user_away_timeout_s)}];function B0e(e,t){return t.split(".").reduce((n,r)=>{if(n&&typeof n=="object")return n[r]},e)}function U0e(e){const t={};for(const n of mp){const r=B0e(e,n.path);t[n.path]=r==null?"":n.kind==="bool"?r?"true":"false":String(r)}return t}function z0e(e){const t={},n={};for(const r of mp){const i=(e[r.path]??"").trim();if(i==="")continue;let o;switch(r.kind){case"bool":o=i==="true";break;case"int":{const c=Number(i);if(!Number.isInteger(c)){n[r.path]="Enter a whole number.";continue}o=c;break}case"number":{const c=Number(i);if(!Number.isFinite(c)){n[r.path]="Enter a number.";continue}o=c;break}default:o=i}const s=r.path.split(".");let a=t;s.slice(0,-1).forEach(c=>{a[c]=a[c]??{},a=a[c]}),a[s[s.length-1]]=o}return Object.keys(n).length>0?{ok:!1,errors:n}:{ok:!0,overrides:t}}function V0e(e,t){return mp.every(n=>(e[n.path]??"").trim()===(t[n.path]??"").trim())}function q0e({org:e,onClose:t}){const n=Fw(),[r,i]=v.useState(!1),[o,s]=v.useState(!1),[a,c]=v.useState(!1),[u,d]=v.useState(!1),{provider:f,followsPlatformDefault:h}=z6(e),p=f==="livekit"?"retell":"livekit",m=F0e(e),{data:g}=TA({orgId:e.org_id,enabled:m}),y=g?.platform_default,b=async()=>{try{await n.mutateAsync({orgId:e.org_id,provider:p}),Q.success(`New interviews for ${e.name} now run on ${mi[p]}`),t()}catch(w){throw Q.error(`Failed: ${Hu(w)}`),w}},x=async()=>{try{await n.mutateAsync({orgId:e.org_id,provider:""}),Q.success(`${e.name} now follows the platform default`+(y?` (${mi[y]})`:"")),t()}catch(w){throw Q.error(`Failed: ${Hu(w)}`),w}};return l.jsxs("div",{className:"flex flex-col gap-2 border-t pt-4",children:[l.jsx("h3",{className:"text-sm font-semibold text-muted-foreground",children:"Voice provider"}),l.jsxs("p",{className:"text-xs text-muted-foreground","data-testid":"org-effective-provider",children:["Runs on ",l.jsx("strong",{children:mi[f]}),h?" (the platform default)":"",". Every job in this organisation runs on it, and its recruiters only see that providerâs voices. Interviews already running are unaffected."]}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx(G,{variant:f==="livekit"?"destructive":"default",onClick:()=>i(!0),disabled:n.isPending,className:"w-fit",children:n.isPending?"Workingâ¦":`Switch to ${mi[p]}`}),m&&l.jsx(G,{variant:"outline",onClick:()=>s(!0),disabled:n.isPending||!y,className:"w-fit",children:"Use the platform default"}),l.jsx(G,{variant:"outline",onClick:()=>d(!0),className:"w-fit",children:"Interviewer settings"}),l.jsx(G,{variant:"outline",onClick:()=>c(!0),className:"w-fit",children:"Advanced LiveKit overrides"})]}),r&&l.jsx(At,{open:r,onOpenChange:w=>!w&&i(!1),children:l.jsx(xt,{className:"max-w-md",children:l.jsx(Wu,{isOpen:!0,title:`Switch ${e.name} to ${mi[p]}?`,message:`Every job in ${e.name} will start its next interviews and screenings on ${mi[p]}, and its recruiters will pick from ${mi[p]} voices. Interviews already running don't change. This organisation will then have its own provider instead of following the platform default.`,confirmText:`Switch to ${mi[p]}`,onConfirm:b,onClose:()=>i(!1)})})}),o&&y&&l.jsx(At,{open:o,onOpenChange:w=>!w&&s(!1),children:l.jsx(xt,{className:"max-w-md",children:l.jsx(Wu,{isOpen:!0,title:`Use the platform default for ${e.name}?`,message:`${e.name} will stop having its own provider and follow the platform default, which is ${mi[y]}. Every job in ${e.name} will start its next interviews and screenings on ${mi[y]}, and will follow any later change to the default. Stored LiveKit overrides and interviews already running don't change.`,confirmText:"Use the platform default",onConfirm:x,onClose:()=>s(!1)})})}),a&&l.jsx(K0e,{org:e,onClose:()=>c(!1)}),u&&l.jsx(W0e,{org:e,onClose:()=>d(!1)})]})}function Hu(e){const t=e?.response?.data;return t?.message||t?.error||e?.message||"request failed"}function K0e({org:e,onClose:t}){const{data:n,isLoading:r,error:i}=TA({orgId:e.org_id,enabled:!0}),o=Fw(),s=v.useMemo(()=>U0e(n?.overrides),[n?.overrides]),[a,c]=v.useState(s),[u,d]=v.useState({});v.useEffect(()=>{c(s),d({})},[s]);const f=!!n?.legacy_config,h=!V0e(a,s),p=mp.some(b=>(s[b.path]??"")!==""),m=async b=>{try{await o.mutateAsync({orgId:e.org_id,overrides:b}),Q.success("LiveKit overrides saved")}catch(x){Q.error(`Failed: ${Hu(x)}`)}},g=async()=>{const b=z0e(a);if(!b.ok){d(b.errors);return}d({}),await m(b.overrides)},y=["Session","Language model","Speech","Audio and turns"];return l.jsx(At,{open:!0,onOpenChange:b=>!b&&t(),children:l.jsxs(xt,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:[l.jsxs(Wt,{children:[l.jsxs(Ft,{children:["LiveKit overrides for ",e.name]}),l.jsx(Bt,{children:"Only fields you fill in are saved as overrides. Anything left blank keeps following the platform default, including when the default changes. Thinking time and expressive voice are under Interviewer settings; the voice and words to recognise belong to the organisationâs admins and recruiters."})]}),r&&l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loadingâ¦"}),!!i&&l.jsxs("p",{className:"text-sm text-destructive",children:["Failed to load: ",Hu(i)]}),n&&f&&l.jsx("div",{role:"alert",className:"rounded-lg border border-warning/40 bg-warning/10 p-3 text-sm text-warning",children:"This organisation still has a full LiveKit config saved the old way, which applies as it always has. Saving overrides over it would change what its interviews get, so this form is read-only until the overrides-only rewrite step has converted it."}),n&&l.jsxs("div",{className:"flex flex-col gap-5",children:[n.effective_error&&l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Effective config not shown: ",n.effective_error]}),y.map(b=>l.jsxs("fieldset",{className:"flex flex-col gap-3",children:[l.jsx("legend",{className:"mb-1 text-sm font-semibold text-foreground",children:b}),mp.filter(x=>x.group===b).map(x=>{const w=x.defaultOf(n.defaults),S=a[x.path]??"",_=`override-${x.path}`;return l.jsxs("div",{className:"grid gap-1 sm:grid-cols-[14rem_1fr] sm:items-start",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:_,className:"text-sm text-foreground",children:x.label}),x.help&&l.jsx("p",{className:"text-xs text-muted-foreground",children:x.help})]}),l.jsxs("div",{children:[x.kind==="bool"||x.kind==="choice"?l.jsxs("select",{id:_,value:S,disabled:f,onChange:j=>c(E=>({...E,[x.path]:j.target.value})),className:"h-10 w-full rounded-md border border-input bg-background px-3 text-sm disabled:opacity-50",children:[l.jsxs("option",{value:"",children:["Default",w?` (${w})`:""]}),x.kind==="bool"?l.jsxs(l.Fragment,{children:[l.jsx("option",{value:"true",children:"On"}),l.jsx("option",{value:"false",children:"Off"})]}):x.choices.map(j=>l.jsx("option",{value:j,children:j},j))]}):l.jsx(Le,{id:_,value:S,disabled:f,inputMode:x.kind==="text"?void 0:"decimal",placeholder:w?`Default: ${w}`:"Default",error:u[x.path],onChange:j=>c(E=>({...E,[x.path]:j.target.value}))}),S!==""&&w!==""&&l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Default: ",w]})]})]},x.path)})]},b))]}),l.jsxs(pr,{className:"gap-2",children:[n&&!f&&p&&l.jsx(G,{variant:"outline",onClick:()=>void m({}),disabled:o.isPending,children:"Clear all overrides"}),l.jsx(G,{variant:"outline",onClick:t,children:"Close"}),n&&!f&&l.jsx(G,{onClick:g,disabled:!h||o.isPending,children:o.isPending?"Savingâ¦":"Save overrides"})]})]})})}function W0e({org:e,onClose:t}){const{data:n,isLoading:r,error:i}=TA({orgId:e.org_id,enabled:!0}),o=Fw(),s=v.useMemo(()=>dS(n?.settings),[n?.settings]),[a,c]=v.useState(s);v.useEffect(()=>c(s),[s]);const u=a.thinking_time!==s.thinking_time||a.expressive!==s.expressive,d=async()=>{try{await o.mutateAsync({orgId:e.org_id,settings:dS(a)}),Q.success("Interviewer settings saved"),t()}catch(f){Q.error(`Failed: ${Hu(f)}`)}};return l.jsx(At,{open:!0,onOpenChange:f=>!f&&t(),children:l.jsxs(xt,{className:"max-w-lg",children:[l.jsxs(Wt,{children:[l.jsxs(Ft,{children:["Interviewer settings for ",e.name]}),l.jsx(Bt,{children:"Apply to every LiveKit interview and screening in this organisation, from the next one started. Its admins and recruiters donât see these."})]}),r&&l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loadingâ¦"}),!!i&&l.jsxs("p",{className:"text-sm text-destructive",children:["Failed to load: ",Hu(i)]}),n&&l.jsx(L0e,{idPrefix:"org-interviewer",fields:"interviewer",value:a,onChange:f=>c(dS(f)),voiceSupportsExpressive:!0,disabled:o.isPending}),l.jsxs(pr,{className:"gap-2",children:[l.jsx(G,{variant:"outline",onClick:t,children:"Close"}),n&&l.jsx(G,{onClick:d,disabled:!u||o.isPending,children:o.isPending?"Savingâ¦":"Save settings"})]})]})})}function dS(e){const t={};return e?.thinking_time&&(t.thinking_time=e.thinking_time),typeof e?.expressive=="boolean"&&(t.expressive=e.expressive),t}function o$(e){if(!e)return"-";const t=new Date(e);return Number.isNaN(t.getTime())?"-":t.toLocaleDateString()}function H0e(e){return`${Math.round(e*100)}%`}function G0e(){const[e,t]=v.useState(""),[n,r]=v.useState(null),{data:i,isLoading:o,error:s}=QH({search:e}),{impersonate:a}=Lm(),c=Un(),u=v.useMemo(()=>i??[],[i]),d=f=>
636{a(f.org_id,f.name),Q.success(`Viewing ${f.name} as super admin`),c({to:"/jd-list"})};return l.jsxs("div",{className:"flex flex-col gap-4 p-2",children:[l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Organizations"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Every org on the platform. Click ",l.jsx("strong",{children:"View as"})," to drop into an org's admin UI in read/write mode, or ",l.jsx("strong",{children:"Manage"})," for platform- level actions."]})]}),l.jsx("div",{className:"flex items-center gap-2",children:l.jsx(Le,{placeholder:"Search by name or IDâ¦",value:e,onChange:f=>t(f.target.value),className:"max-w-md"})}),l.jsx(Ce,{className:"overflow-hidden border border-border shadow-sm rounded-2xl",children:o?l.jsx(Fn,{}):s?l.jsxs("div",{className:"p-6 text-destructive",children:["Failed to load orgs: ",s.message]}):u.length===0?l.jsx("div",{className:"p-6 text-muted-foreground",children:"No organizations match that search."}):l.jsxs(mr,{children:[l.jsx(gr,{children:l.jsxs(bt,{children:[l.jsx(pe,{children:"Organization"}),l.jsx(pe,{className:"text-right",children:"Users"}),l.jsx(pe,{className:"text-right",children:"Jobs (all time)"}),l.jsxs(pe,{className:"text-right",children:["Jobs (",new Date().getFullYear(),")"]}),l.jsx(pe,{className:"text-right",children:"Jobs (30d)"}),l.jsx(pe,{className:"text-right",children:"Interviews (30d)"}),l.jsx(pe,{className:"text-right",children:"Completion"}),l.jsx(pe,{className:"text-right",children:"Credits"}),l.jsx(pe,{children:"Last active"}),l.jsx(pe,{children:"Status"}),l.jsx(pe,{className:"text-right",children:"Actions"})]})}),l.jsx(vr,{children:u.map(f=>l.jsxs(bt,{children:[l.jsxs(he,{children:[l.jsx("div",{className:"font-medium text-foreground",children:f.name}),l.jsxs("div",{className:"text-xs text-muted-foreground",children:[f.org_id," · joined ",o$(f.created_at)]})]}),l.jsx(he,{className:"text-right tabular-nums",children:f.user_count}),l.jsx(he,{className:"text-right tabular-nums",children:f.jd_count}),l.jsx(he,{className:"text-right tabular-nums",children:f.jd_count_year??"-"}),l.jsx(he,{className:"text-right tabular-nums",children:f.jd_count_30d??"-"}),l.jsx(he,{className:"text-right tabular-nums",children:f.interviews_30d}),l.jsx(he,{className:"text-right tabular-nums",children:f.interviews_30d>0?H0e(f.completion_rate):"-"}),l.jsx(he,{className:"text-right tabular-nums",children:WH(f.credits_balance)}),l.jsx(he,{className:"text-sm",children:o$(f.last_active_at)}),l.jsxs(he,{children:[f.is_active?l.jsx(ao,{variant:"secondary",children:"Active"}):l.jsx(ao,{variant:"destructive",children:"Suspended"}),f.is_test_org&&l.jsx(ao,{className:"ml-1",children:"Test"}),f.second_evaluation_enabled&&l.jsx(ao,{variant:"outline",className:"ml-1",children:"2nd eval"}),l.jsx(ao,{variant:"outline",className:"ml-1",children:mi[z6(f).provider]})]}),l.jsx(he,{className:"text-right",children:l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx(G,{size:"sm",onClick:()=>d(f),children:"View as"}),l.jsx(G,{size:"sm",variant:"outline",onClick:()=>r(f),children:"Manage"})]})})]},f.org_id))})]})}),l.jsx(Y0e,{org:n,onClose:()=>r(null)},n?.org_id??"none")]})}function Y0e({org:e,onClose:t}){const[n,r]=v.useState(""),[i,o]=v.useState(""),s=Ewe(),a=Cwe(),c=Nwe(),[u,d]=v.useState(!1),f=Fw(),h=e?.voice_provider??"retell",p=Pwe(),m=kwe(),g=Bwe(e?.llm_model),[y,b]=v.useState(null),x=y??g,w=e!==null,S=async()=>{if(!e)return;const N=parseInt(n,10);if(!Number.isFinite(N)||N===0){Q.error("Enter a non-zero integer amount");return}if(!i.trim()){Q.error("Reason is required");return}try{await s.mutateAsync({orgId:e.org_id,amount:N,reason:i.trim()}),Q.success(`${N>0?"Added":"Deducted"} ${Math.abs(N)} credits`),r(""),o("")}catch(k){const P=k.response;Q.error(`Failed: ${P?.data?.error??P?.data?.message??k.message}`)}},_=async()=>{if(!e)return;const N=!e.is_active;try{await a.mutateAsync({orgId:e.org_id,active:N}),Q.success(N?"Organization unsuspended":"Organization suspended"),t()}catch(k){Q.error(`Failed: ${k.message}`)}},j=async()=>
636{if(!e)return;const N=!e.second_evaluation_enabled;d(!1);try{await c.mutateAsync({orgId:e.org_id,enabled:N}),Q.success(N?"Second evaluation enabled":"Second evaluation disabled"),t()}catch(k){Q.error(`Failed: ${k.message}`)}},E=async()=>{if(!e)return;const N=h==="livekit"?"retell":"livekit";try{await f.mutateAsync({orgId:e.org_id,provider:N}),Q.success(N==="livekit"?"Interviews now run on LiveKit":"Interviews now run on Retell"),t()}catch(k){Q.error(`Failed: ${k.message}`)}},C=async()=>{if(!e)return;const N=Uwe(x);try{await m.mutateAsync({orgId:e.org_id,model:N}),Q.success(N===""?"Evaluations now use the app default models":`Evaluations now lead with ${N}`),b(null),t()}catch(k){Q.error(`Failed: ${k.message}`)}};return l.jsxs(l.Fragment,{children:[l.jsx(At,{open:w,onOpenChange:N=>!N&&t(),children:l.jsxs(xt,{className:"max-w-lg",children:[l.jsxs(Wt,{children:[l.jsxs(Ft,{children:["Manage ",e?.name]}),l.jsxs(Bt,{children:["Platform-level actions on ",e?.org_id,". Every action is audit-logged."]})]}),l.jsxs("div",{className:"flex flex-col gap-6",children:[l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("h3",{className:"text-sm font-semibold text-muted-foreground",children:"Adjust credits"}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Current balance: ",WH(e?.credits_balance??0),". Use negative amounts to deduct."]}),l.jsx("div",{className:"flex gap-2",children:l.jsx(Le,{type:"number",placeholder:"Amount (e.g. 500 or -100)",value:n,onChange:N=>r(N.target.value)})}),l.jsx(Le,{placeholder:"Reason (required)",value:i,onChange:N=>o(N.target.value)}),l.jsx(G,{onClick:S,disabled:s.isPending,className:"w-fit",children:s.isPending?"Applyingâ¦":"Apply adjustment"})]}),l.jsxs("div",{className:"flex flex-col gap-2 border-t pt-4",children:[l.jsx("h3",{className:"text-sm font-semibold text-muted-foreground",children:"Features"}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Second evaluation lets recruiters upload a transcript and score a candidate again. The new round is blended with the AI interview; both rounds stay visible.",e?.second_evaluation_enabled?" Turning it off stops new rounds. Rounds already scored are kept.":""]}),l.jsx(G,{variant:e?.second_evaluation_enabled?"destructive":"default",onClick:()=>d(!0),disabled:c.isPending,className:"w-fit",children:c.isPending?"Workingâ¦":e?.second_evaluation_enabled?"Disable second evaluation":"Enable second evaluation"})]}),e?l.jsx(q0e,{org:e,onClose:t}):l.jsxs("div",{className:"flex flex-col gap-2 border-t pt-4",children:[l.jsx("h3",{className:"text-sm font-semibold text-muted-foreground",children:"Voice provider"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:h==="livekit"?"Interviews run on LiveKit (our own agent). Switching back to Retell applies to the next interview started; running interviews are unaffected.":"Interviews run on Retell (the default). Switching to LiveKit applies to the next interview started and uses this environment's LiveKit agent."}),l.jsx(G,{variant:h==="livekit"?"destructive":"default",onClick:E,disabled:f.isPending,className:"w-fit",children:f.isPending?"Workingâ¦":h==="livekit"?"Switch to Retell":"Switch to LiveKit"})]}),l.jsxs("div",{className:"flex flex-col gap-2 border-t pt-4",children:[l.jsx("h3",{className:"text-sm font-semibold text-muted-foreground",children:"Evaluation model"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"The model this org's interview evaluation leads with. The app default models stay behind it as fallbacks. Applies to the next evaluation; other orgs are unaffected."}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(ho,{value:x,onValueChange:b,disabled:p.isLoading||m.isPending,children:[l.jsx(Mi,{className:"w-full","aria-label":"Evaluation model",children:l.jsx(po,{placeholder:"App default"})}),l.jsxs($i,{children:[l.jsx(Nt,{value:RA,children:"App default"}),zwe(p.data??[],e?.llm_model).map(N=>l.jsx(Nt,{value:N,children:N},N))]})]}),l.jsx(G,{onClick:C,disabled:m.isPending||x===g,className:"shrink-0",children:m.isPending?"Savingâ¦":"Save"})]}),p.isError&&l.jsx("p",{className:"text-xs text-destructive",children:"Could not load the model list."})]}),l.jsxs("div",{className:"flex flex-col gap-2 border-t pt-4",children:[l.jsx("h3",{className:"text-sm font-semibold text-muted-foreground",children:"Lifecycle"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:e?.is_active?"Org is active. Suspending blocks all logins until unsuspended.":"Org is currently suspended."}),l.jsx(G,{variant:e?.is_active?"destructive":"default",onClick:_,disabled:a.isPending,className:"w-fit",children:a.isPending?"Workingâ¦":e?.is_active?"Suspend organization":"Unsuspend organization"})]})]}),l.jsx(pr,{children:l.jsx(G,{variant:"outline",onClick:t,children:"Close"})})]})}),u&&l.jsx(At,{open:u,onOpenChange:N=>!N&&d(!1),children:l.jsx(xt,{className:"max-w-md",children:l.jsx(Wu,{isOpen:!0,title:e?.second_evaluation_enabled?"Disable second evaluation?":"Enable second evaluation?",message:e?.second_evaluation_enabled?`Recruiters in ${e?.name} will no longer be able to upload a transcript and score a candidate again. Rounds already scored are kept.`:`Second evaluation lets recruiters in ${e?.name} upload a transcript and score the candidate again. The new round is blended with the AI interview; both rounds stay visible.`,confirmText:e?.second_evaluation_enabled?"Disable":"Enable",onConfirm:j,onClose:()=>d(!1)})})})]})}const Q0e=Wi("/super-admin/orgs")({component:G0e}),J0e=Object.freeze(Object.defineProperty({__proto__:null,Route:Q0e},Symbol.toStringTag,{value:"Module"}));var DA="Tabs",[X0e,Yct]=Ps(DA,[Id]),V6=Id(),[Z0e,LA]=X0e(DA),q6=v.forwardRef((e,t)=>
636{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:s="horizontal",dir:a,activationMode:c="automatic",...u}=e,d=Od(a),[f,h]=si({prop:r,onChange:i,defaultProp:o});return l.jsx(Z0e,{scope:n,baseId:Ca(),value:f,onValueChange:h,orientation:s,dir:d,activationMode:c,children:l.jsx(Oe.div,{dir:d,"data-orientation":s,...u,ref:t})})});q6.displayName=DA;var K6="TabsList",W6=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=LA(K6,n),s=V6(n);return l.jsx(uk,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:r,children:l.jsx(Oe.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});W6.displayName=K6;var H6="TabsTrigger",G6=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,s=LA(H6,n),a=V6(n),c=J6(s.baseId,r),u=X6(s.baseId,r),d=r===s.value;return l.jsx(dk,{asChild:!0,...a,focusable:!i,active:d,children:l.jsx(Oe.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...o,ref:t,onMouseDown:xe(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?s.onValueChange(r):f.preventDefault()}),onKeyDown:xe(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(r)}),onFocus:xe(e.onFocus,()=>{const f=s.activationMode!=="manual";!d&&!i&&f&&s.onValueChange(r)})})})});G6.displayName=H6;var Y6="TabsContent",Q6=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=e,a=LA(Y6,n),c=J6(a.baseId,r),u=X6(a.baseId,r),d=r===a.value,f=v.useRef(d);return v.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(ks,{present:i||d,children:({present:h})=>l.jsx(Oe.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&o})})});Q6.displayName=Y6;function J6(e,t){return`${e}-trigger-${t}`}function X6(e,t){return`${e}-content-${t}`}var e_e=q6,Z6=W6,e8=G6,t8=Q6;const FA=e_e,qw=v.forwardRef(({className:e,...t},n)=>l.jsx(Z6,{ref:n,className:K("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));qw.displayName=Z6.displayName;const xa=v.forwardRef(({className:e,...t},n)=>l.jsx(e8,{ref:n,className:K("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));xa.displayName=e8.displayName;const ba=v.forwardRef(({className:e,...t},n)=>l.jsx(t8,{ref:n,className:K("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));ba.displayName=t8.displayName;var t_e=Array.isArray,yr=t_e,n_e=typeof Qf=="object"&&Qf&&Qf.Object===Object&&Qf,n8=n_e,r_e=n8,i_e=typeof self=="object"&&self&&self.Object===Object&&self,o_e=r_e||i_e||Function("return this")(),No=o_e,s_e=No,a_e=s_e.Symbol,Bm=a_e,s$=Bm,r8=Object.prototype,l_e=r8.hasOwnProperty,c_e=r8.toString,$f=s$?s$.toStringTag:void 0;function u_e(e){var t=l_e.call(e,$f),n=e[$f];try{e[$f]=void 0;var r=!0}catch{}var i=c_e.call(e);return r&&(t?e[$f]=n:delete e[$f]),i}var d_e=u_e,f_e=Object.prototype,h_e=f_e.toString;function p_e(e){return h_e.call(e)}var m_e=p_e,a$=Bm,g_e=d_e,v_e=m_e,y_e="[object Null]",x_e="[object Undefined]",l$=a$?a$.toStringTag:void 0;function b_e(e){return e==null?e===void 0?x_e:y_e:l$&&l$ in Object(e)?g_e(e):v_e(e)}var As=b_e;function w_e(e){return e!=null&&typeof e=="object"}var Ts=w_e,__e=As,S_e=Ts,j_e="[object Symbol]";function E_e(e){return typeof e=="symbol"||S_e(e)&&__e(e)==j_e}var Xd=E_e,C_e=yr,N_e=Xd,P_e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,k_e=/^\w*$/;function A_e(e,t){if(C_e(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||N_e(e)?!0:k_e.test(e)||!P_e.test(e)||t!=null&&e in Object(t)}var BA=A_e;function T_e(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ya=T_e;const Zd=ct(Ya);var R_e=As,O_e=Ya,I_e="[object AsyncFunction]",M_e="[object Function]",$_e="[object GeneratorFunction]",D_e="[object Proxy]";function L_e(e){if(!O_e(e))return!1;var t=R_e(e);return t==M_e||t==$_e||t==I_e||t==D_e}var UA=L_e;const ze=ct(UA);var F_e=No,B_e=F_e["__core-js_shared__"],U_e=B_e,fS=U_e,c$=function(){var e=/[^.]+$/.exec(fS&&fS.keys&&fS.keys.IE_PROTO||"");
vendor: 4,276 bytes, line 636
636return e?"Symbol(src)_1."+e:""}();function z_e(e){return!!c$&&c$ in e}var V_e=z_e,q_e=Function.prototype,K_e=q_e.toString;function W_e(e){if(e!=null){try{return K_e.call(e)}catch{}try{return e+""}catch{}}return""}var i8=W_e,H_e=UA,G_e=V_e,Y_e=Ya,Q_e=i8,J_e=/[\\^$.*+?()[\]{}|]/g,X_e=/^\[object .+?Constructor\]$/,Z_e=Function.prototype,eSe=Object.prototype,tSe=Z_e.toString,nSe=eSe.hasOwnProperty,rSe=RegExp("^"+tSe.call(nSe).replace(J_e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function iSe(e){if(!Y_e(e)||G_e(e))return!1;var t=H_e(e)?rSe:X_e;return t.test(Q_e(e))}var oSe=iSe;function sSe(e,t){return e?.[t]}var aSe=sSe,lSe=oSe,cSe=aSe;function uSe(e,t){var n=cSe(e,t);return lSe(n)?n:void 0}var hc=uSe,dSe=hc,fSe=dSe(Object,"create"),Kw=fSe,u$=Kw;function hSe(){this.__data__=u$?u$(null):{},this.size=0}var pSe=hSe;function mSe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gSe=mSe,vSe=Kw,ySe="__lodash_hash_undefined__",xSe=Object.prototype,bSe=xSe.hasOwnProperty;function wSe(e){var t=this.__data__;if(vSe){var n=t[e];return n===ySe?void 0:n}return bSe.call(t,e)?t[e]:void 0}var _Se=wSe,SSe=Kw,jSe=Object.prototype,ESe=jSe.hasOwnProperty;function CSe(e){var t=this.__data__;return SSe?t[e]!==void 0:ESe.call(t,e)}var NSe=CSe,PSe=Kw,kSe="__lodash_hash_undefined__";function ASe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=PSe&&t===void 0?kSe:t,this}var TSe=ASe,RSe=pSe,OSe=gSe,ISe=_Se,MSe=NSe,$Se=TSe;function ef(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ef.prototype.clear=RSe;ef.prototype.delete=OSe;ef.prototype.get=ISe;ef.prototype.has=MSe;ef.prototype.set=$Se;var DSe=ef;function LSe(){this.__data__=[],this.size=0}var FSe=LSe;function BSe(e,t){return e===t||e!==e&&t!==t}var zA=BSe,USe=zA;function zSe(e,t){for(var n=e.length;n--;)if(USe(e[n][0],t))return n;return-1}var Ww=zSe,VSe=Ww,qSe=Array.prototype,KSe=qSe.splice;function WSe(e){var t=this.__data__,n=VSe(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():KSe.call(t,n,1),--this.size,!0}var HSe=WSe,GSe=Ww;function YSe(e){var t=this.__data__,n=GSe(t,e);return n<0?void 0:t[n][1]}var QSe=YSe,JSe=Ww;function XSe(e){return JSe(this.__data__,e)>-1}var ZSe=XSe,e1e=Ww;function t1e(e,t){var n=this.__data__,r=e1e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var n1e=t1e,r1e=FSe,i1e=HSe,o1e=QSe,s1e=ZSe,a1e=n1e;function tf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}tf.prototype.clear=r1e;tf.prototype.delete=i1e;tf.prototype.get=o1e;tf.prototype.has=s1e;tf.prototype.set=a1e;var Hw=tf,l1e=hc,c1e=No,u1e=l1e(c1e,"Map"),VA=u1e,d$=DSe,d1e=Hw,f1e=VA;function h1e(){this.size=0,this.__data__={hash:new d$,map:new(f1e||d1e),string:new d$}}var p1e=h1e;function m1e(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var g1e=m1e,v1e=g1e;function y1e(e,t){var n=e.__data__;return v1e(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Gw=y1e,x1e=Gw;function b1e(e){var t=x1e(this,e).delete(e);return this.size-=t?1:0,t}var w1e=b1e,_1e=Gw;function S1e(e){return _1e(this,e).get(e)}var j1e=S1e,E1e=Gw;function C1e(e){return E1e(this,e).has(e)}var N1e=C1e,P1e=Gw;function k1e(e,t){var n=P1e(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var A1e=k1e,T1e=p1e,R1e=w1e,O1e=j1e,I1e=N1e,M1e=A1e;function nf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nf.prototype.clear=T1e;nf.prototype.delete=R1e;nf.prototype.get=O1e;nf.prototype.has=I1e;nf.prototype.set=M1e;var qA=nf,o8=qA,$1e="Expected a function";function KA(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError($1e);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(KA.Cache||o8),n}KA.Cache=o8;var s8=KA;const D1e=ct(s8);var L1e=s8,F1e=500;function B1e(e){var t=L1e(e,function(r){return n.size===F1e&&n.clear(),r}),n=t.cache;return t}var U1e=B1e,z1e=U1e,V1e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,q1e=/\\(\\)?/g,K1e=z1e(function(e){var t=[];
636return e.charCodeAt(0)===46&&t.push(""),e.replace(V1e,function(n,r,i,o){t.push(i?o.replace(q1e,"$1"):r||n)}),t}),W1e=K1e;function H1e(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var WA=H1e,f$=Bm,G1e=WA,Y1e=yr,Q1e=Xd,J1e=1/0,h$=f$?f$.prototype:void 0,p$=h$?h$.toString:void 0;function a8(e){if(typeof e=="string")return e;if(Y1e(e))return G1e(e,a8)+"";if(Q1e(e))return p$?p$.call(e):"";var t=e+"";return t=="0"&&1/e==-J1e?"-0":t}var X1e=a8,Z1e=X1e;function eje(e){return e==null?"":Z1e(e)}var l8=eje,tje=yr,nje=BA,rje=W1e,ije=l8;function oje(e,t){return tje(e)?e:nje(e,t)?[e]:rje(ije(e))}var c8=oje,sje=Xd,aje=1/0;function lje(e){if(typeof e=="string"||sje(e))return e;var t=e+"";return t=="0"&&1/e==-aje?"-0":t}var Yw=lje,cje=c8,uje=Yw;function dje(e,t){t=cje(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[uje(t[n++])];return n&&n==r?e:void 0}var HA=dje,fje=HA;function hje(e,t,n){var r=e==null?void 0:fje(e,t);return r===void 0?n:r}var u8=hje;const ni=ct(u8);function pje(e){return e==null}var mje=pje;const Ve=ct(mje);var gje=As,vje=yr,yje=Ts,xje="[object String]";function bje(e){return typeof e=="string"||!vje(e)&&yje(e)&&gje(e)==xje}var wje=bje;const Um=ct(wje);var d8={exports:{}},ut={};/** 637 * @license React 638 * react-is.production.min.js 639 * 640 * Copyright (c) Facebook, Inc. and its affiliates. 641 * 642 * This source code is licensed under the MIT license found in the 643 * LICENSE file in the root directory of this source tree. 644 */var GA=Symbol.for("react.element"),YA=Symbol.for("react.portal"),Qw=Symbol.for("react.fragment"),Jw=Symbol.for("react.strict_mode"),Xw=Symbol.for("react.profiler"),Zw=Symbol.for("react.provider"),e0=Symbol.for("react.context"),_je=Symbol.for("react.server_context"),t0=Symbol.for("react.forward_ref"),n0=Symbol.for("react.suspense"),r0=Symbol.for("react.suspense_list"),i0=Symbol.for("react.memo"),o0=Symbol.for("react.lazy"),Sje=Symbol.for("react.offscreen"),f8;f8=Symbol.for("react.module.reference");function li(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case GA:switch(e=e.type,e){case Qw:case Xw:case Jw:case n0:case r0:return e;default:switch(e=e&&e.$$typeof,e){case _je:case e0:case t0:case o0:case i0:case Zw:return e;default:return t}}case YA:return t}}}ut.ContextConsumer=e0;ut.ContextProvider=Zw;ut.Element=GA;ut.ForwardRef=t0;ut.Fragment=Qw;ut.Lazy=o0;ut.Memo=i0;ut.Portal=YA;ut.Profiler=Xw;ut.StrictMode=Jw;ut.Suspense=n0;ut.SuspenseList=r0;ut.isAsyncMode=function(){return!1};ut.isConcurrentMode=function(){return!1};ut.isContextConsumer=function(e){return li(e)===e0};ut.isContextProvider=function(e){return li(e)===Zw};ut.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===GA};ut.isForwardRef=function(e){return li(e)===t0};ut.isFragment=function(e){return li(e)===Qw};ut.isLazy=function(e){return li(e)===o0};ut.isMemo=function(e){return li(e)===i0};ut.isPortal=function(e){return li(e)===YA};ut.isProfiler=function(e){return li(e)===Xw};ut.isStrictMode=function(e){return li(e)===Jw};ut.isSuspense=function(e){return li(e)===n0};ut.isSuspenseList=function(e){return li(e)===r0};ut.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Qw||e===Xw||e===Jw||e===n0||e===r0||e===Sje||typeof e=="object"&&e!==null&&(e.$$typeof===o0||e.$$typeof===i0||e.$$typeof===Zw||e.$$typeof===e0||e.$$typeof===t0||e.$$typeof===f8||e.getModuleId!==void 0)};ut.typeOf=li;d8.exports=ut;var jje=d8.exports,Eje=As,Cje=Ts,Nje="[object Number]";function Pje(e){return typeof e=="number"||Cje(e)&&Eje(e)==Nje}var h8=Pje;const kje=ct(h8);var Aje=h8;function Tje(e){return Aje(e)&&e!=+e}var Rje=Tje;const zm=ct(Rje);var Ai=function(t){return t===0?0:t>0?1:-1},_l=function(t){return Um(t)&&t.indexOf("%")===t.length-1},fe=function(t){return kje(t)&&!zm(t)},cn=function(t){return fe(t)||Um(t)},Oje=0,Vm=function(t){var n=++Oje;return"".concat(t||"").concat(n)},Ti=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!fe(t)&&!Um(t))return r;var o;if(_l(t)){var s=t.indexOf("%");o=n*parseFloat(t.slice(0,s))/100}
vendor: 5,405 bytes, line 644
644else o=+t;return zm(o)&&(o=r),i&&o>n&&(o=n),o},ia=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Ije=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},Ni=function(t,n){return fe(t)&&fe(n)?function(r){return t+r*(n-t)}:function(){return n}};function ex(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):ni(r,t))===n})}var Qct=function(t){if(!t||!t.length)return null;for(var n=t.length,r=0,i=0,o=0,s=0,a=1/0,c=-1/0,u=0,d=0,f=0;f<n;f++)u=t[f].cx||0,d=t[f].cy||0,r+=u,i+=d,o+=u*d,s+=u*u,a=Math.min(a,u),c=Math.max(c,u);var h=n*s!==r*r?(n*o-r*i)/(n*s-r*r):0;return{xmin:a,xmax:c,a:h,b:(i-h*r)/n}};function _u(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function ME(e){"@babel/helpers - typeof";return ME=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ME(e)}var Mje=["viewBox","children"],$je=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],m$=["points","pathLength"],hS={svg:Mje,polygon:m$,polyline:m$},QA=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
644ocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],tx=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(v.isValidElement(t)&&(r=t.props),!Zd(r))return null;var i={};return Object.keys(r).forEach(function(o){QA.includes(o)&&(i[o]=n||function(s){return r[o](r,s)})}),i},Dje=function(t,n,r){return function(i){return t(n,r,i),null}},nx=function(t,n,r){if(!Zd(t)||ME(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(o){var s=t[o];QA.includes(o)&&typeof s=="function"&&(i||(i={}),i[o]=Dje(s,n,r))}),i},Lje=["children"],Fje=["children"];function g$(e,t){if(e==null)return{};var n=Bje(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Bje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $E(e){"@babel/helpers - typeof";return $E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$E(e)}var v$={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},rs=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},y$=null,pS=null,JA=function e(t){if(t===y$&&Array.isArray(pS))return pS;var n=[];
644return v.Children.forEach(t,function(r){Ve(r)||(jje.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),pS=n,y$=t,n};function ri(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return rs(i)}):r=[rs(t)],JA(e).forEach(function(i){var o=ni(i,"type.displayName")||ni(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function jr(e,t){var n=ri(e,t);return n&&n[0]}var x$=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!fe(r)||r<=0||!fe(i)||i<=0)},Uje=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],zje=function(t){return t&&t.type&&Um(t.type)&&Uje.indexOf(t.type)>=0},Vje=function(t){return t&&$E(t)==="object"&&"clipDot"in t},qje=function(t,n,r,i){var o,s=(o=hS?.[i])!==null&&o!==void 0?o:[];return!ze(t)&&(i&&s.includes(n)||$je.includes(n))||r&&QA.includes(n)},Ye=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(v.isValidElement(t)&&(i=t.props),!Zd(i))return null;var o={};
644return Object.keys(i).forEach(function(s){var a;qje((a=i)===null||a===void 0?void 0:a[s],s,n,r)&&(o[s]=i[s])}),o},DE=function e(t,n){if(t===n)return!0;var r=v.Children.count(t);if(r!==v.Children.count(n))return!1;if(r===0)return!0;if(r===1)return b$(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var o=t[i],s=n[i];if(Array.isArray(o)||Array.isArray(s)){if(!e(o,s))return!1}else if(!b$(o,s))return!1}return!0},b$=function(t,n){if(Ve(t)&&Ve(n))return!0;if(!Ve(t)&&!Ve(n)){var r=t.props||{},i=r.children,o=g$(r,Lje),s=n.props||{},a=s.children,c=g$(s,Fje);return i&&a?_u(o,c)&&DE(i,a):!i&&!a?_u(o,c):!1}return!1},w$=function(t,n){var r=[],i={};return JA(t).forEach(function(o,s){if(zje(o))r.push(o);else if(o){var a=rs(o.type),c=n[a]||{},u=c.handler,d=c.once;if(u&&(!d||!i[a])){var f=u(o,a,s);r.push(f),i[a]=!0}}}),r},Kje=function(t){var n=t&&t.type;return n&&v$[n]?v$[n]:null},Wje=function(t,n){return JA(n).indexOf(t)},Hje=["children","width","height","viewBox","className","style","title","desc"];function LE(){return LE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LE.apply(this,arguments)}function Gje(e,t){if(e==null)return{};var n=Yje(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function FE(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,s=e.style,a=e.title,c=e.desc,u=Gje(e,Hje),d=i||{width:n,height:r,x:0,y:0},f=et("recharts-surface",o);return $.createElement("svg",LE({},Ye(u,!0,"svg"),{className:f,width:n,height:r,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),$.createElement("title",null,a),$.createElement("desc",null,c),t)}var Qje=["children","className"];function BE(){return BE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BE.apply(this,arguments)}function Jje(e,t){if(e==null)return{};var n=Xje(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Xt=$.forwardRef(function(e,t){var n=e.children,r=e.className,i=Jje(e,Qje),o=et("recharts-layer",r);return $.createElement("g",BE({className:o},Ye(i,!0),{ref:t}),n)}),is=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o]};function Zje(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}var eEe=Zje,tEe=eEe;function nEe(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:tEe(e,t,n)}var rEe=nEe,iEe="\\ud800-\\udfff",oEe="\\u0300-\\u036f",sEe="\\ufe20-\\ufe2f",aEe="\\u20d0-\\u20ff",lEe=oEe+sEe+aEe,cEe="\\ufe0e\\ufe0f",uEe="\\u200d",dEe=RegExp("["+uEe+iEe+lEe+cEe+"]");function fEe(e){return dEe.test(e)}var p8=fEe;function hEe(e){return e.split("")}var pEe=hEe,m8="\\ud800-\\udfff",mEe="\\u0300-\\u036f",gEe="\\ufe20-\\ufe2f",vEe="\\u20d0-\\u20ff",yEe=mEe+gEe+vEe,xEe="\\ufe0e\\ufe0f",bEe="["+m8+"]",UE="["+yEe+"]",zE="\\ud83c[\\udffb-\\udfff]",wEe="(?:"+UE+"|"+zE+")",g8="[^"+m8+"]",v8="(?:\\ud83c[\\udde6-\\uddff]){2}",y8="[\\ud800-\\udbff][\\udc00-\\udfff]",_Ee="\\u200d",x8=wEe+"?",b8="["+xEe+"]?",SEe="(?:"+_Ee+"(?:"+[g8,v8,y8].join("|")+")"+b8+x8+")*",jEe=b8+x8+SEe,EEe="(?:"+[g8+UE+"?",UE,v8,y8,bEe].join("|")+")",CEe=RegExp(zE+"(?="+zE+")|"+EEe+jEe,"g");function NEe(e){return e.match(CEe)||[]}var PEe=NEe,kEe=pEe,AEe=p8,TEe=PEe;function REe(e){return AEe(e)?TEe(e):kEe(e)}var OEe=REe,IEe=rEe,MEe=p8,$Ee=OEe,DEe=l8;function LEe(e){return function(t){t=DEe(t);var n=MEe(t)?$Ee(t):void 0,r=n?n[0]:t.charAt(0),i=n?IEe(n,1).join(""):t.slice(1);return r[e]()+i}}var FEe=LEe,BEe=FEe,UEe=BEe("toUpperCase"),zEe=UEe;const s0=ct(zEe);function _t(e){return function(){return e}}const w8=Math.cos,rx=Math.sin,Qi=Math.sqrt,ix=Math.PI,a0=2*ix,VE=Math.PI,qE=2*VE,ll=1e-6,VEe=qE-ll;function _8(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function qEe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return _8;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class KEe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?_8:qEe(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,s){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,c=r-t,u=i-n,d=s-t,f=a-n,h=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>ll)if(!(Math.abs(f*c-u*d)>ll)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-s,m=i-a,g=c*c+u*u,y=p*p+m*m,b=Math.sqrt(g),x=Math.sqrt(h),w=o*Math.tan((VE-Math.acos((g+h-y)/(2*b*x)))/2),S=w/x,_=w/b;Math.abs(S-1)>ll&&this._append`L${t+S*d},${n+S*f}`,this._append`A${o},${o},0,0,${+(f*p>d*m)},${this._x1=t+_*c},${this._y1=n+_*u}`}}
644arc(t,n,r,i,o,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),c=r*Math.sin(i),u=t+a,d=n+c,f=1^s,h=s?i-o:o-i;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>ll||Math.abs(this._y1-d)>ll)&&this._append`L${u},${d}`,r&&(h<0&&(h=h%qE+qE),h>VEe?this._append`A${r},${r},0,1,${f},${t-a},${n-c}A${r},${r},0,1,${f},${this._x1=u},${this._y1=d}`:h>ll&&this._append`A${r},${r},0,${+(h>=VE)},${f},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function XA(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new KEe(t)}function ZA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function S8(e){this._context=e}S8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function l0(e){return new S8(e)}function j8(e){return e[0]}function E8(e){return e[1]}function C8(e,t){var n=_t(!0),r=null,i=l0,o=null,s=XA(a);e=typeof e=="function"?e:e===void 0?j8:_t(e),t=typeof t=="function"?t:t===void 0?E8:_t(t);function a(c){var u,d=(c=ZA(c)).length,f,h=!1,p;for(r==null&&(o=i(p=s())),u=0;u<=d;++u)!(u<d&&n(f=c[u],u,c))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(f,u,c),+t(f,u,c));if(p)return o=null,p+""||null}return a.x=function(c){return arguments.length?(e=typeof c=="function"?c:_t(+c),a):e},a.y=function(c){return arguments.length?(t=typeof c=="function"?c:_t(+c),a):t},a.defined=function(c){return arguments.length?(n=typeof c=="function"?c:_t(!!c),a):n},a.curve=function(c){return arguments.length?(i=c,r!=null&&(o=i(r)),a):i},a.context=function(c){return arguments.length?(c==null?r=o=null:o=i(r=c),a):r},a}function Yg(e,t,n){var r=null,i=_t(!0),o=null,s=l0,a=null,c=XA(u);e=typeof e=="function"?e:e===void 0?j8:_t(+e),t=typeof t=="function"?t:_t(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?E8:_t(+n);function u(f){var h,p,m,g=(f=ZA(f)).length,y,b=!1,x,w=new Array(g),S=new Array(g);for(o==null&&(a=s(x=c())),h=0;h<=g;++h){if(!(h<g&&i(y=f[h],h,f))===b)if(b=!b)p=h,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),m=h-1;m>=p;--m)a.point(w[m],S[m]);a.lineEnd(),a.areaEnd()}b&&(w[h]=+e(y,h,f),S[h]=+t(y,h,f),a.point(r?+r(y,h,f):w[h],n?+n(y,h,f):S[h]))}if(x)return a=null,x+""||null}function d(){return C8().defined(i).curve(s).context(o)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:_t(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:_t(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:_t(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:_t(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:_t(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:_t(+f),u):n},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(n)},u.lineX1=function(){return d().x(r).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:_t(!!f),u):i},u.curve=function(f){return arguments.length?(s=f,o!=null&&(a=s(o)),u):s},u.context=function(f){return arguments.length?(f==null?o=a=null:a=s(o=f),u):o},u}class N8{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function WEe(e){return new N8(e,!0)}function HEe(e){return new N8(e,!1)}const eT={draw(e,t){const n=Qi(t/ix);e.moveTo(n,0),e.arc(0,0,n,0,a0)}},GEe={draw(e,t){const n=Qi(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},P8=Qi(1/3),YEe=P8*2,QEe={draw(e,t){const n=Qi(t/YEe),r=n*P8;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},JEe={draw(e,t){const n=Qi(t),r=-n/2;e.rect(r,r,n,n)}},XEe=.8908130915292852,k8=rx(ix/10)/rx(7*ix/10),ZEe=rx(a0/10)*k8,eCe=-w8(a0/10)*k8,tCe={draw(e,t){const n=Qi(t*XEe),r=ZEe*n,i=eCe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const s=a0*o/5,a=w8(s),c=rx(s);
644e.lineTo(c*n,-a*n),e.lineTo(a*r-c*i,c*r+a*i)}e.closePath()}},mS=Qi(3),nCe={draw(e,t){const n=-Qi(t/(mS*3));e.moveTo(0,n*2),e.lineTo(-mS*n,-n),e.lineTo(mS*n,-n),e.closePath()}},Vr=-.5,qr=Qi(3)/2,KE=1/Qi(12),rCe=(KE/2+1)*3,iCe={draw(e,t){const n=Qi(t/rCe),r=n/2,i=n*KE,o=r,s=n*KE+n,a=-o,c=s;e.moveTo(r,i),e.lineTo(o,s),e.lineTo(a,c),e.lineTo(Vr*r-qr*i,qr*r+Vr*i),e.lineTo(Vr*o-qr*s,qr*o+Vr*s),e.lineTo(Vr*a-qr*c,qr*a+Vr*c),e.lineTo(Vr*r+qr*i,Vr*i-qr*r),e.lineTo(Vr*o+qr*s,Vr*s-qr*o),e.lineTo(Vr*a+qr*c,Vr*c-qr*a),e.closePath()}};function oCe(e,t){let n=null,r=XA(i);e=typeof e=="function"?e:_t(e||eT),t=typeof t=="function"?t:_t(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:_t(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:_t(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function ox(){}function sx(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function A8(e){this._context=e}A8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:sx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:sx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sCe(e){return new A8(e)}function T8(e){this._context=e}T8.prototype={areaStart:ox,areaEnd:ox,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:sx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aCe(e){return new T8(e)}function R8(e){this._context=e}R8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:sx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lCe(e){return new R8(e)}function O8(e){this._context=e}O8.prototype={areaStart:ox,areaEnd:ox,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function cCe(e){return new O8(e)}function _$(e){return e<0?-1:1}function S$(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),s=(n-e._y1)/(i||r<0&&-0),a=(o*i+s*r)/(r+i);return(_$(o)+_$(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a)
644)||0}function j$(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function gS(e,t,n){var r=e._x0,i=e._y0,o=e._x1,s=e._y1,a=(o-r)/3;e._context.bezierCurveTo(r+a,i+a*t,o-a,s-a*n,o,s)}function ax(e){this._context=e}ax.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:gS(this,this._t0,j$(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,gS(this,j$(this,n=S$(this,e,t)),n);break;default:gS(this,this._t0,n=S$(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function I8(e){this._context=new M8(e)}(I8.prototype=Object.create(ax.prototype)).point=function(e,t){ax.prototype.point.call(this,t,e)};function M8(e){this._context=e}M8.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function uCe(e){return new ax(e)}function dCe(e){return new I8(e)}function $8(e){this._context=e}$8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=E$(e),i=E$(t),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[s],t[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function E$(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),s=new Array(n);for(i[0]=0,o[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,s[t]-=r*s[t-1];for(i[n-1]=s[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(s[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function fCe(e){return new $8(e)}function c0(e,t){this._context=e,this._t=t}c0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function hCe(e){return new c0(e,.5)}function pCe(e){return new c0(e,0)}function mCe(e){return new c0(e,1)}function Gu(e,t){if((s=e.length)>1)for(var n=1,r,i,o=e[t[0]],s,a=o.length;n<s;++n)for(i=o,o=e[t[n]],r=0;r<a;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function WE(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function gCe(e,t){return e[t]}function vCe(e){const t=[];return t.key=e,t}function yCe(){var e=_t([]),t=WE,n=Gu,r=gCe;function i(o){var s=Array.from(e.apply(this,arguments),vCe),a,c=s.length,u=-1,d;for(const f of o)for(a=0,++u;a<c;++a)(s[a][u]=[0,+r(f,s[a].key,u,o)]).data=f;for(a=0,d=ZA(t(s));a<c;++a)s[d[a]].index=a;return n(s,d),s}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:_t(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:_t(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?WE:typeof o=="function"?o:_t(Array.from(o)),i):t}
vendor: 9,504 bytes, lines 644-647
644,i.offset=function(o){return arguments.length?(n=o??Gu,i):n},i}function xCe(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,s;i<o;++i){for(s=n=0;n<r;++n)s+=e[n][i][1]||0;if(s)for(n=0;n<r;++n)e[n][i][1]/=s}Gu(e,t)}}function bCe(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var s=0,a=0;s<i;++s)a+=e[s][n][1]||0;r[n][1]+=r[n][0]=-a/2}Gu(e,t)}}function wCe(e,t){if(!(!((s=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,s;r<o;++r){for(var a=0,c=0,u=0;a<s;++a){for(var d=e[t[a]],f=d[r][1]||0,h=d[r-1][1]||0,p=(f-h)/2,m=0;m<a;++m){var g=e[t[m]],y=g[r][1]||0,b=g[r-1][1]||0;p+=y-b}c+=f,u+=p*f}i[r-1][1]+=i[r-1][0]=n,c&&(n-=u/c)}i[r-1][1]+=i[r-1][0]=n,Gu(e,t)}}function gp(e){"@babel/helpers - typeof";return gp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gp(e)}var _Ce=["type","size","sizeType"];function HE(){return HE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HE.apply(this,arguments)}function C$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function N$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C$(Object(n),!0).forEach(function(r){SCe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SCe(e,t,n){return t=jCe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jCe(e){var t=ECe(e,"string");return gp(t)=="symbol"?t:t+""}function ECe(e,t){if(gp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(gp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CCe(e,t){if(e==null)return{};var n=NCe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NCe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var D8={symbolCircle:eT,symbolCross:GEe,symbolDiamond:QEe,symbolSquare:JEe,symbolStar:tCe,symbolTriangle:nCe,symbolWye:iCe},PCe=Math.PI/180,kCe=function(t){var n="symbol".concat(s0(t));return D8[n]||eT},ACe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*PCe;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},TCe=function(t,n){D8["symbol".concat(s0(t))]=n},tT=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,s=t.sizeType,a=s===void 0?"area":s,c=CCe(t,_Ce),u=N$(N$({},c),{},{type:r,size:o,sizeType:a}),d=function(){var y=kCe(r),b=oCe().type(y).size(ACe(o,a,r));return b()},f=u.className,h=u.cx,p=u.cy,m=Ye(u,!0);return h===+h&&p===+p&&o===+o?$.createElement("path",HE({},m,{className:et("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};tT.registerSymbol=TCe;function Yu(e){"@babel/helpers - typeof";return Yu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yu(e)}function GE(){return GE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GE.apply(this,arguments)}function P$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function RCe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P$(Object(n),!0).forEach(function(r){vp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ICe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,F8(r.key),r)}}function MCe(e,t,n){return t&&ICe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $Ce(e,t,n){return t=lx(t),DCe(e,L8()?Reflect.construct(t,n||[],lx(e).constructor):t.apply(e,n))}function DCe(e,t){if(t&&(Yu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return LCe(e)}function LCe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(L8=function(){return!!e})()}function lx(e){return lx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lx(e)}function FCe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YE(e,t)}function YE(e,t){return YE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},YE(e,t)}function vp(e,t,n){return t=F8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F8(e){var t=BCe(e,"string");return Yu(t)=="symbol"?t:t+""}function BCe(e,t){if(Yu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Yu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kr=32,nT=function(e){function t(){return OCe(this,t),$Ce(this,t,arguments)}return FCe(t,e),MCe(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,o=Kr/2,s=Kr/6,a=Kr/3,c=r.inactive?i:r.color;if(r.type==="plainline")return $.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:o,x2:Kr,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return $.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(o,"h").concat(a,` 645 A`).concat(s,",").concat(s,",0,1,1,").concat(2*a,",").concat(o,` 646 H`).concat(Kr,"M").concat(2*a,",").concat(o,` 647 A`).concat(s,",").concat(s,",0,1,1,").concat(a,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return $.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Kr/8,"h").concat(Kr,"v").concat(Kr*3/4,"h").concat(-Kr,"z"),className:"recharts-legend-icon"});if($.isValidElement(r.legendIcon)){var u=RCe({},r);return delete u.legendIcon,$.cloneElement(r.legendIcon,u)}return $.createElement(tT,{fill:c,cx:o,cy:o,size:Kr,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,o=i.payload,s=i.iconSize,a=i.layout,c=i.formatter,u=i.inactiveColor,d={x:0,y:0,width:Kr,height:Kr},f={display:a==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(p,m){var g=p.formatter||c,y=et(vp(vp({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",p.inactive));if(p.type==="none")return null;var b=ze(p.value)?null:p.value;is(!ze(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var x=p.inactive?u:p.color;return $.createElement("li",GE({className:y,style:f,key:"legend-item-".concat(m)},nx(r.props,p,m)),$.createElement(FE,{width:s,height:s,viewBox:d,style:h},r.renderIcon(p)),$.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},g?g(b,p,m):b))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,s=r.align;if(!i||!i.length)return null;var a={padding:0,margin:0,textAlign:o==="horizontal"?s:"left"};return $.createElement("ul",{className:"recharts-default-legend",style:a},this.renderItems())}}])}(v.PureComponent);vp(nT,"displayName","Legend");vp(nT,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var UCe=Hw;function zCe(){this.__data__=new UCe,this.size=0}var VCe=zCe;function qCe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var KCe=qCe;function WCe(e){return this.__data__.get(e)}var HCe=WCe;function GCe(e){return this.__data__.has(e)}
vendor: 4,520 bytes, line 647
647var YCe=GCe,QCe=Hw,JCe=VA,XCe=qA,ZCe=200;function eNe(e,t){var n=this.__data__;if(n instanceof QCe){var r=n.__data__;if(!JCe||r.length<ZCe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new XCe(r)}return n.set(e,t),this.size=n.size,this}var tNe=eNe,nNe=Hw,rNe=VCe,iNe=KCe,oNe=HCe,sNe=YCe,aNe=tNe;function rf(e){var t=this.__data__=new nNe(e);this.size=t.size}rf.prototype.clear=rNe;rf.prototype.delete=iNe;rf.prototype.get=oNe;rf.prototype.has=sNe;rf.prototype.set=aNe;var B8=rf,lNe="__lodash_hash_undefined__";function cNe(e){return this.__data__.set(e,lNe),this}var uNe=cNe;function dNe(e){return this.__data__.has(e)}var fNe=dNe,hNe=qA,pNe=uNe,mNe=fNe;function cx(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new hNe;++t<n;)this.add(e[t])}cx.prototype.add=cx.prototype.push=pNe;cx.prototype.has=mNe;var U8=cx;function gNe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var z8=gNe;function vNe(e,t){return e.has(t)}var V8=vNe,yNe=U8,xNe=z8,bNe=V8,wNe=1,_Ne=2;function SNe(e,t,n,r,i,o){var s=n&wNe,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,p=n&_Ne?new yNe:void 0;for(o.set(e,t),o.set(t,e);++f<a;){var m=e[f],g=t[f];if(r)var y=s?r(g,m,f,t,e,o):r(m,g,f,e,t,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!xNe(t,function(b,x){if(!bNe(p,x)&&(m===b||i(m,b,n,r,o)))return p.push(x)})){h=!1;break}}else if(!(m===g||i(m,g,n,r,o))){h=!1;break}}return o.delete(e),o.delete(t),h}var q8=SNe,jNe=No,ENe=jNe.Uint8Array,CNe=ENe;function NNe(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var PNe=NNe;function kNe(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var rT=kNe,k$=Bm,A$=CNe,ANe=zA,TNe=q8,RNe=PNe,ONe=rT,INe=1,MNe=2,$Ne="[object Boolean]",DNe="[object Date]",LNe="[object Error]",FNe="[object Map]",BNe="[object Number]",UNe="[object RegExp]",zNe="[object Set]",VNe="[object String]",qNe="[object Symbol]",KNe="[object ArrayBuffer]",WNe="[object DataView]",T$=k$?k$.prototype:void 0,vS=T$?T$.valueOf:void 0;function HNe(e,t,n,r,i,o,s){switch(n){case WNe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case KNe:return!(e.byteLength!=t.byteLength||!o(new A$(e),new A$(t)));case $Ne:case DNe:case BNe:return ANe(+e,+t);case LNe:return e.name==t.name&&e.message==t.message;case UNe:case VNe:return e==t+"";case FNe:var a=RNe;case zNe:var c=r&INe;if(a||(a=ONe),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=MNe,s.set(e,t);var d=TNe(a(e),a(t),r,i,o,s);return s.delete(e),d;case qNe:if(vS)return vS.call(e)==vS.call(t)}return!1}var GNe=HNe;function YNe(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var K8=YNe,QNe=K8,JNe=yr;function XNe(e,t,n){var r=t(e);return JNe(e)?r:QNe(r,n(e))}var ZNe=XNe;function ePe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}var tPe=ePe;function nPe(){return[]}var rPe=nPe,iPe=tPe,oPe=rPe,sPe=Object.prototype,aPe=sPe.propertyIsEnumerable,R$=Object.getOwnPropertySymbols,lPe=R$?function(e){return e==null?[]:(e=Object(e),iPe(R$(e),function(t){return aPe.call(e,t)}))}:oPe,cPe=lPe;function uPe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var dPe=uPe,fPe=As,hPe=Ts,pPe="[object Arguments]";function mPe(e){return hPe(e)&&fPe(e)==pPe}var gPe=mPe,O$=gPe,vPe=Ts,W8=Object.prototype,yPe=W8.hasOwnProperty,xPe=W8.propertyIsEnumerable,bPe=O$(function(){return arguments}())?O$:function(e){return vPe(e)&&yPe.call(e,"callee")&&!xPe.call(e,"callee")},iT=bPe,ux={exports:{}};function wPe(){return!1}var _Pe=wPe;ux.exports;(function(e,t){var n=No,r=_Pe,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===i,a=s?n.Buffer:void 0,c=a?a.isBuffer:void 0,u=c||r;e.exports=u})(ux,ux.exports);var H8=ux.exports,SPe=9007199254740991,jPe=/^(?:0|[1-9]\d*)$/;function EPe(e,t){var n=typeof e;return t=t??SPe,!!t&&(n=="number"||n!="symbol"&&jPe.test(e))&&e>-1&&e%1==0&&e<t}var oT=EPe,CPe=9007199254740991;function NPe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=CPe}var sT=NPe,PPe=As,kPe=sT,APe=Ts,TPe="[object Arguments]",RPe="[object Array]",OPe="[object Boolean]",IPe="[object Date]",MPe="[object Error]",$Pe="[object Function]",DPe="[object Map]",LPe="[object Number]",FPe="[object Object]",BPe="[object RegExp]",UPe="[object Set]",zPe="[object String]",VPe="[object WeakMap]",qPe="[object ArrayBuffer]",KPe="[object DataView]",WPe="[object Float32Array]",HPe="[object Float64Array
647]",GPe="[object Int8Array]",YPe="[object Int16Array]",QPe="[object Int32Array]",JPe="[object Uint8Array]",XPe="[object Uint8ClampedArray]",ZPe="[object Uint16Array]",eke="[object Uint32Array]",Ct={};Ct[WPe]=Ct[HPe]=Ct[GPe]=Ct[YPe]=Ct[QPe]=Ct[JPe]=Ct[XPe]=Ct[ZPe]=Ct[eke]=!0;Ct[TPe]=Ct[RPe]=Ct[qPe]=Ct[OPe]=Ct[KPe]=Ct[IPe]=Ct[MPe]=Ct[$Pe]=Ct[DPe]=Ct[LPe]=Ct[FPe]=Ct[BPe]=Ct[UPe]=Ct[zPe]=Ct[VPe]=!1;function tke(e){return APe(e)&&kPe(e.length)&&!!Ct[PPe(e)]}var nke=tke;function rke(e){return function(t){return e(t)}}var G8=rke,dx={exports:{}};dx.exports;(function(e,t){var n=n8,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();e.exports=a})(dx,dx.exports);var ike=dx.exports,oke=nke,ske=G8,I$=ike,M$=I$&&I$.isTypedArray,ake=M$?ske(M$):oke,Y8=ake,lke=dPe,cke=iT,uke=yr,dke=H8,fke=oT,hke=Y8,pke=Object.prototype,mke=pke.hasOwnProperty;function gke(e,t){var n=uke(e),r=!n&&cke(e),i=!n&&!r&&dke(e),o=!n&&!r&&!i&&hke(e),s=n||r||i||o,a=s?lke(e.length,String):[],c=a.length;for(var u in e)(t||mke.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||fke(u,c)))&&a.push(u);return a}var vke=gke,yke=Object.prototype;function xke(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||yke;return e===n}var bke=xke;function wke(e,t){return function(n){return e(t(n))}}var Q8=wke,_ke=Q8,Ske=_ke(Object.keys,Object),jke=Ske,Eke=bke,Cke=jke,Nke=Object.prototype,Pke=Nke.hasOwnProperty;function kke(e){if(!Eke(e))return Cke(e);var t=[];for(var n in Object(e))Pke.call(e,n)&&n!="constructor"&&t.push(n);return t}var Ake=kke,Tke=UA,Rke=sT;function Oke(e){return e!=null&&Rke(e.length)&&!Tke(e)}var qm=Oke,Ike=vke,Mke=Ake,$ke=qm;function Dke(e){return $ke(e)?Ike(e):Mke(e)}var u0=Dke,Lke=ZNe,Fke=cPe,Bke=u0;function Uke(e){return Lke(e,Bke,Fke)}var zke=Uke,$$=zke,Vke=1,qke=Object.prototype,Kke=qke.hasOwnProperty;function Wke(e,t,n,r,i,o){var s=n&Vke,a=$$(e),c=a.length,u=$$(t),d=u.length;if(c!=d&&!s)return!1;for(var f=c;f--;){var h=a[f];if(!(s?h in t:Kke.call(t,h)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);for(var y=s;++f<c;){h=a[f];var b=e[h],x=t[h];if(r)var w=s?r(x,b,h,t,e,o):r(b,x,h,e,t,o);if(!(w===void 0?b===x||i(b,x,n,r,o):w)){g=!1;break}y||(y=h=="constructor")}if(g&&!y){var S=e.constructor,_=t.constructor;S!=_&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof _=="function"&&_ instanceof _)&&(g=!1)}return o.delete(e),o.delete(t),g}var Hke=Wke,Gke=hc,Yke=No,Qke=Gke(Yke,"DataView"),Jke=Qke,Xke=hc,Zke=No,eAe=Xke(Zke,"Promise"),tAe=eAe,nAe=hc,rAe=No,iAe=nAe(rAe,"Set"),J8=iAe,oAe=hc,sAe=No,aAe=oAe(sAe,"WeakMap"),lAe=aAe,QE=Jke,JE=VA,XE=tAe,ZE=J8,eC=lAe,X8=As,of=i8,D$="[object Map]",cAe="[object Object]",L$="[object Promise]",F$="[object Set]",B$="[object WeakMap]",U$="[object DataView]",uAe=of(QE),dAe=of(JE),fAe=of(XE),hAe=of(ZE),pAe=of(eC),cl=X8;(QE&&cl(new QE(new ArrayBuffer(1)))!=U$||JE&&cl(new JE)!=D$||XE&&cl(XE.resolve())!=L$||ZE&&cl(new ZE)!=F$||eC&&cl(new eC)!=B$)&&(cl=function(e){var t=X8(e),n=t==cAe?e.constructor:void 0,r=n?of(n):"";if(r)switch(r){case uAe:return U$;case dAe:return D$;case fAe:return L$;case hAe:return F$;case pAe:return B$}return t});var mAe=cl,yS=B8,gAe=q8,vAe=GNe,yAe=Hke,z$=mAe,V$=yr,q$=H8,xAe=Y8,bAe=1,K$="[object Arguments]",W$="[object Array]",Qg="[object Object]",wAe=Object.prototype,H$=wAe.hasOwnProperty;function _Ae(e,t,n,r,i,o){var s=V$(e),a=V$(t),c=s?W$:z$(e),u=a?W$:z$(t);c=c==K$?Qg:c,u=u==K$?Qg:u;var d=c==Qg,f=u==Qg,h=c==u;if(h&&q$(e)){if(!q$(t))return!1;s=!0,d=!1}if(h&&!d)return o||(o=new yS),s||xAe(e)?gAe(e,t,n,r,i,o):vAe(e,t,c,n,r,i,o);if(!(n&bAe)){var p=d&&H$.call(e,"__wrapped__"),m=f&&H$.call(t,"__wrapped__");
vendor: 2,077 bytes, line 647
647if(p||m){var g=p?e.value():e,y=m?t.value():t;return o||(o=new yS),i(g,y,n,r,o)}}return h?(o||(o=new yS),yAe(e,t,n,r,i,o)):!1}var SAe=_Ae,jAe=SAe,G$=Ts;function Z8(e,t,n,r,i){return e===t?!0:e==null||t==null||!G$(e)&&!G$(t)?e!==e&&t!==t:jAe(e,t,n,r,Z8,i)}var aT=Z8,EAe=B8,CAe=aT,NAe=1,PAe=2;function kAe(e,t,n,r){var i=n.length,o=i,s=!r;if(e==null)return!o;for(e=Object(e);i--;){var a=n[i];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=n[i];var c=a[0],u=e[c],d=a[1];if(s&&a[2]){if(u===void 0&&!(c in e))return!1}else{var f=new EAe;if(r)var h=r(u,d,c,e,t,f);if(!(h===void 0?CAe(d,u,NAe|PAe,r,f):h))return!1}}return!0}var AAe=kAe,TAe=Ya;function RAe(e){return e===e&&!TAe(e)}var eG=RAe,OAe=eG,IAe=u0;function MAe(e){for(var t=IAe(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,OAe(i)]}return t}var $Ae=MAe;function DAe(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var tG=DAe,LAe=AAe,FAe=$Ae,BAe=tG;function UAe(e){var t=FAe(e);return t.length==1&&t[0][2]?BAe(t[0][0],t[0][1]):function(n){return n===e||LAe(n,e,t)}}var zAe=UAe;function VAe(e,t){return e!=null&&t in Object(e)}var qAe=VAe,KAe=c8,WAe=iT,HAe=yr,GAe=oT,YAe=sT,QAe=Yw;function JAe(e,t,n){t=KAe(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var s=QAe(t[r]);if(!(o=e!=null&&n(e,s)))break;e=e[s]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&YAe(i)&&GAe(s,i)&&(HAe(e)||WAe(e)))}var XAe=JAe,ZAe=qAe,eTe=XAe;function tTe(e,t){return e!=null&&eTe(e,t,ZAe)}var nTe=tTe,rTe=aT,iTe=u8,oTe=nTe,sTe=BA,aTe=eG,lTe=tG,cTe=Yw,uTe=1,dTe=2;function fTe(e,t){return sTe(e)&&aTe(t)?lTe(cTe(e),t):function(n){var r=iTe(n,e);return r===void 0&&r===t?oTe(n,e):rTe(t,r,uTe|dTe)}}var hTe=fTe;function pTe(e){return e}var sf=pTe;function mTe(e){return function(t){return t?.[e]}}var gTe=mTe,vTe=HA;function yTe(e){return function(t){return vTe(t,e)}}var xTe=yTe,bTe=gTe,wTe=xTe,_Te=BA,STe=Yw;function jTe(e){return _Te(e)?bTe(STe(e)):wTe(e)}var ETe=jTe,CTe=zAe,NTe=hTe,PTe=sf,kTe=yr,ATe=ETe;function TTe(e){return typeof e=="function"?e:e==null?PTe:typeof e=="object"?kTe(e)?NTe(e[0],e[1]):CTe
647(e):ATe(e)}var Qa=TTe;function RTe(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var nG=RTe;function OTe(e){return e!==e}var ITe=OTe;function MTe(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var $Te=MTe,DTe=nG,LTe=ITe,FTe=$Te;function BTe(e,t,n){return t===t?FTe(e,t,n):DTe(e,LTe,n)}var UTe=BTe,zTe=UTe;function VTe(e,t){var n=e==null?0:e.length;return!!n&&zTe(e,t,0)>-1}var qTe=VTe;function KTe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var WTe=KTe;function HTe(){}var GTe=HTe,xS=J8,YTe=GTe,QTe=rT,JTe=1/0,XTe=xS&&1/QTe(new xS([,-0]))[1]==JTe?function(e){return new xS(e)}:YTe,ZTe=XTe,eRe=U8,tRe=qTe,nRe=WTe,rRe=V8,iRe=ZTe,oRe=rT,sRe=200;function aRe(e,t,n){var r=-1,i=tRe,o=e.length,s=!0,a=[],c=a;if(n)s=!1,i=nRe;else if(o>=sRe){var u=t?null:iRe(e);if(u)return oRe(u);s=!1,i=rRe,c=new eRe}else c=t?[]:a;e:for(;++r<o;){var d=e[r],f=t?t(d):d;if(d=n||d!==0?d:0,s&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;t&&c.push(f),a.push(d)}else i(c,f,n)||(c!==a&&c.push(f),a.push(d))}return a}var lRe=aRe,cRe=Qa,uRe=lRe;function dRe(e,t){return e&&e.length?uRe(e,cRe(t)):[]}var fRe=dRe;const Y$=ct(fRe);function rG(e,t,n){return t===!0?Y$(e,n):ze(t)?Y$(e,t):e}function Qu(e){"@babel/helpers - typeof";return Qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qu(e)}var hRe=["ref"];function Q$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q$(Object(n),!0).forEach(function(r){d0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oG(r.key),r)}}function mRe(e,t,n){return t&&J$(e.prototype,t),n&&J$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function gRe(e,t,n){return t=fx(t),vRe(e,iG()?Reflect.construct(t,n||[],fx(e).constructor):t.apply(e,n))}function vRe(e,t){if(t&&(Qu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yRe(e)}function yRe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iG=function(){return!!e})()}function fx(e){return fx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fx(e)}function xRe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tC(e,t)}function tC(e,t){return tC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tC(e,t)}function d0(e,t,n){return t=oG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oG(e){var t=bRe(e,"string");return Qu(t)=="symbol"?t:t+""}function bRe(e,t){if(Qu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Qu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wRe(e,t){if(e==null)return{};var n=_Re(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _Re(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function SRe(e){return e.value}function jRe(e,t){if($.isValidElement(e))return $.cloneElement(e,t);if(typeof e=="function")return $.createElement(e,t);t.ref;var n=wRe(t,hRe);
647return $.createElement(nT,n)}var X$=1,Rl=function(e){function t(){var n;pRe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=gRe(this,t,[].concat(i)),d0(n,"lastBoundingBox",{width:-1,height:-1}),n}return xRe(t,e),mRe(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>X$||Math.abs(i.height-this.lastBoundingBox.height)>X$)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Lo({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,s=i.align,a=i.verticalAlign,c=i.margin,u=i.chartWidth,d=i.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(s==="center"&&o==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(a==="middle"){var m=this.getBBoxSnapshot();h={top:((d||0)-m.height)/2}}else h=a==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Lo(Lo({},f),h)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,s=i.width,a=i.height,c=i.wrapperStyle,u=i.payloadUniqBy,d=i.payload,f=Lo(Lo({position:"absolute",width:s||"auto",height:a||"auto"},this.getDefaultPosition(c)),c);return $.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){r.wrapperNode=p}},jRe(o,Lo(Lo({},this.props),{},{payload:rG(d,u,SRe)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Lo(Lo({},this.defaultProps),r.props),s=o.layout;return s==="vertical"&&fe(r.props.height)?{height:r.props.height}:s==="horizontal"?{width:r.props.width||i}:null}}])}(v.PureComponent);d0(Rl,"displayName","Legend");d0(Rl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Z$=Bm,ERe=iT,CRe=yr,eD=Z$?Z$.isConcatSpreadable:void 0;function NRe(e){return CRe(e)||ERe(e)||!!(eD&&e&&e[eD])}var PRe=NRe,kRe=K8,ARe=PRe;function sG(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=ARe),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?sG(a,t-1,n,r,i):kRe(i,a):r||(i[i.length]=a)}return i}var aG=sG;function TRe(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var c=s[e?a:++i];if(n(o[c],c,o)===!1)break}return t}}var RRe=TRe,ORe=RRe,IRe=ORe(),MRe=IRe,$Re=MRe,DRe=u0;function LRe(e,t){return e&&$Re(e,t,DRe)}var lG=LRe,FRe=qm;function BRe(e,t){return function(n,r){if(n==null)return n;if(!FRe(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Object(n);(t?o--:++o<i)&&r(s[o],o,s)!==!1;);return n}}var URe=BRe,zRe=lG,VRe=URe,qRe=VRe(zRe),lT=qRe,KRe=lT,WRe=qm;function HRe(e,t){var n=-1,r=WRe(e)?Array(e.length):[];return KRe(e,function(i,o,s){r[++n]=t(i,o,s)}),r}var cG=HRe;function GRe(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var YRe=GRe,tD=Xd;function QRe(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,o=tD(e),s=t!==void 0,a=t===null,c=t===t,u=tD(t);if(!a&&!u&&!o&&e>t||o&&s&&c&&!a&&!u||r&&s&&c||!n&&c||!i)return 1;if(!r&&!o&&!u&&e<t||u&&n&&i&&!r&&!o||a&&n&&i||!s&&i||!c)return-1}return 0}var JRe=QRe,XRe=JRe;function ZRe(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var c=XRe(i[r],o[r]);if(c){if(r>=a)return c;var u=n[r];return c*(u=="desc"?-1:1)}}return e.index-t.index}var eOe=ZRe,bS=WA,tOe=HA,nOe=Qa,rOe=cG,iOe=YRe,oOe=G8,sOe=eOe,aOe=sf,lOe=yr;function cOe(e,t,n){t.length?t=bS(t,function(o){return lOe(o)?function(s){return tOe(s,o.length===1?o[0]:o)}:o}):t=[aOe];var r=-1;t=bS(t,oOe(nOe));var i=rOe(e,function(o,s,a){var c=bS(t,function(u){return u(o)});return{criteria:c,index:++r,value:o}});return iOe(i,function(o,s){return sOe(o,s,n)})}var uOe=cOe;function dOe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var fOe=dOe,hOe=fOe,nD=Math.max;function pOe(e,t,n){return t=nD(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=nD(r.length-t,0),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),hOe(e,this,a)}}var mOe=pOe;function gOe(e){return function(){return e}}var vOe=gOe,yOe=hc,xOe=function(){try{var e=yOe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),uG=xOe,bOe=vOe,rD=uG,wOe=sf,_Oe=rD?function(e,t){return rD(e,"toString",{configurable:!0,enumerable:!1,value:bOe(t),writable:!0})}:wOe,SOe=_Oe,jOe=800,EOe=16,COe=Date.now;function NOe(e){var t=0,n=0;return function(){var r=COe(),i=EOe-(r-n);if(n=r,i>0){if(++t>=jOe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var POe=NOe,kOe=SOe,AOe=POe,TOe=AOe(kOe),ROe=TOe,OOe=sf,IOe=mOe,MOe=ROe;function $Oe(e,t){return MOe(IOe(e,t,OOe),e+"")}var DOe=$Oe,LOe=zA,FOe=qm,BOe=oT,UOe=Ya;function zOe(e,t,n){if(!UOe(n))return!1;var r=typeof t;return(r=="number"?FOe(n)&&BOe(t,n.length):r=="string"&&t in n)?LOe(n[t],e):!1}var f0=zOe,VOe=aG,qOe=uOe,KOe=DOe,iD=f0,WOe=KOe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&iD(e,t[0],t[1])?t=[]:n>2&&iD(t[0],t[1],t[2])&&(t=[t[0]]),qOe(e,VOe(t,1),[])}),HOe=WOe;const cT=ct(HOe);function yp(e){"@babel/helpers - typeof";return yp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yp(e)}function nC(){return nC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nC.apply(this,arguments)}function GOe(e,t){return XOe(e)||JOe(e,t)||QOe(e,t)||YOe()}
vendor: 10,738 bytes, lines 647-648
647function YOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 648In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QOe(e,t){if(e){if(typeof e=="string")return oD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oD(e,t)}}function oD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function JOe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function XOe(e){if(Array.isArray(e))return e}function sD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sD(Object(n),!0).forEach(function(r){ZOe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZOe(e,t,n){return t=eIe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eIe(e){var t=tIe(e,"string");return yp(t)=="symbol"?t:t+""}function tIe(e,t){if(yp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(yp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nIe(e){return Array.isArray(e)&&cn(e[0])&&cn(e[1])?e.join(" ~ "):e}var rIe=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,o=i===void 0?{}:i,s=t.itemStyle,a=s===void 0?{}:s,c=t.labelStyle,u=c===void 0?{}:c,d=t.payload,f=t.formatter,h=t.itemSorter,p=t.wrapperClassName,m=t.labelClassName,g=t.label,y=t.labelFormatter,b=t.accessibilityLayer,x=b===void 0?!1:b,w=function(){if(d&&d.length){var A={padding:0,margin:0},L=(h?cT(d,h):d).map(function(R,D){if(R.type==="none")return null;var O=wS({display:"block",paddingTop:4,paddingBottom:4,color:R.color||"#000"},a),F=R.formatter||f||nIe,T=R.value,M=R.name,V=T,B=M;if(F&&V!=null&&B!=null){var I=F(T,M,R,D,d);if(Array.isArray(I)){var z=GOe(I,2);V=z[0],B=z[1]}else V=I}return $.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:O},cn(B)?$.createElement("span",{className:"recharts-tooltip-item-name"},B):null,cn(B)?$.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,$.createElement("span",{className:"recharts-tooltip-item-value"},V),$.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return $.createElement("ul",{className:"recharts-tooltip-item-list",style:A},L)}return null},S=wS({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),_=wS({margin:0},u),j=!Ve(g),E=j?g:"",C=et("recharts-default-tooltip",p),N=et("recharts-tooltip-label",m);j&&y&&d!==void 0&&d!==null&&(E=y(g,d));var k=x?{role:"status","aria-live":"assertive"}:{};return $.createElement("div",nC({className:C,style:S},k),$.createElement("p",{className:N,style:_},$.isValidElement(E)?E:"".concat(E)),w())};function xp(e){"@babel/helpers - typeof";return xp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xp(e)}function Jg(e,t,n){return t=iIe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iIe(e){var t=oIe(e,"string");return xp(t)=="symbol"?t:t+""}function oIe(e,t){if(xp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(xp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Df="recharts-tooltip-wrapper",sIe={visibility:"hidden"};function aIe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return et(Df,Jg(Jg(Jg(Jg({},"".concat(Df,"-right"),fe(n)&&t&&fe(t.x)&&n>=t.x),"".concat(Df,"-left"),fe(n)&&t&&fe(t.x)&&n<t.x),"".concat(Df,"-bottom"),fe(r)&&t&&fe(t.y)&&r>=t.y),"".concat(Df,"-top"),fe(r)&&t&&fe(t.y)&&r<t.y))}function aD(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,o=e.position,s=e.reverseDirection,a=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(o&&fe(o[r]))return o[r];var d=n[r]-a-i,f=n[r]+i;if(t[r])return s[r]?d:f;if(s[r]){var h=d,p=c[r];return h<p?Math.max(f,c[r]):Math.max(d,c[r])}var m=f+a,g=c[r]+u;return m>g?Math.max(d,c[r]):Math.max(f,c[r])}function lIe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function cIe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,s=e.tooltipBox,a=e.useTranslate3d,c=e.viewBox,u,d,f;return s.height>0&&s.width>0&&n?(d=aD({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),f=aD({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),u=lIe({translateX:d,translateY:f,useTranslate3d:a})):u=sIe,{cssProperties:u,cssClasses:aIe({translateX:d,translateY:f,coordinate:n})}}function Ju(e){"@babel/helpers - typeof";return Ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ju(e)}function lD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lD(Object(n),!0).forEach(function(r){iC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dIe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fG(r.key),r)}}function fIe(e,t,n){return t&&dIe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hIe(e,t,n){return t=hx(t),pIe(e,dG()?Reflect.construct(t,n||[],hx(e).constructor):t.apply(e,n))}function pIe(e,t){if(t&&(Ju(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mIe(e)}function mIe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dG=function(){return!!e})()}function hx(e){return hx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hx(e)}function gIe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rC(e,t)}function rC(e,t){return rC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},rC(e,t)}function iC(e,t,n){return t=fG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fG(e){var t=vIe(e,"string");return Ju(t)=="symbol"?t:t+""}function vIe(e,t){if(Ju(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ju(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uD=1,yIe=function(e){function t(){var n;uIe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=hIe(this,t,[].concat(i)),iC(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),iC(n,"handleKeyDown",function(s){if(s.key==="Escape"){var a,c,u,d;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(a=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&a!==void 0?a:0,y:(u=(d=n.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&u!==void 0?u:0}})}}),n}return gIe(t,e),fIe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>uD||Math.abs(r.height-this.state.lastBoundingBox.height)>uD)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,s=i.allowEscapeViewBox,a=i.animationDuration,c=i.animationEasing,u=i.children,d=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,m=i.position,g=i.reverseDirection,y=i.useTranslate3d,b=i.viewBox,x=i.wrapperStyle,w=cIe({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:p,position:m,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:b}
648),S=w.cssClasses,_=w.cssProperties,j=cD(cD({transition:h&&o?"transform ".concat(a,"ms ").concat(c):void 0},_),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&f?"visible":"hidden",position:"absolute",top:0,left:0},x);return $.createElement("div",{tabIndex:-1,className:S,style:j,ref:function(C){r.wrapperNode=C}},u)}}])}(v.PureComponent),xIe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},os={isSsr:xIe(),get:function(t){return os[t]},set:function(t,n){if(typeof t=="string")os[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){os[i]=t[i]})}}};function Xu(e){"@babel/helpers - typeof";return Xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xu(e)}function dD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dD(Object(n),!0).forEach(function(r){uT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wIe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pG(r.key),r)}}function _Ie(e,t,n){return t&&wIe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function SIe(e,t,n){return t=px(t),jIe(e,hG()?Reflect.construct(t,n||[],px(e).constructor):t.apply(e,n))}function jIe(e,t){if(t&&(Xu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return EIe(e)}function EIe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hG=function(){return!!e})()}function px(e){return px=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},px(e)}function CIe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oC(e,t)}function oC(e,t){return oC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},oC(e,t)}function uT(e,t,n){return t=pG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pG(e){var t=NIe(e,"string");return Xu(t)=="symbol"?t:t+""}function NIe(e,t){if(Xu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PIe(e){return e.dataKey}function kIe(e,t){return $.isValidElement(e)?$.cloneElement(e,t):typeof e=="function"?$.createElement(e,t):$.createElement(rIe,t)}var rr=function(e){function t(){return bIe(this,t),SIe(this,t,arguments)}return CIe(t,e),_Ie(t,[{key:"render",value:function(){var r=this,i=this.props,o=i.active,s=i.allowEscapeViewBox,a=i.animationDuration,c=i.animationEasing,u=i.content,d=i.coordinate,f=i.filterNull,h=i.isAnimationActive,p=i.offset,m=i.payload,g=i.payloadUniqBy,y=i.position,b=i.reverseDirection,x=i.useTranslate3d,w=i.viewBox,S=i.wrapperStyle,_=m??[];f&&_.length&&(_=rG(m.filter(function(E){return E.value!=null&&(E.hide!==!0||r.props.includeHidden)}),g,PIe));var j=_.length>0;return $.createElement(yIe,{allowEscapeViewBox:s,animationDuration:a,animationEasing:c,isAnimationActive:h,active:o,coordinate:d,hasPayload:j,offset:p,position:y,reverseDirection:b,useTranslate3d:x,viewB
648ox:w,wrapperStyle:S},kIe(u,fD(fD({},this.props),{},{payload:_})))}}])}(v.PureComponent);uT(rr,"displayName","Tooltip");uT(rr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!os.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var AIe=No,TIe=function(){return AIe.Date.now()},RIe=TIe,OIe=/\s/;function IIe(e){for(var t=e.length;t--&&OIe.test(e.charAt(t)););return t}var MIe=IIe,$Ie=MIe,DIe=/^\s+/;function LIe(e){return e&&e.slice(0,$Ie(e)+1).replace(DIe,"")}var FIe=LIe,BIe=FIe,hD=Ya,UIe=Xd,pD=NaN,zIe=/^[-+]0x[0-9a-f]+$/i,VIe=/^0b[01]+$/i,qIe=/^0o[0-7]+$/i,KIe=parseInt;function WIe(e){if(typeof e=="number")return e;if(UIe(e))return pD;if(hD(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=hD(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=BIe(e);var n=VIe.test(e);return n||qIe.test(e)?KIe(e.slice(2),n?2:8):zIe.test(e)?pD:+e}var mG=WIe,HIe=Ya,_S=RIe,mD=mG,GIe="Expected a function",YIe=Math.max,QIe=Math.min;function JIe(e,t,n){var r,i,o,s,a,c,u=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(GIe);t=mD(t)||0,HIe(n)&&(d=!!n.leading,f="maxWait"in n,o=f?YIe(mD(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(j){var E=r,C=i;return r=i=void 0,u=j,s=e.apply(C,E),s}function m(j){return u=j,a=setTimeout(b,t),d?p(j):s}function g(j){var E=j-c,C=j-u,N=t-E;return f?QIe(N,o-C):N}function y(j){var E=j-c,C=j-u;return c===void 0||E>=t||E<0||f&&C>=o}function b(){var j=_S();if(y(j))return x(j);a=setTimeout(b,g(j))}function x(j){return a=void 0,h&&r?p(j):(r=i=void 0,s)}function w(){a!==void 0&&clearTimeout(a),u=0,r=c=i=a=void 0}function S(){return a===void 0?s:x(_S())}function _(){var j=_S(),E=y(j);
vendor: 12,591 bytes, lines 648-654
648if(r=arguments,i=this,c=j,E){if(a===void 0)return m(c);if(f)return clearTimeout(a),a=setTimeout(b,t),p(c)}return a===void 0&&(a=setTimeout(b,t)),s}return _.cancel=w,_.flush=S,_}var XIe=JIe,ZIe=XIe,eMe=Ya,tMe="Expected a function";function nMe(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(tMe);return eMe(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ZIe(e,t,{leading:r,maxWait:t,trailing:i})}var rMe=nMe;const gG=ct(rMe);function bp(e){"@babel/helpers - typeof";return bp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bp(e)}function gD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gD(Object(n),!0).forEach(function(r){iMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iMe(e,t,n){return t=oMe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oMe(e){var t=sMe(e,"string");return bp(t)=="symbol"?t:t+""}function sMe(e,t){if(bp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(bp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aMe(e,t){return dMe(e)||uMe(e,t)||cMe(e,t)||lMe()}function lMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 649In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cMe(e,t){if(e){if(typeof e=="string")return vD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vD(e,t)}}function vD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uMe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function dMe(e){if(Array.isArray(e))return e}var Km=v.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,o=e.width,s=o===void 0?"100%":o,a=e.height,c=a===void 0?"100%":a,u=e.minWidth,d=u===void 0?0:u,f=e.minHeight,h=e.maxHeight,p=e.children,m=e.debounce,g=m===void 0?0:m,y=e.id,b=e.className,x=e.onResize,w=e.style,S=w===void 0?{}:w,_=v.useRef(null),j=v.useRef();j.current=x,v.useImperativeHandle(t,function(){return Object.defineProperty(_.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),_.current},configurable:!0})});var E=v.useState({containerWidth:i.width,containerHeight:i.height}),C=aMe(E,2),N=C[0],k=C[1],P=v.useCallback(function(L,R){k(function(D){var O=Math.round(L),F=Math.round(R);return D.containerWidth===O&&D.containerHeight===F?D:{containerWidth:O,containerHeight:F}})},[]);v.useEffect(function(){var L=function(M){var V,B=M[0].contentRect,I=B.width,z=B.height;P(I,z),(V=j.current)===null||V===void 0||V.call(j,I,z)};g>0&&(L=gG(L,g,{trailing:!0,leading:!1}));var R=new ResizeObserver(L),D=_.current.getBoundingClientRect(),O=D.width,F=D.height;return P(O,F),R.observe(_.current),function(){R.disconnect()}},[P,g]);var A=v.useMemo(function(){var L=N.containerWidth,R=N.containerHeight;if(L<0||R<0)return null;is(_l(s)||_l(c),`The width(%s) and height(%s) are both fixed numbers, 650 maybe you don't need to use a ResponsiveContainer.`,s,c),is(!n||n>0,"The aspect(%s) must be greater than zero.",n);var D=_l(s)?L:s,O=_l(c)?R:c;n&&n>0&&(D?O=D/n:O&&(D=O*n),h&&O>h&&(O=h)),is(D>0||O>0,`The width(%s) and height(%s) of chart should be greater than 0, 651 please check the style of container, or the props width(%s) and height(%s), 652 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 653 height and width.`,D,O,s,c,d,f,n);var F=!Array.isArray(p)&&rs(p.type).endsWith("Chart");return $.Children.map(p,function(T){return $.isValidElement(T)?v.cloneElement(T,Xg({width:D,height:O},F?{style:Xg({height:"100%",width:"100%",maxHeight:O,maxWidth:D},T.props.style)}:{})):T})},[n,p,c,h,f,d,N,s]);return $.createElement("div",{id:y?"".concat(y):void 0,className:et("recharts-responsive-container",b),style:Xg(Xg({},S),{},{width:s,height:c,minWidth:d,minHeight:f,maxHeight:h}),ref:_},A)}),vG=function(t){return null};vG.displayName="Cell";function wp(e){"@babel/helpers - typeof";return wp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wp(e)}function yD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yD(Object(n),!0).forEach(function(r){fMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fMe(e,t,n){return t=hMe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hMe(e){var t=pMe(e,"string");return wp(t)=="symbol"?t:t+""}function pMe(e,t){if(wp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(wp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ec={widthCache:{},cacheCount:0},mMe=2e3,gMe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},xD="recharts_measurement_span";function vMe(e){var t=sC({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var kh=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||os.isSsr)return{width:0,height:0};var r=vMe(n),i=JSON.stringify({text:t,copyStyle:r});if(Ec.widthCache[i])return Ec.widthCache[i];try{var o=document.getElementById(xD);o||(o=document.createElement("span"),o.setAttribute("id",xD),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var s=sC(sC({},gMe),r);Object.assign(o.style,s),o.textContent="".concat(t);var a=o.getBoundingClientRect(),c={width:a.width,height:a.height};return Ec.widthCache[i]=c,++Ec.cacheCount>mMe&&(Ec.cacheCount=0,Ec.widthCache={}),c}catch{return{width:0,height:0}}},yMe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function _p(e){"@babel/helpers - typeof";return _p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_p(e)}function mx(e,t){return _Me(e)||wMe(e,t)||bMe(e,t)||xMe()}function xMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 654In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bMe(e,t){if(e){if(typeof e=="string")return bD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bD(e,t)}}function bD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wMe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function _Me(e){if(Array.isArray(e))return e}function SMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EMe(r.key),r)}}function jMe(e,t,n){return t&&wD(e.prototype,t),n&&wD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function EMe(e){var t=CMe(e,"string");return _p(t)=="symbol"?t:t+""}function CMe(e,t){if(_p(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_p(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _D=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,SD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,NMe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,PMe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,yG={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},kMe=Object.keys(yG),Zc="NaN";function AMe(e,t){return e*yG[t]}var Zg=function(){function e(t,n){SMe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!NMe.test(n)&&(this.num=NaN,this.unit=""),kMe.includes(n)&&(this.num=AMe(t,n),this.unit="px")}return jMe(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=PMe.exec(n))!==null&&r!==void 0?r:[],o=mx(i,3),s=o[1],a=o[2];return new e(parseFloat(s),a??"")}}])}();function xG(e){if(e.includes(Zc))return Zc;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=_D.exec(t))!==null&&n!==void 0?n:[],i=mx(r,4),o=i[1],s=i[2],a=i[3],c=Zg.parse(o??""),u=Zg.parse(a??""),d=s==="*"?c.multiply(u):c.divide(u);if(d.isNaN())return Zc;t=t.replace(_D,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,h=(f=SD.exec(t))!==null&&f!==void 0?f:[],p=mx(h,4),m=p[1],g=p[2],y=p[3],b=Zg.parse(m??""),x=Zg.parse(y??""),w=g==="+"?b.add(x):b.subtract(x);if(w.isNaN())return Zc;t=t.replace(SD,w.toString())}return t}var jD=/\(([^()]*)\)/;function TMe(e){for(var t=e;t.includes("(");){var n=jD.exec(t),r=mx(n,2),i=r[1];t=t.replace(jD,xG(i))}return t}function RMe(e){var t=e.replace(/\s+/g,"");return t=TMe(t),t=xG(t),t}function OMe(e){try{return RMe(e)}catch{return Zc}}function SS(e){var t=OMe(e.slice(5,-1));return t===Zc?"":t}var IMe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],MMe=["dx","dy","angle","className","breakAll"];function aC(){return aC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aC.apply(this,arguments)}function ED(e,t){if(e==null)return{};var n=$Me(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $Me(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function CD(e,t){return BMe(e)||FMe(e,t)||LMe(e,t)||DMe()}
654function DMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 655In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LMe(e,t){if(e){if(typeof e=="string")return ND(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ND(e,t)}}function ND(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FMe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function BMe(e){if(Array.isArray(e))return e}var bG=/[ \f\n\r\t\v\u2028\u2029]+/,wG=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var o=[];Ve(n)||(r?o=n.toString().split(""):o=n.toString().split(bG));var s=o.map(function(c){return{word:c,width:kh(c,i).width}}),a=r?0:kh(" ",i).width;return{wordsWithComputedWidth:s,spaceWidth:a}}catch{return null}},UMe=function(t,n,r,i,o){var s=t.maxLines,a=t.children,c=t.style,u=t.breakAll,d=fe(s),f=a,h=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(O,F){var T=F.word,M=F.width,V=O[O.length-1];if(V&&(i==null||o||V.width+M+r<Number(i)))V.words.push(T),V.width+=M+r;else{var B={words:[T],width:M};O.push(B)}return O},[])},p=h(n),m=function(D){return D.reduce(function(O,F){return O.width>F.width?O:F})};if(!d)return p;for(var g="â¦",y=function(D){var O=f.slice(0,D),F=wG({breakAll:u,style:c,children:O+g}).wordsWithComputedWidth,T=h(F),M=T.length>s||m(T).width>Number(i);return[M,T]},b=0,x=f.length-1,w=0,S;b<=x&&w<=f.length-1;){var _=Math.floor((b+x)/2),j=_-1,E=y(j),C=CD(E,2),N=C[0],k=C[1],P=y(_),A=CD(P,1),L=A[0];if(!N&&!L&&(b=_+1),N&&L&&(x=_-1),!N&&L){S=k;break}w++}return S||p},PD=function(t){var n=Ve(t)?[]:t.toString().split(bG);return[{words:n}]},zMe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,s=t.breakAll,a=t.maxLines;if((n||r)&&!os.isSsr){var c,u,d=wG({breakAll:s,children:i,style:o});if(d){var f=d.wordsWithComputedWidth,h=d.spaceWidth;c=f,u=h}else return PD(i);return UMe({breakAll:s,children:i,maxLines:a,style:o},c,u,n,r)}return PD(i)},kD="#808080",gx=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,s=t.lineHeight,a=s===void 0?"1em":s,c=t.capHeight,u=c===void 0?"0.71em":c,d=t.scaleToFit,f=d===void 0?!1:d,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,g=m===void 0?"end":m,y=t.fill,b=y===void 0?kD:y,x=ED(t,IMe),w=v.useMemo(function(){return zMe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:f,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,f,x.style,x.width]),S=x.dx,_=x.dy,j=x.angle,E=x.className,C=x.breakAll,N=ED(x,MMe);if(!cn(r)||!cn(o))return null;var k=r+(fe(S)?S:0),P=o+(fe(_)?_:0),A;switch(g){case"start":A=SS("calc(".concat(u,")"));break;case"middle":A=SS("calc(".concat((w.length-1)/2," * -").concat(a," + (").concat(u," / 2))"));break;default:A=SS("calc(".concat(w.length-1," * -").concat(a,")"));break}var L=[];if(f){var R=w[0].width,D=x.width;L.push("scale(".concat((fe(D)?D/R:1)/R,")"))}return j&&L.push("rotate(".concat(j,", ").concat(k,", ").concat(P,")")),L.length&&(N.transform=L.join(" ")),$.createElement("text",aC({},Ye(N,!0),{x:k,y:P,className:et("recharts-text",E),textAnchor:p,fill:b.includes("url")?kD:b}),w.map(function(O,F){var T=O.words.join(C?"":" ");return $.createElement("tspan",{x:k,dy:F===0?A:a,key:"".concat(T,"-").concat(F)},T)}))};function wa(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function VMe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function _G(e){let t,n,r;e.length!==2?(t=wa,n=(a,c)=>wa(e(a),c),r=(a,c)=>e(a)-c):(t=e===wa||e===VMe?e:qMe,n=e,r=e);function i(a,c,u=0,d=a.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;
655n(a[f],c)<0?u=f+1:d=f}while(u<d)}return u}function o(a,c,u=0,d=a.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;n(a[f],c)<=0?u=f+1:d=f}while(u<d)}return u}function s(a,c,u=0,d=a.length){const f=i(a,c,u,d-1);return f>u&&r(a[f-1],c)>-r(a[f],c)?f-1:f}return{left:i,center:s,right:o}}function qMe(){return 0}function SG(e){return e===null?NaN:+e}function*KMe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const WMe=_G(wa),Wm=WMe.right;_G(SG).center;class AD extends Map{constructor(t,n=YMe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(TD(this,t))}has(t){return super.has(TD(this,t))}set(t,n){return super.set(HMe(this,t),n)}delete(t){return super.delete(GMe(this,t))}}function TD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function HMe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function GMe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function YMe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function QMe(e=wa){if(e===wa)return jG;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function jG(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const JMe=Math.sqrt(50),XMe=Math.sqrt(10),ZMe=Math.sqrt(2);function vx(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=JMe?10:o>=XMe?5:o>=ZMe?2:1;let a,c,u;return i<0?(u=Math.pow(10,-i)/s,a=Math.round(e*u),c=Math.round(t*u),a/u<e&&++a,c/u>t&&--c,u=-u):(u=Math.pow(10,i)*s,a=Math.round(e/u),c=Math.round(t/u),a*u<e&&++a,c*u>t&&--c),c<a&&.5<=n&&n<2?vx(e,t,n*2):[a,c,u]}function lC(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,s]=r?vx(t,e,n):vx(e,t,n);if(!(o>=i))return[];const a=o-i+1,c=new Array(a);if(r)if(s<0)for(let u=0;u<a;++u)c[u]=(o-u)/-s;else for(let u=0;u<a;++u)c[u]=(o-u)*s;else if(s<0)for(let u=0;u<a;++u)c[u]=(i+u)/-s;else for(let u=0;u<a;++u)c[u]=(i+u)*s;return c}function cC(e,t,n){return t=+t,e=+e,n=+n,vx(e,t,n)[2]}function e2e(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?cC(t,e,n):cC(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function RD(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function OD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function EG(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?jG:QMe(i);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,d=Math.log(c),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),p=Math.max(n,Math.floor(t-u*f/c+h)),m=Math.min(r,Math.floor(t+(c-u)*f/c+h));EG(e,t,p,m,i)}const o=e[t];let s=n,a=r;for(Lf(e,n,t),i(e[r],o)>0&&Lf(e,n,r);s<a;){for(Lf(e,s,a),++s,--a;i(e[s],o)<0;)++s;for(;i(e[a],o)>0;)--a}i(e[n],o)===0?Lf(e,n,a):(++a,Lf(e,a,r)),a<=t&&(n=a+1),t<=a&&(r=a-1)}return e}function Lf(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function t2e(e,t,n){if(e=Float64Array.from(KMe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return OD(e);if(t>=1)return RD(e);var r,i=(r-1)*t,o=Math.floor(i),s=RD(EG(e,o).subarray(0,o+1)),a=OD(e.subarray(o+1));return s+(a-s)*(i-o)}}function n2e(e,t,n=SG){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),s=+n(e[o],o,e),a=+n(e[o+1],o+1,e);return s+(a-s)*(i-o)}}function r2e(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function ci(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Rs(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const uC=Symbol("implicit");function dT(){var e=new AD,t=[],n=[],r=uC;function i(o){let s=e.get(o);if(s===void 0){if(r!==uC)return r;e.set(o,s=t.push(o)-1)}return n[s%n.length]}
vendor: 6,830 bytes, line 655
655return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new AD;for(const s of o)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return dT(t,n).unknown(r)},ci.apply(i,arguments),i}function Sp(){var e=dT().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,s,a=!1,c=0,u=0,d=.5;delete e.unknown;function f(){var h=t().length,p=i<r,m=p?i:r,g=p?r:i;o=(g-m)/Math.max(1,h-c+u*2),a&&(o=Math.floor(o)),m+=(g-m-o*(h-c))*d,s=o*(1-c),a&&(m=Math.round(m),s=Math.round(s));var y=r2e(h).map(function(b){return m+o*b});return n(p?y.reverse():y)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,a=!0,f()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(h){return arguments.length?(a=!!h,f()):a},e.padding=function(h){return arguments.length?(c=Math.min(1,u=+h),f()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),f()):c},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(d=Math.max(0,Math.min(1,h)),f()):d},e.copy=function(){return Sp(t(),[r,i]).round(a).paddingInner(c).paddingOuter(u).align(d)},ci.apply(f(),arguments)}function CG(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return CG(t())},e}function Ah(){return CG(Sp.apply(null,arguments).paddingInner(1))}function fT(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function NG(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Hm(){}var jp=.7,yx=1/jp,Su="\\s*([+-]?\\d+)\\s*",Ep="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i2e=/^#([0-9a-f]{3,8})$/,o2e=new RegExp(`^rgb\\(${Su},${Su},${Su}\\)$`),s2e=new RegExp(`^rgb\\(${mo},${mo},${mo}\\)$`),a2e=new RegExp(`^rgba\\(${Su},${Su},${Su},${Ep}\\)$`),l2e=new RegExp(`^rgba\\(${mo},${mo},${mo},${Ep}\\)$`),c2e=new RegExp(`^hsl\\(${Ep},${mo},${mo}\\)$`),u2e=new RegExp(`^hsla\\(${Ep},${mo},${mo},${Ep}\\)$`),ID={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};fT(Hm,Cp,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:MD,formatHex:MD,formatHex8:d2e,formatHsl:f2e,formatRgb:$D,toString:$D});function MD(){return this.rgb().formatHex()}function d2e(){return this.rgb().formatHex8()}function f2e(){return PG(this).formatHsl()}function $D(){return this.rgb().formatRgb()}function Cp(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=i2e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?DD(t):n===3?new ar(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ev(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ev(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=o2e.exec(e))?new ar(t[1],t[2],t[3],1):(t=s2e.exec(e))?new ar(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=a2e.exec(e))?ev(t[1],t[2],t[3],t[4]):(t=l2e.exec(e))?ev(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=c2e.exec(e))?BD(t[1],t[2]/100,t[3]/100,1):(t=u2e.exec(e))?BD(t[1],t[2]/100,t[3]/100,t[4]):ID.hasOwnProperty(e)?DD(ID[e]):e==="transparent"?new ar(NaN,NaN,NaN,0):null}function DD(e){return new ar(e>>16&255,e>>8&255,e&255,1)}function ev(e,t,n,r){return r<=0&&(e=t=n=NaN),new ar(e,t,n,r)}function h2e(e){return e instanceof Hm||(e=Cp(e)),e?(e=e.rgb(),new ar(e.r,e.g,e.b,e.opacity)):new ar}function dC(e,t,n,r){return arguments.length===1?h2e(e):new ar(e,t,n,r??1)}function ar(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}fT(ar,dC,NG(Hm,{brighter(e){return e=e==null?yx:Math.pow(yx,e),new ar(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?jp:Math.pow(jp,e),new ar(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ar(Ol(this.r),Ol(this.g),Ol(this.b),xx(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1}
vendor: 4,268 bytes, line 655
655,hex:LD,formatHex:LD,formatHex8:p2e,formatRgb:FD,toString:FD}));function LD(){return`#${Sl(this.r)}${Sl(this.g)}${Sl(this.b)}`}function p2e(){return`#${Sl(this.r)}${Sl(this.g)}${Sl(this.b)}${Sl((isNaN(this.opacity)?1:this.opacity)*255)}`}function FD(){const e=xx(this.opacity);return`${e===1?"rgb(":"rgba("}${Ol(this.r)}, ${Ol(this.g)}, ${Ol(this.b)}${e===1?")":`, ${e})`}`}function xx(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ol(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Sl(e){return e=Ol(e),(e<16?"0":"")+e.toString(16)}function BD(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ki(e,t,n,r)}function PG(e){if(e instanceof ki)return new ki(e.h,e.s,e.l,e.opacity);if(e instanceof Hm||(e=Cp(e)),!e)return new ki;if(e instanceof ki)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,a=o-i,c=(o+i)/2;return a?(t===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-t)/a+2:s=(t-n)/a+4,a/=c<.5?o+i:2-o-i,s*=60):a=c>0&&c<1?0:s,new ki(s,a,c,e.opacity)}function m2e(e,t,n,r){return arguments.length===1?PG(e):new ki(e,t,n,r??1)}function ki(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}fT(ki,m2e,NG(Hm,{brighter(e){return e=e==null?yx:Math.pow(yx,e),new ki(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?jp:Math.pow(jp,e),new ki(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ar(jS(e>=240?e-240:e+120,i,r),jS(e,i,r),jS(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ki(UD(this.h),tv(this.s),tv(this.l),xx(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=xx(this.opacity);return`${e===1?"hsl(":"hsla("}${UD(this.h)}, ${tv(this.s)*100}%, ${tv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function UD(e){return e=(e||0)%360,e<0?e+360:e}function tv(e){return Math.max(0,Math.min(1,e||0))}function jS(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const hT=e=>()=>e;function g2e(e,t){return function(n){return e+n*t}}function v2e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function y2e(e){return(e=+e)==1?kG:function(t,n){return n-t?v2e(t,n,e):hT(isNaN(t)?n:t)}}function kG(e,t){var n=t-e;return n?g2e(e,n):hT(isNaN(e)?t:e)}const zD=function e(t){var n=y2e(t);function r(i,o){var s=n((i=dC(i)).r,(o=dC(o)).r),a=n(i.g,o.g),c=n(i.b,o.b),u=kG(i.opacity,o.opacity);return function(d){return i.r=s(d),i.g=a(d),i.b=c(d),i.opacity=u(d),i+""}}return r.gamma=e,r}(1);function x2e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function b2e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function w2e(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=af(e[s],t[s]);for(;s<n;++s)o[s]=t[s];return function(a){for(s=0;s<r;++s)o[s]=i[s](a);return o}}function _2e(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function bx(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function S2e(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=af(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var fC=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ES=new RegExp(fC.source,"g");function j2e(e){return function(){return e}}function E2e(e){return function(t){return e(t)+""}}function C2e(e,t){var n=fC.lastIndex=ES.lastIndex=0,r,i,o,s=-1,a=[],c=[];for(e=e+"",t=t+"";(r=fC.exec(e))&&(i=ES.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,c.push({i:s,x:bx(r,i)})),n=ES.lastIndex;return n<t.length&&(o=t.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?c[0]?E2e(c[0].x):j2e(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)a[(f=c[d]).i]=f.x(u);return a.join("")})}function af(e,t){var n=typeof t,r;return t==null||n==="boolean"?hT(t):(n==="number"?bx:n==="string"?(r=Cp(t))?(t=r,zD):C2e:t instanceof Cp?zD:t instanceof Date?_2e:b2e(t)?x2e:Array.isArray(t)?
vendor: 4,250 bytes, line 655
655w2e:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?S2e:bx)(e,t)}function pT(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function N2e(e,t){t===void 0&&(t=e,e=af);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(s){var a=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return o[a](s-a)}}function P2e(e){return function(){return e}}function wx(e){return+e}var VD=[0,1];function Gn(e){return e}function hC(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:P2e(isNaN(t)?NaN:.5)}function k2e(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function A2e(e,t,n){var r=e[0],i=e[1],o=t[0],s=t[1];return i<r?(r=hC(i,r),o=n(s,o)):(r=hC(r,i),o=n(o,s)),function(a){return o(r(a))}}function T2e(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=hC(e[s],e[s+1]),o[s]=n(t[s],t[s+1]);return function(a){var c=Wm(e,a,1,r)-1;return o[c](i[c](a))}}function Gm(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function h0(){var e=VD,t=VD,n=af,r,i,o,s=Gn,a,c,u;function d(){var h=Math.min(e.length,t.length);return s!==Gn&&(s=k2e(e[0],e[h-1])),a=h>2?T2e:A2e,c=u=null,f}function f(h){return h==null||isNaN(h=+h)?o:(c||(c=a(e.map(r),t,n)))(r(s(h)))}return f.invert=function(h){return s(i((u||(u=a(t,e.map(r),bx)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,wx),d()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),d()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=pT,d()},f.clamp=function(h){return arguments.length?(s=h?!0:Gn,d()):s!==Gn},f.interpolate=function(h){return arguments.length?(n=h,d()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,d()}}function mT(){return h0()(Gn,Gn)}function R2e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function _x(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Zu(e){return e=_x(Math.abs(e)),e?e[1]:NaN}function O2e(e,t){return function(n,r){for(var i=n.length,o=[],s=0,a=e[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(n.substring(i-=a,i+a)),!((c+=a+1)>r));)a=e[s=(s+1)%e.length];return o.reverse().join(t)}}function I2e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var M2e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Np(e){if(!(t=M2e.exec(e)))throw new Error("invalid format: "+e);var t;return new gT({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Np.prototype=gT.prototype;function gT(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}gT.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $2e(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var AG;function D2e(e,t){var n=_x(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(AG=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+_x(e,Math.max(0,t+o-1))[0]}function qD(e,t){var n=_x(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const KD={"%":(e,t)=>
655(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:R2e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>qD(e*100,t),r:qD,s:D2e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function WD(e){return e}var HD=Array.prototype.map,GD=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function L2e(e){var t=e.grouping===void 0||e.thousands===void 0?WD:O2e(HD.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?WD:I2e(HD.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"â":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Np(f);var h=f.fill,p=f.align,m=f.sign,g=f.symbol,y=f.zero,b=f.width,x=f.comma,w=f.precision,S=f.trim,_=f.type;_==="n"?(x=!0,_="g"):KD[_]||(w===void 0&&(w=12),S=!0,_="g"),(y||h==="0"&&p==="=")&&(y=!0,h="0",p="=");var j=g==="$"?n:g==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",E=g==="$"?r:/[%p]/.test(_)?s:"",C=KD[_],N=/[defgprs%]/.test(_);w=w===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function k(P){var A=j,L=E,R,D,O;if(_==="c")L=C(P)+L,P="";else{P=+P;var F=P<0||1/P<0;if(P=isNaN(P)?c:C(Math.abs(P),w),S&&(P=$2e(P)),F&&+P==0&&m!=="+"&&(F=!1),A=(F?m==="("?m:a:m==="-"||m==="("?"":m)+A,L=(_==="s"?GD[8+AG/3]:"")+L+(F&&m==="("?")":""),N){for(R=-1,D=P.length;++R<D;)if(O=P.charCodeAt(R),48>O||O>57){L=(O===46?i+P.slice(R+1):P.slice(R))+L,P=P.slice(0,R);break}}}x&&!y&&(P=t(P,1/0));var T=A.length+P.length+L.length,M=T<b?new Array(b-T+1).join(h):"";switch(x&&y&&(P=t(M+P,M.length?b-L.length:1/0),M=""),p){case"<":P=A+P+L+M;break;case"=":P=A+M+P+L;break;case"^":P=M.slice(0,T=M.length>>1)+A+P+L+M.slice(T);break;default:P=M+A+P+L;break}return o(P)}return k.toString=function(){return f+""},k}function d(f,h){var p=u((f=Np(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(Zu(h)/3)))*3,g=Math.pow(10,-m),y=GD[8+m/3];return function(b){return p(g*b)+y}}return{format:u,formatPrefix:d}}var nv,vT,TG;F2e({thousands:",",grouping:[3],currency:["$",""]});function F2e(e){return nv=L2e(e),vT=nv.format,TG=nv.formatPrefix,nv}function B2e(e){return Math.max(0,-Zu(Math.abs(e)))}function U2e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Zu(t)/3)))*3-Zu(Math.abs(e)))}function z2e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Zu(t)-Zu(e))+1}function RG(e,t,n,r){var i=e2e(e,t,n),o;switch(r=Np(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=U2e(i,s))&&(r.precision=o),TG(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=z2e(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=B2e(i))&&(r.precision=o-(r.type==="%")*2);break}}return vT(r)}function Ja(e){var t=e.domain;return e.ticks=function(n){var r=t();return lC(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return RG(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,s=r[i],a=r[o],c,u,d=10;for(a<s&&(u=s,s=a,a=u,u=i,i=o,o=u);d-- >0;){if(u=cC(s,a,n),u===c)return r[i]=s,r[o]=a,t(r);if(u>0)s=Math.floor(s/u)*u,a=Math.ceil(a/u)*u;else if(u<0)s=Math.ceil(s*u)/u,a=Math.floor(a*u)/u;else break;c=u}return e},e}function Sx(){var e=mT();return e.copy=function(){return Gm(e,Sx())},ci.apply(e,arguments),Ja(e)}function OG(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,wx),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return OG(e).unknown(t)},e=arguments.length?Array.from(e,wx):[0,1],Ja(n)}function IG(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],s;return o<i&&(s=n,n=r,r=s,s=i,i=o,o=s),e[n]=t.floor(i),e[r]=t.ceil(o),e}function YD(e){return Math.log(e)}function QD(e){return Math.exp(e)}function V2e(e){return-Math.log(-e)}function q2e(e){return-Math.exp(-e)}function K2e(e){return isFinite(e)?+("1e"+e):e<0?0:e}function W2e(e){return e===10?K2e:e===Math.E?Math.exp:t=>Math.pow(e,t)}function H2e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function JD(e){return(t,n)=>-e(-t,n)}function yT(e){const t=e(YD,QD),n=t.domain;let r=10,i,o;function s(){return i=H2e(r),o=W2e(r),n()[0]<0?(i=JD(i),o=JD(o),e(V2e,q2e)):e(YD,QD),t}return t.base=function(a){return arguments.length?(r=+a,s()):r},t.domain=function(a){return arguments.length?(n(a),s()):n()},t.ticks=a=>{const c=n();let u=c[0],d=c[c.length-1];const f=d<u;f&&([u,d]=[d,u]);let h=i(u),p=i(d),m,g;const y=a==null?10:+a;let b=[];if(!(r%1)&&p-h<y){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;
655++h)for(m=1;m<r;++m)if(g=h<0?m/o(-h):m*o(h),!(g<u)){if(g>d)break;b.push(g)}}else for(;h<=p;++h)for(m=r-1;m>=1;--m)if(g=h>0?m/o(-h):m*o(h),!(g<u)){if(g>d)break;b.push(g)}b.length*2<y&&(b=lC(u,d,y))}else b=lC(h,p,Math.min(p-h,y)).map(o);return f?b.reverse():b},t.tickFormat=(a,c)=>{if(a==null&&(a=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Np(c)).precision==null&&(c.trim=!0),c=vT(c)),a===1/0)return c;const u=Math.max(1,r*a/t.ticks().length);return d=>{let f=d/o(Math.round(i(d)));return f*r<r-.5&&(f*=r),f<=u?c(d):""}},t.nice=()=>n(IG(n(),{floor:a=>o(Math.floor(i(a))),ceil:a=>o(Math.ceil(i(a)))})),t}function MG(){const e=yT(h0()).domain([1,10]);return e.copy=()=>Gm(e,MG()).base(e.base()),ci.apply(e,arguments),e}function XD(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ZD(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function xT(e){var t=1,n=e(XD(t),ZD(t));return n.constant=function(r){return arguments.length?e(XD(t=+r),ZD(t)):t},Ja(n)}function $G(){var e=xT(h0());return e.copy=function(){return Gm(e,$G()).constant(e.constant())},ci.apply(e,arguments)}function eL(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function G2e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Y2e(e){return e<0?-e*e:e*e}function bT(e){var t=e(Gn,Gn),n=1;function r(){return n===1?e(Gn,Gn):n===.5?e(G2e,Y2e):e(eL(n),eL(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ja(t)}function wT(){var e=bT(h0());return e.copy=function(){return Gm(e,wT()).exponent(e.exponent())},ci.apply(e,arguments),e}function Q2e(){return wT.apply(null,arguments).exponent(.5)}function tL(e){return Math.sign(e)*e*e}function J2e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function DG(){var e=mT(),t=[0,1],n=!1,r;function i(o){var s=J2e(e(o));return isNaN(s)?r:n?Math.round(s):s}return i.invert=function(o){return e.invert(tL(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,wx)).map(tL)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return DG(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ci.apply(i,arguments),Ja(i)}function LG(){var e=[],t=[],n=[],r;function i(){var s=0,a=Math.max(1,t.length);for(n=new Array(a-1);++s<a;)n[s-1]=n2e(e,s/a);return o}function o(s){return s==null||isNaN(s=+s)?r:t[Wm(n,s)]}return o.invertExtent=function(s){var a=t.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:e[0],a<n.length?n[a]:e[e.length-1]]},o.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let a of s)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(wa),i()},o.range=function(s){return arguments.length?(t=Array.from(s),i()):t.slice()},o.unknown=function(s){return arguments.length?(r=s,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return LG().domain(e).range(t).unknown(r)},ci.apply(o,arguments)}function FG(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function s(c){return c!=null&&c<=c?i[Wm(r,c,0,n)]:o}function a(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return s}return s.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,a()):[e,t]},s.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,a()):i.slice()},s.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},s.unknown=function(c){return arguments.length&&(o=c),s},s.thresholds=function(){return r.slice()},s.copy=function(){return FG().domain([e,t]).range(i).unknown(o)},ci.apply(Ja(s),arguments)}function BG(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Wm(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return BG().domain(e).range(t).unknown(n)},ci.apply(i,arguments)}const CS=new Date,NS=new Date;function dn(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const s=i(o),a=i.ceil(o);return o-s<a-o?s:a},i.offset=(o,s)=>(t(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,a)=>{const c=[];if(o=i.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return c;let u;do c.push(u=new Date(+o)),t(o,a),e(o);while(u<o&&o<s);return c},i.filter=o=>dn(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,a)=>
vendor: 10,059 bytes, line 655
655{if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!o(s););else for(;--a>=0;)for(;t(s,1),!o(s););}),n&&(i.count=(o,s)=>(CS.setTime(+o),NS.setTime(+s),e(CS),e(NS),Math.floor(n(CS,NS))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const jx=dn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);jx.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?dn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):jx);jx.range;const Qo=1e3,Zr=Qo*60,Jo=Zr*60,ws=Jo*24,_T=ws*7,nL=ws*30,PS=ws*365,jl=dn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Qo)},(e,t)=>(t-e)/Qo,e=>e.getUTCSeconds());jl.range;const ST=dn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qo)},(e,t)=>{e.setTime(+e+t*Zr)},(e,t)=>(t-e)/Zr,e=>e.getMinutes());ST.range;const jT=dn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Zr)},(e,t)=>(t-e)/Zr,e=>e.getUTCMinutes());jT.range;const ET=dn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qo-e.getMinutes()*Zr)},(e,t)=>{e.setTime(+e+t*Jo)},(e,t)=>(t-e)/Jo,e=>e.getHours());ET.range;const CT=dn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Jo)},(e,t)=>(t-e)/Jo,e=>e.getUTCHours());CT.range;const Ym=dn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Zr)/ws,e=>e.getDate()-1);Ym.range;const p0=dn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ws,e=>e.getUTCDate()-1);p0.range;const UG=dn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ws,e=>Math.floor(e/ws));UG.range;function pc(e){return dn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Zr)/_T)}const m0=pc(0),Ex=pc(1),X2e=pc(2),Z2e=pc(3),ed=pc(4),e$e=pc(5),t$e=pc(6);m0.range;Ex.range;X2e.range;Z2e.range;ed.range;e$e.range;t$e.range;function mc(e){return dn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/_T)}const g0=mc(0),Cx=mc(1),n$e=mc(2),r$e=mc(3),td=mc(4),i$e=mc(5),o$e=mc(6);g0.range;Cx.range;n$e.range;r$e.range;td.range;i$e.range;o$e.range;const NT=dn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());NT.range;const PT=dn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());PT.range;const _s=dn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());_s.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:dn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});_s.range;const Ss=dn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ss.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:dn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ss.range;function kS(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function s$e(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function a$e(e){let t,n,r;e.length!==2?(t=kS,n=(a,c)=>kS(e(a),c),r=(a,c)=>e(a)-c):(t=e===kS||e===s$e?e:l$e,n=e,r=e);function i(a,c,u=0,d=a.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;n(a[f],c)<0?u=f+1:d=f}while(u<d)}return u}function o(a,c,u=0,d=a.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;n(a[f],c)<=0?u=f+1:d=f}while(u<d)}return u}function s(a,c,u=0,d=a.length){const f=i(a,c,u,d-1);return f>u&&r(a[f-1],c)>-r(a[f],c)?f-1:f}return{left:i,center:s,right:o}}function l$e(){return 0}const c$e=Math.sqrt(50),u$e=Math.sqrt(10),d$e=Math.sqrt(2);function zG(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=c$e?10:o>=u$e?5:o>=d$e?2:1;let a,c,u;return i<0?(u=Math.pow(10,-i)/s,a=Math.round(e*u),c=Math.round(t*u),a/u<e&&++a,c/u>t&&--c,u=-u):(u=Math.pow(10,i)*s,a=Math.round(e/u),c=Math.round(t/u),a*u<e&&++a,c*u>t&&--c),c<a&&.5<=n&&n<2?zG(e,t,n*2):[a,c,u]}function rL(e,t,n){return t=+t,e=+e,n=+n,zG(e,t,n)[2]}function iL(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?rL(t,e,n):rL(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function VG(e,t,n,r,i,o){const s=[[jl,1,Qo],[jl,5,5*Qo],[jl,15,15*Qo],[jl,30,30*Qo],[o,1,Zr],[o,5,5*Zr],[o,15,15*Zr],[o,30,30*Zr],[i,1,Jo],[i,3,3*Jo],[i,6,6*Jo],[i,12,12*Jo],[r,1,ws],[r,2,2*ws],[n,1,_T],[t,1,nL],[t,3,3*nL],[e,1,PS]];function a(u,d,f){const h=d<u;h&&([u,d]=[d,u]);const p=f&&typeof f.range=="function"?f:c(u,d,f),m=p?p.range(u,+d+1):[];return h?m.reverse():m}function c(u,d,f){const h=Math.abs(d-u)/f,p=a$e(([,,y])=>y).right(s,h);if(p===s.length)return e.every(iL(u/PS,d/PS,f));if(p===0)return jx.every(Math.max(iL(u,d,f),1));const[m,g]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return m.every(g)}return[a,c]}const[f$e,h$e]=VG(Ss,PT,g0,UG,CT,jT),[p$e,m$e]=VG(_s,NT,m0,Ym,ET,ST);function AS(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function TS(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ff(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function g$e(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,s=e.shortDays,a=e.months,c=e.shortMonths,u=Bf(i),d=Uf(i),f=Bf(o),h=Uf(o),p=Bf(s),m=Uf(s),g=Bf(a),y=Uf(a),b=Bf(c),x=Uf(c),w={a:F,A:T,b:M,B:V,c:null,d:uL,e:uL,f:F$e,g:Y$e,G:J$e,H:$$e,I:D$e,j:L$e,L:qG,m:B$e,M:U$e,p:B,q:I,Q:hL,s:pL,S:z$e,u:V$e,U:q$e,V:K$e,w:W$e,W:H$e,x:null,X:null,y:G$e,Y:Q$e,Z:X$e,"%":fL},S={a:z,A:H,b:de,B:ge,c:null,d:dL,e:dL,f:nDe,g:fDe,G:pDe,H:Z$e,I:eDe,j:tDe,L:WG,m:rDe,M:iDe,p:te,q:ye,Q:hL,s:pL,S:oDe,u:sDe,U:aDe,V:lDe,w:cDe,W:uDe,x:null,X:null,y:dDe,Y:hDe,Z:mDe,"%":fL},_={a:k,A:P,b:A,B:L,c:R,d:lL,e:lL,f:R$e,g:aL,G:sL,H:cL,I:cL,j:P$e,L:T$e,m:N$e,M:k$e,p:N,q:C$e,Q:I$e,s:M$e,S:A$e,u:w$e,U:_$e,V:S$e,w:b$e,W:j$e,x:D,X:O,y:aL,Y:sL,Z:E$e,"%":O$e};w.x=j(n,w),w.X=j(r,w),w.c=j(t,w),S.x=j(n,S),S.X=j(r,S),S.c=j(t,S);function j(W,ne){return function(se){var U=[],ae=-1,re=0,He=W.length,Ge,gt,Ke;for(se instanceof Date||(se=new Date(+se));++ae<He;)W.charCodeAt(ae)===37&&(U.push(W.slice(re,ae)),(gt=oL[Ge=W.charAt(++ae)])!=null?Ge=W.charAt(++ae):gt=Ge==="e"?" ":"0",(Ke=ne[Ge])&&(Ge=Ke(se,gt)),U.push(Ge),re=ae+1);return U.push(W.slice(re,ae)),U.join("")}}function E(W,ne){return function(se){var U=Ff(1900,void 0,1),ae=C(U,W,se+="",0),re,He;if(ae!=se.length)return null;if("Q"in U)return new Date(U.Q);if("s"in U)return new Date(U.s*1e3+("L"in U?U.L:0));if(ne&&!("Z"in U)&&(U.Z=0),"p"in U&&(U.H=U.H%12+U.p*12),U.m===void 0&&(U.m="q"in U?U.q:0),"V"in U){if(U.V<1||U.V>53)return null;"w"in U||(U.w=1),"Z"in U?(re=TS(Ff(U.y,0,1)),He=re.getUTCDay(),re=He>4||He===0?Cx.ceil(re):Cx(re),re=p0.offset(re,(U.V-1)*7),U.y=re.getUTCFullYear(),U.m=re.getUTCMonth(),U.d=re.getUTCDate()+(U.w+6)%7):(re=AS(Ff(U.y,0,1)),He=re.getDay(),re=He>4||He===0?Ex.ceil(re):Ex(re),re=Ym.offset(re,(U.V-1)*7),U.y=re.getFullYear(),U.m=re.getMonth(),U.d=re.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),He="Z"in U?TS(Ff(U.y,0,1)).getUTCDay():AS(Ff(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(He+5)%7:U.w+U.U*7-(He+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,TS(U)):AS(U)}}function C(W,ne,se,U){for(var ae=0,re=ne.length,He=se.length,Ge,gt;ae<re;){if(U>=He)return-1;if(Ge=ne.charCodeAt(ae++),Ge===37){if(Ge=ne.charAt(ae++),gt=_[Ge in oL?ne.charAt(ae++):Ge],!gt||(U=gt(W,se,U))<0)return-1}else if(Ge!=se.charCodeAt(U++))return-1}return U}function N(W,ne,se){var U=u.exec(ne.slice(se));return U?(W.p=d.get(U[0].toLowerCase()),se+U[0].length):-1}function k(W,ne,se){var U=p.exec(ne.slice(se));return U?(W.w=m.get(U[0].toLowerCase()),se+U[0].length):-1}function P(W,ne,se){var U=f.exec(ne.slice(se));return U?(W.w=h.get(U[0].toLowerCase()),se+U[0].length):-1}function A(W,ne,se){var U=b.exec(ne.slice(se));return U?(W.m=x.get(U[0].toLowerCase()),se+U[0].length):-1}function L(W,ne,se){var U=g.exec(ne.slice(se));return U?(W.m=y.get(U[0].toLowerCase()),se+U[0].length):-1}function R(W,ne,se){return C(W,t,ne,se)}function D(W,ne,se){return C(W,n,ne,se)}function O(W,ne,se){return C(W,r,ne,se)}function F(W){return s[W.getDay()]}function T(W){return o[W.getDay()]}function M(W){return c[W.getMonth()]}function V(W){return a[W.getMonth()]}function B(W){return i[+(W.getHours()>=12)]}function I(W){return 1+~~(W.getMonth()/3)}function z(W){return s[W.getUTCDay()]}function H(W){return o[W.getUTCDay()]}function de(W){return c[W.getUTCMonth()]}function ge(W){return a[W.getUTCMonth()]}function te(W){return i[+(W.getUTCHours()>=12)]}function ye(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var ne=j(W+="",w);return ne.toString=function(){return W},ne},parse:function(W){var ne=E(W+="",!1);return ne.toString=function(){return W},ne},utcFormat:function(W){var ne=j(W+="",S);return ne.toString=function(){return W},ne},utcParse:function(W){var ne=E(W+="",!0);return ne.toString=function(){return W},ne}}}var oL={"-":"",_:" ",0:"0"},gn=/^\s*\d+/,v$e=/^%/,y$e=/[\\^$*+?|[\]().{}]/g;function it(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function x$e(e){return e.replace(y$e,"\\$&")}function Bf(e){return new RegExp("^(?:"+e.map(x$e).join("|")+")","i")}function Uf(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function b$e(e,t,n){var r=gn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function w$e(e,t,n){var r=gn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function _$e(e,t,n){var r=gn.exec(t.slice(n,n+2));
vendor: 4,106 bytes, line 655
655return r?(e.U=+r[0],n+r[0].length):-1}function S$e(e,t,n){var r=gn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function j$e(e,t,n){var r=gn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function sL(e,t,n){var r=gn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function aL(e,t,n){var r=gn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function E$e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function C$e(e,t,n){var r=gn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function N$e(e,t,n){var r=gn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function lL(e,t,n){var r=gn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function P$e(e,t,n){var r=gn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function cL(e,t,n){var r=gn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function k$e(e,t,n){var r=gn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function A$e(e,t,n){var r=gn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function T$e(e,t,n){var r=gn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function R$e(e,t,n){var r=gn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function O$e(e,t,n){var r=v$e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function I$e(e,t,n){var r=gn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function M$e(e,t,n){var r=gn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function uL(e,t){return it(e.getDate(),t,2)}function $$e(e,t){return it(e.getHours(),t,2)}function D$e(e,t){return it(e.getHours()%12||12,t,2)}function L$e(e,t){return it(1+Ym.count(_s(e),e),t,3)}function qG(e,t){return it(e.getMilliseconds(),t,3)}function F$e(e,t){return qG(e,t)+"000"}function B$e(e,t){return it(e.getMonth()+1,t,2)}function U$e(e,t){return it(e.getMinutes(),t,2)}function z$e(e,t){return it(e.getSeconds(),t,2)}function V$e(e){var t=e.getDay();return t===0?7:t}function q$e(e,t){return it(m0.count(_s(e)-1,e),t,2)}function KG(e){var t=e.getDay();return t>=4||t===0?ed(e):ed.ceil(e)}function K$e(e,t){return e=KG(e),it(ed.count(_s(e),e)+(_s(e).getDay()===4),t,2)}function W$e(e){return e.getDay()}function H$e(e,t){return it(Ex.count(_s(e)-1,e),t,2)}function G$e(e,t){return it(e.getFullYear()%100,t,2)}function Y$e(e,t){return e=KG(e),it(e.getFullYear()%100,t,2)}function Q$e(e,t){return it(e.getFullYear()%1e4,t,4)}function J$e(e,t){var n=e.getDay();return e=n>=4||n===0?ed(e):ed.ceil(e),it(e.getFullYear()%1e4,t,4)}function X$e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+it(t/60|0,"0",2)+it(t%60,"0",2)}function dL(e,t){return it(e.getUTCDate(),t,2)}function Z$e(e,t){return it(e.getUTCHours(),t,2)}function eDe(e,t){return it(e.getUTCHours()%12||12,t,2)}function tDe(e,t){return it(1+p0.count(Ss(e),e),t,3)}function WG(e,t){return it(e.getUTCMilliseconds(),t,3)}function nDe(e,t){return WG(e,t)+"000"}function rDe(e,t){return it(e.getUTCMonth()+1,t,2)}function iDe(e,t){return it(e.getUTCMinutes(),t,2)}function oDe(e,t){return it(e.getUTCSeconds(),t,2)}function sDe(e){var t=e.getUTCDay();return t===0?7:t}function aDe(e,t){return it(g0.count(Ss(e)-1,e),t,2)}function HG(e){var t=e.getUTCDay();return t>=4||t===0?td(e):td.ceil(e)}function lDe(e,t){return e=HG(e),it(td.count(Ss(e),e)+(Ss(e).getUTCDay()===4),t,2)}function cDe(e){return e.getUTCDay()}function uDe(e,t){return it(Cx.count(Ss(e)-1,e),t,2)}function dDe(e,t){return it(e.getUTCFullYear()%100,t,2)}function fDe(e,t){return e=HG(e),it(e.getUTCFullYear()%100,t,2)}function hDe(e,t){return it(e.getUTCFullYear()%1e4,t,4)}function pDe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?td(e):td.ceil(e),it(e.getUTCFullYear()%1e4,t,4)}function mDe(){return"+0000"}function fL(){return"%"}function hL(e){return+e}function pL(e){return Math.floor(+e/1e3)}var Cc,GG,YG;gDe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
655ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function gDe(e){return Cc=g$e(e),GG=Cc.format,Cc.parse,YG=Cc.utcFormat,Cc.utcParse,Cc}function vDe(e){return new Date(e)}function yDe(e){return e instanceof Date?+e:+new Date(+e)}function kT(e,t,n,r,i,o,s,a,c,u){var d=mT(),f=d.invert,h=d.domain,p=u(".%L"),m=u(":%S"),g=u("%I:%M"),y=u("%I %p"),b=u("%a %d"),x=u("%b %d"),w=u("%B"),S=u("%Y");function _(j){return(c(j)<j?p:a(j)<j?m:s(j)<j?g:o(j)<j?y:r(j)<j?i(j)<j?b:x:n(j)<j?w:S)(j)}return d.invert=function(j){return new Date(f(j))},d.domain=function(j){return arguments.length?h(Array.from(j,yDe)):h().map(vDe)},d.ticks=function(j){var E=h();return e(E[0],E[E.length-1],j??10)},d.tickFormat=function(j,E){return E==null?_:u(E)},d.nice=function(j){var E=h();return(!j||typeof j.range!="function")&&(j=t(E[0],E[E.length-1],j??10)),j?h(IG(E,j)):d},d.copy=function(){return Gm(d,kT(e,t,n,r,i,o,s,a,c,u))},d}function xDe(){return ci.apply(kT(p$e,m$e,_s,NT,m0,Ym,ET,ST,jl,GG).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function bDe(){return ci.apply(kT(f$e,h$e,Ss,PT,g0,p0,CT,jT,jl,YG).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function v0(){var e=0,t=1,n,r,i,o,s=Gn,a=!1,c;function u(f){return f==null||isNaN(f=+f)?c:s(i===0?.5:(f=(o(f)-n)*i,a?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(f){return arguments.length?(a=!!f,u):a},u.interpolator=function(f){return arguments.length?(s=f,u):s};function d(f){return function(h){var p,m;return arguments.length?([p,m]=h,s=f(p,m),u):[s(0),s(1)]}}return u.range=d(af),u.rangeRound=d(pT),u.unknown=function(f){return arguments.length?(c=f,u):c},function(f){return o=f,n=f(e),r=f(t),i=n===r?0:1/(r-n),u}}function Xa(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function QG(){var e=Ja(v0()(Gn));return e.copy=function(){return Xa(e,QG())},Rs.apply(e,arguments)}function JG(){var e=yT(v0()).domain([1,10]);return e.copy=function(){return Xa(e,JG()).base(e.base())},Rs.apply(e,arguments)}function XG(){var e=xT(v0());return e.copy=function(){return Xa(e,XG()).constant(e.constant())},Rs.apply(e,arguments)}function AT(){var e=bT(v0());return e.copy=function(){return Xa(e,AT()).exponent(e.exponent())},Rs.apply(e,arguments)}function wDe(){return AT.apply(null,arguments).exponent(.5)}function ZG(){var e=[],t=Gn;function n(r){if(r!=null&&!isNaN(r=+r))return t((Wm(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(wa),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>t2e(e,o/r))},n.copy=function(){return ZG(t).domain(e)},Rs.apply(n,arguments)}function y0(){var e=0,t=.5,n=1,r=1,i,o,s,a,c,u=Gn,d,f=!1,h;function p(g){return isNaN(g=+g)?h:(g=.5+((g=+d(g))-o)*(r*g<r*o?a:c),u(f?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([e,t,n]=g,i=d(e=+e),o=d(t=+t),s=d(n=+n),a=i===o?0:.5/(o-i),c=o===s?0:.5/(s-o),r=o<i?-1:1,p):[e,t,n]},p.clamp=function(g){return arguments.length?(f=!!g,p):f},p.interpolator=function(g){return arguments.length?(u=g,p):u};function m(g){return function(y){var b,x,w;return arguments.length?([b,x,w]=y,u=N2e(g,[b,x,w]),p):[u(0),u(.5),u(1)]}}return p.range=m(af),p.rangeRound=m(pT),p.unknown=function(g){return arguments.length?(h=g,p):h},function(g){return d=g,i=g(e),o=g(t),s=g(n),a=i===o?0:.5/(o-i),c=o===s?0:.5/(s-o),r=o<i?-1:1,p}}function e9(){var e=Ja(y0()(Gn));return e.copy=function(){return Xa(e,e9())},Rs.apply(e,arguments)}function t9(){var e=yT(y0()).domain([.1,1,10]);return e.copy=function(){return Xa(e,t9()).base(e.base())},Rs.apply(e,arguments)}function n9(){var e=xT(y0());return e.copy=function(){return Xa(e,n9()).constant(e.constant())},Rs.apply(e,arguments)}function TT(){var e=bT(y0());return e.copy=function(){return Xa(e,TT()).exponent(e.exponent())},Rs.apply(e,arguments)}function _De(){return TT.apply(null,arguments).exponent(.5)}const mL=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Sp,scaleDiverging:e9,scaleDivergingLog:t9,scaleDivergingPow:TT,scaleDivergingSqrt:_De,scaleDivergingSymlog:n9,scaleIdentity:OG,scaleImplicit:uC,scaleLinear:Sx,scaleLog:MG,scaleOrdinal:dT,scalePoint:Ah,scalePow:wT,scaleQuantile:LG,scaleQuantize:FG,scaleRadial:DG,scaleSequential:QG,scaleSequentialLog:JG,scaleSequentialPow:AT,scaleSequentialQuantile:ZG,scaleSequentialSqrt:wDe,scaleSequentialSymlog:XG,scaleSqrt:Q2e,scaleSymlog:$G,scaleThreshold:BG,scaleTime:xDe,scaleUtc:bDe,tickFormat:RG},Symbol.toStringTag,{value:"Module"}));var SDe=Xd;function jDe(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],s=t(o);if(s!=null&&(a===void 0?s===s&&!SDe(s):n(s,a)))var a=s,c=o}return c}var r9=jDe;function EDe(e,t){return e>t}var CDe=EDe,NDe=r9,PDe=CDe,kDe=sf;function ADe(e){return e&&e.length?NDe(e,kDe,PDe):void 0}var TDe=ADe;const x0=ct(TDe);function RDe(e,t){return e<t}var ODe=RDe,IDe=r9,MDe=ODe,$De=sf;function DDe(e){return e&&e.length?IDe(e,$De,MDe):void 0}var LDe=DDe;const b0=ct(LDe);var FDe=WA,BDe=Qa,UDe=cG,zDe=yr;function VDe(e,t){var n=zDe(e)?FDe:UDe;return n(e,BDe(t))}var qDe=VDe,KDe=aG,WDe=qDe;function HDe(e,t){return KDe(WDe(e,t),1)}var GDe=HDe;const YDe=ct(GDe);var QDe=aT;function JDe(e,t){return QDe(e,t)}var XDe=JDe;const w0=ct(XDe);
vendor: 62,637 bytes, lines 655-682
655var lf=1e9,ZDe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},OT,Ot=!0,ai="[DecimalError] ",Il=ai+"Invalid argument: ",RT=ai+"Exponent out of range: ",cf=Math.floor,ul=Math.pow,eLe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Nr,fn=1e7,Pt=7,i9=9007199254740991,Nx=cf(i9/Pt),_e={};_e.absoluteValue=_e.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};_e.comparedTo=_e.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};_e.decimalPlaces=_e.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Pt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};_e.dividedBy=_e.div=function(e){return ss(this,new this.constructor(e))};_e.dividedToIntegerBy=_e.idiv=function(e){var t=this,n=t.constructor;return yt(ss(t,new n(e),0,1),n.precision)};_e.equals=_e.eq=function(e){return!this.cmp(e)};_e.exponent=function(){return nn(this)};_e.greaterThan=_e.gt=function(e){return this.cmp(e)>0};_e.greaterThanOrEqualTo=_e.gte=function(e){return this.cmp(e)>=0};_e.isInteger=_e.isint=function(){return this.e>this.d.length-2};_e.isNegative=_e.isneg=function(){return this.s<0};_e.isPositive=_e.ispos=function(){return this.s>0};_e.isZero=function(){return this.s===0};_e.lessThan=_e.lt=function(e){return this.cmp(e)<0};_e.lessThanOrEqualTo=_e.lte=function(e){return this.cmp(e)<1};_e.logarithm=_e.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Nr))throw Error(ai+"NaN");if(n.s<1)throw Error(ai+(n.s?"NaN":"-Infinity"));return n.eq(Nr)?new r(0):(Ot=!1,t=ss(Pp(n,o),Pp(e,o),o),Ot=!0,yt(t,i))};_e.minus=_e.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?a9(t,e):o9(t,(e.s=-e.s,e))};_e.modulo=_e.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ai+"NaN");return n.s?(Ot=!1,t=ss(n,e,0,1).times(e),Ot=!0,n.minus(t)):yt(new r(n),i)};_e.naturalExponential=_e.exp=function(){return s9(this)};_e.naturalLogarithm=_e.ln=function(){return Pp(this)};_e.negated=_e.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};_e.plus=_e.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?o9(t,e):a9(t,(e.s=-e.s,e))};_e.precision=_e.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Il+e);if(t=nn(i)+1,r=i.d.length-1,n=r*Pt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};_e.squareRoot=_e.sqrt=function(){var e,t,n,r,i,o,s,a=this,c=a.constructor;if(a.s<1){if(!a.s)return new c(0);throw Error(ai+"NaN")}for(e=nn(a),Ot=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=lo(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=cf((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(i.toString()),n=c.precision,i=s=n+3;;)if(o=r,r=o.plus(ss(a,o,s+2)).times(.5),lo(o.d).slice(0,s)===(t=lo(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(yt(o,n+1,0),o.times(o).eq(a)){r=o;break}}else if(t!="9999")break;s+=4}return Ot=!0,yt(r,n)};_e.times=_e.mul=function(e){var t,n,r,i,o,s,a,c,u,d=this,f=d.constructor,h=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,c=h.length,u=p.length,c<u&&(o=h,h=p,p=o,s=c,c=u,u=s),o=[],s=c+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,i=c+r;i>r;)a=o[i]+p[r]*h[i-r-1]+t,o[i--]=a%fn|0,t=a/fn|0;o[i]=(o[i]+t)%fn|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Ot?yt(e,f.precision):e};_e.toDecimalPlaces=_e.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(_o(e,0,lf),t===void 0?t=r.rounding:_o(t,0,8),yt(n,e+nn(n)+1,t))};_e.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Jl(r,!0):(_o(e,0,lf),t===void 0?t=i.rounding:_o(t,0,8),r=yt(new i(r),e+1,t),n=Jl(r,!0,e+1)),n};_e.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Jl(i):(_o(e,0,lf),t===void 0?t=o.rounding:_o(t,0,8),r=yt(new o(i),e+nn(i)+1,t),n=Jl(r.abs(),!1,e+nn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};_e.toInteger=_e.toint=function(){var e=this,t=e.constructor;return yt(new t(e),nn(e)+1,t.rounding)};_e.toNumber=function(){return+this};_e.toPower=_e.pow=function(e){var t,n,r,i,o,s,a=this,c=a.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(Nr);if(a=new c(a),!a.s){if(e.s<1)throw Error(ai+"Infinity");return a}if(a.eq(Nr))return a;if(r=c.precision,e.eq(Nr))return yt(a,r);if(t=e.e,n=e.d.length-1,s=t>=n,o=a.s,s){if((n=d<0?-d:d)<=i9){for(i=new c(Nr),t=Math.ceil(r/Pt+4),Ot=!1;n%2&&(i=i.times(a),vL(i.d,t)),n=cf(n/2),n!==0;)a=a.times(a),vL(a.d,t);return Ot=!0,e.s<0?new c(Nr).div(i):yt(i,r)}}else if(o<0)throw Error(ai+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,a.s=1,Ot=!1,i=e.times(Pp(a,r+u)),Ot=!0,i=s9(i),i.s=o,i};_e.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=nn(i),r=Jl(i,n<=o.toExpNeg||n>=o.toExpPos)):(_o(e,1,lf),t===void 0?t=o.rounding:_o(t,0,8),i=yt(new o(i),e,t),n=nn(i),r=Jl(i,e<=n||n<=o.toExpNeg,e)),r};_e.toSignificantDigits=_e.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(_o(e,1,lf),t===void 0?t=r.rounding:_o(t,0,8)),yt(new r(n),e,t)};_e.toString=_e.valueOf=_e.val=_e.toJSON=_e[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=nn(e),n=e.constructor;return Jl(e,t<=n.toExpNeg||t>=n.toExpPos)};function o9(e,t){var n,r,i,o,s,a,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),Ot?yt(t,f):t;if(c=e.d,u=t.d,s=e.e,i=t.e,c=c.slice(),o=s-i,o){for(o<0?(r=c,o=-o,a=u.length):(r=u,i=s,a=c.length),s=Math.ceil(f/Pt),a=s>a?s+1:a+1,o>a&&(o=a,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(a=c.length,o=u.length,a-o<0&&(o=a,r=u,u=c,c=r),n=0;o;)n=(c[--o]=c[o]+u[o]+n)/fn|0,c[o]%=fn;for(n&&(c.unshift(n),++i),a=c.length;c[--a]==0;)c.pop();return t.d=c,t.e=i,Ot?yt(t,f):t}function _o(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Il+e)}function lo(e){var t,n,r,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)r=e[t]+"",n=Pt-r.length,n&&(o+=Js(n)),o+=r;s=e[t],r=s+"",n=Pt-r.length,n&&(o+=Js(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}var ss=function(){function e(r,i){var o,s=0,a=r.length;for(r=r.slice();a--;)o=r[a]*i+s,r[a]=o%fn|0,s=o/fn|0;return s&&r.unshift(s),r}function t(r,i,o,s){var a,c;if(o!=s)c=o>s?1:-1;else for(a=c=0;a<o;a++)if(r[a]!=i[a]){c=r[a]>i[a]?1:-1;break}return c}function n(r,i,o){for(var s=0;o--;)r[o]-=s,s=r[o]<i[o]?1:0,r[o]=s*fn+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,s){var a,c,u,d,f,h,p,m,g,y,b,x,w,S,_,j,E,C,N=r.constructor,k=r.s==i.s?1:-1,P=r.d,A=i.d;if(!r.s)return new N(r);if(!i.s)throw Error(ai+"Division by zero");for(c=r.e-i.e,E=A.length,_=P.length,p=new N(k),m=p.d=[],u=0;A[u]==(P[u]||0);)++u;if(A[u]>(P[u]||0)&&--c,o==null?x=o=N.precision:s?x=o+(nn(r)-nn(i))+1:x=o,x<0)return new N(0);if(x=x/Pt+2|0,u=0,E==1)for(d=0,A=A[0],x++;(u<_||d)&&x--;u++)w=d*fn+(P[u]||0),m[u]=w/A|0,d=w%A|0;else{for(d=fn/(A[0]+1)|0,d>1&&(A=e(A,d),P=e(P,d),E=A.length,_=P.length),S=E,g=P.slice(0,E),y=g.length;y<E;)g[y++]=0;C=A.slice(),C.unshift(0),j=A[0],A[1]>=fn/2&&++j;do d=0,a=t(A,g,E,y),a<0?(b=g[0],E!=y&&(b=b*fn+(g[1]||0)),d=b/j|0,d>1?(d>=fn&&(d=fn-1),f=e(A,d),h=f.length,y=g.length,a=t(f,g,h,y),a==1&&(d--,n(f,E<h?C:A,h))):(d==0&&(a=d=1),f=A.slice()),h=f.length,h<y&&f.unshift(0),n(g,f,y),a==-1&&(y=g.length,a=t(A,g,E,y),a<1&&(d++,n(g,E<y?C:A,y))),y=g.length):a===0&&(d++,g=[0]),m[u++]=d,a&&g[0]?g[y++]=P[S]||0:(g=[P[S]],y=1);while((S++<_||g[0]!==void 0)&&x--)}return m[0]||m.shift(),p.e=c,yt(p,s?o+nn(p)+1:o)}}();function s9(e,t){var n,r,i,o,s,a,c=0,u=0,d=e.constructor,f=d.precision;if(nn(e)>16)throw Error(RT+nn(e));if(!e.s)return new d(Nr);for(t==null?(Ot=!1,a=f):a=t,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),u+=5;for(r=Math.log(ul(2,u))/Math.LN10*2+5|0,a+=r,n=i=o=new d(Nr),d.precision=a;;){if(i=yt(i.times(e),a),n=n.times(++c),s=o.plus(ss(i,n,a)),lo(s.d).slice(0,a)===lo(o.d).slice(0,a)){for(;u--;)o=yt(o.times(o),a);return d.precision=f,t==null?(Ot=!0,yt(o,f)):o}o=s}}function nn(e){for(var t=e.e*Pt,n=e.d[0];n>=10;n/=10)t++;return t}function RS(e,t,n){if(t>e.LN10.sd())throw Ot=!0,n&&(e.precision=n),Error(ai+"LN10 precision limit exceeded");return yt(new e(e.LN10),t)}function Js(e){for(var t="";e--;)t+="0";return t}function Pp(e,t){var n,r,i,o,s,a,c,u,d,f=1,h=10,p=e,m=p.d,g=p.constructor,y=g.precision;if(p.s<1)throw Error(ai+(p.s?"NaN":"-Infinity"));if(p.eq(Nr))return new g(0);if(t==null?(Ot=!1,u=y):u=t,p.eq(10))return t==null&&(Ot=!0),RS(g,u);if(u+=h,g.precision=u,n=lo(m),r=n.charAt(0),o=nn(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=lo(p.d),r=n.charAt(0),f++;o=nn(p),r>1?(p=new g("0."+n),o++):p=new g(r+"."+n.slice(1))}else return c=RS(g,u+2,y).times(o+""),p=Pp(new g(r+"."+n.slice(1)),u-h).plus(c),g.precision=y,t==null?(Ot=!0,yt(p,y)):p;for(a=s=p=ss(p.minus(Nr),p.plus(Nr),u),d=yt(p.times(p),u),i=3;;){if(s=yt(s.times(d),u),c=a.plus(ss(s,new g(i),u)),lo(c.d).slice(0,u)===lo(a.d).slice(0,u))return a=a.times(2),o!==0&&(a=a.plus(RS(g,u+2,y).times(o+""))),a=ss(a,new g(f),u),g.precision=y,t==null?(Ot=!0,yt(a,y)):a;a=c,i+=2}}function gL(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=cf(n/Pt),e.d=[],r=(n+1)%Pt,n<0&&(r+=Pt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Pt;r<i;)e.d.push(+t.slice(r,r+=Pt));t=t.slice(r),r=Pt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Ot&&(e.e>Nx||e.e<-Nx))throw Error(RT+n)}else e.s=0,e.e=0,e.d=[0];return e}function yt(e,t,n){var r,i,o,s,a,c,u,d,f=e.d;for(s=1,o=f[0];o>=10;o/=10)s++;if(r=t-s,r<0)r+=Pt,i=t,u=f[d=0];else{if(d=Math.ceil((r+1)/Pt),o=f.length,d>=o)return e;for(u=o=f[d],s=1;o>=10;o/=10)s++;r%=Pt,i=r-Pt+s}if(n!==void 0&&(o=ul(10,s-i-1),a=u/o%10|0,c=t<0||f[d+1]!==void 0||u%o,c=n<4?(a||c)&&(n==0||n==(e.s<0?3:2)):a>5||a==5&&(n==4||c||n==6&&(r>0?i>0?u/ul(10,s-i):0:f[d-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return c?(o=nn(e),f.length=1,t=t-o-1,f[0]=ul(10,(Pt-t%Pt)%Pt),e.e=cf(-t/Pt)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=d,o=1,d--):(f.length=d+1,o=ul(10,Pt-r),f[d]=i>0?(u/ul(10,s-i)%ul(10,i)|0)*o:0),c)for(;;)if(d==0){(f[0]+=o)==fn&&(f[0]=1,++e.e);break}else{if(f[d]+=o,f[d]!=fn)break;f[d--]=0,o=1}for(r=f.length;f[--r]===0;)f.pop();if(Ot&&(e.e>Nx||e.e<-Nx))throw Error(RT+nn(e));return e}function a9(e,t){var n,r,i,o,s,a,c,u,d,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Ot?yt(t,p):t;if(c=e.d,f=t.d,r=t.e,u=e.e,c=c.slice(),s=u-r,s){for(d=s<0,d?(n=c,s=-s,a=f.length):(n=f,r=u,a=c.length),i=Math.max(Math.ceil(p/Pt),a)+2,s>i&&(s=i,n.length=1),n.reverse(),i=s;i--;)n.push(0);n.reverse()}else{for(i=c.length,a=f.length,d=i<a,d&&(a=i),i=0;i<a;i++)if(c[i]!=f[i]){d=c[i]<f[i];break}s=0}for(d&&(n=c,c=f,f=n,t.s=-t.s),a=c.length,i=f.length-a;i>0;--i)c[a++]=0;for(i=f.length;i>s;){if(c[--i]<f[i]){for(o=i;o&&c[--o]===0;)c[o]=fn-1;--c[o],c[i]+=fn}c[i]-=f[i]}for(;c[--a]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,Ot?yt(t,p):t):new h(0)}function Jl(e,t,n){var r,i=nn(e),o=lo(e.d),s=o.length;return t?(n&&(r=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+Js(r):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Js(-i-1)+o,n&&(r=n-s)>0&&(o+=Js(r))):i>=s?(o+=Js(i+1-s),n&&(r=n-i-1)>0&&(o=o+"."+Js(r))):((r=i+1)<s&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(o+="."),o+=Js(r))),e.s<0?"-"+o:o}function vL(e,t){if(e.length>t)return e.length=t,!0}function l9(e){var t,n,r;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Il+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return gL(s,o.toString())}else if(typeof o!="string")throw Error(Il+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,eLe.test(o))gL(s,o);else throw Error(Il+o)}if(i.prototype=_e,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=l9,i.config=i.set=tLe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function tLe(e){if(!e||typeof e!="object")throw Error(ai+"Object expected");var t,n,r,i=["precision",1,lf,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(cf(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Il+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Il+n+": "+r);return this}var OT=l9(ZDe);Nr=new OT(1);const dt=OT;function nLe(e){return sLe(e)||oLe(e)||iLe(e)||rLe()}function rLe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 656In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iLe(e,t){if(e){if(typeof e=="string")return pC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pC(e,t)}}function oLe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function sLe(e){if(Array.isArray(e))return pC(e)}function pC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var aLe=function(t){return t},c9={"@@functional/placeholder":!0},u9=function(t){return t===c9},yL=function(t){return function n(){return arguments.length===0||arguments.length===1&&u9(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},lLe=function e(t,n){return t===1?n:yL(function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var s=i.filter(function(a){return a!==c9}).length;return s>=t?n.apply(void 0,i):e(t-s,yL(function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];var d=i.map(function(f){return u9(f)?c.shift():f});return n.apply(void 0,nLe(d).concat(c))}))})},_0=function(t){return lLe(t.length,t)},mC=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},cLe=_0(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),uLe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return aLe;var i=n.reverse(),o=i[0],s=i.slice(1);return function(){return s.reduce(function(a,c){return c(a)},o.apply(void 0,arguments))}},gC=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},d9=function(t){var n=null,r=null;return function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n&&o.every(function(a,c){return a===n[c]})||(n=o,r=t.apply(void 0,o)),r}};function dLe(e){var t;return e===0?t=1:t=Math.floor(new dt(e).abs().log(10).toNumber())+1,t}function fLe(e,t,n){for(var r=new dt(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var hLe=_0(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),pLe=_0(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),mLe=_0(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const S0={rangeStep:fLe,getDigitCount:dLe,interpolateNumber:hLe,uninterpolateNumber:pLe,uninterpolateTruncation:mLe};function vC(e){return yLe(e)||vLe(e)||f9(e)||gLe()}function gLe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 657In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vLe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function yLe(e){if(Array.isArray(e))return yC(e)}function kp(e,t){return wLe(e)||bLe(e,t)||f9(e,t)||xLe()}function xLe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 658In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f9(e,t){if(e){if(typeof e=="string")return yC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yC(e,t)}}function yC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bLe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),a;!(r=(a=s.next()).done)&&(n.push(a.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,o=c}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function wLe(e){if(Array.isArray(e))return e}function h9(e){var t=kp(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function p9(e,t,n){if(e.lte(0))return new dt(0);var r=S0.getDigitCount(e.toNumber()),i=new dt(10).pow(r),o=e.div(i),s=r!==1?.05:.1,a=new dt(Math.ceil(o.div(s).toNumber())).add(n).mul(s),c=a.mul(i);return t?c:new dt(Math.ceil(c))}function _Le(e,t,n){var r=1,i=new dt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new dt(10).pow(S0.getDigitCount(e)-1),i=new dt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new dt(Math.floor(e)))}else e===0?i=new dt(Math.floor((t-1)/2)):n||(i=new dt(Math.floor(e)));var s=Math.floor((t-1)/2),a=uLe(cLe(function(c){return i.add(new dt(c-s).mul(r)).toNumber()}),mC);return a(0,t)}function m9(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new dt(0),tickMin:new dt(0),tickMax:new dt(0)};var o=p9(new dt(t).sub(e).div(n-1),r,i),s;e<=0&&t>=0?s=new dt(0):(s=new dt(e).add(t).div(2),s=s.sub(new dt(s).mod(o)));var a=Math.ceil(s.sub(e).div(o).toNumber()),c=Math.ceil(new dt(t).sub(s).div(o).toNumber()),u=a+c+1;return u>n?m9(e,t,n,r,i+1):(u<n&&(c=t>0?c+(n-u):c,a=t>0?a:a+(n-u)),{step:o,tickMin:s.sub(new dt(a).mul(o)),tickMax:s.add(new dt(c).mul(o))})}function SLe(e){var t=kp(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),a=h9([n,r]),c=kp(a,2),u=c[0],d=c[1];if(u===-1/0||d===1/0){var f=d===1/0?[u].concat(vC(mC(0,i-1).map(function(){return 1/0}))):[].concat(vC(mC(0,i-1).map(function(){return-1/0})),[d]);return n>r?gC(f):f}if(u===d)return _Le(u,i,o);var h=m9(u,d,s,o),p=h.step,m=h.tickMin,g=h.tickMax,y=S0.rangeStep(m,g.add(new dt(.1).mul(p)),p);return n>r?gC(y):y}function jLe(e,t){var n=kp(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=h9([r,i]),a=kp(s,2),c=a[0],u=a[1];if(c===-1/0||u===1/0)return[r,i];if(c===u)return[c];var d=Math.max(t,2),f=p9(new dt(u).sub(c).div(d-1),o,0),h=[].concat(vC(S0.rangeStep(new dt(c),new dt(u).sub(new dt(.99).mul(f)),f)),[u]);return r>i?gC(h):h}var ELe=d9(SLe),CLe=d9(jLe),NLe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function nd(e){"@babel/helpers - typeof";return nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nd(e)}function Px(){return Px=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Px.apply(this,arguments)}function PLe(e,t){return RLe(e)||TLe(e,t)||ALe(e,t)||kLe()}function kLe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 659In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ALe(e,t){if(e){if(typeof e=="string")return xL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xL(e,t)}}function xL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TLe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function RLe(e){if(Array.isArray(e))return e}function OLe(e,t){if(e==null)return{};var n=ILe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ILe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function MLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y9(r.key),r)}}function DLe(e,t,n){return t&&$Le(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LLe(e,t,n){return t=kx(t),FLe(e,g9()?Reflect.construct(t,n||[],kx(e).constructor):t.apply(e,n))}function FLe(e,t){if(t&&(nd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BLe(e)}function BLe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g9=function(){return!!e})()}function kx(e){return kx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kx(e)}function ULe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xC(e,t)}function xC(e,t){return xC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},xC(e,t)}function v9(e,t,n){return t=y9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y9(e){var t=zLe(e,"string");return nd(t)=="symbol"?t:t+""}function zLe(e,t){if(nd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(nd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qm=function(e){function t(){return MLe(this,t),LLe(this,t,arguments)}return ULe(t,e),DLe(t,[{key:"render",value:function(){var r=this.props,i=r.offset,o=r.layout,s=r.width,a=r.dataKey,c=r.data,u=r.dataPointFormatter,d=r.xAxis,f=r.yAxis,h=OLe(r,NLe),p=Ye(h,!1);this.props.direction==="x"&&d.type!=="number"&&Yt(!1);var m=c.map(function(g){var y=u(g,a),b=y.x,x=y.y,w=y.value,S=y.errorVal;if(!S)return null;var _=[],j,E;if(Array.isArray(S)){var C=PLe(S,2);j=C[0],E=C[1]}else j=E=S;if(o==="vertical"){var N=d.scale,k=x+i,P=k+s,A=k-s,L=N(w-j),R=N(w+E);_.push({x1:R,y1:P,x2:R,y2:A}),_.push({x1:L,y1:k,x2:R,y2:k}),_.push({x1:L,y1:P,x2:L,y2:A})}else if(o==="horizontal"){var D=f.scale,O=b+i,F=O-s,T=O+s,M=D(w-j),V=D(w+E);_.push({x1:F,y1:V,x2:T,y2:V}),_.push({x1:O,y1:M,x2:O,y2:V}),_.push({x1:F,y1:M,x2:T,y2:M})}return $.createElement(Xt,Px({className:"recharts-errorBar",key:"bar-".concat(_.map(function(B){return"".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))},p),_.map(function(B){return $.createElement("line",Px({},B,{key:"line-".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))}))});return $.createElement(Xt,{className:"recharts-errorBars"},m)}}])}($.Component);v9(Qm,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});v9(Qm,"displayName","ErrorBar");function Ap(e){"@babel/helpers - typeof";return Ap=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ap(e)}function bL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bL(Object(n),!0).forEach(function(r){VLe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VLe(e,t,n){return t=qLe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qLe(e){var t=KLe(e,"string");return Ap(t)=="symbol"?t:t+""}function KLe(e,t){if(Ap(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ap(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var x9=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,o=t.legendContent,s=jr(n,Rl);if(!s)return null;var a=Rl.defaultProps,c=a!==void 0?nl(nl({},a),s.props):{},u;return s.props&&s.props.payload?u=s.props&&s.props.payload:o==="children"?u=(r||[]).reduce(function(d,f){var h=f.item,p=f.props,m=p.sectors||p.data||[];return d.concat(m.map(function(g){return{type:s.props.iconType||h.props.legendType,value:g.name,color:g.fill,payload:g}}))},[]):u=(r||[]).map(function(d){var f=d.item,h=f.type.defaultProps,p=h!==void 0?nl(nl({},h),f.props):{},m=p.dataKey,g=p.name,y=p.legendType,b=p.hide;return{inactive:b,dataKey:m,type:c.iconType||y||"square",color:IT(f),value:g||m,payload:p}}),nl(nl(nl({},c),Rl.getWithHeight(s,i)),{},{payload:u,item:s})};function Tp(e){"@babel/helpers - typeof";return Tp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tp(e)}function wL(e){return YLe(e)||GLe(e)||HLe(e)||WLe()}function WLe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 660In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HLe(e,t){if(e){if(typeof e=="string")return bC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bC(e,t)}}function GLe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function YLe(e){if(Array.isArray(e))return bC(e)}function bC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_L(Object(n),!0).forEach(function(r){ju(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_L(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ju(e,t,n){return t=QLe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QLe(e){var t=JLe(e,"string");return Tp(t)=="symbol"?t:t+""}function JLe(e,t){if(Tp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Tp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lr(e,t,n){return Ve(e)||Ve(t)?n:cn(t)?ni(e,t,n):ze(t)?t(e):n}function Th(e,t,n,r){var i=YDe(e,function(a){return Lr(a,t)});if(n==="number"){var o=i.filter(function(a){return fe(a)||parseFloat(a)});return o.length?[b0(o),x0(o)]:[1/0,-1/0]}var s=r?i.filter(function(a){return!Ve(a)}):i;return s.map(function(a){return cn(a)||a instanceof Date?a:""})}var XLe=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,s=-1,a=(n=r?.length)!==null&&n!==void 0?n:0;if(a<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var c=o.range,u=0;u<a;u++){var d=u>0?i[u-1].coordinate:i[a-1].coordinate,f=i[u].coordinate,h=u>=a-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(Ai(f-d)!==Ai(h-f)){var m=[];if(Ai(h-f)===Ai(c[1]-c[0])){p=h;var g=f+c[1]-c[0];m[0]=Math.min(g,(g+d)/2),m[1]=Math.max(g,(g+d)/2)}else{p=d;var y=h+c[1]-c[0];m[0]=Math.min(f,(y+f)/2),m[1]=Math.max(f,(y+f)/2)}var b=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>b[0]&&t<=b[1]||t>=m[0]&&t<=m[1]){s=i[u].index;break}}else{var x=Math.min(d,h),w=Math.max(d,h);if(t>(x+f)/2&&t<=(w+f)/2){s=i[u].index;break}}}else for(var S=0;S<a;S++)if(S===0&&t<=(r[S].coordinate+r[S+1].coordinate)/2||S>0&&S<a-1&&t>(r[S].coordinate+r[S-1].coordinate)/2&&t<=(r[S].coordinate+r[S+1].coordinate)/2||S===a-1&&t>(r[S].coordinate+r[S-1].coordinate)/2){s=r[S].index;break}return s},IT=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?qt(qt({},t.type.defaultProps),t.props):t.props,s=o.stroke,a=o.fill,c;switch(i){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:a;break;default:c=a;break}return c},ZLe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var s={},a=Object.keys(o),c=0,u=a.length;c<u;c++)for(var d=o[a[c]].stackGroups,f=Object.keys(d),h=0,p=f.length;h<p;h++){var m=d[f[h]],g=m.items,y=m.cateAxisId,b=g.filter(function(E){return rs(E.type).indexOf("Bar")>=0});if(b&&b.length){var x=b[0].type.defaultProps,w=x!==void 0?qt(qt({},x),b[0].props):b[0].props,S=w.barSize,_=w[y];s[_]||(s[_]=[]);var j=Ve(S)?n:S;s[_].push({item:b[0],stackList:b.slice(1),barSize:Ve(j)?void 0:Ti(j,r,0)})}}return s},eFe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,s=o===void 0?[]:o,a=t.maxBarSize,c=s.length;if(c<1)return null;var u=Ti(n,i,0,!0),d,f=[];if(s[0].barSize===+s[0].barSize){var h=!1,p=i/c,m=s.reduce(function(S,_){return S+_.barSize||0},0);m+=(c-1)*u,m>=i&&(m-=(c-1)*u,u=0),m>=i&&p>0&&(h=!0,p*=.9,m=c*p);var g=(i-m)/2>>0,y={offset:g-u,size:0};d=s.reduce(function(S,_){var j={item:_.item,position:{offset:y.offset+y.size+u,size:h?p:_.barSize}},E=[].concat(wL(S),[j]);return y=E[E.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(C){E.push({item:C,position:y})}),E},f)}else{var b=Ti(r,i,0,!0);i-2*b-(c-1)*u<=0&&(u=0);var x=(i-2*b-(c-1)*u)/c;x>1&&(x>>=0);var w=a===+a?Math.min(x,a):x;d=s.reduce(function(S,_,j){var E=[].concat(wL(S),[{item:_.item,position:{offset:b+(x+u)*j+(x-w)/2,size:w}}]);return _.stackList&&_.stackList.length&&_.stackList.forEach(function(C){E.push({item:C,position:E[E.length-1].position})}),E},f)}return d},tFe=function(t,n,r,i){var o=r.children,s=r.width,a=r.margin,c=s-(a.left||0)-(a.right||0),u=x9({children:o,legendWidth:c});if(u){var d=i||{},f=d.width,h=d.height,p=u.align,m=u.verticalAlign,g=u.layout;if((g==="vertical"||g==="horizontal"&&m==="middle")&&p!=="center"&&fe(t[p]))return qt(qt({},t),{},ju({},p,t[p]+(f||0)));if((g==="horizontal"||g==="vertical"&&p==="center")&&m!=="middle"&&fe(t[m]))return qt(qt({},t),{},ju({},m,t[m]+(h||0)))}return t},nFe=function(t,n,r){return Ve(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},b9=function(t,n,r,i,o){var s=n.props.children,a=ri(s,Qm).filter(function(u){return nFe(i,o,u.props.direction)});if(a&&a.length){var c=a.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var f=Lr(d,r);if(Ve(f))return u;var h=Array.isArray(f)?[b0(f),x0(f)]:[f,f],p=c.reduce(function(m,g){var y=Lr(d,g,0),b=h[0]-Math.abs(Array.isArray(y)?y[0]:y),x=h[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(b,m[0]),Math.max(x,m[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},rFe=function(t,n,r,i,o){var s=n.map(function(a){return b9(t,a,r,o,i)}).filter(function(a){return!Ve(a)});return s&&s.length?s.reduce(function(a,c){return[Math.min(a[0],c[0]),Math.max(a[1],c[1])]},[1/0,-1/0]):null},w9=function(t,n,r,i,o){var s=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&b9(t,c,u,i)||Th(t,u,r,o)});if(r==="number")return s.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var a={};return s.reduce(function(c,u){for(var d=0,f=u.length;d<f;d++)a[u[d]]||(a[u[d]]=!0,c.push(u[d]));return c},[])},_9=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},S9=function(t,n,r,i){if(i)return t.map(function(c){return c.coordinate});var o,s,a=t.map(function(c){return c.coordinate===n&&(o=!0),c.coordinate===r&&(s=!0),c.coordinate});return o||a.push(n),s||a.push(r),a},Xo=function(t,n,r){if(!t)return null;var i=t.scale,o=t.duplicateDomain,s=t.type,a=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(n||r)&&s==="category"&&i.bandwidth?i.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&a?.length>=2?Ai(a[0]-a[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var h=o?o.indexOf(f):f;return{coordinate:i(h)+u,value:f,offset:u}});return d.filter(function(f){return!zm(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+u,value:f,index:h,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,h){return{coordinate:i(f)+u,value:o?o[f]:f,index:h,offset:u}})},OS=new WeakMap,rv=function(t,n){if(typeof n!="function")return t;OS.has(t)||OS.set(t,new WeakMap);var r=OS.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},j9=function(t,n,r){var i=t.scale,o=t.type,s=t.layout,a=t.axisType;if(i==="auto")return s==="radial"&&a==="radiusAxis"?{scale:Sp(),realScaleType:"band"}:s==="radial"&&a==="angleAxis"?{scale:Sx(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Ah(),realScaleType:"point"}:o==="category"?{scale:Sp(),realScaleType:"band"}:{scale:Sx(),realScaleType:"linear"};if(Um(i)){var c="scale".concat(s0(i));return{scale:(mL[c]||Ah)(),realScaleType:mL[c]?c:"point"}}return ze(i)?{scale:i}:{scale:Ah(),realScaleType:"point"}},SL=1e-4,E9=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-SL,s=Math.max(i[0],i[1])+SL,a=t(n[0]),c=t(n[r-1]);(a<o||a>s||c<o||c>s)&&t.domain([n[0],n[r-1]])}},iFe=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},oFe=function(t,n){if(!n||n.length!==2||!fe(n[0])||!fe(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),o=[t[0],t[1]];return(!fe(t[0])||t[0]<r)&&(o[0]=r),(!fe(t[1])||t[1]>i)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]<r&&(o[1]=r),o},sFe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,s=0,a=0;a<n;++a){var c=zm(t[a][r][1])?t[a][r][0]:t[a][r][1];c>=0?(t[a][r][0]=o,t[a][r][1]=o+c,o=t[a][r][1]):(t[a][r][0]=s,t[a][r][1]=s+c,s=t[a][r][1])}},aFe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,s=0;s<n;++s){var a=zm(t[s][r][1])?t[s][r][0]:t[s][r][1];a>=0?(t[s][r][0]=o,t[s][r][1]=o+a,o=t[s][r][1]):(t[s][r][0]=0,t[s][r][1]=0)}},lFe={sign:sFe,expand:xCe,none:Gu,silhouette:bCe,wiggle:wCe,positive:aFe},cFe=function(t,n,r){var i=n.map(function(a){return a.props.dataKey}),o=lFe[r],s=yCe().keys(i).value(function(a,c){return+Lr(a,c,0)}).order(WE).offset(o);return s(t)},uFe=function(t,n,r,i,o,s){if(!t)return null;var a=s?n.reverse():n,c={},u=a.reduce(function(f,h){var p,m=(p=h.type)!==null&&p!==void 0&&p.defaultProps?qt(qt({},h.type.defaultProps),h.props):h.props,g=m.stackId,y=m.hide;if(y)return f;var b=m[r],x=f[b]||{hasStack:!1,stackGroups:{}};if(cn(g)){var w=x.stackGroups[g]||{numericAxisId:r,cateAxisId:i,items:[]};w.items.push(h),x.hasStack=!0,x.stackGroups[g]=w}else x.stackGroups[Vm("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return qt(qt({},f),{},ju({},b,x))},c),d={};return Object.keys(u).reduce(function(f,h){var p=u[h];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(g,y){var b=p.stackGroups[y];return qt(qt({},g),{},ju({},y,{numericAxisId:r,cateAxisId:i,items:b.items,stackedData:cFe(t,b.items,o)}))},m)}return qt(qt({},f),{},ju({},h,p))},d)},C9=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,s=n.originalDomain,a=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(o&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=ELe(u,o,a);return t.domain([b0(d),x0(d)]),{niceTicks:d}}if(o&&i==="number"){var f=t.domain(),h=CLe(f,o,a);return{niceTicks:h}}return null};function jL(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ve(i[t.dataKey])){var a=ex(n,"value",i[t.dataKey]);if(a)return a.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var c=Lr(i,Ve(s)?t.dataKey:s);return Ve(c)?null:t.scale(c)}var EL=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,s=t.entry,a=t.index;if(n.type==="category")return r[a]?r[a].coordinate+i:null;var c=Lr(s,n.dataKey,n.domain[a]);return Ve(c)?null:n.scale(c)-o/2+i},dFe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},fFe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?qt(qt({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(cn(o)){var s=n[o];if(s){var a=s.items.indexOf(t);return a>=0?s.stackedData[a]:null}}return null},hFe=function(t){return t.reduce(function(n,r){return[b0(r.concat([n[0]]).filter(fe)),x0(r.concat([n[1]]).filter(fe))]},[1/0,-1/0])},N9=function(t,n,r){return Object.keys(t).reduce(function(i,o){var s=t[o],a=s.stackedData,c=a.reduce(function(u,d){var f=hFe(d.slice(n,r+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},CL=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,NL=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,wC=function(t,n,r){if(ze(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(fe(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(CL.test(t[0])){var o=+CL.exec(t[0])[1];i[0]=n[0]-o}else ze(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(fe(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(NL.test(t[1])){var s=+NL.exec(t[1])[1];i[1]=n[1]+s}else ze(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Ax=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=cT(n,function(f){return f.coordinate}),s=1/0,a=1,c=o.length;a<c;a++){var u=o[a],d=o[a-1];s=Math.min((u.coordinate||0)-(d.coordinate||0),s)}return s===1/0?0:s}return r?void 0:0},PL=function(t,n,r){return!t||!t.length||w0(t,ni(r,"type.defaultProps.domain"))?n:t},P9=function(t,n){var r=t.type.defaultProps?qt(qt({},t.type.defaultProps),t.props):t.props,i=r.dataKey,o=r.name,s=r.unit,a=r.formatter,c=r.tooltipType,u=r.chartType,d=r.hide;return qt(qt({},Ye(t,!1)),{},{dataKey:i,unit:s,formatter:a,name:o||i,color:IT(t),value:Lr(n,i),type:c,payload:n,chartType:u,hide:d})};function Rp(e){"@babel/helpers - typeof";return Rp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rp(e)}function kL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kL(Object(n),!0).forEach(function(r){k9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function k9(e,t,n){return t=pFe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pFe(e){var t=mFe(e,"string");return Rp(t)=="symbol"?t:t+""}function mFe(e,t){if(Rp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Rp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gFe(e,t){return bFe(e)||xFe(e,t)||yFe(e,t)||vFe()}function vFe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 661In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yFe(e,t){if(e){if(typeof e=="string")return AL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AL(e,t)}}function AL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xFe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function bFe(e){if(Array.isArray(e))return e}var Tx=Math.PI/180,wFe=function(t){return t*180/Math.PI},wn=function(t,n,r,i){return{x:t+Math.cos(-Tx*i)*r,y:n+Math.sin(-Tx*i)*r}},_Fe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},Jct=function(t,n,r,i,o){var s=t.width,a=t.height,c=t.startAngle,u=t.endAngle,d=Ti(t.cx,s,s/2),f=Ti(t.cy,a,a/2),h=_Fe(s,a,r),p=Ti(t.innerRadius,h,0),m=Ti(t.outerRadius,h,h*.8),g=Object.keys(n);return g.reduce(function(y,b){var x=n[b],w=x.domain,S=x.reversed,_;if(Ve(x.range))i==="angleAxis"?_=[c,u]:i==="radiusAxis"&&(_=[p,m]),S&&(_=[_[1],_[0]]);else{_=x.range;var j=_,E=gFe(j,2);c=E[0],u=E[1]}var C=j9(x,o),N=C.realScaleType,k=C.scale;k.domain(w).range(_),E9(k);var P=C9(k,qo(qo({},x),{},{realScaleType:N})),A=qo(qo(qo({},x),P),{},{range:_,radius:m,realScaleType:N,scale:k,cx:d,cy:f,innerRadius:p,outerRadius:m,startAngle:c,endAngle:u});return qo(qo({},y),{},k9({},b,A))},{})},SFe=function(t,n){var r=t.x,i=t.y,o=n.x,s=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(i-s,2))},jFe=function(t,n){var r=t.x,i=t.y,o=n.cx,s=n.cy,a=SFe({x:r,y:i},{x:o,y:s});if(a<=0)return{radius:a};var c=(r-o)/a,u=Math.acos(c);return i>s&&(u=2*Math.PI-u),{radius:a,angle:wFe(u),angleInRadian:u}},EFe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),s=Math.min(i,o);return{startAngle:n-s*360,endAngle:r-s*360}},CFe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),s=Math.floor(i/360),a=Math.min(o,s);return t+a*360},TL=function(t,n){var r=t.x,i=t.y,o=jFe({x:r,y:i},n),s=o.radius,a=o.angle,c=n.innerRadius,u=n.outerRadius;if(s<c||s>u)return!1;if(s===0)return!0;var d=EFe(n),f=d.startAngle,h=d.endAngle,p=a,m;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;m=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;m=p>=h&&p<=f}return m?qo(qo({},n),{},{radius:s,angle:CFe(p,n)}):null},Xct=function(t){return!v.isValidElement(t)&&!ze(t)&&typeof t!="boolean"?t.className:""};function Op(e){"@babel/helpers - typeof";return Op=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Op(e)}var NFe=["offset"];function PFe(e){return RFe(e)||TFe(e)||AFe(e)||kFe()}function kFe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 662In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AFe(e,t){if(e){if(typeof e=="string")return _C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _C(e,t)}}function TFe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function RFe(e){if(Array.isArray(e))return _C(e)}function _C(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function OFe(e,t){if(e==null)return{};var n=IFe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IFe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function RL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function on(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RL(Object(n),!0).forEach(function(r){MFe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MFe(e,t,n){return t=$Fe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Fe(e){var t=DFe(e,"string");return Op(t)=="symbol"?t:t+""}function DFe(e,t){if(Op(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Op(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ip(){return Ip=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ip.apply(this,arguments)}var LFe=function(t){var n=t.value,r=t.formatter,i=Ve(t.children)?n:t.children;return ze(r)?r(i):i},FFe=function(t,n){var r=Ai(n-t),i=Math.min(Math.abs(n-t),360);return r*i},BFe=function(t,n,r){var i=t.position,o=t.viewBox,s=t.offset,a=t.className,c=o,u=c.cx,d=c.cy,f=c.innerRadius,h=c.outerRadius,p=c.startAngle,m=c.endAngle,g=c.clockWise,y=(f+h)/2,b=FFe(p,m),x=b>=0?1:-1,w,S;i==="insideStart"?(w=p+x*s,S=g):i==="insideEnd"?(w=m-x*s,S=!g):i==="end"&&(w=m+x*s,S=g),S=b<=0?S:!S;var _=wn(u,d,y,w),j=wn(u,d,y,w+(S?1:-1)*359),E="M".concat(_.x,",").concat(_.y,` 663 A`).concat(y,",").concat(y,",0,1,").concat(S?0:1,`, 664 `).concat(j.x,",").concat(j.y),C=Ve(t.id)?Vm("recharts-radial-line-"):t.id;return $.createElement("text",Ip({},r,{dominantBaseline:"central",className:et("recharts-radial-bar-label",a)}),$.createElement("defs",null,$.createElement("path",{id:C,d:E})),$.createElement("textPath",{xlinkHref:"#".concat(C)},n))},UFe=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,s=o.cx,a=o.cy,c=o.innerRadius,u=o.outerRadius,d=o.startAngle,f=o.endAngle,h=(d+f)/2;if(i==="outside"){var p=wn(s,a,u+r,h),m=p.x,g=p.y;return{x:m,y:g,textAnchor:m>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:a,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:a,textAnchor:"middle",verticalAnchor:"end"};var y=(c+u)/2,b=wn(s,a,y,h),x=b.x,w=b.y;return{x,y:w,textAnchor:"middle",verticalAnchor:"middle"}},zFe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,s=n,a=s.x,c=s.y,u=s.width,d=s.height,f=d>=0?1:-1,h=f*i,p=f>0?"end":"start",m=f>0?"start":"end",g=u>=0?1:-1,y=g*i,b=g>0?"end":"start",x=g>0?"start":"end";if(o==="top"){var w={x:a+u/2,y:c-f*i,textAnchor:"middle",verticalAnchor:p};return on(on({},w),r?{height:Math.max(c-r.y,0),width:u}:{})}if(o==="bottom"){var S={x:a+u/2,y:c+d+h,textAnchor:"middle",verticalAnchor:m};return on(on({},S),r?{height:Math.max(r.y+r.height-(c+d),0),width:u}:{})}if(o==="left"){var _={x:a-y,y:c+d/2,textAnchor:b,verticalAnchor:"middle"};return on(on({},_),r?{width:Math.max(_.x-r.x,0),height:d}:{})}if(o==="right"){var j={x:a+u+y,y:c+d/2,textAnchor:x,verticalAnchor:"middle"};return on(on({},j),r?{width:Math.max(r.x+r.width-j.x,0),height:d}:{})}var E=r?{width:u,height:d}:{};return o==="insideLeft"?on({x:a+y,y:c+d/2,textAnchor:x,verticalAnchor:"middle"},E):o==="insideRight"?on({x:a+u-y,y:c+d/2,textAnchor:b,verticalAnchor:"middle"},E):o==="insideTop"?on({x:a+u/2,y:c+h,textAnchor:"middle",verticalAnchor:m},E):o==="insideBottom"?on({x:a+u/2,y:c+d-h,textAnchor:"middle",verticalAnchor:p},E):o==="insideTopLeft"?on({x:a+y,y:c+h,textAnchor:x,verticalAnchor:m},E):o==="insideTopRight"?on({x:a+u-y,y:c+h,textAnchor:b,verticalAnchor:m},E):o==="insideBottomLeft"?on({x:a+y,y:c+d-h,textAnchor:x,verticalAnchor:p},E):o==="insideBottomRight"?on({x:a+u-y,y:c+d-h,textAnchor:b,verticalAnchor:p},E):Zd(o)&&(fe(o.x)||_l(o.x))&&(fe(o.y)||_l(o.y))?on({x:a+Ti(o.x,u),y:c+Ti(o.y,d),textAnchor:"end",verticalAnchor:"end"},E):on({x:a+u/2,y:c+d/2,textAnchor:"middle",verticalAnchor:"middle"},E)},VFe=function(t){return"cx"in t&&fe(t.cx)};function Rn(e){var t=e.offset,n=t===void 0?5:t,r=OFe(e,NFe),i=on({offset:n},r),o=i.viewBox,s=i.position,a=i.value,c=i.children,u=i.content,d=i.className,f=d===void 0?"":d,h=i.textBreakAll;if(!o||Ve(a)&&Ve(c)&&!v.isValidElement(u)&&!ze(u))return null;if(v.isValidElement(u))return v.cloneElement(u,i);var p;if(ze(u)){if(p=v.createElement(u,i),v.isValidElement(p))return p}else p=LFe(i);var m=VFe(o),g=Ye(i,!0);if(m&&(s==="insideStart"||s==="insideEnd"||s==="end"))return BFe(i,p,g);var y=m?UFe(i):zFe(i);return $.createElement(gx,Ip({className:et("recharts-label",f)},g,y,{breakAll:h}),p)}Rn.displayName="Label";var A9=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,s=t.endAngle,a=t.r,c=t.radius,u=t.innerRadius,d=t.outerRadius,f=t.x,h=t.y,p=t.top,m=t.left,g=t.width,y=t.height,b=t.clockWise,x=t.labelViewBox;if(x)return x;if(fe(g)&&fe(y)){if(fe(f)&&fe(h))return{x:f,y:h,width:g,height:y};if(fe(p)&&fe(m))return{x:p,y:m,width:g,height:y}}return fe(f)&&fe(h)?{x:f,y:h,width:0,height:0}:fe(n)&&fe(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:s||i||0,innerRadius:u||0,outerRadius:d||c||a||0,clockWise:b}:t.viewBox?t.viewBox:{}},qFe=function(t,n){return t?t===!0?$.createElement(Rn,{key:"label-implicit",viewBox:n}):cn(t)?$.createElement(Rn,{key:"label-implicit",viewBox:n,value:t}):v.isValidElement(t)?t.type===Rn?v.cloneElement(t,{key:"label-implicit",viewBox:n}):$.createElement(Rn,{key:"label-implicit",content:t,viewBox:n}):ze(t)?$.createElement(Rn,{key:"label-implicit",content:t,viewBox:n}):Zd(t)?$.createElement(Rn,Ip({viewBox:n},t,{key:"label-implicit"})):null:null},KFe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=A9(t),s=ri(i,Rn).map(function(c,u){return v.cloneElement(c,{viewBox:n||o,key:"label-".concat(u)})});if(!r)return s;var a=qFe(t.label,n||o);return[a].concat(PFe(s))};Rn.parseViewBox=A9;Rn.renderCallByParent=KFe;function WFe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var HFe=WFe;const GFe=ct(HFe);function Mp(e){"@babel/helpers - typeof";return Mp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mp(e)}var YFe=["valueAccessor"],QFe=["data","dataKey","clockWise","id","textBreakAll"];function JFe(e){return t3e(e)||e3e(e)||ZFe(e)||XFe()}function XFe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 665In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZFe(e,t){if(e){if(typeof e=="string")return SC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SC(e,t)}}function e3e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function t3e(e){if(Array.isArray(e))return SC(e)}function SC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rx(){return Rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rx.apply(this,arguments)}function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function IL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OL(Object(n),!0).forEach(function(r){n3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n3e(e,t,n){return t=r3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r3e(e){var t=i3e(e,"string");return Mp(t)=="symbol"?t:t+""}function i3e(e,t){if(Mp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Mp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ML(e,t){if(e==null)return{};var n=o3e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function o3e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var s3e=function(t){return Array.isArray(t.value)?GFe(t.value):t.value};function _a(e){var t=e.valueAccessor,n=t===void 0?s3e:t,r=ML(e,YFe),i=r.data,o=r.dataKey,s=r.clockWise,a=r.id,c=r.textBreakAll,u=ML(r,QFe);return!i||!i.length?null:$.createElement(Xt,{className:"recharts-label-list"},i.map(function(d,f){var h=Ve(o)?n(d,f):Lr(d&&d.payload,o),p=Ve(a)?{}:{id:"".concat(a,"-").concat(f)};return $.createElement(Rn,Rx({},Ye(d,!0),u,p,{parentViewBox:d.parentViewBox,value:h,textBreakAll:c,viewBox:Rn.parseViewBox(Ve(s)?d:IL(IL({},d),{},{clockWise:s})),key:"label-".concat(f),index:f}))}))}_a.displayName="LabelList";function a3e(e,t){return e?e===!0?$.createElement(_a,{key:"labelList-implicit",data:t}):$.isValidElement(e)||ze(e)?$.createElement(_a,{key:"labelList-implicit",data:t,content:e}):Zd(e)?$.createElement(_a,Rx({data:t},e,{key:"labelList-implicit"})):null:null}function l3e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=ri(r,_a).map(function(s,a){return v.cloneElement(s,{data:t,key:"labelList-".concat(a)})});if(!n)return i;var o=a3e(e.label,t);return[o].concat(JFe(i))}_a.renderCallByParent=l3e;function $p(e){"@babel/helpers - typeof";return $p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$p(e)}function jC(){return jC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jC.apply(this,arguments)}function $L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function DL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$L(Object(n),!0).forEach(function(r){c3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$L(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function c3e(e,t,n){return t=u3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u3e(e){var t=d3e(e,"string");return $p(t)=="symbol"?t:t+""}function d3e(e,t){if($p(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if($p(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var f3e=function(t,n){var r=Ai(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},iv=function(t){var n=t.cx,r=t.cy,i=t.radius,o=t.angle,s=t.sign,a=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,d=c*(a?1:-1)+i,f=Math.asin(c/d)/Tx,h=u?o:o+s*f,p=wn(n,r,d,h),m=wn(n,r,i,h),g=u?o-s*f:o,y=wn(n,r,d*Math.cos(f*Tx),g);return{center:p,circleTangency:m,lineTangency:y,theta:f}},T9=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,s=t.startAngle,a=t.endAngle,c=f3e(s,a),u=s+c,d=wn(n,r,o,s),f=wn(n,r,o,u),h="M ".concat(d.x,",").concat(d.y,` 666 A `).concat(o,",").concat(o,`,0, 667 `).concat(+(Math.abs(c)>180),",").concat(+(s>u),`, 668 `).concat(f.x,",").concat(f.y,` 669 `);if(i>0){var p=wn(n,r,i,s),m=wn(n,r,i,u);h+="L ".concat(m.x,",").concat(m.y,` 670 A `).concat(i,",").concat(i,`,0, 671 `).concat(+(Math.abs(c)>180),",").concat(+(s<=u),`, 672 `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},h3e=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,s=t.cornerRadius,a=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=Ai(d-u),h=iv({cx:n,cy:r,radius:o,angle:u,sign:f,cornerRadius:s,cornerIsExternal:c}),p=h.circleTangency,m=h.lineTangency,g=h.theta,y=iv({cx:n,cy:r,radius:o,angle:d,sign:-f,cornerRadius:s,cornerIsExternal:c}),b=y.circleTangency,x=y.lineTangency,w=y.theta,S=c?Math.abs(u-d):Math.abs(u-d)-g-w;if(S<0)return a?"M ".concat(m.x,",").concat(m.y,` 673 a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0 674 a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0 675 `):T9({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:u,endAngle:d});var _="M ".concat(m.x,",").concat(m.y,` 676 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,` 677 A`).concat(o,",").concat(o,",0,").concat(+(S>180),",").concat(+(f<0),",").concat(b.x,",").concat(b.y,` 678 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(x.x,",").concat(x.y,` 679 `);if(i>0){var j=iv({cx:n,cy:r,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),E=j.circleTangency,C=j.lineTangency,N=j.theta,k=iv({cx:n,cy:r,radius:i,angle:d,sign:-f,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),P=k.circleTangency,A=k.lineTangency,L=k.theta,R=c?Math.abs(u-d):Math.abs(u-d)-N-L;if(R<0&&s===0)return"".concat(_,"L").concat(n,",").concat(r,"Z");_+="L".concat(A.x,",").concat(A.y,` 680 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,` 681 A`).concat(i,",").concat(i,",0,").concat(+(R>180),",").concat(+(f>0),",").concat(E.x,",").concat(E.y,` 682 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(C.x,",").concat(C.y,"Z")}else _+="L".concat(n,",").concat(r,"Z");return _},p3e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},R9=function(t){var n=DL(DL({},p3e),t),r=n.cx,i=n.cy,o=n.innerRadius,s=n.outerRadius,a=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,d=n.startAngle,f=n.endAngle,h=n.className;if(s<o||d===f)return null;var p=et("recharts-sector",h),m=s-o,g=Ti(a,m,0,!0),y;return g>0&&Math.abs(d-f)<360?y=h3e({cx:r,cy:i,innerRadius:o,outerRadius:s,cornerRadius:Math.min(g,m/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:d,endAngle:f}):y=T9({cx:r,cy:i,innerRadius:o,outerRadius:s,startAngle:d,endAngle:f}),$.createElement("path",jC({},Ye(n,!0),{className:p,d:y,role:"img"}))};function Dp(e){"@babel/helpers - typeof";return Dp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dp(e)}function EC(){return EC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EC.apply(this,arguments)}function LL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
682t%2?LL(Object(n),!0).forEach(function(r){m3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m3e(e,t,n){return t=g3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g3e(e){var t=v3e(e,"string");return Dp(t)=="symbol"?t:t+""}function v3e(e,t){if(Dp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Dp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var BL={curveBasisClosed:aCe,curveBasisOpen:lCe,curveBasis:sCe,curveBumpX:WEe,curveBumpY:HEe,curveLinearClosed:cCe,curveLinear:l0,curveMonotoneX:uCe,curveMonotoneY:dCe,curveNatural:fCe,curveStep:hCe,curveStepAfter:mCe,curveStepBefore:pCe},ov=function(t){return t.x===+t.x&&t.y===+t.y},zf=function(t){return t.x},Vf=function(t){return t.y},y3e=function(t,n){if(ze(t))return t;var r="curve".concat(s0(t));return(r==="curveMonotone"||r==="curveBump")&&n?BL["".concat(r).concat(n==="vertical"?"Y":"X")]:BL[r]||l0},x3e=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,o=i===void 0?[]:i,s=t.baseLine,a=t.layout,c=t.connectNulls,u=c===void 0?!1:c,d=y3e(r,a),f=u?o.filter(function(g){return ov(g)}):o,h;if(Array.isArray(s)){var p=u?s.filter(function(g){return ov(g)}):s,m=f.map(function(g,y){return FL(FL({},g),{},{base:p[y]})});return a==="vertical"?h=Yg().y(Vf).x1(zf).x0(function(g){return g.base.x}):h=Yg().x(zf).y1(Vf).y0(function(g){return g.base.y}),h.defined(ov).curve(d),h(m)}return a==="vertical"&&fe(s)?h=Yg().y(Vf).x1(zf).x0(s):fe(s)?h=Yg().x(zf).y1(Vf).y0(s):h=C8().x(zf).y(Vf),h.defined(ov).curve(d),h(f)},CC=function(t){var n=t.className,r=t.points,i=t.path,o=t.pathRef;if((!r||!r.length)&&!i)return null;var s=r&&r.length?x3e(t):i;return $.createElement("path",EC({},Ye(t,!1),tx(t),{className:et("recharts-curve",n),d:s,ref:o}))},O9={exports:{}},b3e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",w3e=b3e,_3e=w3e;function I9(){}function M9(){}M9.resetWarningCache=I9;var S3e=function(){function e(r,i,o,s,a,c){if(c!==_3e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:M9,resetWarningCache:I9};return n.PropTypes=n,n};O9.exports=S3e();var j3e=O9.exports;const De=ct(j3e);var E3e=Object.getOwnPropertyNames,C3e=Object.getOwnPropertySymbols,N3e=Object.prototype.hasOwnProperty;function UL(e,t){return function(r,i,o){return e(r,i,o)&&t(r,i,o)}}function sv(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);var o=i.cache,s=o.get(n),a=o.get(r);if(s&&a)return s===r&&a===n;o.set(n,r),o.set(r,n);var c=e(n,r,i);return o.delete(n),o.delete(r),c}}function zL(e){return E3e(e).concat(C3e(e))}var $9=Object.hasOwn||function(e,t){return N3e.call(e,t)};function uf(e,t){return e||t?e===t:e===t||e!==e&&t!==t}var D9="_owner",VL=Object.getOwnPropertyDescriptor,qL=Object.keys;function P3e(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function k3e(e,t){return uf(e.getTime(),t.getTime())}function KL(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,s,a;(s=i.next())&&!s.done;){for(var c=t.entries(),u=!1,d=0;(a=c.next())&&!a.done;){var f=s.value,h=f[0],p=f[1],m=a.value,g=m[0],y=m[1];!u&&!r[d]&&(u=n.equals(h,g,o,d,e,t,n)&&n.equals(p,y,h,g,e,t,n))&&(r[d]=!0),d++}if(!u)return!1;o++}return!0}function A3e(e,t,n){var r=qL(e),i=r.length;
682if(qL(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===D9&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!$9(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function qf(e,t,n){var r=zL(e),i=r.length;if(zL(t).length!==i)return!1;for(var o,s,a;i-- >0;)if(o=r[i],o===D9&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!$9(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(s=VL(e,o),a=VL(t,o),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable)))return!1;return!0}function T3e(e,t){return uf(e.valueOf(),t.valueOf())}function R3e(e,t){return e.source===t.source&&e.flags===t.flags}function WL(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,s;(o=i.next())&&!o.done;){for(var a=t.values(),c=!1,u=0;(s=a.next())&&!s.done;)!c&&!r[u]&&(c=n.equals(o.value,s.value,o.value,s.value,e,t,n))&&(r[u]=!0),u++;if(!c)return!1}return!0}function O3e(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var I3e="[object Arguments]",M3e="[object Boolean]",$3e="[object Date]",D3e="[object Map]",L3e="[object Number]",F3e="[object Object]",B3e="[object RegExp]",U3e="[object Set]",z3e="[object String]",V3e=Array.isArray,HL=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,GL=Object.assign,q3e=Object.prototype.toString.call.bind(Object.prototype.toString);function K3e(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,s=e.areRegExpsEqual,a=e.areSetsEqual,c=e.areTypedArraysEqual;return function(d,f,h){if(d===f)return!0;if(d==null||f==null||typeof d!="object"||typeof f!="object")return d!==d&&f!==f;var p=d.constructor;if(p!==f.constructor)return!1;if(p===Object)return i(d,f,h);if(V3e(d))return t(d,f,h);if(HL!=null&&HL(d))return c(d,f,h);if(p===Date)return n(d,f,h);if(p===RegExp)return s(d,f,h);if(p===Map)return r(d,f,h);if(p===Set)return a(d,f,h);var m=q3e(d);return m===$3e?n(d,f,h):m===B3e?s(d,f,h):m===D3e?r(d,f,h):m===U3e?a(d,f,h):m===F3e?typeof d.then!="function"&&typeof f.then!="function"&&i(d,f,h):m===I3e?i(d,f,h):m===M3e||m===L3e||m===z3e?o(d,f,h):!1}}function W3e(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?qf:P3e,areDatesEqual:k3e,areMapsEqual:r?UL(KL,qf):KL,areObjectsEqual:r?qf:A3e,arePrimitiveWrappersEqual:T3e,areRegExpsEqual:R3e,areSetsEqual:r?UL(WL,qf):WL,areTypedArraysEqual:r?qf:O3e};if(n&&(i=GL({},i,n(i))),t){var o=sv(i.areArraysEqual),s=sv(i.areMapsEqual),a=sv(i.areObjectsEqual),c=sv(i.areSetsEqual);i=GL({},i,{areArraysEqual:o,areMapsEqual:s,areObjectsEqual:a,areSetsEqual:c})}return i}function H3e(e){return function(t,n,r,i,o,s,a){return e(t,n,a)}}function G3e(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(c,u){var d=r(),f=d.cache,h=f===void 0?t?new WeakMap:void 0:f,p=d.meta;return n(c,u,{cache:h,equals:i,meta:p,strict:o})};if(t)return function(c,u){return n(c,u,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var s={cache:void 0,equals:i,meta:void 0,strict:o};return function(c,u){return n(c,u,s)}}var Y3e=Za();Za({strict:!0});Za({circular:!0});Za({circular:!0,strict:!0});Za({createInternalComparator:function(){return uf}});Za({strict:!0,createInternalComparator:function(){return uf}});Za({circular:!0,createInternalComparator:function(){return uf}});Za({circular:!0,createInternalComparator:function(){return uf},strict:!0});function Za(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,s=o===void 0?!1:o,a=W3e(e),c=K3e(a),u=r?r(c):H3e(c);return G3e({circular:n,comparator:c,createState:i,equals:u,strict:s})}function Q3e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function YL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):Q3e(i)};requestAnimationFrame(r)}function NC(e){"@babel/helpers - typeof";return NC=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},NC(e)}function J3e(e){return tBe(e)||eBe(e)||Z3e(e)||X3e()}
vendor: 25,716 bytes, lines 682-699
682function X3e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 683In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z3e(e,t){if(e){if(typeof e=="string")return QL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QL(e,t)}}function QL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eBe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tBe(e){if(Array.isArray(e))return e}function nBe(){var e={},t=function(){return null},n=!1,r=function i(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var s=o,a=J3e(s),c=a[0],u=a.slice(1);if(typeof c=="number"){YL(i.bind(null,u),c);return}i(c),YL(i.bind(null,u));return}NC(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,r(o)},subscribe:function(o){return t=o,function(){t=function(){return null}}}}}function Lp(e){"@babel/helpers - typeof";return Lp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lp(e)}function JL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function XL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JL(Object(n),!0).forEach(function(r){L9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L9(e,t,n){return t=rBe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rBe(e){var t=iBe(e,"string");return Lp(t)==="symbol"?t:String(t)}function iBe(e,t){if(Lp(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Lp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oBe=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(o){return i.includes(o)})})},sBe=function(t){return t},aBe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Rh=function(t,n){return Object.keys(n).reduce(function(r,i){return XL(XL({},r),{},L9({},i,t(i,n[i])))},{})},ZL=function(t,n,r){return t.map(function(i){return"".concat(aBe(i)," ").concat(n,"ms ").concat(r)}).join(",")};function lBe(e,t){return dBe(e)||uBe(e,t)||F9(e,t)||cBe()}function cBe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 684In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uBe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function dBe(e){if(Array.isArray(e))return e}function fBe(e){return mBe(e)||pBe(e)||F9(e)||hBe()}function hBe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 685In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F9(e,t){if(e){if(typeof e=="string")return PC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PC(e,t)}}function pBe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mBe(e){if(Array.isArray(e))return PC(e)}function PC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ox=1e-4,B9=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},U9=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},eF=function(t,n){return function(r){var i=B9(t,n);return U9(i,r)}},gBe=function(t,n){return function(r){var i=B9(t,n),o=[].concat(fBe(i.map(function(s,a){return s*a}).slice(1)),[0]);return U9(o,r)}},tF=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],o=n[1],s=n[2],a=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,o=0,s=1,a=1;break;case"ease":i=.25,o=.1,s=.25,a=1;break;case"ease-in":i=.42,o=0,s=1,a=1;break;case"ease-out":i=.42,o=0,s=.58,a=1;break;case"ease-in-out":i=0,o=0,s=.58,a=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),d=lBe(u,4);i=d[0],o=d[1],s=d[2],a=d[3]}}}var f=eF(i,s),h=eF(o,a),p=gBe(i,s),m=function(b){return b>1?1:b<0?0:b},g=function(b){for(var x=b>1?1:b,w=x,S=0;S<8;++S){var _=f(w)-x,j=p(w);if(Math.abs(_-x)<Ox||j<Ox)return h(w);w=m(w-_/j)}return h(w)};return g.isStepper=!1,g},vBe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,s=t.dt,a=s===void 0?17:s,c=function(d,f,h){var p=-(d-f)*r,m=h*o,g=h+(p-m)*a/1e3,y=h*a/1e3+d;return Math.abs(y-f)<Ox&&Math.abs(g)<Ox?[f,0]:[y,g]};return c.isStepper=!0,c.dt=a,c},yBe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return tF(i);case"spring":return vBe();default:if(i.split("(")[0]==="cubic-bezier")return tF(i)}return typeof i=="function"?i:null};function Fp(e){"@babel/helpers - typeof";return Fp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fp(e)}function nF(e){return wBe(e)||bBe(e)||z9(e)||xBe()}function xBe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 686In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bBe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wBe(e){if(Array.isArray(e))return AC(e)}function rF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rF(Object(n),!0).forEach(function(r){kC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kC(e,t,n){return t=_Be(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Be(e){var t=SBe(e,"string");return Fp(t)==="symbol"?t:String(t)}function SBe(e,t){if(Fp(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Fp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jBe(e,t){return NBe(e)||CBe(e,t)||z9(e,t)||EBe()}function EBe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 687In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z9(e,t){if(e){if(typeof e=="string")return AC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AC(e,t)}}function AC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function CBe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function NBe(e){if(Array.isArray(e))return e}var Ix=function(t,n,r){return t+(n-t)*r},TC=function(t){var n=t.from,r=t.to;return n!==r},PBe=function e(t,n,r){var i=Rh(function(o,s){if(TC(s)){var a=t(s.from,s.to,s.velocity),c=jBe(a,2),u=c[0],d=c[1];return vn(vn({},s),{},{from:u,velocity:d})}return s},n);return r<1?Rh(function(o,s){return TC(s)?vn(vn({},s),{},{velocity:Ix(s.velocity,i[o].velocity,r),from:Ix(s.from,i[o].from,r)}):s},n):e(t,i,r-1)};const kBe=function(e,t,n,r,i){var o=oBe(e,t),s=o.reduce(function(y,b){return vn(vn({},y),{},kC({},b,[e[b],t[b]]))},{}),a=o.reduce(function(y,b){return vn(vn({},y),{},kC({},b,{from:e[b],velocity:0,to:t[b]}))},{}),c=-1,u,d,f=function(){return null},h=function(){return Rh(function(b,x){return x.from},a)},p=function(){return!Object.values(a).filter(TC).length},m=function(b){u||(u=b);var x=b-u,w=x/n.dt;a=PBe(n,a,w),i(vn(vn(vn({},e),t),h())),u=b,p()||(c=requestAnimationFrame(f))},g=function(b){d||(d=b);var x=(b-d)/r,w=Rh(function(_,j){return Ix.apply(void 0,nF(j).concat([n(x)]))},s);if(i(vn(vn(vn({},e),t),w)),x<1)c=requestAnimationFrame(f);else{var S=Rh(function(_,j){return Ix.apply(void 0,nF(j).concat([n(1)]))},s);i(vn(vn(vn({},e),t),S))}};return f=n.isStepper?m:g,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}};function rd(e){"@babel/helpers - typeof";return rd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rd(e)}var ABe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function TBe(e,t){if(e==null)return{};var n=RBe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RBe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function IS(e){return $Be(e)||MBe(e)||IBe(e)||OBe()}function OBe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 688In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IBe(e,t){if(e){if(typeof e=="string")return RC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return RC(e,t)}}function MBe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $Be(e){if(Array.isArray(e))return RC(e)}function RC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iF(Object(n),!0).forEach(function(r){ah(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ah(e,t,n){return t=V9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DBe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,V9(r.key),r)}}function FBe(e,t,n){return t&&LBe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function V9(e){var t=BBe(e,"string");return rd(t)==="symbol"?t:String(t)}function BBe(e,t){if(rd(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(rd(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UBe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OC(e,t)}function OC(e,t){return OC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},OC(e,t)}function zBe(e){var t=VBe();return function(){var r=Mx(e),i;if(t){var o=Mx(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return IC(this,i)}}function IC(e,t){if(t&&(rd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MC(e)}function MC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VBe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mx(e){return Mx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mx(e)}var js=function(e){UBe(n,e);var t=zBe(n);function n(r,i){var o;DBe(this,n),o=t.call(this,r,i);var s=o.props,a=s.isActive,c=s.attributeName,u=s.from,d=s.to,f=s.steps,h=s.children,p=s.duration;if(o.handleStyleChange=o.handleStyleChange.bind(MC(o)),o.changeStyle=o.changeStyle.bind(MC(o)),!a||p<=0)return o.state={style:{}},typeof h=="function"&&(o.state={style:d}),IC(o);if(f&&f.length)o.state={style:f[0].style};else if(u){if(typeof h=="function")return o.state={style:u},IC(o);o.state={style:c?ah({},c,u):u}}else o.state={style:{}};return o}return FBe(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,s=i.canBegin;this.mounted=!0,!(!o||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isActive,a=o.canBegin,c=o.attributeName,u=o.shouldReAnimate,d=o.to,f=o.from,h=this.state.style;if(a){if(!s){var p={style:c?ah({},c,d):d};this.state&&h&&(c&&h[c]!==d||!c&&h!==d)&&this.setState(p);return}if(!(Y3e(i.to,d)&&i.canBegin&&i.isActive)){var m=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=m||u?f:i.to;if(this.state&&h){var y={style:c?ah({},c,g):g};(c&&h[c]!==g||!c&&h!==g)&&this.setState(y)}this.runAnimation(pi(pi({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,s=i.from,a=i.to,c=i.duration,u=i.easing,d=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,p=kBe(s,a,yBe(u),c,this.changeStyle),m=function(){o.stopJSAnimation=p()};this.manager.start([h,d,m,c,f])}},{key:"runStepAnimation",value:function(i){var o=this,s=i.steps,a=i.begin,c=i.onAnimationStart,u=s[0],d=u.style,f=u.duration,h=f===void 0?0:f,p=function(g,y,b){if(b===0)return g;var x=y.duration,w=y.easing,S=w===void 0?"ease":w,_=y.style,j=y.properties,E=y.onAnimationEnd,C=b>0?s[b-1]:y,N=j||Object.keys(_);if(typeof S=="function"||S==="spring")return[].concat(IS(g),[o.runJSAnimation.bind(o,{from:C.style,to:_,duration:x,easing:S}),x]);var k=ZL(N,x,S),P=pi(pi(pi({},C.style),_),{},{transition:k});return[].concat(IS(g),[P,x,E]).filter(sBe)};return this.manager.start([c].concat(IS(s.reduce(p,[d,Math.max(h,a)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=nBe());var o=i.begin,s=i.duration,a=i.attributeName,c=i.to,u=i.easing,d=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,p=i.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var g=a?ah({},a,c):c,y=ZL(Object.keys(g),s,u);m.start([d,o,pi(pi({},g),{},{transition:y}),s,f])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var a=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=TBe(i,ABe),u=v.Children.count(o),d=this.state.style;if(typeof o=="function")return o(d);if(!a||u===0||s<=0)return o;var f=function(p){var m=p.props,g=m.style,y=g===void 0?{}:g,b=m.className,x=v.cloneElement(p,pi(pi({},c),{},{style:pi(pi({},y),d),className:b}));return x};return u===1?f(v.Children.only(o)):$.createElement("div",null,v.Children.map(o,function(h){return f(h)}))}}]),n}(v.PureComponent);js.displayName="Animate";js.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};js.propTypes={from:De.oneOfType([De.object,De.string]),to:De.oneOfType([De.object,De.string]),attributeName:De.string,duration:De.number,begin:De.number,easing:De.oneOfType([De.string,De.func]),steps:De.arrayOf(De.shape({duration:De.number.isRequired,style:De.object.isRequired,easing:De.oneOfType([De.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),De.func]),properties:De.arrayOf("string"),onAnimationEnd:De.func})),children:De.oneOfType([De.node,De.func]),isActive:De.bool,canBegin:De.bool,onAnimationEnd:De.func,shouldReAnimate:De.bool,onAnimationStart:De.func,onAnimationReStart:De.func};De.object,De.object,De.object,De.element;De.object,De.object,De.object,De.oneOfType([De.array,De.element]),De.any;function Bp(e){"@babel/helpers - typeof";return Bp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bp(e)}function $x(){return $x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$x.apply(this,arguments)}function qBe(e,t){return GBe(e)||HBe(e,t)||WBe(e,t)||KBe()}function KBe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 689In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WBe(e,t){if(e){if(typeof e=="string")return oF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oF(e,t)}}function oF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HBe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function GBe(e){if(Array.isArray(e))return e}function sF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function aF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sF(Object(n),!0).forEach(function(r){YBe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function YBe(e,t,n){return t=QBe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QBe(e){var t=JBe(e,"string");return Bp(t)=="symbol"?t:t+""}function JBe(e,t){if(Bp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Bp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lF=function(t,n,r,i,o){var s=Math.min(Math.abs(r)/2,Math.abs(i)/2),a=i>=0?1:-1,c=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,d;if(s>0&&o instanceof Array){for(var f=[0,0,0,0],h=0,p=4;h<p;h++)f[h]=o[h]>s?s:o[h];d="M".concat(t,",").concat(n+a*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+c*f[0],",").concat(n)),d+="L ".concat(t+r-c*f[1],",").concat(n),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`, 690 `).concat(t+r,",").concat(n+a*f[1])),d+="L ".concat(t+r,",").concat(n+i-a*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`, 691 `).concat(t+r-c*f[2],",").concat(n+i)),d+="L ".concat(t+c*f[3],",").concat(n+i),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`, 692 `).concat(t,",").concat(n+i-a*f[3])),d+="Z"}else if(s>0&&o===+o&&o>0){var m=Math.min(s,o);d="M ".concat(t,",").concat(n+a*m,` 693 A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+c*m,",").concat(n,` 694 L `).concat(t+r-c*m,",").concat(n,` 695 A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+r,",").concat(n+a*m,` 696 L `).concat(t+r,",").concat(n+i-a*m,` 697 A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+r-c*m,",").concat(n+i,` 698 L `).concat(t+c*m,",").concat(n+i,` 699 A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t,",").concat(n+i-a*m," Z")}else d="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return d},XBe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,s=n.y,a=n.width,c=n.height;if(Math.abs(a)>0&&Math.abs(c)>0){var u=Math.min(o,o+a),d=Math.max(o,o+a),f=Math.min(s,s+c),h=Math.max(s,s+c);return r>=u&&r<=d&&i>=f&&i<=h}return!1},ZBe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},MT=function(t){var n=aF(aF({},ZBe),t),r=v.useRef(),i=v.useState(-1),o=qBe(i,2),s=o[0],a=o[1];v.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var S=r.current.getTotalLength();S&&a(S)}catch{}},[]);var c=n.x,u=n.y,d=n.width,f=n.height,h=n.radius,p=n.className,m=n.animationEasing,g=n.animationDuration,y=n.animationBegin,b=n.isAnimationActive,x=n.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||d===0||f===0)return null;var w=et("recharts-rectangle",p);return x?$.createElement(js,{canBegin:s>0,from:{width:d,height:f,x:c,y:u},to:{width:d,height:f,x:c,y:u},duration:g,animationEasing:m,isActive:x},function(S){var _=S.width,j=S.height,E=S.x,C=S.y;return $.createElement(js,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:g,isActive:b,easing:m},$.createElement("path",$x({},Ye(n,!0),{className:w,d:lF(E,C,_,j,h),ref:r})))}):$.createElement("path",$x({},Ye(n,!0),{className:w,d:lF(c,u,d,f,h)}))};function $C(){return $C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$C.apply(this,arguments)}var $T=function(t){var n=t.cx,r=t.cy,i=t.r,o=t.className,s=et("recharts-dot",o);return n===+n&&r===+r&&i===+i?$.createElement("circle",$C({},Ye(t,!1),tx(t),{className:s,cx:n,cy:r,r:i})):null};function Up(e){"@babel/helpers - typeof";return Up=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Up(e)}var eUe=["x","y","top","left","width","height","className"];function DC(){return DC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DC.apply(this,arguments)}function cF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tUe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
699t%2?cF(Object(n),!0).forEach(function(r){nUe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nUe(e,t,n){return t=rUe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rUe(e){var t=iUe(e,"string");return Up(t)=="symbol"?t:t+""}function iUe(e,t){if(Up(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Up(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oUe(e,t){if(e==null)return{};var n=sUe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var aUe=function(t,n,r,i,o,s){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(s,",").concat(n,"h").concat(r)},lUe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,s=t.top,a=s===void 0?0:s,c=t.left,u=c===void 0?0:c,d=t.width,f=d===void 0?0:d,h=t.height,p=h===void 0?0:h,m=t.className,g=oUe(t,eUe),y=tUe({x:r,y:o,top:a,left:u,width:f,height:p},g);return!fe(r)||!fe(o)||!fe(f)||!fe(p)||!fe(a)||!fe(u)?null:$.createElement("path",DC({},Ye(y,!0),{className:et("recharts-cross",m),d:aUe(r,o,f,p,a,u)}))},cUe=Q8,uUe=cUe(Object.getPrototypeOf,Object),dUe=uUe,fUe=As,hUe=dUe,pUe=Ts,mUe="[object Object]",gUe=Function.prototype,vUe=Object.prototype,q9=gUe.toString,yUe=vUe.hasOwnProperty,xUe=q9.call(Object);function bUe(e){if(!pUe(e)||fUe(e)!=mUe)return!1;var t=hUe(e);if(t===null)return!0;var n=yUe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&q9.call(n)==xUe}var wUe=bUe;const _Ue=ct(wUe);var SUe=As,jUe=Ts,EUe="[object Boolean]";function CUe(e){return e===!0||e===!1||jUe(e)&&SUe(e)==EUe}var NUe=CUe;const PUe=ct(NUe);function zp(e){"@babel/helpers - typeof";return zp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zp(e)}function Dx(){return Dx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dx.apply(this,arguments)}function kUe(e,t){return OUe(e)||RUe(e,t)||TUe(e,t)||AUe()}function AUe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 700In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TUe(e,t){if(e){if(typeof e=="string")return uF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uF(e,t)}}function uF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function RUe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function OUe(e){if(Array.isArray(e))return e}function dF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dF(Object(n),!0).forEach(function(r){IUe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dF(Object(n)).forEac
vendor: 20,591 bytes, line 700
700h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IUe(e,t,n){return t=MUe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MUe(e){var t=$Ue(e,"string");return zp(t)=="symbol"?t:t+""}function $Ue(e,t){if(zp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(zp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hF=function(t,n,r,i,o){var s=r-i,a;return a="M ".concat(t,",").concat(n),a+="L ".concat(t+r,",").concat(n),a+="L ".concat(t+r-s/2,",").concat(n+o),a+="L ".concat(t+r-s/2-i,",").concat(n+o),a+="L ".concat(t,",").concat(n," Z"),a},DUe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},LUe=function(t){var n=fF(fF({},DUe),t),r=v.useRef(),i=v.useState(-1),o=kUe(i,2),s=o[0],a=o[1];v.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var w=r.current.getTotalLength();w&&a(w)}catch{}},[]);var c=n.x,u=n.y,d=n.upperWidth,f=n.lowerWidth,h=n.height,p=n.className,m=n.animationEasing,g=n.animationDuration,y=n.animationBegin,b=n.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||h!==+h||d===0&&f===0||h===0)return null;var x=et("recharts-trapezoid",p);return b?$.createElement(js,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:d,lowerWidth:f,height:h,x:c,y:u},duration:g,animationEasing:m,isActive:b},function(w){var S=w.upperWidth,_=w.lowerWidth,j=w.height,E=w.x,C=w.y;return $.createElement(js,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:g,easing:m},$.createElement("path",Dx({},Ye(n,!0),{className:x,d:hF(E,C,S,_,j),ref:r})))}):$.createElement("g",null,$.createElement("path",Dx({},Ye(n,!0),{className:x,d:hF(c,u,d,f,h)})))},FUe=["option","shapeType","propTransformer","activeClassName","isActive"];function Vp(e){"@babel/helpers - typeof";return Vp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vp(e)}function BUe(e,t){if(e==null)return{};var n=UUe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function pF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pF(Object(n),!0).forEach(function(r){zUe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zUe(e,t,n){return t=VUe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VUe(e){var t=qUe(e,"string");return Vp(t)=="symbol"?t:t+""}function qUe(e,t){if(Vp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Vp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KUe(e,t){return Lx(Lx({},t),e)}function WUe(e,t){return e==="symbols"}function mF(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return $.createElement(MT,n);case"trapezoid":return $.createElement(LUe,n);case"sector":return $.createElement(R9,n);case"symbols":if(WUe(t))return $.createElement(tT,n);break;default:return null}}function HUe(e){return v.isValidElement(e)?e.props:e}function GUe(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?KUe:r,o=e.activeClassName,s=o===void 0?"recharts-active-shape":o,a=e.isActive,c=BUe(e,FUe),u;if(v.isValidElement(t))u=v.cloneElement(t,Lx(Lx({},c),HUe(t)));else if(ze(t))u=t(c);else if(_Ue(t)&&!PUe(t)){var d=i(t,c);u=$.createElement(mF,{shapeType:n,elementProps:d})}else{var f=c;u=$.createElement(mF,{shapeType:n,elementProps:f})}return a?$.createElement(Xt,{className:s},u):u}function j0(e,t){return t!=null&&"trapezoids"in e.props}function E0(e,t){return t!=null&&"sectors"in e.props}function qp(e,t){return t!=null&&"points"in e.props}function YUe(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,o=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&o}function QUe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function JUe(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function XUe(e,t){var n;return j0(e,t)?n=YUe:E0(e,t)?n=QUe:qp(e,t)&&(n=JUe),n}function ZUe(e,t){var n;return j0(e,t)?n="trapezoids":E0(e,t)?n="sectors":qp(e,t)&&(n="points"),n}function e4e(e,t){if(j0(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(E0(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return qp(e,t)?t.payload:{}}function t4e(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=ZUe(n,t),o=e4e(n,t),s=r.filter(function(c,u){var d=w0(o,c),f=n.props[i].filter(function(m){var g=XUe(n,t);return g(m,t)}),h=n.props[i].indexOf(f[f.length-1]),p=u===h;return d&&p}),a=r.indexOf(s[s.length-1]);return a}var n4e=Math.ceil,r4e=Math.max;function i4e(e,t,n,r){for(var i=-1,o=r4e(n4e((t-e)/(n||1)),0),s=Array(o);o--;)s[r?o:++i]=e,e+=n;return s}var o4e=i4e,s4e=mG,gF=1/0,a4e=17976931348623157e292;function l4e(e){if(!e)return e===0?e:0;if(e=s4e(e),e===gF||e===-gF){var t=e<0?-1:1;return t*a4e}return e===e?e:0}var K9=l4e,c4e=o4e,u4e=f0,MS=K9;function d4e(e){return function(t,n,r){return r&&typeof r!="number"&&u4e(t,n,r)&&(n=r=void 0),t=MS(t),n===void 0?(n=t,t=0):n=MS(n),r=r===void 0?t<n?1:-1:MS(r),c4e(t,n,r,e)}}var f4e=d4e,h4e=f4e,p4e=h4e(),m4e=p4e;const Fx=ct(m4e);function Kp(e){"@babel/helpers - typeof";return Kp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kp(e)}function vF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vF(Object(n),!0).forEach(function(r){W9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function W9(e,t,n){return t=g4e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g4e(e){var t=v4e(e,"string");return Kp(t)=="symbol"?t:t+""}function v4e(e,t){if(Kp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Kp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y4e=["Webkit","Moz","O","ms"],x4e=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),i=y4e.reduce(function(o,s){return yF(yF({},o),{},W9({},s+r,n))},{});return i[t]=n,i};function id(e){"@babel/helpers - typeof";return id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},id(e)}function Bx(){return Bx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bx.apply(this,arguments)}function xF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $S(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xF(Object(n),!0).forEach(function(r){_r(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,G9(r.key),r)}}function w4e(e,t,n){return t&&bF(e.prototype,t),n&&bF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _4e(e,t,n){return t=Ux(t),S4e(e,H9()?Reflect.construct(t,n||[],Ux(e).constructor):t.apply(e,n))}function S4e(e,t){if(t&&(id(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j4e(e)}function j4e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(H9=function(){return!!e})()}function Ux(e){return Ux=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ux(e)}function E4e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LC(e,t)}function LC(e,t){return LC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},LC(e,t)}function _r(e,t,n){return t=G9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G9(e){var t=C4e(e,"string");return id(t)=="symbol"?t:t+""}function C4e(e,t){if(id(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(id(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var N4e=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,o=t.x,s=t.width,a=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,u=Ah().domain(Fx(0,c)).range([o,o+s-a]),d=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(i),scale:u,scaleValues:d}},wF=function(t){return t.changedTouches&&!!t.changedTouches.length},od=function(e){function t(n){var r;return b4e(this,t),r=_4e(this,t,[n]),_r(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),_r(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),_r(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,s=i.onDragEnd,a=i.startIndex;s?.({endIndex:o,startIndex:a})}),r.detachDragEndListener()}),_r(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),_r(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),_r(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),_r(r,"handleSlideDragStart",function(i){var o=wF(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return E4e(t,e),w4e(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,s=this.state.scaleValues,a=this.props,c=a.gap,u=a.data,d=u.length-1,f=Math.min(i,o),h=Math.max(i,o),p=t.getIndexInRange(s,f),m=t.getIndexInRange(s,h);return{startIndex:p-p%c,endIndex:m===d?d:m-m%c}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,s=i.tickFormatter,a=i.dataKey,c=Lr(o[r],a,r);return ze(s)?s(c,r):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,s=i.startX,a=i.endX,c=this.props,u=c.x,d=c.width,f=c.travellerWidth,h=c.startIndex,p=c.endIndex,m=c.onChange,g=r.pageX-o;g>0?g=Math.min(g,u+d-f-a,u+d-f-s):g<0&&(g=Math.max(g,u-s,u-a));var y=this.getIndex({startX:s+g,endX:a+g});(y.startIndex!==h||y.endIndex!==p)&&m&&m(y),this.setState({startX:s+g,endX:a+g,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=wF(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,s=i.movingTravellerId,a=i.endX,c=i.startX,u=this.state[s],d=this.props,f=d.x,h=d.width,p=d.travellerWidth,m=d.onChange,g=d.gap,y=d.data,b={startX:this.state.startX,endX:this.state.endX},x=r.pageX-o;x>0?x=Math.min(x,f+h-p-u):x<0&&(x=Math.max(x,f-u)),b[s]=u+x;var w=this.getIndex(b),S=w.startIndex,_=w.endIndex,j=function(){var C=y.length-1;return s==="startX"&&(a>c?S%g===0:_%g===0)||a<c&&_===C||s==="endX"&&(a>c?_%g===0:S%g===0)||a>c&&_===C};this.setState(_r(_r({},s,u+x),"brushMoveStartX",r.pageX),function(){m&&j()&&m(w)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,s=this.state,a=s.scaleValues,c=s.startX,u=s.endX,d=this.state[i],f=a.indexOf(d);if(f!==-1){var h=f+r;if(!(h===-1||h>=a.length)){var p=a[h];i==="startX"&&p>=u||i==="endX"&&p<=c||this.setState(_r({},i,p),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,s=r.width,a=r.height,c=r.fill,u=r.stroke;return $.createElement("rect",{stroke:u,fill:c,x:i,y:o,width:s,height:a})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,s=r.width,a=r.height,c=r.data,u=r.children,d=r.padding,f=v.Children.only(u);return f?$.cloneElement(f,{x:i,y:o,width:s,height:a,margin:d,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,s,a=this,c=this.props,u=c.y,d=c.travellerWidth,f=c.height,h=c.traveller,p=c.ariaLabel,m=c.data,g=c.startIndex,y=c.endIndex,b=Math.max(r,this.props.x),x=$S($S({},Ye(this.props,!1)),{},{x:b,y:u,width:d,height:f}),w=p||"Min value: ".concat((o=m[g])===null||o===void 0?void 0:o.name,", Max value: ").concat((s=m[y])===null||s===void 0?void 0:s.name);return $.createElement(Xt,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(_){["ArrowLeft","ArrowRight"].includes(_.key)&&(_.preventDefault(),_.stopPropagation(),a.handleTravellerMoveKeyboard(_.key==="ArrowRight"?1:-1,i))},onFocus:function(){a.setState({isTravellerFocused:!0})},onBlur:function(){a.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,i){var o=this.props,s=o.y,a=o.height,c=o.stroke,u=o.travellerWidth,d=Math.min(r,i)+u,f=Math.max(Math.abs(i-r)-u,0);return $.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:d,y:s,width:f,height:a})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,s=r.y,a=r.height,c=r.travellerWidth,u=r.stroke,d=this.state,f=d.startX,h=d.endX,p=5,m={pointerEvents:"none",fill:u};return $.createElement(Xt,{className:"recharts-brush-texts"},$.createElement(gx,Bx({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:s+a/2},m),this.getTextOfTick(i)),$.createElement(gx,Bx({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+c+p,y:s+a/2},m),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,s=r.children,a=r.x,c=r.y,u=r.width,d=r.height,f=r.alwaysShowText,h=this.state,p=h.startX,m=h.endX,g=h.isTextActive,y=h.isSlideMoving,b=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!fe(a)||!fe(c)||!fe(u)||!fe(d)||u<=0||d<=0)return null;var w=et("recharts-brush",o),S=$.Children.count(s)===1,_=x4e("userSelect","none");return $.createElement(Xt,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:_},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(g||y||b||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,s=r.width,a=r.height,c=r.stroke,u=Math.floor(o+a/2)-1;return $.createElement($.Fragment,null,$.createElement("rect",{x:i,y:o,width:s,height:a,fill:c,stroke:"none"}),$.createElement("line",{x1:i+1,y1:u,x2:i+s-1,y2:u,fill:"none",stroke:"#fff"}),$.createElement("line",{x1:i+1,y1:u+2,x2:i+s-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return $.isValidElement(r)?o=$.cloneElement(r,i):ze(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,s=r.width,a=r.x,c=r.travellerWidth,u=r.updateId,d=r.startIndex,f=r.endIndex;if(o!==i.prevData||u!==i.prevUpdateId)return $S({prevData:o,prevTravellerWidth:c,prevUpdateId:u,prevX:a,prevWidth:s},o&&o.length?N4e({data:o,width:s,x:a,travellerWidth:c,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||a!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([a,a+s-c]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:o,prevTravellerWidth:c,prevUpdateId:u,prevX:a,prevWidth:s,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,s=0,a=o-1;a-s>1;){var c=Math.floor((s+a)/2);r[c]>i?a=c:s=c}return i>=r[a]?a:s}}])}(v.PureComponent);_r(od,"displayName","Brush");_r(od,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var P4e=lT;function k4e(e,t){var n;return P4e(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var A4e=k4e,T4e=z8,R4e=Qa,O4e=A4e,I4e=yr,M4e=f0;function $4e(e,t,n){var r=I4e(e)?T4e:O4e;return n&&M4e(e,t,n)&&(t=void 0),r(e,R4e(t))}var D4e=$4e;const L4e=ct(D4e);var go=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},_F=uG;function F4e(e,t,n){t=="__proto__"&&_F?_F(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var B4e=F4e,U4e=B4e,z4e=lG,V4e=Qa;function q4e(e,t){var n={};return t=V4e(t),z4e(e,function(r,i,o){U4e(n,i,t(r,i,o))}),n}var K4e=q4e;const W4e=ct(K4e);function H4e(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;
700)if(!t(e[n],n,e))return!1;return!0}var G4e=H4e,Y4e=lT;function Q4e(e,t){var n=!0;return Y4e(e,function(r,i,o){return n=!!t(r,i,o),n}),n}var J4e=Q4e,X4e=G4e,Z4e=J4e,eze=Qa,tze=yr,nze=f0;function rze(e,t,n){var r=tze(e)?X4e:Z4e;return n&&nze(e,t,n)&&(t=void 0),r(e,eze(t))}var ize=rze;const Y9=ct(ize);var oze=["x","y"];function Wp(e){"@babel/helpers - typeof";return Wp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wp(e)}function FC(){return FC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FC.apply(this,arguments)}function SF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Kf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SF(Object(n),!0).forEach(function(r){sze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sze(e,t,n){return t=aze(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aze(e){var t=lze(e,"string");return Wp(t)=="symbol"?t:t+""}function lze(e,t){if(Wp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Wp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cze(e,t){if(e==null)return{};var n=uze(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uze(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function dze(e,t){var n=e.x,r=e.y,i=cze(e,oze),o="".concat(n),s=parseInt(o,10),a="".concat(r),c=parseInt(a,10),u="".concat(t.height||i.height),d=parseInt(u,10),f="".concat(t.width||i.width),h=parseInt(f,10);return Kf(Kf(Kf(Kf(Kf({},t),i),s?{x:s}:{}),c?{y:c}:{}),{},{height:d,width:h,name:t.name,radius:t.radius})}function jF(e){return $.createElement(GUe,FC({shapeType:"rectangle",propTransformer:dze,activeClassName:"recharts-active-bar"},e))}var fze=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||Yt(!1),n)}},hze=["value","background"],Q9;function sd(e){"@babel/helpers - typeof";return sd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sd(e)}function pze(e,t){if(e==null)return{};var n=mze(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mze(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function zx(){return zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zx.apply(this,arguments)}function EF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
vendor: 21,586 bytes, lines 700-701
700t%2?EF(Object(n),!0).forEach(function(r){la(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,X9(r.key),r)}}function vze(e,t,n){return t&&CF(e.prototype,t),n&&CF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yze(e,t,n){return t=Vx(t),xze(e,J9()?Reflect.construct(t,n||[],Vx(e).constructor):t.apply(e,n))}function xze(e,t){if(t&&(sd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bze(e)}function bze(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(J9=function(){return!!e})()}function Vx(e){return Vx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vx(e)}function wze(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BC(e,t)}function BC(e,t){return BC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},BC(e,t)}function la(e,t,n){return t=X9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X9(e){var t=_ze(e,"string");return sd(t)=="symbol"?t:t+""}function _ze(e,t){if(sd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(sd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var So=function(e){function t(){var n;gze(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=yze(this,t,[].concat(i)),la(n,"state",{isAnimationFinished:!1}),la(n,"id",Vm("recharts-bar-")),la(n,"handleAnimationEnd",function(){var s=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),s&&s()}),la(n,"handleAnimationStart",function(){var s=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),s&&s()}),n}return wze(t,e),vze(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,o=this.props,s=o.shape,a=o.dataKey,c=o.activeIndex,u=o.activeBar,d=Ye(this.props,!1);return r&&r.map(function(f,h){var p=h===c,m=p?u:s,g=Zt(Zt(Zt({},d),f),{},{isActive:p,option:m,index:h,dataKey:a,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return $.createElement(Xt,zx({className:"recharts-bar-rectangle"},nx(i.props,f,h),{key:"rectangle-".concat(f?.x,"-").concat(f?.y,"-").concat(f?.value)}),$.createElement(jF,g))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,o=i.data,s=i.layout,a=i.isAnimationActive,c=i.animationBegin,u=i.animationDuration,d=i.animationEasing,f=i.animationId,h=this.state.prevData;return $.createElement(js,{begin:c,duration:u,isActive:a,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var m=p.t,g=o.map(function(y,b){var x=h&&h[b];if(x){var w=Ni(x.x,y.x),S=Ni(x.y,y.y),_=Ni(x.width,y.width),j=Ni(x.height,y.height);return Zt(Zt({},y),{},{x:w(m),y:S(m),width:_(m),height:j(m)})}if(s==="horizontal"){var E=Ni(0,y.height),C=E(m);return Zt(Zt({},y),{},{y:y.y+y.height-C,height:C})}var N=Ni(0,y.width),k=N(m);return Zt(Zt({},y),{},{width:k})});return $.createElement(Xt,null,r.renderRectanglesStatically(g))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,o=r.isAnimationActive,s=this.state.prevData;return o&&i&&i.length&&(!s||!w0(s,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,o=i.data,s=i.dataKey,a=i.activeIndex,c=Ye(this.props.background,!1);return o.map(function(u,d){u.value;var f=u.background,h=pze(u,hze);if(!f)return null;var p=Zt(Zt(Zt(Zt(Zt({},h),{},{fill:"#eee"},f),c),nx(r.props,u,d)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:s,index:d,className:"recharts-bar-background-rectangle"});return $.createElement(jF,zx({key:"background-bar-".concat(d),option:r.props.background,isActive:d===a},p))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,s=o.data,a=o.xAxis,c=o.yAxis,u=o.layout,d=o.children,f=ri(d,Qm);if(!f)return null;var h=u==="vertical"?s[0].height/2:s[0].width/2,p=function(y,b){var x=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:x,errorVal:Lr(y,b)}},m={clipPath:r?"url(#clipPath-".concat(i,")"):null};return $.createElement(Xt,m,f.map(function(g){return $.cloneElement(g,{key:"error-bar-".concat(i,"-").concat(g.props.dataKey),data:s,xAxis:a,yAxis:c,layout:u,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,o=r.data,s=r.className,a=r.xAxis,c=r.yAxis,u=r.left,d=r.top,f=r.width,h=r.height,p=r.isAnimationActive,m=r.background,g=r.id;if(i||!o||!o.length)return null;var y=this.state.isAnimationFinished,b=et("recharts-bar",s),x=a&&a.allowDataOverflow,w=c&&c.allowDataOverflow,S=x||w,_=Ve(g)?this.id:g;return $.createElement(Xt,{className:b},x||w?$.createElement("defs",null,$.createElement("clipPath",{id:"clipPath-".concat(_)},$.createElement("rect",{x:x?u:u-f/2,y:w?d:d-h/2,width:x?f:f*2,height:w?h:h*2}))):null,$.createElement(Xt,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(_,")"):null},m?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,_),(!p||y)&&_a.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])}(v.PureComponent);Q9=So;la(So,"displayName","Bar");la(So,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!os.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});la(So,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,o=e.xAxis,s=e.yAxis,a=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=iFe(r,n);if(!p)return null;var m=t.layout,g=n.type.defaultProps,y=g!==void 0?Zt(Zt({},g),n.props):n.props,b=y.dataKey,x=y.children,w=y.minPointSize,S=m==="horizontal"?s:o,_=u?S.scale.domain():null,j=dFe({numericAxis:S}),E=ri(x,vG),C=f.map(function(N,k){var P,A,L,R,D,O;u?P=oFe(u[d+k],_):(P=Lr(N,b),Array.isArray(P)||(P=[j,P]));var F=fze(w,Q9.defaultProps.minPointSize)(P[1],k);if(m==="horizontal"){var T,M=[s.scale(P[0]),s.scale(P[1])],V=M[0],B=M[1];A=EL({axis:o,ticks:a,bandSize:i,offset:p.offset,entry:N,index:k}),L=(T=B??V)!==null&&T!==void 0?T:void 0,R=p.size;var I=V-B;if(D=Number.isNaN(I)?0:I,O={x:A,y:s.y,width:R,height:s.height},Math.abs(F)>0&&Math.abs(D)<Math.abs(F)){var z=Ai(D||F)*(Math.abs(F)-Math.abs(D));L-=z,D+=z}}else{var H=[o.scale(P[0]),o.scale(P[1])],de=H[0],ge=H[1];if(A=de,L=EL({axis:s,ticks:c,bandSize:i,offset:p.offset,entry:N,index:k}),R=ge-de,D=p.size,O={x:o.x,y:L,width:o.width,height:D},Math.abs(F)>0&&Math.abs(R)<Math.abs(F)){var te=Ai(R||F)*(Math.abs(F)-Math.abs(R));R+=te}}return Zt(Zt(Zt({},N),{},{x:A,y:L,width:R,height:D,value:u?P:P[1],payload:N,background:O},E&&E[k]&&E[k].props),{},{tooltipPayload:[P9(n,N)],tooltipPosition:{x:A+R/2,y:L+D/2}})});return Zt({data:C,layout:m},h)});function Hp(e){"@babel/helpers - typeof";return Hp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hp(e)}function Sze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z9(r.key),r)}}function jze(e,t,n){return t&&NF(e.prototype,t),n&&NF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function PF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Si(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PF(Object(n),!0).forEach(function(r){C0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C0(e,t,n){return t=Z9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z9(e){var t=Eze(e,"string");return Hp(t)=="symbol"?t:t+""}function Eze(e,t){if(Hp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Hp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var e7=function(t,n,r,i,o){var s=t.width,a=t.height,c=t.layout,u=t.children,d=Object.keys(n),f={left:r.left,leftMirror:r.left,right:s-r.right,rightMirror:s-r.right,top:r.top,topMirror:r.top,bottom:a-r.bottom,bottomMirror:a-r.bottom},h=!!jr(u,So);return d.reduce(function(p,m){var g=n[m],y=g.orientation,b=g.domain,x=g.padding,w=x===void 0?{}:x,S=g.mirror,_=g.reversed,j="".concat(y).concat(S?"Mirror":""),E,C,N,k,P;if(g.type==="number"&&(g.padding==="gap"||g.padding==="no-gap")){var A=b[1]-b[0],L=1/0,R=g.categoricalDomain.sort();if(R.forEach(function(H,de){de>0&&(L=Math.min((H||0)-(R[de-1]||0),L))}),Number.isFinite(L)){var D=L/A,O=g.layout==="vertical"?r.height:r.width;if(g.padding==="gap"&&(E=D*O/2),g.padding==="no-gap"){var F=Ti(t.barCategoryGap,D*O),T=D*O/2;E=T-F-(T-F)/O*F}}}i==="xAxis"?C=[r.left+(w.left||0)+(E||0),r.left+r.width-(w.right||0)-(E||0)]:i==="yAxis"?C=c==="horizontal"?[r.top+r.height-(w.bottom||0),r.top+(w.top||0)]:[r.top+(w.top||0)+(E||0),r.top+r.height-(w.bottom||0)-(E||0)]:C=g.range,_&&(C=[C[1],C[0]]);var M=j9(g,o,h),V=M.scale,B=M.realScaleType;V.domain(b).range(C),E9(V);var I=C9(V,Si(Si({},g),{},{realScaleType:B}));i==="xAxis"?(P=y==="top"&&!S||y==="bottom"&&S,N=r.left,k=f[j]-P*g.height):i==="yAxis"&&(P=y==="left"&&!S||y==="right"&&S,N=f[j]-P*g.width,k=r.top);var z=Si(Si(Si({},g),I),{},{realScaleType:B,x:N,y:k,scale:V,width:i==="xAxis"?r.width:g.width,height:i==="yAxis"?r.height:g.height});return z.bandSize=Ax(z,I),!g.hide&&i==="xAxis"?f[j]+=(P?-1:1)*z.height:g.hide||(f[j]+=(P?-1:1)*z.width),Si(Si({},p),{},C0({},m,z))},{})},t7=function(t,n){var r=t.x,i=t.y,o=n.x,s=n.y;return{x:Math.min(r,o),y:Math.min(i,s),width:Math.abs(o-r),height:Math.abs(s-i)}},Cze=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return t7({x:n,y:r},{x:i,y:o})},n7=function(){function e(t){Sze(this,e),this.scale=t}return jze(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+s}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(n)+a}default:return this.scale(n)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();C0(n7,"EPS",1e-4);var DT=function(t){var n=Object.keys(t).reduce(function(r,i){return Si(Si({},r),{},C0({},i,n7.create(t[i])))},{});return Si(Si({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=o.bandAware,a=o.position;return W4e(i,function(c,u){return n[u].apply(c,{bandAware:s,position:a})})},isInRange:function(i){return Y9(i,function(o,s){return n[s].isInRange(o)})}})};function Nze(e){return(e%180+180)%180}var Pze=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Nze(i),s=o*Math.PI/180,a=Math.atan(r/n),c=s>a&&s<Math.PI-a?r/Math.sin(s):n/Math.cos(s);return Math.abs(c)},kze=Qa,Aze=qm,Tze=u0;function Rze(e){return function(t,n,r){var i=Object(t);if(!Aze(t)){var o=kze(n);t=Tze(t),n=function(a){return o(i[a],a,i)}}var s=e(t,n,r);return s>-1?i[o?t[s]:s]:void 0}}var Oze=Rze,Ize=K9;function Mze(e){var t=Ize(e),n=t%1;return t===t?n?t-n:t:0}var $ze=Mze,Dze=nG,Lze=Qa,Fze=$ze,Bze=Math.max;function Uze(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Fze(n);return i<0&&(i=Bze(r+i,0)),Dze(e,Lze(t),i)}var zze=Uze,Vze=Oze,qze=zze,Kze=Vze(qze),Wze=Kze;const Hze=ct(Wze);var Gze=D1e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),LT=v.createContext(void 0),FT=v.createContext(void 0),r7=v.createContext(void 0),i7=v.createContext({}),o7=v.createContext(void 0),s7=v.createContext(0),a7=v.createContext(0),kF=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,s=t.clipPathId,a=t.children,c=t.width,u=t.height,d=Gze(o);return $.createElement(LT.Provider,{value:r},$.createElement(FT.Provider,{value:i},$.createElement(i7.Provider,{value:o},$.createElement(r7.Provider,{value:d},$.createElement(o7.Provider,{value:s},$.createElement(s7.Provider,{value:u},$.createElement(a7.Provider,{value:c},a)))))))},Yze=function(){return v.useContext(o7)},l7=function(t){var n=v.useContext(LT);n==null&&Yt(!1);var r=n[t];return r==null&&Yt(!1),r},Qze=function(){var t=v.useContext(LT);return ia(t)},Jze=function(){var t=v.useContext(FT),n=Hze(t,function(r){return Y9(r.domain,Number.isFinite)});return n||ia(t)},c7=function(t){var n=v.useContext(FT);n==null&&Yt(!1);var r=n[t];return r==null&&Yt(!1),r},Xze=function(){var t=v.useContext(r7);return t},Zze=function(){return v.useContext(i7)},BT=function(){return v.useContext(a7)},UT=function(){return v.useContext(s7)};function ad(e){"@babel/helpers - typeof";return ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ad(e)}function eVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tVe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d7(r.key),r)}}function nVe(e,t,n){return t&&tVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function rVe(e,t,n){return t=qx(t),iVe(e,u7()?Reflect.construct(t,n||[],qx(e).constructor):t.apply(e,n))}function iVe(e,t){if(t&&(ad(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oVe(e)}function oVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(u7=function(){return!!e})()}function qx(e){return qx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qx(e)}function sVe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&UC(e,t)}function UC(e,t){return UC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},UC(e,t)}function AF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function TF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AF(Object(n),!0).forEach(function(r){zT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zT(e,t,n){return t=d7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d7(e){var t=aVe(e,"string");return ad(t)=="symbol"?t:t+""}function aVe(e,t){if(ad(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ad(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lVe(e,t){return fVe(e)||dVe(e,t)||uVe(e,t)||cVe()}function cVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 701In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uVe(e,t){if(e){if(typeof e=="string")return RF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return RF(e,t)}}function RF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dVe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function fVe(e){if(Array.isArray(e))return e}function zC(){return zC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zC.apply(this,arguments)}var hVe=function(t,n){var r;return $.isValidElement(t)?r=$.cloneElement(t,n):ze(t)?r=t(n):r=$.createElement("line",zC({},n,{className:"recharts-reference-line-line"})),r},pVe=function(t,n,r,i,o,s,a,c,u){var d=o.x,f=o.y,h=o.width,p=o.height;if(r){var m=u.y,g=t.y.apply(m,{position:s});if(go(u,"discard")&&!t.y.isInRange(g))return null;var y=[{x:d+h,y:g},{x:d,y:g}];return c==="left"?y.reverse():y}if(n){var b=u.x,x=t.x.apply(b,{position:s});if(go(u,"discard")&&!t.x.isInRange(x))return null;var w=[{x,y:f+p},{x,y:f}];return a==="top"?w.reverse():w}if(i){var S=u.segment,_=S.map(function(j){return t.apply(j,{position:s})});return go(u,"discard")&&L4e(_,function(j){return!t.isInRange(j)})?null:_}return null};function mVe(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,o=e.yAxisId,s=e.shape,a=e.className,c=e.alwaysShow,u=Yze(),d=l7(i),f=c7(o),h=Xze();if(!u||!h)return null;is(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=DT({x:d.scale,y:f.scale}),m=cn(t),g=cn(n),y=r&&r.length===2,b=pVe(p,m,g,y,h,e.position,d.orientation,f.orientation,e);if(!b)return null;var x=lVe(b,2),w=x[0],S=w.x,_=w.y,j=x[1],E=j.x,C=j.y,N=go(e,"hidden")?"url(#".concat(u,")"):void 0,k=TF(TF({clipPath:N},Ye(e,!0)),{},{x1:S,y1:_,x2:E,y2:C});return $.createElement(Xt,{className:et("recharts-reference-line",a)},hVe(s,k),Rn.renderCallByParent(e,Cze({x1:S,y1:_,x2:E,y2:C})))}var VT=function(e){function t(){return eVe(this,t),rVe(this,t,arguments)}return sVe(t,e),nVe(t,[{key:"render",value:function(){return $.createElement(mVe,this.props)}}])}($.Component);zT(VT,"displayName","ReferenceLine");zT(VT,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function VC(){return VC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},VC.apply(this,arguments)}function ld(e){"@babel/helpers - typeof";return ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ld(e)}function OF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function IF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
701t%2?OF(Object(n),!0).forEach(function(r){N0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vVe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h7(r.key),r)}}function yVe(e,t,n){return t&&vVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xVe(e,t,n){return t=Kx(t),bVe(e,f7()?Reflect.construct(t,n||[],Kx(e).constructor):t.apply(e,n))}function bVe(e,t){if(t&&(ld(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wVe(e)}function wVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(f7=function(){return!!e})()}
vendor: 82,858 bytes, lines 701-705
701function Kx(e){return Kx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kx(e)}function _Ve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qC(e,t)}function qC(e,t){return qC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},qC(e,t)}function N0(e,t,n){return t=h7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h7(e){var t=SVe(e,"string");return ld(t)=="symbol"?t:t+""}function SVe(e,t){if(ld(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ld(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jVe=function(t){var n=t.x,r=t.y,i=t.xAxis,o=t.yAxis,s=DT({x:i.scale,y:o.scale}),a=s.apply({x:n,y:r},{bandAware:!0});return go(t,"discard")&&!s.isInRange(a)?null:a},P0=function(e){function t(){return gVe(this,t),xVe(this,t,arguments)}return _Ve(t,e),yVe(t,[{key:"render",value:function(){var r=this.props,i=r.x,o=r.y,s=r.r,a=r.alwaysShow,c=r.clipPathId,u=cn(i),d=cn(o);if(is(a===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!d)return null;var f=jVe(this.props);if(!f)return null;var h=f.x,p=f.y,m=this.props,g=m.shape,y=m.className,b=go(this.props,"hidden")?"url(#".concat(c,")"):void 0,x=IF(IF({clipPath:b},Ye(this.props,!0)),{},{cx:h,cy:p});return $.createElement(Xt,{className:et("recharts-reference-dot",y)},t.renderDot(g,x),Rn.renderCallByParent(this.props,{x:h-s,y:p-s,width:2*s,height:2*s}))}}])}($.Component);N0(P0,"displayName","ReferenceDot");N0(P0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});N0(P0,"renderDot",function(e,t){var n;return $.isValidElement(e)?n=$.cloneElement(e,t):ze(e)?n=e(t):n=$.createElement($T,VC({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function KC(){return KC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KC.apply(this,arguments)}function cd(e){"@babel/helpers - typeof";return cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cd(e)}function MF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $F(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MF(Object(n),!0).forEach(function(r){k0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CVe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m7(r.key),r)}}function NVe(e,t,n){return t&&CVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PVe(e,t,n){return t=Wx(t),kVe(e,p7()?Reflect.construct(t,n||[],Wx(e).constructor):t.apply(e,n))}function kVe(e,t){if(t&&(cd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AVe(e)}function AVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(p7=function(){return!!e})()}function Wx(e){return Wx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wx(e)}function TVe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WC(e,t)}function WC(e,t){return WC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},WC(e,t)}function k0(e,t,n){return t=m7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m7(e){var t=RVe(e,"string");return cd(t)=="symbol"?t:t+""}function RVe(e,t){if(cd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(cd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OVe=function(t,n,r,i,o){var s=o.x1,a=o.x2,c=o.y1,u=o.y2,d=o.xAxis,f=o.yAxis;if(!d||!f)return null;var h=DT({x:d.scale,y:f.scale}),p={x:t?h.x.apply(s,{position:"start"}):h.x.rangeMin,y:r?h.y.apply(c,{position:"start"}):h.y.rangeMin},m={x:n?h.x.apply(a,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(u,{position:"end"}):h.y.rangeMax};return go(o,"discard")&&(!h.isInRange(p)||!h.isInRange(m))?null:t7(p,m)},A0=function(e){function t(){return EVe(this,t),PVe(this,t,arguments)}return TVe(t,e),NVe(t,[{key:"render",value:function(){var r=this.props,i=r.x1,o=r.x2,s=r.y1,a=r.y2,c=r.className,u=r.alwaysShow,d=r.clipPathId;is(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=cn(i),h=cn(o),p=cn(s),m=cn(a),g=this.props.shape;if(!f&&!h&&!p&&!m&&!g)return null;var y=OVe(f,h,p,m,this.props);if(!y&&!g)return null;var b=go(this.props,"hidden")?"url(#".concat(d,")"):void 0;return $.createElement(Xt,{className:et("recharts-reference-area",c)},t.renderRect(g,$F($F({clipPath:b},Ye(this.props,!0)),y)),Rn.renderCallByParent(this.props,y))}}])}($.Component);k0(A0,"displayName","ReferenceArea");k0(A0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});k0(A0,"renderRect",function(e,t){var n;return $.isValidElement(e)?n=$.cloneElement(e,t):ze(e)?n=e(t):n=$.createElement(MT,KC({},t,{className:"recharts-reference-area-rect"})),n});function g7(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function IVe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Pze(r,n)}function MVe(e,t,n){var r=n==="width",i=e.x,o=e.y,s=e.width,a=e.height;return t===1?{start:r?i:o,end:r?i+s:o+a}:{start:r?i+s:o+a,end:r?i:o}}function Hx(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function $Ve(e,t){return g7(e,t+1)}function DVe(e,t,n,r,i){for(var o=(r||[]).slice(),s=t.start,a=t.end,c=0,u=1,d=s,f=function(){var m=r?.[c];if(m===void 0)return{v:g7(r,u)};var g=c,y,b=function(){return y===void 0&&(y=n(m,g)),y},x=m.coordinate,w=c===0||Hx(e,x,b,d,a);w||(c=0,d=s,u+=1),w&&(d=x+e*(b()/2+i),c+=u)},h;u<=o.length;)if(h=f(),h)return h.v;return[]}function Gp(e){"@babel/helpers - typeof";return Gp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gp(e)}function DF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DF(Object(n),!0).forEach(function(r){LVe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LVe(e,t,n){return t=FVe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FVe(e){var t=BVe(e,"string");return Gp(t)=="symbol"?t:t+""}function BVe(e,t){if(Gp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Gp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UVe(e,t,n,r,i){for(var o=(r||[]).slice(),s=o.length,a=t.start,c=t.end,u=function(h){var p=o[h],m,g=function(){return m===void 0&&(m=n(p,h)),m};if(h===s-1){var y=e*(p.coordinate+e*g()/2-c);o[h]=p=Nn(Nn({},p),{},{tickCoord:y>0?p.coordinate-y*e:p.coordinate})}else o[h]=p=Nn(Nn({},p),{},{tickCoord:p.coordinate});var b=Hx(e,p.tickCoord,g,a,c);b&&(c=p.tickCoord-e*(g()/2+i),o[h]=Nn(Nn({},p),{},{isShow:!0}))},d=s-1;d>=0;d--)u(d);return o}function zVe(e,t,n,r,i,o){var s=(r||[]).slice(),a=s.length,c=t.start,u=t.end;if(o){var d=r[a-1],f=n(d,a-1),h=e*(d.coordinate+e*f/2-u);s[a-1]=d=Nn(Nn({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate});var p=Hx(e,d.tickCoord,function(){return f},c,u);p&&(u=d.tickCoord-e*(f/2+i),s[a-1]=Nn(Nn({},d),{},{isShow:!0}))}for(var m=o?a-1:a,g=function(x){var w=s[x],S,_=function(){return S===void 0&&(S=n(w,x)),S};if(x===0){var j=e*(w.coordinate-e*_()/2-c);s[x]=w=Nn(Nn({},w),{},{tickCoord:j<0?w.coordinate-j*e:w.coordinate})}else s[x]=w=Nn(Nn({},w),{},{tickCoord:w.coordinate});var E=Hx(e,w.tickCoord,_,c,u);E&&(c=w.tickCoord+e*(_()/2+i),s[x]=Nn(Nn({},w),{},{isShow:!0}))},y=0;y<m;y++)g(y);return s}function qT(e,t,n){var r=e.tick,i=e.ticks,o=e.viewBox,s=e.minTickGap,a=e.orientation,c=e.interval,u=e.tickFormatter,d=e.unit,f=e.angle;if(!i||!i.length||!r)return[];if(fe(c)||os.isSsr)return $Ve(i,typeof c=="number"&&fe(c)?c:0);var h=[],p=a==="top"||a==="bottom"?"width":"height",m=d&&p==="width"?kh(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},g=function(w,S){var _=ze(u)?u(w.value,S):w.value;return p==="width"?IVe(kh(_,{fontSize:t,letterSpacing:n}),m,f):kh(_,{fontSize:t,letterSpacing:n})[p]},y=i.length>=2?Ai(i[1].coordinate-i[0].coordinate):1,b=MVe(o,y,p);return c==="equidistantPreserveStart"?DVe(y,b,g,i,s):(c==="preserveStart"||c==="preserveStartEnd"?h=zVe(y,b,g,i,s,c==="preserveStartEnd"):h=UVe(y,b,g,i,s),h.filter(function(x){return x.isShow}))}var VVe=["viewBox"],qVe=["viewBox"],KVe=["ticks"];function ud(e){"@babel/helpers - typeof";return ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ud(e)}function eu(){return eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eu.apply(this,arguments)}function LF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LF(Object(n),!0).forEach(function(r){KT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DS(e,t){if(e==null)return{};var n=WVe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WVe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function HVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y7(r.key),r)}}function GVe(e,t,n){return t&&FF(e.prototype,t),n&&FF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function YVe(e,t,n){return t=Gx(t),QVe(e,v7()?Reflect.construct(t,n||[],Gx(e).constructor):t.apply(e,n))}function QVe(e,t){if(t&&(ud(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JVe(e)}function JVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(v7=function(){return!!e})()}function Gx(e){return Gx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gx(e)}function XVe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HC(e,t)}function HC(e,t){return HC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},HC(e,t)}function KT(e,t,n){return t=y7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y7(e){var t=ZVe(e,"string");return ud(t)=="symbol"?t:t+""}function ZVe(e,t){if(ud(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ud(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var df=function(e){function t(n){var r;return HVe(this,t),r=YVe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return XVe(t,e),GVe(t,[{key:"shouldComponentUpdate",value:function(r,i){var o=r.viewBox,s=DS(r,VVe),a=this.props,c=a.viewBox,u=DS(a,qVe);return!_u(o,c)||!_u(s,u)||!_u(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,o=i.x,s=i.y,a=i.width,c=i.height,u=i.orientation,d=i.tickSize,f=i.mirror,h=i.tickMargin,p,m,g,y,b,x,w=f?-1:1,S=r.tickSize||d,_=fe(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":p=m=r.coordinate,y=s+ +!f*c,g=y-w*S,x=g-w*h,b=_;break;case"left":g=y=r.coordinate,m=o+ +!f*a,p=m-w*S,b=p-w*h,x=_;break;case"right":g=y=r.coordinate,m=o+ +f*a,p=m+w*S,b=p+w*h,x=_;break;default:p=m=r.coordinate,y=s+ +f*c,g=y+w*S,x=g+w*h,b=_;break}return{line:{x1:p,y1:g,x2:m,y2:y},tick:{x:b,y:x}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,s;switch(i){case"left":s=o?"start":"end";break;case"right":s=o?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,s="end";switch(i){case"left":case"right":s="middle";break;case"top":s=o?"start":"end";break;default:s=o?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,o=r.y,s=r.width,a=r.height,c=r.orientation,u=r.mirror,d=r.axisLine,f=Kn(Kn(Kn({},Ye(this.props,!1)),Ye(d,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var h=+(c==="top"&&!u||c==="bottom"&&u);f=Kn(Kn({},f),{},{x1:i,y1:o+h*a,x2:i+s,y2:o+h*a})}else{var p=+(c==="left"&&!u||c==="right"&&u);f=Kn(Kn({},f),{},{x1:i+p*s,y1:o,x2:i+p*s,y2:o+a})}return $.createElement("line",eu({},f,{className:et("recharts-cartesian-axis-line",ni(d,"className"))}))}},{key:"renderTicks",value:function(r,i,o){var s=this,a=this.props,c=a.tickLine,u=a.stroke,d=a.tick,f=a.tickFormatter,h=a.unit,p=qT(Kn(Kn({},this.props),{},{ticks:r}),i,o),m=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),y=Ye(this.props,!1),b=Ye(d,!1),x=Kn(Kn({},y),{},{fill:"none"},Ye(c,!1)),w=p.map(function(S,_){var j=s.getTickLineCoord(S),E=j.line,C=j.tick,N=Kn(Kn(Kn(Kn({textAnchor:m,verticalAnchor:g},y),{},{stroke:"none",fill:u},b),C),{},{index:_,payload:S,visibleTicksCount:p.length,tickFormatter:f});return $.createElement(Xt,eu({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},nx(s.props,S,_)),c&&$.createElement("line",eu({},x,E,{className:et("recharts-cartesian-axis-tick-line",ni(c,"className"))})),d&&t.renderTickItem(d,N,"".concat(ze(f)?f(S.value,_):S.value).concat(h||"")))});return $.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var r=this,i=this.props,o=i.axisLine,s=i.width,a=i.height,c=i.ticksGenerator,u=i.className,d=i.hide;if(d)return null;var f=this.props,h=f.ticks,p=DS(f,KVe),m=h;return ze(c)&&(m=h&&h.length>0?c(this.props):c(p)),s<=0||a<=0||!m||!m.length?null:$.createElement(Xt,{className:et("recharts-cartesian-axis",u),ref:function(y){r.layerReference=y}},o&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),Rn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var s;return $.isValidElement(r)?s=$.cloneElement(r,i):ze(r)?s=r(i):s=$.createElement(gx,eu({},i,{className:"recharts-cartesian-axis-tick-value"}),o),s}}])}(v.Component);KT(df,"displayName","CartesianAxis");KT(df,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var e5e=["x1","y1","x2","y2","key"],t5e=["offset"];function Xl(e){"@babel/helpers - typeof";return Xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xl(e)}function BF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function On(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BF(Object(n),!0).forEach(function(r){n5e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n5e(e,t,n){return t=r5e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r5e(e){var t=i5e(e,"string");return Xl(t)=="symbol"?t:t+""}function i5e(e,t){if(Xl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function El(){return El=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},El.apply(this,arguments)}function UF(e,t){if(e==null)return{};var n=o5e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function o5e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var s5e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,s=t.width,a=t.height,c=t.ry;return $.createElement("rect",{x:i,y:o,ry:c,width:s,height:a,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function x7(e,t){var n;if($.isValidElement(e))n=$.cloneElement(e,t);else if(ze(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,s=t.y2,a=t.key,c=UF(t,e5e),u=Ye(c,!1);u.offset;var d=UF(u,t5e);n=$.createElement("line",El({},d,{x1:r,y1:i,x2:o,y2:s,fill:"none",key:a}))}return n}function a5e(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var s=o.map(function(a,c){var u=On(On({},e),{},{x1:t,y1:a,x2:t+n,y2:a,key:"line-".concat(c),index:c});return x7(i,u)});return $.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function l5e(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var s=o.map(function(a,c){var u=On(On({},e),{},{x1:a,y1:t,x2:a,y2:t+n,key:"line-".concat(c),index:c});return x7(i,u)});return $.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function c5e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,s=e.height,a=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var d=a.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var m=!d[p+1],g=m?i+s-h:d[p+1]-h;if(g<=0)return null;var y=p%t.length;return $.createElement("rect",{key:"react-".concat(p),y:h,x:r,height:g,width:o,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return $.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function u5e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,s=e.y,a=e.width,c=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var d=u.map(function(h){return Math.round(h+o-o)}).sort(function(h,p){return h-p});o!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var m=!d[p+1],g=m?o+a-h:d[p+1]-h;if(g<=0)return null;var y=p%r.length;return $.createElement("rect",{key:"react-".concat(p),x:h,y:s,width:g,height:c,stroke:"none",fill:r[y],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return $.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var d5e=function(t,n){var r=t.xAxis,i=t.width,o=t.height,s=t.offset;return S9(qT(On(On(On({},df.defaultProps),r),{},{ticks:Xo(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),s.left,s.left+s.width,n)},f5e=function(t,n){var r=t.yAxis,i=t.width,o=t.height,s=t.offset;return S9(qT(On(On(On({},df.defaultProps),r),{},{ticks:Xo(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),s.top,s.top+s.height,n)},Nc={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function ff(e){var t,n,r,i,o,s,a=BT(),c=UT(),u=Zze(),d=On(On({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Nc.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Nc.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Nc.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Nc.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Nc.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:Nc.verticalFill,x:fe(e.x)?e.x:u.left,y:fe(e.y)?e.y:u.top,width:fe(e.width)?e.width:u.width,height:fe(e.height)?e.height:u.height}),f=d.x,h=d.y,p=d.width,m=d.height,g=d.syncWithTicks,y=d.horizontalValues,b=d.verticalValues,x=Qze(),w=Jze();if(!fe(p)||p<=0||!fe(m)||m<=0||!fe(f)||f!==+f||!fe(h)||h!==+h)return null;var S=d.verticalCoordinatesGenerator||d5e,_=d.horizontalCoordinatesGenerator||f5e,j=d.horizontalPoints,E=d.verticalPoints;if((!j||!j.length)&&ze(_)){var C=y&&y.length,N=_({yAxis:w?On(On({},w),{},{ticks:C?y:w.ticks}):void 0,width:a,height:c,offset:u},C?!0:g);is(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Xl(N),"]")),Array.isArray(N)&&(j=N)}if((!E||!E.length)&&ze(S)){var k=b&&b.length,P=S({xAxis:x?On(On({},x),{},{ticks:k?b:x.ticks}):void 0,width:a,height:c,offset:u},k?!0:g);is(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Xl(P),"]")),Array.isArray(P)&&(E=P)}return $.createElement("g",{className:"recharts-cartesian-grid"},$.createElement(s5e,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),$.createElement(a5e,El({},d,{offset:u,horizontalPoints:j,xAxis:x,yAxis:w})),$.createElement(l5e,El({},d,{offset:u,verticalPoints:E,xAxis:x,yAxis:w})),$.createElement(c5e,El({},d,{horizontalPoints:j})),$.createElement(u5e,El({},d,{verticalPoints:E})))}ff.displayName="CartesianGrid";var h5e=["type","layout","connectNulls","ref"],p5e=["key"];function dd(e){"@babel/helpers - typeof";return dd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dd(e)}function zF(e,t){if(e==null)return{};var n=m5e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function m5e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Oh(){return Oh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oh.apply(this,arguments)}function VF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VF(Object(n),!0).forEach(function(r){ji(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pc(e){return x5e(e)||y5e(e)||v5e(e)||g5e()}function g5e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 702In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v5e(e,t){if(e){if(typeof e=="string")return GC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GC(e,t)}}function y5e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function x5e(e){if(Array.isArray(e))return GC(e)}function GC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b5e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w7(r.key),r)}}function w5e(e,t,n){return t&&qF(e.prototype,t),n&&qF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _5e(e,t,n){return t=Yx(t),S5e(e,b7()?Reflect.construct(t,n||[],Yx(e).constructor):t.apply(e,n))}function S5e(e,t){if(t&&(dd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j5e(e)}function j5e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(b7=function(){return!!e})()}function Yx(e){return Yx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yx(e)}function E5e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YC(e,t)}function YC(e,t){return YC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},YC(e,t)}function ji(e,t,n){return t=w7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w7(e){var t=C5e(e,"string");return dd(t)=="symbol"?t:t+""}function C5e(e,t){if(dd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(dd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zl=function(e){function t(){var n;b5e(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=_5e(this,t,[].concat(i)),ji(n,"state",{isAnimationFinished:!0,totalLength:0}),ji(n,"generateSimpleStrokeDasharray",function(s,a){return"".concat(a,"px ").concat(s-a,"px")}),ji(n,"getStrokeDasharray",function(s,a,c){var u=c.reduce(function(b,x){return b+x});if(!u)return n.generateSimpleStrokeDasharray(a,s);for(var d=Math.floor(s/u),f=s%u,h=a-s,p=[],m=0,g=0;m<c.length;g+=c[m],++m)if(g+c[m]>f){p=[].concat(Pc(c.slice(0,m)),[f-g]);break}var y=p.length%2===0?[0,h]:[h];return[].concat(Pc(t.repeat(c,d)),Pc(p),y).map(function(b){return"".concat(b,"px")}).join(", ")}),ji(n,"id",Vm("recharts-line-")),ji(n,"pathRef",function(s){n.mainCurve=s}),ji(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),ji(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return E5e(t,e),w5e(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,s=o.points,a=o.xAxis,c=o.yAxis,u=o.layout,d=o.children,f=ri(d,Qm);if(!f)return null;var h=function(g,y){return{x:g.x,y:g.y,value:g.value,errorVal:Lr(g.payload,y)}},p={clipPath:r?"url(#clipPath-".concat(i,")"):null};return $.createElement(Xt,p,f.map(function(m){return $.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:s,xAxis:a,yAxis:c,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,i,o){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var a=this.props,c=a.dot,u=a.points,d=a.dataKey,f=Ye(this.props,!1),h=Ye(c,!0),p=u.map(function(g,y){var b=wr(wr(wr({key:"dot-".concat(y),r:3},f),h),{},{value:g.value,dataKey:d,cx:g.x,cy:g.y,index:y,payload:g.payload});return t.renderDotItem(c,b)}),m={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return $.createElement(Xt,Oh({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(r,i,o,s){var a=this.props,c=a.type,u=a.layout,d=a.connectNulls;a.ref;var f=zF(a,h5e),h=wr(wr(wr({},Ye(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},s),{},{type:c,layout:u,connectNulls:d});return $.createElement(CC,Oh({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,s=this.props,a=s.points,c=s.strokeDasharray,u=s.isAnimationActive,d=s.animationBegin,f=s.animationDuration,h=s.animationEasing,p=s.animationId,m=s.animateNewValues,g=s.width,y=s.height,b=this.state,x=b.prevPoints,w=b.totalLength;return $.createElement(js,{begin:d,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var _=S.t;if(x){var j=x.length/a.length,E=a.map(function(A,L){var R=Math.floor(L*j);if(x[R]){var D=x[R],O=Ni(D.x,A.x),F=Ni(D.y,A.y);return wr(wr({},A),{},{x:O(_),y:F(_)})}if(m){var T=Ni(g*2,A.x),M=Ni(y/2,A.y);return wr(wr({},A),{},{x:T(_),y:M(_)})}return wr(wr({},A),{},{x:A.x,y:A.y})});return o.renderCurveStatically(E,r,i)}var C=Ni(0,w),N=C(_),k;if(c){var P="".concat(c).split(/[,\s]+/gim).map(function(A){return parseFloat(A)});k=o.getStrokeDasharray(N,w,P)}else k=o.generateSimpleStrokeDasharray(w,N);return o.renderCurveStatically(a,r,i,{strokeDasharray:k})})}},{key:"renderCurve",value:function(r,i){var o=this.props,s=o.points,a=o.isAnimationActive,c=this.state,u=c.prevPoints,d=c.totalLength;return a&&s&&s.length&&(!u&&d>0||!w0(u,s))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(s,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,s=i.dot,a=i.points,c=i.className,u=i.xAxis,d=i.yAxis,f=i.top,h=i.left,p=i.width,m=i.height,g=i.isAnimationActive,y=i.id;if(o||!a||!a.length)return null;var b=this.state.isAnimationFinished,x=a.length===1,w=et("recharts-line",c),S=u&&u.allowDataOverflow,_=d&&d.allowDataOverflow,j=S||_,E=Ve(y)?this.id:y,C=(r=Ye(s,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},N=C.r,k=N===void 0?3:N,P=C.strokeWidth,A=P===void 0?2:P,L=Vje(s)?s:{},R=L.clipDot,D=R===void 0?!0:R,O=k*2+A;return $.createElement(Xt,{className:w},S||_?$.createElement("defs",null,$.createElement("clipPath",{id:"clipPath-".concat(E)},$.createElement("rect",{x:S?h:h-p/2,y:_?f:f-m/2,width:S?p:p*2,height:_?m:m*2})),!D&&$.createElement("clipPath",{id:"clipPath-dots-".concat(E)},$.createElement("rect",{x:h-O/2,y:f-O/2,width:p+O,height:m+O}))):null,!x&&this.renderCurve(j,E),this.renderErrorBar(j,E),(x||s)&&this.renderDots(j,D,E),(!g||b)&&_a.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(Pc(r),[0]):r,s=[],a=0;a<i;++a)s=[].concat(Pc(s),Pc(o));return s}},{key:"renderDotItem",value:function(r,i){var o;if($.isValidElement(r))o=$.cloneElement(r,i);else if(ze(r))o=r(i);else{var s=i.key,a=zF(i,p5e),c=et("recharts-line-dot",typeof r!="boolean"?r.className:"");o=$.createElement($T,Oh({key:s},a,{className:c}))}return o}}])}(v.PureComponent);ji(Zl,"displayName","Line");ji(Zl,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!os.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});ji(Zl,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.dataKey,a=e.bandSize,c=e.displayedData,u=e.offset,d=t.layout,f=c.map(function(h,p){var m=Lr(h,s);return d==="horizontal"?{x:jL({axis:n,ticks:i,bandSize:a,entry:h,index:p}),y:Ve(m)?null:r.scale(m),value:m,payload:h}:{x:Ve(m)?null:n.scale(m),y:jL({axis:r,ticks:o,bandSize:a,entry:h,index:p}),value:m,payload:h}});return wr({points:f,layout:d},u)});function fd(e){"@babel/helpers - typeof";return fd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fd(e)}function N5e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P5e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,j7(r.key),r)}}function k5e(e,t,n){return t&&P5e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function A5e(e,t,n){return t=Qx(t),T5e(e,_7()?Reflect.construct(t,n||[],Qx(e).constructor):t.apply(e,n))}function T5e(e,t){if(t&&(fd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R5e(e)}function R5e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_7=function(){return!!e})()}function Qx(e){return Qx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qx(e)}function O5e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&QC(e,t)}function QC(e,t){return QC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},QC(e,t)}function S7(e,t,n){return t=j7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j7(e){var t=I5e(e,"string");return fd(t)=="symbol"?t:t+""}function I5e(e,t){if(fd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(fd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JC(){return JC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JC.apply(this,arguments)}function M5e(e){var t=e.xAxisId,n=BT(),r=UT(),i=l7(t);return i==null?null:$.createElement(df,JC({},i,{className:et("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(s){return Xo(s,!0)}}))}var Os=function(e){function t(){return N5e(this,t),A5e(this,t,arguments)}return O5e(t,e),k5e(t,[{key:"render",value:function(){return $.createElement(M5e,this.props)}}])}($.Component);S7(Os,"displayName","XAxis");S7(Os,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function hd(e){"@babel/helpers - typeof";return hd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hd(e)}function $5e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D5e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,N7(r.key),r)}}function L5e(e,t,n){return t&&D5e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function F5e(e,t,n){return t=Jx(t),B5e(e,E7()?Reflect.construct(t,n||[],Jx(e).constructor):t.apply(e,n))}function B5e(e,t){if(t&&(hd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return U5e(e)}function U5e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(E7=function(){return!!e})()}function Jx(e){return Jx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jx(e)}function z5e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&XC(e,t)}function XC(e,t){return XC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},XC(e,t)}function C7(e,t,n){return t=N7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N7(e){var t=V5e(e,"string");return hd(t)=="symbol"?t:t+""}function V5e(e,t){if(hd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(hd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ZC(){return ZC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZC.apply(this,arguments)}var q5e=function(t){var n=t.yAxisId,r=BT(),i=UT(),o=c7(n);return o==null?null:$.createElement(df,ZC({},o,{className:et("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(a){return Xo(a,!0)}}))},Is=function(e){function t(){return $5e(this,t),F5e(this,t,arguments)}return z5e(t,e),L5e(t,[{key:"render",value:function(){return $.createElement(q5e,this.props)}}])}($.Component);C7(Is,"displayName","YAxis");C7(Is,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function KF(e){return G5e(e)||H5e(e)||W5e(e)||K5e()}function K5e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 703In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W5e(e,t){if(e){if(typeof e=="string")return eN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eN(e,t)}}function H5e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function G5e(e){if(Array.isArray(e))return eN(e)}function eN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var tN=function(t,n,r,i,o){var s=ri(t,VT),a=ri(t,P0),c=[].concat(KF(s),KF(a)),u=ri(t,A0),d="".concat(i,"Id"),f=i[0],h=n;if(c.length&&(h=c.reduce(function(g,y){if(y.props[d]===r&&go(y.props,"extendDomain")&&fe(y.props[f])){var b=y.props[f];return[Math.min(g[0],b),Math.max(g[1],b)]}return g},h)),u.length){var p="".concat(f,"1"),m="".concat(f,"2");h=u.reduce(function(g,y){if(y.props[d]===r&&go(y.props,"extendDomain")&&fe(y.props[p])&&fe(y.props[m])){var b=y.props[p],x=y.props[m];return[Math.min(g[0],b,x),Math.max(g[1],b,x)]}return g},h)}return o&&o.length&&(h=o.reduce(function(g,y){return fe(y)?[Math.min(g[0],y),Math.max(g[1],y)]:g},h)),h},P7={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function o(c,u,d,f,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new i(d,f||c,h),m=n?n+u:u;return c._events[m]?c._events[m].fn?c._events[m]=[c._events[m],p]:c._events[m].push(p):(c._events[m]=p,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},a.prototype.listeners=function(u){var d=n?n+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,p=f.length,m=new Array(p);h<p;h++)m[h]=f[h].fn;return m},a.prototype.listenerCount=function(u){var d=n?n+u:u,f=this._events[d];return f?f.fn?1:f.length:0},a.prototype.emit=function(u,d,f,h,p,m){var g=n?n+u:u;if(!this._events[g])return!1;var y=this._events[g],b=arguments.length,x,w;if(y.fn){switch(y.once&&this.removeListener(u,y.fn,void 0,!0),b){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,d),!0;case 3:return y.fn.call(y.context,d,f),!0;case 4:return y.fn.call(y.context,d,f,h),!0;case 5:return y.fn.call(y.context,d,f,h,p),!0;case 6:return y.fn.call(y.context,d,f,h,p,m),!0}for(w=1,x=new Array(b-1);w<b;w++)x[w-1]=arguments[w];y.fn.apply(y.context,x)}else{var S=y.length,_;for(w=0;w<S;w++)switch(y[w].once&&this.removeListener(u,y[w].fn,void 0,!0),b){case 1:y[w].fn.call(y[w].context);break;case 2:y[w].fn.call(y[w].context,d);break;case 3:y[w].fn.call(y[w].context,d,f);break;case 4:y[w].fn.call(y[w].context,d,f,h);break;default:if(!x)for(_=1,x=new Array(b-1);_<b;_++)x[_-1]=arguments[_];y[w].fn.apply(y[w].context,x)}}return!0},a.prototype.on=function(u,d,f){return o(this,u,d,f,!1)},a.prototype.once=function(u,d,f){return o(this,u,d,f,!0)},a.prototype.removeListener=function(u,d,f,h){var p=n?n+u:u;if(!this._events[p])return this;if(!d)return s(this,p),this;var m=this._events[p];if(m.fn)m.fn===d&&(!h||m.once)&&(!f||m.context===f)&&s(this,p);else{for(var g=0,y=[],b=m.length;g<b;g++)(m[g].fn!==d||h&&!m[g].once||f&&m[g].context!==f)&&y.push(m[g]);y.length?this._events[p]=y.length===1?y[0]:y:s(this,p)}return this},a.prototype.removeAllListeners=function(u){var d;return u?(d=n?n+u:u,this._events[d]&&s(this,d)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a})(P7);var Y5e=P7.exports;const Q5e=ct(Y5e);var LS=new Q5e,FS="recharts.syncMouseEvents";function Yp(e){"@babel/helpers - typeof";return Yp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yp(e)}function J5e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X5e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k7(r.key),r)}}function Z5e(e,t,n){return t&&X5e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function BS(e,t,n){return t=k7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k7(e){var t=eqe(e,"string");return Yp(t)=="symbol"?t:t+""}function eqe(e,t){if(Yp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tqe=function(){function e(){J5e(this,e),BS(this,"activeIndex",0),BS(this,"coordinateList",[]),BS(this,"layout","horizontal")}return Z5e(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,o=i===void 0?null:i,s=n.container,a=s===void 0?null:s,c=n.layout,u=c===void 0?null:c,d=n.offset,f=d===void 0?null:d,h=n.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(r=o??this.coordinateList)!==null&&r!==void 0?r:[],this.container=a??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=p??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),o=i.x,s=i.y,a=i.height,c=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,d=((r=window)===null||r===void 0?void 0:r.scrollY)||0,f=o+c+u,h=s+this.offset.top+a/2+d;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])}();function nqe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e?.[0],i=e?.[1];if(r&&i&&fe(r)&&fe(i))return!0}return!1}function rqe(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function A7(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,o=e.endAngle,s=wn(t,n,r,i),a=wn(t,n,r,o);return{points:[s,a],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function iqe(e,t,n){var r,i,o,s;if(e==="horizontal")r=t.x,o=r,i=n.top,s=n.top+n.height;else if(e==="vertical")i=t.y,s=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var a=t.cx,c=t.cy,u=t.innerRadius,d=t.outerRadius,f=t.angle,h=wn(a,c,u,f),p=wn(a,c,d,f);r=h.x,i=h.y,o=p.x,s=p.y}else return A7(t);return[{x:r,y:i},{x:o,y:s}]}function Qp(e){"@babel/helpers - typeof";return Qp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qp(e)}function WF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function av(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WF(Object(n),!0).forEach(function(r){oqe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oqe(e,t,n){return t=sqe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sqe(e){var t=aqe(e,"string");return Qp(t)=="symbol"?t:t+""}function aqe(e,t){if(Qp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Qp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lqe(e){var t,n,r=e.element,i=e.tooltipEventType,o=e.isActive,s=e.activeCoordinate,a=e.activePayload,c=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,p=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!p||!o||!s||h!=="ScatterChart"&&i!=="axis")return null;var m,g=CC;if(h==="ScatterChart")m=s,g=lUe;else if(h==="BarChart")m=rqe(f,s,c,d),g=MT;else if(f==="radial"){var y=A7(s),b=y.cx,x=y.cy,w=y.radius,S=y.startAngle,_=y.endAngle;m={cx:b,cy:x,startAngle:S,endAngle:_,innerRadius:w,outerRadius:w},g=R9}else m={points:iqe(f,s,c)},g=CC;var j=av(av(av(av({stroke:"#ccc",pointerEvents:"none"},c),m),Ye(p,!1)),{},{payload:a,payloadIndex:u,className:et("recharts-tooltip-cursor",p.className)});return v.isValidElement(p)?v.cloneElement(p,j):v.createElement(g,j)}var cqe=["item"],uqe=["children","className","width","height","style","compact","title","desc"];function pd(e){"@babel/helpers - typeof";return pd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pd(e)}function tu(){return tu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tu.apply(this,arguments)}function HF(e,t){return hqe(e)||fqe(e,t)||R7(e,t)||dqe()}function dqe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 704In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fqe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function hqe(e){if(Array.isArray(e))return e}function GF(e,t){if(e==null)return{};var n=pqe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function mqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gqe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,O7(r.key),r)}}function vqe(e,t,n){return t&&gqe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yqe(e,t,n){return t=Xx(t),xqe(e,T7()?Reflect.construct(t,n||[],Xx(e).constructor):t.apply(e,n))}function xqe(e,t){if(t&&(pd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bqe(e)}function bqe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(T7=function(){return!!e})()}function Xx(e){return Xx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xx(e)}function wqe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nN(e,t)}function nN(e,t){return nN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},nN(e,t)}function md(e){return jqe(e)||Sqe(e)||R7(e)||_qe()}function _qe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 705In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R7(e,t){if(e){if(typeof e=="string")return rN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rN(e,t)}}function Sqe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jqe(e){if(Array.isArray(e))return rN(e)}function rN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function YF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YF(Object(n),!0).forEach(function(r){ke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ke(e,t,n){return t=O7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O7(e){var t=Eqe(e,"string");return pd(t)=="symbol"?t:t+""}function Eqe(e,t){if(pd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(pd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cqe={xAxis:["bottom","top"],yAxis:["left","right"]},Nqe={width:"100%",height:"100%"},I7={x:0,y:0};function lv(e){return e}var Pqe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},kqe=function(t,n,r,i){var o=n.find(function(d){return d&&d.index===r});if(o){if(t==="horizontal")return{x:o.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:o.coordinate};if(t==="centric"){var s=o.coordinate,a=i.radius;return X(X(X({},i),wn(i.cx,i.cy,a,s)),{},{angle:s,radius:a})}var c=o.coordinate,u=i.angle;return X(X(X({},i),wn(i.cx,i.cy,c,u)),{},{angle:u,radius:c})}return I7},T0=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,o=n.dataEndIndex,s=(r??[]).reduce(function(a,c){var u=c.props.data;return u&&u.length?[].concat(md(a),md(u)):a},[]);return s.length>0?s:t&&t.length&&fe(i)&&fe(o)?t.slice(i,o+1):[]};function M7(e){return e==="number"?[0,"auto"]:void 0}var iN=function(t,n,r,i){var o=t.graphicalItems,s=t.tooltipAxis,a=T0(n,t);return r<0||!o||!o.length||r>=a.length?null:o.reduce(function(c,u){var d,f=(d=u.props.data)!==null&&d!==void 0?d:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(s.dataKey&&!s.allowDuplicatedCategory){var p=f===void 0?a:f;h=ex(p,s.dataKey,i)}else h=f&&f[r]||a[r];return h?[].concat(md(c),[P9(u,h)]):c},[])},QF=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},s=Pqe(o,r),a=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,d=XLe(s,a,u,c);if(d>=0&&u){var f=u[d]&&u[d].value,h=iN(t,n,d,f),p=kqe(r,a,d,o);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},Aqe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,s=n.axisIdKey,a=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,f=t.children,h=t.stackOffset,p=_9(d,o);return r.reduce(function(m,g){var y,b=g.type.defaultProps!==void 0?X(X({},g.type.defaultProps),g.props):g.props,x=b.type,w=b.dataKey,S=b.allowDataOverflow,_=b.allowDuplicatedCategory,j=b.scale,E=b.ticks,C=b.includeHidden,N=b[s];if(m[N])return m;var k=T0(t.data,{graphicalItems:i.filter(function(I){var z,H=s in I.props?I.props[s]:(z=I.type.defaultProps)===null||z===void 0?void 0:z[s];return H===N}),dataStartIndex:c,dataEndIndex:u}),P=k.length,A,L,R;nqe(b.domain,S,x)&&(A=wC(b.domain,null,S),p&&(x==="number"||j!=="auto")&&(R=Th(k,w,"category")));var D=M7(x);if(!A||A.length===0){var O,F=(O=b.domain)!==null&&O!==void 0?O:D;if(w){if(A=Th(k,w,x),x==="category"&&p){var T=Ije(A);_&&T?(L=A,A=Fx(0,P)):_||(A=PL(F,A,g).reduce(function(I,z){return I.indexOf(z)>=0?I:[].concat(md(I),[z])},[]))}else if(x==="category")_?A=A.filter(function(I){return I!==""&&!Ve(I)}):A=PL(F,A,g).reduce(function(I,z){return I.indexOf(z)>=0||z===""||Ve(z)?I:[].concat(md(I),[z])},[]);else if(x==="number"){var M=rFe(k,i.filter(function(I){var z,H,de=s in I.props?I.props[s]:(z=I.type.defaultProps)===null||z===void 0?void 0:z[s],ge="hide"in I.props?I.props.hide:(H=I.type.defaultProps)===null||H===void 0?void 0:H.hide;return de===N&&(C||!ge)}),w,o,d);M&&(A=M)}p&&(x==="number"||j!=="auto")&&(R=Th(k,w,"category"))}else p?A=Fx(0,P):a&&a[N]&&a[N].hasStack&&x==="number"?A=h==="expand"?[0,1]:N9(a[N].stackGroups,c,u):A=w9(k,i.filter(function(I){var z=s in I.props?I.props[s]:I.type.defaultProps[s],H="hide"in I.props?I.props.hide:I.type.defaultProps.hide;return z===N&&(C||!H)}),x,d,!0);if(x==="number")A=tN(f,A,N,o,E),F&&(A=wC(F,A,S));else if(x==="category"&&F){var V=F,B=A.every(function(I){return V.indexOf(I)>=0});B&&(A=V)}}return X(X({},m),{},ke({},N,X(X({},b),{},{axisType:o,domain:A,categoricalDomain:R,duplicateDomain:L,originalDomain:(y=b.domain)!==null&&y!==void 0?y:D,isCategorical:p,layout:d})))},{})},Tqe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,s=n.axisIdKey,a=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,f=t.children,h=T0(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),p=h.length,m=_9(d,o),g=-1;return r.reduce(function(y,b){var x=b.type.defaultProps!==void 0?X(X({},b.type.defaultProps),b.props):b.props,w=x[s],S=M7("number");if(!y[w]){g++;var _;return m?_=Fx(0,p):a&&a[w]&&a[w].hasStack?(_=N9(a[w].stackGroups,c,u),_=tN(f,_,w,o)):(_=wC(S,w9(h,r.filter(function(j){var E,C,N=s in j.props?j.props[s]:(E=j.type.defaultProps)===null||E===void 0?void 0:E[s],k="hide"in j.props?j.props.hide:(C=j.type.defaultProps)===null||C===void 0?void 0:C.hide;return N===w&&!k}),"number",d),i.defaultProps.allowDataOverflow),_=tN(f,_,w,o)),X(X({},y),{},ke({},w,X(X({axisType:o},i.defaultProps),{},{hide:!0,orientation:ni(Cqe,"".concat(o,".").concat(g%2),null),domain:_,originalDomain:S,isCategorical:m,layout:d})))}return y},{})},Rqe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,s=n.graphicalItems,a=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.children,f="".concat(i,"Id"),h=ri(d,o),p={};return h&&h.length?p=Aqe(t,{axes:h,graphicalItems:s,axisType:i,axisIdKey:f,stackGroups:a,dataStartIndex:c,dataEndIndex:u}):s&&s.length&&(p=Tqe(t,{Axis:o,graphicalItems:s,axisType:i,axisIdKey:f,stackGroups:a,dataStartIndex:c,dataEndIndex:u})),p},Oqe=function(t){var n=ia(t),r=Xo(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:cT(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Ax(n,r)}},JF=function(t){var n=t.children,r=t.defaultShowTooltip,i=jr(n,od),o=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!r}},Iqe=function(t){return!t||!t.length?!1:t.some(function(n){var r=rs(n&&n.type);return r&&r.indexOf("Bar")>=0})},XF=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Mqe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,s=o===void 0?{}:o,a=t.yAxisMap,c=a===void 0?{}:a,u=r.width,d=r.height,f=r.children,h=r.margin||{},p=jr(f,od),m=jr(f,Rl),g=Object.keys(c).reduce(function(_,j){var E=c[j],C=E.orientation;return!E.mirror&&!E.hide?X(X({},_),{},ke({},C,_[C]+E.width)):_},{left:h.left||0,right:h.right||0}),y=Object.keys(s).reduce(function(_,j){var E=s[j],C=E.orientation;return!E.mirror&&!E.hide?X(X({},_),{},ke({},C,ni(_,"".concat(C))+E.height)):_},{top:h.top||0,bottom:h.bottom||0}),b=X(X({},y),g),x=b.bottom;p&&(b.bottom+=p.props.height||od.defaultProps.height),m&&n&&(b=tFe(b,i,r,n));var w=u-b.left-b.right,S=d-b.top-b.bottom;return X(X({brushBottom:x},b),{},{width:Math.max(w,0),height:Math.max(S,0)})},$qe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},$7=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,s=t.validateTooltipEventTypes,a=s===void 0?["axis"]:s,c=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,h=function(b,x){var w=x.graphicalItems,S=x.stackGroups,_=x.offset,j=x.updateId,E=x.dataStartIndex,C=x.dataEndIndex,N=b.barSize,k=b.layout,P=b.barGap,A=b.barCategoryGap,L=b.maxBarSize,R=XF(k),D=R.numericAxisName,O=R.cateAxisName,F=Iqe(w),T=[];return w.forEach(function(M,V){var B=T0(b.data,{graphicalItems:[M],dataStartIndex:E,dataEndIndex:C}),I=M.type.defaultProps!==void 0?X(X({},M.type.defaultProps),M.props):M.props,z=I.dataKey,H=I.maxBarSize,de=I["".concat(D,"Id")],ge=I["".concat(O,"Id")],te={},ye=c.reduce(function(xr,ui){var di=x["".concat(ui.axisType,"Map")],ag=I["".concat(ui.axisType,"Id")];di&&di[ag]||ui.axisType==="zAxis"||Yt(!1);var xf=di[ag];return X(X({},xr),{},ke(ke({},ui.axisType,xf),"".concat(ui.axisType,"Ticks"),Xo(xf)))},te),W=ye[O],ne=ye["".concat(O,"Ticks")],se=S&&S[de]&&S[de].hasStack&&fFe(M,S[de].stackGroups),U=rs(M.type).indexOf("Bar")>=0,ae=Ax(W,ne),re=[],He=F&&ZLe({barSize:N,stackGroups:S,totalSize:$qe(ye,O)});if(U){var Ge,gt,Ke=Ve(H)?L:H,vt=(Ge=(gt=Ax(W,ne,!0))!==null&>!==void 0?gt:Ke)!==null&&Ge!==void 0?Ge:0;re=eFe({barGap:P,barCategoryGap:A,bandSize:vt!==ae?vt:ae,sizeList:He[ge],maxBarSize:Ke}),vt!==ae&&(re=re.map(function(xr){return X(X({},xr),{},{position:X(X({},xr.position),{},{offset:xr.position.offset-vt/2})})}))}var zn=M&&M.type&&M.type.getComposedData;zn&&T.push({props:X(X({},zn(X(X({},ye),{},{displayedData:B,props:b,dataKey:z,item:M,bandSize:ae,barPosition:re,offset:_,stackedData:se,layout:k,dataStartIndex:E,dataEndIndex:C}))),{},ke(ke(ke({key:M.key||"item-".concat(V)},D,ye[D]),O,ye[O]),"animationId",j)),childIndex:Wje(M,b.children),item:M})}),T},p=function(b,x){var w=b.props,S=b.dataStartIndex,_=b.dataEndIndex,j=b.updateId;if(!x$({props:w}))return null;var E=w.children,C=w.layout,N=w.stackOffset,k=w.data,P=w.reverseStackOrder,A=XF(C),L=A.numericAxisName,R=A.cateAxisName,D=ri(E,r),O=uFe(k,D,"".concat(L,"Id"),"".concat(R,"Id"),N,P),F=c.reduce(function(I,z){var H="".concat(z.axisType,"Map");return X(X({},I),{},ke({},H,Rqe(w,X(X({},z),{},{graphicalItems:D,stackGroups:z.axisType===L&&O,dataStartIndex:S,dataEndIndex:_}))))},{}),T=Mqe(X(X({},F),{},{props:w,graphicalItems:D}),x?.legendBBox);Object.keys(F).forEach(function(I){F[I]=d(w,F[I],T,I.replace("Map",""),n)});var M=F["".concat(R,"Map")],V=Oqe(M),B=h(w,X(X({},F),{},{dataStartIndex:S,dataEndIndex:_,updateId:j,graphicalItems:D,stackGroups:O,offset:T}));return X(X({formattedGraphicalItems:B,graphicalItems:D,offset:T,stackGroups:O},V),F)},m=function(y){function b(x){var w,S,_;return mqe(this,b),_=yqe(this,b,[x]),ke(_,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ke(_,"accessibilityManager",new tqe),ke(_,"handleLegendBBoxUpdate",function(j){if(j){var E=_.state,C=E.dataStartIndex,N=E.dataEndIndex,k=E.updateId;_.setState(X({legendBBox:j},p({props:_.props,dataStartIndex:C,dataEndIndex:N,updateId:k},X(X({},_.state),{},{legendBBox:j}))))}}),ke(_,"handleReceiveSyncEvent",function(j,E,C){if(_.props.syncId===j){if(C===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(E)}}),ke(_,"handleBrushChange",function(j){var E=j.startIndex,C=j.endIndex;if(E!==_.state.dataStartIndex||C!==_.state.dataEndIndex){var N=_.state.updateId;_.setState(function(){return X({dataStartIndex:E,dataEndIndex:C},p({props:_.props,dataStartIndex:E,dataEndIndex:C,updateId:N},_.state))}),_.triggerSyncEvent({dataStartIndex:E,dataEndIndex:C})}}),ke(_,"handleMouseEnter",function(j){var E=_.getMouseInfo(j);if(E){var C=X(X({},E),{},{isTooltipActive:!0});_.setState(C),_.triggerSyncEvent(C);var N=_.props.onMouseEnter;ze(N)&&N(C,j)}}),ke(_,"triggeredAfterMouseMove",function(j){var E=_.getMouseInfo(j),C=E?X(X({},E),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(C),_.triggerSyncEvent(C);var N=_.props.onMouseMove;ze(N)&&N(C,j)}),ke(_,"handleItemMouseEnter",function(j){_.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),ke(_,"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),ke(_,"handleMouseMove",function(j){j.persist(),_.throttleTriggeredAfterMouseMove(j)}),ke(_,"handleMouseLeave",function(j){_.throttleTriggeredAfterMouseMove.cancel();var E={isTooltipActive:!1};_.setState(E),_.triggerSyncEvent(E);var C=_.props.onMouseLeave;ze(C)&&C(E,j)}),ke(_,"handleOuterEvent",function(j){var E=Kje(j),C=ni(_.props,"".concat(E));if(E&&ze(C)){var N,k;/.*touch.*/i.test(E)?k=_.getMouseInfo(j.changedTouches[0]):k=_.getMouseInfo(j),C((N=k)!==null&&N!==void 0?N:{},j)}}),ke(_,"handleClick",function(j){var E=_.getMouseInfo(j);if(E){var C=X(X({},E),{},{isTooltipActive:!0});_.setState(C),_.triggerSyncEvent(C);var N=_.props.onClick;ze(N)&&N(C,j)}}),ke(_,"handleMouseDown",function(j){var E=_.props.onMouseDown;if(ze(E)){var C=_.getMouseInfo(j);E(C,j)}}),ke(_,"handleMouseUp",function(j){var E=_.props.onMouseUp;if(ze(E)){var C=_.getMouseInfo(j);E(C,j)}}),ke(_,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),ke(_,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&_.handleMouseDown(j.changedTouches[0])}),ke(_,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&_.handleMouseUp(j.changedTouches[0])}),ke(_,"triggerSyncEvent",function(j){_.props.syncId!==void 0&&LS.emit(FS,_.props.syncId,j,_.eventEmitterSymbol)}),ke(_,"applySyncEvent",function(j){var E=_.props,C=E.layout,N=E.syncMethod,k=_.state.updateId,P=j.dataStartIndex,A=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)_.setState(X({dataStartIndex:P,dataEndIndex:A},p({props:_.props,dataStartIndex:P,dataEndIndex:A,updateId:k},_.state)));else if(j.activeTooltipIndex!==void 0){var L=j.chartX,R=j.chartY,D=j.activeTooltipIndex,O=_.state,F=O.offset,T=O.tooltipTicks;if(!F)return;if(typeof N=="function")D=N(T,j);else if(N==="value"){D=-1;for(var M=0;M<T.length;M++)if(T[M].value===j.activeLabel){D=M;break}}var V=X(X({},F),{},{x:F.left,y:F.top}),B=Math.min(L,V.x+V.width),I=Math.min(R,V.y+V.height),z=T[D]&&T[D].value,H=iN(_.state,_.props.data,D),de=T[D]?{x:C==="horizontal"?T[D].coordinate:B,y:C==="horizontal"?I:T[D].coordinate}:I7;_.setState(X(X({},j),{},{activeLabel:z,activeCoordinate:de,activePayload:H,activeTooltipIndex:D}))}else _.setState(j)}),ke(_,"renderCursor",function(j){var E,C=_.state,N=C.isTooltipActive,k=C.activeCoordinate,P=C.activePayload,A=C.offset,L=C.activeTooltipIndex,R=C.tooltipAxisBandSize,D=_.getTooltipEventType(),O=(E=j.props.active)!==null&&E!==void 0?E:N,F=_.props.layout,T=j.key||"_recharts-cursor";return $.createElement(lqe,{key:T,activeCoordinate:k,activePayload:P,activeTooltipIndex:L,chartName:n,element:j,isActive:O,layout:F,offset:A,tooltipAxisBandSize:R,tooltipEventType:D})}),ke(_,"renderPolarAxis",function(j,E,C){var N=ni(j,"type.axisType"),k=ni(_.state,"".concat(N,"Map")),P=j.type.defaultProps,A=P!==void 0?X(X({},P),j.props):j.props,L=k&&k[A["".concat(N,"Id")]];return v.cloneElement(j,X(X({},L),{},{className:et(N,L.className),key:j.key||"".concat(E,"-").concat(C),ticks:Xo(L,!0)}))}),ke(_,"renderPolarGrid",function(j){var E=j.props,C=E.radialLines,N=E.polarAngles,k=E.polarRadius,P=_.state,A=P.radiusAxisMap,L=P.angleAxisMap,R=ia(A),D=ia(L),O=D.cx,F=D.cy,T=D.innerRadius,M=D.outerRadius;return v.cloneElement(j,{polarAngles:Array.isArray(N)?N:Xo(D,!0).map(function(V){return V.coordinate}),polarRadius:Array.isArray(k)?k:Xo(R,!0).map(function(V){return V.coordinate}),cx:O,cy:F,innerRadius:T,outerRadius:M,key:j.key||"polar-grid",radialLines:C})}),ke(_,"renderLegend",function(){var j=_.state.formattedGraphicalItems,E=_.props,C=E.children,N=E.width,k=E.height,P=_.props.margin||{},A=N-(P.left||0)-(P.right||0),L=x9({children:C,formattedGraphicalItems:j,legendWidth:A,legendContent:u});if(!L)return null;var R=L.item,D=GF(L,cqe);return v.cloneElement(R,X(X({},D),{},{chartWidth:N,chartHeight:k,margin:P,onBBoxUpdate:_.handleLegendBBoxUpdate}))}),ke(_,"renderTooltip",function(){var j,E=_.props,C=E.children,N=E.accessibilityLayer,k=jr(C,rr);if(!k)return null;var P=_.state,A=P.isTooltipActive,L=P.activeCoordinate,R=P.activePayload,D=P.activeLabel,O=P.offset,F=(j=k.props.active)!==null&&j!==void 0?j:A;return v.cloneElement(k,{viewBox:X(X({},O),{},{x:O.left,y:O.top}),active:F,label:D,payload:F?R:[],coordinate:L,accessibilityLayer:N})}),ke(_,"renderBrush",function(j){var E=_.props,C=E.margin,N=E.data,k=_.state,P=k.offset,A=k.dataStartIndex,L=k.dataEndIndex,R=k.updateId;return v.cloneElement(j,{key:j.key||"_recharts-brush",onChange:rv(_.handleBrushChange,j.props.onChange),data:N,x:fe(j.props.x)?j.props.x:P.left,y:fe(j.props.y)?j.props.y:P.top+P.height+P.brushBottom-(C.bottom||0),width:fe(j.props.width)?j.props.width:P.width,startIndex:A,endIndex:L,updateId:"brush-".concat(R)})}),ke(_,"renderReferenceElement",function(j,E,C){if(!j)return null;var N=_,k=N.clipPathId,P=_.state,A=P.xAxisMap,L=P.yAxisMap,R=P.offset,D=j.type.defaultProps||{},O=j.props,F=O.xAxisId,T=F===void 0?D.xAxisId:F,M=O.yAxisId,V=M===void 0?D.yAxisId:M;return v.cloneElement(j,{key:j.key||"".concat(E,"-").concat(C),xAxis:A[T],yAxis:L[V],viewBox:{x:R.left,y:R.top,width:R.width,height:R.height},clipPathId:k})}),ke(_,"renderActivePoints",function(j){var E=j.item,C=j.activePoint,N=j.basePoint,k=j.childIndex,P=j.isRange,A=[],L=E.props.key,R=E.item.type.defaultProps!==void 0?X(X({},E.item.type.defaultProps),E.item.props):E.item.props,D=R.activeDot,O=R.dataKey,F=X(X({index:k,dataKey:O,cx:C.x,cy:C.y,r:4,fill:IT(E.item),strokeWidth:2,stroke:"#fff",payload:C.payload,value:C.value},Ye(D,!1)),tx(D));return A.push(b.renderActiveDot(D,F,"".concat(L,"-activePoint-").concat(k))),N?A.push(b.renderActiveDot(D,X(X({},F),{},{cx:N.x,cy:N.y}),"".concat(L,"-basePoint-").concat(k))):P&&A.push(null),A}),ke(_,"renderGraphicChild",function(j,E,C){var N=_.filterFormatItem(j,E,C);if(!N)return null;var k=_.getTooltipEventType(),P=_.state,A=P.isTooltipActive,L=P.tooltipAxis,R=P.activeTooltipIndex,D=P.activeLabel,O=_.props.children,F=jr(O,rr),T=N.props,M=T.points,V=T.isRange,B=T.baseLine,I=N.item.type.defaultProps!==void 0?X(X({},N.item.type.defaultProps),N.item.props):N.item.props,z=I.activeDot,H=I.hide,de=I.activeBar,ge=I.activeShape,te=!!(!H&&A&&F&&(z||de||ge)),ye={};k!=="axis"&&F&&F.props.trigger==="click"?ye={onClick:rv(_.handleItemMouseEnter,j.props.onClick)}:k!=="axis"&&(ye={onMouseLeave:rv(_.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:rv(_.handleItemMouseEnter,j.props.onMouseEnter)});var W=v.cloneElement(j,X(X({},N.props),ye));function ne(ui){return typeof L.dataKey=="function"?L.dataKey(ui.payload):null}if(te)if(R>=0){var se,U;if(L.dataKey&&!L.allowDuplicatedCategory){var ae=typeof L.dataKey=="function"?ne:"payload.".concat(L.dataKey.toString());se=ex(M,ae,D),U=V&&B&&ex(B,ae,D)}else se=M?.[R],U=V&&B&&B[R];if(ge||de){var re=j.props.activeIndex!==void 0?j.props.activeIndex:R;return[v.cloneElement(j,X(X(X({},N.props),ye),{},{activeIndex:re})),null,null]}if(!Ve(se))return[W].concat(md(_.renderActivePoints({item:N,activePoint:se,basePoint:U,childIndex:R,isRange:V})))}else{var He,Ge=(He=_.getItemByXY(_.state.activeCoordinate))!==null&&He!==void 0?He:{graphicalItem:W},gt=Ge.graphicalItem,Ke=gt.item,vt=Ke===void 0?j:Ke,zn=gt.childIndex,xr=X(X(X({},N.props),ye),{},{activeIndex:zn});return[v.cloneElement(vt,xr),null,null]}return V?[W,null,null]:[W,null]}),ke(_,"renderCustomized",function(j,E,C){return v.cloneElement(j,X(X({key:"recharts-customized-".concat(C)},_.props),_.state))}),ke(_,"renderMap",{CartesianGrid:{handler:lv,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:lv},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:lv},YAxis:{handler:lv},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((w=x.id)!==null&&w!==void 0?w:Vm("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=gG(_.triggeredAfterMouseMove,(S=x.throttleDelay)!==null&&S!==void 0?S:1e3/60),_.state={},_}return wqe(b,y),vqe(b,[{key:"componentDidMount",value:function(){var w,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,S=w.children,_=w.data,j=w.height,E=w.layout,C=jr(S,rr);if(C){var N=C.props.defaultIndex;if(!(typeof N!="number"||N<0||N>this.state.tooltipTicks.length-1)){var k=this.state.tooltipTicks[N]&&this.state.tooltipTicks[N].value,P=iN(this.state,_,N,k),A=this.state.tooltipTicks[N].coordinate,L=(this.state.offset.top+j)/2,R=E==="horizontal",D=R?{x:A,y:L}:{y:A,x:L},O=this.state.formattedGraphicalItems.find(function(T){var M=T.item;return M.type.name==="Scatter"});O&&(D=X(X({},D),O.props.points[N].tooltipPosition),P=O.props.points[N].tooltipPayload);var F={activeTooltipIndex:N,isTooltipActive:!0,activeLabel:k,activePayload:P,activeCoordinate:D};this.setState(F),this.renderCursor(C),this.accessibilityManager.setIndex(N)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var _,j;this.accessibilityManager.setDetails({offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(w){DE([jr(w.children,rr)],[jr(this.props.children,rr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=jr(this.props.children,rr);if(w&&typeof w.props.shared=="boolean"){var S=w.props.shared?"axis":"item";return a.indexOf(S)>=0?S:o}return o}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var S=this.container,_=S.getBoundingClientRect(),j=yMe(_),E={chartX:Math.round(w.pageX-j.left),chartY:Math.round(w.pageY-j.top)},C=_.width/S.offsetWidth||1,N=this.inRange(E.chartX,E.chartY,C);if(!N)return null;var k=this.state,P=k.xAxisMap,A=k.yAxisMap,L=this.getTooltipEventType();if(L!=="axis"&&P&&A){var R=ia(P).scale,D=ia(A).scale,O=R&&R.invert?R.invert(E.chartX):null,F=D&&D.invert?D.invert(E.chartY):null;return X(X({},E),{},{xValue:O,yValue:F})}var T=QF(this.state,this.props.data,this.props.layout,N);return T?X(X({},E),T):null}},{key:"inRange",value:function(w,S){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,E=w/_,C=S/_;if(j==="horizontal"||j==="vertical"){var N=this.state.offset,k=E>=N.left&&E<=N.left+N.width&&C>=N.top&&C<=N.top+N.height;return k?{x:E,y:C}:null}var P=this.state,A=P.angleAxisMap,L=P.radiusAxisMap;if(A&&L){var R=ia(A);return TL({x:E,y:C},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,S=this.getTooltipEventType(),_=jr(w,rr),j={};_&&S==="axis"&&(_.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var E=tx(this.props,this.handleOuterEvent);return X(X({},E),j)}},{key:"addListener",value:function(){LS.on(FS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){LS.removeListener(FS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,S,_){for(var j=this.state.formattedGraphicalItems,E=0,C=j.length;E<C;E++){var N=j[E];if(N.item===w||N.props.key===w.key||S===rs(N.item.type)&&_===N.childIndex)return N}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,S=this.state.offset,_=S.left,j=S.top,E=S.height,C=S.width;return $.createElement("defs",null,$.createElement("clipPath",{id:w},$.createElement("rect",{x:_,y:j,height:E,width:C})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(S,_){var j=HF(_,2),E=j[0],C=j[1];return X(X({},S),{},ke({},E,C.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(S,_){var j=HF(_,2),E=j[0],C=j[1];return X(X({},S),{},ke({},E,C.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(w){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(w){var S=this.state,_=S.formattedGraphicalItems,j=S.activeItem;if(_&&_.length)for(var E=0,C=_.length;E<C;E++){var N=_[E],k=N.props,P=N.item,A=P.type.defaultProps!==void 0?X(X({},P.type.defaultProps),P.props):P.props,L=rs(P.type);if(L==="Bar"){var R=(k.data||[]).find(function(T){return XBe(w,T)});if(R)return{graphicalItem:N,payload:R}}else if(L==="RadialBar"){var D=(k.data||[]).find(function(T){return TL(w,T)});if(D)return{graphicalItem:N,payload:D}}else if(j0(N,j)||E0(N,j)||qp(N,j)){var O=t4e({graphicalItem:N,activeTooltipItem:j,itemData:A.data}),F=A.activeIndex===void 0?O:A.activeIndex;return{graphicalItem:X(X({},N),{},{childIndex:F}),payload:qp(N,j)?A.data[O]:N.props.data[O]}}}return null}},{key:"render",value:function(){var w=this;if(!x$(this))return null;var S=this.props,_=S.children,j=S.className,E=S.width,C=S.height,N=S.style,k=S.compact,P=S.title,A=S.desc,L=GF(S,uqe),R=Ye(L,!1);if(k)return $.createElement(kF,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},$.createElement(FE,tu({},R,{width:E,height:C,title:P,desc:A}),this.renderClipPath(),w$(_,this.renderMap)));if(this.props.accessibilityLayer){var D,O;R.tabIndex=(D=this.props.tabIndex)!==null&&D!==void 0?D:0,R.role=(O=this.props.role)!==null&&O!==void 0?O:"application",R.onKeyDown=function(T){w.accessibilityManager.keyboardEvent(T)},R.onFocus=function(){w.accessibilityManager.focus()}}var F=this.parseEventsOfWrapper();return $.createElement(kF,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},$.createElement("div",tu({className:et("recharts-wrapper",j),style:X({position:"relative",curs
705or:"default",width:E,height:C},N)},F,{ref:function(M){w.container=M}}),$.createElement(FE,tu({},R,{width:E,height:C,title:P,desc:A,style:Nqe}),this.renderClipPath(),w$(_,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(v.Component);ke(m,"displayName",n),ke(m,"defaultProps",X({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),ke(m,"getDerivedStateFromProps",function(y,b){var x=y.dataKey,w=y.data,S=y.children,_=y.width,j=y.height,E=y.layout,C=y.stackOffset,N=y.margin,k=b.dataStartIndex,P=b.dataEndIndex;if(b.updateId===void 0){var A=JF(y);return X(X(X({},A),{},{updateId:0},p(X(X({props:y},A),{},{updateId:0}),b)),{},{prevDataKey:x,prevData:w,prevWidth:_,prevHeight:j,prevLayout:E,prevStackOffset:C,prevMargin:N,prevChildren:S})}if(x!==b.prevDataKey||w!==b.prevData||_!==b.prevWidth||j!==b.prevHeight||E!==b.prevLayout||C!==b.prevStackOffset||!_u(N,b.prevMargin)){var L=JF(y),R={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},D=X(X({},QF(b,w,E)),{},{updateId:b.updateId+1}),O=X(X(X({},L),R),D);return X(X(X({},O),p(X({props:y},O),b)),{},{prevDataKey:x,prevData:w,prevWidth:_,prevHeight:j,prevLayout:E,prevStackOffset:C,prevMargin:N,prevChildren:S})}if(!DE(S,b.prevChildren)){var F,T,M,V,B=jr(S,od),I=B&&(F=(T=B.props)===null||T===void 0?void 0:T.startIndex)!==null&&F!==void 0?F:k,z=B&&(M=(V=B.props)===null||V===void 0?void 0:V.endIndex)!==null&&M!==void 0?M:P,H=I!==k||z!==P,de=!Ve(w),ge=de&&!H?b.updateId:b.updateId+1;return X(X({updateId:ge},p(X(X({props:y},b),{},{updateId:ge,dataStartIndex:I,dataEndIndex:z}),b)),{},{prevChildren:S,dataStartIndex:I,dataEndIndex:z})}return null}),ke(m,"renderActiveDot",function(y,b,x){var w;return v.isValidElement(y)?w=v.cloneElement(y,b):ze(y)?w=y(b):w=$.createElement($T,b),$.createElement(Xt,{className:"recharts-active-dot",key:x},w)});var g=v.forwardRef(function(b,x){return $.createElement(m,tu({},b,{ref:x}))});return g.displayName=m.displayName,g},D7=$7({chartName:"LineChart",GraphicalChild:Zl,axisComponents:[{axisType:"xAxis",AxisComp:Os},{axisType:"yAxis",AxisComp:Is}],formatAxisMap:e7}),WT=$7({chartName:"BarChart",GraphicalChild:So,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Os},{axisType:"yAxis",AxisComp:Is}],formatAxisMap:e7});const Dqe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Jm(e){const t=String(e??""),n=/^(\d{4})-(\d{2})-(\d{2})/.exec(t);if(!n)return t;const r=Dqe[Number(n[2])-1];return r?`${Number(n[3])} ${r}`:t}const Lqe=[7,30,90];function Fqe(){const[e,t]=v.useState(30);return l.jsxs("div",{className:"flex flex-col gap-4 p-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Analytics"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Platform-wide trends. Choose a window and a dimension below."})]}),l.jsx("div",{className:"flex gap-1 rounded-lg border bg-card p-1",children:Lqe.map(n=>l.jsxs("button",{onClick:()=>t(n),className:`rounded px-3 py-1 text-sm ${e===n?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted"}`,children:[n,"d"]},n))})]}),l.jsxs(FA,{defaultValue:"volume",className:"w-full",children:[l.jsxs(qw,{
705children:[l.jsx(xa,{value:"volume",children:"Volume & throughput"}),l.jsx(xa,{value:"usage",children:"Usage & activation"}),l.jsx(xa,{value:"quality",children:"Quality & outcomes"})]}),l.jsx(ba,{value:"volume",children:l.jsx(Bqe,{days:e})}),l.jsx(ba,{value:"usage",children:l.jsx(Uqe,{days:e})}),l.jsx(ba,{value:"quality",children:l.jsx(zqe,{days:e})})]})]})}function Bqe({days:e}){const{data:t,isLoading:n,error:r}=_we(e);return n?l.jsx(Fn,{}):r?l.jsx(HT,{err:r}):t?l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[l.jsx(Ee,{label:"Completion rate",value:`${Math.round(t.completion_rate*100)}%`,hint:`across the last ${e} days`}),l.jsx(Ee,{label:"Interviews started",value:oN(t.interviews_by_day)}),l.jsx(Ee,{label:"Jobs created",value:oN(t.jds_by_day)})]}),l.jsx(Zo,{title:"Interviews per day",children:l.jsx(Vqe,{primary:t.interviews_by_day,secondary:t.completed_by_day,primaryLabel:"Started",secondaryLabel:"Completed"})}),l.jsx(Zo,{title:"Jobs created per day",children:l.jsx(Eu,{data:t.jds_by_day,fill:"hsl(var(--chart-5))"})}),l.jsx(Zo,{title:"Distinct candidates per day",children:l.jsx(Eu,{data:t.candidates_by_day,fill:"hsl(var(--chart-3))"})})]}):null}function Uqe({days:e}){const{data:t,isLoading:n,error:r}=wwe(e);if(n)return l.jsx(Fn,{});if(r)return l.jsx(HT,{err:r});if(!t)return null;const i=t.time_to_first_interview_hours??[],o=i.length?[...i].sort((s,a)=>s-a)[Math.floor(i.length/2)]:null;return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[l.jsx(Ee,{label:"Orgs that activated",value:i.length,hint:"reached first interview"}),l.jsx(Ee,{label:"Median time-to-first-interview",value:o!==null?`${o}h`:"-"}),l.jsx(Ee,{label:"New signups (total)",value:oN(t.new_signups_by_week)})]}),l.jsx(Zo,{title:"Candidate activity - daily & rolling 7d",children:l.jsx(Kqe,{primary:t.candidate_activity_by_day,secondary:t.candidate_activity_rolling_7d,primaryLabel:"Daily",secondaryLabel:"Rolling 7d"})}),l.jsx(Zo,{title:"New signups",children:l.jsx(Eu,{data:t.new_signups_by_week,fill:"hsl(var(--success))"})})]})}function zqe({days:e}){const{data:t,isLoading:n,error:r}=Swe(e);if(n)return l.jsx(Fn,{});if(r)return l.jsx(HT,{err:r});if(!t)return null;const i=t.score_distribution.map(o=>({day:o.label,count:o.count}));return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsx(Zo,{title:`Score distribution (last ${e}d)`,children:l.jsx(Eu,{data:i,fill:"hsl(var(--warning))"})}),l.jsx(Zo,{title:"Mean score over time",children:l.jsx(qqe,{data:t.mean_score_by_day,color:"hsl(var(--success))"})}),l.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[l.jsx(Zo,{title:"Interview resets per day",children:l.jsx(Eu,{data:t.resets_by_day,fill:"hsl(var(--destructive))"})}),l.jsx(Zo,{title:"Deletions per day",children:l.jsx(Eu,{data:t.deletions_by_day,fill:"hsl(var(--muted-foreground))"})})]})]})}const R0={dataKey:"day",stroke:"hsl(var(--muted-foreground))",fontSize:11,tickFormatter:Jm,minTickGap:12,interval:"preserveStartEnd",tickMargin:6},O0={stroke:"hsl(var(--muted-foreground))",fontSize:11,width:32},I0={top:8,right:8,bottom:0,left:0};function Zo({title:e,children:t}){return l.jsxs(Ce,{className:"bg-card border border-border shadow-sm rounded-2xl",children:[l.jsx(na,{children:l.jsx(ra,{className:"text-base",children:e})}),l.jsx(Wo,{className:"px-3 pb-4 md:px-6 md:pb-6",children:l.jsx("div",{className:"h-[280px] md:h-[320px]",children:t})})]})}function Eu({data:e,fill:t}){return l.jsx(Km,{width:"100%",height:"100%",children:l.jsxs(WT,{data:e,margin:I0,children:[l.jsx(ff,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),l.jsx(Os,{...R0}),l.jsx(Is,{...O0,allowDecimals:!1}),l.jsx(rr,{labelFormatter:Jm}),l.jsx(So,{dataKey:"count",fill:t,radius:[4,4,0,0]})]})})}function Vqe({primary:e,secondary:t,primaryLabel:n,secondaryLabel:r}){const i=L7(e,t,n,r);return l.jsx(Km,{width:"100%",height:"100%",children:l.jsxs(WT,{data:i,margin:I0,children:[l.jsx(ff,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),l.jsx(Os,{...R0}),l.jsx(Is,{...O0,allowDecimals:!1}),l.jsx(rr,{labelFormatter:Jm}),l.jsx(So,{dataKey:n,fill:"hsl(var(--chart-5))",radius:[4,4,0,0]}),l.jsx(So,{dataKey:r,fill:"hsl(var(--success))",radius:[4,4,0,0]})]})})}function qqe({data:e,color:t}){return l.jsx(Km,{width:"100%",height:"100%",children:l.jsxs(D7,{data:e,margin:I0,children:[l.jsx(ff,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),l.jsx(Os,{...R0}),l.jsx(Is,{...O0}),l.jsx(rr,{labelFormatter:Jm}),l.jsx(Zl,{type:"monotone",dataKey:"count",stroke:t,strokeWidth:2,dot:!1})]})})}function Kqe({primary:e,secondary:t,primaryLabel:n,secondaryLabel:r}){const i=L7(e,t,n,r);return l.jsx(Km,{width:"100%",height:"100%",children:l.jsxs(D7,{data:i,margin:I0,children:[l.jsx(ff,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),l.jsx(Os,{...R0}),l.jsx(Is,{...O0,allowDecimals:!1}),l.jsx(rr,{labelFormatter:Jm}),l.jsx(Zl,{type:"monotone",dataKey:n,stroke:"hsl(var(--chart-5))",strokeWidth:2,dot:!1}),l.jsx(Zl,{type:"monotone",dataKey:r,stroke:"hsl(var(--success))",strokeWidth:2,dot:!1})]})})}function oN(e){return e?e.reduce((t,n)=>t+n.count,0):0}function L7(e,t,n,r){const i=new Map;for(const o of e??[])i.set(o.day,{day:o.day,[n]:o.count});for(const o of t??[]){const s=i.get(o.day)??{day:o.day};s[r]=o.count,i.set(o.day,s)}return Array.from(i.values()).sort((o,s)=>String(o.day).localeCompare(String(s.day)))}function HT({err:e}){return l.jsxs("div",{className:"p-6 text-destructive",children:["Failed to load: ",e.message]})}const Wqe=Wi("/super-admin/analytics")({component:Fqe}),Hqe=Object.freeze(Object.defineProperty({__proto__:null,Route:Wqe},Symbol.toStringTag,{value:"Module"}));function Gqe(e){if(!e)return"-";const t=new Date(e);return Number.isNaN(t.getTime())?"-":t.toLocaleDateString()}function Yqe(){const[e,t]=v.useState(""),{data:n,isLoading:r,error:i}=bwe({search:e}),o=v.useMemo(()=>n??[],[n]);return l.jsxs("div",{className:"flex flex-col gap-4 p-2",children:[l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Job Analytics"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Every published job ad across the platform, with applications, interviews and distinct candidates enrolled per job."})]}),l.jsx("div",{className:"flex items-center gap-2",children:l.jsx(Le,{placeholder:"Search by job, title or orgâ¦",value:e,onCh
705ange:s=>t(s.target.value),className:"max-w-md"})}),l.jsx(Ce,{className:"overflow-hidden border border-border shadow-sm rounded-2xl",children:r?l.jsx(Fn,{}):i?l.jsxs("div",{className:"p-6 text-destructive",children:["Failed to load job analytics: ",i.message]}):o.length===0?l.jsx("div",{className:"p-6 text-muted-foreground",children:"No jobs match that search."}):l.jsxs(mr,{children:[l.jsx(gr,{children:l.jsxs(bt,{children:[l.jsx(pe,{children:"Job"}),l.jsx(pe,{children:"Organization"}),l.jsx(pe,{children:"Status"}),l.jsx(pe,{className:"text-right",children:"Applications"}),l.jsx(pe,{className:"text-right",children:"Interviews"}),l.jsx(pe,{className:"text-right",children:"Candidates enrolled"}),l.jsx(pe,{children:"Created"})]})}),l.jsx(vr,{children:o.map(s=>l.jsxs(bt,{children:[l.jsxs(he,{children:[l.jsx("div",{className:"font-medium text-foreground",children:s.jd_title||s.slug}),l.jsx("div",{className:"text-xs text-muted-foreground",children:s.slug})]}),l.jsx(he,{className:"text-sm",children:s.org_name||s.org_id}),l.jsx(he,{children:s.status==="active"?l.jsx(ao,{variant:"secondary",children:"Active"}):l.jsx(ao,{variant:"outline",children:s.status})}),l.jsx(he,{className:"text-right tabular-nums",children:s.applications}),l.jsx(he,{className:"text-right tabular-nums",children:s.interviews}),l.jsx(he,{className:"text-right tabular-nums",children:s.candidates_enrolled}),l.jsx(he,{className:"text-sm",children:Gqe(s.created_at)})]},s.job_ad_id))})]})})]})}const Qqe=Wi("/super-admin/jobs")({component:Yqe}),Jqe=Object.freeze(Object.defineProperty({__proto__:null,Route:Qqe},Symbol.toStringTag,{value:"Module"}));function Xqe(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Zqe(){const[e,t]=v.useState({limit:100}),{data:n,isLoading:r,error:i}=jwe(e);return l.jsxs("div",{className:"flex flex-col gap-4 p-2",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Audit log"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Every super-admin action, newest first. Filter to narrow down."})]}),l.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-3",children:[l.jsx(Le,{placeholder:"Actor email",value:e.actor??"",onChange:o=>t(s=>({...s,actor:o.target.value||void 0}))}),l.jsx(Le,{placeholder:"Action (e.g. credits.adjust)",value:e.action??"",onChange:o=>t(s=>({...s,action:o.target.value||void 0}))}),l.jsx(Le,{placeholder:"Target org ID",value:e.org_id??"",onChange:o=>t(s=>({...s,org_id:o.target.value||void 0}))})]}),l.jsx(Ce,{className:"overflow-hidden border border-border shadow-sm rounded-2xl",children:r?l.jsx(Fn,{}):i?l.jsxs("div",{className:"p-6 text-destructive",children:["Failed to load audit log: ",i.message]}):!n||n.length===0?l.jsx("div",{className:"p-6 text-muted-foreground",children:"No audit entries match."}):l.jsxs(mr,{children:[l.jsx(gr,{children:l.jsxs(bt,{children:[l.jsx(pe,{children:"Time"}),l.jsx(pe,{children:"Actor"}),l.jsx(pe,{children:"Action"}),l.jsx(pe,{children:"Target"}),l.jsx(pe,{children:"Payload"})]})}),l.jsx(vr,{children:n.map(o=>l.jsxs(bt,{children:[l.jsx(he,{className:"whitespace-nowrap text-sm text-muted-foreground",children:Xqe(o.created_at)}),l.jsx(he,{className:"text-sm",children:o.actor_email}),l.jsx(he,{children:l.jsx(ao,{variant:"secondary",children:o.action})}),l.jsx(he,{className:"text-sm",children:o.target_org_id?l.jsxs("div",{children:[l.jsx("div",{className:"font-medium",children:o.target_org_name||o.target_org_id}),l.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:o.target_org_id}),o.target_entity&&o.target_entity!=="organization"&&l.jsxs("div",{className:"text-xs text-muted-foreground",children:[o.target_entity," · ",o.target_id]})]}):"-"}),l.jsx(he,{className:"max-w-md",children:o.payload&&Object.keys(o.payload).length>0?l.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs text-muted-foreground",children:JSON.stringify(o.payload,null,2)}):l.jsx("span",{className:"text-muted-foreground",children:"-"})})]},o.id))})]})})]})}const eKe=Wi("/super-admin/audit")({component:Zqe}),tKe=Object.freeze(Object.defineProperty({__proto__:null,Route:eKe},Symbol.toStringTag,{value:"Module"}));function nKe(e){const t=e?.response?.data;return t&&typeof t=="object"&&"health"in t&&typeof t.health?.state=="string"?t:null}function Xe(e,t){const n=e,r=n?.response?.data;if(r&&typeof r=="object"){const i=r.message||r.error;if(typeof i=="string"&&i.trim()!=="")return i}return n?.message||t}const Po=["super-admin","voices"],rKe=[...Po,"catalogue"],iKe=[...Po,"health"];function oKe({enabled:e=!0}={}){const t=q();return ue({queryKey:rKe,enabled:e,queryFn:async()=>(await Se.get("/super-admin/voices/catalogue",{headers:t})).data.voices??[],staleTime:5*60*1e3,retry:!1})}function sKe({enabled:e=!0}={}){const t=q();return ue({queryKey:iKe,enabled:e,queryFn:async()=>(await Se.get("/super-admin/voices/health",{headers:t})).data,staleTime:30*1e3,retry:!1})}function F7(){const e=q(),t=oe();return ie({mutationFn:async n=>(await Se.post(`/super-admin/voices/${encodeURIComponent(n)}/validate`,{},{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:Po})}})}function aKe(){const e=q(),t=oe();return ie({mutationFn:async()=>(await Se.post("/super-admin/voices/health/recheck",{},{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:Po})}})}function lKe(){const e=q();return ie({mutationFn:async t=>(await Se.get(`/super-admin/voices/${encodeURIComponent(t)}/disable-impact`,{headers:e})).data})}function cKe(){const e=q(),t=oe();return ie({mutationFn:async n=>{const r=n.language?.trim()?{language:n.language.trim()}:{};return(await Se.post(`/super-admin/voices/${encodeURIComponent(n.voiceId)}/enable`,r,{headers:e})).data},onSuccess:()=>{t.invalidateQueries({queryKey:Po}),t.invalidateQueries({queryKey:["voices"]})}})}function uKe(){const e=q(),t=oe();return ie({mutationFn:async n=>{const r=n.replacementVoiceId?{replacement_voice_id:n.replacementVoiceId}:{};return(await Se.post(`/super-admin/voices/${encodeURIComponent(n.voiceId)}/disable`,r,{headers:e})).data},onSuccess:()=>{t.invalidateQueries({queryKey:Po}),t.invalidateQueries({queryKey:["voices"]})}})}function dKe(){const e=q(),t=oe();return ie({mutationFn:async n=>(await Se.post(`/super-admin/voices/${encodeURIComponent(n.voiceId)}/repoint/${n.entity}`,{},{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:Po}),t.invalidateQueries({queryKey:["voices"]})}})}function fKe(){const e=q(),t=oe();return ie({mutationFn:async n=>{const r=new FormData;return r.append("file",n.file),(await Se.post(`/super-admin/voices/${encodeURIComponent(n.voiceId)}/preview`,r,{headers:e})).data},onSuccess:()=>{t.invalidateQueries({queryKey:Po}),t.invalidateQueries({queryKey:["voices"]})}})}function hKe(){const e=q(),t=oe();return ie({mutationFn:async n=>(await Se.delete(`/super-admin/voices/${encodeURIComponent(n)}/preview`,{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:Po}),t.invalidateQueries({queryKey:["voices"]})}})}function We({tone:e,children:t,className:n}){const r={green:"bg-success/20 text-success border-success/40",amber:"bg-warning/20 text-warning border-warning/40",red:"bg-destructive/20 text-destructive border-destructive/40",grey:"bg-muted text-muted-foreground border-border"};return l.jsx("span",{className:K("inline-flex items-center whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-medium",r[e],n),children:t})}function B7(e){switch(e){case"passing":return{label:"Passing",tone:"green",healthy:!0};case"failing":return{label:"Failing",tone:"red",healthy:!1};case"stale":return{label:"Stale",tone:"amber",healthy:!1};default:return{label:"Unchecked",tone:"grey",healthy:!1}}}function U7(e){switch(e){case"passed":return{label:"Passed",tone:"green"};case"rejected":return{label:"Rejected",tone:"red"};case"unchecked":return{label:"Unchecked",tone:"grey"};default:return{label:"Never checked",tone:"grey"}}}function z7(e){return e==null||Number.isNaN(e)?"Unknown":`$${Math.round(e*1e3)/1e3}/min`}function GT(e){return e==="platform"?"Platform":"Premium"}function V7(e){switch(e){case"on_roster":return"On roster";case"unshipped_clone":return"Unshipped clone";default:return"Available"}}const YT=["provider","tier","roster_state","accent","gender"],pKe={provider:"Provider",tier:"Tier",roster_state:"Roster state",accent:"Accent",gender:"Gender"},ZF={provider:bn,tier:bn,roster_state:bn,accent:bn,gender:bn};function q7(e,t){switch(t){case"tier":return GT(e.tier);case"roster_state":return V7(e.roster_state);case"provider":return e.provider;case"accent":return e.accent;default:return e.gender}}function mKe(e){return YT.map(t=>({key:t,options:MA(e,n=>q7(n,t))}))}function gKe(e,t,n=""){for(const i of YT)if(!$A(q7(e,i),t[i]))return!1;const r=n.trim().toLowerCase();return r===""?!0:e.voice_name.toLowerCase().includes(r)||e.voice_id.toLowerCase().includes(r)||e.provider.toLowerCase().includes(r)}function vKe(e,t=""){return t.trim()!==""||YT.some(n=>e[n]!==bn)}function yKe(e){const t=new Map,n=new Map,r=(i,o)=>{for(const s of o??[]){const a=Zy(s);i.set(a,(i.get(a)??0)+1)}};for(const i of e.voices)r(t,i.health.blocking_languages),r(n,i.health.uncovered_languages);return e.agent_languages.map(i=>{const o=Zy(i);return{language:i,blocks:t.get(o)??0,uncovered:n.get(o)??0}})}function xKe(e){return yKe(e).map((t,n)=>({impact:t,index:n})).sort((t,n)=>t.impact.blocks!==n.impact.blocks?n.impact.blocks-t.impact.blocks:t.impact.uncovered!==n.impact.uncovered?n.impact.uncovered-t.impact.uncovered:t.index-n.index).map(({impact:t})=>t)}function e3(e){const t=e.pending_org_repoints,n=e.pending_job_repoints;return{organizations:t,jobs:n,complete:t===0&&n===0}}function bKe(e){if(e.complete)return null;const t=[];e.organizations>0&&t.push(`${e.organizations} organization${e.organizations===1?"":"s"}`),e.jobs>0&&t.push(`${e.jobs} job${e.jobs===1?"":"s"}`);const n=t.join(" and "),r=e.organizations>0?" An organization left on a retired voice cannot save its profile at all - not the voice, not the description, not the region - until it is repointed.":"";return`${n} still point at this voice. The disable is not finished.${r}`}const wKe="Repointing jobs changes the interviewer voice on live campaigns mid-flight. Candidates who have already interviewed heard a different voice from the ones who interview after this, within the same evaluation set.",_Ke=5*1024*1024,SKe=".mp3,.wav,.ogg,.aiff,.aif,.m4a,audio/*",jKe=["mp3","wav","ogg","aiff","aif","m4a"];function EKe(e){if(!e)return{ok:!1,reason:"Choose an audio file to upload."};if(e.size===0)return{ok:!1,reason:"That file is empty."};if(e.size>_Ke)return{ok:!1,reason:`That clip is ${sN(e.size)}. The limit is 5 MB.`};const t=e.name.split(".").pop()?.toLowerCase()??"";return jKe.includes(t)?{ok:!0}:{ok:!1,reason:"Audio only - mp3, wav, ogg, aiff or m4a."}}function sN(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function t3(e){switch(e){case"uploaded":return"Uploaded clip";case"local":return"Bundled clip";case"upstream":return"Retell clip, checked";case"unknown":return"Retell clip, unchecked";default:return"Not on the roster"}}function CKe(e){return e==="upstream"?"This voice is recorded as having had Retell's own clip listened to and accepted. Uploading replaces that verdict, and deleting the upload cannot restore it.":e==="local"?"An uploaded clip outranks the bundled one. Deleting the upload falls back to the bundled clip.":null}const NKe="https://dashboard.retellai.com";function PKe({health:e,isLoading:t,error:n}){if(t)return l.jsx("div",{className:"p-6 text-muted-foreground",children:"Loading the agent configurationâ¦"});if(n||!e)return l.jsxs(Ce,{className:"border border-destructive/40 bg-destructive/10 p-6 text-sm text-destructive",children:[l.jsx("div",{className:"font-medium",children:"Could not load the agent configuration."}),l.jsx("div",{className:"mt-1",children:Xe(n,"The endpoint did n
705ot respond.")})]});const r=xKe(e),i=r.filter(o=>o.blocks>0);return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs(Ce,{className:"flex flex-wrap items-start justify-between gap-4 border border-border p-4",children:[l.jsxs("div",{className:"text-sm",children:[l.jsxs("div",{className:"flex items-center gap-2 font-medium text-foreground",children:[l.jsx(Ise,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Production agent"," ",l.jsx("code",{className:"font-mono text-xs text-muted-foreground",children:e.agent_id})]}),l.jsxs("p",{className:"mt-1 max-w-2xl text-muted-foreground",children:["Read-only here. A voice is not valid on its own - validity is a function of the voice ",l.jsx("em",{children:"and"})," the agentâs language list - so every language below narrows which voices can take a call at all, and it narrows the cheap tier first. Editing the list stays an ops step in Retell."]})]}),l.jsxs("a",{href:NKe,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline",children:["Open Retell dashboard ",l.jsx(bV,{className:"h-3.5 w-3.5"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[l.jsx(Ee,{label:"Languages",value:e.agent_languages.length}),l.jsx(Ee,{label:"Roster passing",value:`${e.passing}/${e.total}`,hint:"Under this exact list"}),l.jsx(Ee,{label:"Languages costing voices",value:i.length,hint:"At least one roster voice refused"}),l.jsx(Ee,{label:"Voices blocked",value:e.failing,hint:"Cannot take a call on this agent"})]}),l.jsx(Ce,{className:"overflow-hidden border border-border shadow-sm rounded-2xl",children:l.jsxs(mr,{children:[l.jsx(gr,{children:l.jsxs(bt,{children:[l.jsx(pe,{children:"Language"}),l.jsx(pe,{children:"Roster impact"}),l.jsx(pe,{children:"Voices blocked"}),l.jsx(pe,{children:"Verdicts not covering it"})]})}),l.jsx(vr,{children:r.map(o=>l.jsxs(bt,{children:[l.jsx(he,{className:"font-mono text-sm",children:o.language}),l.jsx(he,{children:o.blocks>0?l.jsxs(We,{tone:"red",children:["Costs ",o.blocks," voice",o.blocks===1?"":"s"]}):o.uncovered>0?l.jsx(We,{tone:"amber",children:"Unverified"}):l.jsx(We,{tone:"green",children:"Free"})}),l.jsx(he,{className:"tabular-nums text-sm text-muted-foreground",children:o.blocks}),l.jsxs(he,{className:"tabular-nums text-sm text-muted-foreground",children:[o.uncovered,o.uncovered>0&&l.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:"stale until re-checked"})]})]},o.language))})]})}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"âCosts N voicesâ counts active roster voices Retell refuses because of that language. âVerdicts not covering itâ counts voices whose last probe ran before the language was added, so their verdict says nothing about it - those are stale rather than broken, and clear by re-checking."})]})}function QT({client:e=ee}={}){const t=q(),[n,r]=v.useState(null),i=v.useRef(null),o=v.useRef(null),s=v.useCallback(()=>{i.current?.pause(),i.current=null,o.current&&(URL.revokeObjectURL(o.current),o.current=null),r(null)},[]);v.useEffect(()=>s,[s]);const a=v.useCallback(async c=>{if(n===c.voice_id){s();return}if(s(),!!c.preview_audio_url){r(c.voice_id);try{const u=await e.get(c.preview_audio_url,{headers:t,responseType:"arraybuffer"}),d=URL.createObjectURL(new Blob([u.data],{type:"audio/mpeg"}));o.current=d;const f=new Audio(d);i.current=f,f.onended=s,f.onerror=s,await f.play()}catch{s()}}},[e,t,n,s]);return{playingId:n,toggle:a,stop:s}}function M0(){const{playingId:e,toggle:t,stop:n}=QT({client:Se}),r=v.useCallback(i=>t({voice_id:i.voice_id,preview_audio_url:i.preview_url||`/super-admin/voices/${encodeURIComponent(i.voice_id)}/preview`}),[t]);return{playingId:e,toggle:r,stop:n}}function kKe(e){if(!e)return"Never";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function AKe({health:e,isLoading:t,error:n,catalogue:r}){const i=aKe(),[o,s]=v.useState(null),a=M0(),c=p=>r?.find(m=>m.voice_id===p)?.voice_name,u=()=>{s(null),i.mutate(void 0,{onSuccess:p=>{s(p),Q.success(p.changed.length>0?`${p.changed.length} voice${p.changed.length===1?"":"s"} changed state`:"Re-check complete, nothing changed")},onError:p=>Q.error(Xe(p,"Re-check failed"))})};if(t)return l.jsx("div",{className:"p-6 text-muted-foreground",children:"Loading roster healthâ¦"});if(n||!e)return l.jsxs(Ce,{className:"border border-destructive/40 bg-destructive/10 p-6 text-sm text-destructive",children:[l.jsx("div",{className:"font-medium",children:"Could not load roster health."}),l.jsx("div",{className:"mt-1",children:Xe(n,"The endpoint did n
705ot respond.")}),l.jsxs("p",{className:"mt-2 text-destructive",children:["A 503 here means the deployment has no"," ",l.jsx("code",{className:"font-mono",children:"RETELL_VALIDATION_AGENT_ID"}),". Validation always runs against the production agent, so the variable names it in both environments and there is deliberately no fallback."]})]});const d={failing:0,stale:1,unchecked:2,passing:3},f=[...e.voices].sort((p,m)=>(d[p.health.state]??9)-(d[m.health.state]??9)||p.voice_id.localeCompare(m.voice_id)),h=e.total-e.passing;return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-5",children:[l.jsx(Ee,{label:"Active roster",value:e.total}),l.jsx(Ee,{label:"Passing",value:e.passing,hint:"Safe to put in front of candidates"}),l.jsx(Ee,{label:"Failing",value:e.failing,hint:"Retell refuses these"}),l.jsx(Ee,{label:"Stale",value:e.stale,hint:"Checked under an older language list"}),l.jsx(Ee,{label:"Unchecked",value:e.unchecked,hint:"Never probed"})]}),h>0&&l.jsxs(Ce,{className:"flex items-start gap-3 border border-warning/40 bg-warning/10 p-4 text-sm text-warning",children:[l.jsx(gs,{className:"mt-0.5 h-4 w-4 shrink-0"}),l.jsxs("div",{children:[l.jsxs("span",{className:"font-medium",children:[h," of ",e.total," active voices are not confirmed healthy."]})," ","Only ",l.jsx("em",{children:"passing"})," counts. A stale verdict was taken under a language list the agent no longer has, so it says nothing about the configuration candidates actually meet - re-check those rather than reading them as fine."]})]}),l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsxs("div",{className:"text-sm text-muted-foreground",children:["Assessed against agent"," ",l.jsx("code",{className:"font-mono text-xs text-muted-foreground",children:e.agent_id})," ","and its ",e.agent_languages.length," languages."]}),l.jsxs(G,{onClick:u,disabled:i.isPending,variant:"outline",children:[i.isPending?l.jsx(ft,{size:18,variant:"current",spin:!0,title:"",className:"mr-2"}):l.jsx(ak,{className:"mr-2 h-4 w-4"}),"Re-check all"]})]}),o&&l.jsx(TKe,{report:o}),l.jsx(Ce,{className:"overflow-hidden border border-border shadow-sm rounded-2xl",children:f.length===0?l.jsx("div",{className:"p-6 text-muted-foreground",children:"No voices on the active roster."}):l.jsxs(mr,{children:[l.jsx(gr,{children:l.jsxs(bt,{children:[l.jsx(pe,{children:"Voice"}),l.jsx(pe,{children:"Label"}),l.jsx(pe,{children:"Health"}),l.jsx(pe,{children:"Why"}),l.jsx(pe,{children:"Last checked"}),l.jsx(pe,{className:"text-right",children:"Actions"})]})}),l.jsx(vr,{children:f.map(p=>l.jsx(RKe,{row:p,displayName:c(p.voice_id),playingId:a.playingId,onPreview:a.toggle},p.voice_id))})]})})]})}function TKe({report:e}){return l.jsxs(Ce,{className:"border border-border p-4 text-sm",children:[l.jsx("div",{className:"font-medium text-foreground",children:"Re-check report"}),l.jsxs("div",{className:"mt-1 text-muted-foreground",children:["Checked ",e.checked," · passed ",e.passed," · failed ",e.failed," · skipped ",e.skipped]}),e.skipped>0&&l.jsxs("p",{className:"mt-2 text-warning",children:[e.skipped," voice",e.skipped===1?" was":"s were"," skipped because Retell concurrency headroom ran out - live interviews draw from the same pool. Press âRe-check allâ again to continue; nothing was lost."]}),e.errors&&e.errors.length>0&&l.jsxs("div",{className:"mt-2 text-muted-foreground",children:[l.jsxs("div",{className:"font-medium",children:["Could not reach a verdict for ",e.errors.length,":"]}),l.jsx("ul",{className:"mt-1 list-inside list-disc",children:e.errors.map(t=>l.jsxs("li",{className:"font-mono text-xs",children:[t.voice_id," - ",t.error]},t.voice_id))}),l.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Transient failures. Their stored verdicts were left alone rather than overwritten with a rejection."})]}),e.changed.length>0?l.jsxs("div",{className:"mt-3",children:[l.jsx("div",{className:"font-medium text-foreground",children:"Changed"}),l.jsx("ul",{className:"mt-1 space-y-1",children:e.changed.map(t=>l.jsxs("li",{className:"text-muted-foreground",children:[l.jsx("span",{className:"font-mono text-xs",children:t.voice_id}),": ",t.from," â"," ",l.jsx("span",{className:"font-medium",children:t.to}),t.message&&l.jsxs("span",{className:"text-muted-foreground",children:[" - ",t.message]})]},t.voice_id))})]}):l.jsx("div",{className:"mt-2 text-muted-foreground",children:"No voice changed state. Rows re-probed to the same verdict are not listed."})]})}function RKe({row:e,displayName:t,playingId:n,onPreview:r}){const i=F7(),o=B7(e.health.state),s=n===e.voice_id,a=()=>i.mutate(e.voice_id,{onSuccess:c=>c.status==="passed"?Q.success(`${t??e.voice_id} passed`):Q.error(c.message||"Retell refused this voice"),onError:c=>Q.error(Xe(c,"Validation failed"))});return l.jsxs(bt,{children:[l.jsxs(he,{children:[l.jsx("div",{className:"font-medium text-foreground",children:t??e.voice_id}),l.jsx("div",{className:"font-mono text-xs text-muted-foreground",children:e.voice_id})]}),l.jsx(he,{className:"text-sm text-muted-foreground",children:e.language}),l.jsx(he,{children:l.jsx(We,{tone:o.tone,children:o.label})}),l.jsxs(he,{className:"max-w-sm text-sm text-muted-foreground",children:[l.jsx("div",{children:e.reason}),e.health.blocking_languages&&e.health.blocking_languages.length>0&&l.jsxs("div",{className:"mt-1 text-xs text-destructive",children:["Blocked on: ",e.health.blocking_languages.join(", ")
705]}),e.health.uncovered_languages&&e.health.uncovered_languages.length>0&&l.jsxs("div",{className:"mt-1 text-xs text-warning",children:["Never probed under: ",e.health.uncovered_languages.join(", ")]})]}),l.jsx(he,{className:"whitespace-nowrap text-sm text-muted-foreground",children:kKe(e.validated_at)}),l.jsx(he,{className:"text-right",children:l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx(G,{size:"sm",variant:"ghost","aria-label":s?`Stop preview of ${t??e.voice_id}`:`Preview ${t??e.voice_id}`,onClick:()=>r({voice_id:e.voice_id}),children:s?l.jsx(Rd,{className:"h-3.5 w-3.5"}):l.jsx(lc,{className:"h-3.5 w-3.5"})}),l.jsx(G,{size:"sm",variant:"outline",onClick:a,disabled:i.isPending,children:i.isPending?l.jsx(ft,{size:16,variant:"current",spin:!0,title:"",className:".5 .5"}):"Re-check"})]})})]})}function OKe({voice:e,open:t,onClose:n,catalogue:r}){const i=lKe(),o=uKe(),s=dKe(),[a,c]=v.useState(""),[u,d]=v.useState(null),[f,h]=v.useState(null),p=e?.voice_id,{mutate:m}=i;if(v.useEffect(()=>{!t||!p||(c(""),d(null),h(null),m(p,{onSuccess:d,onError:j=>Q.error(Xe(j,"Could not read the disable impact"))}))},[t,p,m]),!e)return null;const g=j=>r?.find(E=>E.voice_id===j)?.voice_name??j,y=f?e3(f):null,b=y?bKe(y):null,x=u?.replacement_required??!1,w=u!==null&&(!x||a!==""),S=()=>o.mutate({voiceId:e.voice_id,replacementVoiceId:a||void 0},{onSuccess:j=>{h(j),e3(j).complete?Q.success(`${e.voice_name??e.voice_id} retired`):Q("Voice retired - rows still point at it. Repoint them to finish.",{icon:"â ï¸"})},onError:j=>Q.error(Xe(j,"Disable failed"))}),_=j=>s.mutate({voiceId:e.voice_id,entity:j},{onSuccess:E=>{Q.success(`Repointed ${E.repointed} ${j==="organizations"?"organization":"job"}${E.repointed===1?"":"s"}`),m(e.voice_id,{onSuccess:C=>{d(C),h(N=>N&&{...N,pending_org_repoints:C.org_count,pending_job_repoints:C.job_count})}})},onError:E=>Q.error(Xe(E,"Repoint failed"))});return l.jsx(At,{open:t,onOpenChange:j=>!j&&n(),children:l.jsxs(xt,{className:"max-w-lg",children:[l.jsxs(Wt,{children:[l.jsxs(Ft,{children:["Retire ",e.voice_name??e.voice_id]}),l.jsx(Bt,{children:"Retiring sets the voice inactive. It is never deleted - organizations and jobs hold the id as a bare string, so a delete would strand them."})]}),i.isPending&&!u?l.jsxs("div",{className:"flex items-center gap-2 py-6 text-sm text-muted-foreground",children:[l.jsx(ft,{size:18,variant:"current",spin:!0,title:""})," Counting what points at this voiceâ¦"]}):u?l.jsxs("div",{className:"space-y-4 text-sm",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsx(n3,{label:"Organizations",count:u.org_count,hint:"use this as their default voice"}),l.jsx(n3,{label:"Jobs",count:u.job_count,hint:"interview on this voice"})]}),!f&&l.jsx(l.Fragment,{children:x?l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block font-medium text-foreground",htmlFor:"replacement-voice",children:"Replacement voice (required)"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Captured with the retirement itself, so the value each row was moved off stays recoverable. Only active, passing voices are eligible."}),l.jsxs(ho,{value:a,onValueChange:c,children:[l.jsx(Mi,{id:"replacement-voice",children:l.jsx(po,{placeholder:"Choose a replacement"})}),l.jsx($i,{children:u.eligible_replacements.map(j=>l.jsx(Nt,{value:j,children:g(j)},j))})]}),u.eligible_replacements.length===0&&l.jsx("p",{className:"text-xs text-destructive",children:"No active, passing voice is eligible to replace this one. Enable a replacement first."})]}):l.jsx("p",{className:"text-muted-foreground",children:"Nothing points at this voice, so no replacement is needed."})}),b&&l.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-warning/40 bg-warning/10 p-3 text-warning",children:[l.jsx(gs,{className:"mt-0.5 h-4 w-4 shrink-0"}),l.jsx("div",{children:b})]}),f&&y&&!y.complete&&l.jsxs("div",{className:"space-y-3",children:[y.organizations>0&&l.jsx("div",{children:l.jsxs(G,{size:"sm",variant:"outline",disabled:s.isPending,onClick:()=>_("organizations"),children:[s.isPending&&l.jsx(ft,{size:16,variant:"current",spin:!0,title:"",className:"mr-2 .5 .5"}),"Repoint ",y.organizations," organization",y.organizations===1?"":"s"]})}),y.jobs>0&&l.jsxs("div",{className:"space-y-1",children:[l.jsxs(G,{size:"sm",variant:"outline",disabled:s.isPending,onClick:()=>_("jobs"),children:[s.isPending&&l.jsx(ft,{size:16,variant:"current",spin:!0,title:"",className:"mr-2 .5 .5"}),"Repoint ",y.jobs," job",y.jobs===1?"":"s"]}),l.jsx("p",{className:"text-xs text-warning",children:wKe})]})]}),f&&y?.complete&&l.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-success/40 bg-success/10 p-3 text-success",children:[l.jsx(sk,{className:"mt-0.5 h-4 w-4 shrink-0"}),l.jsx("div",{children:"Retired, and nothing points at it any more. This one is finished."})]})]}):l.jsx("div",{className:"py-6 text-sm text-destructive",children:"Could not read the reference counts, so this disable is blocked. Retiring a voice without knowing what points at it is how the previous roster change became unrecoverable."}),l.jsxs(pr,{children:[l.jsx(G,{variant:"ghost",onClick:n,children:f&&y&&!y.complete?"Close without finishing":"Close"}),!f&&l.jsxs(G,{variant:"destructive",disabled:!w||o.isPending,onClick:S,children:[o.isPending&&l.jsx(ft,{size:18,variant:"current",spin:!0,title:"",className:"mr-2"}),"Retire voice"]})]})]})})}function n3({label:e,count:t,hint:n}){return l.jsxs("div",{className:"rounded-md border border-border p-3",children:[l.jsx("div",{className:"text-2xl font-semibold tabular-nums text-foreground",children:t}),l.jsx("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),l.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:n})]})}function IKe({entry:e,open:t,onClose:n}){const r=cKe(),i=M0(),[o,s]=v.useState(""),[a,c]=v.useState(null),u=e?.voice_id;if(v.useEffect(()=>{t&&(s(""),c(null))},[t,u]),!e)return null;const d=U7(e.validation_status),f=i.playingId===e.voice_id,h=()=>{c(null),r.mutate({voiceId:e.voice_id,language:o},{onSuccess:p=>{Q.success(`${e.voice_name} is on the roster${p.probed?" (probed just now)":""}`),n()},onError:p=>{const m=nKe(p);if(m){c(m);return}Q.error(Xe(p,"Enable failed"))}})};return l.jsx(At,{open:t,onOpenChange:p=>!p&&n(),children:l.jsxs(xt,{className:"max-w-lg",children:[l.jsxs(Wt,{children:[l.jsxs(Ft,{children:["Enable ",e.voice_name]}),l.jsx(Bt,{children:"Adds the voice to the roster recruiters pick from. Refused unless it passes validation against the production agent."})]}),l.jsxs("div",{className:"space-y-4 text-sm",children:[l.jsxs("dl",{className:"grid grid-cols-2 gap-3",children:[l.jsx(cv,{label:"Voice id",children:l.jsx("span",{className:"font-mono text-xs",children:e.voice_id})}),l.jsx(cv,{label:"Provider",children:e.provider}),l.jsx(cv,{label:"Price tier",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(We,{tone:e.tier==="platform"?"green":"amber",children:GT(e.tier)}),l.jsx("span",{className:"text-muted-foreground",children:z7(e.price_per_minute)})]})}),l.jsx(cv,{label:"Validation",children:l.jsx(We,{tone:d.tone,children:d.label})})]}),e.tier==="premium"&&l.jsx("p",{className:"text-xs text-muted-foreground",children:"Premium voices bill above the platform rate. Unknown means no price is recorded for this provider anywhere - it is not free."}),e.validation_status!=="passed"&&l.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-warning/40 bg-warning/10 p-3 text-warning",children:[l.jsx(gs,{className:"mt-0.5 h-4 w-4 shrink-0"}),l.jsx("div",{children:"No passing verdict is on record for this voice, so enabling will probe it against the production agent first. If Retell refuses, the voice is recorded as checked-and-rejected rather than shipped."})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsxs("label",{className:"block font-medium text-foreground",htmlFor:"voice-language",children:["Display label"," ",l.jsx("span",{className:"font-normal text-muted-foreground",children:"(optional)"})]}),l.jsx(Le,{id:"voice-language",value:o,placeholder:e.accent?`Derived from â${e.accent}â`:"Derived from accent",onChange:p=>s(p.target.value)}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Free-text, display only, and derived from the accent when left blank. Only applied to a voice with no roster row yet - an existing row keeps its label, so re-enabling the rosterâs only male German voice does not refile it as English."})]}),a&&l.jsx(MKe,{refusal:a})]}),l.jsxs(pr,{className:"sm:justify-between",children:[l.jsxs(G,{variant:"ghost",onClick:()=>i.toggle({voice_id:e.voice_id,preview_url:e.preview_url}),children:[f?l.jsx(Rd,{className:"mr-2 h-4 w-4"}):l.jsx(lc,{className:"mr-2 h-4 w-4"}),f?"Stop":"Preview"]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(G,{variant:"ghost",onClick:n,children:"Cancel"}),l.jsxs(G,{onClick:h,disabled:r.isPending,children:[r.isPending&&l.jsx(ft,{size:18,variant:"current",spin:!0,title:"",className:"mr-2"}),a?"Try again":"Enable"]})]})]})]})})}function MKe({refusal:e}){const t=B7(e.health.state);return l.jsxs("div",{className:"space-y-2 rounded-md border border-destructive/40 bg-destructive/10 p-3 text-destructive",children:[l.jsxs("div",{className:"flex items-center gap-2 font-medium",children:[l.jsx(We,{tone:t.tone,children:t.label}),"Not enabled"]}),l.jsx("div",{children:e.reason}),e.health.blocking_languages&&e.health.blocking_languages.length>0&&l.jsxs("div",{children:[l.jsx("span",{className:"font-medium",children:"Blocked on:"}
705)," ",e.health.blocking_languages.join(", ")]}),e.health.uncovered_languages&&e.health.uncovered_languages.length>0&&l.jsxs("div",{children:[l.jsx("span",{className:"font-medium",children:"Never probed under:"})," ",e.health.uncovered_languages.join(", ")]}),e.message&&l.jsxs("div",{className:"rounded border border-destructive/40 bg-card/60 p-2 text-xs",children:[l.jsx("span",{className:"font-medium",children:"Retell said:"})," ",e.message]}),l.jsx("div",{className:"text-xs",children:e.remediable?"Re-checking may clear this - the verdict on record does not cover the agentâs current language list.":"This will not clear by re-checking. The voice cannot speak a language the agent requires; shortening the agentâs language list in Retell is the only fix."})]})}function cv({label:e,children:t}){return l.jsxs("div",{children:[l.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),l.jsx("dd",{className:"mt-0.5 text-foreground",children:t})]})}function $Ke({entry:e,onClose:t}){const n=fKe(),r=hKe(),i=M0(),o=v.useRef(null),[s,a]=v.useState(null),[c,u]=v.useState(void 0);if(!e)return null;const d=c??e.preview_source,f=EKe(s),h=CKe(d),p=n.isPending||r.isPending,m=()=>{a(null),o.current&&(o.current.value="")},g=()=>{i.stop(),a(null),u(void 0),t()},y=()=>{!s||!f.ok||n.mutate({voiceId:e.voice_id,file:s},{onSuccess:w=>{u(w.preview_source),m(),Q.success(`Uploaded ${sN(w.bytes??s.size)} for ${e.voice_name}`)},onError:w=>Q.error(Xe(w,"Upload failed"))})},b=()=>r.mutate(e.voice_id,{onSuccess:w=>{u(w.preview_source),m(),Q.success(`Upload cleared - now ${t3(w.preview_source)}`)},onError:w=>Q.error(Xe(w,"Could not clear the clip"))}),x=i.playingId===e.voice_id;return l.jsx(At,{open:!0,onOpenChange:w=>!w&&g(),children:l.jsxs(xt,{className:"sm:max-w-lg",children:[l.jsxs(Wt,{children:[l.jsxs(Ft,{children:["Preview clip - ",e.voice_name]}),l.jsx(Bt,{className:"font-mono text-xs",children:e.voice_id})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border px-3 py-2",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-xs text-muted-foreground",children:"Currently"}),l.jsx("div",{className:"text-sm font-medium text-foreground",children:t3(d)})]}),l.jsx(G,{variant:"ghost",size:"sm","aria-label":x?`Stop preview of ${e.voice_name}`:`Preview ${e.voice_name}`,onClick:()=>i.toggle({voice_id:e.voice_id,preview_url:e.preview_url}),children:x?l.jsx(Rd,{className:"h-3.5 w-3.5"}):l.jsx(lc,{className:"h-3.5 w-3.5"})})]}),h&&l.jsxs("div",{className:"flex gap-2 rounded-md border border-warning/40 bg-warning/10 p-3 text-sm text-warning",children:[l.jsx(gs,{className:"mt-0.5 h-4 w-4 shrink-0"}),l.jsx("p",{children:h})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block text-sm font-medium text-muted-foreground",htmlFor:"voice-preview-file",children:"Replace with"}),l.jsx("input",{id:"voice-preview-file",ref:o,type:"file",accept:SKe,disabled:p,onChange:w=>a(w.target.files?.[0]??null),className:"block w-full text-sm text-muted-foreground file:mr-3 file:rounded-md file:border-0 file:bg-muted file:px-3 file:py-1.5 file:text-sm file:font-medium hover:file:bg-secondary"}),s&&f.ok&&l.jsxs("p",{className:"text-xs text-muted-foreground",children:[s.name," · ",sN(s.size)]}),s&&!f.ok&&l.jsx("p",{className:"text-xs text-destructive",children:f.reason}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"mp3, wav, ogg, aiff or m4a, up to 5 MB. The server checks the file's actual contents, not its name."})]})]}),l.jsxs(pr,{className:"gap-2 sm:justify-between",children:[l.jsxs(G,{variant:"outline",onClick:b,disabled:p||d!=="uploaded",children:[r.isPending&&l.jsx(ft,{size:16,variant:"current",spin:!0,title:"",className:"mr-2 .5 .5"}),"Clear upload"]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(G,{variant:"ghost",onClick:g,disabled:p,children:"Close"}),l.jsxs(G,{onClick:y,disabled:p||!s||!f.ok,children:[n.isPending?l.jsx(ft,{size:16,variant:"current",spin:!0,title:"",className:"mr-2 .5 .5"}):l.jsx(Wse,{className:"mr-2 h-3.5 w-3.5"}),"Upload"]})]})]})]})})}const kc=50;function DKe({catalogue:e,isLoading:t,error:n}){const[r,i]=v.useState(ZF),[o,s]=v.useState(""),[a,c]=v.useState(kc),[u,d]=v.useState(null),[f,h]=v.useState(null),[p,m]=v.useState(null),g=M0(),y=v.useMemo(()=>e??[],[e]),b=v.useMemo(()=>mKe(y).filter(({options:j})=>S0e(j)),[y]),x=v.useMemo(()=>y.filter(j=>gKe(j,r,o)),[y,r,o]),w=vKe(r,o),S=()=>{i(ZF),s(""),c(kc)};if(t)return l.jsx("div",{className:"p-6 text-muted-foreground",children:"Loading the Retell catalogueâ¦"});if(n)return l.jsxs(Ce,{className:"border border-destructive/40 bg-destructive/10 p-6 text-sm text-destructive",children:[l.jsx("div",{className:"font-medium",children:"Could not load the catalogue."}),l.jsx("div",{className:"mt-1",children:Xe(n,"The endpoint did n
705ot respond.")}),l.jsxs("p",{className:"mt-2 text-destructive",children:["This view needs a live Retell call, unlike roster health. A 502 means Retell itself refused or was unreachable; a 503 means this deployment has no ",l.jsx("code",{className:"font-mono",children:"RETELL_VALIDATION_AGENT_ID"}),"."]})]});const _=x.slice(0,a);return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[l.jsxs("div",{className:"relative min-w-[14rem] max-w-xs flex-grow",children:[l.jsx(Ea,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{type:"search",value:o,onChange:j=>{s(j.target.value),c(kc)},placeholder:"Search name, id or provider","aria-label":"Search the voice catalogue",className:"h-9 w-full rounded-md border border-border pl-8 pr-2 text-sm focus:border-muted-foreground/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"})]}),b.map(({key:j,options:E})=>l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("label",{htmlFor:`facet-${j}`,className:"text-xs font-medium text-muted-foreground",children:pKe[j]}),l.jsxs("select",{id:`facet-${j}`,value:r[j],onChange:C=>{const N=C.target.value;i(k=>({...k,[j]:N})),c(kc)},className:"h-9 rounded-md border border-border bg-card px-2 text-sm focus:border-muted-foreground/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[l.jsx("option",{value:bn,children:"All"}),E.map(C=>l.jsxs("option",{value:C.value,children:[C.label," (",C.count,")"]},C.value))]})]},j)),w&&l.jsxs(G,{variant:"ghost",size:"sm",onClick:S,children:[l.jsx(Dr,{className:"mr-1 h-3.5 w-3.5"})," Clear"]})]}),l.jsxs("div",{className:"text-sm text-muted-foreground",children:[x.length," of ",y.length," voices",w?" match":" in the account","."]})]}),l.jsx(Ce,{className:"overflow-hidden border border-border shadow-sm rounded-2xl",children:_.length===0?l.jsx("div",{className:"p-6 text-muted-foreground",children:"No voice matches these filters."}):l.jsxs(mr,{children:[l.jsx(gr,{children:l.jsxs(bt,{children:[l.jsx(pe,{children:"Voice"}),l.jsx(pe,{children:"Provider"}),l.jsx(pe,{children:"Tier"}),l.jsx(pe,{children:"Roster"}),l.jsx(pe,{children:"Validation"}),l.jsx(pe,{className:"text-right",children:"Actions"})]})}),l.jsx(vr,{children:_.map(j=>l.jsx(LKe,{entry:j,playing:g.playingId===j.voice_id,onPreview:()=>g.toggle({voice_id:j.voice_id,preview_url:j.preview_url}),onEnable:()=>d(j),onDisable:()=>h(j),onEditClip:()=>m(j)},j.voice_id))})]})}),x.length>_.length&&l.jsx("div",{className:"flex justify-center",children:l.jsxs(G,{variant:"outline",onClick:()=>c(j=>j+kc),children:["Show ",Math.min(kc,x.length-_.length)," more"]})}),l.jsx(IKe,{entry:u,open:u!==null,onClose:()=>d(null)}),l.jsx(OKe,{voice:f,open:f!==null,onClose:()=>h(null),catalogue:e}),l.jsx($Ke,{entry:p,onClose:()=>m(null)})]})}function LKe({entry:e,playing:t,onPreview:n,onEnable:r,onDisable:i,onEditClip:o}){const s=F7(),a=U7(e.validation_status),c=()=>s.mutate(e.voice_id,{onSuccess:u=>u.status==="passed"?Q.success(`${e.voice_name} passed`):Q.error(u.message||"Retell refused this voice"),onError:u=>Q.error(Xe(u,"Validation failed"))});return l.jsxs(bt,{children:[l.jsxs(he,{children:[l.jsx("div",{className:"font-medium text-foreground",children:e.voice_name}),l.jsx("div",{className:"font-mono text-xs text-muted-foreground",children:e.voice_id}),l.jsx("div",{className:"mt-0.5 text-xs text-muted-foreground",children:[e.gender,e.accent,e.age].filter(Boolean).join(" · ")||"No metadata"})]}),l.jsx(he,{className:"text-sm text-muted-foreground",children:e.provider}),l.jsxs(he,{children:[l.jsx(We,{tone:e.tier==="platform"?"green":"amber",children:GT(e.tier)}),l.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:z7(e.price_per_minute)})]}),l.jsx(he,{className:"text-sm text-muted-foreground",children:V7(e.roster_state)}),l.jsx(he,{children:l.jsx(We,{tone:a.tone,children:a.label})}),l.jsx(he,{className:"text-right",children:l.jsxs("div",{className:"flex justify-end gap-1",children:[l.jsx(G,{size:"sm",variant:"ghost","aria-label":t?`Stop preview of ${e.voice_name}`:`Preview ${e.voice_name}`,onClick:n,children:t?l.jsx(Rd,{className:"h-3.5 w-3.5"}):l.jsx(lc,{className:"h-3.5 w-3.5"})}),l.jsx(G,{size:"sm",variant:"ghost",onClick:c,disabled:s.isPending,children:s.isPending?l.jsx(ft,{size:16,variant:"current",spin:!0,title:"",className:".5 .5"}):"Validate"}),o&&l.jsx(G,{size:"sm",variant:"ghost","aria-label":`Replace the preview clip for ${e.voice_name}`,onClick:o,children:l.jsx(vse,{className:"h-3.5 w-3.5"})}),e.roster_state==="on_roster"?l.jsx(G,{size:"sm",variant:"outline",onClick:i,children:"Retire"}):l.jsx(G,{size:"sm",onClick:r,children:"Enable"})]})})]})}const FKe=["warm","professional","calm","energetic","authoritative","friendly"],Xm=[...Po,"livekit"],BKe=[...Xm,"catalogue"],UKe=[...Xm,"vendors"],zKe=[...Xm,"country-defaults"],ko="/super-admin/voices/livekit",gd=e=>`${ko}/${encodeURIComponent(e)}`,VKe=5e3;function K7({enabled:e=!0}={}){const t=q();return ue({queryKey:BKe,enabled:e,refetchInterval:n=>n.state.data?.voices.some(r=>r.validation.some(i=>i.status==="pending"))?VKe:!1,queryFn:async()=>{const n=await Se.get(`${ko}/catalogue`,{headers:t});return{voices:n.data.voices??[],speechRate:n.data.speech_rate}},retry:!1})}function qKe({enabled:e=!0}={}){const t=q();return ue({queryKey:UKe,enabled:e,queryFn:async()=>(await Se.get(`${ko}/vendors`,{headers:t})).data.vendors??[],retry:!1})}function KKe({enabled:e=!0}={}){const t=q();return ue({queryKey:zKe,enabled:e,queryFn:async()=>(await Se.get(`${ko}/country-defaults`,{headers:t})).data,retry:!1})}function WKe(e){const t=q();return ue({queryKey:[...Xm,"impact",e],enabled:!!e,queryFn:async()=>(await Se.get(`${gd(e??"")}/disable-impact`,{headers:t})).data,retry:!1})}function Ao(e){const t=q(),n=oe();return ie({mutationFn:r=>e(r,t),onSuccess:()=>{n.invalidateQueries({queryKey:Xm}),n.invalidateQueries({queryKey:["voices"]})}})}function HKe(){return Ao(async(e,t)=>(await Se.post(`${ko}/load`,{vendor:e},{headers:t})).data)}function GKe(){return Ao(async(e,t)=>(await Se.post(`${ko}/add`,e,{headers:t})).data)}function YKe(){return Ao(async(e,t)=>(await Se.post(`${ko}/${e.purpose==="validate"?"validate":"previews"}`,{voice_ids:e.voiceIds,languages:e.languages??[]},{headers:t})).data)}function QKe(){return Ao(async(e,t)=>(await Se.post(`${ko}/enable`,{voice_ids:e},{headers:t})).data)}function JKe(){return Ao(async(e,t)=>(await Se.post(`${gd(e.voiceId)}/disable`,{replacement_voice_id:e.replacementVoiceId},{headers:t})).data)}function XKe(){return Ao(async(e,t)=>(await Se.post(`${gd(e.voiceId)}/repoint/${e.target}`,{},{headers:t})).data)}function ZKe(){return Ao(async(e,t)=>"clear"in e?(await Se.delete(`${gd(e.voiceId)}/tones`,{headers:t})).data:(await Se.put(`${gd(e.voiceId)}/tones`,{tones:e.tones,primary_tone:e.primaryTone},{headers:t})).data)}function eWe(){return Ao(async(e,t)=>(await Se.post(`${ko}/tones/suggest`,{voice_ids:e.voiceIds??[],only_missing:!!e.onlyMissing},{headers:t})).data)}function tWe(){return Ao(async(e,t)=>(await Se.put(`${gd(e.voiceId)}
705/cost`,{ship_per_1m_chars_usd:e.ship,scale_per_1m_chars_usd:e.scale,note:e.note},{headers:t})).data)}function nWe(){return Ao(async(e,t)=>(await Se.post(`${ko}/cost/speech-rate/measure`,{window_days:e},{headers:t})).data)}const r3=e=>e.charAt(0).toUpperCase()+e.slice(1);function rWe({voice:e,onClose:t}){const[n,r]=v.useState([]),[i,o]=v.useState(""),s=ZKe();if(v.useEffect(()=>{r(e?.tones??[]),o(e?.primary_tone??"")},[e]),!e)return null;const a=f=>{r(h=>h.includes(f)?h.filter(p=>p!==f):h.length>=2?h:[...h,f])},c=i&&n.includes(i)?i:n[0],u=async()=>{if(c)try{await s.mutateAsync({voiceId:e.voice_id,tones:n,primaryTone:c}),Q.success("Tones saved"),t()}catch(f){Q.error(Xe(f,"Could not save tones"))}},d=async()=>{try{await s.mutateAsync({voiceId:e.voice_id,clear:!0}),Q.success("Override cleared"),t()}catch(f){Q.error(Xe(f,"Could not clear the override"))}};return l.jsx(At,{open:!0,onOpenChange:f=>!f&&t(),children:l.jsxs(xt,{children:[l.jsxs(Wt,{children:[l.jsxs(Ft,{children:["Tones for ",e.voice_name]}),l.jsx(Bt,{children:"Pick one or two. The primary tone is the group recruiters see this voice under. Your choice survives catalogue reloads and tone suggestions."})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:FKe.map(f=>l.jsxs(G,{type:"button",size:"sm",variant:n.includes(f)?"default":"outline",onClick:()=>a(f),children:[r3(f),c===f&&" (primary)"]},f))}),n.length===2&&l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx("span",{children:"Primary:"}),n.map(f=>l.jsx(G,{type:"button",size:"sm",variant:"ghost",onClick:()=>o(f),children:r3(f)},f))]}),l.jsxs(pr,{className:"gap-2",children:[e.tones_source==="admin"&&l.jsx(G,{type:"button",variant:"outline",onClick:d,disabled:s.isPending,children:"Clear override"}),l.jsx(G,{type:"button",onClick:u,disabled:n.length===0||s.isPending,children:"Save"})]})]})})}function iWe({voice:e,onClose:t}){const[n,r]=v.useState(""),[i,o]=v.useState(""),[s,a]=v.useState(""),c=tWe();if(v.useEffect(()=>{const h=e?.cost.price_source==="override";r(h&&e?.cost.ship_per_1m_chars_usd!==void 0?String(e.cost.ship_per_1m_chars_usd):""),o(h&&e?.cost.scale_per_1m_chars_usd!==void 0?String(e.cost.scale_per_1m_chars_usd):""),a(e?.cost.price_note??"")},[e]),!e)return null;const u=h=>h.trim()===""?null:Number(h),d=[n,i].some(h=>h.trim()!==""&&(Number.isNaN(Number(h))||Number(h)<0)),f=async h=>{try{await c.mutateAsync({voiceId:e.voice_id,ship:h?null:u(n),scale:h?null:u(i),note:h?"":s}),Q.success(h?"Price override cleared":"Price saved"),t()}catch(p){Q.error(Xe(p,"Could not save the price"))}};return l.jsx(At,{open:!0,onOpenChange:h=>!h&&t(),children:l.jsxs(xt,{children:[l.jsxs(Wt,{children:[l.jsxs(Ft,{children:["Cost for ",e.voice_name]}),l.jsxs(Bt,{children:["USD per 1M characters. Empty uses LiveKit's price table for"," ",e.tts_model,". Super-admins only; recruiters never see cost."]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx(Kt,{htmlFor:"lk-ship",children:"Ship"}),l.jsx(Le,{id:"lk-ship",inputMode:"decimal",value:n,onChange:h=>r(h.target.value)})]}),l.jsxs("div",{children:[l.jsx(Kt,{htmlFor:"lk-scale",children:"Scale"}),l.jsx(Le,{id:"lk-scale",inputMode:"decimal",value:i,onChange:h=>o(h.target.value)})]}),l.jsxs("div",{className:"col-span-2",children:[l.jsx(Kt,{htmlFor:"lk-note",children:"Why"}),l.jsx(Le,{id:"lk-note",value:s,onChange:h=>a(h.target.value)})]})]}),l.jsxs(pr,{className:"gap-2",children:[l.jsx(G,{type:"button",variant:"outline",onClick:()=>f(!0),disabled:c.isPending,children:"Use price table"}),l.jsx(G,{type:"button",onClick:()=>f(!1),disabled:d||c.isPending,children:"Save"})]})]})})}function oWe({open:e,onClose:t}){const[n,r]=v.useState(""),[i,o]=v.useState(""),[s,a]=v.useState(""),[c,u]=v.useState("en"),[d,f]=v.useState(""),[h,p]=v.useState(""),m=GKe();if(!e)return null;const g=async()=>{try{await m.mutateAsync({voice_id:n.trim(),voice_name:i.trim(),tts_model:s.trim()||void 0,languages:c.split(/[\s,]+/).filter(Boolean),gender:d||void 0,accent_locale:h.trim()||void 0}),Q.success("Voice added, hidden until validated"),t()}catch(y){Q.error(Xe(y,"Could not add the voice"))}};return l.jsx(At,{open:!0,onOpenChange:y=>!y&&t(),children:l.jsxs(xt,{children:[l.jsxs(Wt,{children:[l.jsx(Ft,{children:"Add a LiveKit voice by id"}),l.jsx(Bt,{children:"The id is vendor:voice, for example cartesia:<uuid>, inworld:Ashley or rime:<speaker>. LiveKit's own form, cartesia/sonic-3:<uuid>, is accepted too. The model defaults to the vendor's current one (Cartesia: sonic-3.6, Inworld: inworld-tts-2). Cartesia and Inworld need no key to add a voice; only listing their catalogues does."})]}),l.jsxs("div",{className:"grid gap-3",children:[l.jsxs("div",{children:[l.jsx(Kt,{htmlFor:"lk-add-id",children:"Voice id"}),l.jsx(Le,{id:"lk-add-id",value:n,onChange:y=>r(y.target.value)})]}),l.jsxs("div",{children:[l.jsx(Kt,{htmlFor:"lk-add-name",children:"Name"}),l.jsx(Le,{id:"lk-add-name",value:i,onChange:y=>o(y.target.value)})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx(Kt,{htmlFor:"lk-add-model",children:"Model (optional)"}),l.jsx(Le,{id:"lk-add-model",value:s,onChange:y=>a(y.target.value)})]}),l.jsxs("div",{children:[l.jsx(Kt,{htmlFor:"lk-add-langs",children:"Languages"}),l.jsx(Le,{id:"lk-add-langs",value:c,onChange:y=>u(y.target.value)})]}),l.jsxs("div",{children:[l.jsx(Kt,{children:"Gender"}),l.jsxs(ho,{value:d||"unknown",onValueChange:y=>f(y==="unknown"?"":y),children:[l.jsx(Mi,{children:l.jsx(po,{})}),l.jsxs($i,{children:[l.jsx(Nt,{value:"unknown",children:"Unknown"}),l.jsx(Nt,{value:"female",children:"Female"}),l.jsx(Nt,{value:"male",children:"Male"}),l.jsx(Nt,{value:"neutral",children:"Neutral"})]})]})]}),l.jsxs("div",{children:[l.jsx(Kt,{htmlFor:"lk-add-accent",children:"Accent locale"}),l.jsx(Le,{id:"lk-add-accent",placeholder:"en-GB",value:h,onChange:y=>p(y.target.value)})]})]})]}),l.jsx(pr,{children:l.jsx(G,{type:"button",onClick:g,disabled:!n.trim()||!i.trim()||m.isPending,children:"Add hidden"})})]})})}function sWe({voice:e,voices:t,onClose:n}){const r=!!e&&!e.enabled,i=WKe(e?.voice_id??null),o=JKe(),s=XKe(),[a,c]=v.useState(""),[u,d]=v.useState(!1),[f,h]=v.useState([]);if(v.useEffect(()=>{c(e&&!e.enabled?e.replacement_voice_id??"":""),d(!!e&&!e.enabled),h([])},[e]),!e)return null;const p=new Map(t.map(x=>[x.voice_id,x.voice_name])),m=i.data,g=m?.replacement_required??!0,y=async()=>{try{await o.mutateAsync({voiceId:e.voice_id,replacementVoiceId:a}),d(!0),h(x=>[...x,"Disabled. Recruiters can no longer pick it."])}catch(x){Q.error(Xe(x,"Could not disable the voice"))}},b=async x=>{try{const w=await s.mutateAsync({voiceId:e.voice_id,target:x}),S=w.kept_language_mismatch?.length?`, ${w.kept_language_mismatch.length} kept (the replacement does not speak their language)`:"";h(_=>[..._,`Moved ${w.moved.length} ${x}${S}.`])}catch(w){Q.error(Xe(w,"Could not repoint"))}};return l.jsx(At,{open:!0,onOpenChange:x=>!x&&n(),children:l.jsxs(xt,{children:[l.jsxs(Wt,{children:[l.jsxs(Ft,{children:[r?"Repoint":"Disable"," ",e.voice_name]}),l.jsxs(Bt,{children:[i.isLoading?"Checking who uses this voiceâ¦":m?.references_unavailable?"Jobs and orgs using this voice can't be counted yet (the job and org LiveKit voice columns are missing on this server), so a replacement is required.":`${m?.org_count??0} orgs and ${m?.job_count??0} jobs use it.`,r&&a&&` Replacement: ${p.get(a)??a}.`]})]}),!u&&l.jsxs("div",{className:"grid gap-2",children:[l.jsxs(Kt,{children:["Replacement ",g?"(required)":"(optional)"]}),l.jsxs(ho,{value:a||void 0,onValueChange:c,children:[l.jsx(Mi,{children:l.jsx(po,{placeholder:"Pick an enabled voice"})}),l.jsx($i,{children:(m?.eligible_replacements??[]).map(x=>l.jsx(Nt,{value:x,children:p.get(x)??x},x))})]})]}),f.length>0&&l.jsx("ul",{className:"list-disc pl-5 text-sm text-muted-foreground",children:f.map((x,w)=>l.jsx("li",{children:x},w))}),l.jsxs(pr,{className:"gap-2",children:[u?a&&l.jsxs(l.Fragment,{children:[l.jsx(G,{type:"button",variant:"outline",onClick:()=>b("organizations"),disabled:s.isPending,children:"Repoint organizations"}),l.jsx(G,{type:"button",variant:"outline",onClick:()=>b("jobs"),disabled:s.isPending,children:"Repoint jobs"})]}):l.jsx(G,{type:"button",variant:"destructive",onClick:y,disabled:i.isLoading||g&&!a||o.isPending,children:"Disable"}),l.jsx(G,{type:"button",variant:"ghost",onClick:n,children:"Close"})]})]})})}const Zx={en:"English",fr:"French",de:"German",hi:"Hindi",es:"Spanish"};function aWe(e){switch(e){case"passed":return{tone:"green",label:"Passed"};case"failed":return{tone:"red",label:"Failed"};
705case"pending":return{tone:"amber",label:"Checking"};default:return{tone:"grey",label:"Unchecked"}}}const lWe={search:"",vendor:"",language:"",status:"any"};function cWe(e){return e.validation.some(t=>t.status==="unchecked"||t.status==="pending")}function uWe(e,t){const n=t.search.trim().toLowerCase();if(n&&!`${e.voice_name} ${e.voice_id} ${e.accent} ${e.description}`.toLowerCase().includes(n)||t.vendor&&e.tts_vendor!==t.vendor||t.language&&!e.claimed_languages.includes(t.language))return!1;switch(t.status){case"enabled":return e.enabled;case"hidden":return!e.enabled;case"ready":return!e.enabled&&e.can_enable;case"needs_check":return cWe(e);default:return!0}}function uv(e,t=4){return e==null||Number.isNaN(e)?"â":`$${e.toFixed(t)}`}function dWe(e){const t=e.price_source==="unknown"?"No price known":`${uv(e.ship_per_1m_chars_usd,2)} Ship / ${uv(e.scale_per_1m_chars_usd,2)} Scale per 1M chars`,n=e.price_source==="unknown"?"â":`${uv(e.ship_per_minute_usd)} / ${uv(e.scale_per_minute_usd)} per min`;let r;return e.listed_as_free&&e.price_source==="price_table"?r="Listed at $0 by LiveKit: treat as a promotion and re-check.":e.price_source==="override"&&(r=e.price_note?`Override: ${e.price_note}
705`:"Super-admin override"),e.chars_per_minute_source!=="measured"&&(r=[r,`Per-minute uses LiveKit's ${Math.round(e.chars_per_minute)} chars/min assumption until pilot sessions are measured.`].filter(Boolean).join(" ")),{perMillion:t,perMinute:n,caveat:r}}function US(e,t){return e.filter(n=>t.has(n.voice_id)&&!n.enabled&&n.can_enable).map(n=>n.voice_id)}function fWe(e,t){return e.filter(n=>t.has(n.voice_id)&&!n.enabled&&!n.can_enable).map(n=>({voice_id:n.voice_id,reason:n.enable_blocked_by||"not validated"}))}function hWe(e,t){return`${e}|${t}`}function pWe(e){const t=["en","fr","de","hi","es"];return[...e.validation].sort((n,r)=>t.indexOf(n.language)-t.indexOf(r.language))}function mWe(e){const t={};for(const n of Object.keys(Zx))t[n]={female:0,male:0,other:0};for(const n of e)if(n.enabled)for(const r of n.languages){const i=t[r];i&&(n.gender==="female"?i.female++:n.gender==="male"?i.male++:i.other++)}return t}function gWe(e){return e.some(t=>t.validation.some(n=>n.status==="pending"))}function i3(e){return e.enabled?"disable":e.replacement_voice_id?"repoint":null}const Ac="__any__",zS=100;function vWe(){const e=K7(),t=qKe(),n=KKe(),r=HKe(),i=YKe(),o=QKe(),s=eWe(),a=nWe(),{playingId:c,toggle:u}=QT({client:Se}),[d,f]=v.useState(lWe),[h,p]=v.useState(new Set),[m,g]=v.useState(zS),[y,b]=v.useState(null),[x,w]=v.useState(null),[S,_]=v.useState(null),[j,E]=v.useState(!1),C=v.useMemo(()=>e.data?.voices??[],[e.data]),N=v.useMemo(()=>C.filter(I=>uWe(I,d)),[C,d]),k=v.useMemo(()=>mWe(C),[C]),P=N.slice(0,m),A=[...h],L=I=>{f(z=>({...z,...I})),g(zS)},R=I=>p(z=>{const H=new Set(z);return H.has(I)?H.delete(I):H.add(I),H}),D=()=>p(new Set(P.map(I=>I.voice_id))),O=async I=>{try{const z=await r.mutateAsync(I);Q.success(`${I}: ${z.added} added, ${z.refreshed} refreshed, ${z.skipped?.length??0} skipped`)}catch(z){Q.error(Xe(z,`Could not load ${I}
705`))}},F=async I=>{try{const z=await i.mutateAsync({purpose:I,voiceIds:A}),H=`${z.clips_queued} clips queued in ${z.batches.length} batch(es)`;z.clips_not_queued>0?Q(`${H}; ${z.clips_not_queued} waiting: ${z.reason??""}`):Q.success(H)}catch(z){Q.error(Xe(z,"Could not start synthesis"))}},T=async()=>{const I=fWe(C,h);try{const z=await o.mutateAsync(US(C,h));Q.success(`${z.enabled.length} enabled`);const H=[...I,...z.refused];H.length>0&&Q.error(`${H.length} not enabled: ${H[0].reason}`),p(new Set)}catch(z){Q.error(Xe(z,"Could not enable"))}},M=async()=>{try{const I=await s.mutateAsync({voiceIds:A,onlyMissing:A.length===0});Q.success(`Tones suggested for ${Object.keys(I.suggested).length} voices`)}catch(I){Q.error(Xe(I,"Could not suggest tones"))}},V=async()=>{try{const I=await a.mutateAsync(30);Q.success(I.sessions?`${Math.round(I.chars_per_minute)} chars/min from ${I.sessions} sessions`:"No pilot sessions to measure yet")}catch(I){Q.error(Xe(I,"Could not measure"))}};if(e.isLoading)return l.jsx(Ce,{className:"p-6 text-sm text-muted-foreground",children:"Loading the LiveKit rosterâ¦"});if(e.error)return l.jsx(Ce,{className:"p-6 text-sm text-destructive",children:Xe(e.error,"Could not load the LiveKit roster")});const B=e.data?.speechRate;return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs(Ce,{className:"flex flex-col gap-3 p-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Vendor catalogues"}),l.jsxs(G,{size:"sm",variant:"outline",onClick:()=>E(!0),children:[l.jsx(Jb,{className:"mr-1 h-4 w-4"})," Add by id"]})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:(t.data??[]).map(I=>l.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border px-3 py-2 text-sm",children:[l.jsx("span",{className:"font-medium",children:I.vendor}),l.jsxs("span",{className:"text-muted-foreground",children:[I.enabled_count,"/",I.voice_count," enabled · ",I.default_model]}),l.jsx(G,{size:"sm",variant:"secondary",disabled:r.isPending,onClick:()=>O(I.vendor),children:"Load"}),!I.configured&&l.jsx(We,{tone:"grey",children:I.key_env?`Listing needs ${I.key_env}`:"Listing needs a key"})]},I.vendor))}),l.jsxs("div",{className:"flex flex-wrap gap-3 text-xs text-muted-foreground",children:[Object.entries(k).map(([I,z])=>l.jsxs("span",{children:[Zx[I],": ",z.female," female / ",z.male," male enabled",(z.female===0||z.male===0)&&" â "]},I)),n.data&&l.jsxs("span",{children:["Countries: ",n.data.countries.length,","," ",n.data.unresolved," without a default"]}),B&&l.jsxs("span",{children:["Speech rate: ",Math.round(B.chars_per_minute)," chars/min (",B.source==="measured"?`measured, ${B.sessions} sessions`:"LiveKit assumption",")",l.jsx(G,{size:"sm",variant:"link",className:"h-auto p-0 pl-1 text-xs",onClick:V,children:"Measure"})]})]})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(Le,{className:"w-56",placeholder:"Search name, id, accent",value:d.search,onChange:I=>L({search:I.target.value})}),l.jsxs(ho,{value:d.vendor||Ac,onValueChange:I=>L({vendor:I===Ac?"":I}),children:[l.jsx(Mi,{className:"w-36",children:l.jsx(po,{placeholder:"Vendor"})}),l.jsxs($i,{children:[l.jsx(Nt,{value:Ac,children:"Any vendor"}),(t.data??[]).map(I=>l.jsx(Nt,{value:I.vendor,children:I.vendor},I.vendor))]})]}),l.jsxs(ho,{value:d.language||Ac,onValueChange:I=>L({language:I===Ac?"":I}),children:[l.jsx(Mi,{className:"w-36",children:l.jsx(po,{placeholder:"Language"})}),l.jsxs($i,{children:[l.jsx(Nt,{value:Ac,children:"Any language"}),Object.entries(Zx).map(([I,z])=>l.jsx(Nt,{value:I,children:z},I))]})]}),l.jsxs(ho,{value:d.status,onValueChange:I=>L({status:I}),children:[l.jsx(Mi,{className:"w-44",children:l.jsx(po,{})}),l.jsxs($i,{children:[l.jsx(Nt,{value:"any",children:"Any status"}),l.jsx(Nt,{value:"enabled",children:"Enabled"}),l.jsx(Nt,{value:"hidden",children:"Hidden"}),l.jsx(Nt,{value:"ready",children:"Validated, not enabled"}),l.jsx(Nt,{value:"needs_check",children:"Needs validation"})]})]}),l.jsxs("span",{className:"text-sm text-muted-foreground",children:[N.length," voices · ",h.size," selected",gWe
705(C)&&" · synthesising, refreshingâ¦"]})]}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx(G,{size:"sm",variant:"outline",onClick:D,children:"Select shown"}),l.jsx(G,{size:"sm",variant:"outline",onClick:()=>p(new Set),disabled:h.size===0,children:"Clear"}),l.jsx(G,{size:"sm",disabled:h.size===0||i.isPending,onClick:()=>F("validate"),children:"Validate selected"}),l.jsx(G,{size:"sm",variant:"secondary",disabled:h.size===0||i.isPending,onClick:()=>F("preview"),children:"Regenerate previews"}),l.jsxs(G,{size:"sm",disabled:US(C,h).length===0||o.isPending,onClick:T,children:["Enable validated (",US(C,h).length,")"]}),l.jsx(G,{size:"sm",variant:"outline",disabled:s.isPending,onClick:M,children:h.size?"Suggest tones for selected":"Suggest missing tones"})]}),l.jsxs(Ce,{className:"overflow-x-auto",children:[l.jsxs(mr,{children:[l.jsx(gr,{children:l.jsxs(bt,{children:[l.jsx(pe,{className:"w-8"}),l.jsx(pe,{children:"Voice"}),l.jsx(pe,{children:"Vendor · model"}),l.jsx(pe,{children:"Languages: validation and preview"}),l.jsx(pe,{children:"Tones"}),l.jsx(pe,{children:"Cost"}),l.jsx(pe,{children:"Status"})]})}),l.jsx(vr,{children:P.map(I=>{const z=dWe(I.cost);return l.jsxs(bt,{children:[l.jsx(he,{children:l.jsx(ql,{checked:h.has(I.voice_id),onCheckedChange:()=>R(I.voice_id),"aria-label":`Select ${I.voice_name}`})}),l.jsxs(he,{children:[l.jsx("div",{className:"font-medium",children:I.voice_name}),l.jsx("div",{className:"text-xs text-muted-foreground",children:[I.gender,I.age,I.accent||I.accent_locale].filter(Boolean).join(" · ")||"No metadata"}),l.jsx("div",{className:"font-mono text-[10px] text-muted-foreground",children:I.voice_id})]}),l.jsxs(he,{className:"text-sm",children:[l.jsx("div",{children:I.tts_vendor}),l.jsxs("div",{className:"text-xs text-muted-foreground",children:[I.tts_model," · ",I.via,I.supports_expressive&&" · expressive"]})]}),l.jsx(he,{children:l.jsx("div",{className:"flex flex-wrap gap-1",children:pWe(I).map(H=>{const de=aWe(H.status),ge=hWe(I.voice_id,H.language);return l.jsxs("span",{className:"inline-flex items-center gap-1",title:H.error||void 0,children:[l.jsxs(We,{tone:de.tone,children:[H.language," ",de.label,H.preview_stale&&" · stale clip"]}),H.preview_url&&l.jsx(G,{size:"icon",variant:"ghost",className:"h-6 w-6","aria-label":`Play ${H.language} preview`,onClick:()=>u({voice_id:ge,preview_audio_url:H.preview_url}),children:c===ge?l.jsx(Rd,{className:"h-3 w-3"}):l.jsx(lc,{className:"h-3 w-3"})})]},H.language)})})}),l.jsx(he,{children:l.jsx(G,{size:"sm",variant:"ghost",className:"h-auto px-1 text-left",onClick:()=>b(I),children:l.jsxs("span",{className:"text-sm",children:[I.tones.length?I.tones.join(", "):"None",l.jsx("span",{className:"block text-[10px] text-muted-foreground",children:I.tones_source})]})})}),l.jsx(he,{children:l.jsx(G,{size:"sm",variant:"ghost",className:"h-auto px-1 text-left",onClick:()=>w(I),title:z.caveat,children:l.jsxs("span",{className:"text-xs",children:[z.perMillion,l.jsx("span",{className:"block text-muted-foreground",children:z.perMinute})]})})}),l.jsx(he,{children:l.jsxs("div",{className:"flex flex-col items-start gap-1",children:[I.enabled?l.jsx(We,{tone:"green",children:"Enabled"}):l.jsx(We,{tone:I.can_enable?"amber":"grey",children:I.can_enable?"Ready":I.lifecycle!=="active"?I.lifecycle:I.disabled_at?"Disabled":"Hidden"}),i3(I)&&l.jsx(G,{size:"sm",variant:"link",className:"h-auto p-0 text-xs",onClick:()=>_(I),children:i3(I)==="disable"?"Disableâ¦":"Repointâ¦"})]})})]},I.voice_id)})})]}),N.length>P.length&&l.jsx("div",{className:"p-3 text-center",children:l.jsxs(G,{size:"sm",variant:"outline",onClick:()=>g(I=>I+zS),children:["Show more (",N.length-P.length," left)"]})})]}),l.jsx(rWe,{voice:y,onClose:()=>b(null)}),l.jsx(iWe,{voice:x,onClose:()=>w(null)}),l.jsx(sWe,{voice:S,voices:C,onClose:()=>_(null)}),l.jsx(oWe,{open:j,onClose:()=>E(!1)})]})}const hf="/super-admin/voice-migration",$0=["super-admin","voice-migration"],JT=[...$0,"mappings"],W7=["super-admin","orgs"],XT=["super-admin","audit"];function H7(e,t){return"all"in e?{all:!0,dry_run:t}:{org_ids:e.org_ids,dry_run:t}}function yWe(e){return{dry_run:e.dryRun,run_id:e.runId??"",include_backfill:e.includeBackfill??!1}}function xWe({enabled:e=!0}={}){const t=q();return ue({queryKey:JT,enabled:e,queryFn:async()=>{const{data:n}=await Se.get(`${hf}/mappings`,{headers:t});return{...n,rows:n.rows??[],blockers:n.blockers??[],keyless_vendors:n.keyless_vendors??[]}},retry:!1})}function bWe(){const e=q(),t=oe();return ie({mutationFn:async n=>{const{data:r}=await Se.post(`${hf}/mappings/suggest`,{only_missing:n},{headers:e});return r.results??[]},onSuccess:()=>
705t.invalidateQueries({queryKey:JT})})}function G7(){const e=q(),t=oe();return ie({mutationFn:async n=>{await Se.put(`${hf}/mappings/review`,n,{headers:e})},onSuccess:()=>t.invalidateQueries({queryKey:JT})})}function wWe(){const e=q(),t=oe();return ie({mutationFn:async n=>{const r=await Se.post(`${hf}/run`,H7(n.scope,n.dryRun),{headers:e,validateStatus:i=>i===200||i===409});if(r.status===409){const i=r.data?.report??{};return{kind:"run",dry_run:!1,orgs:[],total_changes:0,orgs_changed:0,orgs_failed:0,...i,blockers:i.blockers??[],blocked:!0}}return r.data},onSuccess:(n,r)=>{r.dryRun||(t.invalidateQueries({queryKey:$0}),t.invalidateQueries({queryKey:W7}),t.invalidateQueries({queryKey:XT}))}})}function _We(){const e=q(),t=oe();return ie({mutationFn:async n=>{const{data:r}=await Se.post(`${hf}/backfill`,H7(n.scope,n.dryRun),{headers:e});return r},onSuccess:(n,r)=>{r.dryRun||(t.invalidateQueries({queryKey:$0}),t.invalidateQueries({queryKey:XT}))}})}function SWe(){const e=q(),t=oe();return ie({mutationFn:async n=>{const{data:r}=await Se.post(`${hf}/orgs/${encodeURIComponent(n.orgId)}/revert`,yWe(n),{headers:e});return r},onSuccess:(n,r)=>{r.dryRun||(t.invalidateQueries({queryKey:$0}),t.invalidateQueries({queryKey:W7}),t.invalidateQueries({queryKey:XT}))}})}var Y7="AlertDialog",[jWe,Zct]=Ps(Y7,[KW]),Ms=KW(),Q7=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ms(t);return l.jsx(Aw,{...r,...n,modal:!0})};Q7.displayName=Y7;var EWe="AlertDialogTrigger",CWe=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ms(n);return l.jsx(Tw,{...i,...r,ref:t})});CWe.displayName=EWe;var NWe="AlertDialogPortal",J7=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ms(t);return l.jsx(Rw,{...r,...n})};J7.displayName=NWe;var PWe="AlertDialogOverlay",X7=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ms(n);return l.jsx(Kd,{...i,...r,ref:t})});X7.displayName=PWe;var Cu="AlertDialogContent",[kWe,AWe]=jWe(Cu),Z7=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=Ms(n),s=v.useRef(null),a=rt(t,s),c=v.useRef(null);return l.jsx(Sye,{contentName:Cu,titleName:eY,docsSlug:"alert-dialog",children:l.jsx(kWe,{scope:n,cancelRef:c,children:l.jsxs(Wd,{role:"alertdialog",...o,...i,ref:a,onOpenAutoFocus:xe(i.onOpenAutoFocus,u=>{u.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(tV,{children:r}),l.jsx(RWe,{contentRef:s})]})})})});Z7.displayName=Cu;var eY="AlertDialogTitle",tY=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ms(n);return l.jsx(Hd,{...i,...r,ref:t})});tY.displayName=eY;var nY="AlertDialogDescription",rY=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ms(n);return l.jsx(Gd,{...i,...r,ref:t})});rY.displayName=nY;var TWe="AlertDialogAction",iY=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ms(n);return l.jsx(Yd,{...i,...r,ref:t})});iY.displayName=TWe;var oY="AlertDialogCancel",sY=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=AWe(oY,n),o=Ms(n),s=rt(t,i);return l.jsx(Yd,{...o,...r,ref:s})});sY.displayName=oY;var RWe=({contentRef:e})=>{const t=`\`${Cu}\` requires a description for the component to be accessible for screen reader users. 706 707You can add a description to the \`${Cu}\` by passing a \`${nY}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 708 709Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Cu}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 710 711For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},OWe=Q7,IWe=J7,aY=X7,lY=Z7,cY=iY,uY=sY,dY=tY,fY=rY;const MWe=OWe,$We=IWe,hY=v.forwardRef(({className:e,...t},n)=>l.jsx(aY,{className:K("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));hY.displayName=aY.displayName;const pY=v.forwardRef(({className:e,...t},n)=>l.jsxs($We,{children:[l.jsx(hY,{}),l.jsx(lY,{ref:n,className:K("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
711nded-lg",e),...t})]}));pY.displayName=lY.displayName;const mY=({className:e,...t})=>l.jsx("div",{className:K("flex flex-col space-y-2 text-center sm:text-left",e),...t});mY.displayName="AlertDialogHeader";const gY=({className:e,...t})=>l.jsx("div",{className:K("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});gY.displayName="AlertDialogFooter";const vY=v.forwardRef(({className:e,...t},n)=>l.jsx(dY,{ref:n,className:K("text-lg font-semibold",e),...t}));vY.displayName=dY.displayName;const yY=v.forwardRef(({className:e,...t},n)=>l.jsx(fY,{ref:n,className:K("text-sm text-muted-foreground",e),...t}));yY.displayName=fY.displayName;const xY=v.forwardRef(({className:e,...t},n)=>l.jsx(cY,{ref:n,className:K(Cw(),e),...t}));xY.displayName=cY.displayName;const bY=v.forwardRef(({className:e,...t},n)=>l.jsx(uY,{ref:n,className:K(Cw({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));bY.displayName=uY.displayName;function Nu(e){return Zx[e]??e}function DWe(e){const t=e.gaps===1?"1 gap":`${e.gaps} gaps`;return`${e.reviewed} of ${e.in_use} reviewed, ${t}, ${e.unmapped} without a suggestion`}function wY(e){switch(e){case"not_reviewed":return{tone:"amber",label:"Needs review"};case"no_mapping":return{tone:"red",label:"No suggestion"};case"mapped_voice_unusable":return{tone:"red",label:"Voice no longer usable"};default:return{tone:"amber",label:e}}}function LWe(e){return[e.gender,e.accent,e.language_label].filter(Boolean).join(" · ")||"No gender or accent known"}const _Y=["deepgram","rime","gradium","xai","cartesia","inworld"],ZT=e=>(e??"").trim().toLowerCase();function SY(e){const t=new Set(_Y);return new Set(e.map(ZT).filter(n=>t.has(n)))}function FWe(e,t=[..._Y]){const n=e.suggested;return!n?.enabled||!n.keyless||!SY(t).has(ZT(n.tts_vendor))?!1:e.mapping?.livekit_voice_id!==n.voice_id}function BWe(e,t,n){const r=SY(n);return e.filter(i=>i.enabled&&i.lifecycle==="active"&&r.has(ZT(i.tts_vendor))&&i.languages.includes(t)).sort((i,o)=>i.voice_name.localeCompare(o.voice_name))}function UWe(e,t){return e.validation.find(n=>n.language===t)?.preview_url??null}function zWe(e,t){return`/super-admin/voices/livekit/${encodeURIComponent(e)}/preview?language=${encodeURIComponent(t)}`}const VWe=e=>`retell|${e}`,jY=(e,t)=>`lk|${e}|${t}`,EY={"organizations.voice_provider":"Org provider","organizations.default_livekit_voice_id":"Org default LiveKit voice","job_descriptions.voice_provider":"Job provider","job_descriptions.livekit_voice_id":"Job LiveKit voice"},qWe={mapping:"reviewed mapping",org_default:"org default",country_default:"country default",neutral:"neutral voice",set_provider:"provider"},eb=e=>e===null||e===""?"none":e;function CY(e){return e.startsWith("job_descriptions.")}function KWe(e){const t=CY(e.column)?`Job ${e.jd_id??""}`:"Org",n=EY[e.column]??e.column,r=qWe[e.reason]??e.reason;return`${t}: ${n} ${eb(e.previous_value)} â ${eb(e.new_value)}${r?` (${r})`:""}`}function WWe(e,t){const n=CY(e.column)?`Job ${e.jd_id??""}`:"Org",r=EY[e.column]??e.column;return`${n}: ${r} ${eb(t)} â ${eb(e.previous_value)}`}function HWe(e){return"all"in e?"all":[...e.org_ids].sort().join(",")}function GWe(e){return e?[e.summary.can_run?"run":"blocked",...e.rows.map(t=>`${t.retell_voice_id}|${t.language}=${t.mapping?.livekit_voice_id??""}${t.blocker?`!${t.blocker}`:""}`)].join(";"):""}function o3(e){const t=e.voice_provider||"",n=e.effective_voice_provider||t,r=n==="livekit"?"LiveKit":n==="retell"?"Retell":"";return r?{tone:n==="livekit"?"green":"grey",label:t?r:`${r} (platform default)`}:{tone:"grey",label:"Platform default"}}function YWe(e){return e.orgs.reduce((t,n)=>t+n.jobs,0)}function Tt(e,t,n=`${t}s`){return`${e} ${e===1?t:n}`}function aN({preview:e,playKey:t,path:n,label:r}){const i=e.playingId===t;return l.jsx(G,{size:"icon",variant:"ghost",className:"h-7 w-7 shrink-0","aria-label":i?`Stop ${r}`:`Play ${r}`,"aria-pressed":i,onClick:()=>e.toggle({voice_id:t,preview_audio_url:n}),children:i?l.jsx(Rd,{className:"h-3 w-3"}):l.jsx(lc,{className:"h-3 w-3"})})}function eR({open:e,title:t,description:n,confirmLabel:r,onConfirm:i,onCancel:o}){return l.jsx(MWe,{open:e,onOpenChange:s=>!s&&o(),children:l.jsxs(pY,{children:[l.jsxs(mY,{children:[l.jsx(vY,{children:t}),l.jsx(yY,{children:n})]}),l.jsxs(gY,{children:[l.jsx(bY,{children:"Cancel"}),l.jsx(xY,{onClick:i,children:r})]})]})})}function QWe({row:e,keylessVendors:t,preview:n,onClose:r}){const i=K7({enabled:e!==null}),o=G7();if(!e)return null;const s=BWe(i.data?.voices??[],e.language,t),a=e.mapping?.livekit_voice_id,c=async u=>{try{await o.mutateAsync({retell_voice_id:e.retell_voice_id,language:e.language,livekit_voice_id:u}),Q.success("Mapping approved"),r()}catch(d){Q.error(Xe(d,"Could not approve that voice"))}};return l.jsx(At,{open:!0,onOpenChange:u=>!u&&r(),children:l.jsxs(xt,{className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[l.jsxs(Wt,{children:[l.jsxs(Ft,{children:["Choose a LiveKit voice for ",e.retell.name||e.retell_voice_id," ","in ",
711Nu(e.language)]}),l.jsxs(Bt,{children:["Enabled voices from offered vendors that speak"," ",Nu(e.language),". Play one before choosing it."]})]}),i.isLoading?l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading voicesâ¦"}):i.error?l.jsx("p",{className:"text-sm text-destructive",children:Xe(i.error,"Could not load voices")}):s.length===0?l.jsxs("p",{className:"text-sm text-muted-foreground",children:["No enabled offered voice speaks ",Nu(e.language),". Validate and enable one in the LiveKit roster first."]}):l.jsx("ul",{className:"flex flex-col divide-y divide-border","aria-label":"Voices",children:s.map(u=>{const d=UWe(u,e.language);return l.jsxs("li",{className:"flex items-center gap-2 py-2","data-testid":"voice-option",children:[d?l.jsx(aN,{preview:n,playKey:jY(u.voice_id,e.language),path:d,label:`${u.voice_name} preview`}):l.jsx("span",{className:"w-7"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("div",{className:"text-sm font-medium",children:u.voice_name}),l.jsx("div",{className:"text-xs text-muted-foreground",children:[u.tts_vendor,u.gender,u.accent_locale||u.accent].filter(Boolean).join(" · ")})]}),a===u.voice_id?l.jsx(We,{tone:"green",children:"Approved"}):l.jsxs(G,{size:"sm",variant:"secondary",disabled:o.isPending,onClick:()=>c(u.voice_id),children:["Use ",u.voice_name]})]},u.voice_id)})}),l.jsx(pr,{children:l.jsx(G,{variant:"outline",onClick:r,children:"Close"})})]})})}function JWe({target:e,onClose:t}){return e?l.jsx(XWe,{target:e,onClose:t},`${e.orgId}|${e.runId??""}`):null}function XWe({target:e,onClose:t}){const n=SWe(),[r,i]=v.useState(!!e.runId),[o,s]=v.useState(!1),[a,c]=v.useState(null),[u,d]=v.useState(null),[f,h]=v.useState(!1),p=S=>({orgId:e.orgId,dryRun:S,runId:r?e.runId:void 0,includeBackfill:o}),m=e.name||e.orgId,g=a?.items.filter(S=>S.restore).length??0,y=(a?.items.length??0)-g,b=async()=>{d(null);try{c(await n.mutateAsync(p(!0)))}catch(S){Q.error(Xe(S,"Could not preview the revert"))}},x=async()=>{h(!1);try{const S=await n.mutateAsync(p(!1));d(S),c(null),Q.success(`${Tt(S.restored.length,"value")} restored, ${Tt(S.conflicts.length,"conflict")}`)}catch(S){Q.error(Xe(S,"Could not revert"))}},w=S=>{S(),c(null),d(null)};return l.jsx(At,{open:!0,onOpenChange:S=>!S&&t(),children:l.jsxs(xt,{className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[l.jsxs(Wt,{children:[l.jsxs(Ft,{children:["Revert ",m]}),l.jsx(Bt,{children:"Restores the values logged before the move. Interviews already started keep the provider they ran on."})]}),l.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[e.runId&&l.jsxs(Kt,{className:"flex items-center gap-2 font-normal",children:[l.jsx(ql,{checked:r,onCheckedChange:S=>w(()=>i(S===!0))}),"Only run ",e.runId]}),l.jsxs(Kt,{className:"flex items-center gap-2 font-normal",children:[l.jsx(ql,{checked:o,onCheckedChange:S=>w(()=>s(S===!0))}),"Also revert the default voice backfill"]})]}),a&&l.jsx("div",{className:"flex flex-col gap-1 text-sm","data-testid":"revert-plan",children:a.items.length===0?l.jsx("p",{className:"text-muted-foreground",children:"Nothing to revert."}):a.items.map(S=>l.jsxs("div",{className:"flex items-start gap-2",children:[S.restore?l.jsx(We,{tone:"green",children:"Restore"}):l.jsx(We,{tone:"amber",children:"Conflict"}),l.jsxs("span",{children:[WWe(S.entry,S.current_value),!S.restore&&l.jsxs("span",{className:"text-muted-foreground",children:[" ","(changed since the run, left as it is)"]})]})]},S.entry.id))}),u&&l.jsxs("p",{className:"text-sm","data-testid":"revert-result",children:["Reverted: ",Tt(u.restored.length,"value")," restored,"," ",Tt(u.conflicts.length,"conflict")," left as they are."]}),l.jsxs(pr,{className:"gap-2",children:[l.jsx(G,{variant:"outline",onClick:t,children:"Close"}),l.jsx(G,{variant:"secondary",disabled:n.isPending,onClick:b,children:"Preview revert"}),l.jsx(G,{variant:"destructive",disabled:n.isPending||g===0,onClick:()=>h(!0),children:"Revert to previous values"})]}),l.jsx(eR,{open:f,title:`Revert ${m}?`,description:`Restore ${Tt(g,"logged value")} for ${m}, exactly as they were before the move${y>0?`; ${Tt(y,"value")} changed since the run and ${y===1?"is":"are"} left as ${y===1?"it is":"they are"}`:""}. New interviews on its jobs will use the restored provider; interviews already started keep theirs.`,confirmLabel:"Revert",onConfirm:x,onCancel:()=>h(!1)})]})})}function ZWe(){const e=xWe(),n=QT({client:Se}),[r,i]=v.useState(null);return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsx(eHe,{review:e.data,isLoading:e.isLoading,error:e.error,preview:n}),l.jsx(rHe,{}),l.jsx(iHe,{canRun:e.data?.summary.can_run??!1,mappingVersion:GWe(e.data),onRevert:i}),l.jsx(JWe,{target:r,onClose:()=>i(null)})]})}function eHe({review:e,isLoading:t,error:n,preview:r}){const i=bWe(),o=G7(),[s,a]=v.useState(null),c=async()=>{try{const d=await i.mutateAsync(!1);Q.success(`Suggested voices for ${Tt(d.filter(f=>f.saved).length,"pair")}`)}catch(d){Q.error(Xe(d,"Could not suggest voices"))}},u=async(d,f)=>{try{await o.mutateAsync({retell_voice_id:d.retell_voice_id,language:d.language,livekit_voice_id:f}),Q.success(f?"Mapping approved":"Review cleared")}catch(h){Q.error(Xe(h,"Could not save the review"))}};return l.jsxs(Ce,{className:"flex flex-col gap-3 p-4",children:[l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Voice mapping"}),l.jsx("p",{className:"max-w-3xl text-sm text-muted-foreground",children:"Every Retell voice in use, per interview language, and the LiveKit voice its jobs will move to. Play both before approving. Orgs cannot be moved until every pair is approved."})]}),l.jsx(G,{size:"sm",disabled:i.isPending,onClick:c,children:"Suggest voices"})]}),t?l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading the mappingâ¦"}):n?l.jsx("p",{className:"text-sm text-destructive",children:Xe(n,"Could not load the voice mapping")}):e?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[l.jsx("span",{"data-testid":"mapping-summary",children:DWe(e.summary)}),e.summary.can_run?l.jsx(We,{tone:"green",children:"Ready to move orgs"}):l.jsxs(We,{tone:"amber",children:[Tt(e.blockers.length,"pair")," blocking the move"]})]}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs(mr,{children:[l.jsx(gr,{children:l.jsxs(bt,{children:[l.jsx(pe,{children:"Retell voice"}),l.jsx(pe,{children:"Language"}),l.jsx(pe,{children:"Used by"}),l.jsx(pe,{children:"Suggested LiveKit voice"}),l.jsx(pe,{children:"Approved"}),l.jsx(pe,{children:"Actions"})]})}),l.jsxs(vr,{children:[e.rows.length===0&&l.jsx(bt,{children:l.jsx(he,{colSpan:6,className:"text-sm text-muted-foreground",children:"No Retell voice is in use."})}),e.rows.map(d=>l.jsx(tHe,{row:d,keylessVendors:e.keyless_vendors,preview:r,busy:o.isPending,onApprove:()=>d.suggested&&u(d,d.suggested.voice_id),onChoose:()=>a(d),onClear:()=>u(d,"")},`${d.retell_voice_id}|${d.language}`))]})]})}),l.jsx(QWe,{row:s,keylessVendors:e.keyless_vendors,preview:r,onClose:()=>a(null)})]}):null]})}function tHe({row:e,keylessVendors:t,preview:n,busy:r,onApprove:i,onChoose:o,onClear:s}){const a=e.retell.name||e.retell_voice_id,c=e.suggested,u=e.blocker?wY(e.blocker):null;return l.jsxs(bt,{"data-testid":"mapping-row",children:[l.jsx(he,{children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(aN,{preview:n,playKey:VWe(e.retell_voice_id),path:e.retell_preview_path,label:`${a} (Retell)`}),l.jsxs("div",{children:[l.jsx("div",{className:"font-medium",children:a}),l.jsx("div",{className:"text-xs text-muted-foreground",children:LWe(e.retell)})]})]})}),l.jsx(he,{className:"text-sm",children:Nu(e.language)}),l.jsx(he,{className:"text-sm",children:e.in_use?`${Tt(e.jobs,"job")}, ${Tt(e.org_defaults,"org default")}`:l.jsx(We,{tone:"grey",children:"Not in use"})}),l.jsx(he,{children:c?l.jsxs("div",{className:"flex items-center gap-1",children:[c.preview_language?l.jsx(aN,{preview:n,playKey:jY(c.voice_id,e.language),path:zWe(c.voice_id,e.language),label:`${c.name} (LiveKit)`}):l.jsx("span",{className:"w-7"}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[c.name,c.keyless?!c.enabled&&l.jsx(We,{tone:"grey",children:"Not enabled"}):l.jsx(We,{tone:"red",children:"Vendor not offered"})]}),l.jsx("div",{className:"text-xs text-muted-foreground",children:[c.tts_vendor,c.gender,c.accent_locale].filter(
711Boolean).join(" · ")}),e.mapping?.suggestion_reason&&l.jsx("div",{className:"text-xs text-muted-foreground",children:e.mapping.suggestion_reason})]})]}):l.jsx("span",{className:"text-sm text-muted-foreground",children:e.gap||"Not suggested yet"})}),l.jsx(he,{children:l.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.reviewed?l.jsxs("span",{className:"text-sm",children:[e.reviewed.name,l.jsxs("span",{className:"block text-xs text-muted-foreground",children:[e.reviewed.tts_vendor,e.mapping?.reviewed_by&&` · by ${e.mapping.reviewed_by}`]})]}):l.jsx("span",{className:"text-sm text-muted-foreground",children:"Not approved"}),u&&l.jsx(We,{tone:u.tone,children:u.label})]})}),l.jsx(he,{children:l.jsxs("div",{className:"flex flex-wrap gap-1",children:[l.jsx(G,{size:"sm",disabled:r||!FWe(e,t),onClick:i,"aria-label":`Approve ${c?.name??"suggestion"} for ${a} in ${Nu(e.language)}`,children:"Approve"}),l.jsx(G,{size:"sm",variant:"outline",onClick:o,children:"Choose another"}),l.jsx(G,{size:"sm",variant:"ghost",disabled:r||!e.mapping?.livekit_voice_id,onClick:s,children:"Clear"})]})})]})}function nHe({blockers:e,blocked:t}){return e.length===0?null:l.jsxs("div",{className:"rounded-md border border-warning/40 bg-warning/10 p-3 text-sm","data-testid":"run-blockers",children:[l.jsx("p",{className:"font-medium",children:t?"The move was refused: these voices need an approved LiveKit voice first.":"A real move will be refused until these voices have an approved LiveKit voice."}),l.jsx("ul",{className:"mt-1 list-disc pl-5",children:e.map(n=>l.jsxs("li",{children:[n.retell_voice_id," in ",Nu(n.language),":"," ",wY(n.problem).label]},`${n.retell_voice_id}|${n.language}`))})]})}function NY({report:e,onRevert:t,stale:n=!1}){const r=e.blocked?"Not moved":e.dry_run?"Preview (nothing written)":"Applied";return l.jsxs("div",{className:"flex flex-col gap-2","data-testid":"migration-report",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[l.jsx(We,{tone:e.blocked?"red":e.dry_run?"grey":"green",children:r}),l.jsxs("span",{children:[Tt(e.total_changes,"change")," across"," ",Tt(e.orgs.length,"org"),e.orgs_failed>0&&`, ${e.orgs_failed} failed`]}),e.run_id&&l.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:["run ",e.run_id]}),n&&l.jsx(We,{tone:"amber",children:"Out of date: the orgs or the mapping changed, preview again"})]}),l.jsx(nHe,{blockers:e.blockers,blocked:!!e.blocked}),e.missing_orgs&&e.missing_orgs.length>0&&l.jsxs("p",{className:"text-sm text-destructive",children:["Not found: ",e.missing_orgs.join(", ")]}),l.jsx("div",{className:"flex flex-col divide-y divide-border rounded-md border border-border",children:e.orgs.map(i=>l.jsxs("details",{className:"p-2","data-testid":"org-report",children:[l.jsxs("summary",{className:"flex cursor-pointer flex-wrap items-center gap-2 text-sm",children:[l.jsx("span",{className:"font-medium",children:i.name||i.org_id}),e.kind==="run"&&l.jsx("span",{className:"text-muted-foreground",children:Tt(i.jobs,"job")}),l.jsx("span",{className:"text-muted-foreground",children:Tt(i.changes.length,"change")}),i.applied&&l.jsx(We,{tone:"green",children:"Applied"}),i.error&&l.jsx(We,{tone:"red",children:"Failed"}),t&&!e.dry_run&&i.applied&&l.jsx(G,{size:"sm",variant:"link",className:"h-auto p-0 text-xs","aria-label":`Revert ${i.name||i.org_id}`,onClick:o=>{o.preventDefault(),t({orgId:i.org_id,name:i.name,runId:e.run_id})},children:"Revertâ¦"})]}),i.error&&l.jsx("p",{className:"mt-1 text-xs text-destructive",children:i.error}),l.jsxs("ul",{className:"mt-1 flex flex-col gap-0.5 pl-2 font-mono text-xs",children:[i.changes.map((o,s)=>l.jsx("li",{children:KWe(o)},`${o.jd_id??"org"}|${o.column}|${s}`)),i.changes.length===0&&l.jsx("li",{className:"font-sans text-muted-foreground",children:"No changes"})]})]},i.org_id))})]})}function rHe(){const e=_We(),[t,n]=v.useState(null),[r,i]=v.useState(null),[o,s]=v.useState(!1),a=async u=>{s(!1);try{const d=await e.mutateAsync({scope:{all:!0},dryRun:u});n(d),i(u?d:null),u||Q.success(`Default voices set: ${Tt(d.total_changes,"change")}`)}catch(d){Q.error(Xe(d,"Could not set default voices"))}},c=r?.total_changes??0;return l.jsxs(Ce,{className:"flex flex-col gap-3 p-4",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Default voices for orgs"}),l.jsx("p",{className:"max-w-3xl text-sm text-muted-foreground",children:"Gives every org without a default LiveKit voice the default for its country (the neutral voice when it has none). It changes nothing else and can run before or after orgs are moved."})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(G,{size:"sm",variant:"secondary",disabled:e.isPending,onClick:()=>a(!0),children:"Preview default voices"}),l.jsx(G,{size:"sm",disabled:e.isPending||!r,onClick:()=>s(!0),children:"Set default voices"}),!r&&l.jsx("span",{className:"text-xs text-muted-foreground",children:"Preview first."})]}),t&&l.jsx(NY,{report:t}),l.jsx(eR,{open:o,title:"Set default voices?",description:`Give every org without a default LiveKit voice the default for its country? The last preview sets ${Tt(c,"org default LiveKit voice")} across ${Tt(r?.orgs_changed??0,"org")}. No provider or job changes.`,confirmLabel:"Set default voices",onConfirm:()=>a(!1),onCancel:()=>s(!1)})]})}function iHe({canRun:e,mappingVersion:t,onRevert:n}){const r=wWe(),[i,o]=v.useState("all"),[s,a]=v.useState(new Set),[c,u]=v.useState(""),d=QH({search:c,limit:200}),[f,h]=v.useState(null),[p,m]=v.useState(null),[g,y]=v.useState(!1),b=v.useMemo(()=>i==="all"?{all:!0}:{org_ids:[...s]},[i,s]),x=`${HWe(b)}#${t}`,w=i==="chosen"&&s.size===0,S=p?.key===x?p.report:null,_=N=>a(k=>{const P=new Set(k);return P.has(N)?P.delete(N):P.add(N),P}),j=async N=>{y(!1);try{const k=await r.mutateAsync({scope:b,dryRun:N});h(k),N?m({key:x,report:k}):(m(null),k.blocked?Q.error("The move was refused: some voices need review"):Q.success(`Moved: ${Tt(k.total_changes,"change")} written`))}catch(k){Q.error(Xe(k,"Could not move orgs"))}},E=S?.orgs.length??0,C=S?YWe(S):0;return l.jsxs(Ce,{className:"flex flex-col gap-3 p-4",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Move orgs to LiveKit"}),l.jsx("p",{className:"max-w-3xl text-sm text-muted-foreground",children:"Sets each org to LiveKit. Every one of its jobs (closed ones included) follows the org, and gets the approved voice. The Retell voice is kept. Interviews already started keep their provider. Preview first; every change is logged and can be reverted per org."})]}),l.jsxs(pk,{type:"single",value:i,onValueChange:N=>N&&o(N),className:"justify-start","aria-label":"Orgs to move",children:[l.jsx(yu,{value:"all",children:"All orgs"}),l.jsx(yu,{value:"chosen",children:"Chosen orgs"})]}),l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx(Le,{className:"w-64",placeholder:"Search orgs",value:c,onChange:N=>u(N.target.value),"aria-label":"Search orgs"}),l.jsxs("div",{className:"max-h-64 overflow-y-auto rounded-md border border-border",children:[d.isLoading&&l.jsx("p",{className:"p-2 text-sm text-muted-foreground",children:"Loading orgsâ¦"}),(d.data??[]).map(N=>l.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-2 py-1 text-sm last:border-b-0",children:[i==="chosen"&&l.jsx(ql,{checked:s.has(N.org_id),onCheckedChange:()=>_(N.org_id),"aria-label":`Choose ${N.name}`}),l.jsx("span",{className:"flex-1",children:N.name}),l.jsx(We,{tone:o3(N).tone,children:o3(N).label}),l.jsx(G,{size:"sm",variant:"link",className:"h-auto p-0 text-xs","aria-label":`Revert ${N.name}`,onClick:()=>n({orgId:N.org_id,name:N.name}),children:"Revertâ¦"})]},N.org_id))]}),i==="chosen"&&l.jsxs("span",{className:"text-xs text-muted-foreground",children:[Tt(s.size,"org")," chosen"]})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(G,{size:"sm",variant:"secondary",disabled:r.isPending||w,onClick:()=>j(!0),children:"Preview changes"}),l.jsx(G,{size:"sm",disabled:r.isPending||w||!e||!S,onClick:()=>y(!0),children:"Move to LiveKit"}),!e&&l.jsx("span",{className:"text-xs text-muted-foreground",children:"Approve a LiveKit voice for every pair above first."}),e&&!S&&!w&&l.jsx("span",{className:"text-xs text-muted-foreground",children:"Preview these orgs first."})]}),f&&l.jsx(NY,{report:f,onRevert:n,stale:f.dry_run&&!f.blocked&&f!==S}),l.jsx(eR,{open:g,title:"Move to LiveKit?",description:(S?.total_changes??0)===0?`The last preview found nothing to change: ${Tt(E,"org")} and ${Tt(C,"job")} are already on LiveKit. Running the move again writes nothing.`:`Move ${Tt(E,"org")}
711 to LiveKit; their ${Tt(C,"job")} (closed ones included) follow. This writes the ${Tt(S?.total_changes??0,"change")} in the last preview. Retell voices are kept. New interviews on these jobs will run on LiveKit; interviews already started keep their provider. Each org can be reverted.`,confirmLabel:"Move to LiveKit",onConfirm:()=>j(!1),onCancel:()=>y(!1)})]})}function oHe(){const[e,t]=v.useState("retell"),[n,r]=v.useState("health"),i=sKe({enabled:e==="retell"}),o=oKe({enabled:e==="retell"});return l.jsxs("div",{className:"flex flex-col gap-4 p-2",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Voices"}),l.jsx("p",{className:"max-w-3xl text-sm text-muted-foreground",children:"The interviewer voice roster, the full Retell catalogue, and the agent language list they are validated against. A voice is not valid on its own - validity is a function of the voice and the agentâs languages - so enabling one is gated on a passing check against the production agent."})]}),l.jsxs(pk,{type:"single",value:e,onValueChange:s=>s&&t(s),className:"justify-start","aria-label":"Voice provider",children:[l.jsx(yu,{value:"retell",children:"Retell"}),l.jsx(yu,{value:"livekit",children:"LiveKit"}),l.jsx(yu,{value:"migration",children:"Move to LiveKit"})]}),e==="livekit"?l.jsx(vWe,{}):e==="migration"?l.jsx(ZWe,{}):l.jsxs(FA,{value:n,onValueChange:s=>
711r(s),children:[l.jsxs(qw,{children:[l.jsxs(xa,{value:"health",children:["Roster health",i.data&&i.data.total-i.data.passing>0&&l.jsx("span",{className:"ml-2 rounded-full bg-warning/20 px-1.5 text-xs font-semibold text-warning",children:i.data.total-i.data.passing})]}),l.jsxs(xa,{value:"catalogue",children:["Catalogue",o.data&&l.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:o.data.length})]}),l.jsx(xa,{value:"languages",children:"Agent languages"})]}),l.jsx(ba,{value:"health",className:"mt-4",children:l.jsx(AKe,{health:i.data,isLoading:i.isLoading,error:i.error,catalogue:o.data})}),l.jsx(ba,{value:"catalogue",className:"mt-4",children:l.jsx(DKe,{catalogue:o.data,isLoading:o.isLoading,error:o.error})}),l.jsx(ba,{value:"languages",className:"mt-4",children:l.jsx(PKe,{health:i.data,isLoading:i.isLoading,error:i.error})})]})]})}const sHe=Wi("/super-admin/voices")({component:oHe}),aHe=Object.freeze(Object.defineProperty({__proto__:null,Route:sHe},Symbol.toStringTag,{value:"Module"}));function lHe(e){const t=q();return ue({queryKey:["super-admin","interview-qa",e],queryFn:async()=>(await Se.get("/super-admin/interview-qa",{headers:t,params:e})).data,staleTime:1e3*15,refetchInterval:e.window==="1h"||e.window==="6h"?1e3*60:!1,retry:!1})}function cHe(e){const t=q();return ue({queryKey:["super-admin","interview-qa","detail",e],enabled:!!e,queryFn:async()=>(await Se.get(`/super-admin/interview-qa/${e}`,{headers:t})).data,staleTime:1e3*15,retry:!1})}function uHe(){const e=q(),t=oe();return ie({mutationFn:async n=>(await Se.post(`/super-admin/interview-qa/${n}/rerun`,{},{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:["super-admin","audit"]})}})}function dHe(){const e=q(),t=oe();return ie({mutationFn:async n=>(await Se.post("/super-admin/interview-qa/backfill",{window:n},{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:["super-admin","interview-qa"]}),t.invalidateQueries({queryKey:["super-admin","audit"]})}})}const tR=["super-admin","interview-qa","rubric"];function fHe(){const e=q();return ue({queryKey:tR,queryFn:async()=>(await Se.get("/super-admin/interview-qa/rubric",{headers:e})).data,staleTime:1e3*60,retry:!1})}function s3(e){const t=q();return ue({queryKey:[...tR,e],enabled:e!=null,queryFn:async()=>(await Se.get(`/super-admin/interview-qa/rubric/${e}`,{headers:t})).data,staleTime:1/0,retry:!1})}function hHe(){const e=q(),t=oe();return ie({mutationFn:async n=>(await Se.post("/super-admin/interview-qa/rubric",n,{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:tR}),t.invalidateQueries({queryKey:["super-admin","audit"]})}})}function pHe(){const e=q(),t=oe();return ie({mutationFn:async n=>(await Se.post("/super-admin/interview-qa/rescore",n,{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:["super-admin","interview-qa"]}),t.invalidateQueries({queryKey:["super-admin","audit"]})}})}function mHe(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const PY=$.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),pf=()=>{const e=$.useContext(PY);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};mHe(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not( 712[data-state=closed] 713){opacity:0}
713[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function gHe(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function vHe(){return nR(/^Mac/)}function yHe(){return nR(/^iPhone/)}function a3(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function xHe(){return nR(/^iPad/)||vHe()&&navigator.maxTouchPoints>1}function kY(){return yHe()||xHe()}function nR(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const bHe=24,wHe=typeof window<"u"?v.useLayoutEffect:v.useEffect;function l3(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const VS=typeof document<"u"&&window.visualViewport;function c3(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function AY(e){for(c3(e)&&(e=e.parentElement);e&&!c3(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const _He=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let dv=0,qS;function SHe(e={}){let{isDisabled:t}=e;wHe(()=>{if(!t)return dv++,dv===1&&kY()&&(qS=jHe()),()=>{dv--,dv===0&&qS?.()}},[t])}function jHe(){let e,t=0,n=f=>{e=AY(f.target),!(e===document.documentElement&&e===document.body)&&(t=f.changedTouches[0].pageY)},r=f=>{if(!e||e===document.documentElement||e===document.body){f.preventDefault();return}let h=f.changedTouches[0].pageY,p=e.scrollTop,m=e.scrollHeight-e.clientHeight;m!==0&&((p<=0&&h>t||p>=m&&h<t)&&f.preventDefault(),t=h)},i=f=>{let h=f.target;lN(h)&&h!==document.activeElement&&(f.preventDefault(),h.style.transform="translateY(-2000px)",h.focus(),requestAnimationFrame(()=>{h.style.transform=""}))},o=f=>{let h=f.target;lN(h)&&(h.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{h.style.transform="",VS&&(VS.height<window.innerHeight?requestAnimationFrame(()=>{u3(h)}):VS.addEventListener("resize",()=>u3(h),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},a=window.pageXOffset,c=window.pageYOffset,u=l3(EHe(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let d=l3(Wf(document,"touchstart",n,{passive:!1,capture:!0}),Wf(document,"touchmove",r,{passive:!1,capture:!0}),Wf(document,"touchend",i,{passive:!1,capture:!0}),Wf(document,"focus",o,!0),Wf(window,"scroll",s));return()=>{u(),d(),window.scrollTo(a,c)}}function EHe(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Wf(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function u3(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=AY(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top,o=e.getBoundingClientRect().bottom;const s=n.getBoundingClientRect().bottom+bHe;o>s&&(n.scrollTop+=i-r)}e=n.parentElement}}function lN(e){return e instanceof HTMLInputElement&&!_He.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function CHe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function NHe(...e){return t=>e.forEach(n=>CHe(n,t))}function TY(...e){return v.useCallback(NHe(...e),e)}const RY=new WeakMap;function sn(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([i,o])=>{if(i.startsWith("--")){e.style.setProperty(i,o);return}r[i]=e.style[i],e.style[i]=o}),!n&&RY.set(e,r)}function PHe(e,t){if(!e||!(e instanceof HTMLElement))return;let n=RY.get(e);n&&(e.style[t]=n[t])}const en=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function fv(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[en(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(", ")[en(t)?5:4]):null)}function kHe(e){return 8*(Math.log(e+1)-2)}function KS(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function AHe(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const It={DURATION:.5,EASE:[.32,.72,0,1]},OY=.4,THe=.25,RHe=100,IY=8,rl=16,cN=26,WS="vaul-dragging";function MY(e){const t=$.useRef(e);return $.useEffect(()=>{t.current=e}),$.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function OHe({defaultProp:e,onChange:t}){const n=$.useState(e),[r]=n,i=$.useRef(r),o=MY(t);return $.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function $Y({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=OHe({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=MY(n),c=$.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else i(u)},[o,e,i,a]);return[s,c]}function IHe({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:o,onSnapPointChange:s,direction:a="bottom",container:c,snapToSequentialPoint:u}){const[d,f]=$Y({prop:e,defaultProp:n?.[0],onChange:t}),[h,p]=$.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);$.useEffect(()=>{function E(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);const m=$.useMemo(()=>d===n?.[n.length-1]||null,[n,d]),g=$.useMemo(()=>{var E;return(E=n?.findIndex(C=>
713C===d))!=null?E:null},[n,d]),y=n&&n.length>0&&(o||o===0)&&!Number.isNaN(o)&&n[o]===d||!n,b=$.useMemo(()=>{const E=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var C;return(C=n?.map(N=>{const k=typeof N=="string";let P=0;if(k&&(P=parseInt(N,10)),en(a)){const L=k?P:h?N*E.height:0;return h?a==="bottom"?E.height-L:-E.height+L:L}const A=k?P:h?N*E.width:0;return h?a==="right"?E.width-A:-E.width+A:A}))!=null?C:[]},[n,h,c]),x=$.useMemo(()=>g!==null?b?.[g]:null,[b,g]),w=$.useCallback(E=>{var C;const N=(C=b?.findIndex(k=>k===E))!=null?C:null;s(N),sn(r.current,{transition:`transform ${It.DURATION}s cubic-bezier(${It.EASE.join(",")})`,transform:en(a)?`translate3d(0, ${E}px, 0)`:`translate3d(${E}px, 0, 0)`}),b&&N!==b.length-1&&o!==void 0&&N!==o&&N<o?sn(i.current,{transition:`opacity ${It.DURATION}s cubic-bezier(${It.EASE.join(",")})`,opacity:"0"}):sn(i.current,{transition:`opacity ${It.DURATION}s cubic-bezier(${It.EASE.join(",")})`,opacity:"1"}),f(n?.[Math.max(N,0)])},[r.current,n,b,o,i,f]);$.useEffect(()=>{if(d||e){var E;const C=(E=n?.findIndex(N=>N===e||N===d))!=null?E:-1;b&&C!==-1&&typeof b[C]=="number"&&w(b[C])}},[d,e,n,b,w]);function S({draggedDistance:E,closeDrawer:C,velocity:N,dismissible:k}){if(o===void 0)return;const P=a==="bottom"||a==="right"?(x??0)-E:(x??0)+E,A=g===o-1,L=g===0,R=E>0;if(A&&sn(i.current,{transition:`opacity ${It.DURATION}s cubic-bezier(${It.EASE.join(",")})`}),!u&&N>2&&!R){k?C():w(b[0]);return}if(!u&&N>2&&R&&b&&n){w(b[n.length-1]);return}const D=b?.reduce((F,T)=>typeof F!="number"||typeof T!="number"?F:Math.abs(T-P)<Math.abs(F-P)?T:F),O=en(a)?window.innerHeight:window.innerWidth;if(N>OY&&Math.abs(E)<O*.4){const F=R?1:-1;if(F>0&&m&&n){w(b[n.length-1]);return}if(L&&F<0&&k&&C(),g===null)return;w(b[g+F]);return}w(D)}function _({draggedDistance:E}){if(x===null)return;const C=a==="bottom"||a==="right"?x-E:x+E;(a==="bottom"||a==="right")&&C<b[b.length-1]||(a==="top"||a==="left")&&C>b[b.length-1]||sn(r.current,{transform:en(a)?`translate3d(0, ${C}px, 0)`:`translate3d(${C}px, 0, 0)`})}function j(E,C){if(!n||typeof g!="number"||!b||o===void 0)return null;const N=g===o-1;if(g>=o&&C)return 0;if(N&&!C)return 1;if(!y&&!N)return null;const P=N?g+1:g-1,A=N?b[P]-b[P-1]:b[P+1]-b[P],L=E/Math.abs(A);return N?1-L:L}return{isLastSnapPoint:m,activeSnapPoint:d,shouldFade:y,getPercentageDragged:j,setActiveSnapPoint:f,activeSnapPointIndex:g,onRelease:S,onDrag:_,snapPointsOffset:b}}const MHe=()=>()=>{};function $He(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=pf(),o=$.useRef(null),s=v.useMemo(()=>document.body.style.backgroundColor,[]);function a(){return(window.innerWidth-cN)/window.innerWidth}$.useEffect(()=>{if(t&&n){o.current&&clearTimeout(o.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;AHe(r&&!i?KS(document.body,{background:"black"}):MHe,KS(c,{transformOrigin:en(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${It.DURATION}s`,transitionTimingFunction:`cubic-bezier(${It.EASE.join(",")})`}));const u=KS(c,{borderRadius:`${IY}px`,overflow:"hidden",...en(e)?{transform:`scale(${a()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${a()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),o.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},It.DURATION*1e3)}}},[t,n,s])}let Hf=null;function DHe({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:o}){const[s,a]=$.useState(()=>typeof window<"u"?window.location.href:""),c=$.useRef(0),u=$.useCallback(()=>{if(a3()&&Hf===null&&e&&!o){Hf={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:f,innerHeight:h}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-f}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=h-window.innerHeight;p&&c.current>=h&&(document.body.style.top=`${-(c.current+p)}px`)}),300)}},[e]),d=$.useCallback(()=>
713{if(a3()&&Hf!==null&&!o){const f=-parseInt(document.body.style.top,10),h=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Hf),window.requestAnimationFrame(()=>{if(i&&s!==window.location.href){a(window.location.href);return}window.scrollTo(h,f)}),Hf=null}},[s]);return $.useEffect(()=>{function f(){c.current=window.scrollY}return f(),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}},[]),$.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||d()}},[t,d]),$.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{d()},500)):d())},[e,r,s,t,n,u,d]),{restorePositionSetting:d}}function DY({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:o,shouldScaleBackground:s=!1,setBackgroundColorOnScale:a=!0,closeThreshold:c=THe,scrollLockTimeout:u=RHe,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:h=o&&o.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:g,modal:y=!0,onClose:b,nested:x,noBodyStyles:w=!1,direction:S="bottom",defaultOpen:_=!1,disablePreventScroll:j=!0,snapToSequentialPoint:E=!1,preventScrollRestoration:C=!1,repositionInputs:N=!0,onAnimationEnd:k,container:P,autoFocus:A=!1}){var L,R;const[D=!1,O]=$Y({defaultProp:_,prop:e,onChange:Te=>{t?.(Te),!Te&&!x&&IZ(),setTimeout(()=>{k?.(Te)},It.DURATION*1e3),Te&&!y&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Te||(document.body.style.pointerEvents="auto")}}),[F,T]=$.useState(!1),[M,V]=$.useState(!1),[B,I]=$.useState(!1),z=$.useRef(null),H=$.useRef(null),de=$.useRef(null),ge=$.useRef(null),te=$.useRef(null),ye=$.useRef(!1),W=$.useRef(null),ne=$.useRef(0),se=$.useRef(!1),U=$.useRef(!_),ae=$.useRef(0),re=$.useRef(null),He=$.useRef(((L=re.current)==null?void 0:L.getBoundingClientRect().height)||0),Ge=$.useRef(((R=re.current)==null?void 0:R.getBoundingClientRect().width)||0),gt=$.useRef(0),Ke=$.useCallback(Te=>{o&&Te===di.length-1&&(H.current=new Date)},[]),{activeSnapPoint:vt,activeSnapPointIndex:zn,setActiveSnapPoint:xr,onRelease:ui,snapPointsOffset:di,onDrag:ag,shouldFade:xf,getPercentageDragged:OZ}=IHe({snapPoints:o,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:re,fadeFromIndex:h,overlayRef:z,onSnapPointChange:Ke,direction:S,container:P,snapToSequentialPoint:E});SHe({isDisabled:!D||M||!y||B||!F||!N||!j});const{restorePositionSetting:IZ}=DHe({isOpen:D,modal:y,nested:x??!1,hasBeenOpened:F,preventScrollRestoration:C,noBodyStyles:w});function lg(){return(window.innerWidth-cN)/window.innerWidth}function MZ(Te){var st,wt;!d&&!o||re.current&&!re.current.contains(Te.target)||(He.current=((st=re.current)==null?void 0:st.getBoundingClientRect().height)||0,Ge.current=((wt=re.current)==null?void 0:wt.getBoundingClientRect().width)||0,V(!0),de.current=new Date,kY()&&window.addEventListener("touchend",()=>ye.current=!1,{once:!0}),Te.target.setPointerCapture(Te.pointerId),ne.current=en(S)?Te.pageY:Te.pageX)}function rO(Te,st){var wt;let nt=Te;const Ht=(wt=window.getSelection())==null?void 0:wt.toString(),tr=re.current?fv(re.current,S):null,Vn=new Date;if(nt.tagName==="SELECT"||nt.hasAttribute("data-vaul-no-drag")||nt.closest("[data-vaul-no-drag]"))return!1;if(S==="right"||S==="left")return!0;if(H.current&&Vn.getTime()-H.current.getTime()<500)return!1;if(tr!==null&&(S==="bottom"?tr>0:tr<0))return!0;if(Ht&&Ht.length>0)return!1;if(te.current&&Vn.getTime()-te.current.getTime()<u&&tr===0||st)return te.current=Vn,!1;for(;nt;){if(nt.scrollHeight>nt.clientHeight){if(nt.scrollTop!==0)return te.current=new Date,!1;if(nt.getAttribute("role")==="dialog")return!0}nt=nt.parentNode}return!0}function $Z(Te){if(re.current&&M){const st=S==="bottom"||S==="right"?1:-1,wt=(ne.current-(en(S)?Te.pageY:Te.pageX))*st,nt=wt>0,Ht=o&&!d&&!nt;if(Ht&&zn===0)return;const tr=Math.abs(wt),Vn=document.querySelector("[data-vaul-drawer-wrapper]"),$s=S==="bottom"||S==="top"?He.current:Ge.current;let fi=tr/$s;const tl=OZ(tr,nt);if(tl!==null&&(fi=tl),Ht&&fi>=1||!ye.current&&!rO(Te.target,nt))return;if(re.current.classList.add(WS),ye.current=!0,sn(re.current,{transition:"none"}),sn(z.current,{transition:"none"}),o&&ag({draggedDistance:wt}),nt&&!o){const Ji=kHe(wt),cg=Math.min(Ji*-1,0)*st;sn(re.current,{transform:en(S)?`translate3d(0, ${cg}px, 0)`:`translate3d(${cg}
713px, 0, 0)`});return}const Ds=1-fi;if((xf||h&&zn===h-1)&&(r?.(Te,fi),sn(z.current,{opacity:`${Ds}`,transition:"none"},!0)),Vn&&z.current&&s){const Ji=Math.min(lg()+fi*(1-lg()),1),cg=8-fi*8,oO=Math.max(0,14-fi*14);sn(Vn,{borderRadius:`${cg}px`,transform:en(S)?`scale(${Ji}) translate3d(0, ${oO}px, 0)`:`scale(${Ji}) translate3d(${oO}px, 0, 0)`,transition:"none"},!0)}if(!o){const Ji=tr*st;sn(re.current,{transform:en(S)?`translate3d(0, ${Ji}px, 0)`:`translate3d(${Ji}px, 0, 0)`})}}}$.useEffect(()=>{window.requestAnimationFrame(()=>{U.current=!0})},[]),$.useEffect(()=>{var Te;function st(){if(!re.current||!N)return;const wt=document.activeElement;if(lN(wt)||se.current){var nt;const Ht=((nt=window.visualViewport)==null?void 0:nt.height)||0,tr=window.innerHeight;let Vn=tr-Ht;const $s=re.current.getBoundingClientRect().height||0,fi=$s>tr*.8;gt.current||(gt.current=$s);const tl=re.current.getBoundingClientRect().top;if(Math.abs(ae.current-Vn)>60&&(se.current=!se.current),o&&o.length>0&&di&&zn){const Ds=di[zn]||0;Vn+=Ds}if(ae.current=Vn,$s>Ht||se.current){const Ds=re.current.getBoundingClientRect().height;let Ji=Ds;Ds>Ht&&(Ji=Ht-(fi?tl:cN)),g?re.current.style.height=`${Ds-Math.max(Vn,0)}px`:re.current.style.height=`${Math.max(Ji,Ht-tl)}px`}else gHe()||(re.current.style.height=`${gt.current}px`);o&&o.length>0&&!se.current?re.current.style.bottom="0px":re.current.style.bottom=`${Math.max(Vn,0)}px`}}return(Te=window.visualViewport)==null||Te.addEventListener("resize",st),()=>{var wt;return(wt=window.visualViewport)==null?void 0:wt.removeEventListener("resize",st)}},[zn,o,di]);function bf(Te){DZ(),b?.(),Te||O(!1),setTimeout(()=>{o&&xr(o[0])},It.DURATION*1e3)}function iO(){if(!re.current)return;const Te=document.querySelector("[data-vaul-drawer-wrapper]"),st=fv(re.current,S);sn(re.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${It.DURATION}s cubic-bezier(${It.EASE.join(",")})`}),sn(z.current,{transition:`opacity ${It.DURATION}s cubic-bezier(${It.EASE.join(",")})`,opacity:"1"}),s&&st&&st>0&&D&&sn(Te,{borderRadius:`${IY}px`,overflow:"hidden",...en(S)?{transform:`scale(${lg()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${lg()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${It.DURATION}s`,transitionTimingFunction:`cubic-bezier(${It.EASE.join(",")})`},!0)}function DZ(){!M||!re.current||(re.current.classList.remove(WS),ye.current=!1,V(!1),ge.current=new Date)}function LZ(Te){if(!M||!re.current)return;re.current.classList.remove(WS),ye.current=!1,V(!1),ge.current=new Date;const st=fv(re.current,S);
713if(!Te||!rO(Te.target,!1)||!st||Number.isNaN(st)||de.current===null)return;const wt=ge.current.getTime()-de.current.getTime(),nt=ne.current-(en(S)?Te.pageY:Te.pageX),Ht=Math.abs(nt)/wt;if(Ht>.05&&(I(!0),setTimeout(()=>{I(!1)},200)),o){ui({draggedDistance:nt*(S==="bottom"||S==="right"?1:-1),closeDrawer:bf,velocity:Ht,dismissible:d}),i?.(Te,!0);return}if(S==="bottom"||S==="right"?nt>0:nt<0){iO(),i?.(Te,!0);return}if(Ht>OY){bf(),i?.(Te,!1);return}var tr;const Vn=Math.min((tr=re.current.getBoundingClientRect().height)!=null?tr:0,window.innerHeight);var $s;const fi=Math.min(($s=re.current.getBoundingClientRect().width)!=null?$s:0,window.innerWidth),tl=S==="left"||S==="right";if(Math.abs(st)>=(tl?fi:Vn)*c){bf(),i?.(Te,!1);return}i?.(Te,!0),iO()}$.useEffect(()=>(D&&(sn(document.documentElement,{scrollBehavior:"auto"}),H.current=new Date),()=>{PHe(document.documentElement,"scrollBehavior")}),[D]);function FZ(Te){const st=Te?(window.innerWidth-rl)/window.innerWidth:1,wt=Te?-rl:0;W.current&&window.clearTimeout(W.current),sn(re.current,{transition:`transform ${It.DURATION}s cubic-bezier(${It.EASE.join(",")})`,transform:en(S)?`scale(${st}) translate3d(0, ${wt}px, 0)`:`scale(${st}) translate3d(${wt}, 0, 0)`}),!Te&&re.current&&(W.current=setTimeout(()=>{const nt=fv(re.current,S);sn(re.current,{transition:"none",transform:en(S)?`translate3d(0, ${nt}px, 0)`:`translate3d(${nt}px, 0, 0)`})},500))}function BZ(Te,st){if(st<0)return;const wt=(window.innerWidth-rl)/window.innerWidth,nt=wt+st*(1-wt),Ht=-rl+st*rl;sn(re.current,{transform:en(S)?`scale(${nt}) translate3d(0, ${Ht}px, 0)`:`scale(${nt}) translate3d(${Ht}px, 0, 0)`,transition:"none"})}function UZ(Te,st){const wt=en(S)?window.innerHeight:window.innerWidth,nt=st?(wt-rl)/wt:1,Ht=st?-rl:0;st&&sn(re.current,{transition:`transform ${It.DURATION}s cubic-bezier(${It.EASE.join(",")})`,transform:en(S)?`scale(${nt}) translate3d(0, ${Ht}px, 0)`:`scale(${nt}) translate3d(${Ht}px, 0, 0)`})}return $.useEffect(()=>{y||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[y]),$.createElement(Aw,{defaultOpen:_,onOpenChange:Te=>{!d&&!Te||(Te?T(!0):bf(!0),O(Te))},open:D},$.createElement(PY.Provider,{value:{activeSnapPoint:vt,snapPoints:o,setActiveSnapPoint:xr,drawerRef:re,overlayRef:z,onOpenChange:t,onPress:MZ,onRelease:LZ,onDrag:$Z,dismissible:d,shouldAnimate:U,handleOnly:f,isOpen:D,isDragging:
713M,shouldFade:xf,closeDrawer:bf,onNestedDrag:BZ,onNestedOpenChange:FZ,onNestedRelease:UZ,keyboardIsOpen:se,modal:y,snapPointsOffset:di,activeSnapPointIndex:zn,direction:S,shouldScaleBackground:s,setBackgroundColorOnScale:a,noBodyStyles:w,container:P,autoFocus:A}},n))}const LY=$.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:o,isOpen:s,modal:a,shouldAnimate:c}=pf(),u=TY(t,n),d=r&&r.length>0;if(!a)return null;const f=$.useCallback(h=>i(h),[i]);return $.createElement(Kd,{onMouseUp:f,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":s&&d?"true":"false","data-vaul-snap-points-overlay":s&&o?"true":"false","data-vaul-animate":c?.current?"true":"false",...e})});LY.displayName="Drawer.Overlay";const FY=$.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){const{drawerRef:o,onPress:s,onRelease:a,onDrag:c,keyboardIsOpen:u,snapPointsOffset:d,activeSnapPointIndex:f,modal:h,isOpen:p,direction:m,snapPoints:g,container:y,handleOnly:b,shouldAnimate:x,autoFocus:w}=pf(),[S,_]=$.useState(!1),j=TY(i,o),E=$.useRef(null),C=$.useRef(null),N=$.useRef(!1),k=g&&g.length>0;$He();const P=(L,R,D=0)=>{if(N.current)return!0;const O=Math.abs(L.y),F=Math.abs(L.x),T=F>O,M=["bottom","right"].includes(R)?1:-1;if(R==="left"||R==="right"){if(!(L.x*M<0)&&F>=0&&F<=D)return T}else if(!(L.y*M<0)&&O>=0&&O<=D)return!T;return N.current=!0,!0};$.useEffect(()=>{k&&window.requestAnimationFrame(()=>{_(!0)})},[]);function A(L){E.current=null,N.current=!1,a(L)}return $.createElement(Wd,{"data-vaul-drawer-direction":m,"data-vaul-drawer":"","data-vaul-delayed-snap-points":S?"true":"false","data-vaul-snap-points":p&&k?"true":"false","data-vaul-custom-container":y?"true":"false","data-vaul-animate":x?.current?"true":"false",...r,ref:j,style:d&&d.length>0?{"--snap-point-height":`${d[f??0]}px`,...t}:t,onPointerDown:L=>{b||(r.onPointerDown==null||r.onPointerDown.call(r,L),E.current={x:L.pageX,y:L.pageY},s(L))},onOpenAutoFocus:L=>{n?.(L),w||L.preventDefault()},onPointerDownOutside:L=>{if(e?.(L),!h||L.defaultPrevented){L.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:L=>{if(!h){L.preventDefault();return}},onPointerMove:L=>{if(C.current=L,b||(r.onPointerMove==null||r.onPointerMove.call(r,L),!E.current))return;const R=L.pageY-E.current.y,D=L.pageX-E.current.x,O=L.pointerType==="touch"?10:2;P({x:D,y:R},m,O)?c(L):(Math.abs(D)>O||Math.abs(R)>O)&&(E.current=null)},onPointerUp:L=>{r.onPointerUp==null||r.onPointerUp.call(r,L),E.current=null,N.current=!1,a(L)},onPointerOut:L=>{r.onPointerOut==null||r.onPointerOut.call(r,L),A(C.current)},onContextMenu:L=>{r.onContextMenu==null||r.onContextMenu.call(r,L),C.current&&A(C.current)}})});FY.displayName="Drawer.Content";const LHe=250,FHe=120,BY=$.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:i,isDragging:o,snapPoints:s,activeSnapPoint:a,setActiveSnapPoint:c,dismissible:u,handleOnly:d,isOpen:f,onPress:h,onDrag:p}=pf(),m=$.useRef(null),g=$.useRef(!1);function y(){if(g.current){w();return}window.setTimeout(()=>{b()},FHe)}function b(){if(o||e||g.current){w();return}if(w(),!s||s.length===0){u||i();return}if(a===s[s.length-1]&&u){i();return}const _=s.findIndex(E=>E===a);if(_===-1)return;const j=s[_+1];c(j)}function x(){m.current=window.setTimeout(()=>{g.current=!0},LHe)}function w(){m.current&&window.clearTimeout(m.current),g.current=!1}return $.createElement("div",{onClick:y,onPointerCancel:w,onPointerDown:S=>{d&&h(S),x()},onPointerMove:S=>{d&&p(S)},ref:r,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},$.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});BY.displayName="Drawer.Handle";function BHe({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:i,onNestedRelease:o}=pf();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return $.createElement(DY,{nested:!0,onClose:()=>{i(!1)},onDrag:(s,a)=>{r(s,a),e?.(s,a)},onOpenChange:s=>{s&&i(s)},onRelease:o,...n})}function UHe(e){const t=pf(),{container:n=t.container,...r}=e;return $.createElement(Rw,{container:n,...r})}const To={Root:DY,NestedRoot:BHe,Content:FY,Overlay:LY,Trigger:Tw,Portal:UHe,Handle:BY,Close:Yd,Title:Hd,Description:Gd}
713,UY=({shouldScaleBackground:e=!0,...t})=>l.jsx(To.Root,{shouldScaleBackground:e,...t});UY.displayName="Drawer";const zHe=To.Portal,d3=To.Close,zY=v.forwardRef(({className:e,...t},n)=>l.jsx(To.Overlay,{ref:n,className:K("fixed inset-0 z-50 bg-black/80",e),...t}));zY.displayName=To.Overlay.displayName;const VY=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(zHe,{children:[l.jsx(zY,{}),l.jsxs(To.Content,{ref:r,className:K("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[l.jsx("div",{className:"mx-auto mt-4 h-1.5 w-[50px] rounded-full bg-muted"}),t]})]}));VY.displayName="DrawerContent";const qY=({className:e,...t})=>l.jsx("div",{className:K("grid gap-1.5 p-4 text-center sm:text-left",e),...t});qY.displayName="DrawerHeader";const KY=v.forwardRef(({className:e,...t},n)=>l.jsx(To.Title,{ref:n,className:K("text-lg font-semibold leading-none tracking-tight",e),...t}));KY.displayName=To.Title.displayName;const WY=v.forwardRef(({className:e,...t},n)=>l.jsx(To.Description,{ref:n,className:K("text-sm text-muted-foreground",e),...t}));WY.displayName=To.Description.displayName;function HY(){const[e,t]=v.useState(window.innerWidth);v.useEffect(()=>{function s(){t(window.innerWidth)}return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[]);const n=e<=640,r=e>640&&e<=1024,i=e>1024,o=e>1379;return{isMobile:n,isTab:r,isDeskTop:i,is2xl:o}}var GY={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},f3=$.createContext&&$.createContext(GY),VHe=["attr","size","title"];function qHe(e,t){if(e==null)return{};var n=KHe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KHe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tb(){return tb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tb.apply(this,arguments)}function h3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h3(Object(n),!0).forEach(function(r){WHe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WHe(e,t,n){return t=HHe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HHe(e){var t=GHe(e,"string");return typeof t=="symbol"?t:t+""}function GHe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YY(e){return e&&e.map((t,n)=>$.createElement(t.tag,nb({key:n},t.attr),YY(t.child)))}function Zm(e){return t=>$.createElement(YHe,tb({attr:nb({},e.attr)},t),YY(e.child))}function YHe(e){var t=n=>{var{attr:r,size:i,title:o}=e,s=qHe(e,VHe),a=i||n.size||"1em",c;return n.className&&(c=n.className),e.className&&(c=(c?c+" ":"")+e.className),$.createElement("svg",tb({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:c,style:nb(nb({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&$.createElement("title",null,o),e.children)};return f3!==void 0?$.createElement(f3.Consumer,null,n=>t(n)):t(GY)}function eut(e){return Zm({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M217.9 256L345 129c9.4-9.4 9.4-24.6 0-33.9-9.4-9.4-24.6-9.3-34 0L167 239c-9.1 9.1-9.3 23.7-.7 33.1L310.9 417c4.7 4.7 10.9 7 17 7s12.3-2.3 17-7c9.4-9.4 9.4-24.6 0-33.9L217.9 256z"},child:[]}]})(e)}function tut(e){return Zm({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z"},child:[]}]})(e)}function nut(e){return Zm({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M427 234.625H167.296l119.702-119.702L256 85 85 256l171 171 29.922-29.924-118.626-119.701H427v-42.75z"},child:[]}]})(e)}function p3(e){return Zm({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"},child:[]}]})(e)}const D0=({open:e,onClose:t,title:n,description:r,children:i,sheetClassName:o,drawerClassName:s,hideClose:a=!1,renderWithDialog:c=!1,fullScreenDialog:u=!1})=>{const{isDeskTop:d}=HY();return d&&!c&&!u?l.jsx(lH,{open:e,onOpenChange:t,children:l.jsxs(wA,{side:"right",className:K("overflow-y-auto overscroll-contain max-w-lg w-fit min-w-[350px] lg:min-w-[550px] p-3",o),children:[l.jsx("div",{className:"flex items-center justify-between pt-1 px-2 border-b-[0.5px]",children:!!n&&l.jsx("div",{className:"font-semibold text-lg pb-2",children:n})}),!!r&&l.jsx("div",{className:"text-muted-foreground px-2 pb-2 pt-3 text-sm",children:r}),l.jsx("div",{className:"pb-5 px-2",children:i})]})}):d&&c&&e?l.jsxs("div",{className:"p-2 border rounded-lg mb-4",children:[l.jsxs("div",{className:"flex items-center justify-between pb-2 px-2 border-b-[0.5px]",children:[!!n&&l.jsx("div",{className:"font-semibold text-lg",children:n}),!a&&l.jsx(G,{variant:"destructive",size:"sm",onClick:t,children:"Close"})]}),!!r&&l.jsx("div",{className:"text-muted-foreground px-2 pb-2 pt-3 text-sm",children:r}),l.jsx("div",{className:"pb-5 px-2",children:i})]}):d&&u?l.jsx(At,{open:e,onOpenChange:t,children:l.jsxs(xt,{className:K(" max-w-[95%] w-full min-w-[350px] lg:min-w-[550px] p-3 pt-0 ",o),children:[l.jsxs(Wt,{className:"sticky top-0 left-0 bg-card z-10 pt-3",children:[!!n&&l.jsx(Ft,{children:n}),!a&&l.jsx(d3,{className:"text-foreground absolute top-2 right-1",children:l.jsx(p3,{size:22})}),!!r&&l.jsx(Bt,{className:"text-muted-foreground pt-1",children:r})]}),l.jsx("div",{className:"pt-4 max-h-[80dvh] overflow-y-auto overscroll-contain p-2",children:i})]})}):l.jsx(UY,{open:e,onOpenChange:t,children:l.jsxs(VY,{className:K("px-2",s),children:[(!!n||!a)&&l.jsxs(qY,{className:"flex items-center justify-between pt-7 px-2 border-b-[0.5px]",children:[!!n&&l.jsx(KY,{children:n}),!a&&l.jsx(d3,{className:"text-foreground",children:l.jsx(p3,{size:22})})]}),!!r&&l.jsx(WY,{className:"p-2",children:r}),l.jsx("div",{className:"max-h-[80dvh] overflow-y-auto overscroll-contain pb-5 px-0",children:i})]})})},QHe=[{value:"1h",label:"Last hour",short:"1h"},{value:"6h",label:"6 hours",short:"6h"},{value:"24h",label:"24 hours",short:"24h"},{value:"7d",label:"7 days",short:"7d"},{value:"30d",label:"30 days",short:"30d"}];function vd(e){return e==="RED"?"red":e==="AMBER"?"amber":"green"}function yd(e){return e==="RED"?"Red":e==="AMBER"?"Amber":"Green"}const JHe=80,XHe=65;function ZHe(e){return e>=JHe?"green":e>=XHe?"amber":"red"}function rR(e){switch(e){case"high":return"red";case"medium":case"low":return"amber";default:return"green"}}function iR(e){return e==="none"?"None":e.charAt(0).toUpperCase()+e.slice(1)}function e6e(e){return e==="high"?"red":e==="medium"?"amber":"grey"}
713const Jp=[{value:"quality",label:"Interview quality",question:"Did the AI interviewer run a good interview?"},{value:"evaluation",label:"Evaluation",question:"Can the trait scores be trusted?"},{value:"integrity",label:"AI check",question:"Are there signs the candidate read AI-generated answers? A prompt for review, never a verdict."}],oR={quality:[{value:"flow",label:"Conversation flow",hint:"Cut-ins, talking over, confusion"},{value:"responsiveness",label:"Responsiveness",hint:"Reply delay, dead air"},{value:"questioning",label:"Questioning",hint:"What was asked and how"},{value:"completion",label:"Opening and close",hint:"Ending early, no close"}],evaluation:[{value:"judging",label:"Judge's process",hint:"Rubric applied, right debate points kept"},{value:"evidence",label:"Evidence",hint:"Enough to score each trait"},{value:"confidence",label:"Confidence",hint:"Confidence that means something"},{value:"scoring",label:"Scoring",hint:"Scores that match the transcript"}],integrity:[{value:"proctoring",label:"Tab switching",hint:"Left the interview tab during the call"},{value:"language",label:"Language",hint:"Read-aloud and written-style wording"},{value:"timing",label:"Timing",hint:"Pauses before polished answers"},{value:"content",label:"Content",hint:"Vague on specifics, CV mismatch"}]};function t6e(e,t){return oR[e].find(n=>n.value===t)?.label??(t?t.charAt(0).toUpperCase()+t.slice(1).replace(/_/g," "):"Other")}const QY={empty_transcript:"quality",ended_mid_answer:"quality",closed_after_invite:"quality",no_agent_close:"quality",agent_cut_in:"quality",overlap:"quality",fragmented_answers:"quality",candidate_confusion:"quality",agent_apology:"quality",candidate_check_in:"quality",agent_speech:"quality",agent_repeated:"quality",agent_talks_too_much:"quality",short_answers:"quality",agent_latency:"quality",turn_wait:"quality",dead_air:"quality",line_noise:"quality","judge:question_grounding":"quality","judge:follow_up_quality":"quality","judge:trait_coverage":"quality","judge:risky_questions":"quality","judge:agent_conduct":"quality","judge:conversation_breakdown":"quality",trait_not_assessed:"evaluation",trait_weak_evidence:"evaluation",scored_incomplete_interview:"evaluation",trait_low_confidence:"evaluation",confidence_uninformative:"evaluation",scores_undifferentiated:"evaluation","judge:score_evidence_mismatch":"evaluation","judge:unsupported_evidence":"evaluation","judge:missed_evidence":"evaluation","judge:trait_misread":"evaluation",judge_process:"evaluation",interrupt_complaint:"quality","judge:rubric_misapplied":"evaluation","judge:wrong_argument_upheld":"evaluation","judge:argument_wrongly_discarded":"evaluation",tab_switch:"integrity",assistant_phrasing:"integrity",ai_phrasing:"integrity",fluency_shift:"integrity",pause_then_polish:"integrity",long_candidate_silence:"integrity",stalling:"integrity","judge:specificity_gap":"integrity","judge:generic_answer":"integrity","judge:register_shift":"integrity","judge:reading_markers":"integrity","judge:question_echo":"integrity","judge:cv_mismatch":"integrity"};function rb(e){return QY[e]}function JY(e,t){return[...e.quality_flags.map(r=>({f:r,from:"quality"})),...(e.evaluation_flags??[]).map(r=>({f:r,from:"evaluation"})),...e.integrity_flags.map(r=>({f:r,from:"integrity"}))].filter(({f:r,from:i})=>(rb(r.check)??i)===t).map(({f:r})=>r)}function n6e(e,t){const n=oR[e].map(i=>i.value),r=new Map;for(const i of t){const o=i.area??"other";r.set(o,[...r.get(o)??[],i])}return[...r.entries()].sort(([i],[o])=>{const s=n.indexOf(i),a=n.indexOf(o);return(s<0?99:s)-(a<0?99:a)}).map(([i,o])=>({area:i,label:t6e(e,i),flags:o}))}function XY(e){return e?yd(e):"Not evaluated"}const uN={empty_transcript:"No transcript",ended_mid_answer:"Ended mid-answer",closed_after_invite:"Closed before last answer",no_agent_close:"No proper close",agent_cut_in:"Agent cut in",fragmented_answers:"Answers split up",overlap:"Talking over each other",candidate_confusion:"Candidate asked for a repeat",agent_apology:"Agent apologised",candidate_check_in:"Candidate asked if the agent was there",agent_speech:"Voice spelled out or mispronounced words",agent_repeated:"Agent repeated itself",agent_talks_too_much:"Agent talks too much",short_answers:"Short answers",trait_not_assessed:"Traits not assessed",trait_weak_evidence:"Traits with weak evidence",scored_incomplete_interview:"Scored an unfinished interview",trait_low_confidence:"Low-confidence traits",confidence_uninformative:"Confidence uninformative",scores_undifferentiated:"Scores all the same","judge:score_evidence_mismatch":"Score does not match answers","judge:unsupported_evidence":"Reasoning cites something not said","judge:missed_evidence":"Reasoning missed evidence","judge:trait_misread":"Trait judged on the wrong answers",judge_process:"Judge's scoring marked down","judge:rubric_misapplied":"Rubric level misapplied","judge:wrong_argument_upheld":"Wrong argument upheld","judge:argument_wrongly_discarded":"Good argument discarded",interrupt_complaint:"Candidate said they were interrupted",agent_latency:"Slow agent responses",turn_wait:"Wait before replying",dead_air:"Dead air",line_noise:"Backgroun
713d noise on the line",tab_switch:"Switched tabs",assistant_phrasing:"AI-assistant phrasing",ai_phrasing:"Written-style phrasing",fluency_shift:"Fluency shift",pause_then_polish:"Pause, then polished answer",long_candidate_silence:"Long candidate silences",stalling:"Asked for time","judge:question_grounding":"Question misstates background","judge:follow_up_quality":"Weak follow-up","judge:trait_coverage":"Trait not covered","judge:risky_questions":"Risky question","judge:agent_conduct":"Agent conduct","judge:conversation_breakdown":"Conversation breakdown","judge:specificity_gap":"Vague on specifics","judge:generic_answer":"Generic answer","judge:register_shift":"Register shift","judge:reading_markers":"Sounds read aloud","judge:question_echo":"Repeats the question","judge:cv_mismatch":"Contradicts CV"},r6e=Object.entries(uN).map(([e,t])=>({value:e,label:t,bucket:QY[e]})).sort((e,t)=>e.label.localeCompare(t.label));function i6e(e){return r6e.filter(t=>t.bucket===e)}function m3(e){if(e.trim()==="")return;const t=Number(e);return Number.isFinite(t)?t:void 0}function eg(e){if(uN[e])return uN[e];const t=e.replace(/^judge:/,"").replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}function Pn(e){return e==null||Number.isNaN(e)?"-":`${e.toFixed(1)}s`}function An(e,t){return t?`${Math.round(e/t*100)}%`:"-"}function ZY(e,t){const n=new Date(e);return Number.isNaN(n.getTime())?e:t==="7d"||t==="30d"?n.toLocaleDateString(void 0,{day:"numeric",month:"short"}):n.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function eQ(e,t){return e.map(n=>({...n,label:ZY(n.start,t),total:n.red+n.amber+n.green}))}function g3(e,t=new Date){const n=new Date(e),r=Math.round((t.getTime()-n.getTime())/1e3);if(Number.isNaN(r))return e;if(r<60)return"just now";const i=Math.round(r/60);if(i<60)return`${i} min ago`;const o=Math.round(i/60);return o<48?`${o} h ago`:`${Math.round(o/24)} d ago`}function Xp(e){return e==="livekit"?"LiveKit":e==="retell"?"Retell":e}function tQ(e,t){return t==="quality"?(e.quality_checks??e.top_checks).filter(n=>(rb(n)??"quality")==="quality"):t==="evaluation"?e.evaluation_checks??e.top_checks.filter(n=>rb(n)==="evaluation"):e.integrity_checks??[]}const nQ=[{key:"red",name:"Red",color:"hsl(var(--destructive))"},{key:"amber",name:"Amber",color:"hsl(var(--warning))"},{key:"green",name:"Green",color:"hsl(var(--success))"}],o6e=[{key:"high",name:"High",color:"hsl(var(--destructive))"},{key:"medium",name:"Medium",color:"hsl(var(--warning))"},{key:"low",name:"Low",color:"hsl(var(--muted-foreground) / 0.45)"},{key:"none",name:"None",color:"hsl(var(--success))"}],Gf=e=>e===void 0?"none":String(e);function v3(e){const t={allowance:Gf(e.allowance),points:Gf(e.points),cap:Gf(e.cap),"score cap":Gf(e.score_cap),"first points":Gf(e.first_points)};return e.tiers?.length&&(t.tiers=e.tiers.map(n=>`${n.from}: ${n.points}`).join(", ")),e.severity_points&&(t["severity points"]=["low","medium","high"].map(n=>`${n} ${e.severity_points?.[n]??0}`).join(", ")),t}function rQ(e,t){const n=[],r=(o,s,a)=>{JSON.stringify(s)!==JSON.stringify(a)&&n.push(`${o}: ${String(s)} â ${String(a)}`)};r("Band excellent",e.bands.excellent,t.bands.excellent),r("Band green",e.bands.green,t.bands.green),r("Band amber",e.bands.amber,t.bands.amber),r("Evaluation rubric-fit weight",e.evaluation.rubric_fit_weight,t.evaluation.rubric_fit_weight),r("Evaluation argument weight",e.evaluation.argument_weight,t.evaluation.argument_weight),r("AI check: no concern from",e.integrity_levels.none,t.integrity_levels.none),r("AI check: low from",e.integrity_levels.low,t.integrity_levels.low),r("AI check: medium from",e.integrity_levels.medium,t.integrity_levels.medium);const i=(o,s,a)=>{const c=new Map(s.map(d=>[d.check,d])),u=new Map(a.map(d=>[d.check,d]));for(const d of a){const f=c.get(d.check);if(!f){n.push(`${o} · ${d.label}: added`);continue}f.label!==d.label&&n.push(`${o} · ${f.label}: renamed to ${d.label}`);const h=v3(f),p=v3(d);for(const m of new Set([...Object.keys(h),...Object.keys(p)]))(h[m]??"none")!==(p[m]??"none")&&n.push(`${o} · ${d.label}: ${m} ${h[m]??"none"} â ${p[m]??"none"}`)}for(const d of s)u.has(d.check)||n.push(`${o} · ${d.label}: removed`)};return i("Interview quality",e.quality,t.quality),i("Evaluation",e.evaluation.rules,t.evaluation.rules),i("AI check",e.integrity,t.integrity),n}const s6e={good:"GREEN",acceptable:"AMBER",poor:"RED",sound:"GREEN",questionable:"AMBER",unreliable:"RED"},y3={none:0,low:1,medium:2,high:3};function a6e(e,t,n){if(!t)return null;if(e==="integrity"){const i=y3[t.replace(/ concern$/,"")],o=y3[n.integrity??""];return i===void 0||o===void 0||i===o?null:`The judge rated this ${t.replace(/ concern$/,"")} concern; the rubric puts it at ${n.integrity} from the recorded signals. The level and colour come from the rubric.`}const r=s6e[t];return!r||!n.status||r===n.status?null:`The judge rated this "${t}"; the rubric score is ${yd(n.status).toLowerCase()}. The score and colour come from the rubric.`}const l6e="h-9 w-full rounded-md border border-input bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";function hv({label:e,className:t,...n}){return l.jsxs("label",{className:K("flex min-w-0 flex-col gap-1",t),children:[l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:e}),l.jsx("input",{className:l6e,...n})]})}function Tc({value:e,options:t,onChange:n,ariaLabel:r,className:i}){return l.jsx("div",{role:"group","aria-label":r,className:K("flex w-full flex-wrap gap-1 rounded-lg border border-border bg-card p-1 sm:w-auto",i),children:t.map(o=>l.jsx("button",{type:"button","aria-pressed":e===o.value,"aria-label":o.short?o.label:void 0,onClick:()=>
713n(o.value),className:K("shrink-0 whitespace-nowrap rounded-md px-3 py-1.5 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e===o.value?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted"),children:o.short?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"sm:hidden",children:o.short}),l.jsx("span",{className:"hidden sm:inline",children:o.label})]}):o.label},o.value))})}function pv(e,t=300){const[n,r]=v.useState(e);return v.useEffect(()=>{const i=setTimeout(()=>r(e),t);return()=>clearTimeout(i)},[e,t]),n}function sR({data:e,series:t,ariaLabel:n}){return l.jsx("div",{className:"h-48 sm:h-56",role:"img","aria-label":n,children:l.jsx(Km,{width:"100%",height:"100%",children:l.jsxs(WT,{data:e,barCategoryGap:2,children:[l.jsx(ff,{vertical:!1,stroke:"hsl(var(--border))"}),l.jsx(Os,{dataKey:"label",stroke:"hsl(var(--muted-foreground))",fontSize:11,tickLine:!1,interval:"preserveStartEnd",minTickGap:24}),l.jsx(Is,{stroke:"hsl(var(--muted-foreground))",fontSize:11,allowDecimals:!1,tickLine:!1,width:28}),l.jsx(rr,{cursor:{fill:"hsl(var(--muted))"},contentStyle:{background:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:8,fontSize:12,color:"hsl(var(--popover-foreground))"},labelStyle:{color:"hsl(var(--popover-foreground))",fontWeight:500},itemStyle:{color:"hsl(var(--popover-foreground))"}}),l.jsx(Rl,{wrapperStyle:{fontSize:12},formatter:r=>l.jsx("span",{className:"text-muted-foreground",children:r})}),t.map((r,i)=>l.jsx(So,{dataKey:r.key,name:r.name,stackId:"s",fill:r.color,stroke:"hsl(var(--card))",strokeWidth:1,radius:i===t.length-1?[4,4,0,0]:void 0,isAnimationActive:!1},r.key))]})})})}function c6e({bucket:e,summary:t,qaWindow:n,onPickCheck:r}){return e==="quality"?l.jsx(u6e,{summary:t,qaWindow:n,onPickCheck:r}):e==="evaluation"?l.jsx(d6e,{summary:t,qaWindow:n,onPickCheck:r}):l.jsx(f6e,{summary:t,qaWindow:n,onPickCheck:r})}function u6e({summary:e,qaWindow:t,onPickCheck:n}){const r=e.quality??{by_status:e.by_status,areas:[],top_checks:e.top_checks,series:e.series,by_provider:e.by_provider,overlaps_per_interview:0,dead_air_per_interview_s:0},i=v.useMemo(()=>eQ(r.series,t),[r.series,t]),o=e.total,s=Object.entries(r.by_provider).filter(([,u])=>u.agent_latency_median_s!==void 0),a=[["Median length",r.duration_median_min!==void 0?`${r.duration_median_min} min`:"-"],["Agent share of words (median)",r.agent_share_median!==void 0?`${Math.round(r.agent_share_median*100)}%`:"-"],["Talking over, per interview",String(r.overlaps_per_interview)],["Dead air, per interview",`${r.dead_air_per_interview_s}s`],...Object.entries(r.by_provider).map(([u,d])=>[`${Xp(u)} cut-ins, per interview`,String(d.cut_ins_per_interview)])],c=r.end_of_turn_delay_median_s!==void 0||r.llm_ttft_median_s!==void 0||r.tts_ttfb_median_s!==void 0;return l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-3 xl:grid-cols-6",children:[l.jsx(Ee,{label:"Interviews checked",value:o,hint:e.truncated?"First 5,000 shown":void 0}),l.jsx(Ee,{label:"Red",value:r.by_status.RED,hint:An(r.by_status.RED,o)}),l.jsx(Ee,{label:"Amber",value:r.by_status.AMBER,hint:An(r.by_status.AMBER,o)}),l.jsx(Ee,{label:"Green",value:r.by_status.GREEN,hint:An(r.by_status.GREEN,o)}),l.jsx(Ee,{label:"Quality score (avg)",value:r.avg_score!==void 0?r.avg_score.toFixed(0):"-",hint:"100 = nothing found"}),l.jsx(Ee,{label:"Agent reply delay (median)",value:s.length?s.map(([,u])=>Pn(u.agent_latency_median_s)).join(" / "):"-",hint:s.length?s.map(([u])=>Xp(u)).join(" / "):"No timed interviews yet"})]}),l.jsx(aR,{bucket:"quality",areas:r.areas,total:o}),l.jsxs("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-3",children:[l.jsxs(Ce,{className:"col-span-1 rounded-2xl border border-border p-3 shadow-sm sm:p-4 lg:col-span-2",children:[l.jsx("div",{className:"mb-2 text-sm font-medium text-foreground",children:"Interview quality over time"}),l.jsx(sR,{data:i,series:nQ,ariaLabel:"Stacked bars of red, amber and green interviews over the window"})]}),l.jsx(lR,{bucket:"quality",checks:r.top_checks,onPickCheck:n})]}),l.jsxs(Ce,{className:"rounded-2xl border border-border p-3 shadow-sm sm:p-4",children:[l.jsx("div",{className:"mb-2 text-sm font-medium text-foreground",children:"How the calls ran"}),l.jsx(L0,{items:a}),c&&l.jsxs("p",{className:"mt-3 text-xs text-muted-foreground",children:["LiveKit reply delay by stage (median): end-of-turn detection"," ",Pn(r.end_of_turn_delay_median_s),", LLM first token"," ",Pn(r.llm_ttft_median_s),", voice first audio"," ",Pn(r.tts_ttfb_median_s),"."]})]})]})}function d6e({summary:e,qaWindow:t,onPickCheck:n}){const r=e.evaluation,i=v.useMemo(()=>r?eQ(r.series,t):[],[r,t]);if(!r)return l.jsx(iQ,{});const o=e.total-r.by_status.NONE,s=[["Traits checked",String(r.traits)],["Not assessed",`${r.traits_not_assessed} (${An(r.traits_not_assessed,r.traits)})`],["Weak evidence",`${r.traits_weak} (${An(r.traits_weak,r.traits)})`],["Low confidence",`${r.traits_low_confidence} (${An(r.traits_low_confidence,r.traits)})`]];return l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-3 xl:grid-cols-6",children:[l.jsx(Ee,{label:"Evaluations checked",value:o,hint:r.by_status.NONE>0?`${r.by_status.NONE} interview(s) had no evaluation`:void 0}),l.jsx(Ee,{label:"Red",value:r.by_status.RED,hint:An(r.by_status.RED,o)}),l.jsx(Ee,{label:"Amber",value:r.by_status.AMBER,hint:An(r.by_status.AMBER,o)}),l.jsx(Ee,{label:"Green",value:r.by_status.GREEN,hint:An(r.by_status.GREEN,o)}),l.jsx(Ee,{label:"Evaluation score (avg)",value:r.avg_score!==void 0?r.avg_score.toFixed(0):"-",hint:"100 = nothing found"}),l.jsx(Ee,{label:"Traits not assessed",value:An(r.traits_not_assessed,r.traits),hint:`${r.traits_weak} more on weak evidence`})]}),l.jsx(aR,{bucket:"evaluation",areas:r.areas,total:o}),l.jsxs("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-3",children:[l.jsxs(Ce,{className:"col-span-1 rounded-2xl border border-border p-3 shadow-sm sm:p-4 lg:col-span-2",children:[l.jsx("div",{className:"mb-2 text-sm font-medium text-foreground",children:"Evaluation over time"}),l.jsx(sR,{data:i,series:nQ,ariaLabel:"Stacked bars of red, amber and green evaluations over the window"})]}),l.jsx(lR,{bucket:"evaluation",checks:r.top_checks,onPickCheck:n})]}),l.jsxs(Ce,{className:"rounded-2xl border border-border p-3 shadow-sm sm:p-4",children:[l.jsx("div",{className:"mb-2 text-sm font-medium text-foreground",children:"Traits across these evaluations"}),l.jsx(L0,{items:s})]})]})}function f6e({summary:e,qaWindow:t,onPickCheck:n}){const r=e.integrity,i=v.useMemo(()=>r?r.series.map(a=>({...a,label:ZY(a.start,t)})):[],[r,t]);if(!r)return l.jsx(iQ,{});const o=e.total,s=[["Candidate's delay before answering (median)",Pn(r.candidate_response_median_s)],["Fillers per 100 words (median)",r.filler_median_per_100w!==void 0?String(r.filler_median_per_100w):"-"],["Written-style phrases per 1,000 words (median)",r.ai_phrase_per_1000w_median!==void 0?String(r.ai_phrase_per_1000w_median):"-"]];return l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-3 xl:grid-cols-6",children:[l.jsx(Ee,{label:"Interviews checked",value:o}),l.jsx(Ee,{label:"High concern",value:r.by_level.high,hint:An(r.by_level.high,o)}),l.jsx(Ee,{label:"Medium concern",value:r.by_level.medium,hint:An(r.by_level.medium,o)}),l.jsx(Ee,{label:"Low concern",value:r.by_level.low,hint:An(r.by_level.low,o)}),l.jsx(Ee,{label:"No concern",value:r.by_level.none,hint:An(r.by_level.none,o)}
713),l.jsx(Ee,{label:"Switched tabs",value:r.interviews_with_tab_switches??"-",hint:r.tab_switches!==void 0?`${An(r.interviews_with_tab_switches??0,o)} of interviews · ${r.tab_switches} switch(es)`:void 0})]}),l.jsx(aR,{bucket:"integrity",areas:r.areas,total:o}),l.jsxs("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-3",children:[l.jsxs(Ce,{className:"col-span-1 rounded-2xl border border-border p-3 shadow-sm sm:p-4 lg:col-span-2",children:[l.jsx("div",{className:"mb-2 text-sm font-medium text-foreground",children:"AI-assistance concern over time"}),l.jsx(sR,{data:i,series:o6e,ariaLabel:"Stacked bars of interviews by AI-assistance concern over the window"})]}),l.jsx(lR,{bucket:"integrity",checks:r.top_checks,onPickCheck:n})]}),l.jsxs(Ce,{className:"rounded-2xl border border-border p-3 shadow-sm sm:p-4",children:[l.jsx("div",{className:"mb-2 text-sm font-medium text-foreground",children:"How candidates answered"}),l.jsx(L0,{items:s})]})]})}function iQ(){return l.jsx(Ce,{className:"rounded-2xl border border-border p-6 text-sm text-muted-foreground shadow-sm",children:"This view needs the latest backend. It will fill in once the backend deploy finishes."})}function aR({bucket:e,areas:t,total:n}){return t.length===0?null:l.jsxs(Ce,{className:"rounded-2xl border border-border p-3 shadow-sm sm:p-4",children:[l.jsx("div",{className:"mb-3 text-sm font-medium text-foreground",children:"Where the problems are"}),l.jsx("ul",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-4",children:t.map(r=>{const i=oR[e].find(s=>s.value===r.area),o=n?r.flagged/n:0;return l.jsxs("li",{className:"flex flex-col gap-1",children:[l.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:i?.label??r.area}),l.jsx("span",{className:"text-sm tabular-nums text-foreground",children:An(r.flagged,n)})]}),l.jsx("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-muted","aria-hidden":!0,children:l.jsx("div",{className:K("h-full rounded-full",r.high>0?"bg-destructive":"bg-warning"),style:{width:`${Math.round(o*100)}%`}})}),l.jsxs("div",{className:"text-xs text-muted-foreground",children:[r.flagged," interview(s)",r.high>0?`, ${r.high} serious`:"",i?` · ${i.hint}`:""]})]},r.area)})})]})}function lR({bucket:e,checks:t,onPickCheck:n}){const r=t.filter(i=>(rb(i.check)??e)===e);return l.jsxs(Ce,{className:"rounded-2xl border border-border p-3 shadow-sm sm:p-4",children:[l.jsx("div",{className:"mb-2 text-sm font-medium text-foreground",children:"Most common problems"}),r.length===0?l.jsx("p",{className:"text-sm text-muted-foreground",children:"None in this window."}):l.jsx("ul",{className:"flex flex-col gap-1.5",children:r.map(i=>l.jsxs("li",{className:"flex items-center justify-between gap-2 text-sm",children:[l.jsx("button",{type:"button",className:"text-left text-foreground underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:"Show only interviews with this problem",onClick:()=>n(i.check),children:eg(i.check)}),l.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[i.count,i.high>0&&l.jsxs("span",{className:"ml-1 text-destructive",children:["(",i.high," high)"]})]})]},i.check))})]})}function L0({items:e,narrow:t=!1}){return l.jsx("dl",{className:K("grid grid-cols-1 gap-x-6 gap-y-1 text-sm sm:grid-cols-2",!t&&"xl:grid-cols-3"),children:e.map(([n,r])=>l.jsxs("div",{className:"flex justify-between gap-2 border-b border-border py-1",children:[l.jsx("dt",{className:"text-muted-foreground",children:n}),l.jsx("dd",{className:"min-w-0 break-words text-right tabular-nums text-foreground",children:r})]},n))})}function oQ({orgId:e,jdId:t,candidateId:n,candidateName:r,compact:i=!1}){const{impersonate:o}=Lm(),s=Un();if(!e||!t||!n)return null;const a=`Open ${r||"the candidate"}'s evaluation`,c=u=>{u.stopPropagation(),o(e,"Viewing from Interview QA"),s({to:"/jd-dashboard/$jdId/candidates/$candidateId",params:{jdId:t,candidateId:n}})};return l.jsxs("button",{type:"button",onClick:c,onKeyDown:u=>u.stopPropagation(),"aria-label":a,title:a,className:i?"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-primary hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring":"inline-flex items-center gap-1.5 rounded-md border border-primary/40 px-2.5 py-1 text-xs font-medium text-primary hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[l.jsx(bV,{className:"h-3.5 w-3.5","aria-hidden":!0}),!i&&l.jsx("span",{children:"Open candidate"})]})}const sQ=v.createContext(null);function x3(e){const t=Math.max(0,Math.floor(e));return`${String(Math.floor(t/60)).padStart(2,"0")}
713:${String(t%60).padStart(2,"0")}`}function h6e({interviewId:e,initialBucket:t,disabledReason:n}){const{data:r,isLoading:i,error:o}=cHe(e),s=uHe(),[a,c]=v.useState(t),u=v.useRef(null),d=f=>{const h=u.current;h&&(h.currentTime=Math.max(0,f-2),h.play().catch(()=>{}),h.scrollIntoView?.({block:"nearest",behavior:"smooth"}))};return i?l.jsx(Fn,{}):o||!r?l.jsx("p",{className:"text-sm text-destructive",children:"Could not load this result."}):l.jsxs("div",{className:"flex flex-col gap-4 pb-6",children:[l.jsxs("div",{children:[l.jsx("div",{className:"break-words text-lg font-semibold text-foreground",children:r.candidate_name||r.candidate_id}),l.jsxs("div",{className:"text-sm text-muted-foreground",children:[r.jd_title," · ",Xp(r.provider),r.overall_score!==void 0&&` · candidate's own score ${r.overall_score.toFixed(0)}`]}),l.jsx("div",{className:"mt-1 break-all font-mono text-xs text-muted-foreground",children:r.interview_id}),l.jsx("div",{className:"mt-2",children:l.jsx(oQ,{orgId:r.org_id,jdId:r.jd_id,candidateId:r.candidate_id,candidateName:r.candidate_name})})]}),r.recording_url?l.jsxs("div",{className:"-mx-1 rounded-xl sm:sticky sm:top-0 sm:z-10 border border-border bg-card p-3 shadow-sm",children:[l.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Call recording"}),l.jsx("a",{href:r.recording_url,target:"_blank",rel:"noreferrer",className:"text-xs text-primary underline-offset-2 hover:underline",children:"Open in new tab"})]}),l.jsx("audio",{ref:u,controls:!0,preload:"metadata",src:r.recording_url,className:"w-full","aria-label":"Call recording"}),l.jsx("p",{className:"mt-1.5 text-xs text-muted-foreground",children:"Use the â¶ times next to the evidence to hear each moment."})]}):l.jsx("p",{className:"rounded-xl border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:"No recording is stored for this interview."}),r.judge_error&&l.jsx("p",{className:"text-sm text-warning",children:"The LLM judge failed on this interview; only rule checks are shown."}),l.jsx(sQ.Provider,{value:r.recording_url?d:null,children:l.jsxs(FA,{value:a,onValueChange:f=>c(f),children:[l.jsx(qw,{className:"grid h-auto w-full grid-cols-3",children:Jp.map(f=>l.jsxs(xa,{value:f.value,className:"flex h-auto flex-col gap-1 whitespace-normal py-2",children:[l.jsx("span",{className:"text-xs sm:text-sm",children:f.label}),l.jsxs("span",{className:"inline-flex items-center gap-1",children:[l.jsx(p6e,{result:r,bucket:f.value}),(f.value==="quality"?r.quality_score:f.value==="evaluation"?r.evaluation_score:r.integrity_score)!==void 0&&l.jsx("span",{className:"text-xs tabular-nums text-foreground",children:f.value==="quality"?r.quality_score:f.value==="evaluation"?r.evaluation_score:r.integrity_score})]})]},f.value))}),Jp.map(f=>l.jsx(ba,{value:f.value,className:"mt-4",children:l.jsx(m6e,{result:r,bucket:f.value})},f.value))]})}),l.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Checked ",new Date(r.checked_at).toLocaleString()," · checker"," ",r.checker_version]}),l.jsx(G,{variant:"outline",size:"sm",className:"w-full sm:w-auto",disabled:s.isPending,onClick:()=>s.mutate(r.interview_id,{onSuccess:()=>Q.success("QA check queued. Refresh in a minute."),onError:f=>Q.error(n(f)??"Could not queue the check")}),children:s.isPending?"Queuingâ¦":"Re-run check"})]})]})}function p6e({result:e,bucket:t}){return t==="quality"?l.jsx(We,{tone:vd(e.status),children:yd(e.status)}):t==="evaluation"?l.jsx(We,{tone:e.evaluation_status?vd(e.evaluation_status):"grey",children:XY(e.evaluation_status)}):l.jsx(We,{tone:rR(e.integrity_concern),children:iR(e.integrity_concern)})}function m6e({result:e,bucket:t}){const n=JY(e,t),r=n6e(t,n),i=Jp.find(c=>c.value===t),o=e.judge,s=t==="quality"?o&&{rating:o.interview_quality,reason:o.interview_quality_reason}:t==="evaluation"?o?.evaluation_quality?{rating:o.evaluation_quality,reason:o.evaluation_reason??""}:void 0:o&&{rating:`${o.integrity_concern} concern`,reason:o.integrity_reason},a=t==="quality"?e.quality_score:t==="evaluation"?e.evaluation_score:e.integrity_score;return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:i.question}),t==="evaluation"&&!e.evaluation_status&&!e.run_id?l.jsx("p",{className:"text-sm text-muted-foreground",children:"This interview has no evaluation, so there is nothing to check here."}):l.jsxs(l.Fragment,{children:[(s||a!==void 0)&&l.jsxs("div",{className:"rounded-xl bg-muted p-3 text-sm",children:[a!==void 0&&l.jsxs("div",{className:"font-medium text-foreground",children:[t==="quality"?"Interview quality":t==="evaluation"?"Evaluation quality":"AI check"," score ",a," / 100",l.jsx("span",{className:"ml-1 font-normal text-muted-foreground",children:"(not the candidate's score)"})]}),s&&l.jsxs("div",{className:"mt-1 text-foreground",children:[l.jsxs("span",{className:"font-medium",children:["AI judge's reading: ",s.rating,"."]})," ",s.reason]}),(()=>{const c=a6e(t,s?.rating,{status:t==="quality"?e.status:e.evaluation_status,integrity:e.integrity_concern});return c?l.jsx("p",{className:"mt-1 text-xs font-medium text-warning",children:c}):null})(),l.jsx(x6e,{result:e,bucket:t})]}),t==="integrity"&&l.jsx("p",{className:"text-xs text-muted-foreground",children:"Indicative only. Listen to the recording before acting on any of these."}),r.length===0?l.jsx("p",{className:"text-sm text-muted-foreground",children:t==="integrity"?"No signals found.":"No problems found."}):r.map(c=>l.jsxs("section",{children:[l.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:c.label}),l.jsx(y6e,{flags:c.flags})]},c.area)),t==="evaluation"&&(e.traits?.length??0)>0&&l.jsx(v6e,{result:e}),l.jsxs("section",{children:[l.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:"Measurements"}),l.jsx(L0,{narrow:!0,items:g6e(e,t)}),t==="quality"&&e.stats.checks_skipped&&e.stats.checks_skipped.length>0&&l.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Not run (no timing in this transcript):"," ",e.stats.checks_skipped.map(eg).join(", "),"."]})]})]})]})}function g6e(e,t){const n=e.stats,r=i=>i===void 0?"-":`${i}s`;if(t==="quality"){const i=[["Duration",n.duration_minutes!==void 0?`${n.duration_minutes} min`:"-"],["Silence before agent replies (median / p90 / max)",`${Pn(n.agent_latency_median_s)} / ${Pn(n.agent_latency_p90_s)} / ${Pn(n.agent_latency_max_s)}`],["Voice checked in the recording",n.audio_checked?`yes, ${n.agent_speech_issues??0} line(s) not said as written`:"no"],...n.noisy_answers?[["Answers with background noise",`${n.noisy_answers} of ${n.candidate_answers}`],["Wait after quiet answers, median",n.quiet_wait_median_s?Pn(n.quiet_wait_median_s):"no quiet answers"]]:[],...n.agent_processing_median_s!==void 0?[["Agent processing per reply (LLM + voice)",Pn(n.agent_processing_median_s)]]:[],["Agent cut-ins",String(n.agent_cut_ins)],["Talking over",n.overlap_count?`${n.overlap_count} time(s), ${r(n.overlap_s)}`:"0"],["Dead air",r(n.dead_air_s??0)],["Longest silence",r(n.longest_silence_s)],["Talk time (agent / candidate)",n.agent_talk_s!==void 0?`${r(n.agent_talk_s)} / ${r(n.candidate_talk_s)}`:"-"],["Agent share of words",`${Math.round(n.agent_share*100)}%`],["Questions / answers",`${n.agent_questions} / ${n.candidate_answers}`],["Median answer",`${n.median_answer_words} words`]];return n.segments_per_answer!==void 0&&i.push(["Pieces per answer",n.segments_per_answer.toFixed(1)]),(n.end_of_turn_delay_median_s!==void 0||n.llm_ttft_median_s!==void 0)&&i.push(["Reply delay by stage (end of turn / LLM / voice)",`${Pn(n.end_of_turn_delay_median_s)} / ${Pn(n.llm_ttft_median_s)} / ${Pn(n.tts_ttfb_median_s)}`]),i}return t==="evaluation"?[["Traits",String(n.traits_total??e.traits?.length??0)],["Assessed",String(n.traits_assessed??"-")],["Weak evidence",String(n.traits_weak??0)],["Low confidence",String(n.traits_low_confidence??0)],["Candidate's overall score",e.overall_score!==void 0?e.overall_score.toFixed(0):"-"]]:[["Tab switches",String(n.tab_switches??0)],["Delay before answering (median / p90)",`${Pn(n.candidate_response_median_s)} / ${Pn(n.candidate_response_p90_s)}`],["Pauses of 4s+ before answering",n.candidate_pauses_over_4s?.length?n.candidate_pauses_over_4s.map(i=>`${i}s`).join(", "):"none"],["Fillers per 100 words (median)",String(n.filler_median_per_100w)],["Written-style phrases per 1,000 words",String(n.ai_phrase_per_1000w)]]}function v6e({result:e}){const t=new Set(JY(e,"evaluation").map(n=>
713n.message.split(":")[0]).filter(Boolean));return l.jsxs("section",{children:[l.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:"Traits as scored"}),l.jsx("ul",{className:"flex flex-col gap-2",children:e.traits.map(n=>{const r=n.evidence.toLowerCase()==="none"||n.evidence==="";return l.jsxs("li",{className:"rounded-xl border border-border p-3",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:n.name}),t.has(n.name)&&l.jsx(We,{tone:"amber",children:"Questioned"}),l.jsx("span",{className:"ml-auto text-sm tabular-nums text-foreground",children:r?"Not assessed":n.score.toFixed(0)})]}),l.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-3 text-xs text-muted-foreground",children:[n.level&&l.jsx("span",{children:n.level}),l.jsxs("span",{children:["Evidence"," ",l.jsx("span",{className:r||n.evidence==="Weak"?"font-medium text-warning":void 0,children:r?"none":n.evidence})]}),l.jsxs("span",{children:["Confidence"," ",l.jsx("span",{className:n.confidence==="Low"?"font-medium text-warning":void 0,children:n.confidence||"-"})]})]}),n.judge_audit&&l.jsxs("div",{className:"mt-2 rounded-lg bg-muted/50 px-3 py-2 text-xs",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("span",{className:"font-medium text-foreground",children:"Judge's scoring"}),l.jsxs(We,{tone:ZHe(n.judge_audit.score),children:[n.judge_audit.score," / 100"]}),l.jsxs("span",{className:"text-muted-foreground",children:["Rubric ",n.judge_audit.rubric_fit," · Arguments ",n.judge_audit.argument_selection]})]}),n.judge_audit.supported_level&&l.jsxs("div",{className:"mt-1 text-muted-foreground",children:["Evidence supports: ",l.jsx("span",{className:"text-foreground",children:n.judge_audit.supported_level}),n.level&&n.judge_audit.supported_level.toLowerCase()!==n.level.toLowerCase()&&l.jsxs(l.Fragment,{children:[" (judge gave ",n.level,")"]})]}),n.judge_audit.reason&&l.jsx("p",{className:"mt-1 break-words text-muted-foreground",children:n.judge_audit.reason})]}),n.rationale&&l.jsxs("details",{className:"mt-2 text-sm",children:[l.jsx("summary",{className:"cursor-pointer text-xs text-muted-foreground",children:"Evaluator's reasoning"}),l.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words text-muted-foreground",children:n.rationale})]})]},n.name)})})]})}function y6e({flags:e}){const t=v.useContext(sQ);return l.jsx("ul",{className:"flex flex-col gap-3",children:e.map((n,r)=>l.jsxs("li",{className:"rounded-xl border border-border p-3",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(We,{tone:e6e(n.severity),children:n.severity}),l.jsx("span",{className:"text-sm font-medium text-foreground",children:eg(n.check)}),l.jsx("span",{className:"text-xs text-muted-foreground",children:n.source==="judge"?"LLM judge":n.source==="audio"?"audio check":"rule"})]}),l.jsx("p",{className:"mt-1 text-sm text-foreground",children:n.message}),n.evidence&&n.evidence.length>0&&l.jsx("ul",{className:"mt-2 flex flex-col gap-1",children:n.evidence.map((i,o)=>{const s=n.evidence_at?.[o]??-1;return l.jsxs("li",{className:"flex items-start gap-2 rounded-md bg-muted px-2 py-1 text-xs text-muted-foreground",children:[t&&s>=0&&l.jsxs("button",{type:"button",onClick:()=>t(s),className:"mt-px inline-flex shrink-0 items-center gap-1 rounded-full bg-primary/15 px-2 py-0.5 font-medium tabular-nums text-primary hover:bg-primary/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":`Play the recording from ${x3(s)}`,title:"Play this moment",children:[l.jsx(lc,{className:"h-3 w-3","aria-hidden":!0}),x3(s)]}),l.jsx("span",{className:"min-w-0 whitespace-pre-wrap break-words",children:i})]},o)})})]},`${n.check}-${r}`))})}function x6e({result:e,bucket:t}){const n=e.stats?.scoring;if(!n)return null;const r=(n[t]??[]).filter(s=>s.check!=="no_judge_audit"||t==="evaluation"),i=(n.evaluation??[]).some(s=>s.check==="no_judge_audit"),o=s=>Number.isInteger(s)?String(s):s.toFixed(1);return l.jsxs("details",{className:"mt-2",children:[l.jsxs("summary",{className:"cursor-pointer text-xs text-muted-foreground",children:["How this score was reached (rubric v",n.rubric_version,")"]}),l.jsxs("ul",{className:"mt-1 flex flex-col gap-0.5 text-xs",children:[l.jsxs("li",{className:"text-muted-foreground",children:["Start:"," ",t
713==="evaluation"&&n.evaluation_base!==void 0?`${o(n.evaluation_base)} (judge's trait audits)`:t==="evaluation"&&i?"judge audit unavailable, scored from the findings":"100"]}),r.filter(s=>s.check!=="no_judge_audit").map(s=>l.jsxs("li",{className:"flex justify-between gap-2",children:[l.jsxs("span",{className:"text-foreground",children:[s.label,": ",o(s.count),s.allowance?` (${o(s.allowance)} free)`:"",s.capped?", capped":"",s.score_cap!==void 0?`, caps the score at ${s.score_cap}`:""]}),l.jsx("span",{className:`tabular-nums ${s.points?"text-destructive":"text-muted-foreground"}`,children:s.points?`-${o(s.points)}`:"0"})]},s.check)),r.length===0&&l.jsx("li",{className:"text-muted-foreground",children:"Nothing deducted."})]})]})}function b6e({r:e,bucket:t,prefix:n=!1}){return t==="quality"?l.jsxs(We,{tone:vd(e.status),children:[n&&"Quality: ",yd(e.status)]}):t==="evaluation"?l.jsxs(We,{tone:e.evaluation_status?vd(e.evaluation_status):"grey",children:[n&&"Evaluation: ",XY(e.evaluation_status)]}):l.jsxs(We,{tone:rR(e.integrity_concern),children:[n&&"AI check: ",iR(e.integrity_concern)]})}const aQ=(e,t=0)=>e===void 0?"-":e.toFixed(t);function lQ(e,t){return t==="quality"?e.quality_score:t==="evaluation"?e.evaluation_score:e.integrity_score}function w6e({r:e,bucket:t}){const n=lQ(e,t);return l.jsxs("span",{className:"inline-flex items-center gap-1.5 whitespace-nowrap",children:[l.jsx(b6e,{r:e,bucket:t}),n!==void 0&&l.jsx("span",{className:"tabular-nums text-foreground",children:n})]})}function _6e(e){const t=(s,a)=>({head:a,active:s===e,cell:c=>l.jsx(w6e,{r:c,bucket:s})}),n=[e,...["quality","evaluation","integrity"].filter(s=>s!==e)],r={quality:"Interview quality",evaluation:"Evaluation",integrity:"AI check"},i={head:e==="integrity"?"Main signals":"Main problems",cell:s=>{const a=tQ(s,e);return l.jsx("span",{className:"text-muted-foreground",children:a.length?a.map(eg).join(" · "):"-"})}},o=e==="quality"?[{head:"Provider",cell:s=>Xp(s.provider)},{head:"Agent processing",align:"right",cell:s=>Pn(s.agent_processing_median_s??s.agent_latency_median_s)}]:e==="evaluation"?[{head:"Traits assessed",align:"right",cell:s=>s.traits_total?`${s.traits_assessed??0} / ${s.traits_total}`:"-"}]:[{head:"Tab switches",align:"right",cell:s=>s.tab_switches===void 0?"-":s.tab_switches}];return[...n.map(s=>t(s,r[s])),i,...o,{head:"Candidate score",align:"right",cell:s=>aQ(s.overall_score)}]}const S6e=["quality","evaluation","integrity"],j6e={quality:"Quality",evaluation:"Evaluation",integrity:"AI check"},E6e={green:"border-success/40 bg-success/10 text-success",amber:"border-warning/40 bg-warning/10 text-warning",red:"border-destructive/40 bg-destructive/10 text-destructive",grey:"border-border bg-muted/40 text-muted-foreground"};function C6e(e,t){return t==="quality"?vd(e.status):t==="evaluation"?e.evaluation_status?vd(e.evaluation_status):"grey":rR(e.integrity_concern)}function N6e(e,t){return t==="quality"?yd(e.status):t==="evaluation"?e.evaluation_status?yd(e.evaluation_status):"Not run":iR(e.integrity_concern)}function P6e({r:e,bucket:t,active:n}){const r=lQ(e,t);return l.jsxs("div",{className:`flex min-w-0 flex-col items-center rounded-md border px-1 py-1.5 text-center ${E6e[C6e(e,t)]} ${n?"ring-2 ring-primary ring-offset-1 ring-offset-background":""}`,children:[l.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:j6e[t]}),l.jsx("span",{className:"text-lg font-bold leading-tight tabular-nums",children:r??"-"}),l.jsx("span",{className:"text-[11px] font-semibold leading-tight",children:N6e(e,t)})]})}function k6e({bucket:e,rows:t,onOpen:n}){const r=_6e(e);return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"hidden md:block",children:l.jsxs(mr,{children:[l.jsx(gr,{children:l.jsxs(bt,{children:[l.jsx(pe,{children:"When"}),l.jsx(pe,{children:"Candidate"}),r.map(i=>l.jsx(pe,{className:`${i.align==="right"?"text-right":""} ${i.active?"text-foreground font-semibold":""}`,children:i.head},i.head))]})}),l.jsx(vr,{children:t.map(i=>l.jsxs(bt,{className:"cursor-pointer",tabIndex:0,onClick:()=>n(i.interview_id),onKeyDown:o=>(o.key==="Enter"||o.key===" ")&&n(i.interview_id),children:[l.jsx(he,{className:"whitespace-nowrap text-sm text-muted-foreground",title:new Date(i.interview_at).toLocaleStr
713ing(),children:g3(i.interview_at)}),l.jsxs(he,{className:"text-sm",children:[l.jsxs("div",{className:"flex items-center gap-1 font-medium text-foreground",children:[l.jsx("span",{children:i.candidate_name||"-"}),l.jsx(oQ,{compact:!0,orgId:i.org_id,jdId:i.jd_id,candidateId:i.candidate_id,candidateName:i.candidate_name})]}),l.jsx("div",{className:"text-xs text-muted-foreground",children:i.jd_title||i.org_id})]}),r.map(o=>l.jsx(he,{className:o.align==="right"?"text-right text-sm tabular-nums":"text-sm",children:o.cell(i)},o.head))]},i.interview_id))})]})}),l.jsx("ul",{className:"divide-y divide-border md:hidden",children:t.map(i=>{const o=tQ(i,e),s=r.filter(a=>a.align==="right"&&a.head!=="Candidate score");return l.jsx("li",{children:l.jsxs("button",{type:"button",onClick:()=>n(i.interview_id),className:"flex w-full flex-col gap-2 p-3 text-left transition-colors hover:bg-muted/50 focus-visible:bg-muted/50 focus-visible:outline-none",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"break-words font-medium leading-snug text-foreground",children:i.candidate_name||"-"}),l.jsx("div",{className:"break-words text-xs text-muted-foreground",children:i.jd_title||i.org_id})]}),l.jsx("span",{className:"shrink-0 pt-0.5 text-xs text-muted-foreground",title:new Date(i.interview_at).toLocaleString(),children:g3(i.interview_at)})]}),l.jsx("div",{className:"grid grid-cols-3 gap-1.5",children:S6e.map(a=>l.jsx(P6e,{r:i,bucket:a,active:a===e},a))}),o.length>0&&l.jsx("p",{className:"text-sm leading-snug text-foreground/90",children:o.map(eg).join(" · ")}),l.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-0.5 text-xs text-muted-foreground",children:[l.jsx("span",{children:Xp(i.provider)}),s.map(a=>l.jsxs("span",{className:"tabular-nums",children:[a.head," ",a.cell(i)]},a.head)),l.jsxs("span",{className:"tabular-nums",children:["Candidate score ",aQ(i.overall_score)]})]})]})},i.interview_id)})})]})}function A6e(){const{data:e,isLoading:t,error:n}=fHe(),[r,i]=v.useState(null),[o,s]=v.useState(!1);if(t)return l.jsx(Fn,{});if(n||!e)return l.jsx("p",{className:"text-sm text-destructive",children:"Could not load the rubric."});const a=e.active,c=r??a.version;return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs(Ce,{className:"flex flex-col gap-1 p-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("h2",{className:"text-base font-semibold text-foreground",children:"QA rubric"}),l.jsxs("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:["Version ",a.version," is active"]}),!o&&l.jsx(G,{size:"sm",variant:"outline",className:"ml-auto",onClick:()=>s(!0),children:"Edit rubric"})]}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Each bucket starts at 100. Each check allows a number of infractions free; every one beyond that takes the points shown, up to the rule's cap. Critical rules also cap the whole score. The light comes only from the score."})]}),o?l.jsx(I6e,{base:a,onDone:()=>s(!1)}):l.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_20rem]",children:[l.jsx(T6e,{version:c,activeVersion:a.version}),l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs(Ce,{className:"p-4",children:[l.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:"History"}),l.jsx("ul",{className:"flex flex-col gap-1",children:(e.versions.length?e.versions:[a]).map(u=>l.jsx("li",{children:l.jsxs("button",{type:"button",onClick:()=>i(u.version),"aria-current":c===u.version?"true":void 0,className:`w-full rounded-lg px-2 py-1.5 text-left text-sm hover:bg-muted ${c===u.version?"bg-accent":""}`,children:[l.jsxs("span",{className:"font-medium text-foreground",children:["v",u.version]})," ",l.jsxs("span",{className:"text-muted-foreground",children:[u.created_at?new Date(u.created_at).toLocaleDateString():"default"," ·"," ",u.created_by||"system"]}),l.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:u.note})]})},u.version))})]}),l.jsx(M6e,{activeVersion:a.version,versions:e.versions.map(u=>u.version)})]})]})]})}function T6e({version:e,activeVersion:t}){const{data:n,isLoading:r}=s3(e),{data:i}=s3(e>1?e-1:null),o=v.useMemo(()=>n&&i?rQ(i,n):[],[n,i]);return r||!n?l.jsx(Fn,{}):l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs(Ce,{className:"p-4",children:[l.jsxs("div",{className:"flex flex-wrap items-baseline gap-2",children:[l.jsxs("h3",{className:"text-sm font-semibold text-foreground",children:["Version ",n.version]}),n.version===t&&l.jsx("span",{className:"text-xs text-success",children:"active"}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:[n.created_at?new Date(n.created_at).toLocaleStr
713ing():""," ",n.created_by&&`· ${n.created_by}`]})]}),n.note&&l.jsx("p",{className:"mt-1 text-sm text-foreground",children:n.note}),e>1&&l.jsxs("div",{className:"mt-2",children:[l.jsxs("div",{className:"text-xs font-medium text-muted-foreground",children:["Changes from version ",e-1]}),o.length?l.jsx("ul",{className:"mt-1 list-disc pl-5 text-sm text-foreground",children:o.map(s=>l.jsx("li",{children:s},s))}):l.jsx("p",{className:"text-sm text-muted-foreground",children:"No changes to the numbers."})]})]}),l.jsx(R6e,{rb:n}),l.jsx(HS,{title:"Interview quality",rules:n.quality}),l.jsxs(Ce,{className:"p-4 text-sm",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Evaluation"}),l.jsxs("p",{className:"mt-1 text-muted-foreground",children:["The judge audits each scored trait. Trait score = ",b3(n.evaluation.rubric_fit_weight)," rubric fit +"," ",b3(n.evaluation.argument_weight)," argument selection. The evaluation score is the average over traits, then the rules below apply."]})]}),l.jsx(HS,{title:"Evaluation rules",rules:n.evaluation.rules}),l.jsx(HS,{title:"AI check",rules:n.integrity})]})}const b3=e=>`${Math.round(e*100)}%`;function R6e({rb:e}){const t=e.bands,n=e.integrity_levels;return l.jsxs(Ce,{className:"grid gap-3 p-4 text-sm sm:grid-cols-2",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"mb-1 text-sm font-semibold text-foreground",children:"Bands (all three scores)"}),l.jsxs("ul",{className:"flex flex-col gap-0.5",children:[l.jsxs("li",{children:[l.jsx("span",{className:"font-medium text-success",children:"Green"})," ",t.excellent,"-100 excellent, ",t.green,"-",t.excellent-1," acceptable"]}),l.jsxs("li",{children:[l.jsx("span",{className:"font-medium text-warning",children:"Amber"})," ",t.amber,"-",t.green-1," needs review"]}),l.jsxs("li",{children:[l.jsx("span",{className:"font-medium text-destructive",children:"Red"})," below ",t.amber]})]})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"mb-1 text-sm font-semibold text-foreground",children:"AI check concern"}),l.jsxs("ul",{className:"flex flex-col gap-0.5",children:[l.jsxs("li",{children:["None ",n.none,"-100"]}),l.jsxs("li",{children:["Low ",n.low,"-",n.none-1]}),l.jsxs("li",{children:["Medium ",n.medium,"-",n.low-1]}),l.jsxs("li",{children:["High below ",n.medium]})]})]})]})}function w3(e){return e.tiers?.length?e.tiers.map(t=>`${t.from}${e.unit??""}+: ${t.points}`).join(", "):e.severity_points?`weak ${e.severity_points.low??0}, moderate ${e.severity_points.medium??0}, strong ${e.severity_points.high??0}`:e.first_points!==void 0?`${e.first_points} first, then ${e.points}`:String(e.points)}function HS({title:e,rules:t}){return l.jsxs(Ce,{className:"overflow-hidden",children:[l.jsx("h3",{className:"border-b border-border px-4 py-2 text-sm font-semibold text-foreground",children:e}),l.jsx("ul",{className:"divide-y divide-border sm:hidden",children:t.map(n=>l.jsxs("li",{className:"px-4 py-2.5",children:[l.jsx("div",{className:"text-sm font-medium leading-snug text-foreground",children:n.label}),l.jsxs("dl",{className:"mt-1.5 grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[l.jsxs("div",{className:"flex justify-between gap-2",children:[l.jsx("dt",{className:"text-muted-foreground",children:"Free"}),l.jsx("dd",{className:"tabular-nums text-foreground",children:n.tiers?.length?"-":n.allowance})]}),l.jsxs("div",{className:"flex justify-between gap-2",children:[l.jsx("dt",{className:"text-muted-foreground",children:"Cap"}),l.jsx("dd",{className:"tabular-nums text-foreground",children:n.cap||"-"})]}),l.jsxs("div",{className:"col-span-2 flex justify-between gap-2",children:[l.jsx("dt",{className:"shrink-0 text-muted-foreground",children:"Points each"}),l.jsx("dd",{className:"text-right tabular-nums text-foreground",children:w3(n)})]}),n.score_cap!==void 0&&l.jsxs("div",{className:"col-span-2 flex justify-between gap-2",children:[l.jsx("dt",{className:"text-muted-foreground",children:"Caps score at"}),l.jsx("dd",{className:"font-medium tabular-nums text-destructive",children:n.score_cap})]})]})]},n.check))}),l.jsx("div",{className:"hidden overflow-x-auto sm:block",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/50 text-xs text-muted-foreground",children:l.jsxs("tr",{children:[l.jsx("th",{className:"px-4 py-2 text-left font-medium",children:"Check"}),l.jsx("th",{className:"px-2 py-2 text-right font-medium",children:"Free"}),l.jsx("th",{className:"px-2 py-2 text-left font-medium",children:"Points each"}),l.jsx("th",{className:"px-2 py-2 text-right font-medium",children:"Cap"}),l.jsx("th",{className:"px-4 py-2 text-right font-medium",children:"Caps score at"})]})}),l.jsx("tbody",{children:t.map(n=>l.jsxs("tr",{className:"border-t border-border",children:[l.jsx("td",{className:"px-4 py-2 text-foreground",children:n.label}),l.jsx("td",{className:"px-2 py-2 text-right tabular-nums",children:n.tiers?.length?"-":n.allowance}),l.jsx("td",{className:"px-2 py-2 tabular-nums",children:w3(n)}),l.jsx("td",{className:"px-2 py-2 text-right tabular-nums",children:n.cap||"-"}),l.jsx("td",{className:"px-4 py-2 text-right tabular-nums",children:n.score_cap!==void 0?l.jsx("span",{className:"font-medium text-destructive",children:n.score_cap}):"-"})]},n.check))})]})})]})}
713function xi({value:e,onChange:t,label:n,step:r=1,optional:i}){return l.jsx(Le,{type:"number",inputMode:"decimal",step:r,min:0,"aria-label":n,value:e??"",placeholder:i?"none":void 0,onChange:o=>{const s=o.target.value;t(s===""?i?void 0:0:Number(s))},className:"h-8 w-20 text-right tabular-nums"})}function O6e({rule:e,onChange:t}){const n=r=>t({...e,...r});return l.jsxs("div",{className:"flex flex-col gap-2 border-t border-border px-4 py-3 sm:flex-row sm:flex-wrap sm:items-end",children:[l.jsx("div",{className:"min-w-0 flex-1 text-sm font-medium text-foreground sm:min-w-[14rem]",children:e.label}),e.tiers?.length?e.tiers.map((r,i)=>l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["From ",e.unit??"",l.jsxs("div",{className:"flex gap-1",children:[l.jsx(xi,{label:`${e.label} tier ${i+1} from`,step:.1,value:r.from,onChange:o=>n({tiers:e.tiers.map((s,a)=>a===i?{...s,from:o??0}:s)})}),l.jsx(xi,{label:`${e.label} tier ${i+1} points`,value:r.points,onChange:o=>n({tiers:e.tiers.map((s,a)=>a===i?{...s,points:o??0}:s)})})]})]},i)):e.severity_points?["low","medium","high"].map(r=>l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[r==="low"?"Weak":r==="medium"?"Moderate":"Strong",l.jsx(xi,{label:`${e.label} ${r} points`,value:e.severity_points[r],onChange:i=>n({severity_points:{...e.severity_points,[r]:i??0}})})]},r)):l.jsxs(l.Fragment,{children:[l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["Free",l.jsx(xi,{label:`${e.label} free`,value:e.allowance,onChange:r=>n({allowance:r??0})})]}),e.first_points!==void 0&&l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["First",l.jsx(xi,{label:`${e.label} first points`,value:e.first_points,onChange:r=>n({first_points:r??0})})]}),l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["Points each",l.jsx(xi,{label:`${e.label} points`,value:e.points,onChange:r=>n({points:r??0})})]})]}),l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["Cap",l.jsx(xi,{label:`${e.label} cap`,value:e.cap,onChange:r=>n({cap:r??0})})]}),l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["Caps score at",l.jsx(xi,{label:`${e.label} caps score at`,optional:!0,value:e.score_cap,onChange:r=>n({score_cap:r})})]})]})}function I6e({base:e,onDone:t}){const[n,r]=v.useState(()=>structuredClone(e)),[i,o]=v.useState(""),s=hHe(),a=v.useMemo(()=>rQ(e,n),[e,n]);v.useEffect(()=>r(structuredClone(e)),[e]);const c=(p,m,g)=>r(y=>({...y,[p]:y[p].map((b,x)=>x===m?g:b)})),u=(p,m)=>r(g=>({...g,evaluation:{...g.evaluation,rules:g.evaluation.rules.map((y,b)=>b===p?m:y)}})),d=()=>{s.mutate({...n,note:i},{onSuccess:p=>{Q.success(`Saved as version ${p.version}. New interviews are scored with it.`),t()},onError:p=>Q.error(rE(p)&&p.response?.status===400?String(p.response.data?.message??p.response.data?.error??"The rubric is not valid"):"Could not save the rubric")})},f=(p,m)=>l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[m,l.jsx(xi,{label:m,value:n.bands[p],onChange:g=>r(y=>({...y,bands:{...y.bands,[p]:g??0}}))})]}),h=(p,m)=>l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[m,l.jsx(xi,{label:m,value:n.integrity_levels[p],onChange:g=>r(y=>({...y,integrity_levels:{...y.integrity_levels,[p]:g??0}}))})]});return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs(Ce,{className:"flex flex-wrap gap-4 p-4",children:[l.jsx("div",{className:"w-full text-sm font-semibold text-foreground",children:"Bands and levels"}),f("excellent","Excellent from"),f("green","Green from"),f("amber","Amber from"),h("none","AI check: no concern from"),h("low","Low from"),h("medium","Medium from"),l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["Evaluation: rubric-fit weight",l.jsx(xi,{label:"Rubric-fit weight",step:.05,value:n.evaluation.rubric_fit_weight,onChange:p=>r(m=>({...m,evaluation:{...m.evaluation,rubric_fit_weight:p??0,argument_weight:Math.round((1-(p??0))*100)/100}}))})]}),l.jsxs("div",{className:"self-end pb-2 text-xs text-muted-foreground",children:["Argument weight ",n.evaluation.argument_weight]})]}),[["Interview quality",n.quality,(p,m)=>c("quality",p,m)],["Evaluation rules",n.evaluation.rules,u],["AI check",n.integrity,(p,m)=>c("integrity",p,m)]].map(([p,m,g])=>l.jsxs(Ce,{className:"overflow-hidden",children:[l.jsx("h3",{className:"px-4 py-2 text-sm font-semibold text-foreground",children:p}),m.map((y,b)=>l.jsx(O6e,{rule:y,onChange:x=>g(b,x)},y.check))]},p)),l.jsxs(Ce,{className:"sticky bottom-2 flex flex-col gap-2 p-4 shadow-md",children:[l.jsx("div",{className:"text-sm font-medium text-foreground",children:a.length?`${a.length} change(s)`:"No changes yet"}),a.length>0&&l.jsx("ul",{className:"max-h-32 list-disc overflow-y-auto pl-5 text-xs text-muted-foreground",children:a.map(p=>l.jsx("li",{children:p},p))}),l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["What changed and why (kept in the history)",l.jsx("textarea",{value:i,onChange:p=>o(p.target.value),rows:2,className:"rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground"})]}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx(G,{onClick:d,disabled:!a.length||!i.trim()||s.isPending,children:s.isPending?"Savingâ¦":"Save as new version"}),l.jsx(G,{variant:"outline",onClick:t,children:"Cancel"})]})]})]})}const _3=e=>e.toISOString().slice(0,10);function M6e({activeVersion:e,versions:t}){const[n,r]=v.useState(()=>_3(new Date(Date.now()-2592e6))),[i,o]=v.useState(()=>_3(new Date)),[s,a]=v.useState(""),[c,u]=v.useState(e),d=pHe(),f=()=>{d.mutate({since:new Date(`${n}T00:00:00Z`).toISOString(),until:new Date(`${i}T23:59:59Z`).toISOString(),job:s.trim()||void 0,version:c},{onSuccess:p=>Q.success(`Re-scored ${p.rescored} with version ${p.version}.`+(p.queued?` ${p.queued} older result(s) queued for a fresh check.`:"")+(p.capped?" Only the first 5,000 were done; narrow the range for the rest.":"")),onError:()=>Q.error("Could not re-score")})},h=t.length?t:[e];return l.jsxs(Ce,{className:"flex flex-col gap-2 p-4",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Re-score results"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Applies a rubric version to results already checked. Nothing changes until you run it."}),l.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["From",l.jsx(Le,{type:"date",value:n,onChange:p=>r(p.target.value),"aria-label":"Re-score from"})]}),l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["To",l.jsx(Le,{type:"date",value:i,onChange:p=>o(p.target.value),"aria-label":"Re-score to"})]})]}),l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["Job (part of the title, blank for all)",l.jsx(Le,{value:s,onChange:p=>a(p.target.value),"aria-label":"Re-score job"})]}),l.jsxs("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["Rubric version",l.jsx("select",{value:c,onChange:p=>u(Number(p.target.value)),"aria-label":"Re-score version",className:"h-9 rounded-md border border-input bg-background px-2 text-sm text-foreground",children:h.map(p=>l.jsxs("option",{value:p,children:["v",p,p===e?" (active)":""]},p))})]}),l.jsx(G,{size:"sm",onClick:f,disabled:d.isPending||!n||!i||i<n,children:d.isPending?"Re-scoringâ¦":"Re-score"})]})}const GS=50;function S3(e){return rE(e)&&e.response?.status===409&&e.response?.data?.reason==="DISABLED"?"Interview QA is not enabled in this environment.":rE(e)&&e.response?.status===404?"This interview no longer exists (it was reset or deleted), so it can't be re-checked.":null}function $6e(){const[e,t]=v.useState("24h"),[n,r]=v.useState("all"),[i,o]=v.useState("quality"),[s,a]=v.useState("all"),[c,u]=v.useState("all"),[d,f]=v.useState("all"),[h,p]=v.useState(""),[m,g]=v.useState(""),[y,b]=v.useState("all"),[x,w]=v.useState(""),[S,_]=v.useState(""),[j,E]=v.useState(0),[C,N]=v.useState(null),[k,P]=v.useState("results"),A=pv(h.trim()),L=pv(m.trim()),R=pv(x),D=pv(S),O={window:e,provider:n==="all"?void 0:n,status:i==="quality"&&s!=="all"?s:void 0,evaluation_status:i==="evaluation"&&c!=="all"?c:void 0,integrity:i==="integrity"&&d!=="all"?d:void 0,candidate:A||void 0,job:L||void 0,check:y==="all"?void 0:y,min_score:m3(R),max_score:m3(D),limit:GS,offset:j*GS},{data:F,isLoading:T,error:M}=lHe(O),V=dHe(),B=U=>ae=>{U(ae),E(0)},I=U=>ae=>{U(ae.target.value),E(0)},z=U=>{o(U),b("all"),E(0)},de=i==="quality"&&s!=="all"||i==="evaluation"&&c!=="all"||i==="integrity"&&d!=="all"||n!=="all"||h!==""||m!==""||y!=="all"||x!==""||S!=="",ge=()=>{r("all"),a("all"),u("all"),f("all"),p(""),g(""),b("all"),w(""),_(""),E(0)},te=F?.summary,ye=Jp.find(U=>U.value===i),W=()=>{V.mutate(e,{onSuccess:U=>{const ae=U.rescored??0,re=[];U.queued>0&&re.push(`Queued ${U.queued} ${U.queued===1?"interview":"interviews"} for a check. Refresh in a minute.`),ae>0&&re.push(`Rescored ${ae} ${ae===1?"result":"results"} under the current rubric.`),Q.success(re.length?re.join(" "):"Nothing to re-check. Every interview in this window is up to date.")},onError:U=>Q.error(S3(U)??"Could not queue the backfill")}
713)},ne=U=>{if(te)return U==="quality"?(te.quality??te).by_status.RED:U==="evaluation"?te.evaluation?.by_status.RED:te.integrity?te.integrity.by_level.high:te.by_integrity.high},se=l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-xl font-semibold text-foreground sm:text-2xl",children:"Interview QA"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Three separate checks run after every AI interview: how well the interview was run, whether its evaluation can be trusted, and signs of AI-assisted answers. None of them scores the candidate."})]}),l.jsxs("div",{className:"flex w-full shrink-0 flex-col gap-2 sm:w-auto sm:items-end",children:[l.jsx(Tc,{ariaLabel:"View",value:k,options:[{value:"results",label:"Results"},{value:"rubric",label:"QA rubric"}],onChange:U=>P(U)}),k==="results"&&l.jsxs("div",{className:"flex w-full flex-col gap-1 sm:w-auto sm:items-end",children:[l.jsxs(G,{size:"sm",className:"w-full sm:w-auto",onClick:W,disabled:V.isPending,children:[l.jsx(ak,{className:`mr-1.5 h-3.5 w-3.5 ${V.isPending?"animate-spin":""}`,"aria-hidden":!0}),V.isPending?"Queuingâ¦":"Re-check interviews"]}),l.jsx("p",{className:"text-xs text-muted-foreground sm:text-right",children:"Checks new interviews in this window and re-checks any done by an older version."})]})]})]})});return k==="rubric"?l.jsxs("div",{className:"flex flex-col gap-4 p-2",children:[se,l.jsx(A6e,{})]}):l.jsxs("div",{className:"flex flex-col gap-4 p-2",children:[se,te?.outdated?l.jsxs("div",{className:"flex flex-col gap-2 rounded-lg border border-warning/40 bg-warning/10 px-3 py-2 text-sm text-foreground sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("p",{children:[te.outdated===1?"1 interview":`${te.outdated} interviews`," in this window",te.outdated===1?" was":" were"," checked by an older version and may be missing evaluation and tab-switch results."]}),l.jsx(G,{size:"sm",variant:"outline",className:"shrink-0",onClick:W,disabled:V.isPending,children:V.isPending?"Queuingâ¦":"Re-check now"})]}):null,l.jsxs("div",{className:"flex flex-col gap-2 lg:flex-row lg:flex-wrap lg:items-center",children:[l.jsx(Tc,{ariaLabel:"Time window",value:e,options:QHe,onChange:B(t)}),l.jsx(Tc,{ariaLabel:"Provider",value:n,options:[{value:"all",label:"All providers"},{value:"retell",label:"Retell"},{value:"livekit",label:"LiveKit"}],onChange:B(r)})]}),l.jsx("div",{role:"tablist","aria-label":"QA area",className:"grid grid-cols-3 gap-1 rounded-xl border border-border bg-card p-1",children:Jp.map(U=>{const ae=ne(U.value),re=i===U.value;return l.jsxs("button",{type:"button",role:"tab","aria-selected":re,onClick:()=>z(U.value),className:K("flex min-w-0 flex-col items-center gap-0.5 rounded-lg px-2 py-2 text-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:flex-row sm:justify-center sm:gap-2",re?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted"),children:[l.jsx("span",{className:"text-sm font-medium leading-tight",children:U.label}),ae!==void 0&&ae>0&&l.jsxs("span",{className:K("rounded-full px-1.5 text-xs tabular-nums",re?"bg-primary-foreground/20":"bg-destructive/15 text-destructive"),children:[ae," ",U.value==="integrity"?"high":"red"]})]},U.value)})}),l.jsx("p",{className:"-mt-2 text-sm text-muted-foreground",children:ye.question}),l.jsxs("div",{className:"flex flex-col gap-2",children:[i==="quality"&&l.jsx(Tc,{ariaLabel:"Interview quality status",value:s,options:[{value:"all",label:"Any status"},{value:"RED",label:"Red"},{value:"AMBER",label:"Amber"},{value:"GREEN",label:"Green"}],onChange:B(a)}),i==="evaluation"&&l.jsx(Tc,{ariaLabel:"Evaluation status",value:c,options:[{value:"all",label:"Any status"},{value:"RED",label:"Red"},{value:"AMBER",label:"Amber"},{value:"GREEN",label:"Green"},{value:"NONE",label:"Not evaluated"}],onChange:B(u)}),i==="integrity"&&l.jsx(Tc,{ariaLabel:"AI-assistance concern",value:d,options:[{value:"all",label:"Any concern"},{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"},{value:"none",label:"None"}],onChange:B(f)}),l.jsxs("div",{role:"search","aria-label":"Filter interviews",className:"grid grid-cols-2 gap-2 sm:grid-cols-4 lg:grid-cols-[minmax(0,1.2fr)_minmax(0,1.2fr)_minmax(0,1.4fr)_6rem_6rem_auto] lg:items-end",children:[l.jsx(hv,{label:"Candidate",className:"col-span-2 sm:col-span-2 lg:col-span-1",type:"search",placeholder:"Name containsâ¦",value:h,onChange:I(p)}),l.jsx(hv,{label:"Job",className:"col-span-2 sm:col-span-2 lg:col-span-1",type:"search",placeholder:"Title containsâ¦",value:m,onChange:I(g)}),l.jsxs("label",{className:"col-span-2 flex min-w-0 flex-col gap-1 sm:col-span-2 lg:col-span-1",children:[l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i==="integrity"?"Signal":"Problem"}),l.jsxs(ho,{value:y,onValueChange:B(b),children:[l.jsx(Mi,{className:"h-9","aria-label":i==="integrity"?"Signal":"Problem",children:l.jsx(po,{})}),l.jsxs($i,{children:[l.jsx(Nt,{value:"all",children:i==="integrity"?"Any signal":"Any problem"}),i6e(i).map(U=>l.jsx(Nt,{value:U.value,children:U.label},U.value))]})]})]}),l.jsx(hv,{label:"Candidate score from",type:"number",inputMode:"decimal",placeholder:"Min",value:x,onChange:I(w)}),l.jsx(hv,{label:"to",type:"number",inputMode:"decimal",placeholder:"Max",value:S,onChange:I(_)}),l.jsx(G,{variant:"ghost",size:"sm",className:"col-span-2 h-9 sm:col-span-4 lg:col-span-1",onClick:ge,disabled:!de,children:"Clear filters"})]})]}),T?l.jsx(Fn,{}):M?l.jsxs(Ce,{className:"rounded-2xl p-6 text-destructive",children:["Failed to load: ",M.message]}):!te||!F?null:l.jsxs(l.Fragment,{children:[l.jsx(c6e,{bucket:i,summary:te,qaWindow:e,onPickCheck:U=>{b(U),E(0)}}),l.jsxs(Ce,{className:"overflow-hidden rounded-2xl border border-border shadow-sm",children:[F.results.length===0?l.jsx("div",{className:"p-6 text-muted-foreground",children:de?"No interviews match these filters.":"No checked interviews in this window."}):l.jsx(k6e,{bucket:i,rows:F.results,onOpen:N}),l.jsxs("div",{className:"flex items-center justify-between border-t border-border p-3 text-sm text-muted-foreground",children:[l.jsxs("span",{children:["Page ",j+1]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(G,{variant:"outline",size:"sm",disabled:j===0,onClick:()=>E(U=>U-1),children:"Previous"}),l.jsx(G,{variant:"outline",size:"sm",disabled:F.results.length<GS,onClick:()=>E(U=>U+1),children:"Next"})]})]})]})]}),l.jsx(D0,{open:!!C,onClose:()=>N(null),title:"Interview QA detail",description:"Each check with the evidence behind it.",sheetClassName:"sm:max-w-2xl",children:C&&l.jsx(h6e,{interviewId:C,initialBucket:i,disabledReason:S3},C)})]})}const D6e=Wi("/super-admin/interview-qa")({component:$6e}),L6e=Object.freeze(Object.defineProperty({__proto__:null,Route:D6e},Symbol.toStringTag,{value:"Module"})),cR={1:"Free app, auto-apply not included",2:"Free app including auto-apply"};function nu(e){if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"})}function rut(e){const t=e.includes_auto_apply?"Auto-apply included.":"Auto-apply not included.";return`Free access from ${e.code_label} until ${nu(e.ends_at)}. ${t}`}function F6e(e,t=window.location.origin){return`${t}/redeem?code=${encodeURIComponent(e)}`}function dN(e,t="usd"){return new Intl.NumberFormat("en-GB",{style:"currency",currency:t.toUpperCase(),maximumFractionDigits:0}).format(e/100)}function B6e(e){return e.split(/[\s,;]+/).map(t=>
713t.trim().replace(/^[@.]+/,"").toLowerCase()).filter(Boolean)}function U6e(e){return e.trim().toUpperCase().replace(/[\s_]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function iut(e){const t=e;if(t?.response?.status===429)return"Too many attempts. Wait a while and try again.";switch(t?.response?.data?.reason){case"INVALID":return"That code is not valid. Check it and try again.";case"DEACTIVATED":return"This code is no longer active.";case"EXPIRED":return"This code has expired.";case"MAX_REACHED":return"This code has been used the maximum number of times.";case"DOMAIN_NOT_ALLOWED":return t.response?.data?.message||"This code is for a different email domain.";case"ALREADY_ACTIVE":return"You already have free access from a promo code.";case"ALREADY_REDEEMED":return"You have already used this code.";case"FOUNDER_CODES_DISABLED":return"Promo codes are not available.";default:return"We could not redeem the code. Try again shortly."}}function Ih(e){const t=e;return t?.response?.data?.message||t?.response?.data?.error||e?.message||"Something went wrong."}const F0=["super-admin","founder-codes"];function z6e(){const e=q();return ue({queryKey:[...F0,"list"],queryFn:async()=>(await Se.get("/super-admin/founder-codes",{headers:e})).data,staleTime:1e3*15,retry:!1})}function V6e(e){const t=q();return ue({queryKey:[...F0,"detail",e],enabled:!!e,queryFn:async()=>(await Se.get(`/super-admin/founder-codes/${e}`,{headers:t})).data,staleTime:1e3*15,retry:!1})}function q6e(e){const t=q();return ue({queryKey:[...F0,"redemptions",e],enabled:!!e,queryFn:async()=>(await Se.get(`/super-admin/founder-codes/${e}/redemptions`,{headers:t})).data.redemptions??[],staleTime:1e3*15,retry:!1})}function B0(){const e=oe();return()=>{e.invalidateQueries({queryKey:F0}),e.invalidateQueries({queryKey:["super-admin","audit"]})}}function K6e(){const e=q(),t=B0();return ie({mutationFn:async n=>(await Se.post("/super-admin/founder-codes",n,{headers:e})).data,onSuccess:t})}function W6e(e){const t=q(),n=B0();return ie({mutationFn:async r=>(await Se.patch(`/super-admin/founder-codes/${e}`,r,{headers:t})).data,onSuccess:n})}function H6e(e){const t=q(),n=B0();return ie({mutationFn:async r=>(await Se.post(`/super-admin/founder-codes/${e}/${r}`,{},{headers:t})).data,onSuccess:n})}function G6e(){const e=q(),t=B0();return ie({mutationFn:async n=>(await Se.post(`/super-admin/founder-grants/${n}/revoke`,{},{headers:e})).data,onSuccess:t})}function Y6e(){const e=q();return ie({mutationFn:async({codeId:t,code:n})=>{const r=await Se.get(`/super-admin/founder-codes/${t}/redemptions.csv`,{headers:e,responseType:"blob"}),i=URL.createObjectURL(r.data),o=document.createElement("a");o.href=i,o.download=`founder-code-${n.toLowerCase()}-redemptions.csv`,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(i)}})}const cQ=["candidate","founder-access"];function out(e=!0){const t=q();return ue({queryKey:cQ,enabled:e,queryFn:async()=>(await ee.get("/candidate/founder-access",{headers:t})).data,staleTime:1e3*60,retry:!1})}function sut(){const e=q(),t=oe();return ie({mutationFn:async n=>(await ee.post("/candidate/founder-access/redeem",{code:U6e(n)},{headers:e})).data.founder_access,onSuccess:()=>{t.invalidateQueries({queryKey:cQ}),t.invalidateQueries({queryKey:["candidate-billing-status"]})}})}function Q6e(e=[],t,n={}){const[r,i]=v.useState(n),[o,s]=v.useState({}),a=(g,y)=>{i(b=>typeof y=="function"?{...b,[g]:y(b[g])}:{...b,[g]:y})},c=g=>{s(({...y})=>(delete y[g],y))},u=(g,y)=>{s(b=>({...b,[g]:y}))},d=g=>{const{name:y,value:b}=g.target;i(x=>({...x,[y]:b}))},f=g=>{const{name:y}=g.target;c(y)},h=v.useMemo(()=>e.map(g=>({...g,onChange:d,onFocus:f,value:r[g.name],error:o[g.name.toString()]})),[e,r,o]);return{validate:()=>{const g=t.safeParse(r);if(g.success)return s({}),{success:!0,data:g.data};const y={},b=g.error.formErrors.fieldErrors;for(const[x,w]of Object.entries(b)){const S=w?.[0];S&&(y[x]=S)}return s(y),{errors:y,success:!1}},handleChange:d,handleFocus:f,components:h,values:r,setFieldValue:a,errors:o,removeError:c,reset:()=>{i(n),s({})},setValues:i,setError:u,setErrors:s}}const uQ=v.forwardRef(({className:e,label:t,error:n,...r},i)=>l.jsxs("div",{className:"w-full",children:[l.jsx("textarea",{className:K("flex min-h-[80px] w-full rounded-md border bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n?"border-destructive focus-visible:ring-destructive":"border-input",e),ref:i,...r}),n&&l.jsx("div",{className:"text-destructive text-[10px] pt-1 pl-2",children:n})]}));uQ.displayName="Textarea";var Je;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const s of i)o[s]=s;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(const a of o)s[a]=i[a];return e.objectValues(s)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},e.find=(i,o)=>{for(const s of i)if(o(s))return s},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(Je||(Je={}));var fN;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(fN||(fN={}));const ve=Je.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),oa=e=>{switch(typeof e){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return isNaN(e)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(e)?ve.array:e===null?ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ve.promise:typeof Map<"u"&&e instanceof Map?ve.map:typeof Set<"u"&&e instanceof Set?ve.set:typeof Date<"u"&&e instanceof Date?ve.date:ve.object;default:return ve.unknown}}
vendor: 4,648 bytes, line 713
713,ce=Je.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),J6e=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Mr extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,c=0;for(;c<s.path.length;){const u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return i(this),r}static assert(t){if(!(t instanceof Mr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Je.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Mr.create=e=>new Mr(e);const xd=(e,t)=>{let n;switch(e.code){case ce.invalid_type:e.received===ve.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ce.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Je.jsonStringifyReplacer)}`;break;case ce.unrecognized_keys:n=`Unrecognized key(s) in object: ${Je.joinValues(e.keys,", ")}`;break;case ce.invalid_union:n="Invalid input";break;case ce.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Je.joinValues(e.options)}`;break;case ce.invalid_enum_value:n=`Invalid enum value. Expected ${Je.joinValues(e.options)}, received '${e.received}'`;break;case ce.invalid_arguments:n="Invalid function arguments";break;case ce.invalid_return_type:n="Invalid function return type";break;case ce.invalid_date:n="Invalid date";break;case ce.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Je.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ce.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ce.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ce.custom:n="Invalid input";break;case ce.invalid_intersection_types:n="Intersection results could not be merged";break;case ce.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ce.not_finite:n="Number must be finite";break;default:n=t.defaultError,Je.assertNever(e)}return{message:n}};let dQ=xd;function X6e(e){dQ=e}function ib(){return dQ}const ob=e=>
vendor: 5,713 bytes, line 713
713{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)a=u(s,{data:t,defaultError:a}).message;return{...i,path:o,message:a}},Z6e=[];function me(e,t){const n=ib(),r=ob({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===xd?void 0:xd].filter(i=>!!i)});e.common.issues.push(r)}class Bn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Ae;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,s=await i.value;r.push({key:o,value:s})}return Bn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return Ae;o.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(r[o.value]=s.value)}return{status:t.value,value:r}}}const Ae=Object.freeze({status:"aborted"}),ru=e=>({status:"dirty",value:e}),Jn=e=>({status:"valid",value:e}),hN=e=>e.status==="aborted",pN=e=>e.status==="dirty",Zp=e=>e.status==="valid",em=e=>typeof Promise<"u"&&e instanceof Promise;function sb(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function fQ(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var je;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(je||(je={}));var lh,ch;class jo{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const j3=(e,t)=>{if(Zp(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Mr(e.common.issues);return this._error=n,this._error}}};function Me(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(s,a)=>{var c,u;const{message:d}=e;return s.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(c=d??r)!==null&&c!==void 0?c:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:a.defaultError}},description:i}}class Fe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return oa(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:oa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Bn,ctx:{common:t.parent.common,data:t.data,parsedType:oa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(em(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:oa(t)},o=this._parseSync({data:t,path:i.path,parent:i});return j3(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:oa(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(em(i)?i:Promise.resolve(i));return j3(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const s=t(i),a=()=>o.addIssue({code:ce.custom,...r(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,i)=>
vendor: 3,041 bytes, line 713
713t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Vi({schema:this,typeName:Pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return vo.create(this,this._def)}nullable(){return Ia.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Di.create(this,this._def)}promise(){return wd.create(this,this._def)}or(t){return im.create([this,t],this._def)}and(t){return om.create(this,t,this._def)}transform(t){return new Vi({...Me(this._def),schema:this,typeName:Pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new um({...Me(this._def),innerType:this,defaultValue:n,typeName:Pe.ZodDefault})}brand(){return new uR({typeName:Pe.ZodBranded,type:this,...Me(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new dm({...Me(this._def),innerType:this,catchValue:n,typeName:Pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return tg.create(this,t)}readonly(){return fm.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const e8e=/^c[^\s-]{8,}$/i,t8e=/^[0-9a-z]+$/,n8e=/^[0-9A-HJKMNP-TV-Z]{26}$/,r8e=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,i8e=/^[a-z0-9_-]{21}$/i,o8e=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,s8e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,a8e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let YS;const l8e=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,c8e=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,u8e=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,hQ="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",d8e=new RegExp(`^${hQ}$`);function pQ(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function f8e(e){return new RegExp(`^${pQ(e)}$`)}function mQ(e){let t=`${hQ}T${pQ(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}
vendor: 6,465 bytes, line 713
713function h8e(e,t){return!!((t==="v4"||!t)&&l8e.test(e)||(t==="v6"||!t)&&c8e.test(e))}class Ri extends Fe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ve.string){const o=this._getOrReturnCtx(t);return me(o,{code:ce.invalid_type,expected:ve.string,received:o.parsedType}),Ae}const r=new Bn;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ce.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ce.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const s=t.data.length>o.value,a=t.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(t,i),s?me(i,{code:ce.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&me(i,{code:ce.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")s8e.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"email",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")YS||(YS=new RegExp(a8e,"u")),YS.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"emoji",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")r8e.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"uuid",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")i8e.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"nanoid",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")e8e.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")t8e.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid2",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")n8e.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ulid",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),me(i,{validation:"url",code:ce.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"regex",code:ce.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),me(i,{code:ce.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:ce.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:ce.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?mQ(o).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:ce.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?d8e.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:ce.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?f8e(o).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:ce.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?o8e.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"duration",code:ce.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?h8e(t.data,o.version)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ip",code:ce.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?u8e.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"base64",code:ce.invalid_string,message:o.message}),r.dirty()):Je.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:ce.invalid_string,...je.errToObj(r)})}_addCheck(t){return new Ri({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...je.errToObj(t)})}url(t){return this._addCheck({kind:"url",...je.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...je.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...je.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...je.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...je.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...je.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...je.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...je.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...je.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,local:(r=t?.local)!==null&&r!==void 0?r:!1,...je.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...je.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...je.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...je.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...je.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...je.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...je.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...je.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...je.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...je.errToObj(n)})}nonempty(t){return this.min(1,je.errToObj(t))}trim(){return new Ri({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ri({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ri({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}
vendor: 1,398 bytes, line 713
713get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ri.create=e=>{var t;return new Ri({checks:[],typeName:Pe.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};function p8e(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),s=parseInt(t.toFixed(i).replace(".",""));
vendor: 4,616 bytes, line 713
713return o%s/Math.pow(10,i)}class Ta extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ve.number){const o=this._getOrReturnCtx(t);return me(o,{code:ce.invalid_type,expected:ve.number,received:o.parsedType}),Ae}let r;const i=new Bn;for(const o of this._def.checks)o.kind==="int"?Je.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:ce.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:ce.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:ce.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?p8e(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),me(r,{code:ce.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:ce.not_finite,message:o.message}),i.dirty()):Je.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,je.toString(n))}gt(t,n){return this.setLimit("min",t,!1,je.toString(n))}lte(t,n){return this.setLimit("max",t,!0,je.toString(n))}lt(t,n){return this.setLimit("max",t,!1,je.toString(n))}setLimit(t,n,r,i){return new Ta({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:je.toString(i)}]})}_addCheck(t){return new Ta({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:je.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:je.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:je.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:je.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:je.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:je.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:je.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:je.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:je.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Je.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Ta.create=e=>new Ta({checks:[],typeName:Pe.ZodNumber,coerce:e?.coerce||!1,...Me(e)});class Ra extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ve.bigint){const o=this._getOrReturnCtx(t);return me(o,{code:ce.invalid_type,expected:ve.bigint,received:o.parsedType}),Ae}let r;const i=new Bn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:ce.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:ce.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),me(r,{code:ce.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Je.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,je.toString(n))}gt(t,n){return this.setLimit("min",t,!1,je.toString(n))}lte(t,n){return this.setLimit("max",t,!0,je.toString(n))}lt(t,n){return this.setLimit("max",t,!1,je.toString(n))}setLimit(t,n,r,i){return new Ra({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:je.toString(i)}]})}_addCheck(t){return new Ra({...this._def,checks:[...this._def.checks,t]})}
vendor: 27,788 bytes, line 713
713positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:je.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:je.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:je.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:je.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:je.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ra.create=e=>{var t;return new Ra({checks:[],typeName:Pe.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};class tm extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ve.boolean){const r=this._getOrReturnCtx(t);return me(r,{code:ce.invalid_type,expected:ve.boolean,received:r.parsedType}),Ae}return Jn(t.data)}}tm.create=e=>new tm({typeName:Pe.ZodBoolean,coerce:e?.coerce||!1,...Me(e)});class ec extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ve.date){const o=this._getOrReturnCtx(t);return me(o,{code:ce.invalid_type,expected:ve.date,received:o.parsedType}),Ae}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return me(o,{code:ce.invalid_date}),Ae}const r=new Bn;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ce.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ce.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Je.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ec({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:je.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:je.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ec.create=e=>new ec({checks:[],coerce:e?.coerce||!1,typeName:Pe.ZodDate,...Me(e)});class ab extends Fe{_parse(t){if(this._getType(t)!==ve.symbol){const r=this._getOrReturnCtx(t);return me(r,{code:ce.invalid_type,expected:ve.symbol,received:r.parsedType}),Ae}return Jn(t.data)}}ab.create=e=>new ab({typeName:Pe.ZodSymbol,...Me(e)});class nm extends Fe{_parse(t){if(this._getType(t)!==ve.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:ce.invalid_type,expected:ve.undefined,received:r.parsedType}),Ae}return Jn(t.data)}}nm.create=e=>new nm({typeName:Pe.ZodUndefined,...Me(e)});class rm extends Fe{_parse(t){if(this._getType(t)!==ve.null){const r=this._getOrReturnCtx(t);return me(r,{code:ce.invalid_type,expected:ve.null,received:r.parsedType}),Ae}return Jn(t.data)}}rm.create=e=>new rm({typeName:Pe.ZodNull,...Me(e)});class bd extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Jn(t.data)}}bd.create=e=>new bd({typeName:Pe.ZodAny,...Me(e)});class Ml extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Jn(t.data)}}Ml.create=e=>new Ml({typeName:Pe.ZodUnknown,...Me(e)});class Es extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return me(n,{code:ce.invalid_type,expected:ve.never,received:n.parsedType}),Ae}}Es.create=e=>new Es({typeName:Pe.ZodNever,...Me(e)});class lb extends Fe{_parse(t){if(this._getType(t)!==ve.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:ce.invalid_type,expected:ve.void,received:r.parsedType}),Ae}return Jn(t.data)}}lb.create=e=>new lb({typeName:Pe.ZodVoid,...Me(e)});class Di extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ve.array)return me(n,{code:ce.invalid_type,expected:ve.array,received:n.parsedType}),Ae;if(i.exactLength!==null){const s=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(s||a)&&(me(n,{code:s?ce.too_big:ce.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(me(n,{code:ce.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(me(n,{code:ce.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>i.type._parseAsync(new jo(n,s,n.path,a)))).then(s=>Bn.mergeArray(r,s));const o=[...n.data].map((s,a)=>i.type._parseSync(new jo(n,s,n.path,a)));return Bn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Di({...this._def,minLength:{value:t,message:je.toString(n)}})}max(t,n){return new Di({...this._def,maxLength:{value:t,message:je.toString(n)}})}length(t,n){return new Di({...this._def,exactLength:{value:t,message:je.toString(n)}})}nonempty(t){return this.min(1,t)}}Di.create=(e,t)=>new Di({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Pe.ZodArray,...Me(t)});function Dc(e){if(e instanceof Mt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=vo.create(Dc(r))}return new Mt({...e._def,shape:()=>t})}else return e instanceof Di?new Di({...e._def,type:Dc(e.element)}):e instanceof vo?vo.create(Dc(e.unwrap())):e instanceof Ia?Ia.create(Dc(e.unwrap())):e instanceof Eo?Eo.create(e.items.map(t=>Dc(t))):e}class Mt extends Fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Je.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ve.object){const u=this._getOrReturnCtx(t);return me(u,{code:ce.invalid_type,expected:ve.object,received:u.parsedType}),Ae}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Es&&this._def.unknownKeys==="strip"))for(const u in i.data)s.includes(u)||a.push(u);const c=[];for(const u of s){const d=o[u],f=i.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new jo(i,f,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Es){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)c.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(u==="strict")a.length>0&&(me(i,{code:ce.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const f=i.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new jo(i,f,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const f=await d.key,h=await d.value;u.push({key:f,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>Bn.mergeObjectSync(r,u)):Bn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return je.errToObj,new Mt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,s,a;const c=(s=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=je.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new Mt({...this._def,unknownKeys:"strip"})}passthrough(){return new Mt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Mt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Mt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Mt({...this._def,catchall:t})}pick(t){const n={};return Je.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Mt({...this._def,shape:()=>n})}omit(t){const n={};return Je.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Mt({...this._def,shape:()=>n})}deepPartial(){return Dc(this)}partial(t){const n={};return Je.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Mt({...this._def,shape:()=>n})}required(t){const n={};return Je.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof vo;)o=o._def.innerType;n[r]=o}}),new Mt({...this._def,shape:()=>n})}keyof(){return gQ(Je.objectKeys(this.shape))}}Mt.create=(e,t)=>new Mt({shape:()=>e,unknownKeys:"strip",catchall:Es.create(),typeName:Pe.ZodObject,...Me(t)});Mt.strictCreate=(e,t)=>new Mt({shape:()=>e,unknownKeys:"strict",catchall:Es.create(),typeName:Pe.ZodObject,...Me(t)});Mt.lazycreate=(e,t)=>new Mt({shape:e,unknownKeys:"strip",catchall:Es.create(),typeName:Pe.ZodObject,...Me(t)});class im extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(a=>new Mr(a.ctx.common.issues));return me(n,{code:ce.invalid_union,unionErrors:s}),Ae}if(n.common.async)return Promise.all(r.map(async o=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let o;const s=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(c=>new Mr(c));return me(n,{code:ce.invalid_union,unionErrors:a}),Ae}}get options(){return this._def.options}}im.create=(e,t)=>new im({options:e,typeName:Pe.ZodUnion,...Me(t)});const Bo=e=>e instanceof am?Bo(e.schema):e instanceof Vi?Bo(e.innerType()):e instanceof lm?[e.value]:e instanceof Oa?e.options:e instanceof cm?Je.objectValues(e.enum):e instanceof um?Bo(e._def.innerType):e instanceof nm?[void 0]:e instanceof rm?[null]:e instanceof vo?[void 0,...Bo(e.unwrap())]:e instanceof Ia?[null,...Bo(e.unwrap())]:e instanceof uR||e instanceof fm?Bo(e.unwrap()):e instanceof dm?Bo(e._def.innerType):[];class U0 extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.object)return me(n,{code:ce.invalid_type,expected:ve.object,received:n.parsedType}),Ae;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(me(n,{code:ce.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ae)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const s=Bo(o.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of s){if(i.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);i.set(a,o)}}return new U0({typeName:Pe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Me(r)})}}function mN(e,t){const n=oa(e),r=oa(t);if(e===t)return{valid:!0,data:e};if(n===ve.object&&r===ve.object){const i=Je.objectKeys(t),o=Je.objectKeys(e).filter(a=>i.indexOf(a)!==-1),s={...e,...t};for(const a of o){const c=mN(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(n===ve.array&&r===ve.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const s=e[o],a=t[o],c=mN(s,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===ve.date&&r===ve.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class om extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,s)=>{if(hN(o)||hN(s))return Ae;const a=mN(o.value,s.value);return a.valid?((pN(o)||pN(s))&&n.dirty(),{status:n.value,value:a.data}):(me(r,{code:ce.invalid_intersection_types}),Ae)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}om.create=(e,t,n)=>new om({left:e,right:t,typeName:Pe.ZodIntersection,...Me(n)});class Eo extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.array)return me(r,{code:ce.invalid_type,expected:ve.array,received:r.parsedType}),Ae;if(r.data.length<this._def.items.length)return me(r,{code:ce.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ae;!this._def.rest&&r.data.length>this._def.items.length&&(me(r,{code:ce.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((s,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new jo(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(o).then(s=>Bn.mergeArray(n,s)):Bn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Eo({...this._def,rest:t})}}Eo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Eo({items:e,typeName:Pe.ZodTuple,rest:null,...Me(t)})};class sm extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.object)return me(r,{code:ce.invalid_type,expected:ve.object,received:r.parsedType}),Ae;const i=[],o=this._def.keyType,s=this._def.valueType;for(const a in r.data)i.push({key:o._parse(new jo(r,a,r.path,a)),value:s._parse(new jo(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Bn.mergeObjectAsync(n,i):Bn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Fe?new sm({keyType:t,valueType:n,typeName:Pe.ZodRecord,...Me(r)}):new sm({keyType:Ri.create(),valueType:t,typeName:Pe.ZodRecord,...Me(n)})}}class cb extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.map)return me(r,{code:ce.invalid_type,expected:ve.map,received:r.parsedType}),Ae;const i=this._def.keyType,o=this._def.valueType,s=[...r.data.entries()].map(([a,c],u)=>({key:i._parse(new jo(r,a,r.path,[u,"key"])),value:o._parse(new jo(r,c,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of s){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return Ae;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of s){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return Ae;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}}}}cb.create=(e,t,n)=>new cb({valueType:t,keyType:e,typeName:Pe.ZodMap,...Me(n)});class tc extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.set)return me(r,{code:ce.invalid_type,expected:ve.set,received:r.parsedType}),Ae;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(me(r,{code:ce.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(me(r,{code:ce.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function s(c){const u=new Set;for(const d of c){if(d.status==="aborted")return Ae;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((c,u)=>o._parse(new jo(r,c,r.path,u)));return r.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,n){return new tc({...this._def,minSize:{value:t,message:je.toString(n)}})}max(t,n){return new tc({...this._def,maxSize:{value:t,message:je.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}tc.create=(e,t)=>new tc({valueType:e,minSize:null,maxSize:null,typeName:Pe.ZodSet,...Me(t)});class Pu extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.function)return me(n,{code:ce.invalid_type,expected:ve.function,received:n.parsedType}),Ae;function r(a,c){return ob({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ib(),xd].filter(u=>!!u),issueData:{code:ce.invalid_arguments,argumentsError:c}})}function i(a,c){return ob({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ib(),xd].filter(u=>!!u),issueData:{code:ce.invalid_return_type,returnTypeError:c}})}const o={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof wd){const a=this;return Jn(async function(...c){const u=new Mr([]),d=await a._def.args.parseAsync(c,o).catch(p=>{throw u.addIssue(r(c,p)),u}),f=await Reflect.apply(s,this,d);return await a._def.returns._def.type.parseAsync(f,o).catch(p=>{throw u.addIssue(i(f,p)),u})})}else{const a=this;return Jn(function(...c){const u=a._def.args.safeParse(c,o);if(!u.success)throw new Mr([r(c,u.error)]);const d=Reflect.apply(s,this,u.data),f=a._def.returns.safeParse(d,o);if(!f.success)throw new Mr([i(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Pu({...this._def,args:Eo.create(t).rest(Ml.create())})}returns(t){return new Pu({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Pu({args:t||Eo.create([]).rest(Ml.create()),returns:n||Ml.create(),typeName:Pe.ZodFunction,...Me(r)})}}class am extends Fe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}am.create=(e,t)=>new am({getter:e,typeName:Pe.ZodLazy,...Me(t)});class lm extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return me(n,{received:n.data,code:ce.invalid_literal,expected:this._def.value}),Ae}return{status:"valid",value:t.data}}get value(){return this._def.value}}lm.create=(e,t)=>new lm({value:e,typeName:Pe.ZodLiteral,...Me(t)});function gQ(e,t){return new Oa({values:e,typeName:Pe.ZodEnum,...Me(t)})}class Oa extends Fe{constructor(){super(...arguments),lh.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{expected:Je.joinValues(r),received:n.parsedType,code:ce.invalid_type}),Ae}if(sb(this,lh)||fQ(this,lh,new Set(this._def.values)),!sb(this,lh).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{received:n.data,code:ce.invalid_enum_value,options:r}),Ae}return Jn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Oa.create(t,{...this._def,...n})}exclude(t,n=this._def){return Oa.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}lh=new WeakMap;Oa.create=gQ;class cm extends Fe{constructor(){super(...arguments),ch.set(this,void 0)}_parse(t){const n=Je.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ve.string&&r.parsedType!==ve.number){const i=Je.objectValues(n);return me(r,{expected:Je.joinValues(i),received:r.parsedType,code:ce.invalid_type}),Ae}if(sb(this,ch)||fQ(this,ch,new Set(Je.getValidEnumValues(this._def.values))),!sb(this,ch).has(t.data)){const i=Je.objectValues(n);return me(r,{received:r.data,code:ce.invalid_enum_value,options:i}),Ae}return Jn(t.data)}get enum(){return this._def.values}}ch=new WeakMap;cm.create=(e,t)=>new cm({values:e,typeName:Pe.ZodNativeEnum,...Me(t)});class wd extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.promise&&n.common.async===!1)return me(n,{code:ce.invalid_type,expected:ve.promise,received:n.parsedType}),Ae;const r=n.parsedType===ve.promise?n.data:Promise.resolve(n.data);return Jn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}wd.create=(e,t)=>new wd({type:e,typeName:Pe.ZodPromise,...Me(t)});class Vi extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:s=>{me(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const s=i.transform(r.data,o);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return Ae;const c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?Ae:c.status==="dirty"||n.value==="dirty"?ru(c.value):c});{if(n.value==="aborted")return Ae;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?Ae:a.status==="dirty"||n.value==="dirty"?ru(a.value):a}}if(i.type==="refinement"){const s=a=>{const c=i.refinement(a,o);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ae:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?Ae:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Zp(s))return s;const a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Zp(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:n.value,value:a})):s);Je.assertNever(i)}}Vi.create=(e,t,n)=>new Vi({schema:e,typeName:Pe.ZodEffects,effect:t,...Me(n)});Vi.createWithPreprocess=(e,t,n)=>new Vi({schema:t,effect:{type:"preprocess",transform:e},typeName:Pe.ZodEffects,...Me(n)});class vo extends Fe{_parse(t){return this._getType(t)===ve.undefined?Jn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}vo.create=(e,t)=>new vo({innerType:e,typeName:Pe.ZodOptional,...Me(t)});class Ia extends Fe{_parse(t){return this._getType(t)===ve.null?Jn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ia.create=(e,t)=>new Ia({innerType:e,typeName:Pe.ZodNullable,...Me(t)});class um extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ve.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}um.create=(e,t)=>new um({innerType:e,typeName:Pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Me(t)});class dm extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return em(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Mr(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Mr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}dm.create=(e,t)=>new dm({innerType:e,typeName:Pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Me(t)});class ub extends Fe{_parse(t){if(this._getType(t)!==ve.nan){const r=this._getOrReturnCtx(t);return me(r,{code:ce.invalid_type,expected:ve.nan,received:r.parsedType}),Ae}return{status:"valid",value:t.data}}}ub.create=e=>new ub({typeName:Pe.ZodNaN,...Me(e)});const m8e=Symbol("zod_brand");class uR extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class tg extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ae:o.status==="dirty"?(n.dirty(),ru(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ae:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new tg({in:t,out:n,typeName:Pe.ZodPipeline})}}class fm extends Fe{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Zp(i)&&(i.value=Object.freeze(i.value)),i);return em(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}fm.create=(e,t)=>new fm({innerType:e,typeName:Pe.ZodReadonly,...Me(t)});function vQ(e,t={},n){return e?bd.create().superRefine((r,i)=>{var o,s;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(s=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&s!==void 0?s:!0,u=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...u,fatal:c})}}):bd.create()}const g8e={object:Mt.lazycreate};var Pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Pe||(Pe={}));const v8e=(e,t={message:`Input not instance of ${e.name}`})=>vQ(n=>
713n instanceof e,t),yQ=Ri.create,xQ=Ta.create,y8e=ub.create,x8e=Ra.create,bQ=tm.create,b8e=ec.create,w8e=ab.create,_8e=nm.create,S8e=rm.create,j8e=bd.create,E8e=Ml.create,C8e=Es.create,N8e=lb.create,P8e=Di.create,k8e=Mt.create,A8e=Mt.strictCreate,T8e=im.create,R8e=U0.create,O8e=om.create,I8e=Eo.create,M8e=sm.create,$8e=cb.create,D8e=tc.create,L8e=Pu.create,F8e=am.create,B8e=lm.create,U8e=Oa.create,z8e=cm.create,V8e=wd.create,E3=Vi.create,q8e=vo.create,K8e=Ia.create,W8e=Vi.createWithPreprocess,H8e=tg.create,G8e=()=>yQ().optional(),Y8e=()=>xQ().optional(),Q8e=()=>bQ().optional(),J8e={string:e=>Ri.create({...e,coerce:!0}),number:e=>Ta.create({...e,coerce:!0}),boolean:e=>tm.create({...e,coerce:!0}),bigint:e=>Ra.create({...e,coerce:!0}),date:e=>ec.create({...e,coerce:!0})},X8e=Ae;var qs=Object.freeze({__proto__:null,defaultErrorMap:xd,setErrorMap:X6e,getErrorMap:ib,makeIssue:ob,EMPTY_PATH:Z6e,addIssueToContext:me,ParseStatus:Bn,INVALID:Ae,DIRTY:ru,OK:Jn,isAborted:hN,isDirty:pN,isValid:Zp,isAsync:em,get util(){return Je},get objectUtil(){return fN},ZodParsedType:ve,getParsedType:oa,ZodType:Fe,datetimeRegex:mQ,ZodString:Ri,ZodNumber:Ta,ZodBigInt:Ra,ZodBoolean:tm,ZodDate:ec,ZodSymbol:ab,ZodUndefined:nm,ZodNull:rm,ZodAny:bd,ZodUnknown:Ml,ZodNever:Es,ZodVoid:lb,ZodArray:Di,ZodObject:Mt,ZodUnion:im,ZodDiscriminatedUnion:U0,ZodIntersection:om,ZodTuple:Eo,ZodRecord:sm,ZodMap:cb,ZodSet:tc,ZodFunction:Pu,ZodLazy:am,ZodLiteral:lm,ZodEnum:Oa,ZodNativeEnum:cm,ZodPromise:wd,ZodEffects:Vi,ZodTransformer:Vi,ZodOptional:vo,ZodNullable:Ia,ZodDefault:um,ZodCatch:dm,ZodNaN:ub,BRAND:m8e,ZodBranded:uR,ZodPipeline:tg,ZodReadonly:fm,custom:vQ,Schema:Fe,ZodSchema:Fe,late:g8e,get ZodFirstPartyTypeKind(){return Pe},coerce:J8e,any:j8e,array:P8e,bigint:x8e,boolean:bQ,date:b8e,discriminatedUnion:R8e,effect:E3,enum:U8e,function:L8e,instanceof:v8e,intersection:O8e,lazy:F8e,literal:B8e,map:$8e,nan:y8e,nativeEnum:z8e,never:C8e,null:S8e,nullable:K8e,number:xQ,object:k8e,oboolean:Q8e,onumber:Y8e,optional:q8e,ostring:G8e,pipeline:H8e,preprocess:W8e,promise:V8e,record:M8e,set:D8e,strictObject:A8e,string:yQ,symbol:w8e,transformer:E3,tuple:I8e,undefined:_8e,union:T8e,unknown:E8e,void:N8e,NEVER:X8e,ZodIssueCode:ce,quotelessJson:J6e,ZodError:Mr});const C3=e=>qs.string().trim().refine(t=>t===""||/^\d+$/.test(t)&&Number(t)>=1&&(e===void 0||Number(t)<=e),{message:e?`Enter a whole number from 1 to ${e}`:"Enter a whole number of 1 or more"}),Z8e=qs.object({label:qs.string().trim().min(1,"Enter a label").max(200,"Keep the label under 200 characters"),type:qs.enum(["1","2"],{message:"Choose what the code gives"}),duration_months:C3(24).refine(e=>e!=="",{message:"Enter the number of months"}),max_redemptions:C3(),redeem_by:qs.string().trim().refine(e=>e===""||/^\d{4}-\d{2}-\d{2}$/.test(e),{message:"Pick a date"}),allowed_domains:qs.string(),code:qs.string().trim().refine(e=>e===""||/^[A-Za-z0-9]+([-_ ][A-Za-z0-9]+)*$/.test(e),{message:"Use letters, numbers and hyphens"}).refine(e=>e===""||e.length>=4&&e.length<=40,{message:"Use 4 to 40 characters"}),notes:qs.string().max(2e3,"Keep notes under 2,000 characters")});function eGe(e){return{label:e?.label??"",type:e?String(e.type):"1",duration_months:String(e?.duration_months??3),max_redemptions:e?.max_redemptions?String(e.max_redemptions):"",redeem_by:e?.redeem_by?e.redeem_by.slice(0,10):"",allowed_domains:e?.allowed_domains?.join(", ")??"",code:"",notes:e?.notes??""}}function tGe(e,t){return{label:e.label.trim(),type:t?void 0:Number(e.type),code:t?void 0:e.code.trim()||void 0,duration_months:Number(e.duration_months),max_redemptions:e.max_redemptions?Number(e.max_redemptions):null,redeem_by:e.redeem_by||null,allowed_domains:B6e(e.allowed_domains),notes:e.notes.trim()}}function nGe(e,t){if(e.kind==="revoke")return{title:"Revoke this person's access?",message:`${e.redemption.user_email||"This person"} loses free access now. Everyone else who used ${t.code} keeps theirs.`,confirmText:"Revoke access"};switch(e.action){case"deactivate":return{title:`Deactivate ${t.code}?`,message:`Everyone who used this code loses free access now (${t.stats.active_now} active). Nobody new can redeem it. You can reactivate it later.`,confirmText:"Deactivate"};case"reactivate":return{title:`Reactivate ${t.code}?`,message:"People can redeem this code again. Anyone who lost access when it was deactivated stays without it until you choose Restore access.",confirmText:"Reactivate"};default:return{title:"Restore access?",message:"Everyone who lost access when this code was deactivated gets it back, until their original end date. People whose end date has passed, or who were revoked one by one, stay without it.",confirmText:"Restore access"}}}function wQ({existing:e,onSuccess:t,onCancel:n}){const r=!!e,i=K6e(),o=W6e(e?.code_id??""),s=i.isPending||o.isPending,{values:a,errors:c,setFieldValue:u,removeError:d,validate:f}=Q6e([],Z8e,eGe(e)),h=m=>({name:m,value:a[m]??"",error:c[m],onChange:g=>{d(m),u(m,g.target.value)}}),p=async m=>{m.preventDefault();const g=f();if(!g.success)return;const y=tGe(g.data,r);try{const b=r?await o.mutateAsync(y):await i.mutateAsync(y);Q.success(r?"Code updated":`Code ${b.code} created`),t(b)}catch(b){Q.error(Ih(b))}};return l.jsxs("form",{onSubmit:p,className:"flex flex-col gap-4",children:[l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("label",{htmlFor:"fc-label",className:"text-sm font-medium",children:"Label"}),l.jsx(Le,{id:"fc-label",placeholder:"Columbia Journalism 2026",...h("label")})]}),l.jsxs("fieldset",{className:"flex flex-col gap-2",disabled:r,children:[l.jsx("legend",{className:"text-sm font-medium",children:"What the code gives"}),[1,2].map(m=>l.jsxs("label",{className:"flex cursor-pointer items-start gap-2 rounded-lg border border-border p-3 text-sm has-[:checked]:border-primary",children:[l.jsx("input",{type:"radio",name:"fc-type",value:String(m),checked:a.type===String(m),onChange:()=>u("type",String(m)),className:"mt-0.5"}),l.jsxs("span",{children:[l.jsx("span",{className:"font-medium",children:cR[m]}),l.jsx("span",{className:"block text-xs text-muted-foreground",children:m===1?"Everything in the paid plan except the weekly auto-apply allowance. Auto-apply stays on the free taster and credit packs.":"Everything in the paid plan, including 5 auto-applies a week."})]})]},m)),r&&l.jsx("p",{className:"text-xs text-muted-foreground",children:"The type cannot change after the code is created."})]}),l.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("label",{htmlFor:"fc-duration",className:"text-sm font-medium",children:"Free for (months)"}),l.jsx(Le,{id:"fc-duration",inputMode:"numeric",...h("duration_months")}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Counted from when each person redeems."})]}),l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("label",{htmlFor:"fc-max",className:"text-sm font-medium",children:"Most people who can redeem"}),l.jsx(Le,{id:"fc-max",inputMode:"numeric",placeholder:"No limit",...h("max_redemptions")})]}),l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("label",{htmlFor:"fc-redeem-by",className:"text-sm font-medium",children:"Redeem by"}),l.jsx(Le,{id:"fc-redeem-by",type:"date",...h("redeem_by")}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional. The code stops working after this day."})]}),!r&&l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("label",{htmlFor:"fc-code",className:"text-sm font-medium",children:"Custom code"}),l.jsx(Le,{id:"fc-code",placeholder:"Leave empty to generate one",...h("code")})]})]}),l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("label",{htmlFor:"fc-domains",className:"text-sm font-medium",children:"Allowed email domains"}),l.jsx(Le,{id:"fc-domains",placeholder:"columbia.edu",...h("allowed_domains")}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional. Separate with commas. A domain al
713so covers its subdomains, so columbia.edu covers journalism.columbia.edu."})]}),l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("label",{htmlFor:"fc-notes",className:"text-sm font-medium",children:"Notes"}),l.jsx(uQ,{id:"fc-notes",rows:3,value:a.notes??"",onChange:m=>u("notes",m.target.value)}),c.notes&&l.jsx("span",{className:"text-xs text-destructive",children:c.notes})]}),l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx(G,{type:"button",variant:"outline",onClick:n,disabled:s,children:"Cancel"}),l.jsx(G,{type:"submit",disabled:s,children:s?"Savingâ¦":r?"Save changes":"Create code"})]})]})}function gN({status:e}){const t=e==="active"?"bg-success/10 text-success":e==="revoked"||e==="deactivated"?"bg-destructive/10 text-destructive":"bg-muted text-muted-foreground";return l.jsx("span",{className:`inline-flex rounded-full px-2 py-0.5 text-xs font-semibold capitalize ${t}`,children:e})}function rGe(e){return e.max_redemptions?`${e.stats.redemptions} / ${e.max_redemptions}`:String(e.stats.redemptions)}function iGe(){const{data:e,isLoading:t,error:n}=z6e(),[r,i]=v.useState(!1),o=Un(),s=e?.codes??[];return l.jsxs("div",{className:"flex flex-col gap-4 p-2",children:[l.jsxs("div",{className:"flex flex-col items-start justify-between gap-3 sm:flex-row sm:items-center",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Founder codes"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Codes that give candidates the paid plan free for a set time. Each person's access runs from when they redeem."})]}),l.jsxs(G,{onClick:()=>i(!0),children:[l.jsx(Jb,{size:16,className:"mr-1"}),"New code"]})]}),l.jsx(Ce,{className:"overflow-hidden rounded-2xl border border-border shadow-sm",children:t?l.jsx(Fn,{}):n?l.jsxs("div",{className:"p-6 text-destructive",children:["Could not load founder codes: ",Ih(n)]}):s.length===0?l.jsx("div",{className:"p-6 text-muted-foreground",children:"No founder codes yet. Create one to get started."}):l.jsxs(mr,{children:[l.jsx(gr,{children:l.jsxs(bt,{children:[l.jsx(pe,{children:"Code"}),l.jsx(pe,{children:"Status"}),l.jsx(pe,{children:"Type"}),l.jsx(pe,{className:"text-right",children:"Redeemed"}),l.jsx(pe,{className:"text-right",children:"Active now"}),l.jsx(pe,{className:"text-right",children:"Value given"}),l.jsx(pe,{children:"Created"})]})}),l.jsx(vr,{children:s.map(a=>l.jsxs(bt,{children:[l.jsxs(he,{children:[l.jsx(Re,{to:"/super-admin/founder-codes/$codeId",params:{codeId:a.code_id},className:"font-medium text-foreground hover:underline",children:a.label}),l.jsx("div",{className:"font-mono text-xs text-muted-foreground",children:a.code})]}),l.jsx(he,{children:l.jsx(gN,{status:a.status})}),l.jsx(he,{children:l.jsx(ao,{variant:"secondary",children:cR[a.type]})}),l.jsx(he,{className:"text-right tabular-nums",children:rGe(a)}),l.jsx(he,{className:"text-right tabular-nums",children:a.stats.active_now}),l.jsx(he,{className:"text-right tabular-nums",children:dN(a.stats.value_given_cents,a.stats.currency)}),l.jsx(he,{className:"whitespace-nowrap text-sm text-muted-foreground",children:nu(a.created_at)})]},a.code_id))})]})}),e&&l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Value given is an estimate: the Monthly plan's list price (",dN(e.monthly_list_price_cents,e.currency),") times the months each person has used. It is not revenue and appears in no revenue report."]}),l.jsx(D0,{open:r,onClose:()=>i(!1),title:"New founder code",children:r&&l.jsx(wQ,{onCancel:()=>i(!1),onSuccess:a=>{i(!1),o({to:"/super-admin/founder-codes/$codeId",params:{codeId:a.code_id}})}})})]})}const oGe=Wi("/super-admin/founder-codes/")({component:iGe}),sGe=Object.freeze(Object.defineProperty({__proto__:null,Route:oGe},Symbol.toStringTag,{value:"Module"}));function aGe(e){return`${e.auto_apply_applications} auto-apply · ${e.cv_documents} CV/cover letter · ${e.practice_interviews} practice`}function Vs({label:e,value:t}){return l.jsxs("div",{className:"rounded-xl border border-border bg-card p-3",children:[l.jsx("div",{className:"text-xs text-muted-foreground",children:e}),l.jsx("div",{className:"mt-1 text-lg font-semibold tabular-nums text-foreground",children:t})]})}function lGe({codeId:e}){const{data:t,isLoading:n,error:r}=V6e(e),{data:i=[],isLoading:o}=q6e(e),s=H6e(e),a=G6e(),c=Y6e(),[u,d]=v.useState(null),[f,h]=v.useState(!1);if(n)return l.jsx(Fn,{});if(r||!t)return l.jsxs("div",{className:"p-6 text-destructive",children:["Could not load this code: ",Ih(r)]});const p=F6e(t.code),m=t.status==="active",g=async(x,w)=>{try{await navigator.clipboard.writeText(x),Q.success(`${w} copied`)}catch{Q.error("Could not copy. Select the text and copy it by hand.")}},y=async()=>
713{if(u)try{if(u.kind==="revoke")await a.mutateAsync(u.redemption.grant_id),Q.success("Access revoked");else{const x=await s.mutateAsync(u.action);u.action==="deactivate"?Q.success(`Code deactivated. ${x.grants_revoked??0} people lost access.`):u.action==="reactivate"?Q.success("Code reactivated"):Q.success(`Access restored for ${x.grants_restored??0} people`)}}catch(x){throw Q.error(Ih(x)),x}},b=i.some(x=>x.effective_status==="revoked"&&x.revoke_reason==="code_deactivated");return l.jsxs("div",{className:"flex flex-col gap-4 p-2",children:[l.jsxs(Re,{to:"/super-admin/founder-codes",className:"inline-flex w-fit items-center gap-1 text-sm text-muted-foreground hover:underline",children:[l.jsx(gse,{size:14})," All founder codes"]}),l.jsxs("div",{className:"flex flex-col justify-between gap-3 sm:flex-row sm:items-start",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:t.label}),l.jsx(gN,{status:t.status})]}),l.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[cR[t.type],". Free for ",t.duration_months," months from redemption."]})]}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx(G,{variant:"outline",onClick:()=>h(!0),children:"Edit"}),m?l.jsx(G,{variant:"destructive",onClick:()=>d({kind:"code",action:"deactivate"}),children:"Deactivate"}):l.jsx(G,{onClick:()=>d({kind:"code",action:"reactivate"}),children:"Reactivate"}),m&&b&&l.jsx(G,{variant:"outline",onClick:()=>d({kind:"code",action:"restore-access"}),children:"Restore access"})]})]}),l.jsxs(Ce,{className:"flex flex-col gap-3 rounded-2xl border border-border p-4 shadow-sm",children:[l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("span",{className:"text-xs text-muted-foreground",children:"Code"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-mono text-lg font-semibold tracking-wide",children:t.code}),l.jsx(G,{size:"sm",variant:"ghost",onClick:()=>void g(t.code,"Code"),"aria-label":"Copy code",children:l.jsx(Ej,{size:14})})]})]}),l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("span",{className:"text-xs text-muted-foreground",children:"Share link"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"break-all font-mono text-sm",children:p}),l.jsx(G,{size:"sm",variant:"ghost",onClick:()=>void g(p,"Link"),"aria-label":"Copy share link",children:l.jsx(Ej,{size:14})})]}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"Works before sign-up. People create an account and the code is applied once they are in."})]}),l.jsxs("dl",{className:"grid grid-cols-1 gap-2 text-sm sm:grid-cols-3",children:[l.jsxs("div",{children:[l.jsx("dt",{className:"text-xs text-muted-foreground",children:"Allowed email domains"}),l.jsx("dd",{children:t.allowed_domains.length?t.allowed_domains.join(", "):"Any"})]}),l.jsxs("div",{children:[l.jsx("dt",{className:"text-xs text-muted-foreground",children:"Redeem by"}),l.jsx("dd",{children:t.redeem_by?nu(t.redeem_by):"No end date"})]}),l.jsxs("div",{children:[l.jsx("dt",{className:"text-xs text-muted-foreground",children:"Created"}),l.jsxs("dd",{children:[nu(t.created_at)," by ",t.created_by_email||t.created_by]})]})]}),t.notes&&l.jsx("p",{className:"whitespace-pre-wrap text-sm text-muted-foreground",children:t.notes})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[l.jsx(Vs,{label:"Redeemed",value:t.max_redemptions?`${t.stats.redemptions} / ${t.max_redemptions}`:t.stats.redemptions}),l.jsx(Vs,{label:"Active now",value:t.stats.active_now}),l.jsx(Vs,{label:"Expired",value:t.stats.expired}),l.jsx(Vs,{label:"Revoked",value:t.stats.revoked}),l.jsx(Vs,{label:"Auto-apply used",value:t.stats.usage.auto_apply_applications}),l.jsx(Vs,{label:"CVs and cover letters",value:t.stats.usage.cv_documents}),l.jsx(Vs,{label:"Practice interviews",value:t.stats.usage.practice_interviews}),l.jsx(Vs,{label:"Value given",value:dN(t.stats.value_given_cents,t.stats.currency)})]}),!t.stats.usage_available&&l.jsx("p",{className:"text-xs text-warning",children:"Usage could not be read just now. The other figures are correct."}),l.jsxs(Ce,{className:"overflow-hidden rounded-2xl border border-border shadow-sm",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:[l.jsx("h2",{className:"text-base font-semibold",children:"Redemptions"}),l.jsxs(G,{size:"sm",variant:"outline",disabled:c.isPending||i.length===0,onClick:()=>c.mutate({codeId:t.code_id,code:t.code},{onError:x=>Q.error(Ih(x))}),children:[l.jsx(Sse,{size:14,className:"mr-1"}),"Export CSV"]})]}),o?l.jsx(Fn,{}):i.length===0?l.jsx("div",{className:"p-6 text-muted-foreground",children:"Nobody has redeemed this code yet."}):l.jsxs(mr,{children:[l.jsx(gr,{children:l.jsxs(bt,{children:[l.jsx(pe,{children:"Name"}),l.jsx(pe,{children:"Email"}),l.jsx(pe,{children:"Redeemed"}),l.jsx(pe,{children:"Ends"}),l.jsx(pe,{children:"Status"}),l.jsx(pe,{children:"Usage"}),l.jsx(pe,{})]})}),l.jsx(vr,{children:i.map(x=>l.jsxs(bt,{children:[l.jsx(he,{children:[x.first_name,x.last_name].filter(
713Boolean).join(" ")||"-"}),l.jsx(he,{className:"text-sm",children:x.user_email}),l.jsx(he,{className:"whitespace-nowrap text-sm",children:nu(x.starts_at)}),l.jsx(he,{className:"whitespace-nowrap text-sm",children:nu(x.ends_at)}),l.jsx(he,{children:l.jsx(gN,{status:x.effective_status})}),l.jsx(he,{className:"text-xs text-muted-foreground",children:aGe(x.usage)}),l.jsx(he,{className:"text-right",children:x.effective_status==="active"&&l.jsx(G,{size:"sm",variant:"ghost",onClick:()=>d({kind:"revoke",redemption:x}),children:"Revoke"})})]},x.grant_id))})]})]}),u&&l.jsx(At,{open:!0,onOpenChange:x=>!x&&d(null),children:l.jsx(xt,{className:"max-w-md",children:l.jsx(Wu,{isOpen:!0,...nGe(u,t),onConfirm:y,onClose:()=>d(null)})})}),l.jsx(D0,{open:f,onClose:()=>h(!1),title:`Edit ${t.code}`,children:f&&l.jsx(wQ,{existing:t,onCancel:()=>h(!1),onSuccess:()=>h(!1)})})]})}function cGe(){const{codeId:e}=_Q.useParams();return l.jsx(lGe,{codeId:e})}const _Q=Wi("/super-admin/founder-codes/$codeId")({component:cGe}),uGe=Object.freeze(Object.defineProperty({__proto__:null,Route:_Q},Symbol.toStringTag,{value:"Module"}));function dGe(){const e=tt(),t=Un();return v.useEffect(()=>{if(!e.isLoading){if(!e.isAuthenticated){t({to:"/"});return}CE(e.user??null)||t({to:$d()})}},[e.isLoading,e.isAuthenticated,e.user,t]),e.isLoading?l.jsx("div",{className:"min-h-screen flex flex-col items-center justify-center bg-card",children:l.jsx(ft,{size:48,variant:"brand",spin:!0,title:"",className:"mb-4"})}):!e.isAuthenticated||!CE(e.user??null)?null:l.jsxs(HH,{children:[l.jsx(YH,{}),l.jsx(GH,{}),l.jsx(Fa,{})]})}const fGe=J("/super-admin")({component:dGe}),hGe=J("/_public")({component:pGe});function pGe(){return l.jsx("div",{className:"candidate-theme",children:l.jsx(Fa,{})})}function SQ(){return typeof window<"u"&&window.asgardDesktop?.isDesktop===!0}function aut(){return typeof window<"u"?window.asgardDesktop?.connectProvider:void 0}function jQ(){const[e,t]=v.useState(null),[n,r]=v.useState(!1);return v.useEffect(()=>SQ()?window.asgardDesktop?.onUpdateReady?.(o=>t(o.version)):void 0,[]),e?l.jsxs("div",{className:"sticky top-0 z-50 flex items-center justify-between gap-3 border-b border-info bg-info/20 px-4 py-2 text-info",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx(ak,{className:"h-4 w-4","aria-hidden":!0}),l.jsxs("span",{children:["A new version (",l.jsx("strong",{children:e}),") is ready. Restart to update."]})]}),l.jsx(G,{size:"sm",variant:"outline",className:"border-info bg-card text-info hover:bg-info/10",disabled:n,onClick:()=>{r(!0),window.asgardDesktop?.restartToUpdate?.()},children:n?"Restartingâ¦":"Restart"})]}):null}function mGe(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function z0(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const vN=e=>Array.isArray(e);function EQ(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function hm(e){return typeof e=="string"||Array.isArray(e)}function N3(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function dR(e,t,n,r){if(typeof t=="function"){const[i,o]=N3(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=N3(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function V0(e,t,n){const r=e.getProps();return dR(r,t,n!==void 0?n:r.custom,e)}const fR=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hR=["initial",...fR],ng=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gc=new Set(ng),as=e=>e*1e3,ls=e=>e/1e3,gGe={type:"spring",stiffness:500,damping:25,restSpeed:10},vGe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),yGe={type:"keyframes",duration:.8},xGe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},bGe=(e,{keyframes:t})=>t.length>2?yGe:gc.has(e)?e.startsWith("scale")?vGe(t[1]):gGe:xGe;function pR(e,t){return e?e[t]||e.default||e:void 0}const wGe={skipAnimations:!1,useManualTiming:!1},_Ge=e=>e!==null;function q0(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(_Ge),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const Dn=e=>e;function SGe(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(u){o.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,f=!1)=>{const p=f&&r?t:n;return d&&o.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(s=u,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,i&&(i=!1,c.process(u))}};return c}const mv=["read","resolveKeyframes","update","preRender","render","postRender"],jGe=40;function CQ(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=mv.reduce((b,x)=>(b[x]=SGe(o),b),{}),{read:a,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:h}=s,p=()=>{const b=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(b-i.timestamp,jGe),1),i.timestamp=b,i.isProcessing=!0,a.process(i),c.process(i),u.process(i),d.process(i),f.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:mv.reduce((b,x)=>{const w=s[x];return b[x]=(S,_=!1,j=!1)=>(n||m(),w.schedule(S,_,j)),b},{}),cancel:b=>{for(let x=0;x<mv.length;x++)s[mv[x]].cancel(b)},state:i,steps:s}}const{schedule:ht,cancel:Ma,state:xn,steps:QS}=CQ(typeof requestAnimationFrame<"u"?requestAnimationFrame:Dn,!0),NQ=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,EGe=1e-7,CGe=12;function NGe(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=NQ(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>EGe&&++a<CGe);return s}function rg(e,t,n,r){if(e===t&&n===r)return Dn;const i=o=>NGe(o,0,1,e,n);return o=>o===0||o===1?o:NQ(i(o),t,r)}const PQ=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kQ=e=>t=>1-e(1-t),AQ=rg(.33,1.53,.69,.99),mR=kQ(AQ),TQ=PQ(mR),RQ=e=>(e*=2)<1?.5*mR(e):.5*(2-Math.pow(2,-10*(e-1))),gR=e=>1-Math.sin(Math.acos(e)),OQ=kQ(gR),IQ=PQ(gR),MQ=e=>/^0[^.\s]+$/u.test(e);function PGe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||MQ(e):!0}let yN=Dn;const $Q=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),DQ=e=>t=>typeof t=="string"&&t.startsWith(e),LQ=DQ("--"),kGe=DQ("var(--"),vR=e=>kGe(e)?AGe.test(e.split("/*")[0].trim()):!1,AGe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,TGe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RGe(e){const t=TGe.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function FQ(e,t,n=1){const[r,i]=RGe(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return $Q(s)?parseFloat(s):s}return vR(i)?FQ(i,t,n+1):i}const $a=(e,t,n)=>n>t?t:n<e?e:n,mf={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},pm={...mf,transform:e=>$a(0,1,e)},gv={...mf,default:1},ig=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ks=ig("deg"),yo=ig("%"),Ne=ig("px"),OGe=ig("vh"),IGe=ig("vw"),P3={...yo,parse:e=>yo.parse(e)/100,transform:e=>yo.transform(e*100)},MGe=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),k3=e=>e===mf||e===Ne,A3=(e,t)=>
vendor: 8,709 bytes, line 713
713parseFloat(e.split(", ")[t]),T3=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return A3(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?A3(o[1],e):0}},$Ge=new Set(["x","y","z"]),DGe=ng.filter(e=>!$Ge.has(e));function LGe(e){const t=[];return DGe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const _d={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:T3(4,13),y:T3(5,14)};_d.translateX=_d.x;_d.translateY=_d.y;const BQ=e=>t=>t.test(e),FGe={test:e=>e==="auto",parse:e=>e},UQ=[mf,Ne,yo,Ks,IGe,OGe,FGe],R3=e=>UQ.find(BQ(e)),$l=new Set;let xN=!1,bN=!1;function zQ(){if(bN){const e=Array.from($l).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=LGe(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var a;(a=r.getValue(o))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}bN=!1,xN=!1,$l.forEach(e=>e.complete()),$l.clear()}function VQ(){$l.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(bN=!0)})}function BGe(){VQ(),zQ()}class yR{constructor(t,n,r,i,o,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?($l.add(this),xN||(xN=!0,ht.read(VQ),ht.resolveKeyframes(zQ))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const s=i?.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const c=r.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),i&&s===void 0&&i.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),$l.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,$l.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Mh=e=>Math.round(e*1e5)/1e5,xR=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function UGe(e){return e==null}const zGe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bR=(e,t)=>n=>!!(typeof n=="string"&&zGe.test(n)&&n.startsWith(e)||t&&!UGe(n)&&Object.prototype.hasOwnProperty.call(n,t)),qQ=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(xR);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},VGe=e=>$a(0,255,e),JS={...mf,transform:e=>Math.round(VGe(e))},Cl={test:bR("rgb","red"),parse:qQ("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+JS.transform(e)+", "+JS.transform(t)+", "+JS.transform(n)+", "+Mh(pm.transform(r))+")"};function qGe(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const wN={test:bR("#"),parse:qGe,transform:Cl.transform},iu={test:bR("hsl","hue"),parse:qQ("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+yo.transform(Mh(t))+", "+yo.transform(Mh(n))+", "+Mh(pm.transform(r))+")"},kn={test:e=>Cl.test(e)||wN.test(e)||iu.test(e),parse:e=>Cl.test(e)?Cl.parse(e):iu.test(e)?iu.parse(e):wN.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Cl.transform(e):iu.transform(e)},KGe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function WGe(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(xR))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(KGe))===null||n===void 0?void 0:n.length)||0)>0}const KQ="number",WQ="color",HGe="var",GGe="var(",O3="${}",YGe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function mm(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(YGe,c=>(kn.test(c)?(r.color.push(o),i.push(WQ),n.push(kn.parse(c))):c.startsWith(GGe)?(r.var.push(o),i.push(HGe),n.push(c)):(r.number.push(o),i.push(KQ),n.push(parseFloat(c))),++o,O3)).split(O3);return{values:n,split:a,indexes:r,types:i}}function HQ(e){return mm(e).values}function GQ(e){const{split:t,types:n}=mm(e),r=t.length;return i=>{let o="";for(let s=0;s<r;s++)if(o+=t[s],i[s]!==void 0){const a=n[s];a===KQ?o+=Mh(i[s]):a===WQ?o+=kn.transform(i[s]):o+=i[s]}return o}}const QGe=e=>typeof e=="number"?0:e;function JGe(e){const t=HQ(e);return GQ(e)(t.map(QGe))}const Da={test:WGe,parse:HQ,createTransformer:GQ,getAnimatableNone:JGe},XGe=new Set(["brightness","contrast","saturate","opacity"]);function ZGe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(xR)||[];if(!r)return e;const i=n.replace(r,"");let o=XGe.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const e9e=/\b([a-z-]*)\(.*?\)/gu,_N={...Da,getAnimatableNone:e=>{const t=e.match(e9e);return t?t.map(ZGe).join(" "):e}},t9e={borderWidth:Ne,borderTopWidth:Ne,borderRightWidth:Ne,borderBottomWidth:Ne,borderLeftWidth:Ne,borderRadius:Ne,radius:Ne,borderTopLeftRadius:Ne,borderTopRightRadius:Ne,borderBottomRightRadius:Ne,borderBottomLeftRadius:Ne,width:Ne,maxWidth:Ne,height:Ne,maxHeight:Ne,top:Ne,right:Ne,bottom:Ne,left:Ne,padding:Ne,paddingTop:Ne,paddingRight:Ne,paddingBottom:Ne,paddingLeft:Ne,margin:Ne,marginTop:Ne,marginRight:Ne,marginBottom:Ne,marginLeft:Ne,backgroundPositionX:Ne,backgroundPositionY:Ne},n9e={rotate:Ks,rotateX:Ks,rotateY:Ks,rotateZ:Ks,scale:gv,scaleX:gv,scaleY:gv,scaleZ:gv,skew:Ks,skewX:Ks,skewY:Ks,distance:Ne,translateX:Ne,translateY:Ne,translateZ:Ne,x:Ne,y:Ne,z:Ne,perspective:Ne,transformPerspective:Ne,opacity:pm,originX:P3,originY:P3,originZ:Ne},I3={...mf,transform:Math.round},wR={...t9e,...n9e,zIndex:I3,size:Ne,fillOpacity:pm,strokeOpacity:pm,numOctaves:I3},r9e={...wR,color:kn,backgroundColor:kn,outlineColor:kn,fill:kn,stroke:kn,borderColor:kn,borderTopColor:kn,borderRightColor:kn,borderBottomColor:kn,borderLeftColor:kn,filter:_N,WebkitFilter:_N},_R=e=>r9e[e];function YQ(e,t){let n=_R(e);return n!==_N&&(n=Da),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const i9e=new Set(["auto","none","0"]);function o9e(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!i9e.has(o)&&mm(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=YQ(n,i)}class QQ extends yR{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),vR(u))){const d=FQ(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!MGe.has(r)||t.length!==2)return;const[i,o]=t,s=R3(i),a=R3(o);if(s!==a)if(k3(s)&&k3(a))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)PGe(t[i])&&r.push(i);r.length&&o9e(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_d[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const s=i.length-1,a=i[s];i[s]=_d[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEac
713h(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function SR(e){return typeof e=="function"}let Hv;function s9e(){Hv=void 0}const xo={now:()=>(Hv===void 0&&xo.set(xn.isProcessing||wGe.useManualTiming?xn.timestamp:performance.now()),Hv),set:e=>{Hv=e,queueMicrotask(s9e)}},M3=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Da.test(e)||e==="0")&&!e.startsWith("url("));function a9e(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function l9e(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],s=M3(i,t),a=M3(o,t);return!s||!a?!1:a9e(e)||(n==="spring"||SR(n))&&r}const c9e=40;class JQ{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=xo.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>c9e?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&BGe(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=xo.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:s,onComplete:a,onUpdate:c,isGenerator:u}=this.options;if(!u&&!l9e(t,r,i,o))if(s)this.options.duration=0;else{c?.(q0(t,this.options,n)),a?.(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function XQ(e,t){return t?e*(1e3/t):0}const u9e=5;function ZQ(e,t,n){const r=Math.max(t-u9e,0);return XQ(n-e(r),t-r)}const XS=.001,d9e=.01,f9e=10,h9e=.05,p9e=1;function m9e({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,s=1-t;s=$a(h9e,p9e,s),e=$a(d9e,f9e,ls(e)),s<1?(i=u=>{const d=u*s,f=d*e,h=d-n,p=SN(u,s),m=Math.exp(-f);return XS-h/p*m},o=u=>{const f=u*s*e,h=f*n+n,p=Math.pow(s,2)*Math.pow(u,2)*e,m=Math.exp(-f),g=SN(Math.pow(u,2),s);return(-i(u)+XS>0?-1:1)*((h-p)*m)/g}):(i=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-XS+d*f},o=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const a=5/e,c=v9e(i,o,a);if(e=as(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const g9e=12;function v9e(e,t,n){let r=n;for(let i=1;i<g9e;i++)r=r-e(r)/t(r);return r}function SN(e,t){return e*Math.sqrt(1-t*t)}const y9e=["duration","bounce"],x9e=["stiffness","damping","mass"];function $3(e,t){return t.some(n=>e[n]!==void 0)}function b9e(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!$3(e,x9e)&&$3(e,y9e)){const n=m9e(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function eJ({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=b9e({...r,velocity:-ls(r.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(a*u)),g=o-i,y=ls(Math.sqrt(a/u)),b=Math.abs(g)<5;n||(n=b?.01:2),t||(t=b?.005:.5);let x;if(m<1){const w=SN(y,m);x=S=>{const _=Math.exp(-m*y*S);return o-_*((p+m*y*g)/w*Math.sin(w*S)+g*Math.cos(w*S))}}else if(m===1)x=w=>o-Math.exp(-y*w)*(g+(p+y*g)*w);else{const w=y*Math.sqrt(m*m-1);x=S=>{const _=Math.exp(-m*y*S),j=Math.min(w*S,300);return o-_*((p+m*y*g)*Math.sinh(j)+w*g*Math.cosh(j))/w}}return{calculatedDuration:h&&d||null,next:w=>{const S=x(w);if(h)s.done=w>=d;else{let _=0;m<1&&(_=w===0?as(p):ZQ(x,w,S));const j=Math.abs(_)<=n,E=Math.abs(o-S)<=t;s.done=j&&E}return s.value=s.done?o:S,s}}}function D3({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},p=C=>a!==void 0&&C<a||c!==void 0&&C>c,m=C=>a===void 0?c:c===void 0||Math.abs(a-C)<Math.abs(c-C)?a:c;let g=n*t;const y=f+g,b=s===void 0?y:s(y);b!==y&&(g=b-f);const x=C=>-g*Math.exp(-C/r),w=C=>b+x(C),S=C=>{const N=x(C),k=w(C);h.done=Math.abs(N)<=u,h.value=h.done?b:k};let _,j;const E=C=>{p(h.value)&&(_=C,j=eJ({keyframes:[h.value,m(h.value)],velocity:ZQ(w,C,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:C=>{let N=!1;return!j&&_===void 0&&(N=!0,S(C),E(C)),_!==void 0&&C>=_?j.next(C-_):(!N&&S(C),h)}}}const w9e=rg(.42,0,1,1),_9e=rg(0,0,.58,1),tJ=rg(.42,0,.58,1),S9e=e=>Array.isArray(e)&&typeof e[0]!="number",jR=e=>Array.isArray(e)&&typeof e[0]=="number",L3={linear:Dn,easeIn:w9e,easeInOut:tJ,easeOut:_9e,circIn:gR,circInOut:IQ,circOut:OQ,backIn:mR,backInOut:TQ,backOut:AQ,anticipate:RQ},F3=e=>{if(jR(e)){yN(e.length===4);const[t,n,r,i]=e;return rg(t,n,r,i)}else if(typeof e=="string")return yN(L3[e]!==void 0),L3[e];return e},j9e=(e,t)=>
vendor: 12,569 bytes, line 713
713n=>t(e(n)),cs=(...e)=>e.reduce(j9e),Sd=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Dt=(e,t,n)=>e+(t-e)*n;function ZS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function E9e({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;i=ZS(c,a,e+1/3),o=ZS(c,a,e),s=ZS(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function db(e,t){return n=>n>0?t:e}const e1=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},C9e=[wN,Cl,iu],N9e=e=>C9e.find(t=>t.test(e));function B3(e){const t=N9e(e);if(!t)return!1;let n=t.parse(e);return t===iu&&(n=E9e(n)),n}const U3=(e,t)=>{const n=B3(e),r=B3(t);if(!n||!r)return db(e,t);const i={...n};return o=>(i.red=e1(n.red,r.red,o),i.green=e1(n.green,r.green,o),i.blue=e1(n.blue,r.blue,o),i.alpha=Dt(n.alpha,r.alpha,o),Cl.transform(i))},jN=new Set(["none","hidden"]);function P9e(e,t){return jN.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function k9e(e,t){return n=>Dt(e,t,n)}function ER(e){return typeof e=="number"?k9e:typeof e=="string"?vR(e)?db:kn.test(e)?U3:R9e:Array.isArray(e)?nJ:typeof e=="object"?kn.test(e)?U3:A9e:db}function nJ(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>ER(o)(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function A9e(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=ER(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function T9e(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][i[s]],c=(n=e.values[a])!==null&&n!==void 0?n:0;r[o]=c,i[s]++}return r}const R9e=(e,t)=>{const n=Da.createTransformer(t),r=mm(e),i=mm(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?jN.has(e)&&!i.values.length||jN.has(t)&&!r.values.length?P9e(e,t):cs(nJ(T9e(r,i),i.values),n):db(e,t)};function rJ(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Dt(e,t,n):ER(e)(e,t)}function O9e(e,t,n){const r=[],i=n||rJ,o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||Dn:t;a=cs(c,a)}r.push(a)}return r}function I9e(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(yN(o===t.length),o===1)return()=>t[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=O9e(t,r,i),a=s.length,c=u=>{let d=0;if(a>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Sd(e[d],e[d+1],u);return s[d](f)};return n?u=>c($a(e[0],e[o-1],u)):c}function M9e(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Sd(0,t,r);e.push(Dt(n,1,i))}}function $9e(e){const t=[0];return M9e(t,e.length-1),t}function D9e(e,t){return e.map(n=>n*t)}function L9e(e,t){return e.map(()=>t||tJ).splice(0,e.length-1)}function fb({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=S9e(r)?r.map(F3):F3(r),o={done:!1,value:t[0]},s=D9e(n&&n.length===t.length?n:$9e(t),e),a=I9e(s,t,{ease:Array.isArray(i)?i:L9e(t,i)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const z3=2e4;function F9e(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<z3;)t+=n,r=e.next(t);return t>=z3?1/0:t}const B9e=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ht.update(t,!0),stop:()=>Ma(t),now:()=>xn.isProcessing?xn.timestamp:xo.now()}},U9e={decay:D3,inertia:D3,tween:fb,keyframes:fb,spring:eJ},z9e=e=>e/100;class CR extends JQ{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:i,keyframes:o}=this.options,s=i?.KeyframeResolver||yR,a=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new s(o,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=this.options,a=SR(n)?n:U9e[n]||fb;let c,u;a!==fb&&typeof t[0]!="number"&&(c=cs(z9e,rJ(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});o==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),d.calculatedDuration===null&&(d.calculatedDuration=F9e(d));const{calculatedDuration:f}=d,h=f+i,p=h*(r+1)-i;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:h,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:C}=this.options;return{done:!0,value:C[C.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return o.next(0);const{delay:h,repeat:p,repeatType:m,repeatDelay:g,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-h*(this.speed>=0?1:-1),x=this.speed>=0?b<0:b>d;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,S=o;if(p){const C=Math.min(this.currentTime,d)/f;let N=Math.floor(C),k=C%1;!k&&C>=1&&(k=1),k===1&&N--,N=Math.min(N,p+1),!!(N%2)&&(m==="reverse"?(k=1-k,g&&(k-=g/f)):m==="mirror"&&(S=s)),w=$a(0,1,k)*f}const _=x?{done:!1,value:c[0]}:S.next(w);a&&(_.value=a(_.value));let{done:j}=_;!x&&u!==null&&(j=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return E&&i!==void 0&&(_.value=q0(c,this.options,i)),y&&y(_.value),E&&this.finish(),_}get duration(){const{resolved:t}=this;return t?ls(t.calculatedDuration):0}get time(){return ls(this.currentTime)}set time(t){t=as(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ls(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=B9e,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const V9e=new Set(["opacity","clipPath","filter","transform"]),q9e=10,K9e=(e,t)=>{let n="";const r=Math.max(Math.round(t/q9e),2);for(let i=0;i<r;i++)n+=e(Sd(0,r-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function NR(e){let t;return()=>(t===void 0&&(t=e()),t)}const W9e={linearEasing:void 0};function H9e(e,t){const n=NR(e);return()=>{var r;return(r=W9e[t])!==null&&r!==void 0?r:n()}}const hb=H9e(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function iJ(e){return!!(typeof e=="function"&&hb()||!e||typeof e=="string"&&(e in EN||hb())||jR(e)||Array.isArray(e)&&e.every(iJ))}const uh=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,EN={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:uh([0,.65,.55,1]),circOut:uh([.55,0,1,.45]),backIn:uh([.31,.01,.66,-.59]),backOut:uh([.33,1.53,.69,.99])};function oJ(e,t){if(e)return typeof e=="function"&&hb()?K9e(e,t):jR(e)?uh(e):Array.isArray(e)?e.map(n=>oJ(n,t)||EN.easeOut):EN[e]}function G9e(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=oJ(a,i);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function V3(e,t){e.timeline=t,e.onfinish=null}const Y9e=NR(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),pb=10,Q9e=2e4;function J9e(e){return SR(e.type)||e.type==="spring"||!iJ(e.ease)}function X9e(e,t){const n=new CR({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&o<Q9e;)r=n.sample(o),i.push(r.value),o+=pb;return{times:void 0,keyframes:i,duration:o-pb,ease:"linear"}}const sJ={anticipate:RQ,backInOut:TQ,circInOut:IQ};function Z9e(e){return e in sJ}class q3 extends JQ{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:o}=this.options;this.resolver=new QQ(o,(s,a)=>this.onKeyframesResolved(s,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:o,ease:s,type:a,motionValue:c,name:u,startTime:d}=this.options;if(!(!((r=c.owner)===null||r===void 0)&&r.current))return!1;if(typeof s=="string"&&hb()&&Z9e(s)&&(s=sJ[s]),J9e(this.options)){const{onComplete:h,onUpdate:p,motionValue:m,element:g,...y}=this.options,b=X9e(t,y);t=b.keyframes,t.length===1&&(t[1]=t[0]),i=b.duration,o=b.times,s=b.ease,a="keyframes"}const f=G9e(c.owner.current,u,t,{...this.options,duration:i,times:o,ease:s});return f.startTime=d??this.calcStartTime(),this.pendingTimeline?(V3(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:h}=this.options;c.set(q0(t,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:i,times:o,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ls(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ls(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=as(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Dn;const{animation:r}=n;V3(r,t)}return Dn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:h,...p}=this.options,m=new CR({...p,keyframes:r,duration:i,type:o,ease:s,times:a,isGenerator:!0}),g=as(this.time);u.setWithVelocity(m.sample(g-pb).value,m.sample(g).value,pb)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}
713static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:s,type:a}=t;return Y9e()&&r&&V9e.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&s!==0&&a!=="inertia"}}const e7e=NR(()=>window.ScrollTimeline!==void 0);class t7e{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>e7e()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,o)=>{i&&i(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function n7e({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const PR=(e,t,n,r={},i,o)=>s=>{const a=pR(r,e)||{},c=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-as(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};n7e(a)||(d={...d,...bGe(e,d)}),d.duration&&(d.duration=as(d.duration)),d.repeatDelay&&(d.repeatDelay=as(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!o&&t.get()!==void 0){const h=q0(d.keyframes,a);if(h!==void 0)return ht.update(()=>{d.onUpdate(h),d.onComplete()}),new t7e([])}return!o&&q3.supports(d)?new q3(d):new CR(d)},r7e=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),i7e=e=>vN(e)?e[e.length-1]||0:e;function kR(e,t){e.indexOf(t)===-1&&e.push(t)}function AR(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function lut([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const i=n<0?e.length+n:n,[o]=e.splice(t,1);e.splice(i,0,o)}return e}class TR{constructor(){this.subscriptions=[]}add(t){return kR(this.subscriptions,t),()=>AR(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const K3=30,o7e=e=>!isNaN(parseFloat(e)),W3={current:void 0};class s7e{constructor(t,n={}){this.version="11.11.17",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=xo.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=xo.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=o7e(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new TR);const r=this.events[t].add(n);return t==="change"?()=>{r(),ht.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return W3.current&&W3.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=xo.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>K3)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,K3);return XQ(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gm(e,t){return new s7e(e,t)}function a7e(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,gm(n))}function l7e(e,t){const n=V0(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};
vendor: 49,061 bytes, line 713
713for(const s in o){const a=i7e(o[s]);a7e(e,s,a)}}const RR=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),c7e="framerAppearId",aJ="data-"+RR(c7e);function lJ(e){return e.props[aJ]}const $n=e=>!!(e&&e.getVelocity);function u7e(e){return!!($n(e)&&e.add)}function CN(e,t){const n=e.getValue("willChange");if(u7e(n))return n.add(t)}function d7e({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function cJ(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...c}=t;r&&(s=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in c){const h=e.getValue(f,(o=e.latestValues[f])!==null&&o!==void 0?o:null),p=c[f];if(p===void 0||d&&d7e(d,f))continue;const m={delay:n,...pR(s||{},f)};let g=!1;if(window.MotionHandoffAnimation){const b=lJ(e);if(b){const x=window.MotionHandoffAnimation(b,f,ht);x!==null&&(m.startTime=x,g=!0)}}CN(e,f),h.start(PR(f,h,p,e.shouldReduceMotion&&gc.has(f)?{type:!1}:m,e,g));const y=h.animation;y&&u.push(y)}return a&&Promise.all(u).then(()=>{ht.update(()=>{a&&l7e(e,a)})}),u}function NN(e,t,n={}){var r;const i=V0(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(cJ(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=o;return f7e(e,t,d+u,f,h,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,d]=c==="beforeChildren"?[s,a]:[a,s];return u().then(()=>d())}else return Promise.all([s(),a(n.delay)])}function f7e(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,c=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(h7e).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(NN(u,t,{...o,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function h7e(e,t){return e.sortNodePosition(t)}function p7e(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>NN(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=NN(e,t,n);else{const i=typeof t=="function"?V0(e,t,n.custom):t;r=Promise.all(cJ(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const m7e=hR.length;function uJ(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?uJ(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<m7e;n++){const r=hR[n],i=e.props[r];(hm(i)||i===!1)&&(t[r]=i)}return t}const g7e=[...fR].reverse(),v7e=fR.length;function y7e(e){return t=>Promise.all(t.map(({animation:n,options:r})=>p7e(e,n,r)))}function x7e(e){let t=y7e(e),n=H3(),r=!0;const i=c=>(u,d)=>{var f;const h=V0(e,d,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:m,...g}=h;u={...u,...g,...m}}return u};function o(c){t=c(e)}function s(c){const{props:u}=e,d=uJ(e.parent)||{},f=[],h=new Set;let p={},m=1/0;for(let y=0;y<v7e;y++){const b=g7e[y],x=n[b],w=u[b]!==void 0?u[b]:d[b],S=hm(w),_=b===c?x.isActive:null;_===!1&&(m=y);let j=w===d[b]&&w!==u[b]&&S;if(j&&r&&e.manuallyAnimateOnMount&&(j=!1),x.protectedKeys={...p},!x.isActive&&_===null||!w&&!x.prevProp||z0(w)||typeof w=="boolean")continue;const E=b7e(x.prevProp,w);let C=E||b===c&&x.isActive&&!j&&S||y>m&&S,N=!1;const k=Array.isArray(w)?w:[w];let P=k.reduce(i(b),{});_===!1&&(P={});const{prevResolvedValues:A={}}=x,L={...A,...P},R=F=>{C=!0,h.has(F)&&(N=!0,h.delete(F)),x.needsAnimating[F]=!0;const T=e.getValue(F);T&&(T.liveStyle=!1)};for(const F in L){const T=P[F],M=A[F];if(p.hasOwnProperty(F))continue;let V=!1;vN(T)&&vN(M)?V=!EQ(T,M):V=T!==M,V?T!=null?R(F):h.add(F):T!==void 0&&h.has(F)?R(F):x.protectedKeys[F]=!0}x.prevProp=w,x.prevResolvedValues=P,x.isActive&&(p={...p,...P}),r&&e.blockInitialAnimation&&(C=!1),C&&(!(j&&E)||N)&&f.push(...k.map(F=>({animation:F,options:{type:b}})))}if(h.size){const y={};h.forEach(b=>{const x=e.getBaseTarget(b),w=e.getValue(b);w&&(w.liveStyle=!0),y[b]=x??null}),f.push({animation:y})}let g=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(f):Promise.resolve()}function a(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const f=s(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=H3(),r=!0}}}function b7e(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!EQ(t,e):!1}function il(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function H3(){return{animate:il(!0),whileInView:il(),whileHover:il(),whileTap:il(),whileDrag:il(),whileFocus:il(),exit:il()}}class el{constructor(t){this.isMounted=!1,this.node=t}update(){}}class w7e extends el{constructor(t){super(t),t.animationState||(t.animationState=x7e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();z0(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let _7e=0;class S7e extends el{constructor(){super(...arguments),this.id=_7e++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const j7e={animation:{Feature:w7e},exit:{Feature:S7e}},dJ=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function K0(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const E7e=e=>t=>dJ(t)&&e(t,K0(t));function es(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function us(e,t,n,r){return es(e,t,E7e(n),r)}const G3=(e,t)=>Math.abs(e-t);function C7e(e,t){const n=G3(e.x,t.x),r=G3(e.y,t.y);return Math.sqrt(n**2+r**2)}class fJ{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=n1(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=C7e(f.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=f,{timestamp:g}=xn;this.history.push({...m,timestamp:g});const{onStart:y,onMove:b}=this.handlers;h||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=t1(h,this.transformPagePoint),ht.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=n1(f.type==="pointercancel"?this.lastMoveEventInfo:t1(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,y),m&&m(f,y)},!dJ(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const s=K0(t),a=t1(s,this.transformPagePoint),{point:c}=a,{timestamp:u}=xn;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,n1(a,this.history)),this.removeListeners=cs(us(this.contextWindow,"pointermove",this.handlePointerMove),us(this.contextWindow,"pointerup",this.handlePointerUp),us(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ma(this.updatePoint)}}function t1(e,t){return t?{point:t(e.point)}:e}function Y3(e,t){return{x:e.x-t.x,y:e.y-t.y}}function n1({point:e},t){return{point:e,delta:Y3(e,hJ(t)),offset:Y3(e,N7e(t)),velocity:P7e(t,.1)}}function N7e(e){return e[0]}function hJ(e){return e[e.length-1]}function P7e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=hJ(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>as(t)));)n--;if(!r)return{x:0,y:0};const o=ls(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function pJ(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Q3=pJ("dragHorizontal"),J3=pJ("dragVertical");function mJ(e){let t=!1;if(e==="y")t=J3();else if(e==="x")t=Q3();else{const n=Q3(),r=J3();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function gJ(){const e=mJ(!0);return e?(e(),!1):!0}function ou(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const vJ=1e-4,k7e=1-vJ,A7e=1+vJ,yJ=.01,T7e=0-yJ,R7e=0+yJ;function Fr(e){return e.max-e.min}function O7e(e,t,n){return Math.abs(e-t)<=n}function X3(e,t,n,r=.5){e.origin=r,e.originPoint=Dt(t.min,t.max,e.origin),e.scale=Fr(n)/Fr(t),e.translate=Dt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=k7e&&e.scale<=A7e||isNaN(e.scale))&&(e.scale=1),(e.translate>=T7e&&e.translate<=R7e||isNaN(e.translate))&&(e.translate=0)}function $h(e,t,n,r){X3(e.x,t.x,n.x,r?r.originX:void 0),X3(e.y,t.y,n.y,r?r.originY:void 0)}function Z3(e,t,n){e.min=n.min+t.min,e.max=e.min+Fr(t)}function I7e(e,t,n){Z3(e.x,t.x,n.x),Z3(e.y,t.y,n.y)}function eB(e,t,n){e.min=t.min-n.min,e.max=e.min+Fr(t)}function Dh(e,t,n){eB(e.x,t.x,n.x),eB(e.y,t.y,n.y)}function M7e(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Dt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Dt(n,e,r.max):Math.min(e,n)),e}function tB(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function $7e(e,{top:t,left:n,bottom:r,right:i}){return{x:tB(e.x,n,i),y:tB(e.y,t,r)}}function nB(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function D7e(e,t){return{x:nB(e.x,t.x),y:nB(e.y,t.y)}}function L7e(e,t){let n=.5;const r=Fr(e),i=Fr(t);return i>r?n=Sd(t.min,t.max-r,e.min):r>i&&(n=Sd(e.min,e.max-i,t.min)),$a(0,1,n)}function F7e(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const PN=.35;function B7e(e=PN){return e===!1?e=0:e===!0&&(e=PN),{x:rB(e,"left","right"),y:rB(e,"top","bottom")}}function rB(e,t,n){return{min:iB(e,t),max:iB(e,n)}}function iB(e,t){return typeof e=="number"?e:e[t]||0}const oB=()=>({translate:0,scale:1,origin:0,originPoint:0}),su=()=>({x:oB(),y:oB()}),sB=()=>({min:0,max:0}),Gt=()=>({x:sB(),y:sB()});function Gr(e){return[e("x"),e("y")]}function xJ({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function U7e({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function z7e(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function r1(e){return e===void 0||e===1}function kN({scale:e,scaleX:t,scaleY:n}){return!r1(e)||!r1(t)||!r1(n)}function dl(e){return kN(e)||bJ(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function bJ(e){return aB(e.x)||aB(e.y)}function aB(e){return e&&e!=="0%"}function mb(e,t,n){const r=e-n,i=t*r;return n+i}function lB(e,t,n,r,i){return i!==void 0&&(e=mb(e,i,r)),mb(e,n,r)+t}function AN(e,t=0,n=1,r,i){e.min=lB(e.min,t,n,r,i),e.max=lB(e.max,t,n,r,i)}function wJ(e,{x:t,y:n}){AN(e.x,t.translate,t.scale,t.originPoint),AN(e.y,n.translate,n.scale,n.originPoint)}const cB=.999999999999,uB=1.0000000000001;function V7e(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&lu(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,wJ(e,s)),r&&dl(o.latestValues)&&lu(e,o.latestValues))}t.x<uB&&t.x>cB&&(t.x=1),t.y<uB&&t.y>cB&&(t.y=1)}function au(e,t){e.min=e.min+t,e.max=e.max+t}function dB(e,t,n,r,i=.5){const o=Dt(e.min,e.max,i);AN(e,t,n,o,r)}function lu(e,t){dB(e.x,t.x,t.scaleX,t.scale,t.originX),dB(e.y,t.y,t.scaleY,t.scale,t.originY)}function _J(e,t){return xJ(z7e(e.getBoundingClientRect(),t))}function q7e(e,t,n){const r=_J(e,n),{scroll:i}=t;return i&&(au(r.x,i.offset.x),au(r.y,i.offset.y)),r}const SJ=({current:e})=>e?e.ownerDocument.defaultView:null,K7e=new WeakMap;class W7e{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Gt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(K0(d,"page").point)},o=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=mJ(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Gr(y=>{let b=this.getAxisMotionValue(y).get()||0;if(yo.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[y];w&&(b=Fr(w)*(parseFloat(b)/100))}}this.originPoint[y]=b}),m&&ht.postRender(()=>m(d,f)),CN(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(d,f)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:y}=f;if(p&&this.currentDirection===null){this.currentDirection=H7e(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&g(d,f)},a=(d,f)=>this.stop(d,f),c=()=>Gr(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new fJ(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:SJ(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&ht.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!vv(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=M7e(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&ou(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=$7e(i.layoutBox,n):this.constraints=!1,this.elastic=B7e(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Gr(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=F7e(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ou(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=q7e(r,i.root,this.visualElement.getTransformPagePoint());let s=D7e(i.layout.layoutBox,o);if(n){const a=n(U7e(s));this.hasMutatedConstraints=!!a,a&&(s=xJ(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=Gr(d=>{if(!vv(d,n,this.currentDirection))return;let f=c&&c[d]||{};s&&(f={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return CN(this.visualElement,t),r.start(PR(t,r,0,n,this.visualElement,!1))}stopAnimation(){Gr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Gr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Gr(n=>{const{drag:r}=this.getProps();if(!vv(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(t[n]-Dt(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ou(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Gr(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const c=a.get();i[s]=L7e({min:c,max:c},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Gr(s=>{if(!vv(s,t,null))return;const a=this.getAxisMotionValue(s),{min:c,max:u}=this.constraints[s];a.set(Dt(c,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;K7e.set(this.visualElement,this);const t=this.visualElement.current,n=us(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();ou(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ht.read(r);const s=es(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Gr(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=PN,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function vv(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function H7e(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class G7e extends el{constructor(t){super(t),this.removeGroupControls=Dn,this.removeListeners=Dn,this.controls=new W7e(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Dn}unmount(){this.removeGroupControls(),this.removeListeners()}}const fB=e=>(t,n)=>{e&&ht.postRender(()=>e(t,n))};class Y7e extends el{constructor(){super(...arguments),this.removePointerDownListener=Dn}onPointerDown(t){this.session=new fJ(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:SJ(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:fB(t),onStart:fB(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&ht.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=us(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const OR=v.createContext(null);function Q7e(){const e=v.useContext(OR);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=v.useId();v.useEffect(()=>r(i),[]);const o=v.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,o]:[!0]}const jJ=v.createContext({}),EJ=v.createContext({}),Gv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function hB(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Yf={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ne.test(e))e=parseFloat(e);else return e;const n=hB(e,t.target.x),r=hB(e,t.target.y);return`${n}% ${r}%`}},J7e={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Da.parse(e);if(i.length>5)return r;const o=Da.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=c;const u=Dt(a,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}},gb={};function X7e(e){Object.assign(gb,e)}const{schedule:IR,cancel:cut}=CQ(queueMicrotask,!1);class Z7e extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;X7e(eYe),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Gv.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||ht.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),IR.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function CJ(e){const[t,n]=Q7e(),r=v.useContext(jJ);return l.jsx(Z7e,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(EJ),isPresent:t,safeToRemove:n})}const eYe={borderRadius:{...Yf,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Yf,borderTopRightRadius:Yf,borderBottomLeftRadius:Yf,borderBottomRightRadius:Yf,boxShadow:J7e},NJ=["TopLeft","TopRight","BottomLeft","BottomRight"],tYe=NJ.length,pB=e=>typeof e=="string"?parseFloat(e):e,mB=e=>typeof e=="number"||Ne.test(e);function nYe(e,t,n,r,i,o){i?(e.opacity=Dt(0,n.opacity!==void 0?n.opacity:1,rYe(r)),e.opacityExit=Dt(t.opacity!==void 0?t.opacity:1,0,iYe(r))):o&&(e.opacity=Dt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<tYe;s++){const a=`border${NJ[s]}Radius`;let c=gB(t,a),u=gB(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||mB(c)===mB(u)?(e[a]=Math.max(Dt(pB(c),pB(u),r),0),(yo.test(u)||yo.test(c))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Dt(t.rotate||0,n.rotate||0,r))}function gB(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const rYe=PJ(0,.5,OQ),iYe=PJ(.5,.95,Dn);function PJ(e,t,n){return r=>r<e?0:r>t?1:n(Sd(e,t,r))}function vB(e,t){e.min=t.min,e.max=t.max}function Wr(e,t){vB(e.x,t.x),vB(e.y,t.y)}function yB(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function xB(e,t,n,r,i){return e-=t,e=mb(e,1/n,r),i!==void 0&&(e=mb(e,1/i,r)),e}function oYe(e,t=0,n=1,r=.5,i,o=e,s=e){if(yo.test(t)&&(t=parseFloat(t),t=Dt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Dt(o.min,o.max,r);e===o&&(a-=t),e.min=xB(e.min,t,n,a,i),e.max=xB(e.max,t,n,a,i)}function bB(e,t,[n,r,i],o,s){oYe(e,t[n],t[r],t[i],t.scale,o,s)}const sYe=["x","scaleX","originX"],aYe=["y","scaleY","originY"];function wB(e,t,n,r){bB(e.x,t,sYe,n?n.x:void 0,r?r.x:void 0),bB(e.y,t,aYe,n?n.y:void 0,r?r.y:void 0)}function _B(e){return e.translate===0&&e.scale===1}function kJ(e){return _B(e.x)&&_B(e.y)}function SB(e,t){return e.min===t.min&&e.max===t.max}function lYe(e,t){return SB(e.x,t.x)&&SB(e.y,t.y)}function jB(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function AJ(e,t){return jB(e.x,t.x)&&jB(e.y,t.y)}function EB(e){return Fr(e.x)/Fr(e.y)}function CB(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class cYe{constructor(){this.members=[]}add(t){kR(this.members,t),t.scheduleRender()}remove(t){if(AR(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function uYe(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=n?.z||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:p,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const dYe=(e,t)=>e.depth-t.depth;class fYe{constructor(){this.children=[],this.isDirty=!1}add(t){kR(this.children,t),this.isDirty=!0}remove(t){AR(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(dYe),this.isDirty=!1,this.children.forEach(t)}}function Yv(e){const t=$n(e)?e.get():e;return r7e(t)?t.toValue():t}function hYe(e,t){const n=xo.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Ma(r),e(o-t))};return ht.read(r,!0),()=>Ma(r)}function pYe(e){return e instanceof SVGElement&&e.tagName!=="svg"}function mYe(e,t,n){const r=$n(e)?e:gm(e);return r.start(PR("",r,t,n)),r.animation}const fl={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},dh=typeof window<"u"&&window.MotionDebug!==void 0,i1=["","X","Y","Z"],gYe={visibility:"hidden"},NB=1e3;let vYe=0;function o1(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function TJ(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=lJ(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ht,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&TJ(r)}function RJ({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t?.()){this.id=vYe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,dh&&(fl.totalNodes=fl.resolvedTargetDeltas=fl.recalculatedProjection=0),this.nodes.forEach(bYe),this.nodes.forEach(EYe),this.nodes.forEach(CYe),this.nodes.forEach(wYe),dh&&window.MotionDebug.record(fl)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new fYe)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new TR),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=pYe(s),this.instance=s;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=hYe(h,250),Gv.hasAnimatedSinceResize&&(Gv.hasAnimatedSinceResize=!1,this.nodes.forEach(kB))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||TYe,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=d.getProps(),x=!this.targetLayout||!AJ(this.targetLayout,m)||p,w=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const S={...pR(g,"layout"),onPlay:y,onComplete:b};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||kB(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ma(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(NYe),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&TJ(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(PB);return}this.isUpdating||this.nodes.forEach(SYe),this.isUpdating=!1,this.nodes.forEach(jYe),this.nodes.forEach(yYe),this.nodes.forEach(xYe),this.clearAllSnapshots();const a=xo.now();xn.delta=$a(0,1e3/60,a-xn.timestamp),xn.timestamp=a,xn.isProcessing=!0,QS.update.process(xn),QS.preRender.process(xn),QS.render.process(xn),xn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,IR.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_Ye),this.sharedNodes.forEach(PYe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Gt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!kJ(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;s&&(a||dl(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),RYe(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var s;const{visualElement:a}=this.options;if(!a)return Gt();const c=a.measureViewportBox();if(!(((s=this.scroll)===null||s===void 0?void 0:s.wasRoot)||this.path.some(OYe))){const{scroll:d}=this.root;d&&(au(c.x,d.offset.x),au(c.y,d.offset.y))}return c}removeElementScroll(s){var a;const c=Gt();if(Wr(c,s),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&Wr(c,s),au(c.x,f.offset.x),au(c.y,f.offset.y))}return c}applyTransform(s,a=!1){const c=Gt();Wr(c,s);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&lu(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),dl(d.latestValues)&&lu(c,d.latestValues)}return dl(this.latestValues)&&lu(c,this.latestValues),c}removeTransform(s){const a=Gt();Wr(a,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!dl(u.latestValues))continue;kN(u.latestValues)&&u.updateSnapshot();const d=Gt(),f=u.measurePageBox();Wr(d,f),wB(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return dl(this.latestValues)&&wB(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==xn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=xn.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gt(),this.relativeTargetOrigin=Gt(),Dh(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Wr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Gt(),this.targetWithTransforms=Gt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),I7e(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Wr(this.target,this.layout.layoutBox),wJ(this.target,this.targetDelta)):Wr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gt(),this.relativeTargetOrigin=Gt(),Dh(this.relativeTargetOrigin,this.target,p.target),Wr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}dh&&fl.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||kN(this.parent.latestValues)||bJ(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),c=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===xn.timestamp&&(u=!1),u)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;Wr(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;V7e(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Gt());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(yB(this.prevProjectionDelta.x,this.projectionDelta.x),yB(this.prevProjectionDelta.y,this.projectionDelta.y)),$h(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!CB(this.projectionDelta.x,this.prevProjectionDelta.x)||!CB(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),dh&&fl.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),s){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=su(),this.projectionDelta=su(),this.projectionDeltaWithTransform=su()}setAnimationOrigin(s,a=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=su();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Gt(),p=c?c.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,y=this.getStack(),b=!y||y.members.length<=1,x=!!(g&&!b&&this.options.crossfade===!0&&!this.path.some(AYe));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const _=S/1e3;AB(f.x,s.x,_),AB(f.y,s.y,_),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Dh(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kYe(this.relativeTarget,this.relativeTargetOrigin,h,_),w&&lYe(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Gt()),Wr(w,this.relativeTarget)),g&&(this.animationValues=d,nYe(d,u,this.latestValues,_,x,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ma(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{Gv.hasAnimatedSinceResize=!0,this.currentAnimation=mYe(0,NB,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(NB),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:d}=s;if(!(!a||!c||!u)){if(this!==s&&this.layout&&u&&OJ(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Gt();const f=Fr(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const h=Fr(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+h}Wr(a,c),lu(a,d),$h(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new cYe),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&o1("z",s,u,this.animationValues);for(let d=0;d<i1.length;d++)o1(`rotate${i1[d]}`,s,u,this.animationValues),o1(`skew${i1[d]}`,s,u,this.animationValues);s.render();for(const d in u)s.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);s.scheduleRender()}getProjectionStyles(s){var a,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return gYe;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Yv(s?.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Yv(s?.pointerEvents)||""),this.hasProjected&&!dl(this.latestValues)&&(g.transform=d?d({},""):"none",this.hasProjected=!1),g}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=uYe(this.projectionDeltaWithTransform,this.treeScale,h),d&&(u.transform=d(h,u.transform));const{x:p,y:m}=this.projectionDelta;u.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,f.animationValues?u.opacity=f===this?(c=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const g in gb){if(h[g]===void 0)continue;const{correct:y,applyTo:b}=gb[g],x=u.transform==="none"?h[g]:y(h[g],f);if(b){const w=b.length;for(let S=0;S<w;S++)u[b[S]]=x}else u[g]=x}return this.options.layoutId&&(u.pointerEvents=f===this?Yv(s?.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(PB),this.root.sharedNodes.clear()}}}function yYe(e){e.updateLayout()}function xYe(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?Gr(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],p=Fr(h);h.min=r[f].min,h.max=h.min+p}):OJ(o,n.layoutBox,r)&&Gr(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],p=Fr(r[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const a=su();$h(a,r,n.layoutBox);const c=su();s?$h(c,e.applyTransform(i,!0),n.measuredBox):$h(c,r,n.layoutBox);const u=!kJ(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const m=Gt();Dh(m,n.layoutBox,h.layoutBox);const g=Gt();Dh(g,r,p.layoutBox),AJ(m,g)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function bYe(e){dh&&fl.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function wYe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function _Ye(e){e.clearSnapshot()}function PB(e){e.clearMeasurements()}function SYe(e){e.isLayoutDirty=!1}function jYe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function kB(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function EYe(e){e.resolveTargetDelta()}function CYe(e){e.calcProjection()}
713function NYe(e){e.resetSkewAndRotation()}function PYe(e){e.removeLeadSnapshot()}function AB(e,t,n){e.translate=Dt(t.translate,0,n),e.scale=Dt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function TB(e,t,n,r){e.min=Dt(t.min,n.min,r),e.max=Dt(t.max,n.max,r)}function kYe(e,t,n,r){TB(e.x,t.x,n.x,r),TB(e.y,t.y,n.y,r)}function AYe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const TYe={duration:.45,ease:[.4,0,.1,1]},RB=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),OB=RB("applewebkit/")&&!RB("chrome/")?Math.round:Dn;function IB(e){e.min=OB(e.min),e.max=OB(e.max)}function RYe(e){IB(e.x),IB(e.y)}function OJ(e,t,n){return e==="position"||e==="preserve-aspect"&&!O7e(EB(t),EB(n),.2)}function OYe(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const IYe=RJ({attachResizeListener:(e,t)=>es(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),s1={current:void 0},IJ=RJ({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!s1.current){const e=new IYe({});e.mount(window),e.setOptions({layoutScroll:!0}),s1.current=e}return s1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),MYe={pan:{Feature:Y7e},drag:{Feature:G7e,ProjectionNode:IJ,MeasureLayout:CJ}};function MB(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(o,s)=>{if(o.pointerType==="touch"||gJ())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const c=a[r];c&&ht.postRender(()=>c(o,s))};return us(e.current,n,i,{passive:!e.getProps()[r]})}class $Ye extends el{mount(){this.unmount=cs(MB(this.node,!0),MB(this.node,!1))}unmount(){}}class DYe extends el{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=cs(es(this.node.current,"focus",()=>this.onFocus()),es(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const MJ=(e,t)=>t?e===t?!0:MJ(e,t.parentElement):!1;function a1(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,K0(n))}class LYe extends el{constructor(){super(...arguments),this.removeStartListeners=Dn,this.removeEndListeners=Dn,this.removeAccessibleListeners=Dn,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=us(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d,globalTapTarget:f}=this.node.getProps(),h=!f&&!MJ(this.node.current,a.target)?d:u;h&&ht.update(()=>h(a,c))},{passive:!(r.onTap||r.onPointerUp)}),s=us(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=cs(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||a1("up",(c,u)=>{const{onTap:d}=this.node.getProps();d&&ht.postRender(()=>d(c,u))})};this.removeEndListeners(),this.removeEndListeners=es(this.node.current,"keyup",s),a1("down",(a,c)=>{this.startPress(a,c)})},n=es(this.node.current,"keydown",t),r=()=>{this.isPressing&&a1("cancel",(o,s)=>this.cancelPress(o,s))},i=es(this.node.current,"blur",r);this.removeAccessibleListeners=cs(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ht.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!gJ()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ht.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=us(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=es(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=cs(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const TN=new WeakMap,l1=new WeakMap,FYe=e=>{const t=TN.get(e.target);t&&t(e)},BYe=e=>{e.forEach(FYe)};function UYe({root:e,...t}){const n=e||document;l1.has(n)||l1.set(n,{});const r=l1.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(BYe,{root:e,...t})),r[i]}function zYe(e,t,n){const r=UYe(t);return TN.set(e,n),r.observe(e),()=>{TN.delete(e),r.unobserve(e)}}const VYe={some:0,all:1};class qYe extends el{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:VYe[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return zYe(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(KYe(t,n))&&this.startObserver()}unmount(){}}function KYe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const WYe={inView:{Feature:qYe},tap:{Feature:LYe},focus:{Feature:DYe},hover:{Feature:$Ye}},HYe={layout:{ProjectionNode:IJ,MeasureLayout:CJ}},$J=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),W0=v.createContext({}),MR=typeof window<"u",GYe=MR?v.useLayoutEffect:v.useEffect,DJ=v.createContext({strict:!1});function YYe(e,t,n,r,i){var o,s;const{visualElement:a}=v.useContext(W0),c=v.useContext(DJ),u=v.useContext(OR),d=v.useContext($J).reducedMotion,f=v.useRef();r=r||c.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.
713initial===!1:!1,reducedMotionConfig:d}));const h=f.current,p=v.useContext(EJ);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&QYe(f.current,n,i,p);const m=v.useRef(!1);v.useInsertionEffect(()=>{h&&m.current&&h.update(n,u)});const g=n[aJ],y=v.useRef(!!g&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,g))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,g)));return GYe(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),IR.render(h.render),y.current&&h.animationState&&h.animationState.animateChanges())}),v.useEffect(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,g)}),y.current=!1))}),h}function QYe(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:LJ(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&ou(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:u})}function LJ(e){if(e)return e.options.allowProjection!==!1?e.projection:LJ(e.parent)}function JYe(e,t,n){return v.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ou(n)&&(n.current=r))},[t])}function H0(e){return z0(e.animate)||hR.some(t=>hm(e[t]))}function FJ(e){return!!(H0(e)||e.variants)}function XYe(e,t){if(H0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||hm(n)?n:void 0,animate:hm(r)?r:void 0}}return e.inherit!==!1?t:{}}function ZYe(e){const{initial:t,animate:n}=XYe(e,v.useContext(W0));return v.useMemo(()=>({initial:t,animate:n}),[$B(t),$B(n)])}function $B(e){return Array.isArray(e)?e.join(" "):e}const DB={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},jd={};for(const e in DB)jd[e]={isEnabled:t=>DB[e].some(n=>!!t[n])};function eQe(e){for(const t in e)jd[t]={...jd[t],...e[t]}}const tQe=Symbol.for("motionComponentSymbol");function nQe({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&eQe(e);function o(a,c){let u;const d={...v.useContext($J),...a,layoutId:rQe(a)},{isStatic:f}=d,h=ZYe(a),p=r(a,f);if(!f&&MR){iQe();const m=oQe(d);u=m.MeasureLayout,h.visualElement=YYe(i,p,d,t,m.ProjectionNode)}return l.jsxs(W0.Provider,{value:h,children:[u&&h.visualElement?l.jsx(u,{visualElement:h.visualElement,...d}):null,n(i,a,JYe(p,h.visualElement,c),p,f,h.visualElement)]})}const s=v.forwardRef(o);return s[tQe]=i,s}function rQe({layoutId:e}){const t=v.useContext(jJ).id;return t&&e!==void 0?t+"-"+e:e}function iQe(e,t){v.useContext(DJ).strict}function oQe(e){const{drag:t,layout:n}=jd;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const sQe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function $R(e){return typeof e!="string"||e.includes("-")?!1:!!(sQe.indexOf(e)>-1||/[A-Z]/u.test(e))}function BJ(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const UJ=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function zJ(e,t,n,r){BJ(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(UJ.has(i)?i:RR(i),t.attrs[i])}function VJ(e,{layout:t,layoutId:n}){return gc.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!gb[e]||e==="opacity")}
713function DR(e,t,n){var r;const{style:i}=e,o={};for(const s in i)($n(i[s])||t.style&&$n(t.style[s])||VJ(s,e)||((r=n?.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[s]=i[s]);return o}function qJ(e,t,n){const r=DR(e,t,n);for(const i in e)if($n(e[i])||$n(t[i])){const o=ng.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function aQe(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}function lQe({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:cQe(r,i,o,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const KJ=e=>(t,n)=>{const r=v.useContext(W0),i=v.useContext(OR),o=()=>lQe(e,t,r,i);return n?o():aQe(o)};function cQe(e,t,n,r){const i={},o=r(e,{});for(const h in o)i[h]=Yv(o[h]);let{initial:s,animate:a}=e;const c=H0(e),u=FJ(e);t&&u&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const f=d?a:s;if(f&&typeof f!="boolean"&&!z0(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p<h.length;p++){const m=dR(e,h[p]);if(m){const{transitionEnd:g,transition:y,...b}=m;for(const x in b){let w=b[x];if(Array.isArray(w)){const S=d?w.length-1:0;w=w[S]}w!==null&&(i[x]=w)}for(const x in g)i[x]=g[x]}}}return i}const LR=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),WJ=()=>({...LR(),attrs:{}}),HJ=(e,t)=>t&&typeof e=="number"?t.transform(e):e,uQe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},dQe=ng.length;function fQe(e,t,n){let r="",i=!0;for(let o=0;o<dQe;o++){const s=ng[o],a=e[s];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(s.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const u=HJ(a,wR[s]);if(!c){i=!1;const d=uQe[s]||s;r+=`${d}(${u}) `}n&&(t[s]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function FR(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,a=!1;for(const c in t){const u=t[c];if(gc.has(c)){s=!0;continue}else if(LQ(c)){i[c]=u;continue}else{const d=HJ(u,wR[c]);c.startsWith("origin")?(a=!0,o[c]=d):r[c]=d}}if(t.transform||(s||n?r.transform=fQe(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:d=0}=o;r.transformOrigin=`${c} ${u} ${d}`}}function LB(e,t,n){return typeof e=="string"?e:Ne.transform(t+n*e)}function hQe(e,t,n){const r=LB(t,e.x,e.width),i=LB(n,e.y,e.height);return`${r} ${i}`}const pQe={offset:"stroke-dashoffset",array:"stroke-dasharray"},mQe={offset:"strokeDashoffset",array:"strokeDasharray"};function gQe(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?pQe:mQe;e[o.offset]=Ne.transform(-r);const s=Ne.transform(t),a=Ne.transform(n);e[o.array]=`${s} ${a}`}function BR(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...u},d,f){if(FR(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:m}=e;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=hQe(m,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&gQe(h,s,a,c,!1)}const UR=e=>typeof e=="string"&&e.toLowerCase()==="svg",vQe={useVisualState:KJ({scrapeMotionValuesFromProps:qJ,createRenderState:WJ,onMount:(e,t,{renderState:n,latestValues:r})=>{ht.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ht.render(()=>{BR(n,r,UR(t.tagName),e.transformTemplate),zJ(t,n)})}})},yQe={useVisualState:KJ({scrapeMotionValuesFromProps:DR,createRenderState:LR})};function GJ(e,t,n){for(const r in t)!$n(t[r])&&!VJ(r,n)&&(e[r]=t[r])}function xQe({transformTemplate:e},t){return v.useMemo(()=>{const n=LR();return FR(n,t,e),Object.assign({},n.vars,n.style)},[t])}function bQe(e,t){const n=e.style||{},r={};return GJ(r,n,e),Object.assign(r,xQe(e,t)),r}function wQe(e,t){const n={},r=bQe(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}
713`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const _Qe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function vb(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||_Qe.has(e)}let YJ=e=>!vb(e);function SQe(e){e&&(YJ=t=>t.startsWith("on")?!vb(t):e(t))}try{SQe(require("@emotion/is-prop-valid").default)}catch{}function jQe(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(YJ(i)||n===!0&&vb(i)||!t&&!vb(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function EQe(e,t,n,r){const i=v.useMemo(()=>{const o=WJ();return BR(o,t,UR(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};GJ(o,e.style,e),i.style={...o,...i.style}}return i}function CQe(e=!1){return(n,r,i,{latestValues:o},s)=>{const c=($R(n)?EQe:wQe)(r,o,s,n),u=jQe(r,typeof n=="string",e),d=n!==v.Fragment?{...u,...c,ref:i}:{},{children:f}=r,h=v.useMemo(()=>$n(f)?f.get():f,[f]);return v.createElement(n,{...d,children:h})}}function NQe(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const s={...$R(r)?vQe:yQe,preloadedFeatures:e,useRender:CQe(i),createVisualElement:t,Component:r};return nQe(s)}}const yb={current:null},zR={current:!1};function QJ(){if(zR.current=!0,!!MR)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>yb.current=e.matches;e.addListener(t),t()}else yb.current=!1}function PQe(e,t,n){for(const r in t){const i=t[r],o=n[r];if($n(i))e.addValue(r,i);else if($n(o))e.addValue(r,gm(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(r);e.addValue(r,gm(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const FB=new WeakMap,kQe=[...UQ,kn,Da],AQe=e=>kQe.find(BQ(e)),BB=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class TQe{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=yR,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=xo.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,ht.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=s;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=H0(n),this.isVariantNode=FJ(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];c[h]!==void 0&&$n(p)&&p.set(c[h],!1)}}mount(t){this.current=t,FB.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
vendor: 6,504 bytes, line 713
713h((n,r)=>this.bindToMotionValue(r,n)),zR.current||QJ(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:yb.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){FB.delete(this.current),this.projection&&this.projection.unmount(),Ma(this.notifyUpdate),Ma(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=gc.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ht.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in jd){const n=jd[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Gt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<BB.length;r++){const i=BB[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,s=t[o];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=PQe(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=gm(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&($Q(i)||MQ(i))?i=parseFloat(i):!AQe(i)&&Da.test(n)&&(i=YQ(t,n)),this.setBaseTarget(t,$n(i)?i.get():i)),$n(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const s=dR(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(i=s[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!$n(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new TR),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class JJ extends TQe{constructor(){super(...arguments),this.KeyframeResolver=QQ}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function RQe(e){return window.getComputedStyle(e)}class OQe extends JJ{constructor(){super(...arguments),this.type="html",this.renderInstance=BJ}readValueFromInstance(t,n){if(gc.has(n)){const r=_R(n);return r&&r.default||0}else{const r=RQe(t),i=(LQ(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return _J(t,n)}build(t,n,r){FR(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return DR(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;$n(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class IQe extends JJ{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Gt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(gc.has(n)){const r=_R(n);return r&&r.default||0}return n=UJ.has(n)?n:RR(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return qJ(t,n,r)}build(t,n,r){BR(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){zJ(t,n,r,i)}mount(t){this.isSVGTag=UR(t.tagName),super.mount(t)}}const MQe=(e,t)=>$R(e)?new IQe(t):new OQe(t,{allowProjection:e!==v.Fragment}),$Qe=NQe({...j7e,...WYe,...MYe,...HYe},MQe),Lh=mGe($Qe);function DQe(){!zR.current&&QJ();const[e]=v.useState(yb.current);return e}const LQe=[{title:"w-24",company:"w-16",score:92},{title:"w-28",company:"w-12",score:86},{title:"w-20",company:"w-14",score:78}],XJ=[.16,1,.3,1];function FQe({score:e,delay:t,reduced:n}){const i=2*Math.PI*15;return l.jsxs("span",{className:"relative inline-flex size-10 shrink-0 items-center justify-center",children:[l.jsxs("svg",{viewBox:"0 0 36 36",className:"absolute inset-0 -rotate-90","aria-hidden":!0,
713children:[l.jsx("circle",{cx:"18",cy:"18",r:15,fill:"none",strokeWidth:"3.5",className:"stroke-primary/15"}),l.jsx(Lh.circle,{cx:"18",cy:"18",r:15,fill:"none",strokeWidth:"3.5",strokeLinecap:"round",className:"stroke-primary",strokeDasharray:i,initial:{strokeDashoffset:n?i*(1-e/100):i},animate:{strokeDashoffset:i*(1-e/100)},transition:{duration:n?0:1.1,delay:n?0:t,ease:XJ}})]}),l.jsx("span",{className:"text-[11px] font-bold tabular-nums text-primary",children:e})]})}function BQe({className:e,still:t=!1}){const n=!!DQe()||t,r=i=>n?{duration:0}:{duration:.45,delay:i,ease:XJ};return l.jsxs("div",{"aria-hidden":!0,"data-testid":"cv-prompt-visual",className:K("relative mx-auto flex w-full max-w-md items-center justify-center gap-4 sm:gap-6",e),children:[l.jsxs(Lh.div,{initial:n?!1:{opacity:0,x:-24,rotate:-6},animate:{opacity:1,x:0,rotate:-3},transition:r(0),className:"relative flex h-40 w-28 shrink-0 flex-col gap-2 rounded-2xl border border-primary/20 bg-card p-3 shadow-brand sm:h-44 sm:w-32",children:[l.jsx("span",{className:"flex size-8 items-center justify-center rounded-lg bg-primary/10 text-primary",children:l.jsx(Cm,{size:16})}
713),l.jsx("span",{className:"h-2 w-16 rounded-full bg-foreground/70"}),l.jsx("span",{className:"h-1.5 w-20 rounded-full bg-muted-foreground/25"}),l.jsx("span",{className:"h-1.5 w-14 rounded-full bg-muted-foreground/25"}),l.jsx("span",{className:"mt-1 h-1.5 w-20 rounded-full bg-muted-foreground/25"}),l.jsx("span",{className:"h-1.5 w-16 rounded-full bg-muted-foreground/25"}),l.jsx("span",{className:"h-1.5 w-12 rounded-full bg-muted-foreground/25"}),!n&&l.jsx(Lh.span,{className:"pointer-events-none absolute inset-x-2 top-10 h-8 rounded-lg bg-gradient-to-b from-primary/0 via-primary/20 to-primary/0",initial:{y:0,opacity:0},animate:{y:[0,70,0],opacity:[0,1,0]},transition:{duration:1.6,delay:.5,ease:"easeInOut"}})]}),l.jsx("div",{className:"flex min-w-0 flex-1 flex-col gap-2.5",children:LQe.map((i,o)=>l.jsxs(Lh.div,{initial:n?!1:{opacity:0,x:20},animate:{opacity:1,x:0},transition:r(.35+o*.12),className:"flex items-center gap-3 rounded-xl border border-border/80 bg-card px-3 py-2 shadow-card",children:[l.jsx("span",{className:"size-7 shrink-0 rounded-lg bg-gradient-to-br from-primary/30 to-primary/10"}),l.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[l.jsx("span",{className:K("h-2 rounded-full bg-foreground
713/60",i.title)}),l.jsx("span",{className:K("h-1.5 rounded-full bg-muted-foreground/30",i.company)})]}),l.jsx(FQe,{score:i.score,delay:.5+o*.12,reduced:n})]},o))})]})}const UQe={home:{title:"Your home fills up once we have your CV",lead:"We read it in about a minute and show the jobs that fit you, best first."},jobs:{title:"Upload your CV to see jobs that fit you",lead:"Every job gets a match score against your CV, so the best ones come first."},"auto-apply":{title:"Auto-apply needs your CV",lead:"We apply with your CV, tailored to each job. Upload it once and you are set."},other:{title:"Upload your CV to see jobs that fit you",lead:"We read it in about a minute and show the jobs that fit you, best first."}};function zQe({page:e}){const t=UQe[e];return l.jsxs("div",{className:"flex min-h-screen flex-col bg-muted/50",children:[l.jsx(VH,{}),l.jsxs("main",{className:"mx-auto flex w-full max-w-2xl flex-1 flex-col items-center px-4 py-10 text-center sm:py-16","data-testid":"no-cv-screen",children:[l.jsx(BQe,{className:"mb-8 sm:mb-10"}),l.jsxs("div",{className:"flex w-full flex-col items-center",children:[l.jsx("h1",{className:"text-balance text-2xl font-black tracking-tight text-foreground sm:text-3xl",children:t.title}),l.jsx("p",{className:"mt-2 max-w-md text-base text-muted-foreground",children:t.lead}),l.jsxs(Re,{to:"/get-started","data-testid":"no-cv-upload",className:"mt-7 inline-flex min-h-12 w-full max-w-xs items-center justify-center gap-2 rounded-xl bg-primary px-5 text-base font-bold text-primary-foreground shadow-brand transition-colors hover:bg-primary/90",children:[l.jsx(Nse,{size:18,"aria-hidden":!0})," Upload my CV"]}),l.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"PDF or DOCX. A LinkedIn profile saved as PDF works too."}),l.jsxs(Re,{to:"/job-market","data-testid":"no-cv-market",className:"mt-6 inline-flex min-h-11 items-center gap-2 rounded-full px-4 text-sm font-semibold text-primary hover:bg-primary/[0.07]",children:[l.jsx(Rse,{size:16,"aria-hidden":!0})," Not now, look around the Job market ",l.jsx(Ad,{size:15,"aria-hidden":!0})]})]})]})]})}function VQe(){const e=Un(),t=pt({select:i=>i.location.pathname}),{access:n}=qa(),r=Qk(n?.unlocked);return v.useEffect(()=>{r&&(OK(t)||e({to:$he,replace:!0}))},[r,t,e]),null}function qQe(e){return e.excluded?!1:e.needsAttention}function KQe(){const t=tt().user?.profile?.sub,n=pt({select:p=>p.location.pathname}),{access:r}=qa(),i=r?.unlocked===!1,o=MH(n)||i,s=fc(!!t),a=v.useMemo(()=>PA(s.data),[s.data]),c=Ow(t,a,{enabled:!!t&&!!a&&!o}),[u,d]=v.useState(!1),f=v.useRef(()=>{});f.current=()=>{s.refetch(),c.refetch()},v.useEffect(()=>xve(()=>{d(!0),f.current()}),[]);const h=qQe({excluded:o,needsAttention:PH(c.data)});return v.useEffect(()=>{h||d(!1)},[h]),!t||!a?null:l.jsx(AH,{userId:t,cvId:a,open:h,appliedContext:u,unlockContext:!u&&Mm(r?.unlock_reason)})}const WQe=[{id:"job-matches",pillLabel:"Job matches",title:"Matched to real, open roles",body:"Your CV becomes your profile. We read your skills, seniority and location, then surface live jobs that actually fit - and keep them current as new ones are posted.",details:["Search and filter across millions of live listings","Save the roles you want to come back to","Get told when something new matches your profile"]},{id:"auto-apply",pillLabel:"Auto-apply",title:"Auto-apply on your behalf",body:"Pick the roles you want and we complete and submit each application for you, tailored to what that employer actually asked for.",details:["Answers the employerâs screening questions from your CV","Re-points your CV at each posting before it sends","Runs in the background while you get on with your day"]},{id:"practice-interviews",pillLabel:"Practice interviews",title:"Practice interviews",body:"A spoken interview with our AI for a role you care about, scored the same way employers score candidates here.",details:["Real questions for the role you pick, out loud","Scored trait by trait, with written feedback","Full transcript to read back afterwards"]},{id:"tailored-documents",pillLabel:"CVs & cover letters",title:"CVs and cover letters for one job",body:"Rewrite your CV and draft a cover letter aimed at one specific posting, built only from facts already on the CV you just gave us.",details:["Formatted and keyworded so ATS software can read it","Nothing invented - your own experience, reframed","Edit, download or print any version you make"]}],HQe={"job-matches":CV,"auto-apply":kV,"practice-interviews":jV,"tailored-documents":Cm},GQe=5e3;function YQe(e,t){return t<=0?0:((e%t+t)%t+1)%t}function QQe({capabilities:e=WQe,advanceMs:t=GQe,className:n}){const r=e.length,[i,o]=v.useState(0),[s,a]=v.useState(!1);if(v.useEffect(()=>{if(s||t<=0||r<=1)return;const d=window.setInterval(()=>{o(f=>YQe(f,r))},t);return()=>window.clearInterval(d)},[s,t,r]),r===0)return null;const c=e[Math.min(i,r-1)],u=HQe[c.id]??CV;return l.jsxs("div",{role:"group","aria-label":"What you can do here",className:K("overflow-hidden rounded-[18px] border border-border bg-card shadow-[0_10px_20px_-8px_rgba(15,23,42,0.10),0_2px_4px_rgba(15,23,42,0.04)]",n),children:[l.jsx("div",{className:"min-h-[236px] px-5 pb-6 pt-6 sm:px-7 sm:pt-[26px]",children:l.jsxs(Lh.div,{initial:{opacity:0,y:8}
713,animate:{opacity:1,y:0},transition:{duration:.42,ease:"easeOut"},className:"flex flex-col items-start gap-4 sm:flex-row sm:gap-[18px]",children:[l.jsx("span",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:l.jsx(u,{size:28,strokeWidth:1.9,"aria-hidden":"true"})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("h3",{className:"mb-2 text-[21px] font-bold tracking-[-0.02em] text-foreground",children:c.title}),l.jsx("p",{className:"mb-4 text-[15px] leading-relaxed text-pretty text-muted-foreground",children:c.body}),l.jsx("ul",{className:"flex flex-col gap-2",children:c.details.map(d=>l.jsxs("li",{className:"flex items-start gap-2.5 text-sm leading-normal text-muted-foreground",children:[l.jsx(Em,{"aria-hidden":"true",className:"mt-[3px] h-[15px] w-[15px] shrink-0 text-muted-foreground",strokeWidth:2.4}),l.jsx("span",{className:"min-w-0",children:d})]},d))})]})]},c.id)}),l.jsx("div",{className:"flex flex-wrap gap-2 border-t border-border/50 bg-muted/60 px-4 py-3",children:e.map((d,f)=>{const h=d.id===c.id;return l.jsx("button",{type:"button","aria-pressed":h,onClick:()=>{o(f),a(!0)},className:K("min-h-9 cursor-pointer rounded-full border px-[15px] py-2 text-[12.5px] font-semibold transition-colors",h?"border-primary bg-primary/10 text-primary":"border-border bg-card text-muted-foreground hover:border-muted-foreground/40 hover:text-foreground"),children:d.pillLabel},d.id)})})]})}const UB=[{id:"search",text:"Searching, matching and saving jobs is free, and always will be.",emphasis:"free"},{id:"cv-parse",text:"The CV you just uploaded was improved and scored for ATS free.",emphasis:"free"}],zB={id:"auto-apply",text:"Applying to a job on your behalf uses a credit each time. Your account starts with a small batch to try it.",emphasis:"uses a credit"};function JQe(e){return e==="OPTION_2"?{free:[...UB,{id:"practice",text:"Practice interviews are free and uncapped - rehearse as often as you want.",emphasis:"free and uncapped"},{id:"documents",text:"Job-specific CVs and cover letters are free, with a fresh allowance every week.",emphasis:"free"}],credits:[zB,{id:"only-thing",text:"That is the only thing on your account that costs anything.",emphasis:"only thing"}]}:{free:[...UB,{id:"practice",text:"A set number of practice interviews is free every week, scored and fed back each time.",emphasis:"free every week"},{id:"documents",text:"Job-specific CVs and cover letters come with a starting allowance at no cost.",emphasis:"starting allowance at no cost"}],credits:[zB,{id:"past-allowance",text:"Going past your weekly practice interviews, or your allowance of tailored documents, uses credits too.",emphasis:"uses credits"}]}}function XQe(e){return e==="OPTION_2"?"Almost everything on your account is free. Here is the one thing that is not.":"Most of what you just read is free. Here is exactly where credits come in."}
713function ZQe(e){const t=e.emphasis?e.text.indexOf(e.emphasis):-1;return t<0?[e.text,"",""]:[e.text.slice(0,t),e.emphasis,e.text.slice(t+e.emphasis.length)]}function eJe(e){return e==="OPTION_1"||e==="OPTION_2"}function VB({row:e,tone:t}){const[n,r,i]=ZQe(e),o=t==="free"?bo:kV;return l.jsxs("li",{className:"flex items-start gap-2.5",children:[l.jsx(o,{size:15,strokeWidth:t==="free"?3:2.4,"aria-hidden":"true",className:K("mt-[3px] shrink-0",t==="free"?"text-success":"text-warning")}),l.jsxs("p",{className:"min-w-0 text-sm leading-relaxed text-muted-foreground",children:[n,r&&l.jsx("strong",{className:"font-bold text-foreground",children:r}),i]})]})}const tJe="Before you start - whatâs free, and what uses credits";function nJe({title:e=tJe,className:t}){const{data:n}=Dw(),r=n?.pricing_group;if(!eJe(r))return null;const i=JQe(r);return l.jsxs("section",{className:K("rounded-[18px] border border-border bg-card px-5 py-5 shadow-sm sm:px-6",t),children:[l.jsx("h2",{className:"text-base font-bold tracking-[-0.01em] text-foreground",children:e}),l.jsx("p",{className:"mt-1 text-[13.5px] text-muted-foreground",children:XQe(r)}),l.jsxs("div",{className:"mt-4 grid grid-cols-1 items-start gap-x-8 gap-y-3 md:grid-cols-2",children:[l.jsx("ul",{className:"flex flex-col gap-3",children:i.free.map(o=>l.jsx(VB,{row:o,tone:"free"},o.id))}),l.jsx("ul",{className:"flex flex-col gap-3",children:i.credits.map(o=>l.jsx(VB,{row:o,tone:"credits"},o.id))})]})]})}const rJe=24*60*60*1e3,ZJ="asgard.filters.",RN=1;function VR({surface:e,userId:t,scope:n}){const r=`${ZJ}${e}.${t}`;return n?`${r}.${n}`:r}function Fh(e){try{localStorage.removeItem(e)}catch{}}function iJe(e,t=Date.now()){if(!e.userId)return;const n=VR(e);let r;try{r=localStorage.getItem(n)}catch{return}if(!r)return;let i;try{i=JSON.parse(r)}catch{Fh(n);return}const o=sJe(i);if(!o){Fh(n);return}const s=e.ttlMs??rJe;if(t-o.savedAt>=s){Fh(n);return}return o.data}function oJe(e,t,n=Date.now()){if(!e.userId)return;const r={v:RN,savedAt:n,data:t};try{localStorage.setItem(VR(e),JSON.stringify(r))}catch{}}function dut(e){e.userId&&Fh(VR(e))}function fut(e){if(!e)return;const t=`.${e}`,n=[];try{for(let r=0;r<localStorage.length;r++){const i=localStorage.key(r);!i||!i.startsWith(ZJ)||(i.endsWith(t)||i.includes(`${t}.`))&&n.push(i)}}catch{return}n.forEach(Fh)}function sJe(e){if(!e||typeof e!="object")return;const t=e;if(t.v===RN&&!(typeof t.savedAt!="number"||!Number.isFinite(t.savedAt))&&t.data!==void 0)return{v:RN,savedAt:t.savedAt,data:t.data}}const eX="explainer-seen",tX=1/0;function nX(e){const t=iJe({surface:eX,userId:e,ttlMs:tX});if(!t||typeof t!="object")return;const r=t.unlockDialogSeenAt;return{unlockDialogSeenAt:typeof r=="string"?r:void 0}}function ON(e){return e?!!nX(e)?.unlockDialogSeenAt:!0}function rX(e,t=new Date().toISOString()){e&&oJe({surface:eX,userId:e,ttlMs:tX},{...nX(e),unlockDialogSeenAt:t})}function aJe(e){return e.startsWith("/interview")||e.startsWith("/practice-interview")||e.startsWith("/create-resume")||e.startsWith("/onboarding")||e.startsWith("/get-started")||e.startsWith("/profile-ready")}function lJe(e){return e.seen||e.excludedPath||e.gapBlocking||e.unlocked!==!0||!Mm(e.unlockReason)?!1:e.billingResolved}function cJe(){const t=tt().user?.profile?.sub,n=pt({select:d=>d.location.pathname}),{access:r}=qa(),i=mbe(),o=Dw(),[s,a]=v.useState(()=>ON(t));v.useEffect(()=>{a(ON(t))},[t]);const c=lJe({gateEnabled:RK,unlocked:r?.unlocked,unlockReason:r?.unlock_reason,excludedPath:aJe(n),gapBlocking:i,billingResolved:o.isSuccess||o.isError,seen:s}),u=v.useCallback(()=>{rX(t),a(!0)},[t]);return l.jsx(At,{open:c,onOpenChange:d=>{d||u()},children:l.jsxs(xt,{className:"max-h-[88vh] overflow-y-auto sm:max-w-2xl",children:[l.jsxs(Wt,{children:[l.jsx(Ft,{className:"text-xl font-bold tracking-tight text-foreground",children:"The rest of asgardhire.ai is open to you"}),l.jsx(Bt,{className:"text-sm text-muted-foreground",children:"That role has been decided, so everything else is now yours to use. Here's what's here."})]}),l.jsx(QQe,{className:"mt-1"}),l.jsx(nJe,{title:"What's free, and what uses credits",className:"mt-1"}),l.jsx("div",{className:"mt-1 flex justify-end",children:l.jsx(G,{type:"button",onClick:u,children:"Got it"})})]})})}function hl(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function c1(e){const t=e&&typeof e=="object"?e:{},n=t.unlimited===!0;return{unlimited:n,per_period:n?null:hl(t.per_period),period_days:hl(t.period_days)??0,used:n?null:hl(t.used_this_period),remaining:n?null:hl(t.remaining_this_period),resets_at:typeof t.resets_at=="string"?t.resets_at:null,credits:Math.max(0,hl(t.credits)??0)}}function uJe(e){if(!e||typeof e!="object")return null;const t=e,n=t.auto_apply&&typeof t.auto_apply=="object"?t.auto_apply:{};return{billing_enabled:t.billing_enabled!==!1,has_active_subscription:t.has_active_subscription===!0,job_search_free:t.job_search_free!==!1,matching_free:t.matching_free!==!1,practice_interviews:c1(t.practice_interviews),tailored_documents:c1(t.tailored_documents),auto_apply:{...c1(n),taster_granted:Math.max(0,hl(n.taster_granted)??0),taster_remaining:Math.max(0,hl(n.taster_remaining)??0)}}}const dJe=["candidate-allowances"];function iX(e){if(!ot.isAxiosError(e))return!1;const t=e.response?.status;return t===404||t===405||t===501}async function fJe(e,t){try{const n=await ee.get("/candidate/allowances",{headers:e,signal:t});return uJe(n.data)}catch(n){if(iX(n))return null;throw n}}function hJe(e=!0){const t=q();return ue({queryKey:dJe,queryFn:({signal:n})=>fJe(t,n),enabled:e,staleTime:5*6e4,retry:(n,r)=>!iX(r)&&n<1})}function pJe(e){return e.startsWith("/get-started")||e.startsWith("/profile-ready")||e.startsWith("/onboarding")||e.startsWith("/interview/")||e.startsWith("/practice-interview")||e.startsWith("/create-resume")||e.startsWith("/revenuecat-funnel-auth")||e.startsWith("/welcome")||e.startsWith("/job-market")}function mJe(e){return!e.userId||e.seen||e.excludedPath||!e.accessKnown||e.locked||!e.hasReadCv?!1:(e.gatedArrival||!e.seenATour)&&!e.seenUnlockExplainer}function gJe(e,t){return e?{title:"That role has been decided.",lead:"Here are jobs that fit you now.",button:"See my jobs"}:{title:t?`Welcome, ${t}`:"Welcome",lead:"Here is what you can do here.",button:"See my jobs"}}const vJe="We find jobs that fit your CV. We can apply to them for you. You can do a practice interview for any job.";function yJe(e){if(!e)return null;const t=[];e.job_search_free&&e.matching_free?t.push("Searching jobs and matching are free."):e.job_search_free&&t.push("Searching jobs is free.");const n=e.auto_apply.taster_remaining;return e.auto_apply.unlimited?t.push("Auto-apply is free."):n>0?t.push(`You have ${n} free auto-apply ${n===1?"try":"tries"}.`):t.push("Auto-apply uses credits."),t.join(" ")}function xJe(e){const t=e;return t==="OPTION_2"?"Searching jobs, matching, practice interviews and tailored CVs are free. Only applying for you uses credits.":t==="OPTION_1"?"Searching and matching jobs is free. You get free practice interviews each week and some free tailored CVs. Applying for you uses credits.":null}function oX(e){return`ux.welcomeSeen.${e}`}function qB(e){if(!e)return!0;try{return window.localStorage.getItem(oX(e))!==null}catch{return!0}}function bJe(e,t=new Date){if(e)try{window.localStorage.setItem(oX(e),t.toISOString())}catch{}}const sX="ux.gatedWelcomeShown",wJe="ux:gated-welcome-shown";function _Je(){try{window.sessionStorage.setItem(sX,"1")}catch{}try{window.dispatchEvent(new Event(wJe))}catch{}}function hut(){try{return window.sessionStorage.getItem(sX)==="1"}catch{return!1}}function IN({icon:e,title:t,text:n}){return l.jsxs("li",{className:"flex items-start gap-3 rounded-xl border border-border bg-card p-3.5",children:[l.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:l.jsx(e,{size:18,"aria-hidden":!0})}),l.jsxs("span",{className:"min-w-0",children:[l.jsx("span",{className:"block text-sm font-bold text-foreground",children:t}),l.jsx("span",{className:"mt-0.5 block text-sm leading-relaxed text-muted-foreground",children:n})]})]})}function SJe(){const{state:e}=UH(),t=lW(e);return t?l.jsx(IN,{icon:Fse,title:"Your next step",text:t.text}):null}function jJe(){const e=tt(),t=e.user?.profile?.sub,n=e.user?.profile?.given_name,r=Un(),i=pt({select:w=>w.location.pathname}),{access:o,isFetched:s,isError:a}=qa(),c=fc(!!t),u=Dw(),[d,f]=v.useState(()=>qB(t));v.useEffect(()=>f(qB(t)),[t]);const h=Mm(o?.unlock_reason),p=mJe({userId:t,seen:d,excludedPath:pJe(i),accessKnown:s||a,locked:o?.unlocked===!1,hasReadCv:(c.data??[]).some(w=>w.parsed_status==="complete"),gatedArrival:h,seenUnlockExplainer:ON(t),seenATour:dp("candidate-cold",t)||dp("candidate-invited",t)});v.useEffect(()=>{p&&h&&_Je()},[p,h]);const m=v.useCallback(()=>{bJe(t),rX(t),tme(t),f(!0)},[t]),g=()=>{m(),i!=="/dashboard"&&r({to:"/dashboard"})},y=gJe(h,n),b=hJe(p),x=yJe(b.data)??xJe(u.data?.pricing_group);return l.jsx(At,{open:p,onOpenChange:w=>w?void 0:m(),children:l.jsxs(xt,{className:"max-h-[88vh] overflow-y-auto sm:max-w-md","data-testid":"welcome-sheet",children:[l.jsxs(Wt,{children:[l.jsx(Ft,{className:"text-xl font-bold text-foreground",children:y.title}),l.jsx(Bt,{className:"text-sm text-muted-foreground",children:y.lead})]}),l.jsxs("ul",{className:"space-y-2.5",children:[l.jsx(IN,{icon:ip,title:"What you can do here",text:vJe}),x&&l.jsx(IN,{icon:Pse,title:"What's free",text:x}),p&&l.jsx(SJe,{})]}),l.jsxs("button",{type:"button",onClick:g,className:"mt-1 inline-flex h-12 w-full items-center justify-center gap-2 rounded-xl bg-primary px-5 text-sm font-bold text-primary-foreground hover:bg-primary/90",children:[y.button," ",l.jsx(Ad,{size:16,"aria-hidden":!0})]})]})})}function EJe(){return zr()?l.jsx(jJe,{}):l.jsxs(l.Fragment,{children:[l.jsx(KQe,{}),l.jsx(cJe,{})]})}function CJe(){const e=mA(Pm.portalEntry),t=v.useRef(e);t.current=e;const n=v.useRef(!1);return v.useEffect(()=>{window.location.pathname!=="/welcome"&&(n.current||(n.current=!0,t.current()))},[]),null}const NJe="Don't use my CV to find me jobs at other companies",MN="job-matching-opt-out-pending";async function PJe(e){return(await ee.get("/job-matching-consent",{headers:e})).data}async function aX(e,t,n){return(await ee.put("/job-matching-consent",{opted_out:t,source:n},{headers:e})).data}function lX(e){try{e?window.localStorage.setItem(MN,JSON.stringify(e)):window.localStorage.removeItem(MN)}catch{}}function cX(){try{const e=window.localStorage.getItem(MN);if(!e)return null;const t=JSON.parse(e);return typeof t.opted_out!="boolean"||typeof t.source!="string"?null:{opted_out:t.opted_out,source:t.source}}catch{return null}}function kJe(){const e=tt(),t=e.isAuthenticated?e.user?.id_token:void 0;return v.useEffect(()=>{if(!t)return;const n=cX();n&&aX({Authorization:`Bearer ${t}`},n.opted_out,n.source).then(()=>lX(null)).catch(()=>{})},[t]),null}const AJe=["not_applied","applied","no_reply","interviewing","rejected","offer"],uX={not_applied:"Not applied yet",applied:"Applied",no_reply:"No reply yet",interviewing:"Interviewing",rejected:"Rejected",offer:"Offer"},put={saved:"Saved",documents_ready:"Tailored CV ready",in_auto_apply_list:"In your auto-apply list",awaiting_approval:"Auto-apply pick waiting for you",auto_apply_in_progress:"Auto-apply running",auto_apply_not_completed:"Auto-apply did not finish",auto_applied:"Auto-applied",applied_myself:"Applied myself",did_not_apply:"You said you did not apply",application_received:"Application received",interview_invited:"Invited to interview",interview_in_progress:"Interview in progress",interview_completed:"Interview done",not_selected:"Not selected",hired:"Hired",no_response_14_days:"No reply in 14 days",set_by_you:"Status set by you"},Nl=["my-jobs"],TJe=100;function dX(e){if(!ot.isAxiosError(e))return!1;const t=e.response?.status;return t===404||t===405||t===501}function fX(e){return typeof e=="string"&&AJe.includes(e)}function Zi(e){return typeof e=="string"?e:""}function RJe(e){if(!e||typeof e!="object")return null;const t=e,n=Zi(t.job_key);return!n||!fX(t.status)?null:{job_key:n,job_id:Zi(t.job_id)||null,title:Zi(t.title)||"Untitled job",company:Zi(t.company),location:Zi(t.location),job_url:Zi(t.job_url),status:t.status,status_label:Zi(t.status_label)||uX[t.status],status_set_by_you:t.status_set_by_you===!0,detail:Zi(t.detail),sources:Array.isArray(t.sources)?t.sources.filter(r=>typeof r=="string"):[],updated_at:Zi(t.last_activity_at),applied_at:Zi(t.applied_at)||null}}function OJe(e){const t=e&&typeof e=="object"?e:{},n=Array.isArray(t.items)?t.items.map(RJe).filter(s=>s!==null):[],r={};if(Array.isArray(t.statuses))for(const s of t.statuses){const a=s&&typeof s=="object"?s:{};fX(a.status)&&typeof a.count=="number"&&(r[a.status]=a.count)}
713const i=t.pagination&&typeof t.pagination=="object"?t.pagination:{},o=typeof i.total=="number"?i.total:n.length;return{available:!0,items:n,counts:r,total:o}}async function IJe(e,t,n){try{const r={limit:TJe};t?.length;const i=await ee.get("/my-jobs",{headers:e,signal:n,params:r});return OJe(i.data)}catch(r){if(dX(r))return{available:!1,items:[],counts:{},total:0};throw r}}function mut(e=!0){const t=q();return ue({queryKey:Nl,queryFn:({signal:n})=>IJe(t,void 0,n),enabled:e,staleTime:3e4,retry:(n,r)=>!dX(r)&&n<2})}function hX(e,t,n,r){return e&&{...e,items:e.items.map(i=>i.job_key===t?{...i,status:n,status_label:uX[n],status_set_by_you:r}:i)}}function pX(e){const t={};return e?.title&&(t.title=e.title),e?.company&&(t.company=e.company),e?.job_url&&(t.job_url=e.job_url),e?.location&&(t.location=e.location),t}function gut(){const e=q(),t=oe();return ie({mutationFn:async({jobKey:n,status:r,job:i})=>{await ee.put("/my-jobs/status",{job_key:n,status:r,...pX(i)},{headers:e})},onMutate:async({jobKey:n,status:r})=>{const i=t.getQueryData(Nl);return r!=="auto"&&t.setQueryData(Nl,o=>hX(o,n,r,!0)),{prev:i}},onError:(n,r,i)=>{i?.prev&&t.setQueryData(Nl,i.prev)},onSettled:()=>{t.invalidateQueries({queryKey:Nl})}})}function MJe(){const e=q(),t=oe();return ie({mutationFn:async({jobKey:n,applied:r,job:i})=>{await ee.post("/my-jobs/apply-myself",{job_key:n,applied:r,...pX(i)},{headers:e})},onSuccess:(n,{jobKey:r,applied:i})=>{i&&t.setQueryData(Nl,o=>hX(o,r,"applied",!1)),t.invalidateQueries({queryKey:Nl})}})}function $Je(){const[e,t]=v.useState(null);v.useEffect(()=>{const r=()=>{if(typeof document<"u"&&document.visibilityState==="hidden")return;const i=yve();i&&t(i)};return document.addEventListener("visibilitychange",r),window.addEventListener("focus",r),()=>{document.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}},[]);const n=v.useCallback(()=>{xW(),t(null)},[]);return[e,n]}function DJe(){const[e,t]=$Je(),n=MJe();if(!e)return null;const r=async o=>{const{job_id:s,title:a,company:c,job_url:u,location:d}=e;t();try{await n.mutateAsync({jobKey:s,applied:o,job:{title:a,company:c,job_url:u,location:d}}),o&&Q.success("Added to My jobs as Applied")}catch{}},i=e.title?e.company?`${e.title} at ${e.company}`:e.title:"this job";return l.jsxs("div",{role:"dialog","aria-label":"Did you apply?","data-testid":"did-you-apply",className:"fixed inset-x-4 bottom-4 z-50 rounded-2xl border border-border bg-card p-4 shadow-lg sm:inset-x-auto sm:right-6 sm:w-96",children:[l.jsxs("div",{className:"flex items-start justify-between gap-2",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Did you apply?"}),l.jsxs("p",{className:"mt-1 break-words text-sm text-muted-foreground",children:["You opened ",i,". Tell us and we will track it in My jobs."]})]}),l.jsx("button",{type:"button","aria-label":"Not now",onClick:t,className:"-mr-1 -mt-1 inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-muted-foreground hover:bg-muted",children:l.jsx(Dr,{size:16,"aria-hidden":!0})})]}),l.jsxs("div",{className:"mt-3 flex gap-2",children:[l.jsx("button",{type:"button",onClick:()=>void r(!0),className:"h-10 flex-1 rounded-xl bg-primary px-4 text-sm font-semibold text-primary-foreground hover:bg-primary/90",children:"Yes, I applied"}),l.jsx("button",{type:"button",onClick:()=>void r(!1),className:"h-10 flex-1 rounded-xl border border-border px-4 text-sm font-semibold text-foreground hover:bg-muted",children:"No"})]})]})}const mX=v.createContext(!1);function vut(){return v.useContext(mX)}const LJe="Your session expired. Please sign in again.",gX="session",vX="expired",yX=`/sign-in?${gX}=${vX}`,xX="candidate-return-to";function FJe(e){return e.renewal==="failed"?"session-expired":e.isLoading||e.renewal==="pending"?"wait":e.isAuthenticated?"render":e.hasStoredUser&&e.hasRefreshToken&&e.renewal==="idle"?"renew":e.hasStoredUser?"session-expired":"anonymous"}function BJe(e,t=window.localStorage){if(e&&e!=="/")try{t.setItem(xX,e)}catch{}return yX}function UJe(e){return new URLSearchParams(e).get(gX)===vX}function bX(e){const[t,n]=v.useState("idle"),r=e.user,i=FJe({isLoading:e.isLoading,isAuthenticated:e.isAuthenticated,hasStoredUser:!!r,hasRefreshToken:!!r?.refresh_token,renewal:t}),o=v.useRef(!0);return v.useEffect(()=>(o.current=!0,()=>{o.current=!1}),[]),v.useEffect(()=>{i==="renew"&&(n("pending"),VJe(()=>e.signinSilent(),zJe).then(s=>{o.current&&n(s&&!s.expired?"succeeded":"failed")}
713).catch(()=>{o.current&&n("failed")}))},[i]),v.useEffect(()=>{const s=e.events;if(s?.addSilentRenewError)return s.addSilentRenewError(a=>{a instanceof ys&&n("failed")})},[e.events]),v.useEffect(()=>{const s=e.events;if(s?.addUserLoaded)return s.addUserLoaded(a=>{a.expired||n(c=>c==="failed"?"idle":c)})},[e.events]),i}const zJe=[2e3,5e3,1e4];async function VJe(e,t,n=r=>new Promise(i=>setTimeout(i,r))){for(let r=0;;r++)try{return await e()}catch(i){if(i instanceof ys||r>=t.length)throw i;await n(t[r])}}const qJe=({children:e})=>{const t=tt(),n=Un(),r=window.location.pathname==="/revenuecat-funnel-auth";v.useEffect(()=>{sessionStorage.getItem("recruiter-login-opened-candidate")&&(sessionStorage.removeItem("recruiter-login-opened-candidate"),Q("These are Candidate credentials - you're signed in to your Candidate account, not a Recruiter one.",{icon:"â¹ï¸",duration:8e3}))},[]);const i=bX(t),o=sW();return v.useEffect(()=>{const s=window.location.pathname+window.location.search;if(i==="session-expired"){window.location.replace(BJe(s));return}if(i==="anonymous"){s&&s!=="/"&&localStorage.setItem(xX,s),n({to:"/"});return}i==="render"&&t.user?.profile?.role!=="CANDIDATE"&&window.location.replace($d())},[i,t.user?.profile?.role,n]),i==="wait"||i==="renew"?l.jsx("div",{className:"min-h-screen flex flex-col items-center justify-center bg-card",children:l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx(ft,{size:48,variant:"brand",spin:!0,title:"",className:"mb-4"}),l.jsx("h2",{className:"text-xl font-medium text-primary mb-1",children:"Loading candidate portalâ¦"}),l.jsx("p",{className:"text-muted-foreground",children:"Please wait while we verify your access."})]})}):i!=="render"||t.user?.profile?.role!=="CANDIDATE"?null:l.jsx(mX.Provider,{value:!0,children:l.jsxs("div",{className:"candidate-theme",children:[l.jsx(jQ,{}),!r&&l.jsx(Wge,{}),!r&&l.jsx(VQe,{}),!r&&l.jsx(EJe,{}),!r&&l.jsx(CJe,{}),l.jsx(kJe,{}),!r&&zr()&&l.jsx(DJe,{}),o&&!r?l.jsx(zQe,{page:o}):e]})})},KJe=J("/_candidate")({component:()=>l.jsx(qJe,{children:l.jsx(Fa,{})})});function WJe(e){return Zm({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"},child:[]}]})(e)}const HJe={candidate:[{to:"/home",label:"Home"},{to:"/for-candidates",label:"For candidates"},{to:"/pricing",label:"Pricing"}],recruiter:[{to:"/home",label:"Home"},{to:"/for-recruiters",label:"For recruiters"},{to:"/pricing",label:"Pricing"}],public:[{to:"/home",label:"Home"},{to:"/for-candidates",label:"For candidates"},{to:"/for-recruiters",label:"For recruiters"},{to:"/pricing",label:"Pricing"}]},GJe=[{to:"/about",label:"About"},{to:"/careers",label:"Careers"},{to:"/contact",label:"Contact"}],YJe={candidate:[{to:"/privacy-policy",label:"Privacy"},{to:"/terms-of-service",label:"Terms"},{to:"/cookie-policy",label:"Cookies"},{to:"/acceptable-use-policy",label:"Acceptable use"},{to:"/community-standards",label:"Community standards"}],recruiter:[{to:"/privacy-policy",label:"Privacy"},{to:"/terms-of-service",label:"Terms"},{to:"/employer-terms",label:"Employer terms"},{to:"/cookie-policy",label:"Cookies"},{to:"/acceptable-use-policy",label:"Acceptable use"}],public:[{to:"/privacy-policy",label:"Privacy"},{to:"/terms-of-service",label:"Terms"},{to:"/employer-terms",label:"Employer terms"},{to:"/cookie-policy",label:"Cookies"},{to:"/acceptable-use-policy",label:"Acceptable use"},{to:"/community-standards",label:"Community standards"}]},QJe=[{href:"https://www.instagram.com/asgardworldofficial/",label:"Instagram",Icon:Ase,size:18},{href:"https://www.facebook.com/profile.php?id=61565959302666",label:"Facebook",Icon:Ese,size:18},{href:"https://www.linkedin.com/company/86141559/",label:"LinkedIn",Icon:Ose,size:18},{href:"https://www.tiktok.com/@asgard.worlder",label:"TikTok",Icon:WJe,size:17}];function u1({heading:e,links:t,className:n,listClassName:r}){return l.jsxs("div",{className:K("min-w-0",n),children:[l.jsx("h2",{className:"text-[11px] font-bold uppercase tracking-[0.14em] text-foreground",children:e}),l.jsx("ul",{className:K("mt-3 space-y-2",r),children:t.map(i=>l.jsx("li",{children:l.jsx(Re,{to:i.to,className:"text-sm text-muted-foreground transition-colors hover:text-primary",children:i.label})},i.to))})]})}
713function JJe({audience:e,social:t=!1,className:n}){return l.jsx("footer",{className:K("mt-12 border-t border-border bg-card",n),children:l.jsxs("div",{className:"mx-auto w-full max-w-6xl px-4 py-8 sm:px-6 sm:py-10 lg:px-8",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6 sm:gap-8 sm:grid-cols-3 lg:grid-cols-4",children:[l.jsxs("div",{className:"col-span-2 sm:col-span-3 lg:col-span-1",children:[l.jsx(Re,{to:"/home",className:"inline-flex",children:l.jsx(Zk,{size:20})}),l.jsx("p",{className:"mt-3 max-w-xs text-sm text-muted-foreground",children:"One platform for the two sides of the same hire."}),t&&l.jsx("div",{className:"mt-4 flex gap-4",children:QJe.map(({href:r,label:i,Icon:o,size:s})=>l.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer","aria-label":`asgardhire.ai on ${i}`,className:"rounded text-muted-foreground transition-colors hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card",children:l.jsx(o,{size:s,"aria-hidden":!0})},i))})]}),l.jsx(u1,{heading:"Product",links:HJe[e]}),l.jsx(u1,{heading:"Company",links:GJe}),l.jsx(u1,{heading:"Legal",links:YJe[e],className:"col-span-2 sm:col-span-1",listClassName:"grid grid-cols-2 gap-x-8 gap-y-2 space-y-0 sm:block sm:space-y-2"})]}),l.jsxs("p",{className:"mt-8 border-t border-border/50 pt-6 sm:mt-10 text-xs text-muted-foreground",children:["© ",new Date().getFullYear()," Asgard World Ltd. All rights reserved."]})]})})}function wX(){const[e,t]=v.useState({open:!1,data:void 0}),n=v.useCallback(i=>{t({open:!0,data:i})},[]),r=v.useCallback(()=>{t({open:!1,data:void 0})},[]);return{open:e.open,data:e.data,openDialog:n,closeDialog:r}}var _X={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Qf,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",s="second",a="minute",c="hour",u="day",d="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R){var D=["th","st","nd","rd"],O=R%100;return"["+R+(D[(O-20)%10]||D[O]||D[0])+"]"}},w=function(R,D,O){var F=String(R);return!F||F.length>=D?R:""+Array(D+1-F.length).join(O)+R},S={s:w,z:function(R){var D=-R.utcOffset(),O=Math.abs(D),F=Math.floor(O/60),T=O%60;return(D<=0?"+":"-")+w(F,2,"0")+":"+w(T,2,"0")},m:function R(D,O){if(D.date()<O.date())return-R(O,D);var F=12*(O.year()-D.year())+(O.month()-D.month()),T=D.clone().add(F,f),M=O-T<0,V=D.clone().add(F+(M?-1:1),f);return+(-(F+(O-T)/(M?T-V:V-T))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:f,y:p,w:d,d:u,D:m,h:c,m:a,s,ms:o,Q:h}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},_="en",j={};j[_]=x;var E="$isDayjsObject",C=function(R){return R instanceof A||!(!R||!R[E])},N=function R(D,O,F){var T;if(!D)return _;
vendor: 4,237 bytes, line 713
713if(typeof D=="string"){var M=D.toLowerCase();j[M]&&(T=M),O&&(j[M]=O,T=M);var V=D.split("-");if(!T&&V.length>1)return R(V[0])}else{var B=D.name;j[B]=D,T=B}return!F&&T&&(_=T),T||!F&&_},k=function(R,D){if(C(R))return R.clone();var O=typeof D=="object"?D:{};return O.date=R,O.args=arguments,new A(O)},P=S;P.l=N,P.i=C,P.w=function(R,D){return k(R,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var A=function(){function R(O){this.$L=N(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[E]=!0}var D=R.prototype;return D.parse=function(O){this.$d=function(F){var T=F.date,M=F.utc;if(T===null)return new Date(NaN);if(P.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var V=T.match(y);if(V){var B=V[2]-1||0,I=(V[7]||"0").substring(0,3);return M?new Date(Date.UTC(V[1],B,V[3]||1,V[4]||0,V[5]||0,V[6]||0,I)):new Date(V[1],B,V[3]||1,V[4]||0,V[5]||0,V[6]||0,I)}}return new Date(T)}(O),this.init()},D.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},D.$utils=function(){return P},D.isValid=function(){return this.$d.toString()!==g},D.isSame=function(O,F){var T=k(O);return this.startOf(F)<=T&&T<=this.endOf(F)},D.isAfter=function(O,F){return k(O)<this.startOf(F)},D.isBefore=function(O,F){return this.endOf(F)<k(O)},D.$g=function(O,F,T){return P.u(O)?this[F]:this.set(T,O)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(O,F){var T=this,M=!!P.u(F)||F,V=P.p(O),B=function(W,ne){var se=P.w(T.$u?Date.UTC(T.$y,ne,W):new Date(T.$y,ne,W),T);return M?se:se.endOf(u)},I=function(W,ne){return P.w(T.toDate()[W].apply(T.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(ne)),T)},z=this.$W,H=this.$M,de=this.$D,ge="set"+(this.$u?"UTC":"");switch(V){case p:return M?B(1,0):B(31,11);case f:return M?B(1,H):B(0,H+1);case d:var te=this.$locale().weekStart||0,ye=(z<te?z+7:z)-te;return B(M?de-ye:de+(6-ye),H);case u:case m:return I(ge+"Hours",0);case c:return I(ge+"Minutes",1);case a:return I(ge+"Seconds",2);case s:return I(ge+"Milliseconds",3);default:return this.clone()}},D.endOf=function(O){return this.startOf(O,!1)},D.$set=function(O,F){var T,M=P.p(O),V="set"+(this.$u?"UTC":""),B=(T={},T[u]=V+"Date",T[m]=V+"Date",T[f]=V+"Month",T[p]=V+"FullYear",T[c]=V+"Hours",T[a]=V+"Minutes",T[s]=V+"Seconds",T[o]=V+"Milliseconds",T)[M],I=M===u?this.$D+(F-this.$W):F;if(M===f||M===p){var z=this.clone().set(m,1);z.$d[B](I),z.init(),this.$d=z.set(m,Math.min(this.$D,z.daysInMonth())).$d}else B&&this.$d[B](I);return this.init(),this},D.set=function(O,F){return this.clone().$set(O,F)},D.get=function(O){return this[P.p(O)]()},D.add=function(O,F){var T,M=this;O=Number(O);var V=P.p(F),B=function(H){var de=k(M);return P.w(de.date(de.date()+Math.round(H*O)),M)};if(V===f)return this.set(f,this.$M+O);if(V===p)return this.set(p,this.$y+O);if(V===u)return B(1);if(V===d)return B(7);var I=(T={},T[a]=r,T[c]=i,T[s]=n,T)[V]||1,z=this.$d.getTime()+O*I;return P.w(z,this)},D.subtract=function(O,F){return this.add(-1*O,F)},D.format=function(O){var F=this,T=this.$locale();if(!this.isValid())return T.invalidDate||g;var M=O||"YYYY-MM-DDTHH:mm:ssZ",V=P.z(this),B=this.$H,I=this.$m,z=this.$M,H=T.weekdays,de=T.months,ge=T.meridiem,te=function(ne,se,U,ae){return ne&&(ne[se]||ne(F,M))||U[se].slice(0,ae)},ye=function(ne){return P.s(B%12||12,ne,"0")},W=ge||function(ne,se,U){var ae=ne<12?"AM":"PM";return U?ae.toLowerCase():ae};return M.replace(b,function(ne,se){return se||function(U){switch(U){case"YY":return String(F.$y).slice(-2);case"YYYY":return P.s(F.$y,4,"0");case"M":return z+1;case"MM":return P.s(z+1,2,"0");case"MMM":return te(T.monthsShort,z,de,3);case"MMMM":return te(de,z);case"D":return F.$D;case"DD":return P.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return te(T.weekdaysMin,F.$W,H,2);case"ddd":return te(T.weekdaysShort,F.$W,H,3);case"dddd":return H[F.$W];case"H":return String(B);case"HH":return P.s(B,2,"0");case"h":return ye(1);case"hh":return ye(2);case"a":return W(B,I,!0);case"A":return W(B,I,!1);case"m":return String(I);case"mm":return P.s(I,2,"0");
713case"s":return String(F.$s);case"ss":return P.s(F.$s,2,"0");case"SSS":return P.s(F.$ms,3,"0");case"Z":return V}return null}(ne)||V.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(O,F,T){var M,V=this,B=P.p(F),I=k(O),z=(I.utcOffset()-this.utcOffset())*r,H=this-I,de=function(){return P.m(V,I)};switch(B){case p:M=de()/12;break;case f:M=de();break;case h:M=de()/3;break;case d:M=(H-z)/6048e5;break;case u:M=(H-z)/864e5;break;case c:M=H/i;break;case a:M=H/r;break;case s:M=H/n;break;default:M=H}return T?M:P.a(M)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return j[this.$L]},D.locale=function(O,F){if(!O)return this.$L;var T=this.clone(),M=N(O,F,!0);return M&&(T.$L=M),T},D.clone=function(){return P.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},R}(),L=A.prototype;return k.prototype=L,[["$ms",o],["$s",s],["$m",a],["$H",c],["$W",u],["$M",f],["$y",p],["$D",m]].forEach(function(R){L[R[1]]=function(D){return this.$g(D,R[0],R[1])}}),k.extend=function(R,D){return R.$i||(R(D,A,k),R.$i=!0),k},k.locale=N,k.isDayjs=C,k.unix=function(R){return k(1e3*R)},k.en=j[_],k.Ls=j,k.p={},k})})(_X);var XJe=_X.exports;const G0=ct(XJe);function ZJe(){const e=q(),t=tt(),n=t.user?.profile?.org_id||t.user?.profile?.organization_id||"";return ie({mutationFn:async r=>(await Be.post(`/orgs/${n}/job-ads`,r,{headers:e})).data})}function yut({slug:e}){return ue({enabled:!!e,queryKey:["public-job",e],queryFn:async()=>(await Be.get(`/public/jobs/${e}`)).data,retry:!1})}function xut(){const e=q();return ie({mutationFn:async t=>{const n={};return t.cv_id?n.cv_id=t.cv_id:(n.cv_base64=t.cv_base64,n.cv_filename=t.cv_filename),(await Be.post(`/public/jobs/${t.slug}/apply`,n,{headers:e})).data}})}function but(e,t){const n=q();return ue({enabled:t&&!!e,queryKey:["application-status",e],queryFn:async()=>(await Be.get(`/public/jobs/${e}/application-status`,{headers:n})).data,retry:!1})}function eXe(){const e=q(),t=tt(),n=t.user?.profile?.org_id||t.user?.profile?.organization_id||"";return ie({mutationFn:async r=>(await Be.patch(`/orgs/${n}/job-ads/${r}/deactivate`,{},{headers:e})).data})}function SX({jdId:e}={}){const t=q(),n=tt(),r=n.user?.profile?.org_id||n.user?.profile?.organization_id||"";return ue({enabled:!!r,queryKey:["job-ads",r,e],queryFn:async()=>{const i=e?`?jd_id=${e}`:"",s=(await Be.get(`/orgs/${r}/job-ads${i}`,{headers:t})).data;return Array.isArray(s)?s:s?.job_ads??s?.items??[]},retry:!1})}function tXe(){const e=q();return ue({queryKey:["jd-list"],queryFn:async()=>(await Be.get("/jds",{headers:e})).data?.job_descriptions||[]})}function Y0({jdId:e}){const t=q();return ue({enabled:!!e,queryKey:["jd-details",e],queryFn:async()=>{if(!e)throw new Error("jdId is required");const n=await Be.get("/jds/"+e,{headers:t});return n.data.culture_fit_threshold||(n.data.culture_fit_threshold=50),n.data.job_fit_threshold||(n.data.job_fit_threshold=50),n.data.filter_mode||(n.data.filter_mode="dream"),n.data},retry:!1,staleTime:3e4})}function nXe(e){const t=q();return ue({enabled:!!e,queryKey:["jd-summary-analytics",e],queryFn:async()=>{const{data:n}=await ee.post("/analytics/jd-summary",{jdId:e},{headers:t});return n},retry:!1,staleTime:6e4})}function wut(e){const t=q();return ue({enabled:!!e,queryKey:["jd-overview",e],queryFn:async()=>{const{data:n}=await ee.post("/analytics/jd-overview",{jdId:e},{headers:t});return n},retry:!1,staleTime:3e4})}function _ut(e,t="current"){const n=q();return ue({enabled:!!e,queryKey:["trait-heatmap",e,t],queryFn:async()=>{if(!e)throw new Error("jdId is required");const{data:r}=await ee.post("/analytics/trait-heatmap",{jdId:e},{headers:n,params:{source:t}});return r},retry:!1,staleTime:3e4})}function Sut({jdId:e,source:t="current"}){const n=q();return ue({enabled:!!e,queryKey:["score-distribution",e,t],queryFn:async()=>{if(!e)throw new Error("jdId and weights are required");const{data:r}=await ee.post("/analytics/score-distribution",{jdId:e},{headers:n,params:{source:t}});return r},retry:!1,staleTime:3e4})}function jut({jdId:e,thresholds:t,dreamCandidateCount:n,source:r="current"}){const i=q();return ue({enabled:!!e&&(!!n||!!t.jobFit&&!!t.cultureFit),queryKey:["candidate-opportunity-matrix",e,r],queryFn:async()=>
713{if(!e)throw new Error("jdId is required");const o=n?{jdId:e,dreamCandidateCount:n}:{jdId:e,jobFitThreshold:t.jobFit,cultureFitThreshold:t.cultureFit},{data:s}=await ee.post("/analytics/candidate-opportunity-matrix",o,{headers:i,params:{source:r}});return s},retry:!1,staleTime:3e4,placeholderData:Hb})}function Eut(){const e=q(),t=oe();return ie({mutationFn:async n=>{if(!n.jdId)throw new Error("jdId is required");const{data:r}=await ee.post("/analytics/candidate-opportunity-matrix",{...n,saveConfiguration:!0},{headers:e});return r},onSuccess:async(n,r)=>{const i=["candidate-opportunity-matrix",r.jdId,"current"];t.setQueryData(i,n),t.invalidateQueries({queryKey:["candidate-opportunity-matrix",r.jdId],predicate:o=>o.queryKey[2]!=="current",refetchType:"active"})}})}function Cut(e,t){const n=q();return ue({queryKey:["screening-status-v2",e],queryFn:async()=>(await dc.get(`/screening/${e}/status`,{headers:n})).data,enabled:t&&!!e,refetchInterval:r=>{const i=r.state.data;return i&&(["pending","screening_rejected","screening_in_review"].includes(i.status)||i.next_action!=="wait")?!1:3e3},retry:2})}function rXe(e){if(Array.isArray(e))return{candidates:e};const t=e?.candidates;return{candidates:Array.isArray(t)?t:[]}}function jX(e){const t=q(),n=Lw();return ue({queryKey:["screening-pending-reviews-v2",n,e],queryFn:async()=>{const r=e?`?jd_id=${e}`:"",i=await dc.get(`/orgs/${n}/screening/pending-reviews${r}`,{headers:t});return rXe(i.data)},enabled:!!n,retry:!1})}function Nut(){const e=q(),t=oe();return ie({mutationFn:async({orgId:n,interviewId:r,decision:i,rejectionMessage:o})=>(await dc.post(`/orgs/${n}/screening/${r}/review`,{decision:i,rejection_message:o},{headers:e})).data,onSuccess:()=>{t.invalidateQueries({queryKey:["screening-pending-reviews-v2"]}),t.invalidateQueries({queryKey:[VK]})}})}function Put(){const e=q(),t=oe();return ie({mutationFn:async({orgId:n,interviewId:r,emailSubject:i,emailBody:o})=>(await dc.post(`/orgs/${n}/screening/${r}/override-rejection`,{email_subject:i,email_body:o},{headers:e})).data,onSuccess:(n,r)=>{t.invalidateQueries({queryKey:["screening-pending-reviews-v2"]}),t.invalidateQueries({queryKey:["candidate",r.interviewId]}),t.invalidateQueries({queryKey:["candidate-search"]}),t.invalidateQueries({queryKey:["candidates"]})}})}const or=1e3,vm=2e3,KB=vm*or;function gf(e){return!!e&&e.budget_cents!==null&&e.funded_interviews!==null}function un(e){if(e==null)return"-";const t=e<0?"-":"",n=Math.abs(e)/100,r=Math.abs(e)%100!==0,i=n.toLocaleString("en-US",{minimumFractionDigits:r?2:0,maximumFractionDigits:2});return`${t}$${i}`}function La(e){return Math.floor(e/or)}function qi(e){return`${e.toLocaleString("en-US")} interview${e===1?"":"s"}`}function $N(e){return`~${qi(e)}`}const iXe=[.8,1];function EX(e){if(!gf(e))return"uncapped";if(e.budget_cents<=0)return"exhausted";const[t,n]=iXe,r=e.committed_cents/e.budget_cents;return r>=n?"exhausted":r>=t?"warning":"calm"}function kut(e){return e?gf(e)?`${un(e.committed_cents)} / ${un(e.budget_cents)} committed - ${e.committed_interviews.toLocaleString("en-US")}/${$N(e.funded_interviews)}`:`${un(e.committed_cents)} committed - no budget set`:""}function Aut(e){return!e||e.committed_interviews===0?"":`${e.started_interviews.toLocaleString("en-US")} started, ${e.awaiting_candidate.toLocaleString("en-US")} awaiting candidate`}function oXe(e){if(!gf(e)||e.budget_cents<=0)return null;const t=e.committed_cents/e.budget_cents*100;return Math.max(0,Math.min(100,t))}function sXe(e){if(e?.halted)return{kind:"halted",reason:e.halt_reason??"post_budget"};const t=EX(e);if(t==="exhausted")return{kind:"exhausted"};if(t==="warning"){const n=oXe(e);return{kind:"warning",percent:n===null?0:Math.round(n)}}return{kind:"none"}}function nc(e){const t=e.trim().replace(/[$,]/g,"");return!t||!/^\d+$/.test(t)?null:Number(t)}function CX(e){const t=e.trim().replace(/,/g,"");return!t||!/^\d+$/.test(t)?null:Number(t)}function qR(e){return e*(or/100)}function aXe(e){return La(e*100)}function NX(e,t){if(e==="budget")return t;const n=nc(t);return n===null?"":String(aXe(n))}function PX(e,t){if(e==="budget")return t;const n=CX(t);return n===null?"":String(qR(n))}function DN(e,t){if(e===null)return"Enter an interview budget for this job.";const n=e*100;if(n<or)return`The minimum budget is ${un(or)} - one interview.`;if(n>
713KB)return`The maximum is ${vm.toLocaleString("en-US")} interviews (${un(KB)}).`;if(t>0){const r=Math.ceil(t/or)*or;if(n<r)return`This job has already committed ${un(t)}, and those candidates can't be un-invited. ${un(r)} is the floor.`}return n%or!==0?"Enter a multiple of $10":null}function Q0(e){return e?e.is_paid?Math.max(0,e.credits_balance??0):Math.max(0,(e.trial_total??0)-(e.trial_used??0)):0}function lXe(e){return Math.min(Math.max(e*2,40),vm)}function cXe(e){if(!e)return null;if(!e.is_paid){const r=e.trial_used_cents??(e.trial_used??0)*or,i=e.trial_total_cents??(e.trial_total??0)*or;return`New orgs start with ${J2(i)} free trial interviews - you've used ${J2(r)}.`}const t=e.credits_balance_cents??(e.credits_balance??0)*or;if(t<0)return`Your organisation currently owes ${Ir(t).replace("-","")} - buy credits to keep publishing.`;if(t%or!==0)return`${Ir(t)} available in interview credits on your organisation.`;const n=Math.max(0,e.credits_balance??0);return`${n.toLocaleString("en-US")} interview credit${n===1?"":"s"} available on your organisation.`}function kX(e){const t=Q0(e);return`${e?.is_paid?"credits":"trial limit"} · ${t.toLocaleString("en-US")}`}function uXe(e,t){if(t==null)return null;const n=La(t),r=un(t);return typeof e!="number"?`Set up for ${qi(n)} (${r}).`:`Set up for ${e.toLocaleString("en-US")} expected candidates â ${qi(n)} (${r}).`}function dXe(e,t){return t==null||e===La(t)?null:`Prefilled from this role's existing ${un(t)} budget.`}function AX(e,t){if(e===null||!t)return null;const n=La(e),r=Q0(t);return n<=r?null:`This budget funds ${$N(n)}, but your organisation can currently pay for ${$N(r)}. You can save it now - interviews just stop once the credits run out.`}function TX(e){const t=e;return t?.response?.status!==400?null:t.response.data?.error??t.response.data?.message??null}function Tut(e){const t=e;if(t?.response?.status!==409)return null;const n=t.response.data?.reason;return n!=="org_balance_exhausted"&&n!=="interview_budget_exhausted"?null:t.response.data?.message??t.response.data?.error??null}function RX(e){const t=q(),n=oe();return ie({mutationFn:async({interviewBudgetCents:r,expectedCandidates:i})=>{if(!e)throw new Error("jdId is required");return(await xw.put(`/jds/${encodeURIComponent(e)}`,{interview_budget_cents:r,...i==null?{}:{expected_candidates:i}},{headers:t})).data},onSuccess:async()=>{await Promise.all([n.invalidateQueries({queryKey:["jd-details",e]}),n.invalidateQueries({queryKey:["jd-overview",e]}),n.invalidateQueries({queryKey:["jd-v2",e]})])}})}function KR(){const t=tt().user?.profile;return t?.org_id??t?.organization_id??""}const WR=e=>["hiring-window",e];function OX(e){const t=q(),n=KR();return ue({queryKey:WR(e??""),queryFn:async({signal:r})=>{try{return(await ee.get(`/orgs/${n}/jds/${encodeURIComponent(e)}/hiring-window`,{headers:t,signal:r})).data}catch(i){if(i?.response?.status===404)return null;throw i}},enabled:!!e&&!!n,retry:1})}function fXe(e){const t=q(),n=KR(),r=oe();return ie({mutationFn:async()=>(await ee.post(`/orgs/${n}/jds/${encodeURIComponent(e)}/hiring-window/extend`,{},{headers:t})).data,onSuccess:i=>{r.setQueryData(WR(e??""),i)}})}function hXe(e){const t=q(),n=KR(),r=oe();return ie({mutationFn:async()=>(await ee.post(`/orgs/${n}/jds/${encodeURIComponent(e)}/hiring-window/close`,{},{headers:t})).data,onSuccess:i=>{r.setQueryData(WR(e??""),i)}})}const IX=[14,7,1];function pXe(e){if(!e)return"calm";if(e.closed_at)return"closed";const[t,n,r]=IX;return e.days_remaining<=r?"urgent":e.days_remaining<=n?"warning":e.days_remaining<=t?"notice":"calm"}const mXe=60*60*1e3;function MX(e,t=Date.now()){if(!e)return"";if(e.closed_at)return"This role is closed";const n=Date.parse(e.deadline)-t;if(Number.isFinite(n)&&n>0&&n<mXe){const i=Math.ceil(n/6e4);return i===1?"Closes in 1 minute":`Closes in ${i} minutes`}const r=e.days_remaining;return r<0?"Past its closing date - closing automatically":r===0?"Closes today":r===1?"Closes tomorrow":`Closes in ${r} days`}const[,gXe]=IX;function vXe(e,t=Date.now()){return e?e.closed_at?{kind:"closed",closedAt:e.closed_at}:e.days_remaining>gXe?{kind:"none"}:e.days_remaining>=1?{kind:"warning",label:`Auto-closes in ${e.days_remaining} day${e.days_remaining===1?"":"s"}`}:{kind:"warning",label:MX(e,t)}:{kind:"none"}}const $X=[{id:"talent",name:"Talent Report",description:"The shortlist for this role, grouped Dream / Apprentice / Maverick.",icon:Cm},{id:"candidate-summary",name:"Candidate Summary",description:"Verdict and evidence for one person on this role.",icon:Cse},{id:"candidate-profile",name:"Candidate Profile",description:"A parsed one-pager with none of your scoring on it.",icon:wse}],Rut=$X.filter(e=>
713e.id==="candidate-summary"||e.id==="candidate-profile"),Out={id:"hiring-report",name:"Hiring Report",description:"Headline totals, the org-wide funnel, and every role compared side by side.",icon:yV};function yXe(e){return e<=0?"No reports yet":`${e} report${e===1?"":"s"}`}function xXe(e){return e&&(e.totalCandidates??0)===0?[]:$X}function bXe(e){return e.map(wXe).join(" · ")}function wXe(e){return e.name.replace(/^Candidate /,"")}function _Xe(e,t){if(t)return{long:"Hide reports",short:"Hide"};const n=yXe(e.length);return{long:n,short:n}}function SXe({reports:e,variant:t="inline",expanded:n=!1,onToggle:r,to:i,search:o,context:s,className:a}){const c=_Xe(e,n),u=bXe(e),d=s?`${c.long} for ${s}`:c.long,f=c.short===c.long?c.long:l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"sm:hidden",children:c.short}),l.jsx("span",{className:"hidden sm:inline",children:c.long})]}),h=l.jsx(Em,{"aria-hidden":!0,className:K("h-4 w-4 shrink-0 transition-transform",n&&"rotate-90")}),p=t==="panel"?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:l.jsx(Cm,{className:"h-4 w-4","aria-hidden":!0})}),l.jsxs("span",{className:"min-w-0 flex-1 text-left",children:[l.jsx("span",{className:"block text-sm font-semibold text-foreground",children:f}),l.jsx("span",{className:"mt-0.5 block truncate text-xs text-muted-foreground",children:u})]}),l.jsx("span",{className:"text-primary",children:h})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{children:f}),h]}),m=K(t==="panel"?"flex w-full items-center gap-3 rounded-xl border border-border bg-card px-4 py-3 text-left transition-colors hover:border-primary/40":"inline-flex items-center gap-1 text-sm font-semibold text-primary",a);return i?l.jsx(Re,{to:i,search:o,className:K(m,"no-underline"),"aria-label":d,children:p}):r?l.jsx("button",{type:"button",onClick:r,"aria-expanded":n,"aria-label":d,className:K(m,"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:p}):l.jsx("span",{className:m,children:p})}var DX=["PageUp","PageDown"],LX=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],FX={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},vf="Slider",[LN,jXe,EXe]=Xb(vf),[BX,Iut]=Ps(vf,[EXe]),[CXe,J0]=BX(vf),UX=v.forwardRef((e,t)=>{const{name:n,min:r=0,max:i=100,step:o=1,orientation:s="horizontal",disabled:a=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:d,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:m,...g}=e,y=v.useRef(new Set),b=v.useRef(0),w=s==="horizontal"?NXe:PXe,[S=[],_]=si({prop:d,defaultProp:u,onChange:P=>{[...y.current][b.current]?.focus(),f(P)}}),j=v.useRef(S);function E(P){const A=OXe(S,P);k(P,A)}function C(P){k(P,b.current)}function N(){const P=j.current[b.current];S[b.current]!==P&&h(S)}function k(P,A,{commit:L}={commit:!1}){const R=DXe(o),D=LXe(Math.round((P-r)/o)*o+r,R),O=Jy(D,[r,i]);_((F=[])=>{const T=TXe(F,O,A);if($Xe(T,c*o)){b.current=T.indexOf(O);const M=String(T)!==String(F);return M&&L&&h(T),M?T:F}else return F})}return l.jsx(CXe,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:i,valueIndexToChangeRef:b,thumbs:y.current,values:S,orientation:s,form:m,children:l.jsx(LN.Provider,{scope:e.__scopeSlider,children:l.jsx(LN.Slot,{scope:e.__scopeSlider,children:l.jsx(w,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:xe(g.onPointerDown,()=>{a||(j.current=S)}),min:r,max:i,inverted:p,onSlideStart:a?void 0:E,onSlideMove:a?void 0:C,onSlideEnd:a?void 0:N,onHomeKeyDown:()=>!a&&k(r,0,{commit:!0}),onEndKeyDown:()=>!a&&k(i,S.length-1,{commit:!0}),onStepKeyDown:({event:P,direction:A})=>{if(!a){const D=DX.includes(P.key)||P.shiftKey&&LX.includes(P.key)?10:1,O=b.current,F=S[O],T=o*D*A;k(F+T,O,{commit:!0})}}})})})})});UX.displayName=vf;var[zX,VX]=BX(vf,{startEdge:"left",endEdge:"right",size:"width",direction:1}),NXe=v.forwardRef((e,t)=>
713{const{min:n,max:r,dir:i,inverted:o,onSlideStart:s,onSlideMove:a,onSlideEnd:c,onStepKeyDown:u,...d}=e,[f,h]=v.useState(null),p=rt(t,w=>h(w)),m=v.useRef(),g=Od(i),y=g==="ltr",b=y&&!o||!y&&o;function x(w){const S=m.current||f.getBoundingClientRect(),_=[0,S.width],E=HR(_,b?[n,r]:[r,n]);return m.current=S,E(w-S.left)}return l.jsx(zX,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:l.jsx(qX,{dir:g,"data-orientation":"horizontal",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=x(w.clientX);s?.(S)},onSlideMove:w=>{const S=x(w.clientX);a?.(S)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:w=>{const _=FX[b?"from-left":"from-right"].includes(w.key);u?.({event:w,direction:_?-1:1})}})})}),PXe=v.forwardRef((e,t)=>{const{min:n,max:r,inverted:i,onSlideStart:o,onSlideMove:s,onSlideEnd:a,onStepKeyDown:c,...u}=e,d=v.useRef(null),f=rt(t,d),h=v.useRef(),p=!i;function m(g){const y=h.current||d.current.getBoundingClientRect(),b=[0,y.height],w=HR(b,p?[r,n]:[n,r]);return h.current=y,w(g-y.top)}return l.jsx(zX,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:l.jsx(qX,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const y=m(g.clientY);o?.(y)},onSlideMove:g=>{const y=m(g.clientY);s?.(y)},onSlideEnd:()=>{h.current=void 0,a?.()},onStepKeyDown:g=>{const b=FX[p?"from-bottom":"from-top"].includes(g.key);c?.({event:g,direction:b?-1:1})}})})}),qX=v.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:o,onHomeKeyDown:s,onEndKeyDown:a,onStepKeyDown:c,...u}=e,d=J0(vf,n);return l.jsx(Oe.span,{...u,ref:t,onKeyDown:xe(e.onKeyDown,f=>{f.key==="Home"?(s(f),f.preventDefault()):f.key==="End"?(a(f),f.preventDefault()):DX.concat(LX).includes(f.key)&&(c(f),f.preventDefault())}),onPointerDown:xe(e.onPointerDown,f=>{const h=f.target;h.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(h)?h.focus():r(f)}),onPointerMove:xe(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&i(f)}),onPointerUp:xe(e.onPointerUp,f=>{const h=f.target;h.hasPointerCapture(f.pointerId)&&(h.releasePointerCapture(f.pointerId),o(f))})})}),KX="SliderTrack",WX=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=J0(KX,n);return l.jsx(Oe.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:t})});WX.displayName=KX;var FN="SliderRange",HX=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=J0(FN,n),o=VX(FN,n),s=v.useRef(null),a=rt(t,s),c=i.values.length,u=i.values.map(h=>YX(h,i.min,i.max)),d=c>1?Math.min(...u):0,f=100-Math.max(...u);return l.jsx(Oe.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:a,style:{...e.style,[o.startEdge]:d+"%",[o.endEdge]:f+"%"}})});HX.displayName=FN;var BN="SliderThumb",GX=v.forwardRef((e,t)=>{const n=jXe(e.__scopeSlider),[r,i]=v.useState(null),o=rt(t,a=>i(a)),s=v.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return l.jsx(kXe,{...e,ref:o,index:s})}),kXe=v.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:i,...o}=e,s=J0(BN,n),a=VX(BN,n),[c,u]=v.useState(null),d=rt(t,x=>u(x)),f=c?s.form||!!c.closest("form"):!0,h=Qb(c),p=s.values[r],m=p===void 0?0:YX(p,s.min,s.max),g=RXe(r,s.values.length),y=h?.[a.size],b=y?IXe(y,m,a.direction):0;return v.useEffect(()=>{if(c)return s.thumbs.add(c),()=>{s.thumbs.delete(c)}},[c,s.thumbs]),l.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${m}% + ${b}px)`},children:[l.jsx(LN.ItemSlot,{scope:e.__scopeSlider,children:l.jsx(Oe.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":s.min,"aria-valuenow":p,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...o,ref:d,style:p===void 0?{display:"none"}:e.style,onFocus:xe(e.onFocus,()=>{s.valueIndexToChangeRef.current=r})})}),f&&l.jsx(AXe,{name:i??(s.name?s.name+(s.values.length>1?"[]":""):void 0),form:s.form,value:p},r)]})});GX.displayName=BN;var AXe=e=>{const{value:t,...n}=e,r=v.useRef(null),i=Yb(t);return v.useEffect(()=>{const o=r.current,s=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(s,"value").set;if(i!==t&&c){const u=new Event("input",{bubbles:!0});c.call(o,t),o.dispatchEvent(u)}},[i,t]),l.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function TXe(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,o)=>i-o)}function YX(e,t,n){const o=100/(n-t)*(e-t);return Jy(o,[0,100])}function RXe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function OXe(e,t){if(e.length===1)return 0;const n=e.map(i=>
713Math.abs(i-t)),r=Math.min(...n);return n.indexOf(r)}function IXe(e,t,n){const r=e/2,o=HR([0,50],[0,r]);return(r-o(t)*n)*n}function MXe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function $Xe(e,t){if(t>0){const n=MXe(e);return Math.min(...n)>=t}return!0}function HR(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function DXe(e){return(String(e).split(".")[1]||"").length}function LXe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var QX=UX,FXe=WX,BXe=HX,UXe=GX;const JX=v.forwardRef(({className:e,rangeClassName:t,thumbClassName:n,trackChildren:r,...i},o)=>l.jsxs(QX,{ref:o,className:K("relative flex w-full touch-none select-none items-center",e),...i,children:[l.jsxs(FXe,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:[r,l.jsx(BXe,{className:K("absolute h-full bg-primary",t)})]}),l.jsx(UXe,{className:K("block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",n)})]}));JX.displayName=QX.displayName;const zXe="How many candidates do you expect to apply to this role?",XX=["Cost is charged in stages as an applicant progresses (a CV review, then screening, then the interview), not only once they finish","Check in regularly to see how many interviews have been used, so you always have enough balance to keep interviewing."];function ym(e,t,n){const r=t.trim();if(!r)return null;if(e==="budget")return DN(nc(r),n);const i=CX(r);return i===null?e==="candidates"?"Enter a whole number of candidates.":"Enter a whole number of interviews.":i<1?e==="candidates"?"Enter at least 1 candidate.":"Enter at least 1 interview.":DN(qR(i),n)}function Mut({value:e,onChange:t,expectedCandidates:n,figureNamed:r=!1,error:i,usage:o,org:s,compact:a=!1}){const[c,u]=v.useState(null),[d,f]=v.useState(!1),h=c??NX("candidates",e),p=o?.committed_interviews??0,m=o?.committed_cents??0,g=ym("candidates",h,m),y=i||g,b=nc(e),x=y||b===null?null:b*100,w=x===null?null:La(x),S=w===null?"-":w.toLocaleString("en-US"),_=x===null?"-":un(x),j=y?null:AX(x,s),E=r?null:dXe(n,o?.budget_cents??null),C=k=>{u(k);const P=PX("candidates",k),A=nc(P);t(P,A===null?null:La(A*100))},N=l.jsxs(l.Fragment,{children:[l.jsxs("label",{htmlFor:"interview_budget",className:"mb-2 block text-sm font-medium text-muted-foreground",children:[zXe," ",l.jsx("span",{className:"text-destructive",children:"*"})]}),l.jsxs("div",{className:"relative max-w-[15rem]",children:[l.jsx("span",{className:"pointer-events-none absolute right-3 top-5 -translate-y-1/2 text-xs text-muted-foreground",children:"candidates"}),l.jsx(Le,{id:"interview_budget",name:"interview_budget",type:"text",inputMode:"numeric",value:h,onChange:k=>C(k.target.value),placeholder:"25","aria-invalid":!!y,"aria-describedby":y?"interview-budget-error":"interview-budget-help",className:K("pr-[5.5rem]",y&&"border-destructive")}
713)]}),y?l.jsx("p",{id:"interview-budget-error",className:"mt-1 text-sm text-destructive",children:y}):l.jsx("p",{id:"interview-budget-help",className:"mt-1 text-xs text-muted-foreground",children:"Nothing is charged yet - this sets the ceiling on what this role can spend."}),E&&l.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:E}),l.jsxs("div",{role:"group","aria-label":"Interview budget summary",className:"mt-3 flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 rounded-lg border border-border bg-card px-4 py-3",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Interview budget"}),l.jsx("div",{className:"mt-0.5 text-2xl font-bold tabular-nums text-foreground",children:_})]}),l.jsx("div",{className:"text-xs text-muted-foreground",children:w===null?"Funds -":`Funds ${qi(w)}`})]}),l.jsxs("div",{className:"mt-3",children:[l.jsxs("button",{type:"button","aria-expanded":d,"aria-controls":"interview-budget-breakdown",onClick:()=>f(k=>!k),className:"inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",children:[l.jsx(Em,{className:K("h-3.5 w-3.5 transition-transform",d&&"rotate-90"),"aria-hidden":"true"}),"See how this is calculated"]}),d&&l.jsxs("div",{id:"interview-budget-breakdown",className:"mt-3",children:[l.jsxs("div",{className:"overflow-hidden rounded-lg border border-border",children:[l.jsxs("div",{className:"flex justify-between gap-4 px-3 py-2 text-xs text-muted-foreground",children:[l.jsx("span",{children:"Candidates expected"}),l.jsx("span",{className:"tabular-nums",children:S})]}),l.jsxs("div",{className:"flex justify-between gap-4 border-t border-border px-3 py-2 text-xs text-muted-foreground",children:[l.jsx("span",{children:"Each candidate you interview"}),l.jsx("span",{className:"tabular-nums text-muted-foreground",children:"1 interview"})]}),l.jsxs("div",{className:"flex justify-between gap-4 border-t border-border px-3 py-2 text-xs text-muted-foreground",children:[l.jsx("span",{children:"Interview cost"}),l.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[S," à ",un(or)]})]}),l.jsxs("div",{className:"flex justify-between gap-4 border-t border-border bg-muted/50 px-3 py-2 text-xs font-semibold text-foreground",children:[l.jsx("span",{children:"Interview budget"}),l.jsx("span",{className:"tabular-nums",children:_})]})]}),l.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Every interview costs ",un(or),". You can set the interviews or the budget figure directly when you publish this role, or from its settings. Candidates who qualify once the budget is spent wait rather than being rejected."]})]})]}),!y&&p>0&&l.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:[un(o?.committed_cents)," (",qi(p),") is already committed on this job, so that is the lowest budget you can set."]}),j&&l.jsx("p",{className:"mt-2 text-xs text-warning",children:j}),o&&!gf(o)&&l.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"This job was created before interview budgets existed and has run uncapped. Set one to take control of what it can spend."}),l.jsx("div",{className:"my-3 h-px bg-secondary"}),l.jsx("ul",{className:"flex list-none flex-col gap-1 p-0",children:XX.map(k=>l.jsxs("li",{className:"flex gap-2 text-xs text-muted-foreground",children:[l.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground",children:"â¢"}),l.jsx("span",{children:k})]},k))})]});return a?l.jsxs("div",{className:"bg-muted/50 rounded-xl p-5 border border-border",children:[l.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[l.jsx(ck,{className:"h-4 w-4 text-primary shrink-0"}),l.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Interview budget"})]}),N]}):l.jsx("div",{className:"rounded-xl border border-border bg-muted/50 p-4",children:N})}const eo=1;function VXe(e){return Math.max(0,Math.min(100,e))}function ZX({value:e,onChange:t,fundable:n,markerLabel:r,committedInterviews:i=0,committedCents:o=0,error:s,disabled:a=!1,legend:c="Interview capacity for this role",idPrefix:u="interview-capacity"}){const[d,f]=v.useState(null),h=nc(e),p=d?.field==="interviews"?d.text:NX("interviews",e),m=d?.field==="budget"?d.text:e,g=d?ym(d.field,d.text,o):ym("budget",e,o),y=s||g,b=y||h===null?null:h*100,x=b===null?null:La(b),w=lXe(n),_=(R=>VXe((R-eo)/(w-eo)*100))(n),j=Math.min(Math.max(x??eo,eo),w),E=x!==null&&x>n,C=R=>{const D=Math.min(Math.max(Math.round(R),eo),vm);f(null),t(String(qR(D)))},N=(R,D)=>{f({field:R,text:D}),t(PX(R==="budget"?"budget":"interviews",D))},k=`${u}-error`,P=`${u}-echo`,A=y?k:P,L=a;return l.jsxs("div",{children:[l.jsx("span",{className:"mb-2 block text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:c}),l.jsxs("div",{className:"flex flex-wrap items-end gap-x-3 gap-y-2",children:[l.jsxs("div",{className:K("inline-flex items-stretch overflow-hidden rounded-md border bg-card ",y?"border-destructive":"border-muted-foreground
713/40 "),children:[l.jsx("button",{type:"button","aria-label":"One fewer interview",disabled:L||(x??eo)<=eo,onClick:()=>C((x??eo)-1),className:"grid w-9 place-items-center bg-muted/50 text-muted-foreground hover:bg-primary/10 hover:text-primary disabled:text-muted-foreground/60",children:l.jsx($se,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),l.jsx("input",{id:`${u}-interviews`,type:"text",inputMode:"numeric","aria-label":"Interviews","aria-invalid":!!y,"aria-describedby":A,disabled:a,value:p,onChange:R=>N("interviews",R.target.value),placeholder:"25",className:"w-16 border-x border-border bg-transparent px-1 py-2 text-center text-sm font-semibold tabular-nums text-foreground outline-none focus-visible:ring-2 focus-visible:ring-primary"}),l.jsx("button",{type:"button","aria-label":"One more interview",disabled:L||(x??0)>=vm,onClick:()=>C((x??0)+1),className:"grid w-9 place-items-center bg-muted/50 text-muted-foreground hover:bg-primary/10 hover:text-primary disabled:text-muted-foreground/60",children:l.jsx(Jb,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]}),l.jsx("span",{"aria-hidden":"true",className:"mb-2 text-sm text-muted-foreground",children:"â"}),l.jsxs("div",{className:"relative w-28",children:[l.jsx("span",{className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:"$"}),l.jsx("input",{id:`${u}-budget`,type:"text",inputMode:"numeric","aria-label":"Interview budget in dollars","aria-invalid":!!y,"aria-describedby":A,disabled:a,value:m,onChange:R=>N("budget",R.target.value),placeholder:"250",className:K("w-full rounded-md border bg-card py-2 pl-6 pr-2 text-sm font-semibold tabular-nums text-foreground outline-none focus-visible:ring-2 focus-visible:ring-primary ",y?"border-destructive":"border-muted-foreground/40 ")})]})]}),y?l.jsx("p",{id:k,className:"mt-2 text-sm text-destructive",children:y}):l.jsx("p",{id:P,className:"mt-2 text-xs text-muted-foreground tabular-nums",children:x===null?"Set how many interviews this role can run. Each one costs $10.":`= ${un(b)} · ${qi(x)}`}),l.jsxs("div",{className:"mt-4",children:[l.jsxs("div",{className:"relative",children:[l.jsx(JX,{min:eo,max:w,step:1,value:[j],disabled:a,onValueChange:([R])=>C(R),"aria-label":"Interviews this role can run",rangeClassName:E?"bg-destructive":void 0,trackChildren:l.jsx("div",{"aria-hidden":"true","data-testid":`${u}-fundable-band`,className:"absolute inset-y-0 left-0 bg-primary/20",style:{width:`${_}%`}})}),l.jsx("span",{"aria-hidden":"true","data-testid":`${u}-marker`,className:"pointer-events-none absolute top-1/2 h-3.5 w-0.5 -translate-x-1/2 -translate-y-1/2 rounded-sm bg-foreground
713/90 ring-1 ring-background/80",style:{left:`${_}%`}})]}),l.jsx("div",{className:"relative mt-2 h-4",children:l.jsx("span",{className:K("absolute whitespace-nowrap text-[10px] font-semibold text-muted-foreground ",_>=12&&_<=88&&"-translate-x-1/2"),style:_<12?{left:0}:_>88?{right:0}:{left:`${_}%`},children:r})}),l.jsxs("div",{className:"flex justify-between text-[10px] tabular-nums text-muted-foreground",children:[l.jsx("span",{children:eo}),l.jsx("span",{children:w.toLocaleString("en-US")})]})]}),!y&&i>0&&l.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:[qi(i)," are already committed on this job, so that is the lowest capacity you can set."]}),l.jsx("div",{className:"my-3 h-px bg-secondary"}),l.jsx("ul",{className:"flex list-none flex-col gap-1 p-0",children:XX.map(R=>l.jsxs("li",{className:"flex gap-2 text-xs text-muted-foreground",children:[l.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground",children:"â¢"}),l.jsx("span",{children:R})]},R))})]})}const qXe="Publish turns on once this fits the interviews you can fund.";function KXe({jdId:e,jdTitle:t,onClose:n}){const[r,i]=v.useState(null),[o,s]=v.useState(!1),a=oe(),u=tt()?.user?.profile,d=u?.org_id||u?.organization_id||"",{data:f}=kA({orgId:d}),{data:h}=Y0({jdId:e}),{data:p,isLoading:m}=SX({jdId:e}),g=ZJe(),y=RX(e),b=eXe(),x=!!f?.is_paid,w=Q0(f),S=h?.budget,_=gf(S)?S.budget_cents:null,j=S?.committed_interviews??0,E=S?.committed_cents??0,C=h,N=typeof C?.expected_candidates=="number"?C.expected_candidates:null,[k,P]=v.useState(""),[A,L]=v.useState(!1),[R,D]=v.useState();v.useEffect(()=>{A||P(_===null?"":String(_/100))},[_,A]);const O=nc(k),F=R??ym("budget",k,E)??void 0,T=O===null?null:O*100,M=T===null||F?null:La(T),V=M!==null&&M>w,B=M===null||M<1||V,I=g.isPending||y.isPending,z=uXe(N,_),H=cXe(f),de=r||p?.find(W=>W.status==="active")||null,ge=async()=>{if(!(B||T===null||M===null||I)){try{D(void 0),await y.mutateAsync({interviewBudgetCents:T})}catch(W){const ne=TX(W)??"Couldn't set this role's interview budget, so nothing was published.";D(ne),Q.error(ne);return}try{const W=await g.mutateAsync({jd_id:e,max_applicants:M});i({...W,jd_id:e,max_applicants:M,current_count:0}),a.invalidateQueries({queryKey:["job-ads"]}),a.invalidateQueries({queryKey:["org"]}),Q.success("Job ad published successfully!")}catch(W){const ne=ot.isAxiosError(W)&&W.response?.status===409?"An active job ad already exists for this job.":ot.isAxiosError(W)&&W.response?.data?.error||"Failed to publish job ad.";Q.error(`${ne} This role's interview budget was already changed to ${un(T)} (${qi(M)}), and that change stays in place.`)}}},te=async()=>{de?.public_url&&(await navigator.clipboard.writeText(de.public_url),s(!0),Q.success("Link copied!"),setTimeout(()=>s(!1),2e3))},ye=async()=>{if(de?.job_ad_id)try{await b.mutateAsync(de.job_ad_id),a.invalidateQueries({queryKey:["job-ads"]}),Q.success("Job ad deactivated."),n()}catch{Q.error("Failed to deactivate job ad.")}};if(m)return l.jsxs(l.Fragment,{children:[l.jsxs(Wt,{children:[l.jsx(Ft,{children:"Job ad"}),l.jsx(Bt,{children:"Checking whether this role already has a public link."})]}),l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx(ft,{size:24,variant:"current",spin:!0,title:"",className:"text-muted-foreground"})})]});if(de){const W=`${de.current_count} / ${de.max_applicants} applicants`;return l.jsxs(l.Fragment,{children:[l.jsxs(Wt,{children:[l.jsxs(Ft,{className:"flex items-center gap-2",children:[l.jsx(_V,{className:"w-5 h-5 text-success"}),"Job ad published"]}),l.jsx(Bt,{children:"Share this link with candidates to apply."})]}),l.jsxs("div",{className:"mt-4 space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Le,{readOnly:!0,value:de.public_url,className:"flex-1 text-sm bg-muted/50"}),l.jsx(G,{size:"sm",variant:"outline",onClick:te,className:"shrink-0",children:o?l.jsx(bo,{className:"w-4 h-4 text-success"}):l.jsx(Ej,{className:"w-4 h-4"})})]}),l.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(lk,{className:"w-4 h-4"}),W]}),l.jsxs("span",{children:["Status:"," ",l.jsx("span",{className:"font-medium text-success",children:de.status})]})]}),f&&l.jsx("div",{className:"text-sm text-muted-foreground",children:x?dwe(f.credits_balance_cents??f.credits_balance*1e3):(()=>{const[ne,se]=KH(f.trial_used_cents??f.trial_used*1e3,f.trial_total_cents??f.trial_total*1e3);return`Trial quota: ${ne} / ${se} interviews used`})()}),l.jsxs("div",{className:"flex gap-2 pt-2",children:[l.jsx(G,{variant:"outline",onClick:n,className:"flex-1",children:"Done"}),l.jsxs(G,{variant:"destructive",onClick:ye,disabled:b.isPending,className:"flex-1",children:[b.isPending?l.jsx(ft,{size:18,variant:"current",spin:!0,title:"",className:"mr-1"}):l.jsx(Cj,{className:"w-4 h-4 mr-1"}),"Deactivate"]})]})]})]})}return l.jsxs(l.Fragment,{children:[l.jsxs(Wt,{children:[l.jsx(Ft,{children:"Publish job ad"}),l.jsx(Bt,{children:t?`Create a public link for "${t}"`:"Create a public link for this job"})]}),l.jsxs("div",{className:"mt-4 space-y-4",children:[z&&l.jsx("p",{className:"text-sm font-medium text-foreground",children:z}),H&&l.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border bg-muted/50 p-3 text-sm text-muted-foreground",children:[l.jsx(ck,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),l.jsx("span",{children:H})]}),l.jsx(ZX,{value:k,onChange:W=>{L(!0),D(void 0),P(W)},fundable:w,markerLabel:kX(f),committedInterviews:j,committedCents:E,error:F,disabled:I,idPrefix:"publish-capacity"}),V&&l.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:[l.jsx(gs,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),l.jsxs("div",{className:"flex flex-col",children:[l.jsxs("span",{children:[l.jsx("span",{className:"font-semibold",children:"More than your org can fund right now."})," ",w===0?"It can't fund any interviews at all, so buying credits is the only way to publish this.":`Lower the count to ${qi(w)} or fewer, or buy more credits.`]}),l.jsx(Re,{to:"/billing",target:"_blank",rel:"noopener noreferrer",className:K(Cw({size:"sm"}),"mt-2 self-start"),children:"Buy more interview credits"})]})]}),l.jsxs("div",{className:"pt-2",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsx(G,{variant:"outline",onClick:n,className:"flex-1",children:"Cancel"}),l.jsxs(G,{onClick:ge,disabled:I||B,className:"flex-1",children:[I&&l.jsx(ft,{size:18,variant:"current",spin:!0,title:"",className:"mr-1"}),"Publish"]})]}),B&&l.jsx("p",{className:"mt-2 text-center text-xs text-muted-foreground",children:qXe})]})]})]})}const WXe=(e={})=>{const n=tt().user?.profile.org_id,r=q();return ue({queryKey:["users",n],queryFn:async()=>n?(await Be.get(`/orgs/${n}/users`,{headers:r})).data:[],enabled:!!n,...e})},$ut=(e={})=>{const n=tt().user?.profile.org_id,r=q();return ue({queryKey:["invited",n],queryFn:async()=>n?(await Be.get(`/orgs/${n}/invitations`,{headers:r})).data:[],enabled:!!n,...e})},Dut=(e={})=>{const n=tt().user?.profile?.org_id,r=q();return ie({mutationFn:async i=>(await Be.delete(`/orgs/${n}/members/${i}`,{headers:r})).data,onError(i){Q.error(i?.response?.data?.error??"Failed to delete user.")},...e})},Lut=(e={})=>{const t=q();return ie({mutationFn:async n=>(await Be.post(`/invitations/${n}/resend`,{},{headers:t})).data,onError(n){Q.error(n?.response?.data?.error??n.message??"Failed to resend.")},...e})},Fut=(e={})=>{const t=q();return ie({mutationFn:async n=>(await Be.delete(`/invitations/${n}`,{headers:t})).data,onError(n){Q.error(n?.response?.data?.error??n.message??"Failed to revoke invitation.")},...e})},HXe={nbsp:" ",amp:"&",lt:"<",gt:">",quot:'"',apos:"'",rsquo:"â",lsquo:"â",rdquo:"â",ldquo:"â",ndash:"â",mdash:"â",hellip:"â¦",bull:"â¢",pound:"£",euro:"â¬"};function eZ(e){return e?e.replace(/<br\s*\/?>/gi,` 714`).replace(/<\/(p|div|li|h[1-6])>/gi,` 715`).replace(/<[a-z/!][^>]*>/gi,"").replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi,(t,n)=>{if(n[0]==="#"){const r=n[1]==="x"||n[1]==="X"?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return!Number.isFinite(r)||r<=0||r>1114111?t:r===160?" ":String.fromCodePoint(r)}return HXe[n.toLowerCase()]??t}).replace(/[ \t]+\n/g,` 716`).replace(/\n{3,}/g,` 717 718`):""}function GXe(){const e=q(),t=wX(),{data:n=[],isLoading:r}=tXe(),{data:i}=SX(),{data:o}=WXe(),s=v.useMemo(()=>{const S=new Map;
718return(Array.isArray(o)?o:[]).forEach(_=>{const j=[_?.first_name,_?.last_name].filter(Boolean).join(" ").trim();_?.user_id&&S.set(_.user_id,j||_?.email||_.user_id)}),S},[o]),a=S=>(S?s.get(S):void 0)??(S?"Former member":"Unknown"),[c,u]=v.useState(""),[d,f]=v.useState("all"),[h,p]=v.useState("all"),m=v.useMemo(()=>{const S=new Map;return i?.forEach(_=>{_.status==="active"&&S.set(_.jd_id,_)}),S},[i]),g=v.useMemo(()=>{const S=new Set;return n.forEach(_=>_?.created_by&&S.add(_.created_by)),[...S].map(_=>({id:_,name:s.has(_)?a(_):`Former member (${_.slice(0,4)})`})).sort((_,j)=>_.name.localeCompare(j.name))},[n,s]),y=v.useMemo(()=>{const S=c.trim().toLowerCase();return n.filter(_=>{if(S&&!`${_?.title??""} ${eZ(_?.description)}`.toLowerCase().includes(S)||d!=="all"&&_?.created_by!==d)return!1;if(h!=="all"){const j=m.has(_.jd_id);if(h==="published"?!j:j)return!1}return!0})},[n,c,d,h,m]),b=c.trim()!==""||d!=="all"||h!=="all",x=oe(),w=ie({mutationFn:async()=>{const S=t.data?.target?.jd_id;if(S)try{(await Be.delete(`/jds/${S}`,{headers:e})).status==200&&x.setQueryData(["jd-list"],j=>Array.isArray(j)?j.filter(C=>C.jd_id!=S):j)}catch{Q.error("failed to delete jd")}}});return l.jsxs("section",{className:"w-full mx-auto p-2 pt-0",children:[l.jsxs("div",{className:"flex w-full items-center justify-between mb-4 sm:mb-6 gap-2",children:[l.jsx("h2",{className:"text-xl sm:text-2xl font-semibold text-foreground",children:"Jobs"}),l.jsx(Re,{to:"/create-jd-v2","data-tour":"rec-create-job",children:l.jsx(G,{size:"default",children:"Create job"})})]}),l.jsxs("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center",children:[l.jsxs("div",{className:"relative flex-1 min-w-0",children:[l.jsx(Ea,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx(Le,{value:c,onChange:S=>u(S.target.value),placeholder:"Search jobs by title or description","aria-label":"Search jobs",className:"pl-9"})]}),l.jsxs(ho,{value:d,onValueChange:f,children:[l.jsx(Mi,{className:"sm:w-[190px]","aria-label":"Filter by creator",children:l.jsx(po,{placeholder:"Created by"})}),l.jsxs($i,{children:[l.jsx(Nt,{value:"all",children:"Anyone"}),g.map(S=>l.jsx(Nt,{value:S.id,children:S.name},S.id))]})]}),l.jsxs(ho,{value:h,onValueChange:p,children:[l.jsx(Mi,{className:"sm:w-[170px]","aria-label":"Filter by publish status",children:l.jsx(po,{placeholder:"Any status"})}),l.jsxs($i,{children:[l.jsx(Nt,{value:"all",children:"Any status"}),l.jsx(Nt,{value:"published",children:"Published"}),l.jsx(Nt,{value:"unpublished",children:"Not published"})]})]})]}),b&&!r&&l.jsxs("p",{className:"mb-3 text-sm text-muted-foreground",children:[y.length," of ",n.length," job",n.length===1?"":"s",y.length!==n.length&&l.jsx("button",{type:"button",onClick:()=>{u(""),f("all"),p("all")},className:"ml-2 font-medium text-primary underline-offset-2 hover:underline",children:"Clear filters"})]}),r?l.jsx("div",{className:"flex h-32 justify-center items-center",children:l.jsx("span",{className:"italic text-muted-foreground",children:"Loading..."})}):n?.length===0?l.jsx("div",{className:"flex h-full min-h-72 justify-center items-center italic text-lg font-light text-muted-foreground",children:"No jobs found!"}):y.length===0?l.jsxs("div",{className:"flex min-h-40 flex-col items-center justify-center gap-1 text-muted-foreground",children:[l.jsx("p",{className:"font-medium",children:"No jobs match those filters"}),l.jsx("p",{className:"text-sm",children:"Try a different search or clear the filters."})]}):l.jsx("div",{children:y.map(S=>l.jsx(YXe,{jd:S,activeAd:m.get(S.jd_id),createdByName:a(S?.created_by),onOpenDialog:t.openDialog},S.jd_id))}),t.open&&l.jsxs(At,{open:t.open,onOpenChange:t.closeDialog,children:[t.data?.type==="DELETE"&&l.jsx(xt,{children:l.jsx(Wu,{title:"Delete",message:"Are you sure you want to delete this job?",onConfirm:w.mutateAsync,onClose:t.closeDialog,isOpen:t.open})}),t.data?.type==="PUBLISH"&&l.jsx(xt,{className:"sm:max-w-md",children:l.jsx(KXe,{jdId:t.data.target.jd_id,jdTitle:t.data.target.title,onClose:t.closeDialog})})]})]})}function YXe({jd:e,activeAd:t,createdByName:n,onOpenDialog:r}){const i=Un(),{data:o}=nXe(e.jd_id),{data:s}=jX(e.jd_id),a=s?.candidates?.length??0,{data:c}=Y0({jdId:e.jd_id}),u=sXe(c?.budget),{data:d}
718=OX(e.jd_id),f=vXe(d),h=xXe(o),p=h.length>0,m=Array.isArray(e.traits)?e.traits:[],g=m.slice(0,3),y=m.length-g.length;return l.jsxs("div",{className:"relative mb-3 rounded-xl border border-border bg-card p-3.5 pb-2.5 shadow-sm transition hover:shadow-md sm:p-4 sm:pb-3",children:[l.jsx(Re,{to:"/jd-dashboard/$jdId/overview",params:{jdId:e.jd_id},"aria-label":`Open dashboard for ${e.title}`,className:"absolute inset-0 z-0 rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40"}),l.jsxs("div",{className:"pointer-events-none relative z-10 flex min-w-0 flex-col gap-1.5",children:[l.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2 sm:flex-nowrap",children:[l.jsx("h3",{title:e.title,className:"line-clamp-3 min-w-0 basis-full break-words text-base font-semibold text-foreground sm:line-clamp-2 sm:flex-1 sm:basis-0",children:e.title}),f.kind==="closed"?l.jsx(WB,{state:f}):t&&l.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full border border-success/30 bg-success/10 px-2 py-0.5 text-xs font-medium text-success",children:[l.jsx(_V,{className:"h-3 w-3"}),"Published"]}),l.jsx(QXe,{state:u}),f.kind==="warning"&&l.jsx(WB,{state:f}),l.jsxs("div",{className:"pointer-events-auto ml-auto flex shrink-0 items-center gap-1.5",children:[l.jsx(G,{size:"icon",variant:"ghost",className:K("h-8 w-8 rounded-full [&_svg]:size-4",t?"bg-muted text-muted-foreground hover:bg-secondary":"bg-primary text-primary-foreground hover:bg-primary/90"),title:t?"Manage job ad":"Publish job ad","aria-label":`${t?"Manage":"Publish"} job ad for ${e.title}`,onClick:()=>r({target:{jd_id:e.jd_id,title:e.title},type:"PUBLISH"}),children:l.jsx(zse,{className:"h-4 w-4"})}),l.jsx(G,{size:"icon",variant:"ghost",className:"h-8 w-8 rounded-full bg-muted text-muted-foreground hover:bg-secondary [&_svg]:size-4",title:"Edit job","aria-label":`Edit job for ${e.title}`,onClick:b=>{b.stopPropagation(),i({to:`/create-jd-v2?jd=${e.jd_id}`})},children:l.jsx(EV,{className:"h-4 w-4"})}),l.jsx(G,{size:"icon",variant:"ghost",className:"h-8 w-8 rounded-full bg-destructive/10 text-destructive hover:bg-destructive/20 [&_svg]:size-4",title:"Delete","aria-label":`Delete ${e.title}`,onClick:()=>r({target:{jd_id:e.jd_id},type:"DELETE"}),children:l.jsx(NV,{className:"h-4 w-4"})})]})]}),e.description&&l.jsx("p",{className:"line-clamp-1 text-sm text-muted-foreground",children:eZ(e.description)}),l.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(lk,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),l.jsx("span",{className:"font-medium text-foreground",children:o?.totalCandidates??"-"}),"candidates"]}),a>0?l.jsxs(Re,{to:"/jd-dashboard/$jdId/reviews",params:{jdId:e.jd_id},"aria-label":`${a} awaiting review for ${e.title}`,className:"pointer-events-auto relative z-20 flex items-center gap-1.5 rounded font-medium text-warning underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",children:[l.jsx(jj,{className:"h-3.5 w-3.5 shrink-0 text-warning"}),l.jsx("span",{className:"font-semibold",children:a}),"awaiting review"]}):l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(jj,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),l.jsx("span",{className:"font-medium text-foreground",children:a}),"awaiting review"]}),l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(Gse,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),n]}),e.created_at&&l.jsx("span",{children:G0(e.created_at).format("DD MMM YYYY")}),g.map((b,x)=>l.jsx("span",{className:"rounded border border-border bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground",children:b?.name},b?.name||x)),y>0&&l.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["+",y," more"]}),l.jsx(SXe,{reports:h,to:"/reports",search:{job:e.jd_id},context:e.title,className:K("pointer-events-auto ml-auto shrink-0 rounded-full border transition-colors","text-xs font-medium","py-1.5","gap-1.5 pl-3 pr-2",p?"border-primary/30 bg-primary/10 text-primary hover:border-primary/50 hover:bg-primary/15":"border-border bg-muted text-muted-foreground hover:bg-secondary hover:text-foreground")})]})]})]})}function QXe({state:e}){if(e.kind==="none")return null;const t=e.kind==="halted",n=e.kind==="exhausted",r=t?e.reason==="org_balance"?"Halted - org balance":"Halted - budget":n?"Budget exhausted":`Budget ${e.percent}% used`;return l.jsxs("span",{className:K("inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium",t||n?"border-destructive/40 bg-destructive/10 text-destructive":"border-warning/40 bg-warning/10 text-warning"),children:[l.jsx(gs,{className:"h-3 w-3"}),r]})}function WB({state:e}){return e.kind==="none"?null:e.kind==="closed"?l.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full border border-border bg-muted/50 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:[l.jsx(sk,{className:"h-3 w-3"}),"Auto-closed ",G0(e.closedAt).format("D MMM")]}):l.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full border border-warning/40 bg-warning/10 px-2 py-0.5 text-xs font-medium text-warning",children:[l.jsx(xV,{className:"h-3 w-3"}),e.label]})}const JXe=Wi("/_admin/jd-list")({component:GXe}),XXe=Object.freeze(Object.defineProperty({__proto__:null,Route:JXe},Symbol.toStringTag,{value:"Module"}));function ZXe({rubric:e}){return e?l.jsxs("section",{className:"bg-card border border-border rounded-xl shadow-sm px-0 py-4 sm:p-2 max-w-3xl mx-auto mt-4",children:[l.jsxs("header",{className:"flex flex-col sm:flex-row sm:items-end gap-2 sm:gap-8 border-b border-border/50 pb-5 px-2",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1",children:"Rubric Name"}),l.jsx("h1",{className:"text-2xl font-bold text-foreground",children:e.name||l.jsx("span",{className:"italic text-muted-foreground",children:"No Name"})})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1",children:"Category"}),e.category?l.jsx("span",{className:"inline-block rounded-full border border-border bg-muted/50 px-4 py-1 text-sm font-semibold uppercase tracking-wide text-muted-foreground shadow-sm",children:e.category}
718):l.jsx("span",{className:"italic text-muted-foreground/60",children:"N/A"})]})]}),l.jsxs("div",{className:"py-6 grid grid-cols-1 gap-6 px-2",children:[l.jsxs("section",{children:[l.jsx("h3",{className:"text-base font-semibold text-foreground mb-1 tracking-tight",children:"Description"}),l.jsx("div",{className:"text-sm text-muted-foreground whitespace-pre-line border rounded-md p-3 bg-muted/50 min-h-[1.5rem]",children:e.description?e.description:l.jsx("span",{className:"text-muted-foreground italic",children:"No description provided"})})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-base font-semibold text-foreground mb-1 tracking-tight",children:"Scoring Guidelines"}),l.jsx("div",{className:"text-sm text-muted-foreground whitespace-pre-line border rounded-md p-3 bg-muted/50 min-h-[1.5rem]",children:e.scoring_guidelines?e.scoring_guidelines:l.jsx("span",{className:"text-muted-foreground italic",children:"No guidelines"})})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-base font-semibold text-foreground mb-2 tracking-tight",children:"Levels"}),Array.isArray(e.levels)&&e.levels.length>0?l.jsx("div",{className:"space-y-4",children:e.levels.map((t,n)=>l.jsxs("div",{className:"border border-border/50 rounded-lg bg-muted/50 px-4 py-3 shadow-inner",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2",children:[l.jsx("span",{className:"font-semibold text-foreground text-lg tracking-tight",children:t.label}),t.min!==void 0&&t.min!==null&&l.jsxs("span",{className:"text-xs font-semibold text-muted-foreground rounded border px-2 py-0.5 ml-1 bg-card border-border",children:["Score: ",l.jsx("span",{className:"ml-1",children:t.min})]})]}),"description"in t&&t.description&&l.jsx("div",{className:"mt-2 text-[13px] text-muted-foreground whitespace-pre-line",children:t.description}),"behavioral_indicators"in t&&Array.isArray(t.behavioral_indicators)&&t.behavioral_indicators.length>0&&l.jsxs("div",{className:"mt-3",children:[l.jsx("div",{className:"font-semibold text-muted-foreground text-xs uppercase mb-1 tracking-wide",children:"Behavioral Indicators"}),l.jsx("ul",{className:"list-disc ml-6 space-y-1",children:t.behavioral_indicators.map((r,i)=>l.jsxs("li",{children:[l.jsx("span",{className:"text-muted-foreground text-[13px]",children:typeof r=="string"?r:r?.indicator||`Indicator ${i+1}`}),r?.detail&&l.jsx("div",{className:"text-muted-foreground text-xs ml-2 pt-0.5",children:r.detail})]},i))})]}),"criteria"in t&&Array.isArray(t.criteria)&&t.criteria.length>0&&l.jsxs("div",{className:"mt-3",children:[l.jsx("div",{className:"font-semibold text-muted-foreground text-xs uppercase mb-1 tracking-wide",children:"Criteria"}),l.jsx("ul",{className:"list-disc ml-6 space-y-0.5",children:t.criteria.map((r,i)=>l.jsxs("li",{children:[l.jsx("span",{className:"font-medium text-muted-foreground",children:r.title||`Criterion ${i+1}`}),r.detail&&l.jsx("span",{className:"text-muted-foreground text-xs ml-1",children:r.detail})]},i))})]})]},n))}):l.jsx("span",{className:"text-muted-foreground italic",children:"No levels specified"})]})]}),l.jsxs("dl",{className:"flex flex-col sm:flex-row sm:items-center gap-0 border-t border-border/50 px-6 pt-4 pb-2",children:[l.jsx("dt",{className:"w-36 text-muted-foreground text-xs font-semibold uppercase tracking-wide",children:"Created At"}),l.jsx("dd",{className:"flex-1 text-muted-foreground text-sm sm:pl-2",children:e.created_at?G0(e.created_at).format("DD MMM YYYY, hh:mm a"):l.jsx("span",{className:"italic text-muted-foreground/60",children:"N/A"})})]})]}):null}function eZe({width:e="90%"}){return l.jsx("div",{style:{background:"linear-gradient(90deg,hsl(var(--border)) 25%,hsl(var(--muted)) 50%,hsl(var(--border)) 75%)",borderRadius:5,height:14,width:e,margin:"3px 0",animation:"pulse 1.4s ease-in-out infinite"}})}function tZe({columns:e,data:t,onLoadMore:n,loading:r=!1,hasMore:i=!1,lastItemRef:o,actions:s=[],isLoading:a=!1,sorting:c=!1}){const[u,d]=v.useState(null),[f,h]=v.useState(null),p=v.useMemo(()=>!c||!u?t:[...t].sort((y,b)=>y[u.key]==null&&b[u.key]==null?0:y[u.key]==null?1:b[u.key]==null?-1:u.direction==="asc"?y[u.key]>b[u.key]?1:-1:y[u.key]<b[u.key]?1:-1),[t,u,c]);function m(y){c&&d(b=>!b||b.key!==y?{key:y,direction:"asc"}:b.direction==="asc"?{key:y,direction:"desc"}:null)}const g=({content:y,maxLength:b=100})=>{const[x,w]=v.useState(!1);
718return typeof y!="string"||y.length<=b?l.jsx(l.Fragment,{children:y}):l.jsxs("div",{children:[l.jsx("span",{children:x?y:y.substring(0,b)+"..."}),l.jsx("button",{type:"button",onClick:()=>w(!x),className:"ml-2 text-primary text-xs font-medium underline",children:x?"See less":"See more"})]})};return a?l.jsx("div",{className:"w-full bg-card rounded-xl border border-border p-4 space-y-4",children:[...Array(4)].map((y,b)=>l.jsx(eZe,{width:"100%"},b))}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"block md:hidden space-y-4 pb-6",children:p?.map((y,b)=>l.jsxs("div",{className:"bg-card rounded-xl border border-border shadow-sm p-5",children:[l.jsx("div",{className:"divide-y divide-border/50",children:e.map(x=>l.jsxs("div",{className:"py-2 flex items-baseline justify-between gap-3",children:[l.jsx("span",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-widest shrink-0",children:x.label}),l.jsx("span",{className:"text-sm text-foreground leading-relaxed text-right",children:l.jsx(g,{content:x.render?x.render(y[x.key],y):y[x.key]??"-",maxLength:80})})]},x.key))}),s.length>0&&l.jsx("div",{className:"mt-4 pt-3 border-t border-border/50 flex flex-wrap gap-2",children:s.filter(x=>!x.hidden&&!x.shouldHide?.(y)).map((x,w)=>l.jsxs("button",{onClick:()=>x.onClick(y,b),className:"flex-1 min-w-[90px] inline-flex items-center justify-center gap-2 px-3 py-2.5 bg-muted/50 hover:bg-muted text-muted-foreground border border-border text-xs font-bold rounded-lg transition-all active:scale-95",children:[x.icon,l.jsx("span",{className:"uppercase tracking-tight",children:x.label})]},w))})]},b))}),l.jsx("div",{className:"hidden md:block bg-card rounded-xl border border-border shadow-sm overflow-hidden",children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full border-collapse text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"bg-card border-b border-border",children:[e.map(y=>l.jsx("th",{onClick:()=>c&&m(y.key),className:"p-4 text-left font-bold text-xs uppercase text-muted-foreground tracking-wider whitespace-nowrap",children:l.jsxs("div",{className:"flex items-center gap-1",children:[y.label,c&&l.jsx(Lse,{size:14,className:"opacity-30"})]})},y.key)),l.jsx("th",{className:"p-4 text-center font-bold text-xs uppercase text-muted-foreground",children:"Actions"})]})}),l.jsx("tbody",{children:p?.map((y,b)=>l.jsxs("tr",{className:K("border-b border-border/50 transition-colors",(b%2===1,"bg-card"),f===b&&"bg-muted/50"),onMouseEnter:()=>h(b),onMouseLeave:()=>h(null),children:[e.map(x=>l.jsx("td",{className:"p-4 truncate",style:{maxWidth:x.maxWidth??240},children:x.render?x.render(y[x.key],y):y[x.key]},x.key)),l.jsx("td",{className:"p-4",children:l.jsx("div",{className:"flex justify-center gap-1",children:s.filter(x=>!x.hidden&&!x.shouldHide?.(y)).map((x,w)=>l.jsx("button",{onClick:()=>x.onClick(y,b),className:"p-2 hover:bg-muted rounded-md transition-all",children:x.icon||x.label},w))})})]},b))})]})})}),l.jsx("style",{children:"@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }"})]})}const nZe=Wi("/_admin/rubrics")({component:rZe});function rZe(){const e=q();HY();const[t,n]=v.useState(!1),[r,i]=v.useState(null),o=wX(),s=[{key:"name",label:"Name"},{key:"category",label:"Category"},{key:"description",label:"Description",maxWidth:300},{key:"scoring_guidelines",label:"Guidelines",maxWidth:250,render:g=>l.jsx("p",{className:"line-clamp-3",children:g})},{key:"levels",label:"Levels",render:g=>g?.map(y=>y.label).join(", ")},{key:"created_at",label:"Created At",render:g=>l.jsx("p",{children:g?G0(g).format("DD MMM YYYY hh:mm a"):null})}],{data:a=[],isLoading:c}=ue({queryKey:["rubrics-list"],queryFn:async()=>(await xw.get("/rubrics",{headers:e})).data}),u=Un(),d=g=>{u({to:`/create-rubrics?rbId=${g.rubric_id}`})},f=g=>{i(g),n(!0)},h=()=>{n(!1),i(null)},p=oe(),m=ie({mutationFn:async()=>{const g=o.data?.target?.rubric_id;if(g)try{(await Be.delete(`/rubrics/${g}`,{headers:e})).status==200&&(p.setQueryData(["rubrics-list"],b=>b.filter(w=>w.rubric_id!=g)),Q.success("Rubrics deleted Successfully!"))}catch{Q.error("failed to delete rubrics")}}});return l.jsxs("section",{className:"container mx-auto p-4 md:p-6 pt-0",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6 gap-2",children:[l.jsx("h2",{className:"text-2xl font-semibold",children:"Rubrics"}),l.jsx(Re,{to:"/create-rubrics",children:l.jsx(G,{size:"lg",children:"Create Rubrics"})})]}),!c&&a?.length==0?l.jsx("div",{className:"flex h-full min-h-72 justify-center items-center italic text-lg font-light",children:"No Rubrics found!."}):l.jsxs("div",{className:"w-full",children:[l.jsx(tZe,{isLoading:c,columns:s,data:a,actions:[{label:"View",icon:l.jsx(jse,{className:"w-4 h-4"}),onClick:f},{label:"Delete",icon:l.jsx(NV,{className:"w-4 h-4"}),onClick:g=>{o.openDialog({target:{rubric_id:g.rubric_id},type:"DELETE"})}},{label:"Edit",icon:l.jsx(EV,{className:"w-4 h-4"}),onClick:d}]}),l.jsx(D0,{open:t,onClose:h,sheetClassName:"w-full sm:max-w-[540px] md:min-w-[440px] lg:min-w-[720px]",title:r?"Rubric Details":"",description:"",children:l.jsx(ZXe,{rubric:r})})]}),o.open&&l.jsx(At,{open:o.open,children:o.data?.type=="DELETE"&&l.jsx(xt,{children:l.jsx(Wu,{title:"Delete",message:"Are you sure you want to delete this Rubrics ?",onConfirm:m.mutateAsync,onClose:o.closeDialog,isOpen:o.open})})})]})}const iZe=Object.freeze(Object.defineProperty({__proto__:null,Route:nZe},Symbol.toStringTag,{value:"Module"}));function oZe(){const e=tt(),t=Un();v.useEffect(()=>{sessionStorage.getItem("org-member-candidate-blocked")&&(sessionStorage.removeItem("org-member-candidate-blocked"),Q.error("Workspace members cannot apply as candidates."))},[]);const n=bX(e);return v.useEffect(()=>{if(n==="session-expired"){window.location.replace(yX);return}if(n==="anonymous"){t({to:"/"});return}n==="render"&&e.user?.profile?.role==="CANDIDATE"&&window.location.replace(op)},[n,e.user?.profile?.role,t]),n==="wait"||n==="renew"?l.jsx("div",{className:"min-h-screen flex flex-col items-center justify-center bg-card",children:l.jsx(ft,{size:48,variant:"brand",spin:!0,title:"",className:"mb-4"})}):n!=="render"||e.user?.profile?.role==="CANDIDATE"?null:l.jsxs(HH,{children:[l.jsx(YH,{}),l.jsx(jQ,{}),l.jsx(GH,{}),l.jsx(Fa,{}),l.jsx(JJe,{audience:"recruiter"})]})}const sZe=J("/_admin")({component:oZe}),Pl=Wa("Browser",{web:()=>Z(()=>import("./web-Fz5VN9N-.js"),[]).then(e=>new e.BrowserWeb)}),GR="https://cognito-idp.eu-west-2.amazonaws.com/eu-west-2_U098rdSas",Pr="11a4dran1036uttjhpbb516jju",Mn="5b75u4sh29fuj5iqle01m9j2rn",yf="https://auth.asgardhire.ai",rc="/my-interviews",xb="/jd-list",aZe=[rc,xb],YR="asgardhire",vc=`${YR}://`;function tZ(){return!lt.isNativePlatform()||YR?!1:(console.error("VITE_NATIVE_URL_SCHEME
718is not set for this deployment - native sign-in/sign-up cannot build a valid redirect_uri. Add VITE_NATIVE_URL_SCHEME to this environment's build config (see docs/plans/capacitor-live-url-migration.md External Task #2)."),Q.error("Sign-in is temporarily unavailable. Please try again later."),!0)}function nZ(e,t=YR){try{return new URL(e).protocol===`${t}:`}catch{return!1}}function X0(e){if(lt.isNativePlatform()){if(tZ())return;Pl.open({url:e})}else window.location.href=e}const UN="native-pending-auth-client-id";function og(e){localStorage.setItem(UN,e)}function rZ(){const e=localStorage.getItem(UN)??void 0;return localStorage.removeItem(UN),e}const iZ="active-auth-client-id";function QR(e){e&&localStorage.setItem(iZ,e)}function oZ(){const e=localStorage.getItem(iZ);if(e===Mn||e===Pr)return e}function But(){try{const e=oZ();return e?e===Mn?"candidate":"recruiter":null}catch{return null}}class lZe{constructor(t){this.clientId=t}async prepare(){return{navigate:async t=>tZ()?new Promise(()=>{}):(og(this.clientId),await Pl.open({url:t.url}),new Promise(()=>{})),close:()=>{Pl.close().catch(()=>{})}}}async callback(){}}function sZ(){const e=new URLSearchParams(window.location.search);if(e.has("code")&&e.has("state")){const i=(window.location.pathname.replace(/\/$/,"")||"/")===rc?Mn:Pr;return QR(i),i}const t=HB(Mn),n=HB(Pr);return t&&n?oZ()??(GB(window.location.pathname)?Pr:Mn):t?Mn:n||GB(window.location.pathname)?Pr:Mn}function HB(e){if(!e)return!1;const t=localStorage.getItem(`oidc.user:${GR}:${e}`);if(!t)return!1;try{const n=JSON.parse(t);return n?.id_token?!(typeof n.expires_at=="number"&&n.expires_at*1e3<=Date.now())||!!n.refresh_token:!1}catch{return!1}}const cZe=new Set(["billing","bookings","candidate","contact-us","create-jd","create-jd-v2","create-rubrics","evaluation","forms","invite-user","jd-dashboard","jd-list","my-profile","org-settings","overview","reports","rubrics","services","templates","traits","users"]);function GB(e){const[t=""]=e.replace(/^\/+/,"").split("/");return cZe.has(t)}function uZe(e){const t=e===Mn;return{authority:GR,client_id:e,redirect_uri:lt.isNativePlatform()?vc:t?window.location.origin+rc:window.location.origin+"/jd-list",response_type:"code",scope:"email openid profile aws.cognito.signin.user.admin",userStore:new vk({store:window.localStorage}),automaticSilentRenew:!0}}function JR(e){const t=uZe(e);return lt.isNativePlatform()?new Mj(t,new lZe(e)):new Mj(t)}function dZe(){const e=sZ();return JR(e)}function Uut(){return JR(Mn)}function fZe(){lt.isNativePlatform()&&og(Pr);const e=lt.isNativePlatform()?vc:window.location.origin+"/jd-list",t=`${yf}/signup?client_id=${Pr}&response_type=code&scope=email+openid+profile+aws.cognito.signin.user.admin&redirect_uri=${encodeURIComponent(e)}`;X0(t)}function hZe(){lt.isNativePlatform()&&og(Mn);const e=lt.isNativePlatform()?vc:window.location.origin+rc,t=`${yf}/signup?client_id=${Mn}&response_type=code&scope=email+openid+profile+aws.cognito.signin.user.admin&redirect_uri=${encodeURIComponent(e)}`;X0(t)}function aZ(){lt.isNativePlatform()&&og(Mn);const e=lt.isNativePlatform()?vc:window.location.origin+rc,t=`${yf}/login?client_id=${Mn}&response_type=code&scope=email+openid+profile+aws.cognito.signin.user.admin&redirect_uri=${encodeURIComponent(e)}`;X0(t)}function pZe(){lt.isNativePlatform()&&og(Pr);const e=lt.isNativePlatform()?vc:window.location.origin+xb,t=`${yf}/login?client_id=${Pr}&response_type=code&scope=email+openid+profile+aws.cognito.signin.user.admin&redirect_uri=${encodeURIComponent(e)}`;X0(t)}function zut(e){const t=e||sZ(),n=lt.isNativePlatform()?vc:window.location.origin+"/";return`${yf}/logout?client_id=${t}&logout_uri=${encodeURIComponent(n)}`}function mZe(e){let n=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/");for(;n.length%4!==0;)n+="=";const r=decodeURIComponent(atob(n).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(r)}async function lZ(e=window.location.href){const t=new URL(e),n=t.searchParams;if(!n.has("code")||n.has("state"))return!1;let r,i;if(nZ(e))r=rZ()??Mn,i=vc;else{const s=t.pathname.replace(/\/$/,"")||"/";if(s===rc)r=Mn,i=window.location.origin+rc;else if(s===xb)r=Pr,i=window.location.origin+xb;else return!1}const o=n.get("code");try{const s=new URLSearchParams({grant_type:"authorization_code",client_id:r,code:o,redirect_uri:i}),a=await fetch(`${yf}/oauth2/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:s.toString()});if(!a.ok){const h=await a.text();return console.error("Direct signup token exchange failed:",h),!1}const c=await a.json(),u=mZe(c.id_token),d={id_token:c.id_token,session_state:null,access_token:c.access_token,refresh_token:c.refresh_token,token_type:c.token_type||"Bearer",scope:"email openid profile aws.cognito.signin.user.admin",profile:u,expires_at:Math.floor(Date.now()/1e3)+c.expires_in},f=`oidc.user:${GR}:${r}`;return localStorage.setItem(f,JSON.stringify(d)),QR(r),r===Pr&&u?.role==="CANDIDATE"&&sessionStorage.setItem("recruiter-login-opened-candidate","true"),!0}catch(s){return console.error("Direct signup callback handling failed:",s),!1}}function zN(e,t){if(e==="signin"){t==="candidate"?aZ():pZe();return}t==="candidate"?hZe():fZe()}function gZe(e){const t=new URLSearchParams(e).get("role");return t==="candidate"||t==="recruiter"?t:null}
718function vZe(e,t,n="https://auth.asgardhire.ai"){const r=new URLSearchParams(e).get("confirmed");if(r==="1"||r==="true")return!0;if(!t||!n)return!1;try{const i=n.includes("://")?n:`https://${n}`;return new URL(t).host===new URL(i).host}catch{return!1}}function yZe({source:e,className:t=""}){const n=v.useContext(ew),r=n?.isAuthenticated?n.user?.id_token:void 0,i=v.useMemo(()=>r?{Authorization:`Bearer ${r}`}:null,[r]),[o,s]=v.useState(()=>cX()?.opted_out??!1),[a,c]=v.useState(!1),[u,d]=v.useState(!1),f=v.useId();v.useEffect(()=>{if(!i)return;let p=!0;return PJe(i).then(m=>p&&s(m.opted_out)).catch(()=>{}),()=>{p=!1}},[i]);const h=async p=>{if(s(p),d(!1),!i){lX({opted_out:p,source:e});return}c(!0);try{await aX(i,p,e)}catch{s(!p),d(!0)}finally{c(!1)}};return l.jsxs("div",{className:t,"data-testid":"job-matching-opt-out",children:[l.jsxs("label",{htmlFor:f,className:"flex min-h-10 cursor-pointer items-start gap-2.5 text-sm text-muted-foreground",children:[l.jsx("input",{id:f,type:"checkbox",checked:o,disabled:a,onChange:p=>void h(p.target.checked),className:"mt-0.5 h-4 w-4 shrink-0 accent-primary"}),l.jsxs("span",{children:[NJe,"."," ",l.jsx("a",{href:"/privacy-policy#cross-platform-data-flow",className:"text-primary hover:underline",children:"How this works"})]})]}),u&&l.jsx("p",{role:"alert",className:"mt-1 text-xs text-destructive",children:"We couldn't save that. Try again."})]})}const xZe=8e3;function bZe({title:e,detail:t,onRetry:n,signInHref:r="/sign-in",slowAfterMs:i=xZe,className:o}){const[s,a]=v.useState(!1);v.useEffect(()=>{const u=window.setTimeout(()=>a(!0),i);return()=>window.clearTimeout(u)},[i]);const c=()=>{n?n():window.location.reload()};return l.jsxs("div",{className:o??"flex min-h-screen flex-col items-center justify-center bg-card px-6 text-center","data-testid":"waiting-screen",children:[l.jsx(ft,{size:48,variant:"brand",spin:!0,title:"",className:"mb-4"}),l.jsx("p",{role:"status",className:"text-xl font-medium text-primary",children:e}),t&&l.jsx("p",{className:"mt-1 text-muted-foreground",children:t}),s&&l.jsxs("div",{className:"mt-6 flex flex-col items-center gap-3",role:"alert",children:[l.jsx("p",{className:"text-sm text-foreground",children:"This is taking longer than usual."}),l.jsxs("div",{className:"flex flex-wrap justify-center gap-2",children:[l.jsx("button",{type:"button",onClick:c,className:"h-10 rounded-xl bg-primary px-4 text-sm font-semibold text-primary-foreground hover:bg-primary/90",children:"Try again"}),l.jsx("a",{href:r,className:"inline-flex h-10 items-center rounded-xl border border-border px-4 text-sm font-semibold text-foreground hover:bg-muted",children:"Open sign in"})]})]})]})}const wZe={signin:{heading:"Welcome back",sub:"Choose how you sign in. We keep candidate and recruiter accounts separate.",candidate:{title:"Sign in as Candidate",description:"Your applications, interviews and job matches."},recruiter:{title:"Sign in as Recruiter",description:"Your jobs, candidate pipeline and evaluations."},swapLead:"New to AsgardHire?",swapCta:"Create an account",swapTo:"/sign-up"},signup:{heading:"Create your account",sub:"Tell us who you are so we can set things up for you.",candidate:{title:"I am looking for a job",description:"Apply to jobs and practice AI interviews. Free to start, no card needed."},recruiter:{title:"I am hiring",description:"Post a role and let AI find your best-fit candidates in minutes."},swapLead:"Already have an account?",swapCta:"Sign in",swapTo:"/sign-in"}};function YB({mode:e,role:t,copy:n,dotClassName:r,icon:i}){return l.jsxs("button",{type:"button",onClick:()=>zN(e,t),className:"group flex items-start gap-3.5 text-left p-5 rounded-xl border border-secondary bg-card hover:border-primary hover:bg-accent/40 transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:[l.jsx("span",{className:"flex items-center justify-center w-10 h-10 rounded-xl bg-primary/10 text-primary shrink-0",children:i}),l.jsxs("span",{className:"flex-1 flex flex-col gap-1 min-w-0",children:[l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:`w-2 h-2 rounded-full shrink-0 ${r}`}),l.jsx("span",{className:"text-base font-bold font-funnel text-foreground",children:n.title})]}),l.jsx("span",{className:"text-sm font-funnel text-muted-foreground leading-relaxed",children:n.description})]}),l.jsx(Ad,{size:16,className:"mt-2.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-1 group-hover:text-primary"})]})}function cZ({mode:e}){const t=wZe[e],n=typeof window>"u"?null:gZe(window.location.search),r=zr(),[i]=v.useState(()=>r&&e==="signin"&&typeof window<"u"&&vZe(window.location.search,document.referrer)),[o]=v.useState(()=>e==="signin"&&typeof window<"u"&&UJe(window.location.search));return v.useEffect(()=>{n&&(window.history.replaceState(window.history.state,"",window.location.pathname),zN(e,n))},[e,n]),v.useEffect(()=>{!i||n||new URLSearchParams(window.location.search).has("confirmed")&&window.history.replaceState(window.history.state,"",window.location.pathname)},[i,n]),n&&r?l.jsx(bZe,{title:`Taking you to ${e==="signin"?"sign in":"sign up"}â¦`,onRetry:()=>zN(e,n),className:"min-h-screen flex flex-col items-center justify-center bg-gradient-to-b from-muted to-card px-6 text-center font-funnel"}):n?l.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-b from-muted to-card",children:l.jsxs("p",{role:"status",className:"text-sm font-funnel text-muted-foreground",children:["Taking you to ",e==="signin"?"sign in":"sign up","â¦"]})}):l.jsxs("div",{className:"min-h-screen flex flex-col bg-gradient-to-b from-muted to-card",children:[l.jsx("header",{className:"flex items-center pt-safe-4 pb-4 px-6 md:px-12",children:l.jsxs(Re,{to:"/",className:"flex items-center gap-2",children:[l.jsx(ft,{size:30,variant:"brand",title:""}),l.jsx("span",{className:"text-lg font-bold font-funnel text-primary",children:"asgardhire.ai"})]})}),l.jsx("main",{className:"flex-1 flex flex-col items-center justify-center px-6 py-12",children:l.jsxs("div",{className:"w-full max-w-3xl flex flex-col items-center gap-10",children:[l.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[l.jsx("h1",{className:"text-3xl md:text-4xl leading-tight tracking-tight text-foreground font-extrabold",children:t.heading}),l.jsx("p",{className:"text-[15px] font-funnel text-muted-foreground",children:t.sub}),i&&l.jsx("p",{role:"status",className:"mt-2 rounded-xl border border-success/40 bg-success/10 px-4 py-2.5 text-sm font-semibold font-funnel text-success",children:"Your account is ready. Log in to continue."}),o&&l.jsx("p",{role:"status",className:"mt-2 rounded-xl border border-warning/40 bg-warning/10 px-4 py-2.5 text-sm font-semibold font-funnel text-foreground",children:LJe})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5 w-full",children:[l.jsx(YB,{mode:e,role:"candidate",copy:t.candidate,dotClassName:"bg-success",icon:l.jsx(PV,{size:20})}),l.jsx(YB,{mode:e,role:"recruiter",copy:t.recruiter,dotClassName:"bg-[#F9C50E]",icon:l.jsx(ok,{size:20})})]}),e==="signup"&&l.jsx(yZe,{source:"signup",className:"w-full max-w-md
718self-start"}),l.jsxs(Re,{to:t.swapTo,className:"w-full max-w-xl text-center px-5 py-3.5 rounded-xl border border-dashed border-border bg-card text-sm font-funnel text-muted-foreground transition-colors duration-fast ease-brand hover:border-solid hover:border-primary hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[t.swapLead,l.jsxs("span",{className:"mt-1 block font-bold text-primary",children:[t.swapCta," ",l.jsx(Ad,{size:14,className:"inline-block align-[-2px]"})]})]})]})})]})}const _Ze=J("/_public/sign-up")({component:()=>l.jsx(cZ,{mode:"signup"})}),SZe=J("/_public/sign-in")({component:()=>l.jsx(cZ,{mode:"signin"})}),jZe=J("/_public/login")({beforeLoad:()=>{throw gl({to:"/sign-in"})}});function uZ(e){return{return_to:e.return_to==="auto-apply"||e.return_to==="profile"?e.return_to:void 0}}function Vut(e){return e==="profile"?"/profile":"/auto-apply"}function qut(e){return!!(e?.ready_to_apply||e?.jobs_ready)}function Kut(e){return e==="profile"?"Back to profile":"Continue to auto-apply"}const EZe=J("/_candidate/onboarding")({validateSearch:uZ}),CZe=J("/_candidate/my-interviews")({validateSearch:iW}),NZe=["remote","hybrid","onsite"],PZe=["full_time","part_time","contract","internship","flexible"],kZe=["1d","3d","7d","30d"],AZe=["newest","salary","relevance"],Wut=50,Hut=10,Gut=350;function dZ(e){return Array.isArray(e)?e:typeof e=="string"?e.split(","):typeof e=="number"?[e]:[]}function QB(e){const t=dZ(e).map(r=>Number(typeof r=="string"?r.trim():r)).filter(r=>Number.isInteger(r)&&r>0),n=[...new Set(t)];return n.length?n:void 0}function Lc(e){const t=dZ(e).map(r=>String(r).trim()).filter(Boolean),n=[...new Set(t)];return n.length?n:void 0}function JB(e,t){const n=(Lc(e)??[]).filter(r=>t.includes(r));return n.length?n:void 0}function XB(e){const t=typeof e=="string"?Number(e.trim()):typeof e=="number"?e:NaN;return Number.isFinite(t)&&t>0?Math.round(t):void 0}function d1(e){if(typeof e=="number")return String(e);if(typeof e!="string")return;const t=e.trim();return t||void 0}function fZ(e){const t={},n=d1(e.q);n&&(t.q=n);const r=QB(e.country_ids);r&&(t.country_ids=r);const i=QB(e.city_ids);i&&(t.city_ids=i);const o=Lc(e.roles);o&&(t.roles=o);const s=Lc(e.companies);s&&(t.companies=s);const a=Lc(e.industries);a&&(t.industries=a);const c=Lc(e.experience_levels);c&&(t.experience_levels=c);const u=Lc(e.job_functions);u&&(t.job_functions=u);const d=JB(e.work_types,NZe);d&&(t.work_types=d);const f=JB(e.job_types,PZe);f&&(t.job_types=f);const h=d1(e.date_posted);h&&kZe.includes(h)&&(t.date_posted=h);let p=XB(e.salary_min),m=XB(e.salary_max);p!==void 0&&m!==void 0&&p>m&&([p,m]=[m,p]),p!==void 0&&(t.salary_min=p),m!==void 0&&(t.salary_max=m),(e.visa==="yes"||e.visa===!0)&&(t.visa="yes"),(e.career_changers===!0||e.career_changers==="true"||e.career_changers==="1")&&(t.career_changers=!0);const g=d1(e.sort);return g&&AZe.includes(g)&&(t.sort=g),e.scope==="all"&&(t.scope="all"),t}function Yut(e){return!OZe(TZe(e))}function TZe(e){const t={...e},n=t.q;return delete t.q,delete t.sort,delete t.scope,n&&(t.keyword=n),XR(t)||(delete t.salary_min,delete t.salary_max),t}function Qut(e,t){const n={...e,q:e.keyword,sort:t==="newest"?void 0:t};return delete n.keyword,fZ(n)}function XR(e){return(e.country_ids?.length??0)===1}function RZe(e){return XR(e)}function Jut(e,t){return e==="relevance"&&!t.keyword||e==="salary"&&!RZe(t)?"newest":e??"newest"}function Xut(e){return e.companies?.length===1?e.companies[0]:null}function Zut(e,t,n){const r=e[t]??[],i=r.includes(n)?r.filter(s=>s!==n):[...r,n],o={...e,[t]:i.length?i:void 0};return t==="country_ids"&&!XR(o)&&(delete o.salary_min,delete o.salary_max),Z0(o)}function Z0(e){const t={};for(const[n,r]of Object.entries(e))r==null||r===""||Array.isArray(r)&&r.length===0||(t[n]=r);return t}function OZe(e){return Object.keys(Z0(e)).length>0}function edt(e){const t={};for(const[n,r]of Object.entries(Z0(e)).sort(([i],[o])=>i.localeCompare(o)))t[n]=Array.isArray(r)?[...r].sort():r;return t}function tdt(e,t,n){const r=[...e.country_ids??[]].sort().join(","),i=[...t.country_ids??[]].sort().join(",");if(r===i||!t.city_ids?.length)return t;const o=t.country_ids??[],s=t.city_ids.filter(a=>{if(o.length===0)return!1;const c=n(a);return c===void 0||o.includes(c)});return s.length===t.city_ids.length?t:Z0({...t,city_ids:s})}const IZe=J("/_candidate/job-market")({validateSearch:fZ}),yv=e=>typeof e=="string"&&e.trim()!==""&&e.length<=512?e:void 0;function MZe(e){const t={},n=yv(e.cv),r=yv(e.job_id),i=yv(e.job_title),o=yv(e.job);return n&&(t.cv=n),r&&(t.job_id=r),i&&(t.job_title=i),o&&(t.job=o),t}const $Ze=J("/_candidate/improve-cv")({validateSearch:MZe}),DZe=J("/_candidate/explore-jobs")({validateSearch:ybe}),ZR="/profile",eO="/my-profile",LZe=[eO,ZR];
718function ndt(e){return e==="CANDIDATE"?ZR:eO}function FZe(e){return LZe.find(t=>e.startsWith(t+"/"))??null}const BZe={profile:ZR,"my-profile":eO};function hZ(e){return e==="profile"||e==="my-profile"}function UZe(e){return hZ(e.from)?{from:e.from}:{}}function rdt(e){const t=e?.from;return hZ(t)?BZe[t]:null}const zZe=J("/_candidate/create-resume")({validateSearch:UZe}),VZe=["cv","letter","both"],qZe=["paste","confirm","done"],KZe=["explore","cover-letter","cv"];function f1(e,t){return typeof e=="string"&&t.includes(e)?e:void 0}function WZe(e){const t={},n=f1(e.for,VZe);n&&(t.for=n);const r=f1(e.step,qZe);r&&(t.step=r),typeof e.job=="string"&&/^ext_[A-Za-z0-9_-]+$/.test(e.job)&&(t.job=e.job);const i=f1(e.from,KZe);return i&&(t.from=i),t}function pZ(e){return e==="cv"?{wantCv:!0,wantLetter:!1}:e==="letter"?{wantCv:!1,wantLetter:!0}:{wantCv:!0,wantLetter:!0}}const HZe=12*60*60*1e3;function VN(e,t=Date.now()){return{v:1,mode:null,link:"",text:"",fileName:null,step:"paste",jobId:null,pendingJobId:null,jobTitle:"",edits:null,...pZ(e),cvId:null,generated:null,forValue:e??null,savedAt:t}}function bb(e){return`asgardhire:bring-job-draft:${e}`}function tO(){try{return typeof window<"u"?window.sessionStorage:null}catch{return null}}function idt(e,t=tO(),n=Date.now()){if(!t)return null;try{const r=t.getItem(bb(e));if(!r)return null;const i=JSON.parse(r);return!i||i.v!==1?null:typeof i.savedAt!="number"||n-i.savedAt>HZe?(t.removeItem(bb(e)),null):{...VN(void 0,i.savedAt),...i}}catch{return null}}
718function odt(e,t,n=tO(),r=Date.now()){if(n)try{n.setItem(bb(e),JSON.stringify({...t,savedAt:r}))}catch{}}function sdt(e,t=tO()){if(t)try{t.removeItem(bb(e))}catch{}}function adt(e,t,n=Date.now()){return!e||!t.step&&e.generated?VN(t.for,n):t.for&&t.for!==e.forValue&&!e.jobId?{...e,...pZ(t.for),forValue:t.for}:e}function ldt(e,t){const n=e.job??t.jobId??void 0;return e.step==="done"?t.generated&&(t.generated.cvDocId||t.generated.letterDocId)?{step:"done",job:n}:n?{step:"confirm",job:n}:{step:"paste"}:e.step==="confirm"?n?{step:"confirm",job:n}:{step:"paste"}:{step:"paste"}}function cdt(e,t){return{...e,mode:null,link:"",text:"",fileName:null,pendingJobId:null,step:"done",generated:t}}const GZe=J("/_candidate/bring-job")({validateSearch:WZe}),YZe=J("/_candidate/auto-apply-profile")({validateSearch:uZ});function QZe(e){if(typeof e.run_id!="string")return{};const t=e.run_id.trim();return t?{run_id:t}:{}}const JZe=J("/_candidate/auto-apply")({validateSearch:QZe}),XZe=J("/_admin/reports")({validateSearch:e=>typeof e.job=="string"&&e.job?{job:e.job}:{}}),ZZe=J("/_admin/reports/")({});function mZ(){return l.jsx("div",{className:"flex items-center justify-center",style:{minHeight:32},"aria-label":"Loading",role:"status",children:l.jsx(ft,{size:20,variant:"current",spin:!0,title:"",className:"text-muted-foreground"})})}function eet(){const e=Ab({strict:!1,select:i=>i}),t=Ki(),n=i=>{t.navigate({search(o){return Object.entries({...o,...i}).forEach(([s,a])=>{if(!a){delete o[s];return}o[s]=a}),o}})};return v.useMemo(()=>({get:i=>e[i]||null,set:(i,o)=>{t.navigate({search:s=>({...s,[i]:o})})},remove:i=>{t.navigate({search:o=>(delete o[i],o)})},setParams:n}),[e])}const tet=J("/_public/invitations/accept")({component:oet}),net="https://auth.asgardhire.ai",ZB=8,ret=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z0-9])/;function iet(e){return e.length<ZB?`Password must be at least ${ZB} characters`:ret.test(e)?null:"Password must contain uppercase, lowercase, number, and special character"}function oet(){const t=eet().get("token"),[n,r]=v.useState("landing"),[i,o]=v.useState(""),[s,a]=v.useState(""),[c,u]=v.useState(""),[d,f]=v.useState(""),[h,p]=v.useState(null),[m,g]=v.useState(null),y=async x=>{x.preventDefault(),p(null);const w=iet(c);if(w){g(w);return}if(c!==d){g("Passwords do not match");return}g(null),r("loading");try{const S=await Be.post("/invitations/accept",{token:t??"",first_name:i,last_name:s,password:c});Q.success(S?.data?.message??"Invitation accepted successfully!"),r("accepted");const j=S?.data?.role==="CANDIDATE";setTimeout(()=>{const E=j?window.location.origin+"/my-interviews":window.location.origin+"/jd-list",N=`${net}/login?client_id=${j?Mn:Pr}&response_type=code&scope=email+openid+profile&redirect_uri=${encodeURIComponent(E)}&prompt=login`;window.location.href=N},2e3)}catch(S){const _=S?.response?.data?.error||S?.response?.data?.message||S?.message||"Failed to accept invitation";Q.error(_),p(_),r("error")}},b=()=>{r("details")};return t?n==="loading"?l.jsx(Ce,{className:"max-w-md mx-auto mt-24 shadow-md flex flex-col items-center justify-center min-h-[300px]",children:l.jsxs(Wo,{className:"flex flex-col items-center gap-2",children:[l.jsx(mZ,{}),l.jsx("span",{className:"mt-4 text-primary",children:"Accepting invitation..."})]})}):n==="error"?l.jsxs(Ce,{className:"max-w-md mx-auto mt-24 shadow-md",children:[l.jsxs(na,{className:"items-center",children:[l.jsx(Cj,{className:"text-destructive mb-2",size:40}),l.jsx(ra,{className:"text-destructive",children:"Error"})]}),l.jsx(Wo,{children:l.jsx($c,{children:h})}),l.jsx(Wv,{className:"flex justify-center",children:l.jsx(G,{onClick:()=>r("details"),variant:"default",children:"Try Again"})})]}):n==="accepted"?l.jsxs(Ce,{className:"max-w-md mx-auto mt-24 shadow-md",children:[l.jsxs(na,{className:"items-center",children:[l.jsx(yse,{className:"text-success mb-2",size:40}),l.jsx(ra,{children:"Account created!"})]}),l.jsx(Wo,{children:l.jsx($c,{children:"Redirecting to sign in with your new credentials..."})})]}):n==="details"?l.jsxs(Ce,{className:"max-w-md mx-auto mt-24 shadow-md",children:[l.jsxs(na,{className:"items-center",children:[l.jsx(ra,{className:"mb-1 text-center",children:"Complete your signup"}
718),l.jsx($c,{className:"text-center",children:"Enter your details and set a password to accept the invitation."})]}),l.jsxs("form",{autoComplete:"off",onSubmit:y,children:[l.jsx(Wo,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx(Kt,{htmlFor:"firstName",children:"First Name"}),l.jsx(Le,{id:"firstName",required:!0,value:i,onChange:x=>o(x.target.value),placeholder:"Your first name",autoFocus:!0})]}),l.jsxs("div",{children:[l.jsx(Kt,{htmlFor:"lastName",children:"Last Name"}),l.jsx(Le,{id:"lastName",required:!0,value:s,onChange:x=>a(x.target.value),placeholder:"Your last name"})]}),l.jsxs("div",{children:[l.jsx(Kt,{htmlFor:"password",children:"Password"}),l.jsx(Le,{id:"password",type:"password",required:!0,value:c,onChange:x=>{u(x.target.value),g(null)},placeholder:"Create a password"})]}),l.jsxs("div",{children:[l.jsx(Kt,{htmlFor:"confirmPassword",children:"Confirm Password"}),l.jsx(Le,{id:"confirmPassword",type:"password",required:!0,value:d,onChange:x=>{f(x.target.value),g(null)},placeholder:"Confirm your password"})]}),m&&l.jsx("p",{className:"text-sm text-destructive",children:m}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Password must be at least 8 characters with uppercase, lowercase, number, and special character."})]})}),l.jsx(Wv,{className:"flex flex-col items-center gap-2",children:l.jsx(G,{className:"w-full",type:"submit",disabled:!i||!s||!c||!d,children:"Submit and Accept Invitation"})})]})]}):l.jsxs(Ce,{className:"max-w-md mx-auto mt-24 shadow-md p-6",children:[l.jsxs(na,{className:"items-center",children:[l.jsx(ra,{className:"text-xl font-light mb-1 text-center",children:"You have been invited. Accept the invitation to get started."}),l.jsx($c,{className:"mb-2 text-center"})]}),l.jsx(Wv,{className:"flex flex-col items-center gap-2 pb-6",children:l.jsx(G,{className:"w-full",onClick:b,children:"Accept Invitation"})})]}):l.jsxs(Ce,{className:"max-w-md mx-auto mt-24 shadow-md",children:[l.jsxs(na,{className:"items-center",children:[l.jsx(Cj,{className:"text-destructive mb-2",size:40}),l.jsx(ra,{className:"text-destructive",children:"Invalid Invitation Link"})]}),l.jsx(Wo,{children:l.jsx($c,{children:"No invitation token provided."})})]})}const set=J("/_public/candidate/login")({component:aet});function aet(){return v.useEffect(()=>{aZ()},[]),l.jsx(Ce,{className:"max-w-md mx-auto mt-24 shadow-md flex flex-col items-center justify-center min-h-[300px]",children:l.jsxs(Wo,{className:"flex flex-col items-center gap-2",children:[l.jsx(mZ,{}),l.jsx("span",{className:"mt-4 text-primary",children:"Redirecting to sign in..."})]})})}const cet=new Set(["review","approve","skip","approve_all"]);function h1(e){return typeof e!="string"?void 0:e.trim()||void 0}function uet(e){const t=h1(e.batch_id),n=h1(e.job_id),r=h1(e.intent),i=r&&cet.has(r)?r:void 0;return{...t?{batch_id:t}:{},...n?{job_id:n}:{},...i?{intent:i}:{}}}const det=J("/_candidate/auto-apply_/daily")({validateSearch:uet}),gZ=v.forwardRef(({...e},t)=>l.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));gZ.displayName="Breadcrumb";const vZ=v.forwardRef(({className:e,...t},n)=>l.jsx("ol",{ref:n,className:K("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));vZ.displayName="BreadcrumbList";const qN=v.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:K("inline-flex items-center gap-1.5",e),...t}));qN.displayName="BreadcrumbItem";const yZ=v.forwardRef(({asChild:e,className:t,...n},r)=>{const i=e?Bi:"a";return l.jsx(i,{ref:r,className:K("transition-colors hover:text-foreground",t),...n})});yZ.displayName="BreadcrumbLink";const xZ=v.forwardRef(({className:e,...t},n)=>l.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:K("font-normal text-foreground",e),...t}));xZ.displayName="BreadcrumbPage";const bZ=({children:e,className:t,...n})=>l.jsx("li",{role:"presentation","aria-hidden":"true",className:K("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...n,children:e??l.jsx(Em,{})});bZ.displayName="BreadcrumbSeparator";const fet={urgent:"border-destructive/40 bg-destructive/10 text-destructive",warning:"border-warning/40 bg-warning/10 text-warning",notice:"border-info/40 bg-info/10 text-info",closed:"border-border bg-muted/50 text-muted-foreground",calm:"border-border bg-card text-muted-foreground"};function het({jdId:e}){const{data:t,isLoading:n}=OX(e),r=fXe(e),i=hXe(e),[o,s]=v.useState(!1);if(n||!t)return null;const a=pXe(t),c=MX(t),u=!!t.closed_at,d=()=>{r.mutate(void 0,{onSuccess:()=>Q.success("Extended by 30 days"),onError:p=>{const m=p?.response?.status,g=p?.response?.data?.error??"Couldn't extend this role";Q.error(m===409?g:"Couldn't extend this role")}})},f=()=>{i.mutate(void 0,{onSuccess:()=>{s(!1),Q.success("Role closed - shortlisted candidates have been notified")},onError:()=>Q.error("Couldn't close this role")})},h=r.isPending||i.isPending;return l.jsx("div",{className:"px-1 pb-2 sm:px-2",children:l.jsxs("div",{className:K("flex flex-col gap-3 rounded-lg border px-4 py-3 sm:flex-row sm:items-center sm:justify-between",fet[a]),children:[l.jsxs("div",{className:"flex items-start gap-2.5",children:[u?l.jsx(sk,{className:"mt-0.5 h-[18px] w-[18px] shrink-0"}):a==="urgent"?l.jsx(gs,{className:"mt-0.5 h-[18px] w-[18px] shrink-0"}):l.jsx(xV,{className:"mt-0.5 h-[18px] w-[18px] shrink-0"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"text-sm font-semibold",children:c}),!u&&l.jsx("p",{className:"mt-0.5 text-xs opacity-80",children:t.can_extend?"If you do nothing, this role closes automatically and any shortlisted candidates are told it has closed.":"This role has already used its 30-day extension, so it will close for good on that date."})]})]}),!u&&l.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[t.can_extend&&l.jsxs(G,{variant:"outline",size:"sm",disabled:h,onClick:d,children:[r.isPending&&l.jsx(ft,{size:16,variant:"current",spin:!0,title:"",className:"mr-1.5 .5 .5"}),"Extend 30 days"]}),o?l.jsxs(l.Fragment,{children:[l.jsxs(G,{variant:"destructive",size:"sm",disabled:h,onClick:f,children:[i.isPending&&l.jsx(ft,{size:16,variant:"current",spin:!0,title:"",className:"mr-1.5 .5 .5"}),"Confirm close"]}),l.jsx(G,{variant:"ghost",size:"sm",disabled:h,onClick:()=>s(!1),children:"Cancel"})]}):l.jsx(G,{variant:"outline",size:"sm",disabled:h,onClick:()=>s(!0),children:"Close role"})]})]})})}function pet({jdId:e,usage:t,onSaved:n,onCancel:r,idPrefix:i="budget-capacity"}){const o=t.budget_cents!==null,s=RX(e),c=tt().user?.profile,u=c?.org_id??c?.organization_id??"",{data:d}=kA({orgId:u||void 0}),[f,h]=v.useState(t.budget_cents===null?"":String(t.budget_cents/100)),[p,m]=v.useState();v.useEffect(()=>{h(t.budget_cents===null?"":String(t.budget_cents/100)),m(void 0)},[t.budget_cents]);const g=nc(f),y=p??ym("budget",f,t.committed_cents)??void 0,b=y||g===null?null:g*100,x=AX(b,d),w=()=>{const S=DN(g,t.committed_cents);if(S||g===null){m(S??"Enter an interview budget for this job.");return}s.mutate({interviewBudgetCents:g*100},{onSuccess:()=>{Q.success(o?"Budget updated - any candidates it was holding are being released.":"Interview budget set."),n()},onError:_=>{const j=TX(_)??"Couldn't update this job's interview budget.";m(j),Q.error(j)}})};return l.jsxs("div",{children:[l.jsx(ZX,{value:f,onChange:S=>{h(S),m(void 0)},fundable:Q0(d),markerLabel:kX(d),committedInterviews:t.committed_interviews,committedCents:t.committed_cents,error:y,disabled:s.isPending,idPrefix:i}),x&&l.jsx("p",{className:"mt-3 text-xs text-warning",children:x}),l.jsxs("div",{className:"mt-4 flex gap-2",children:[r&&l.jsx(G,{variant:"outline",className:"flex-1",onClick:r,disabled:s.isPending,children:"Cancel"}),l.jsxs(G,{className:r?"flex-1":void 0,onClick:w,disabled:s.isPending,children:[s.isPending&&l.jsx(ft,{size:18,variant:"current",spin:!0,title:"",className:"mr-1.5"}),o?"Save budget":"Set budget"]})]})]})}function eU({open:e,onClose:t,jdId:n,usage:r}){const i=r.budget_cents!==null;return l.jsx(At,{open:e,onOpenChange:o=>!o&&t(),children:l.jsxs(xt,{children:[l.jsxs(Wt,{children:[l.jsx(Ft,{children:i?"Raise interview budget":"Set interview budget"}),l.jsx(Bt,{children:i?`This job is capped at ${un(r.budget_cents)}. Raising it interviews the candidates waiting on it, oldest first.`:"Cap what this job can spend on interviews. Candidates who qualify once it is spent wait rather than being rejected."})]}),l.jsx("div",{className:"mt-2",children:l.jsx(pet,{jdId:n,usage:r,onSaved:t,onCancel:t,idPrefix:"budget-dialog-capacity"})})]})})}const wZ={exhausted:"border-destructive/40 bg-destructive/10 text-destructive",warning:"border-warning/40 bg-warning/10 text-warning",uncapped:"border-border bg-muted/50 text-muted-foreground"},met=wZ.exhausted;function get({jdId:e}){const{data:t,isLoading:n}=Y0({jdId:e}),[r,i]=v.useState(!1),o=t?.budget,s=EX(o);if(n||!o)return null;if(o.halted){const a=o.halt_reason==="org_balance";return l.jsxs("div",{className:"px-4 pb-2",children:[l.jsxs("div",{className:K("flex flex-col gap-3 rounded-lg border px-4 py-3 sm:flex-row sm:items-center sm:justify-between",met),children:[l.jsxs("div",{className:"flex items-start gap-2.5",children:[l.jsx(gs,{className:"mt-0.5 h-[18px] w-[18px] shrink-0"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"text-sm font-semibold",children:a?"Applications paused - your organisation is out of credit":"Applications paused - this job's interview budget is spent"}),l.jsx("p",{className:"mt-0.5 text-xs opacity-80",children:a?"Every job at your organisation has stopped taking new applications until you add credit. Candidates already in progress are held and resume on their own.":"This job is not accepting new applications, and candidates already in progress are held until you raise the budget."})]})]}),l.jsx("div",{className:"flex shrink-0 items-center gap-2",children:a?l.jsx(G,{variant:"outline",size:"sm",asChild:!0,children:l.jsx(Re,{to:"/billing",children:"Add credit"})}):l.jsx(G,{variant:"outline",size:"sm",onClick:()=>i(!0),children:"Raise budget"})})]}),l.jsx(eU,{open:r,onClose:()=>i(!1),jdId:e,usage:o})]})}return s==="calm"?null:l.jsxs("div",{className:"px-1 pb-2 sm:px-2",children:[l.jsxs("div",{className:K("flex flex-col gap-3 rounded-lg border px-4 py-3 sm:flex-row sm:items-center sm:justify-between",wZ[s]),children:[l.jsxs("div",{className:"flex items-start gap-2.5",children:[s==="uncapped"?l.jsx(ck,{className:"mt-0.5 h-[18px] w-[18px] shrink-0"}):l.jsx(gs,{className:"mt-0.5 h-[18px] w-[18px] shrink-0"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"text-sm font-semibold",children:vet(o,s)}),l.jsx("p",{className:"mt-0.5 text-xs opacity-80",children:yet(s)})]})]}),l.jsx("div",{className:"flex shrink-0 items-center gap-2",children:l.jsx(G,{variant:"outline",size:"sm",onClick:()=>i(!0),children:s==="uncapped"?"Set budget":"Raise budget"})})]}),l.jsx(eU,{open:r,onClose:()=>i(!1),jdId:e,usage:o})]})}function vet(e,t){return t==="uncapped"?"This job has no interview budget":gf(e)?t==="exhausted"?`Interview budget spent - ${un(e.budget_cents)}, all ${qi(e.funded_interviews)}`:`${un(e.committed_cents)} of ${un(e.budget_cents)} committed - ${qi(e.remaining_interviews??0)} left`:""}function yet(e){return e==="uncapped"?"Set one to cap what this role can spend. Until you do, only your organisation's credit balance limits it.":e==="exhausted"?"Candidates who qualify from now on are waiting, not rejected. Raising the budget interviews them, oldest first.":"Once it is spent, qualifying candidates wait instead of being interviewed."}const Ro=e=>["sourcing-review",e],xet=100;function bet(e){const t=q();return XP({queryKey:Ro(e??""),initialPageParam:0,queryFn:async({signal:n,pageParam:r})=>(await ee.get(`/jobs/${encodeURIComponent(e)}/sourcing`,{headers:t,signal:n,params:{limit:xet,offset:r}})).data,getNextPageParam:(n,r)=>{const i=r.reduce((o,s)=>o+s.candidates.length,0);return i<n.total?i:void 0},enabled:!!e,refetchInterval:n=>{const r=n.state.data?.pages??[],i=r[0]?.run?.status;return i&&_Z(i)||r.some(s=>s.candidates.some(a=>a.analysis_state==="analysing"))?4e3:!1}})}function udt(e){const t=q(),n=oe();return ie({mutationFn:async r=>(await ee.post(`/jobs/${encodeURIComponent(e)}/sourcing/approve`,{ids:r},{headers:t})).data,onSuccess:()=>{n.invalidateQueries({queryKey:Ro(e??"")})}})}function ddt(e){const t=q(),n=oe();return ie({mutationFn:async r=>(await ee.post(`/jobs/${encodeURIComponent(e)}/sourcing/reject`,{ids:r},{headers:t})).data,onSuccess:()=>{n.invalidateQueries({queryKey:Ro(e??"")})}})}function fdt(e){const t=q(),n=oe();return ie({mutationFn:async()=>(await ee.post(`/jobs/${encodeURIComponent(e)}/sourcing/run`,{},{headers:t})).data,onSuccess:()=>{n.invalidateQueries({queryKey:Ro(e??"")})}})}const nO="Sourcing isn't turned on for your workspace yet. Ask your AsgardHire contact to turn it on.";function hdt(e,t){const n=e?.response?.data;return n?.reason==="sourcing_disabled"?nO:n?.error??n?.message??t}function pdt(e){switch(e.score_state){case"ranked":return typeof e.score=="number"?"ranked":"unranked";case"ranking":return"ranking";case"unranked":return"unranked";default:return"unranked"}}function _Z(e){return e==="queued"||e==="searching"}const mdt=100,gdt=1,vdt=50,wet=15*60*1e3,SZ=10*60*1e3;function ydt(e,t){if(!e)return"allowed";const n=t-new Date(e.updated_at).getTime();return _Z(e.status)?n<wet?"in_flight":"allowed":n<SZ?"cooling_down":"allowed"}function xdt(e,t){const n=t-new Date(e.updated_at).getTime(),r=SZ-n;return Math.max(1,Math.ceil(r/6e4))}function bdt(e){const t=q(),n=oe();return ie({mutationFn:async()=>(await ee.post(`/jobs/${encodeURIComponent(e)}/sourcing/expand`,{},{headers:t})).data,onSuccess:()=>{n.invalidateQueries({queryKey:Ro(e??"")}),n.invalidateQueries({queryKey:["org"]})}})}function wdt(e,t){const n=e?.response;switch(n?.data?.reason){case"sourcing_expansion_no_credits":return"This organisation has no credits left. Buy more credits to source additional candidates.";case"sourcing_expansion_in_flight":return"A purchase for this role is already running. Wait for it to finish before buying more.";case"sourcing_run_throttled":return"Sourcing needs a short break after each run. Try again in a few minutes.";case"sourcing_disabled":return nO;default:return n?.data?.error??n?.data?.message??t}}function _dt(e){return e.state==="active"&&!e.live?"expired":e.state}function Sdt(e){const t=q(),n=oe();return ie({mutationFn:async({candidateId:r,cvBase64:i,cvFilename:o})=>(await ee.post(`/jobs/${encodeURIComponent(e)}/sourcing/candidates/${r}/cv`,{cv_base64:i,cv_filename:o},{headers:t})).data,onSuccess:()=>{n.invalidateQueries({queryKey:Ro(e??"")})}})}
718function jdt(e){const t=q(),n=oe();return ie({mutationFn:async r=>(await ee.post(`/jobs/${encodeURIComponent(e)}/sourcing/candidates/${r}/interview`,{},{headers:t})).data,onSuccess:()=>{n.invalidateQueries({queryKey:Ro(e??"")})}})}function Edt(e){const t=q(),n=oe();return ie({mutationFn:async r=>{const i="allEligible"in r&&r.allEligible?{all_eligible:!0}:{ids:r.ids};return(await ee.post(`/jobs/${encodeURIComponent(e)}/sourcing/interviews:generate`,i,{headers:t})).data},onSuccess:()=>{n.invalidateQueries({queryKey:Ro(e??"")})}})}function Cdt(e){const t=q(),n=oe();return ie({mutationFn:async r=>(await ee.post(`/jobs/${encodeURIComponent(e)}/sourcing/claim-links/${r}/regenerate`,{},{headers:t})).data,onSuccess:()=>{n.invalidateQueries({queryKey:Ro(e??"")})}})}function Ndt(e){const t=q(),n=oe();return ie({mutationFn:async r=>(await ee.post(`/jobs/${encodeURIComponent(e)}/sourcing/claim-links/${r}/deactivate`,{},{headers:t})).data,onSuccess:()=>{n.invalidateQueries({queryKey:Ro(e??"")})}})}function Pdt(e,t,n){const r=q();return ue({queryKey:["sourcing-candidate-message",e??"",t??0],queryFn:async({signal:i})=>(await ee.get(`/jobs/${encodeURIComponent(e)}/sourcing/candidates/${t}/message`,{headers:r,signal:i})).data.message,enabled:n&&!!e&&!!t,retry:!1,staleTime:0})}function kdt(e){return e?.response?.data?.reason==="sourcing_message_unavailable"}function Adt(e,t){const n=e?.response;switch(n?.data?.reason){case"sourced_candidate_not_analysed":return"Upload their CV and wait for it to be read before creating an interview link.";case"claim_link_already_active":return"This person already has a live interview link. Regenerate it, or withdraw it first.";case"claim_link_not_active":return"This interview link is no longer active.";case"budget_exhausted":return"This job has no interview budget left. Raise the budget to interview more candidates.";case"sourcing_disabled":return nO;default:return n?.data?.error??n?.data?.message??t}}function Tdt(e){switch(e){case"NOT_FOUND":return"No longer in this queue";case"NOT_ANALYSED":return"CV not analysed yet";case"ALREADY_ACTIVE":return"Already has a live link";case"BUDGET_EXHAUSTED":return"Interview budget exhausted";case"ERROR":return"Unexpected error";default:return e??"Unknown reason"}}const wb=[{slug:"overview",to:"/jd-dashboard/$jdId/overview",label:"Overview",icon:Tse},{slug:"candidates",to:"/jd-dashboard/$jdId/candidates",label:"Candidates",icon:lk},{slug:"sourcing",to:"/jd-dashboard/$jdId/sourcing",label:"Sourcing",icon:Hse,badgeSource:"sourcing"},{slug:"reviews",to:"/jd-dashboard/$jdId/reviews",label:"Reviews",icon:jj,badgeSource:"reviews"},{slug:"opportunity-matrix",to:"/jd-dashboard/$jdId/opportunity-matrix",label:"Opportunity Matrix",shortLabel:"Matrix",icon:Bse},{slug:"details",to:"/jd-dashboard/$jdId/details",label:"Details",icon:Cm},{slug:"settings",to:"/jd-dashboard/$jdId/settings",label:"Settings",icon:Use}],tU=wb[0];function _et(e,t){const n=`/jd-dashboard/${t}/`;if(!e.startsWith(n))return tU.slug;const r=e.slice(n.length).split("/")[0];return wb.some(i=>i.slug===r)?r:tU.slug}function jet(e,t){return e!==!1||t==="sourcing"?wb:wb.filter(n=>n.slug!=="sourcing")}function Eet({jdId:e}){const t=pt({select:d=>d.status==="pending"}),{data:n}=jX(e),r=n?.candidates?.length??0,{data:i}=bet(e),o=i?.pages?.[0]?.pending_count??0,s=Net(e),a=jet(i?.pages?.[0]?.enabled,s),c=a.find(d=>d.slug===s)??a[0],u=d=>d.badgeSource==="reviews"&&r>0?r:d.badgeSource==="sourcing"&&o>0?o:null;return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"w-full md:hidden",children:[l.jsx("nav",{"aria-label":"Job dashboard sections",className:"flex flex-wrap justify-center gap-1.5 sm:flex-nowrap",children:a.map(d=>l.jsx(Cet,{tab:d,jdId:e,isActive:d.slug===c.slug,badge:u(d)},d.slug))}),t&&l.jsxs("p",{role:"status",className:"mt-2 flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(ft,{size:16,variant:"current",spin:!0,title:""}),"Opening ",c.label,"â¦"]})]}),l.jsx("nav",{"aria-label":"Job dashboard sections",className:"hidden md:flex lg:hidden w-full gap-1 overflow-x-auto border-b border-border pb-px [&>a]:flex-1 [&>a]:justify-center",children:a.map(d=>l.jsx(nU,{tab:d,jdId:e,isActive:d.slug===c.slug,badge:u(d),layout:"horizontal"},d.slug))}),l.jsx("nav",{"aria-label":"Job dashboard sections",className:"hidden lg:flex lg:w-[228px] lg:shrink-0 lg:flex-col lg:gap-1 lg:self-start lg:sticky lg:top-2",children:a.map(d=>l.jsx(nU,{tab:d,jdId:e,isActive:d.slug===c.slug,badge:u(d),layout:"vertical"},d.slug))})]})}function Cet({tab:e,jdId:t,isActive:n,badge:r}){const i=e.icon;return l.jsxs(Re,{to:e.to,params:{jdId:t},preload:"intent","aria-current":n?"page":void 0,className:K("relative flex min-h-[56px] min-w-0 basis-[calc(25%-0.28125rem)] flex-col items-center justify-center gap-1 rounded-lg border px-1 py-2 text-center text-xs font-medium transition-colors sm:flex-1 sm:basis-0",n?"border-info bg-info/10 text-info":"border-border bg-card text-muted-foreground hover:text-foreground"),children:[l.jsx(i,{className:"h-[18px] w-[18px]","aria-hidden":!0}),l.jsx("span",{className:"w-full truncate",children:e.shortLabel??e.label}),r!==null&&l.jsx("span",{className:"absolute right-1 top-1 rounded-full bg-primary px-1.5 py-0.5 text-[10px] font-semibold leading-none text-primary-foreground",children:r})]})}function nU({tab:e,jdId:t,isActive:n,badge:r,layout:i}){const o=e.icon,s=i==="horizontal"?e.shortLabel??e.label:e.label;return l.jsxs(Re,{to:e.to,params:{jdId:t},"aria-current":n?"page":void 0,className:K("flex items-center gap-2.5 rounded-md text-sm font-medium transition-colors",i==="horizontal"?"px-3 py-2":"px-3.5 py-2.5",i==="horizontal"?"shrink-0 whitespace-nowrap rounded-b-none":"w-full",n?"bg-info/10 text-info":"text-muted-foreground hover:bg-muted hover:text-foreground",i==="horizontal"&&n&&"border-b-2 border-info"),children:[l.jsx(o,{className:K("h-[18px] w-[18px] shrink-0",i==="horizontal"&&"hidden")}),l.jsx("span",{className:i==="horizontal"?"truncate":"",children:s}),r!==null&&l.jsx("span",{className:K("ml-auto shrink-0 rounded-full px-1.5 py-0.5 text-[11px] font-semibold leading-none",n?"bg-primary text-primary-foreground":"bg-secondary text-muted-foreground"),children:r})]})}function Net(e){const t=pt({select:n=>n.location.pathname});return _et(t,e)}const rU=40;function Pet(){const{jdId:e}=kb({from:"/_admin/jd-dashboard/$jdId"}),{data:t}=Y0({jdId:e}),n=t?.title??"Dashboard",r=n.length>rU?`${n.slice(0,rU)}â¦`:n;return l.jsxs("div",{className:"w-full",children:[l.jsx("div",{className:"px-1 pb-2 sm:px-2",children:l.jsx(gZ,{children:l.jsxs(vZ,{children:[l.jsx(qN,{children:l.jsx(yZ,{asChild:!0,children:l.jsx(Re,{to:"/jd-list",children:"Jobs"})})}),l.jsx(bZ,{}),l.jsx(qN,{children:l.jsx(xZ,{children:r})})]})})}),l.jsx(het,{jdId:e}),l.jsx(get,{jdId:e}),l.jsxs("div",{className:"flex flex-col gap-3 px-1 sm:px-2 lg:flex-row lg:gap-6",children:[l.jsx(Eet,{jdId:e}),l.jsx("div",{className:"min-w-0 flex-1",children:l.jsx(Fa,{})})]})]})}const ket=J("/_admin/jd-dashboard/$jdId")({component:Pet}),Aet=J("/_admin/jd-dashboard/$jdId/")({beforeLoad:({params:e})=>{throw gl({to:"/jd-dashboard/$jdId/overview",params:{jdId:e.jdId},replace:!0})}}),Tet=J("/_admin/jd-dashboard/$jdId/candidates")({validateSearch:e=>({funnelStep:typeof e.funnelStep=="string"&&e.funnelStep?e.funnelStep:void 0}),component:()=>l.jsx(Fa,{})}),Ret=J("/_admin/jd-dashboard/$jdId/$tab")({validateSearch:e=>({interviewId:typeof e.interviewId=="string"&&e.interviewId?e.interviewId:void 0}),beforeLoad:({params:e,search:t})=>{const{jdId:n,tab:r}=e;throw gl(r==="invite-candidate"?{to:"/jd-dashboard/$jdId/candidates/invite",params:{jdId:n},search:t.interviewId?{interviewId:t.interviewId}:{},replace:!0}:r==="candidate-search"?{to:"/jd-dashboard/$jdId/candidates",params:{jdId:n},replace:!0}:r==="evals"?{to:"/jd-dashboard/$jdId/settings",params:{jdId:n},replace:!0}:{to:"/jd-dashboard/$jdId/overview",params:{jdId:n},replace:!0})}}),Oet=J("/_admin/candidate/$candidateId/$jdId")({validateSearch:e=>({tab:typeof e.tab=="string"&&e.tab?e.tab:void 0}),beforeLoad:({params:e,search:t})=>{throw gl({to:"/jd-dashboard/$jdId/candidates/$candidateId",params:{jdId:e.jdId,candidateId:e.candidateId},search:t.tab?{tab:t.tab}:{},replace:!0})}}),Iet=J("/_admin/jd-dashboard/$jdId/candidates/")({validateSearch:e=>{const t=Number(e.page);return Number.isInteger(t)&&t>1?{page:t}:{}}}),Met=J("/_admin/jd-dashboard/$jdId/candidates/invite")({validateSearch:e=>({interviewId:typeof e.interviewId=="string"&&e.interviewId?e.interviewId:void 0})}),$et=J("/_admin/jd-dashboard/$jdId/candidates/$candidateId")({validateSearch:e=>({tab:typeof e.tab=="string"&&e.tab?e.tab:void 0})}),Det=J("/terms-of-service")(),Let=J("/privacy-policy")(),Fet=J("/pricing")(),Bet=J("/logout")(),Uet=J("/home")(),zet=J("/for-recruiters")(),Vet=J("/for-candidates")(),qet=J("/employer-terms")(),Ket=J("/cookie-policy")(),Wet=J("/contact")(),Het=J("/community-standards-summary")(),Get=J("/community-standards")(),Yet=J("/careers")(),Qet=J("/account-disabled")(),Jet=J("/acceptable-use-policy")(),Xet=J("/about")(),Zet=J("/")(),ett=J("/super-admin/voices")(),ttt=J("/super-admin/overview")(),ntt=J("/super-admin/orgs")(),rtt=J("/super-admin/jobs")(),itt=J("/super-admin/interview-qa")(),ott=J("/super-admin/audit")(),stt=J("/super-admin/analytics")(),att=J("/_public/redeem")(),ltt=J("/_public/org-onboarding")(),ctt=J("/_public/create-org")(),utt=J("/_jobPortal/JobPortal")(),dtt=J("/_candidate/welcome")(),ftt=J("/_candidate/saved-searches")(),htt=J("/_candidate/saved-jobs")(),ptt=J("/_candidate/revenuecat-funnel-auth")(),mtt=J("/_candidate/recently-viewed")(),gtt=J("/_candidate/profile")(),vtt=J("/_candidate/notifications")(),ytt=J("/_candidate/notification-preferences")(),xtt=J("/_candidate/my-activity")(),btt=J("/_candidate/interview-history")(),wtt=J("/_candidate/get-started")(),_tt=J("/_candidate/dashboard")(),Stt=J("/_candidate/cover-letter")(),jtt=J("/_candidate/candidate-billing")(),Ett=J("/_candidate/auto-apply-mailbox")(),Ctt=J("/_candidate/auto-apply-activity")(),Ntt=J("/_candidate/applications")(),Ptt=J("/_admin/users")(),ktt=J("/_admin/traits")(),Att=J("/_admin/templates")(),Ttt=J("/_admin/services")(),Rtt=J("/_admin/rubrics")(),Ott=J("/_admin/overview")(),Itt=J("/_admin/org-settings")(),Mtt=J("/_admin/my-profile")(),$tt=J("/_admin/jd-list")(),Dtt=J("/_admin/invite-user")(),Ltt=J("/_admin/forms")(),Ftt=J("/_admin/evaluation")(),Btt=J("/_admin/create-rubrics")(),Utt=J("/_admin/create-jd-v2")(),ztt=J("/_admin/create-jd")(),Vtt=J("/_admin/contact-us")(),qtt
718=J("/_admin/bookings")(),Ktt=J("/_admin/billing")(),Wtt=J("/super-admin/founder-codes/")(),Htt=J("/_candidate/documents/")(),Gtt=J("/super-admin/founder-codes/$codeId")(),Ytt=J("/_public/r/$shareToken")(),Qtt=J("/_public/jobs/$slug")(),Jtt=J("/_public/job-share/$shareId")(),Xtt=J("/_public/j/$shareId")(),Ztt=J("/_public/i/$code")(),ent=J("/_public/for-you/$token")(),tnt=J("/_public/apply/$token")(),nnt=J("/_candidate/profile_/support")(),rnt=J("/_candidate/profile_/security")(),int=J("/_candidate/profile_/job-history")(),ont=J("/_candidate/profile_/faq")(),snt=J("/_candidate/profile_/edit")(),ant=J("/_candidate/profile_/about")(),lnt=J("/_candidate/profile-ready/$cvId")(),cnt=J("/_candidate/practice-interview/$interviewId")(),unt=J("/_candidate/job-preview/$jdId")(),dnt=J("/_candidate/interview/$interviewId")(),fnt=J("/_candidate/interview-history/$interviewId")(),hnt=J("/_candidate/explore-jobs/$jobId")(),pnt=J("/_candidate/documents/$documentId")(),mnt=J("/_admin/reports/all-roles")(),gnt=J("/_admin/my-profile_/support")(),vnt=J("/_admin/my-profile_/shortlisted")(),ynt=J("/_admin/my-profile_/security")(),xnt=J("/_admin/my-profile_/faq")(),bnt=J("/_admin/my-profile_/edit")(),wnt=J("/_admin/my-profile_/about")(),_nt=J("/_public/sourcing/claim/$token")(),Snt=J("/_admin/reports/talent/$jdId")(),jnt=J("/_admin/jd-dashboard/$jdId/sourcing")(),Ent=J("/_admin/jd-dashboard/$jdId/settings")(),Cnt=J("/_admin/jd-dashboard/$jdId/reviews")(),Nnt=J("/_admin/jd-dashboard/$jdId/overview")(),Pnt=J("/_admin/jd-dashboard/$jdId/opportunity-matrix")(),knt=J("/_admin/jd-dashboard/$jdId/details")(),Ant=J("/_admin/reports/candidate/$jdId/$candidateId")(),Tnt=Det.update({id:"/terms-of-service",path:"/terms-of-service",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./terms-of-service.lazy-BzBDnhVC.js"),__vite__mapDeps([0,1,2])).then(e=>e.Route)),Rnt=Let.update({id:"/privacy-policy",path:"/privacy-policy",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./privacy-policy.lazy-OCQd-UBo.js"),__vite__mapDeps([3,1,2])).then(e=>e.Route)),Ont=Fet.update({id:"/pricing",path:"/pricing",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./pricing.lazy-Ca4lN20S.js"),__vite__mapDeps([4,2])).then(e=>e.Route)),Int=Bet.update({id:"/logout",path:"/logout",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./logout.lazy-DKlWGWXN.js"),__vite__mapDeps([5,6])).then(e=>e.Route)),Mnt=Uet.update({id:"/home",path:"/home",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./home.lazy-CjCyXpPP.js"),__vite__mapDeps([7,8,9,10,11,12,6])).then(e=>e.Route)),$nt=zet.update({id:"/for-recruiters",path:"/for-recruiters",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./for-recruiters.lazy-DJodvDUs.js"),__vite__mapDeps([13,14,15,10,9,11,12])).then(e=>e.Route)),Dnt=Vet.update({id:"/for-candidates",path:"/for-candidates",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./for-candidates.lazy-CE3ype5q.js"),__vite__mapDeps([16,14,15,10,9,11,12])).then(e=>e.Route)),Lnt=qet.update({id:"/employer-terms",path:"/employer-terms",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./employer-terms.lazy-WM5fQ0Dr.js"),__vite__mapDeps([17,1,2])).then(e=>e.Route)),Fnt=Ket.update({id:"/cookie-policy",path:"/cookie-policy",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./cookie-policy.lazy-D_VdcNL1.js"),__vite__mapDeps([18,1,2])).then(e=>e.Route)),Bnt=Wet.update({id:"/contact",path:"/contact",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./contact.lazy-CWuKeshC.js"),__vite__mapDeps([19,2])).then(e=>e.Route)),Unt=Het.update({id:"/community-standards-summary",path:"/community-standards-summary",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./community-standards-summary.lazy-x2-r6pzX.js"),__vite__mapDeps([20,1,2])).then(e=>e.Route)),znt=Get.update({id:"/community-standards",path:"/community-standards",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./community-standards.lazy-BpbpQbam.js"),__vite__mapDeps([21,1,2])).then(e=>e.Route)),Vnt=Yet.update({id:"/careers",path:"/careers",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./careers.lazy-uwWgDEO5.js"),__vite__mapDeps([22,2,23,24])).then(e=>e.Route)),qnt=Qet.update({id:"/account-disabled",path:"/account-disabled",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./account-disabled.lazy-D2G-i4wJ.js"),__vite__mapDeps([25,26,27]
718)).then(e=>e.Route)),Knt=Jet.update({id:"/acceptable-use-policy",path:"/acceptable-use-policy",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./acceptable-use-policy.lazy-C407W18I.js"),__vite__mapDeps([28,1,2])).then(e=>e.Route)),Wnt=Xet.update({id:"/about",path:"/about",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./about.lazy-0nEGv26U.js"),__vite__mapDeps([29,2,11,24])).then(e=>e.Route)),Oo=fGe.update({id:"/super-admin",path:"/super-admin",getParentRoute:()=>zt}),jn=hGe.update({id:"/_public",getParentRoute:()=>zt}),Ue=KJe.update({id:"/_candidate",getParentRoute:()=>zt}),mt=sZe.update({id:"/_admin",getParentRoute:()=>zt}),Hnt=Zet.update({id:"/",path:"/",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./index.lazy-h15H-Yoj.js"),__vite__mapDeps([30,8,9,10,11,12,6])).then(e=>e.Route)),Gnt=ett.update({id:"/voices",path:"/voices",getParentRoute:()=>Oo}).lazy(()=>Z(()=>Promise.resolve().then(()=>aHe),void 0).then(e=>e.Route)),Ynt=ttt.update({id:"/overview",path:"/overview",getParentRoute:()=>Oo}).lazy(()=>Z(()=>Promise.resolve().then(()=>Fwe),void 0).then(e=>e.Route)),Qnt=ntt.update({id:"/orgs",path:"/orgs",getParentRoute:()=>Oo}).lazy(()=>Z(()=>Promise.resolve().then(()=>J0e),void 0).then(e=>e.Route)),Jnt=rtt.update({id:"/jobs",path:"/jobs",getParentRoute:()=>Oo}).lazy(()=>Z(()=>Promise.resolve().then(()=>Jqe),void 0).then(e=>e.Route)),Xnt=itt.update({id:"/interview-qa",path:"/interview-qa",getParentRoute:()=>Oo}).lazy(()=>Z(()=>Promise.resolve().then(()=>L6e),void 0).then(e=>e.Route)),Znt=ott.update({id:"/audit",path:"/audit",getParentRoute:()=>Oo}).lazy(()=>Z(()=>Promise.resolve().then(()=>tKe),void 0).then(e=>e.Route)),ert=stt.update({id:"/analytics",path:"/analytics",getParentRoute:()=>Oo}).lazy(()=>Z(()=>Promise.resolve().then(()=>Hqe),void 0).then(e=>e.Route)),trt=att.update({id:"/redeem",path:"/redeem",getParentRoute:()=>jn}).lazy(()=>Z(()=>import("./redeem.lazy-Dx8HXagm.js"),__vite__mapDeps([31,32,33,34])).then(e=>e.Route)),nrt=ltt.update({id:"/org-onboarding",path:"/org-onboarding",getParentRoute:()=>jn}).lazy(()=>Z(()=>import("./org-onboarding.lazy-BfDQ-zat.js"),__vite__mapDeps([35,36,37,38,39,40,41,42,43])).then(e=>e.Route)),rrt=ctt.update({id:"/create-org",path:"/create-org",getParentRoute:()=>jn}).lazy(()=>Z(()=>import("./create-org.lazy-BBkXd40s.js"),__vite__mapDeps([44,39,40])).then(e=>e.Route)),irt=utt.update({id:"/_jobPortal/JobPortal",path:"/JobPortal",getParentRoute:()=>zt}).lazy(()=>Z(()=>import("./JobPortal.lazy-OXaWB0yJ.js"),__vite__mapDeps([45,46,47])).then(e=>e.Route)),ort=dtt.update({id:"/welcome",path:"/welcome",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./welcome.lazy-CHq5Lc4S.js"),[]).then(e=>e.Route)),srt=ftt.update({id:"/saved-searches",path:"/saved-searches",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./saved-searches.lazy-8b57UeUI.js"),__vite__mapDeps([48,32,49,50,51,52,53,54,55,56,57,58,59])).then(e=>e.Route)),art=htt.update({id:"/saved-jobs",path:"/saved-jobs",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./saved-jobs.lazy-BECwQxZo.js"),__vite__mapDeps([60,32,61,62,41,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,46,78,79,80,81,82,83,84,56,85,52,23,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,51,53])).then(e=>e.Route)),lrt=ptt.update({id:"/revenuecat-funnel-auth",path:"/revenuecat-funnel-auth",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./revenuecat-funnel-auth.lazy-CsEzC76L.js"),__vite__mapDeps([110,111])).then(e=>e.Route)),crt=mtt.update({id:"/recently-viewed",path:"/recently-viewed",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./recently-viewed.lazy-Dz9BGSmO.js"),__vite__mapDeps([112,32,61,62,41,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,46,78,79,80,81,82,83,84,56,85,52,23,86,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,51,53,87])).then(e=>e.Route)),urt=gtt.update({id:"/profile",path:"/profile",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./profile.lazy-Dv3Od5JZ.js"),__vite__mapDeps([113,49,114,32,115,26,34,116,
718117,118,92,119,120,52,72,121,41,122,123,124,125,96,109,126])).then(e=>e.Route)),drt=vtt.update({id:"/notifications",path:"/notifications",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./notifications.lazy-DV0a73fr.js"),__vite__mapDeps([127,32,128])).then(e=>e.Route)),frt=ytt.update({id:"/notification-preferences",path:"/notification-preferences",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./notification-preferences.lazy-qic4MatO.js"),__vite__mapDeps([129,32,86,111,57])).then(e=>e.Route)),hrt=xtt.update({id:"/my-activity",path:"/my-activity",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./my-activity.lazy-SEGrbII_.js"),__vite__mapDeps([130,49,32,50,62,41,58,55,52,53,121,56])).then(e=>e.Route)),jZ=btt.update({id:"/interview-history",path:"/interview-history",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./interview-history.lazy-BWSN2Lvz.js"),__vite__mapDeps([131,32,114,132,121,106,133,134])).then(e=>e.Route)),prt=wtt.update({id:"/get-started",path:"/get-started",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./get-started.lazy-HezrB1Tc.js"),__vite__mapDeps([135,136,123,122,137,138,102,27,139,46,140,141,111])).then(e=>e.Route)),mrt=_tt.update({id:"/dashboard",path:"/dashboard",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./dashboard.lazy-BhCxq0UN.js"),__vite__mapDeps([142,81,82,83,84,32,89,90,62,41,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,46,78,79,80,143,56,144,23,145,146,147,108,106,107,85,59,148,52,27,149,122,141,43,150,96,151,123,102,152,47,153,154,155,156,58,55])).then(e=>e.Route)),grt=Stt.update({id:"/cover-letter",path:"/cover-letter",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./cover-letter.lazy-Cu6bjCAI.js"),__vite__mapDeps([157,94,82,95,32,158,159,160,161,100,140])).then(e=>e.Route)),vrt=jtt.update({id:"/candidate-billing",path:"/candidate-billing",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./candidate-billing.lazy-BbvWLlWd.js"),__vite__mapDeps([162,32,111])).then(e=>e.Route)),yrt=Ett.update({id:"/auto-apply-mailbox",path:"/auto-apply-mailbox",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./auto-apply-mailbox.lazy-BaS4zgG3.js"),__vite__mapDeps([163,104])).then(e=>e.Route)),xrt=Ctt.update({id:"/auto-apply-activity",path:"/auto-apply-activity",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./auto-apply-activity.lazy-zq7QTslr.js"),__vite__mapDeps([164,32,165,166,167,91,74,43,168,169,84])).then(e=>e.Route)),brt=Ntt.update({id:"/applications",path:"/applications",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./applications.lazy-C0ndLYTE.js"),__vite__mapDeps([170,171,168,32,125,56,172])).then(e=>e.Route)),wrt=Ptt.update({id:"/users",path:"/users",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./users.lazy-Dysd6jdB.js"),[]).then(e=>e.Route)),_rt=ktt.update({id:"/traits",path:"/traits",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./traits.lazy-BIgi-66P.js"),__vite__mapDeps([173,174])).then(e=>e.Route)),Srt=Att.update({id:"/templates",path:"/templates",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./templates.lazy-CbYbuBw_.js"),[]).then(e=>e.Route)),jrt=Ttt.update({id:"/services",path:"/services",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./services.lazy-DaQecDlF.js"),[]).then(e=>e.Route)),Ert=Rtt.update({id:"/rubrics",path:"/rubrics",getParentRoute:()=>mt}).lazy(()=>Z(()=>Promise.resolve().then(()=>iZe),void 0).then(e=>e.Route)),Crt=Ott.update({id:"/overview",path:"/overview",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./overview.lazy--CkAfW1G.js"),__vite__mapDeps([175,176,27,177])).then(e=>e.Route)),Nrt=Itt.update({id:"/org-settings",path:"/org-settings",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./org-settings.lazy-DvYgL3f0.js"),__vite__mapDeps([178,39,40,179])).then(e=>e.Route)),Prt=Mtt.update({id:"/my-profile",path:"/my-profile",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./my-profile.lazy-XxMkJbSt.js"),__vite__mapDeps([180,115,26,34,116,
718117,118,92,119,120,52,72,121,41])).then(e=>e.Route)),krt=$tt.update({id:"/jd-list",path:"/jd-list",getParentRoute:()=>mt}).lazy(()=>Z(()=>Promise.resolve().then(()=>XXe),void 0).then(e=>e.Route)),Art=Dtt.update({id:"/invite-user",path:"/invite-user",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./invite-user.lazy--1aQJQsR.js"),__vite__mapDeps([181,37])).then(e=>e.Route)),Trt=Ltt.update({id:"/forms",path:"/forms",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./forms.lazy-DIL5Nv5o.js"),[]).then(e=>e.Route)),Rrt=Ftt.update({id:"/evaluation",path:"/evaluation",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./evaluation.lazy-LHvvQlTj.js"),[]).then(e=>e.Route)),Ort=Btt.update({id:"/create-rubrics",path:"/create-rubrics",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./create-rubrics.lazy-DnDa_4O3.js"),__vite__mapDeps([182,183])).then(e=>e.Route)),Irt=Utt.update({id:"/create-jd-v2",path:"/create-jd-v2",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./create-jd-v2.lazy-Cu1N-HgK.js"),__vite__mapDeps([184,40,185,47,179,186,187,188,111,138,189,27,139,190,24,109,78,43,41,191,192,38,39,42,183])).then(e=>e.Route)),Mrt=ztt.update({id:"/create-jd",path:"/create-jd",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./create-jd.lazy-ByB2l6T0.js"),__vite__mapDeps([193,194,174,36,183])).then(e=>e.Route)),$rt=Vtt.update({id:"/contact-us",path:"/contact-us",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./contact-us.lazy-B0_w-1B1.js"),[]).then(e=>e.Route)),Drt=qtt.update({id:"/bookings",path:"/bookings",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./bookings.lazy-C1GFucTe.js"),[]).then(e=>e.Route)),Lrt=Ktt.update({id:"/billing",path:"/billing",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./billing.lazy-CB7zEEnD.js"),__vite__mapDeps([195,196,27,197])).then(e=>e.Route)),Frt=_Ze.update({id:"/sign-up",path:"/sign-up",getParentRoute:()=>jn}),Brt=SZe.update({id:"/sign-in",path:"/sign-in",getParentRoute:()=>jn}),Urt=jZe.update({id:"/login",path:"/login",getParentRoute:()=>jn}),zrt=EZe.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./onboarding.lazy-CtEoLety.js"),__vite__mapDeps([198,199,89])).then(e=>e.Route)),Vrt=CZe.update({id:"/my-interviews",path:"/my-interviews",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./my-interviews.lazy-DB9ly5wz.js"),__vite__mapDeps([200,69,72,145,71,114,201,132,202,27,53,172,203,46,111,32,204,56,134])).then(e=>e.Route)),qrt=IZe.update({id:"/job-market",path:"/job-market",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./job-market.lazy-DZ_-Hvlw.js"),__vite__mapDeps([205,102,88,89,90,91,74,23,92,93,94,82,95,96,67,97,98,99,100,101,84,79,103,81,83,104,66,68,76,70,75,63,64,65,69,71,72,73,77,62,41,46,78,80,52,56,85,105,106,107,108,109,150,136,146,147,139,154,47,144,199,42])).then(e=>e.Route)),Krt=$Ze.update({id:"/improve-cv",path:"/improve-cv",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./improve-cv.lazy-CevOnU6F.js"),__vite__mapDeps([206,67,68,123,207,46,102,208,109])).then(e=>e.Route)),EZ=DZe.update({id:"/explore-jobs",path:"/explore-jobs",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./explore-jobs.lazy-Dd2dEvuv.js"),__vite__mapDeps([209,32,154,210,211,212,47,56,61,62,41,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,46,78,79,80,81,82,83,84,85,52,23,86,102,139,177,42,103,104,88,89,90,91,92,93,94,95,96,97,98,99,100,101,105,106,107,108,109,54,49,55,57,50,59,213,153,143,152,151,123,150])).then(e=>e.Route)),Wrt=zZe.update({id:"/create-resume",path:"/create-resume",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./create-resume.lazy-CAiPjImq.js"),__vite__mapDeps([214,109,215,46,122,41,191,153,104,197,208,68,97,94,82,95,98,99,100,101,207,160,56,216,84,217,128,65,218,158,219,123,137,138,102,27,139,140,32,148,64,59,144,66,67,75,87,52,72,125,96,116,220,105,78,107])).then(e=>e.Route)),Hrt=GZe.update({id:"/bring-job",path:"/bring-job",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./bring-job.lazy-Cbg3LeA_.js"),__vite__mapDeps([221,186,67,222,94,82,95,158,159,160,98,101,219,102,223])).then(e=>e.Route)),Grt=YZe.update({id:"/auto-apply-profile",path:"/auto-apply-profile",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./auto-apply-profile.lazy-DaRvMHPd.js"),__vite__mapDeps([224,32,89,90,143,56])).then(e=>e.Route)),Yrt=JZe.update({id:"/auto-apply",path:"/auto-apply",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./auto-apply.lazy-CqEgPMiD.js"),__vite__mapDeps([225,32,89,90,58,55,156,154,210,211,212,47,111,12
7180,223,165,166,167,91,74,43,168,169,84,93,62,41,63,64,65,66,67,68,69,70,71,72,73,75,76,77,46,78,79,155,148,59,144,56])).then(e=>e.Route)),sg=XZe.update({id:"/reports",path:"/reports",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./reports.lazy-Nbczr6yy.js"),[]).then(e=>e.Route)),Qrt=Wtt.update({id:"/founder-codes/",path:"/founder-codes/",getParentRoute:()=>Oo}).lazy(()=>Z(()=>Promise.resolve().then(()=>sGe),void 0).then(e=>e.Route)),Jrt=Htt.update({id:"/documents/",path:"/documents/",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./documents.index.lazy-DF4AksNZ.js"),__vite__mapDeps([226,96,125,32,40,222,94,82,95,158,159,160,98,101,219,79,84])).then(e=>e.Route)),Xrt=ZZe.update({id:"/",path:"/",getParentRoute:()=>sg}).lazy(()=>Z(()=>import("./reports.index.lazy-D9qMi1sD.js"),__vite__mapDeps([227,176,228,94,82,95,229,230,231,232,177,27])).then(e=>e.Route)),Zrt=Gtt.update({id:"/founder-codes/$codeId",path:"/founder-codes/$codeId",getParentRoute:()=>Oo}).lazy(()=>Z(()=>Promise.resolve().then(()=>uGe),void 0).then(e=>e.Route)),eit=Ytt.update({id:"/r/$shareToken",path:"/r/$shareToken",getParentRoute:()=>jn}).lazy(()=>Z(()=>import("./r._shareToken.lazy-CI2DNOue.js"),__vite__mapDeps([233,94,82,95,217,160,98,99,100,32,219])).then(e=>e.Route)),tit=Qtt.update({id:"/jobs/$slug",path:"/jobs/$slug",getParentRoute:()=>jn}).lazy(()=>Z(()=>import("./jobs._slug.lazy-De_DD8_l.js"),__vite__mapDeps([234,202,186,33,34,235,69,106,56,72,167,32])).then(e=>e.Route)),nit=Jtt.update({id:"/job-share/$shareId",path:"/job-share/$shareId",getParentRoute:()=>jn}).lazy(()=>Z(()=>import("./job-share._shareId.lazy-D5wQMoo9.js"),__vite__mapDeps([236,237,83,32,238,106,56,85])).then(e=>e.Route)),rit=Xtt.update({id:"/j/$shareId",path:"/j/$shareId",getParentRoute:()=>jn}).lazy(()=>Z(()=>import("./j._shareId.lazy-CNK8WyLn.js"),__vite__mapDeps([239,237,83,32,238,106,56,85])).then(e=>e.Route)),iit=Ztt.update({id:"/i/$code",path:"/i/$code",getParentRoute:()=>jn}).lazy(()=>Z(()=>import("./i._code.lazy-DLuH2BGn.js"),__vite__mapDeps([240,32,33,34,238])).then(e=>e.Route)),oit=ent.update({id:"/for-you/$token",path:"/for-you/$token",getParentRoute:()=>jn}).lazy(()=>Z(()=>import("./for-you._token.lazy-C-7YZ16G.js"),__vite__mapDeps([241,77,62,41,56])).then(e=>e.Route)),sit=tnt.update({id:"/apply/$token",path:"/apply/$token",getParentRoute:()=>jn}).lazy(()=>Z(()=>import("./apply._token.lazy-B9Kuywkm.js"),__vite__mapDeps([242,32,33,34])).then(e=>e.Route)),ait=nnt.update({id:"/profile_/support",path:"/profile/support",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./profile_.support.lazy-pn7SbAJb.js"),__vite__mapDeps([243,32,244,245])).then(e=>e.Route)),lit=rnt.update({id:"/profile_/security",path:"/profile/security",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./profile_.security.lazy-ChTP0zvd.js"),__vite__mapDeps([246,32,247,119,245])).then(e=>e.Route)),cit=int.update({id:"/profile_/job-history",path:"/profile/job-history",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./profile_.job-history.lazy-Cf3RUlOf.js"),__vite__mapDeps([248,171,168,32,245,126,125,118,92,119,120,52,72,121,41])).then(e=>e.Route)),uit=ont.update({id:"/profile_/faq",path:"/profile/faq",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./profile_.faq.lazy-gL_vElRR.js"),__vite__mapDeps([249,32,250,15,10,245])).then(e=>e.Route)),dit=snt.update({id:"/profile_/edit",path:"/profile/edit",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./profile_.edit.lazy-D9Wrmq32.js"),__vite__mapDeps([251,32,252,124,245,208])).then(e=>e.Route)),fit=ant.update({id:"/profile_/about",path:"/profile/about",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./profile_.about.lazy-Co5Cbg0n.js"),__vite__mapDeps([253,32,254,117,245,118,92,119,120,52,72,121,41,255,111])).then(e=>e.Route)),hit=lnt.update({id:"/profile-ready/$cvId",path:"/profile-ready/$cvId",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./profile-ready._cvId.lazy-a_UXUOeL.js"),__vite__mapDeps([256,32,64,122,215,46,41,191,62,213,149,141,151,123,96,102,56,52])).then(e=>e.Route)),pit=cnt.update({id:"/practice-interview/$interviewId",path:"/practice-interview/$interviewId",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./practice-interview._interviewId.lazy-B00dTTY1.js"),__vite__mapDeps([257,69,70,53,169,216,258,132,106,167,78,220,114,203,46,72,145,111])).then(e=>e.Route)),mit=unt.update({id:"/job-preview/$jdId",path:"/job-preview/$jdId",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./job-preview._jdId.lazy-Ojzge2SZ.js"),__vite__mapDeps([259,235,69,106,56,72,32,204,167])).then(e=>e.Route)),git=dnt.update({id:"/interview/$interviewId",path:"/interview/$interviewId",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./interview._interviewId.lazy-DQJfr3Vs.js"),__vite__mapDeps([260,201,132,202,27,53,172,203,46,72,145,111])).then(e=>e.Route)),vit=fnt.update({id:"/$interviewId",path:"/$interviewId",getParentRoute:()=>jZ}).lazy(()=>Z(()=>import("./interview-history._interviewId.lazy-DDXXW5ot.js"),__vite__mapDeps([261,114,70,258,132,53,106,167,78,220,76,74])).then(e=>e.Route)),yit=hnt.update({id:"/$jobId",path:"/$jobId",getParentRoute:()=>EZ}).lazy(()=>Z(()=>import("./explore-jobs._jobId.lazy-BuwRjSB4.js"),__vite__mapDeps([262,104,32,62,41,80,66,
71867,68,88,89,90,91,74,23,92,93,94,82,95,96,97,98,99,100,101,102,84,79,76,70,75,63,64,65,69,71,72,73,77,46,78,52,107,108,56,85,105,106])).then(e=>e.Route)),xit=pnt.update({id:"/documents/$documentId",path:"/documents/$documentId",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./documents._documentId.lazy-D4lDVw_D.js"),__vite__mapDeps([263,158,32,94,82,95,222,159,160,98,101,219,97,99,100,66,67,68,161,218,133,108])).then(e=>e.Route)),bit=mnt.update({id:"/all-roles",path:"/all-roles",getParentRoute:()=>sg}).lazy(()=>Z(()=>import("./reports.all-roles.lazy-BnC6xGO4.js"),__vite__mapDeps([264,265,94,82,95,229,232,197,27])).then(e=>e.Route)),wit=gnt.update({id:"/my-profile_/support",path:"/my-profile/support",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./my-profile_.support.lazy-KPQL6lR5.js"),__vite__mapDeps([266,244,245])).then(e=>e.Route)),_it=vnt.update({id:"/my-profile_/shortlisted",path:"/my-profile/shortlisted",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./my-profile_.shortlisted.lazy-DmoM7uoh.js"),__vite__mapDeps([267,245])).then(e=>e.Route)),Sit=ynt.update({id:"/my-profile_/security",path:"/my-profile/security",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./my-profile_.security.lazy-C0yJ8kQs.js"),__vite__mapDeps([268,247,119,245])).then(e=>e.Route)),jit=xnt.update({id:"/my-profile_/faq",path:"/my-profile/faq",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./my-profile_.faq.lazy-Dyd_dBy0.js"),__vite__mapDeps([269,250,15,10,245])).then(e=>e.Route)),Eit=bnt.update({id:"/my-profile_/edit",path:"/my-profile/edit",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./my-profile_.edit.lazy-C8HD4Tt9.js"),__vite__mapDeps([270,252,124,245,208])).then(e=>e.Route)),Cit=wnt.update({id:"/my-profile_/about",path:"/my-profile/about",getParentRoute:()=>mt}).lazy(()=>Z(()=>import("./my-profile_.about.lazy-QHZMGKa_.js"),__vite__mapDeps([271,254,117,245,118,92,119,120,52,72,121,41,255,111])).then(e=>e.Route)),Nit=tet.update({id:"/invitations/accept",path:"/invitations/accept",getParentRoute:()=>jn}),Pit=set.update({id:"/candidate/login",path:"/candidate/login",getParentRoute:()=>jn}),kit=det.update({id:"/auto-apply_/daily",path:"/auto-apply/daily",getParentRoute:()=>Ue}).lazy(()=>Z(()=>import("./auto-apply_.daily.lazy-BD_PqdSQ.js"),__vite__mapDeps([272,32,89,90,91,74,156,58,55,166,23])).then(e=>e.Route)),Io=ket.update({id:"/jd-dashboard/$jdId",path:"/jd-dashboard/$jdId",getParentRoute:()=>mt}),Ait=Aet.update({id:"/",path:"/",getParentRoute:()=>Io}),Tit=_nt.update({id:"/sourcing/claim/$token",path:"/sourcing/claim/$token",getParentRoute:()=>jn}).lazy(()=>Z(()=>import("./sourcing.claim._token.lazy-BD92orKH.js"),__vite__mapDeps([273,32,33,34,73])).then(e=>e.Route)),Rit=Snt.update({id:"/talent/$jdId",path:"/talent/$jdId",getParentRoute:()=>sg}).lazy(()=>Z(()=>import("./reports.talent._jdId.lazy-DvD1edKv.js"),__vite__mapDeps([274,275,230,172,228,94,82,95,229,265,197,27])).then(e=>e.Route)),Oit=jnt.update({id:"/sourcing",path:"/sourcing",getParentRoute:()=>Io}).lazy(()=>Z(()=>import("./jd-dashboard._jdId.sourcing.lazy-B60tpvpG.js"),__vite__mapDeps([276,43,277,211,212,73,186,106,56,84,208])).then(e=>e.Route)),Iit=Ent.update({id:"/settings",path:"/settings",getParentRoute:()=>Io}).lazy(()=>Z(()=>import("./jd-dashboard._jdId.settings.lazy-BYEnCwuB.js"),__vite__mapDeps([278,190,86,134,279,280,188,187,228,94,82,95,229,230,196,194,41])).then(e=>e.Route)),Mit=Cnt.update({id:"/reviews",path:"/reviews",getParentRoute:()=>Io}).lazy(()=>Z(()=>import("./jd-dashboard._jdId.reviews.lazy-RI84Hq9h.js"),__vite__mapDeps([281,72])).then(e=>e.Route)),$it=Nnt.update({id:"/overview",path:"/overview",getParentRoute:()=>Io}).lazy(()=>Z(()=>import("./jd-dashboard._jdId.overview.lazy-CDFIIfK2.js"),__vite__mapDeps([282,86,277,283,121,192])).then(e=>e.Route)),Dit=Pnt.update({id:"/opportunity-matrix",path:"/opportunity-matrix",getParentRoute:()=>Io}).lazy(()=>Z(()=>import("./jd-dashboard._jdId.opportunity-matrix.lazy-CSntU5kD.js"),__vite__mapDeps([284,279,230,188,280,47])).then(e=>e.Route)),Lit=knt.update({id:"/details",path:"/details",getParentRoute:()=>Io}).lazy(()=>Z(()=>import("./jd-dashboard._jdId.details.lazy-DI-GE5Cu.js"),__vite__mapDeps([285,279,211,212,190,41,191,185,47])).then(e=>e.Route)),e_=Tet.update({id:"/candidates",path:"/candidates",getParentRoute:()=>Io}),Fit=Ret.update({id:"/$tab",path:"/$tab",getParentRoute:()=>Io}),Bit=Oet.update({id:"/candidate/$candidateId/$jdId",path:"/candidate/$candidateId/$jdId",getParentRoute:()=>mt}),Uit=Iet.update({id:"/",path:"/",getParentRoute:()=>e_}).lazy(()=>Z(()=>
718import("./jd-dashboard._jdId.candidates.index.lazy-BGG1WBlZ.js"),__vite__mapDeps([286,275,230,172,287,94,82,95,229,288,65,283,277,192,79,84,46])).then(e=>e.Route)),zit=Ant.update({id:"/candidate/$jdId/$candidateId",path:"/candidate/$jdId/$candidateId",getParentRoute:()=>sg}).lazy(()=>Z(()=>import("./reports.candidate._jdId._candidateId.lazy-DtLD0TJe.js"),__vite__mapDeps([289,265,229,94,82,95,288,230,197,27,72])).then(e=>e.Route)),Vit=Met.update({id:"/invite",path:"/invite",getParentRoute:()=>e_}).lazy(()=>Z(()=>import("./jd-dashboard._jdId.candidates.invite.lazy-BEmSt5Tv.js"),__vite__mapDeps([290,36,186,190,27])).then(e=>e.Route)),qit=$et.update({id:"/$candidateId",path:"/$candidateId",getParentRoute:()=>e_}).lazy(()=>Z(()=>import("./jd-dashboard._jdId.candidates._candidateId.lazy-DYcLek0V.js"),__vite__mapDeps([291,230,275,172,287,94,82,95,229,288,231,265,72,134,212,43,73,109,255,220,65,147,186,197,46])).then(e=>e.Route)),Kit={AdminReportsAllRolesLazyRoute:bit,AdminReportsIndexRoute:Xrt,AdminReportsTalentJdIdLazyRoute:Rit,AdminReportsCandidateJdIdCandidateIdLazyRoute:zit},Wit=sg._addFileChildren(Kit),Hit={AdminJdDashboardJdIdCandidatesCandidateIdRoute:qit,AdminJdDashboardJdIdCandidatesInviteRoute:Vit,AdminJdDashboardJdIdCandidatesIndexRoute:Uit},Git=e_._addFileChildren(Hit),Yit={AdminJdDashboardJdIdTabRoute:Fit,AdminJdDashboardJdIdCandidatesRoute:Git,AdminJdDashboardJdIdDetailsLazyRoute:Lit,AdminJdDashboardJdIdOpportunityMatrixLazyRoute:Dit,AdminJdDashboardJdIdOverviewLazyRoute:$it,AdminJdDashboardJdIdReviewsLazyRoute:Mit,AdminJdDashboardJdIdSettingsLazyRoute:Iit,AdminJdDashboardJdIdSourcingLazyRoute:Oit,AdminJdDashboardJdIdIndexRoute:Ait},Qit=Io._addFileChildren(Yit),Jit={AdminReportsRoute:Wit,AdminBillingLazyRoute:Lrt,AdminBookingsLazyRoute:Drt,AdminContactUsLazyRoute:$rt,AdminCreateJdLazyRoute:Mrt,AdminCreateJdV2LazyRoute:Irt,AdminCreateRubricsLazyRoute:Ort,AdminEvaluationLazyRoute:Rrt,AdminFormsLazyRoute:Trt,AdminInviteUserLazyRoute:Art,AdminJdListLazyRoute:krt,AdminMyProfileLazyR
718oute:Prt,AdminOrgSettingsLazyRoute:Nrt,AdminOverviewLazyRoute:Crt,AdminRubricsLazyRoute:Ert,AdminServicesLazyRoute:jrt,AdminTemplatesLazyRoute:Srt,AdminTraitsLazyRoute:_rt,AdminUsersLazyRoute:wrt,AdminJdDashboardJdIdRoute:Qit,AdminMyProfileAboutLazyRoute:Cit,AdminMyProfileEditLazyRoute:Eit,AdminMyProfileFaqLazyRoute:jit,AdminMyProfileSecurityLazyRoute:Sit,AdminMyProfileShortlistedLazyRoute:_it,AdminMyProfileSupportLazyRoute:wit,AdminCandidateCandidateIdJdIdRoute:Bit},Xit=mt._addFileChildren(Jit),Zit={CandidateExploreJobsJobIdLazyRoute:yit},eot=EZ._addFileChildren(Zit),tot={CandidateInterviewHistoryInterviewIdLazyRoute:vit},not=jZ._addFileChildren(tot),rot={CandidateAutoApplyRoute:Yrt,CandidateAutoApplyProfileRoute:Grt,CandidateBringJobRoute:Hrt,CandidateCreateResumeRoute:Wrt,CandidateExploreJobsRoute:eot,CandidateImproveCvRoute:Krt,CandidateJobMarketRoute:qrt,CandidateMyInterviewsRoute:Vrt,CandidateOnboardingRoute:zrt,CandidateApplicationsLazyRoute:brt,CandidateAutoApplyActivityLazyRoute:xrt,CandidateAutoApplyMailboxLazyRoute:yrt,CandidateCandidateBillingLazyRoute:vrt,CandidateCoverLetterLazyRoute:grt,CandidateDashboardLazyRoute:mrt,CandidateGetStartedLazyRoute:prt,CandidateInterviewHistoryLazyRoute:not,CandidateMyActivityLazyRoute:hrt,CandidateNotificationPreferencesLazyRoute:frt,CandidateNotificationsLazyRoute:drt,CandidateProfileLazyRoute:urt,CandidateRecentlyViewedLazyRoute:crt,CandidateRevenuecatFunnelAuthLazyRoute:lrt,CandidateSavedJobsLazyRoute:art,CandidateSavedSearchesLazyRoute:srt,CandidateWelcomeLazyRoute:ort,CandidateAutoApplyDailyRoute:kit,CandidateDocumentsDocumentIdLazyRoute:xit,CandidateInterviewInterviewIdLazyRoute:git,CandidateJobPreviewJdIdLazyRoute:mit,CandidatePracticeInterviewInterviewIdLazyRoute:pit,CandidateProfileReadyCvIdLazyRoute:hit,CandidateProfileAboutLazyRoute:fit,CandidateProfileEditLazyRoute:dit,CandidateProfileFaqLazyRoute:uit,CandidateProfileJobHistoryLazyRoute:cit,CandidateProfileSecurityLazyRoute:lit,CandidateProfileSupportLazyRoute:ait,CandidateDocumentsIndexLazyRoute:Jrt},iot=Ue._addFileChildren(rot),oot={PublicLoginRoute:Urt,PublicSignInRoute:Brt,PublicSignUpRoute:Frt,PublicCreateOrgLazyRoute:rrt,PublicOrgOnboardingLazyRoute:nrt,PublicRedeemLazyRoute:trt,PublicCandidateLoginRoute:Pit,PublicInvitationsAcceptRoute:Nit,PublicApplyTokenLazyRoute:sit,PublicForYouTokenLazyRoute:oit,PublicICodeLazyRoute:iit,PublicJShareIdLazyRoute:rit,PublicJobShareShareIdLazyRoute:nit,PublicJobsSlugLazyRoute:tit,PublicRShareTokenLazyRoute:eit,PublicSourcingClaimTokenLazyRoute:Tit},sot=jn._addFileChildren(oot),aot={SuperAdminAnalyticsLazyRoute:ert,SuperAdminAuditLazyRoute:Znt,SuperAdminInterviewQaLazyRoute:Xnt,SuperAdminJobsLazyRoute:Jnt,SuperAdminOrgsLazyRoute:Qnt,SuperAdminOverviewLazyRoute:Ynt,SuperAdminVoicesLazyRoute:Gnt,SuperAdminFounderCodesCodeIdLazyRoute:Zrt,SuperAdminFounderCodesIndexLazyRoute:Qrt},lot=Oo._addFileChildren(aot),cot={IndexLazyRoute:Hnt,AdminRoute:Xit,CandidateRoute:iot,PublicRoute:sot,SuperAdminRoute:lot,AboutLazyRoute:Wnt,AcceptableUsePolicyLazyRoute:Knt,AccountDisabledLazyRoute:qnt,CareersLazyRoute:Vnt,CommunityStandardsLazyRoute:znt,CommunityStandardsSummaryLazyRoute:Unt,ContactLazyRoute:Bnt,CookiePolicyLazyRoute:Fnt,EmployerTermsLazyRoute:Lnt,ForCandidatesLazyRoute:Dnt,ForRecruitersLazyRoute:$nt,HomeLazyRoute:Mnt,LogoutLazyRoute:Int,PricingLazyRoute:Ont,PrivacyPolicyLazyRoute:Rnt,TermsOfServiceLazyRoute:Tnt,JobPortalJobPortalLazyRoute:irt},uot=zt._addFileChildren(cot)._addFileTypes();var CZ,iU=Ns;CZ=iU.createRoot,iU.hydrateRoot;const dot="/jd-list";function NZ(e){return e==="/jd-list"?dot:f5}function PZ(e){if(e?.profile?.role==="CANDIDATE"){window.location.replace(f5);return}const t=xle({role:e?.profile?.role,orgId:e?.profile?.org_id,pendingJobSlug:localStorage.getItem("job-ad-pending-slug"),returnTo:localStorage.getItem("candidate-return-to")});t.blockedAsOrgMember&&(localStorage.removeItem("job-ad-pending-slug"),sessionStorage.setItem("org-member-candidate-blocked","true")),localStorage.removeItem("candidate-return-to"),window.location.replace(t.to)}const fot={captureException(){}};let hot=fot,p1=!1;function KN(e,t){try{hot.captureException(e,t)}catch{}}function pot(e){const t=e?.response?.status;return typeof t=="number"&&t>=400&&t<500}function mot(e=window){if(p1)return()=>{};p1=!0;const t=r=>{KN(r.error??r.message,{tags:{source:"window.onerror"}})},n=r=>{KN(r.reason,{tags:{source:"unhandledrejection"}})};return e.addEventListener("error",t),e.addEventListener("unhandledrejection",n),()=>{e.removeEventListener("error",t),e.removeEventListener("unhandledrejection",n),p1=!1}}async function got(e,t=()=>Z(()=>import("./index-CfJmgF-Z.js"),[])){return!1}const _b=Wa("App",{web:()=>Z(()=>import("./web-CSUPEuAE.js"),[]).then(e=>new e.AppWeb)});function vot(e){lt.isNativePlatform()&&_b.addListener("appUrlOpen",({url:t})=>{yot(t,e)})}let m1=!1;async function yot(e,t){if(!(!nZ(e)||m1)){m1=!0;try{const n=new URL(e).searchParams;if(!n.has("code")){if(n.has("error")||n.has("error_description")){const i=Lz(n);i&&Fz(i)}await Pl.close().catch(()=>{}),window.location.replace("/");return}if(n.has("state")){const i=rZ(),s=await(i?JR(i):t).signinRedirectCallback(e);QR(i??t.settings.client_id),await Pl.close().catch(()=>{}),PZ(s);return}const r=await lZ(e);await Pl.close().catch(()=>{}),r?window.location.replace(NZ("")):Q.error("Sign-in failed. Please try again.")}catch(n){console.error("Native auth deep link handling failed:",n),Q.error("Sign-in failed. Please try again."),await Pl.close().catch(()=>{})}finally{m1=!1}}}const xot=Wa("SplashScreen",{web:()=>Z(()=>
718import("./web-BFcMwPbA.js"),[]).then(e=>new e.SplashScreenWeb)});var WN;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(WN||(WN={}));var oU;(function(e){e.None="NONE",e.Slide="SLIDE",e.Fade="FADE"})(oU||(oU={}));const sU=Wa("StatusBar"),Qv=[];function bot(e){return Qv.push(e),()=>{const t=Qv.lastIndexOf(e);t>=0&&Qv.splice(t,1)}}function wot(){const e=Qv.pop();return e?(e(),!0):!1}function Rdt(e,t){const n=v.useRef(t);n.current=t,v.useEffect(()=>{if(e)return bot(()=>n.current())},[e])}const HN=new Set;let Sb=typeof document>"u"?!0:document.visibilityState!=="hidden",aU=!1;function lU(e){if(e!==Sb){Sb=e;for(const t of[...HN])t(e)}}function kZ(){if(!aU){if(aU=!0,lt.isNativePlatform()){Sb=!0,_b.addListener("appStateChange",({isActive:e})=>lU(e)).catch(()=>{});return}typeof document<"u"&&document.addEventListener("visibilitychange",()=>lU(document.visibilityState!=="hidden"))}}function AZ(){return kZ(),Sb}function TZ(e){return kZ(),HN.add(e),()=>{HN.delete(e)}}function _ot(){lt.isNativePlatform()&&Gb.setEventListener(e=>(e(AZ()),TZ(t=>e(t))))}function Odt(e,t,n,r){const[i,o]=v.useState(!1),s=v.useRef(n);return s.current=n,v.useEffect(()=>{if(o(!1),!t)return;let a=e,c=0,u;const d=()=>{c=Date.now(),u=setTimeout(()=>o(!0),Math.max(0,a))},f=()=>{u!==void 0&&(clearTimeout(u),u=void 0,a-=Date.now()-c)};AZ()&&d();const h=TZ(p=>{p?(u===void 0&&d(),s.current?.()):f()});return()=>{h(),u!==void 0&&clearTimeout(u)}},[e,t,r]),t&&i}const Sot="/interview/";function RZ(){if(!lt.isNativePlatform())return;const e=document.querySelector('meta[name="viewport"]');if(!e)return;const t=e.getAttribute("content")??"";t.includes("viewport-fit=cover")||e.setAttribute("content",`${t}, viewport-fit=cover`)}async function jot(e){if(!lt.isNativePlatform())return;RZ(),_ot();const t=lt.getPlatform()==="android";await Promise.all([sU.setStyle({style:WN.Dark}).catch(()=>{}),t?sU.setOverlaysWebView({overlay:!0}).catch(()=>{}):Promise.resolve(),zxe().catch(()=>{})]),t&&_b.addListener("backButton",({canGoBack:n})=>{if(wot())return;const r=e.state.location.pathname;if(r.startsWith(Sot))return;const i=FZe(r);if(i){e.navigate({to:i});return}n?e.history.back():_b.exitApp()}),await xot.hide().catch(()=>{})}const cU="version-reload",Eot=1e4,Cot=6e4,Not="3df9977f9319f6ed8768b4a2065c96a15ae1f852";function Pot(e){const{deployed:t,running:n,lastReloadAt:r,now:i,debounceMs:o=Eot}=e;return!(!t||t===n||r!==null&&i-r<o)}async function kot(e){let t;try{t=await e.fetchDeployedVersion()}catch{return}const n=e.storage.getItem(cU),r=n?Number(n):null,i=e.now();Pot({deployed:t,running:e.getRunningVersion(),lastReloadAt:r,now:i})&&(e.storage.setItem(cU,String(i)),e.reload())}async function Aot(){const e=await fetch("/version.json",{cache:"no-store"});return e.ok?(await e.json()).version??null:null}function Tot(e=Cot){if(typeof window>"u")return()=>{};const t={fetchDeployedVersion:Aot,getRunningVersion:()=>Not,storage:window.sessionStorage,reload:()=>window.location.reload(),now:()=>Date.now()},n=()=>void kot(t),r=()=>{document.visibilityState==="visible"&&n()},i=window.setInterval(n,e);return document.addEventListener("visibilitychange",r),window.addEventListener("focus",n),n(),()=>{window.clearInterval(i),document.removeEventListener("visibilitychange",r),window.removeEventListener("focus",n)}}const Rot=new Wie({defaultOptions:{queries:{staleTime:0,refetchOnWindowFocus:!1,retry:0,refetchOnMount:!0,refetchOnReconnect:!0},mutations:{onError:e=>{console.error("Mutation failed:",e),pot(e)||KN(e,{tags:{source:"mutation"}})}}}});async function Oot(e){FK(),zpe(),mot(),got(),RZ(),window.addEventListener("vite:preloadError",()=>{const i=sessionStorage.getItem("chunk-reload"),o=Date.now();(!i||o-Number(i)>1e4)&&(sessionStorage.setItem("chunk-reload",String(o)),window.location.reload())}),SQ()&&Tot();const t=Pie(window.location.href,aZe);if(t){Fz(t.message),window.location.replace(t.redirectTo);return}if(await lZ()){const i=window.location.pathname.replace(/\/$/,"")||"/",o=NZ(i);window.location.replace(o);return}const r=dZe();CZ(document.getElementById("root")).render(l.jsxs(Jie,{client:Rot,children:[l.jsx(mle,{userManager:r,onSigninCallback:PZ,children:l.jsx(Nre,{router:e})}),l.jsx(Eie,{position:"bottom-center",reverseOrder:!1})]})),jot(e),vot(r)}const Iot=rte({routeTree:uot});Oot(Iot);export{qs as $,GR as A,ok as B,bo as C,f5 as D,bV as E,xle as F,bX as G,But as H,zN as I,PV as J,Ad as K,Re as L,SV as M,Dpe as N,sut as O,sk as P,rut as Q,Pse as R,Ea as S,ft as T,lk as U,iut as V,bZe as W,Dr as X,U6e as Y,hZe as Z,aZ as _,xse as a,nw as a$,fct as a0,uct as a1,gct as a2,Q6e as a3,dct as a4,Le as a5,ho as a6,Mi as a7,po as a8,$i as a9,plt as aA,Vse as aB,q as aC,ue as aD,ee as aE,oe as aF,vut as aG,Py as aH,Ps as aI,Oe as aJ,ac as aK,Qn as aL,$ as aM,kA as aN,yct as aO,hct as aP,xct as aQ,lwe as aR,Fn as aS,Kt as aT,ak as aU,gs as aV,Bd as aW,rt as aX,aw as aY,xe as aZ,ks as a_,Nt as aa,u2 as ab,swe as ac,uQ as ad,Q as ae,vct as af,Kse as ag,Jb as ah,Tse as ai,ie as aj,Be as ak,gse as al,$_ as am,mA as an,Pm as ao,fc as ap,elt as aq,RW as ar,Tve as as,VH as at,MK as au,EV as av,lc as aw,rk as ax,Lve as ay,flt as az,Td as b,tlt as b$,Ok as b0,tV as b1,kct as b2,Ik as b3,Ca as b4,si as b5,Rk as b6,lw as b7,MWe as b8,pY as b9,Lst as bA,Wse as bB,gat as bC,hat as bD,Tme as bE,dat as bF,oA as bG,lat as bH,Cme as bI,Nme as bJ,Eme as bK,kme as bL,cve as bM,eZ as bN,jV as bO,oct as bP,llt as bQ,olt as bR,rlt as bS,Ibe as bT,_V as bU,ict as bV,lH as bW,wA as bX,Tye as bY,uH as bZ,Gat as b_,mY as ba,vY as bb,yY as bc,gY as bd,bY as be,xY as bf,gbe as bg,At as bh,xt as bi,Ove as bj,Wt as bk,Ft as bl,Bt as bm,pr as bn,iJe as bo,oJe as bp,dut as bq,Vv as br,Vd as bs,nlt as bt,Cm as bu,Qot as bv,Sse as bw,$m as bx,Ost as by,Ist as bz,Wi as c,
718kst as c$,dve as c0,ilt as c1,wlt as c2,mr as c3,gr as c4,bt as c5,pe as c6,vr as c7,he as c8,Ns as c9,Qat as cA,Yat as cB,Uot as cC,Jat as cD,Llt as cE,Fve as cF,hlt as cG,Rst as cH,qM as cI,Dge as cJ,Hat as cK,vxe as cL,Zat as cM,IK as cN,nA as cO,XP as cP,Nst as cQ,Pst as cR,Use as cS,rE as cT,Lhe as cU,Bhe as cV,Fhe as cW,$pe as cX,_st as cY,Sst as cZ,yZe as c_,fW as ca,Em as cb,DQe as cc,Lh as cd,Rdt as ce,Pye as cf,CV as cg,zse as ch,Ej as ci,Ose as cj,ot as ck,kV as cl,_se as cm,Dw as cn,Elt as co,Got as cp,Hot as cq,Wa as cr,Z as cs,ct,Jot as cu,Mot as cv,Qf as cw,Tlt as cx,Rlt as cy,Wat as cz,fut as d,$me as d$,oat as d0,Fot as d1,Fa as d2,Ki as d3,qa as d4,Qk as d5,Nse as d6,Xat as d7,Odt as d8,QQe as d9,bst as dA,iA as dB,Mat as dC,$at as dD,Lat as dE,Xxe as dF,Bat as dG,Fat as dH,lme as dI,Rse as dJ,ck as dK,Gj as dL,Yj as dM,Fy as dN,_i as dO,xV as dP,FA as dQ,qw as dR,xa as dS,ba as dT,hJe as dU,cme as dV,hut as dW,wJe as dX,Iat as dY,Oat as dZ,JM as d_,$J as da,aQe as db,OR as dc,GYe as dd,jJ as de,gle as df,exe as dg,Ume as dh,Dat as di,zme as dj,ff as dk,Os as dl,Is as dm,alt as dn,yV as dp,hxe as dq,pxe as dr,NH as ds,jme as dt,xst as du,sA as dv,Aat as dw,Tat as dx,ult as dy,wst as dz,Pr as e,OQe as e$,bve as e0,QK as e1,Sw as e2,bme as e3,Wye as e4,Fye as e5,SA as e6,Zye as e7,_A as e8,vlt as e9,Ai as eA,Vm as eB,vG as eC,x0 as eD,zm as eE,Vje as eF,jL as eG,$T as eH,$7 as eI,Jct as eJ,e7 as eK,F9e as eL,z3 as eM,ls as eN,S9e as eO,Dt as eP,AR as eQ,$n as eR,$9e as eS,SR as eT,M9e as eU,Sd as eV,as as eW,TQe as eX,Gt as eY,pYe as eZ,IQe as e_,Bye as ea,Uye as eb,hH as ec,ze as ed,et as ee,CC as ef,gx as eg,Ye as eh,wn as ei,Ve as ej,Xt as ek,Lr as el,nx as em,GUe as en,js as eo,ni as ep,Ni as eq,w0 as er,fe as es,Rn as et,_a as eu,os as ev,ri as ew,_Fe as ex,Ti as ey,is as ez,Mn as f,$ut as f$,FB as f0,mYe as f1,cJ as f2,eJ as f3,t7e as f4,Km as f5,rr as f6,Rme as f7,Ome as f8,r9 as f9,Slt as fA,Plt as fB,Pl as fC,Nlt as fD,jat as fE,Cat as fF,Eat as fG,aat as fH,Sat as fI,uat as fJ,yat as fK,xat as fL,bat as fM,wat as fN,cat as fO,_at as fP,mut as fQ,gut as fR,AJe as fS,uX as fT,put as fU,Cj as fV,WXe as fW,Dut as fX,tZe as fY,NV as fZ,Wu as f_,Qa as fa,CDe as fb,ODe as fc,Xct as fd,Ab as fe,Mst as ff,Fst as fg,Bst as fh,Tst as fi,wV as fj,Zxe as fk,Mlt as fl,Ilt as fm,$lt as fn,_lt as fo,Gxe as fp,jlt as fq,Jxe as fr,out as fs,Olt as ft,klt as fu,tbe as fv,Alt as fw,Vxe as fx,Dlt as fy,Clt as fz,X0 as g,y0e as g$,Lut as g0,Fut as g1,G0 as g2,D0 as g3,xw as g4,$ot as g5,KH as g6,J2 as g7,Vat as g8,Kat as g9,ht as gA,I9e as gB,W3 as gC,lut as gD,Ict as gE,L6 as gF,Mct as gG,S0e as gH,Dct as gI,$ct as gJ,Oct as gK,bn as gL,F6 as gM,Bct as gN,Vct as gO,qct as gP,P0e as gQ,Uct as gR,N0e as gS,Vw as gT,C0e as gU,Lct as gV,Wct as gW,Kct as gX,U6 as gY,r$ as gZ,Hct as g_,zat as ga,qat as gb,Lw as gc,QT as gd,Rd as ge,i$ as gf,Gct as gg,mct as gh,Rct as gi,zct as gj,Tct as gk,g0e as gl,L0e as gm,Fct as gn,pct as go,Lm as gp,Zy as gq,Ph as gr,or as gs,dwe as gt,Cw as gu,p3 as gv,eet as gw,nut as gx,gm as gy,Ma as gz,zut as h,TZe as h$,nc as h0,JX as h1,vse as h2,TX as h3,Mut as h4,DN as h5,KXe as h6,na as h7,ra as h8,Wo as h9,Kut as hA,yst as hB,dc as hC,iat as hD,sat as hE,Cut as hF,Ise as hG,edt as hH,Hb as hI,Ew as hJ,BQe as hK,oW as hL,Z0 as hM,Zut as hN,Wut as hO,Xut as hP,Gut as hQ,Uat as hR,Hut as hS,zve as hT,XR as hU,dH as hV,NZe as hW,PZe as hX,kZe as hY,ql as hZ,mat as h_,HY as ha,qY as hb,UY as hc,VY as hd,KY as he,d3 as hf,wct as hg,_ct as hh,jct as hi,Sct as hj,Ect as hk,$c as hl,ao as hm,Cct as hn,bct as ho,Ir as hp,Nct as hq,Nm as hr,S5 as hs,Dv as ht,Bu as hu,tw as hv,XN as hw,fH as hx,Vut as hy,qut as hz,Rf as i,pat as i$,Jut as i0,Yut as i1,OZe as i2,Qut as i3,tdt as i4,slt as i5,RZe as i6,MZe as i7,_w as i8,glt as i9,ldt as iA,cdt as iB,sdt as iC,VN as iD,zlt as iE,Ylt as iF,Qlt as iG,qlt as iH,cbe as iI,Glt as iJ,Mf as iK,Wlt as iL,Ult as iM,Vlt as iN,Klt as iO,Hlt as iP,Flt as iQ,Blt as iR,sbe as iS,Vve as iT,fat as iU,aut as iV,SQ as iW,Nat as iX,$se as iY,Mse as iZ,vat as i_,xlt as ia,blt as ib,rct as ic,kW as id,Nve as ie,AW as ig,Rat as ih,clt as ii,tct as ij,ect as ik,Xlt as il,Zlt as im,dlt as io,xbe as ip,nct as iq,Jlt as ir,Dot as is,rdt as it,sct as iu,gxe as iv,WZe as iw,adt as ix,idt as iy,odt as iz,l as j,MX as j$,Ust as j0,zst as j1,tXe as j2,Out as j3,nXe as j4,jX as j5,xXe as j6,SXe as j7,$X as j8,kb as j9,Ndt as jA,_dt as jB,Pdt as jC,Rpe as jD,kdt as jE,Adt as jF,Sdt as jG,pdt as jH,Tdt as jI,_Z as jJ,vdt as jK,bdt as jL,ydt as jM,xdt as jN,gdt as jO,mdt as jP,wdt as jQ,bet as jR,udt as jS,ddt as jT,fdt as jU,Edt as jV,hdt as jW,nO as jX,OX as jY,fXe as jZ,hXe as j_,yut as ja,xut as jb,but as jc,vst as jd,Uut as je,gZ as jf,vZ as
718jg,qN as jh,yZ as ji,bZ as jj,xZ as jk,ew as jl,ndt as jm,Cst as jn,nJe as jo,$st as jp,KN as jq,Dst as jr,act as js,lct as jt,cct as ju,Pat as jv,kat as jw,Pme as jx,jdt as jy,Cdt as jz,lt as k,CE as k$,EX as k0,oXe as k1,Aut as k2,kut as k3,gf as k4,un as k5,$N as k6,Y0 as k7,pet as k8,jut as k9,Est as kA,jst as kB,Ape as kC,eut as kD,tut as kE,Jst as kF,tat as kG,nat as kH,rat as kI,wu as kJ,Qpe as kK,Hst as kL,UK as kM,Put as kN,Xst as kO,Vst as kP,eat as kQ,GFe as kR,Zst as kS,qst as kT,Rut as kU,Gse as kV,Xb as kW,Od as kX,yse as kY,Se as kZ,WY as k_,Vot as ka,Eut as kb,Nut as kc,Tut as kd,jj as ke,wut as kf,tT as kg,Qm as kh,Qct as ki,VT as kj,Qst as kk,j3e as kl,_ut as km,Ast as kn,mZ as ko,Sut as kp,WT as kq,qot as kr,So as ks,Yst as kt,SX as ku,Aa as kv,zhe as kw,Jk as kx,Xk as ky,kM as kz,Ce as l,Kpe as l0,tA as l1,Gst as l2,Wst as l3,zK as l4,Kst as l5,CA as l6,A2 as l7,I2 as l8,C2 as l9,Oxe as la,mlt as lb,Pct as lc,G as m,op as n,$d as o,be as p,Un as q,v as r,zr as s,jse as t,tt as u,pt as v,Zk as w,K as x,BK as y,JJe 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.