1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HousingCostsMapPage-CCSVys6Q.js","assets/vendor-ui-BMsACof5.js","assets/vendor-react-ZBg-rrvt.js","assets/vendor-mapbox-BrTTDEGO.js","assets/useHousingData-DvyrX-_x.js","assets/vendor-data-B6iiC3HR.js","assets/vendor-charts-CryiiMi0.js","assets/vendor-date-BbiQzRnW.js","assets/slider-OVSk6waJ.js","assets/index-BT-NucNL.js","assets/switch-DEQRYZw0.js","assets/InstallationSearchCombobox-CgyYsqUC.js","assets/command-hj1Pf4hY.js","assets/chevrons-up-down-DbAoD2kM.js","assets/MapPageLayout-ktYMI1Q0.js","assets/dropdown-menu-CwKOivDT.js","assets/CopyrightBar-DNTSymEm.js","assets/triangle-alert-DfQv_jJA.js","assets/mapbox-gl-8T4XfZzk.css","assets/TrustBanner-BoisjCtz.js","assets/MapsPreviewSection-Cd5LwaV2.js","assets/ToolsSection-C_IzeCRT.js","assets/ProPreviewSection-C7RAzImk.js","assets/ProCard-CzTsKSom.js","assets/ProCardSkeleton-cQbrg9nq.js","assets/BlogPreviewSection-D_dkkV6o.js","assets/TestimonialsSection-CjS1Zk5X.js","assets/carousel-CacB5yfw.js","assets/embla-carousel-autoplay.esm-CjDxzJE7.js","assets/star-
1BsQpyX-K.js","assets/StorySection-s2ze7Ar0.js","assets/PartnersSection-BT4ZFfFf.js","assets/partnerProfessionals-Bu-psWYk.js","assets/FAQSection-CCeYRx8H.js","assets/accordion-BI2oW_nX.js","assets/TrustBadgesSection-DyR6fyD3.js","assets/CTASection-B-jUQYbD.js","assets/FindProPage-DyjKw78N.js","assets/resizable-BGwflCuB.js","assets/grip-vertical-D0f6EBKW.js","assets/addressParsing-BHD6U42l.js","assets/rotate-ccw-B3HSyzXa.js","assets/form-DCrHJGUV.js","assets/PendingProInvites-CO4dXJ-N.js","assets/useProfessionals-BIeAiGCS.js","assets/HelpfulnessWidget-DEBShn1c.js","assets/thumbs-up-ddsAgshp.js","assets/list-_h2jjZAb.js","assets/HomeForSales-ClN9lUsb.js","assets/FindHomeSearchWidget-sQYwyzf8.js","assets/HomeForRent-EZyZ5Dfw.js","assets/layout-grid-DT26ffgr.js","assets/circle-check-BKu1h7oH.js","assets/FavoritesPage-R9IoXi1k.js","assets/homeSlug-CUgUL3nV.js","assets/InvitePartnerModal-B57gPuUb.js","assets/matchScore-DOVUlx02.js","assets/core.esm-C0Fe6CaE.js","assets/sortable.esm-DnJFn8c1.js","assets/HomeListingCard-YrpdS2DT.js","assets/sticky-note-Da8YHZ9_.js","assets/BuyerAccountGate-_O-hG8kK.js","assets/arrow-right-left-DjU3Xqwq.js","assets/ImportHomeModal-DL-pDMd0.js","assets/table-BPdsX7jt.js","assets/useTableSort-BLYc68bs.js","assets/arrow-up-DAfw-OYz.js","assets/download-BvkTrO_P.js","assets/ResourcesPage-Dcw47XB7.js","assets/AboutPage-i4UToIiC.js","assets/calendar-CU08aWw9.js","assets/ContactPage-Dg6P_S0x.js","assets/message-circle-CLmKrdgZ.js","assets/send-D7MrWDZf.js","assets/FAQPage-DgKRVpzg.js","assets/tabs-CQN354sA.js","assets/index-CwAwnDRi.js","assets/PoliciesPage-DoGa8xOj.js","assets/ResetPasswordPage-B9joQFgF.js","assets/key-round-8-1mVmGV.js","assets/ProLandingPage-DhAlJXEz.js","assets/badge-check-Bfa6Es-Q.js","assets/wallet-DulP3QAN.js","assets/scale-y6hpOvHu.js","assets/file-check-DhB0auSl.js","assets/trending-up-BJyYjyQM.js","assets/ProRoleLandingPage-1m-LJXMT.js","assets/BreadcrumbJsonLd-BfE9aXNc.js","assets/tierFeatures-D0-Vdptm.js","assets/crown-cy2QgcIc.js","assets/stripe-config-Dv_pT-2_.js","assets/AdminPage-CIl-MsIj.js","assets/toggle-group-BJHXcKeP.js","assets/ExportButton-DHaoCA9O.js","assets/AdminPagination-DalbdS95.js","assets/scroll-area-DYlCV9wx.js","assets/mapProToReviewData-BBQPVJuU.js","assets/calendar-CTx74TFP.js","assets/dateUtils-DEQX1pR5.js","assets/upload-DS8CdEO_.js","assets/pro-pin-CZagk9h2.js","assets/mouse-pointer-click-CCmkw-ka.js","assets/ellipsis-vertical-Djsqw148.js","assets/MarkdownContent-DFdwL4tW.js","assets/progress-C11QakxH.js","assets/ellipsis-CH3j5Sow.js","assets/archive-B9N_2foa.js","assets/ListingStatusBadge-DAZVeGGt.js","assets/useListingViewCounts-DYh97vSE.js","assets/copy-r64WCUJC.js","assets/image-BML0a3D2.js","assets/militaryTypes-Dk6z_xDV.js","assets/coverageAnalysisV2-C6hrJ2Ta.js","assets/colors-BvV_zTjs.js","assets/AdminNotificationsPage-DHEEhYIE.js","assets/ProfilePage-gUKrhJH6.js","assets/BuyerReferralCard-BBk3UrD1.js","assets/checklist-CQR5UKam.js","assets/ProfilePhotoUpload-1wZXcUOW.js","assets/PageInfoTooltip-CB4A6mGA.js","assets/ProOnboardingPage-B3cyUgmS.js","assets/ProVettingPage-Cv07Kk79.js","assets/getSeatLimitMessage-qv0lZYo6.js","assets/OnboardingProgress-CUsz7A3I.js","assets/url-a6jBqjF9.js","assets/SearchableSelect-BuXsj8vD.js","assets/PageSkeleton-BxhWscBc.js","assets/file-pen-DAP_gG3n.js","assets/ProStatusPage-rS5eIkfU.js","assets/BuyerDashboardPage-XeXtFjgg.js","assets/DashboardGrid-zr9wBr5K.js","assets/FeaturesRooms-CG9jhPIP.js","assets/PrioritiesPage-C-75V2fI.js","assets/PriorityDialog-YuTiNehU.js","assets/ProDashboardPage-BFxoMqra.js","assets/ProWebpageThemeModal-CkZKMzmY.js","assets/useProAnalytics-CGccQiAS.js","assets/ProAccountGate-N7P3Ueda.js","assets/ProConnectionsPage-ndQj2kPX.js","assets/ProClientDetailPage-BKOSedb7.js","assets/ProAnalyticsPage-CF9UoRV3.js","assets/trending-down-DGX1D0kq.js","assets/minus-C99B2j8I.js","assets/ProSubscriptionPage-DP4D09qC.js","assets/ProBlogPage-BqQcRrZS.js","assets/ProHomepagePage-6wAOz_SX.js","assets/ProListingsPage-Yvcz9cC6.js","assets/useMyListings-CJJHOn5r.js","assets/ProListHomePage-Cui5he-5.js","assets/ListingReviewStep-_3M9S8ye.js","assets/ListHomePage-C8C2FhGs.js","assets/MyListingsPage-Clif5NSI.js","assets/MyProsPage-CvkkvFX7.js","assets/ForSaleByOwnerPage-DGkRRNFY.js","assets/FsboHomesPreview-COF0nUyl.js","assets/ForRentByOwnerPage-B-b5E_MA.js","assets/HomeDetailPage-aXWOn_fQ.js","assets/ProWebpageRoutePage-B9DBsvM3.js","assets/ProWebpagePage-CM1mNAzg.js","assets/ApproveInfoSharingPage-BpqsOZRe.js","assets/PodcastPage-BnK6hyf7.js","assets/ChecklistsPage-CxlRX166.js","assets/truck-DlHF8aBl.js","assets/ChecklistDetailPage-
1DFgxgxsL.js","assets/BlogPage-Dwo_VDRG.js","assets/BlogPostPage-Ssr_PDhh.js","assets/link-C8vQePnJ.js","assets/BlogEditorPage-qxkCuw9A.js","assets/PartnersPage-D9X7vd1Z.js","assets/CalculatorsPage-DpRvRIEe.js","assets/registry-vvv8snh3.js","assets/CalculatorDetailPage-D9IUxruK.js","assets/ProfessionalsMapPage-BVS1PsT0.js","assets/CommunityMapPage-6VVnZHtq.js","assets/community-COdycEN3.js","assets/SubmitCommunityPage-C8a4dZCs.js","assets/CoverageMapPage-Y9fWuIHB.js","assets/coastguard-Br6Zux32.js","assets/MlsCoveragePage-BFtFPI4r.js","assets/FindHomePage-3pUOa2CQ.js"])))=>i.map(i=>d[i]); 2var eg=Object.defineProperty;var tg=(e,t,r)=>t in e?eg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var is=(e,t,r)=>tg(e,typeof t!="symbol"?t+"":t,r);import{_ as ne}from"./vendor-mapbox-BrTTDEGO.js";import{c as sg,b as Gr,u as Es,j as s,B as rg,P as lt,V as Yi,d as Ki,e as Zi,f as va,g as pt,R as ag,h as ng,i as _n,k as og,C as Mu,l as ig,m as lg,T as cg,O as Aa,n as Ta,o as Hn,p as Ra,D as Pa,q as Qi,r as Xi,S as Yr,s as Lu,I as dg,t as Ou,v as Du,w as ug,x as Fu,y as mg,L as $u,z as Bu,A as fg,E as hg,F as zu,G as pg,H as gg,J as Hu,K as Uu,M as Vu,N as xg,W as bg,Q as yg,U as vg,X as qu,Y as wg,Z as _g,$ as jg,a0 as kg,a1 as Ng,a2 as Wu,a3 as Sg,a4 as Cg,a5 as Eg}from"./vendor-ui-BMsACof5.js";import{a as Gu,g as Ji,R as q,r as d,b as Ag,L as oe,u as ct,e as Et,f as Un,N as Tg,O as es,B as Rg,h as Pg,i as J,j as fa}from"./vendor-react-ZBg-rrvt.js";import{c as Ig,u as et,a as os,b as Us,Q as Yu,d as Ku}from"./vendor-data-B6iiC3HR.js";import{c as Zu}from"./vendor-charts-CryiiMi0.js";import{f as jn,a as Mg}from"./vendor-date-BbiQzRnW.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const o of n)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&a(i)}).observe(document,{childList:!0,subtree:!0});function r(n){const o={};return n.integrity&&(o.integrity=n.integrity),n.referrerPolicy&&(o.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?o.credentials="include":n.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(n){if(n.ep)return;n.ep=!0;const o=r(n);fetch(n.href,o)}})();var Qu,sc=Gu;Qu=sc.createRoot,sc.hydrateRoot;var Lg=typeof Element<"u",Og=typeof Map=="function",Dg=typeof Set=="function",Fg=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function dn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,a,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(a=r;a--!==0;)if(!dn(e[a],t[a]))return!1;return!0}var o;if(Og&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(a=o.next()).done;)if(!t.has(a.value[0]))return!1;for(o=e.entries();!(a=o.next()).done;)if(!dn(a.value[1],t.get(a.value[0])))return!1;return!0}if(Dg&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(a=o.next()).done;)if(!t.has(a.value[0]))return!1;return!0}if(Fg&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(a=r;a--!==0;)if(e[a]!==t[a])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[a]))return!1;if(Lg&&e instanceof Element)return!1;for(a=r;a--!==0;)if(!((n[a]==="_owner"||n[a]==="__v"||n[a]==="__o")&&e.$$typeof)&&!dn(e[n[a]],t[n[a]]))return!1;return!0}return e!==e&&t!==t}var $g=function(t,r){try{return dn(t,r)}catch(a){if((a.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw a}};const Bg=Ji($g);var zg=function(e,t,r,a,n,o,i,l){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,a,n,o,i,l],m=0;c=new Error(t.replace(/%s/g,function(){return u[m++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},Hg=zg;const rc=Ji(Hg);var Ug=function(t,r,a,n){var o=a?a.call(n,t,r):void 0;if(o!==void 0)return!!o;if(t===r)return!0;
2if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var i=Object.keys(t),l=Object.keys(r);if(i.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),u=0;u<i.length;u++){var m=i[u];if(!c(m))return!1;var h=t[m],p=r[m];if(o=a?a.call(n,h,p,m):void 0,o===!1||o===void 0&&h!==p)return!1}return!0};const Vg=Ji(Ug);var Xu=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(Xu||{}),vo={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},ac=Object.values(Xu),el={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},qg=Object.entries(el).reduce((e,[t,r])=>(e[r]=t,e),{}),Jt="data-rh",Ar={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Tr=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const a=e[r];if(Object.prototype.hasOwnProperty.call(a,t))return a[t]}return null},Wg=e=>{let t=Tr(e,"title");const r=Tr(e,Ar.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const a=Tr(e,Ar.DEFAULT_TITLE);return t||a||void 0},Gg=e=>Tr(e,Ar.ON_CHANGE_CLIENT_STATE)||(()=>{}),wo=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,a)=>({...r,...a}),{}),Yg=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,a)=>{if(!r.length){const n=Object.keys(a);for(let o=0;o<n.length;o+=1){const l=n[o].toLowerCase();if(e.indexOf(l)!==-1&&a[l])return r.concat(a)}}return r},[]),Kg=e=>console&&typeof console.warn=="function"&&console.warn(e),ea=(e,t,r)=>{const a={};return r.filter(n=>Array.isArray(n[e])?!0:(typeof n[e]<"u"&&Kg(`Helmet: ${e} should be of type "Array". Instead found type "${typeof n[e]}"`),!1)).map(n=>n[e]).reverse().reduce((n,o)=>{const i={};o.filter(c=>{let u;const m=Object.keys(c);for(let p=0;p<m.length;p+=1){const f=m[p],y=f.toLowerCase();t.indexOf(y)!==-1&&!(u==="rel"&&c[u].toLowerCase()==="canonical")&&!(y==="rel"&&c[y].toLowerCase()==="stylesheet")&&(u=y),t.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(u=f)}if(!u||!c[u])return!1;const h=c[u].toLowerCase();return a[u]||(a[u]={}),i[u]||(i[u]={}),a[u][h]?!1:(i[u][h]=!0,!0)}).reverse().forEach(c=>n.push(c));const l=Object.keys(i);for(let c=0;c<l.length;c+=1){const u=l[c],m={...a[u],...i[u]};a[u]=m}return n},[]).reverse()},Zg=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},Qg=e=>({baseTag:Yg(["href"],e),bodyAttributes:wo("bodyAttributes",e),defer:Tr(e,Ar.DEFER),encode:Tr(e,Ar.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:wo("htmlAttributes",e),linkTags:ea("link",["rel","href"],e),metaTags:ea("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:ea("noscript",["innerHTML"],e),onChangeClientState:Gg(e),scriptTags:ea("script",["src","innerHTML"],e),styleTags:ea("style",["cssText"],e),title:Wg(e),titleAttributes:wo("titleAttributes",e),prioritizeSeoTags:Zg(e,Ar.PRIORITIZE_SEO_TAGS)}),Ju=e=>Array.isArray(e)?e.join(""):e,Xg=(e,t)=>{const r=Object.keys(e);for(let a=0;a<r.length;a+=1)if(t[r[a]]&&t[r[a]].includes(e[r[a]]))return!0;return!1},_o=(e,t)=>Array.isArray(e)?e.reduce((r,a)=>(Xg(a,t)?r.priority.push(a):r.default.push(a),r),{priority:[],default:[]}):{default:e,priority:[]},nc=(e,t)=>({...e,[t]:void 0}),Jg=["noscript","script","style"],si=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),em=e=>Object.keys(e).reduce((t,r)=>{const a=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${a}`:a},""),ex=(e,t,r,a)=>{const n=em(r),o=Ju(t);return n?`<${e} ${Jt}="true" ${n}>${si(o,a)}</${e}>`:`<${e} ${Jt}="true">${si(o,a)}</${e}>`},tx=(e,t,r=!0)=>t.reduce((a,n)=>{const o=n,i=Object.keys(o).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,m)=>{const h=typeof o[m]>"u"?m:`${m}="${si(o[m],r)}"`;return u?`${u} ${h}`:h},""),l=o.innerHTML||o.cssText||"",c=Jg.indexOf(e)===-1;return`${a}<${e} ${Jt}="true" ${i}${c?"/>":`>${l}</${e}>`}`},""),tm=(e,t={})=>Object.keys(e).reduce((r,a)=>{const n=el[a];return r[n||a]=e[a],r},t),sx=(e,t,r)=>{const a={key:t,[Jt]:!0},n=tm(r,a);return[q.createElement("title",n,t)]},un=(e,t)=>t.map((r,a)=>{const n={key:a,[Jt]:!0};return Object.keys(r).forEach(o=>{const l=el[o]||o;if(l==="innerHTML"||l==="cssText"){const c=r.innerHTML||r.cssText;n.dangerouslySetInnerHTML={__html:c}}else n[l]=r[o]}),q.createElement(e,n)}),Ht=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>sx(e,t.title,t.titleAttributes),toString:()=>ex(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>tm(t),toString:()=>em(t)};default:return{toComponent:()=>un(e,t),toString:()=>tx(e,t,r)}}},rx=({metaTags:e,linkTags:t,scriptTags:r,encode:a})=>{const n=_o(e,vo.meta),o=_o(t,vo.link),i=_o(r,vo.script);return{priorityMethods:{toComponent:()=>[...un("meta",n.priority),...un("link",o.priority),...un("script",i.priority)],toString:()=>`${Ht("meta",n.priority,a)} ${Ht("link",o.priority,a)} ${Ht("script",i.priority,a)}`},metaTags:n.default,linkTags:o.default,scriptTags:i.default}},ax=e=>{const{baseTag:t,bodyAttributes:r,encode:a=!0,htmlAttributes:n,noscriptTags:o,styleTags:i,title:l="",titleAttributes:c,prioritizeSeoTags:u}=e;let{linkTags:m,metaTags:h,scriptTags:p}=e,f={toComponent:()=>{},toString:()=>""};return u&&({priorityMethods:f,linkTags:m,metaTags:h,scriptTags:p}=rx(e)),{priority:f,base:Ht("base",t,a),bodyAttributes:Ht("bodyAttributes",r,a),htmlAttributes:Ht("htmlAttributes",n,a),link:Ht("link",m,a),meta:Ht("meta",h,a),noscript:Ht("noscript",o,a),script:Ht("script",p,a),style:Ht("style",i,a),title:Ht("title",{title:l,titleAttributes:c},a)}},ri=ax,Ka=[],sm=!!(typeof window<"u"&&window.document&&window.document.createElement),ai=class{constructor(e,t){is(this,"instances",[]);is(this,"canUseDOM",sm);is(this,"context");is(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Ka:this.instances,add:e=>{(this.canUseDOM?Ka:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Ka:this.instances).indexOf(e);(this.canUseDOM?Ka:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=ri({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},nx={},rm=q.createContext(nx),ar,ni=(ar=class extends d.Component{constructor(r){super(r);is(this,"helmetData");this.helmetData=new ai(this.props.context||{},ar.canUseDOM)}render(){return q.createElement(rm.Provider,{value:this.helmetData.value},this.props.children)}},is(ar,"canUseDOM",sm),ar),xr=(e,t)=>
2{const r=document.head||document.querySelector("head"),a=r.querySelectorAll(`${e}[${Jt}]`),n=[].slice.call(a),o=[];let i;return t&&t.length&&t.forEach(l=>{const c=document.createElement(e);for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u))if(u==="innerHTML")c.innerHTML=l.innerHTML;else if(u==="cssText")c.styleSheet?c.styleSheet.cssText=l.cssText:c.appendChild(document.createTextNode(l.cssText));else{const m=u,h=typeof l[m]>"u"?"":l[m];c.setAttribute(u,h)}c.setAttribute(Jt,"true"),n.some((u,m)=>(i=m,c.isEqualNode(u)))?n.splice(i,1):o.push(c)}),n.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)}),o.forEach(l=>r.appendChild(l)),{oldTags:n,newTags:o}},oi=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const a=r.getAttribute(Jt),n=a?a.split(","):[],o=[...n],i=Object.keys(t);for(const l of i){const c=t[l]||"";r.getAttribute(l)!==c&&r.setAttribute(l,c),n.indexOf(l)===-1&&n.push(l);const u=o.indexOf(l);u!==-1&&o.splice(u,1)}for(let l=o.length-1;l>=0;l-=1)r.removeAttribute(o[l]);n.length===o.length?r.removeAttribute(Jt):r.getAttribute(Jt)!==i.join(",")&&r.setAttribute(Jt,i.join(","))},ox=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=Ju(e)),oi("title",t)},oc=(e,t)=>{const{baseTag:r,bodyAttributes:a,htmlAttributes:n,linkTags:o,metaTags:i,noscriptTags:l,onChangeClientState:c,scriptTags:u,styleTags:m,title:h,titleAttributes:p}=e;oi("body",a),oi("html",n),ox(h,p);const f={baseTag:xr("base",r),linkTags:xr("link",o),metaTags:xr("meta",i),noscriptTags:xr("noscript",l),scriptTags:xr("script",u),styleTags:xr("style",m)},y={},x={};Object.keys(f).forEach(_=>{const{newTags:b,oldTags:E}=f[_];b.length&&(y[_]=b),E.length&&(x[_]=f[_].oldTags)}),t&&t(),c(e,y,x)},ta=null,ix=e=>{ta&&cancelAnimationFrame(ta),e.defer?ta=requestAnimationFrame(()=>{oc(e,()=>{ta=null})}):(oc(e),ta=null)},lx=ix,ic=class extends d.Component{constructor(){super(...arguments);is(this,"rendered",!1)}shouldComponentUpdate(t){return!Vg(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let a=null;const n=Qg(t.get().map(o=>{const i={...o.props};return delete i.context,i}));ni.canUseDOM?lx(n):ri&&(a=ri(n)),r(a)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},ti,am=(ti=class extends d.Component{shouldComponentUpdate(e){return!Bg(nc(this.props,"helmetData"),nc(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,a){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,a)}]}}mapObjectTypeChildren(e,t,r,a){switch(e.type){case"title":return{...t,[e.type]:a,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(a=>{r={...r,[a]:e[a]}}),r}warnOnInvalidChildren(e,t){return rc(ac.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${ac.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),rc(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return q.Children.forEach(e,a=>{if(!a||!a.props)return;const{children:n,...o}=a.props,i=Object.keys(o).reduce((c,u)=>(c[qg[u]||u]=o[u],c),{});let{type:l}=a;
2switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(a,n),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(n,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(a,r,i,n);break;default:t=this.mapObjectTypeChildren(a,t,i,n);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:a}=t;if(e&&(r=this.mapChildrenToProps(e,r)),a&&!(a instanceof ai)){const n=a;a=new ai(n.context,!0),delete r.helmetData}return a?q.createElement(ic,{...r,context:a.value}):q.createElement(rm.Consumer,null,n=>q.createElement(ic,{...r,context:n}))}},is(ti,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),ti);const je=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Fe=globalThis,nr="10.39.0";function Vn(){return qn(Fe),Fe}function qn(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||nr,t[nr]=t[nr]||{}}function Kr(e,t,r=Fe){const a=r.__SENTRY__=r.__SENTRY__||{},n=a[nr]=a[nr]||{};return n[e]||(n[e]=t())}const cx=["debug","info","warn","error","log","assert","trace"],dx="Sentry Logger ",kn={};function Zr(e){if(!("console"in Fe))return e();const t=Fe.console,r={},a=Object.keys(kn);a.forEach(n=>{const o=kn[n];r[n]=t[n],t[n]=o});try{return e()}finally{a.forEach(n=>{t[n]=r[n]})}}function ux(){sl().enabled=!0}function mx(){sl().enabled=!1}function nm(){return sl().enabled}function fx(...e){tl("log",...e)}function hx(...e){tl("warn",...e)}function px(...e){tl("error",...e)}function tl(e,...t){je&&nm()&&Zr(()=>{Fe.console[e](`${dx}[${e}]:`,...t)})}function sl(){return je?Kr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const pe={enable:ux,disable:mx,isEnabled:nm,log:fx,warn:hx,error:px},om=50,ir="?",lc=/\(error: (.*)\)/,cc=/captureMessage|captureException/;function im(...e){const t=e.sort((r,a)=>r[0]-a[0]).map(r=>r[1]);return(r,a=0,n=0)=>{const o=[],i=r.split(` 3`);for(let l=a;l<i.length;l++){let c=i[l];c.length>1024&&(c=c.slice(0,1024));const u=lc.test(c)?c.replace(lc,"$1"):c;if(!u.match(/\S*Error: /)){for(const m of t){const h=m(u);if(h){o.push(h);break}}if(o.length>=om+n)break}}return xx(o.slice(n))}}function gx(e){return Array.isArray(e)?im(...e):e}function xx(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Za(t).function||"")&&t.pop(),t.reverse(),cc.test(Za(t).function||"")&&(t.pop(),cc.test(Za(t).function||"")&&t.pop()),t.slice(0,om).map(r=>({...r,filename:r.filename||Za(t).filename,function:r.function||ir}))}function Za(e){return e[e.length-1]||{}}const jo="<anonymous>";function Vs(e){try{return!e||typeof e!="function"?jo:e.name||jo}catch{return jo}}function dc(e){const t=e.exception;if(t){const r=[];try{return t.values.forEach(a=>{a.stacktrace.frames&&r.push(...a.stacktrace.frames)}),r}catch{return}}}function lm(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const mn={},uc={};function ur(e,t){mn[e]=mn[e]||[],mn[e].push(t)}function mr(e,t){if(!uc[e]){uc[e]=!0;try{t()}catch(r){je&&pe.error(`Error while instrumenting ${e}`,r)}}}function ts(e,t){const r=e&&mn[e];if(r)for(const a of r)try{a(t)}catch(n){je&&pe.error(`Error while triggering instrumentation handler. 4Type: ${e} 5Name: ${Vs(a)} 6Error:`,n)}}let ko=null;function bx(e){const t="error";ur(t,e),mr(t,yx)}function yx(){ko=Fe.onerror,Fe.onerror=function(e,t,r,a,n){return ts("error",{column:a,error:n,line:r,msg:e,url:t}),ko?ko.apply(this,arguments):!1},Fe.onerror.__SENTRY_INSTRUMENTED__=!0}let No=null;function vx(e){const t="unhandledrejection";ur(t,e),mr(t,wx)}function wx(){No=Fe.onunhandledrejection,Fe.onunhandledrejection=function(e){return ts("unhandledrejection",e),No?No.apply(this,arguments):!0},Fe.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const cm=Object.prototype.toString;function Wn(e){switch(cm.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return qs(e,Error)}}function Qr(e,t){return cm.call(e)===`[object ${t}]`}function dm(e){return Qr(e,"ErrorEvent")}function mc(e){return Qr(e,"DOMError")}function _x(e){return Qr(e,"DOMException")}function ws(e){return Qr(e,"String")}function rl(e){return typeof e=="object"&&e!==null&&"__sentry_template_str
6ing__"in e&&"__sentry_template_values__"in e}function Gn(e){return e===null||rl(e)||typeof e!="object"&&typeof e!="function"}function wa(e){return Qr(e,"Object")}function Yn(e){return typeof Event<"u"&&qs(e,Event)}function jx(e){return typeof Element<"u"&&qs(e,Element)}function kx(e){return Qr(e,"RegExp")}function Ia(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function Nx(e){return wa(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function qs(e,t){try{return e instanceof t}catch{return!1}}function um(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function mm(e){return typeof Request<"u"&&qs(e,Request)}const al=Fe,Sx=80;function fm(e,t={}){if(!e)return"<unknown>";try{let r=e;const a=5,n=[];let o=0,i=0;const l=" > ",c=l.length;let u;const m=Array.isArray(t)?t:t.keyAttrs,h=!Array.isArray(t)&&t.maxStringLength||Sx;for(;r&&o++<a&&(u=Cx(r,m),!(u==="html"||o>1&&i+n.length*c+u.length>=h));)n.push(u),i+=u.length,r=r.parentNode;return n.reverse().join(l)}catch{return"<unknown>"}}function Cx(e,t){const r=e,a=[];if(!(r!=null&&r.tagName))return"";if(al.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}a.push(r.tagName.toLowerCase());const n=t!=null&&t.length?t.filter(i=>r.getAttribute(i)).map(i=>[i,r.getAttribute(i)]):null;if(n!=null&&n.length)n.forEach(i=>{a.push(`[${i[0]}="${i[1]}"]`)});else{r.id&&a.push(`#${r.id}`);const i=r.className;if(i&&ws(i)){const l=i.split(/\s+/);for(const c of l)a.push(`.${c}`)}}const o=["aria-label","type","name","title","alt"];for(const i of o){const l=r.getAttribute(i);l&&a.push(`[${i}="${l}"]`)}return a.join("")}function nl(){try{return al.document.location.href}catch{return""}}function Ex(e){if(!al.HTMLElement)return null;let t=e;const r=5;for(let a=0;a<r;a++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Pt(e,t,r){if(!(t in e))return;const a=e[t];if(typeof a!="function")return;const n=r(a);typeof n=="function"&&hm(n,a);try{e[t]=n}catch{je&&pe.log(`Failed to replace method "${t}" in object`,e)}}function Ws(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{je&&pe.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function hm(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,Ws(e,"__sentry_original__",t)}catch{}}function ol(e){return e.__sentry_original__}function pm(e){if(Wn(e))return{message:e.message,name:e.name,stack:e.stack,...hc(e)};if(Yn(e)){const t={type:e.type,target:fc(e.target),currentTarget:fc(e.currentTarget),...hc(e)};return typeof CustomEvent<"u"&&qs(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function fc(e){try{return jx(e)?fm(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function hc(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function Ax(e){const t=Object.keys(pm(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let br;function Kn(e){if(br!==void 0)return br?br(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=Fe;return t in r&&typeof r[t]=="function"?(br=r[t],br(e)):(br=null,e())}function Nn(){return Kn(()=>Math.random())}function Zn(){return Kn(()=>Date.now())}function ii(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function pc(e,t){if(!Array.isArray(e))return"";const r=[];for(let a=0;a<e.length;a++){const n=e[a];try{um(n)?r.push(lm(n)):r.push(String(n))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function fn(e,t,r=!1){return ws(e)?kx(t)?t.test(e):ws(t)?r?e===t:e.includes(t):!1:!1}function Qn(e,t=[],r=!1){return t.some(a=>fn(e,a,r))}function Tx(){const e=Fe;return e.crypto||e.msCrypto}let So;function Rx(){return Nn()*16}function Vt(e=Tx()){try{if(e!=null&&e.randomUUID)return Kn(()=>e.randomUUID()).replace(/-/g,"")}catch{}return So||(So="10000000100040008000"+1e11),So.replace(/[018]/g,t=>(t^(Rx()&15)>>t/4).toString(16))}function gm(e){var t,r;return(r=(t=e.exception)==null?void 0:t.values)==null?void 0:r[0]}function tr(e){const{message:t,event_id:r}=e;if(t)return t;const a=gm(e);return a?a.type&&a.value?`${a.type}: ${a.value}`:a.type||a.value||r||"<unknown>":r||"<unknown>"}function li(e,t,r){const a=e.exception=e.exception||{},n=a.values=a.values||[],o=n[0]=n[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function Mr(e,t){const r=gm(e);if(!r)return;const a={type:"generic",handled:!0},n=r.mechanism;if(r.mechanism={...a,...n,...t},t&&"data"in t){const o={...n==null?void 0:n.data,...t.data};r.mechanism.data=o}}function gc(e){if(Px(e))return!0;try{Ws(e,"__sentry_captured__",!0)}catch{}return!1}function Px(e){try{return e.__sentry_captured__}catch{}}const xm=1e3;function Ma(){return Zn()/xm}function Ix(){const{performance:e}=Fe;if(!(e!=null&&e.now)||!e.timeOrigin)return Ma;const t=e.timeOrigin;return()=>(t+Kn(()=>e.now()))/xm}let xc;function _s(){return(xc??(xc=Ix()))()}function Mx(e){const t=_s(),r={sid:Vt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Ox(r)};return e&&Lr(r,e),r}function Lr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||_s(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Vt()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),t
vendor: 6,421 bytes, line 6
6ypeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Lx(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),Lr(e,r)}function Ox(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function La(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&Object.keys(t).length===0)return e;const a={...e};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=La(a[n],t[n],r-1));return a}function bc(){return Vt()}function bm(){return Vt().substring(16)}const ci="_sentrySpan";function yc(e,t){t?Ws(e,ci,t):delete e[ci]}function vc(e){return e[ci]}const Dx=100;class fs{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:bc(),sampleRand:Nn()}}clone(){const t=new fs;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,yc(t,vc(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Lr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this.setTags({[t]:r})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,r){return this.setAttributes({[t]:r})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t,a=r instanceof fs?r.getScopeData():wa(r)?t:void 0,{tags:n,attributes:o,extra:i,user:l,contexts:c,level:u,fingerprint:m=[],propagationContext:h,conversationId:p}=a||{};return this._tags={...this._tags,...n},this._attributes={...this._attributes,...o},this._extra={...this._extra,...i},this._contexts={...this._contexts,...c},l&&Object.keys(l).length&&(this._user=l),u&&(this._level=u),m.length&&(this._fingerprint=m),h&&(this._propagationContext=h),p&&(this._conversationId=p),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,yc(this,void 0),this._attachments=[],this.setPropagationContext({traceId:bc(),sampleRand:Nn()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){var o;const a=typeof r=="number"?r:Dx;if(a<=0)return this;const n={timestamp:Ma(),...t,message:t.message?ii(t.message,2048):t.message};return this._breadcrumbs.push(n),this._breadcrumbs.length>a&&(this._breadcrumbs=this._breadcrumbs.slice(-a),(o=this._client)==null||o.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:vc(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=La(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){const a=(r==null?void 0:r.event_id)||Vt();if(!this._client)return je&&pe.warn("No client configured on scope - will not capture exception!"),a;const n=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:n,...r,event_id:a},this),a}captureMessage(t,r,a){const n=(a==null?void 0:a.event_id)||Vt();if(!this._client)return je&&pe.warn("No client configured on scope - will not capture message!"),n;const o=(a==null?void 0:a.syntheticException)??new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:o,...a,event_id:n},this),n}
6captureEvent(t,r){const a=t.event_id||(r==null?void 0:r.event_id)||Vt();return this._client?(this._client.captureEvent(t,{...r,event_id:a},this),a):(je&&pe.warn("No client configured on scope - will not capture event!"),a)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function Fx(){return Kr("defaultCurrentScope",()=>new fs)}function $x(){return Kr("defaultIsolationScope",()=>new fs)}class Bx{constructor(t,r){let a;t?a=t:a=new fs;let n;r?n=r:n=new fs,this._stack=[{scope:a}],this._isolationScope=n}withScope(t){const r=this._pushScope();let a;try{a=t(r)}catch(n){throw this._popScope(),n}return Ia(a)?a.then(n=>(this._popScope(),n),n=>{throw this._popScope(),n}):(this._popScope(),a)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Or(){const e=Vn(),t=qn(e);return t.stack=t.stack||new Bx(Fx(),$x())}function zx(e){return Or().withScope(e)}function Hx(e,t){const r=Or();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function wc(e){return Or().withScope(()=>e(Or().getIsolationScope()))}function Ux(){return{withIsolationScope:wc,withScope:zx,withSetScope:Hx,withSetIsolationScope:(e,t)=>wc(t),getCurrentScope:()=>Or().getScope(),getIsolationScope:()=>Or().getIsolationScope()}}function il(e){const t=qn(e);return t.acs?t.acs:Ux()}function As(){const e=Vn();return il(e).getCurrentScope()}function fr(){const e=Vn();return il(e).getIsolationScope()}function Vx(){return Kr("globalScope",()=>new fs)}function qx(...e){const t=Vn(),r=il(t);if(e.length===2){const[a,n]=e;return a?r.withSetScope(a,n):r.withScope(n)}return r.withScope(e[0])}function xt(){return As().getClient()}function Wx(e){const t=e.getPropagationContext(),{traceId:r,parentSpanId:a,propagationSpanId:n}=t,o={trace_id:r,span_id:n||bm()};return a&&(o.parent_span_id=a),o}const Gx="sentry.source",Yx="sentry.sample_rate",Kx="sentry.previous_trace_sample_rate",Zx="sentry.op",Qx="sentry.origin",ym="sentry.profile_id",vm="sentry.exclusive_time",Xx="gen_ai.conversation.id",Jx=0,eb=1,tb="_sentryScope",sb="_sentryIsolationScope";function rb(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function wm(e){const t=e;return{scope:t[tb],isolationScope:rb(t[sb])}}const ab="sentry-",nb=/^sentry-/;function ob(e){const t=ib(e);if(!t)return;const r=Object.entries(t).reduce((a,[n,o])=>{if(n.match(nb)){const i=n.slice(ab.length);a[i]=o}return a},{});if(Object.keys(r).length>0)return r}function ib(e){if(!(!e||!ws(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{const a=_c(r);return Object.entries(a).forEach(([n,o])=>{t[n]=o}),t},{}):_c(e)}function _c(e){return e.split(",").map(t=>{const r=t.indexOf("=");if(r===-1)return[];const a=t.slice(0,r),n=t.slice(r+1);return[a,n].map(o=>{try{return decodeURIComponent(o.trim())}catch{return}})}).reduce((t,[r,a])=>(r&&a&&(t[r]=a),t),{})}const lb=/^o(\d+)\./,cb=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function db(e){return e==="http"||e==="https"}function Oa(e,t=!1){const{host:r,path:a,pass:n,port:o,projectId:i,protocol:l,publicKey:c}=e;return`${l}://${c}${t&&n?`:${n}`:""}@${r}${o?`:${o}`:""}/${a&&`${a}/`}${i}`}function ub(e){const t=cb.exec(e);if(!t){Zr(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,a,n="",o="",i="",l=""]=t.slice(1);let c="",u=l;const m=u.split("/");if(m.length>1&&(c=m.slice(0,-1).join("/"),u=m.pop()),u){const h=u.match(/^\d+/);h&&(u=h[0])}return _m({host:o,pass:n,path:c,projectId:u,port:i,protocol:r,publicKey:a})}function _m(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function mb(e){if(!je)return!0;const{port:t,projectId:r,protocol:a}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(pe.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:r.match(/^\d+$/)?db(a)?t&&isNaN(parseInt(t,10))?(pe.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(pe.error(`Invalid Sentry Dsn: Invalid protocol ${a}`),!1):(pe.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function fb(e){const t=e.match(lb);return t==null?void 0:t[1]}function hb(e){const t=e.getOptions(),{host:r}=e.getDsn()||{};let a;return t.orgId?a=String(t.orgId):r&&(a=fb(r)),a}function pb(e){const t=typeof e=="string"?ub(e):_m(e);
6if(!(!t||!mb(t)))return t}function gb(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const jm=1;let jc=!1;function xb(e){const{spanId:t,traceId:r,isRemote:a}=e.spanContext(),n=a?t:ll(e).parent_span_id,o=wm(e).scope,i=a?(o==null?void 0:o.getPropagationContext().propagationSpanId)||bm():t;return{parent_span_id:n,span_id:i,trace_id:r}}function bb(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:r,traceFlags:a,...n},attributes:o})=>({span_id:t,trace_id:r,sampled:a===jm,attributes:o,...n}))}function kc(e){return typeof e=="number"?Nc(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Nc(e.getTime()):_s()}function Nc(e){return e>9999999999?e/1e3:e}function ll(e){var a;if(vb(e))return e.getSpanJSON();const{spanId:t,traceId:r}=e.spanContext();if(yb(e)){const{attributes:n,startTime:o,name:i,endTime:l,status:c,links:u}=e,m="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?(a=e.parentSpanContext)==null?void 0:a.spanId:void 0;return{span_id:t,trace_id:r,data:n,description:i,parent_span_id:m,start_timestamp:kc(o),timestamp:kc(l)||void 0,status:_b(c),op:n[Zx],origin:n[Qx],links:bb(u)}}return{span_id:t,trace_id:r,start_timestamp:0,data:{}}}function yb(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function vb(e){return typeof e.getSpanJSON=="function"}function wb(e){const{traceFlags:t}=e.spanContext();return t===jm}function _b(e){if(!(!e||e.code===Jx))return e.code===eb?"ok":e.message||"internal_error"}const jb="_sentryRootSpan";function km(e){return e[jb]||e}function Sc(){jc||(Zr(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),jc=!0)}function kb(e){var r;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=(r=xt())==null?void 0:r.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Cc(e){pe.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Ec(e,t){if(!(t!=null&&t.length)||!e.description)return!1;for(const r of t){if(Sb(r)){if(fn(e.description,r))return je&&Cc(e),!0;continue}if(!r.name&&!r.op)continue;const a=r.name?fn(e.description,r.name):!0,n=r.op?e.op&&fn(e.op,r.op):!0;if(a&&n)return je&&Cc(e),!0}return!1}function Nb(e,t){const r=t.parent_span_id,a=t.span_id;if(r)for(const n of e)n.parent_span_id===a&&(n.parent_span_id=r)}function Sb(e){return typeof e=="string"||e instanceof RegExp}const cl="production",Cb="_frozenDsc";function Nm(e,t){const r=t.getOptions(),{publicKey:a}=t.getDsn()||{},n={environment:r.environment||cl,release:r.release,public_key:a,trace_id:e,org_id:hb(t)};return t.emit("createDsc",n),n}function Eb(e,t){const r=t.getPropagationContext();return r.dsc||Nm(r.traceId,e)}function Ab(e){var y;const t=xt();if(!t)return{};const r=km(e),a=ll(r),n=a.data,o=r.spanContext().traceState,i=(o==null?void 0:o.get("sentry.sample_rate"))??n[Yx]??n[Kx];function l(x){return(typeof i=="number"||typeof i=="string")&&(x.sample_rate=`${i}`),x}const c=r[Cb];if(c)return l(c);const u=o==null?void 0:o.get("sentry.dsc"),m=u&&ob(u);if(m)return l(m);const h=Nm(e.spanContext().traceId,t),p=n[Gx],f=a.description;return p!=="url"&&f&&(h.transaction=f),kb()&&(h.sampled=String(wb(r)),h.sample_rand=(o==null?void 0:o.get("sentry.sample_rand"))??((y=wm(r).scope)==null?void 0:y.getPropagationContext().sampleRand.toString())),l(h),t.emit("createDsc",h,r),h}function vs(e,t=100,r=1/0){try{return di("",e,t,r)}catch(a){return{ERROR:`**non-serializable** (${a})`}}}function Sm(e,t=3,r=100*1024){const a=vs(e,t);return Ib(a)>r?Sm(e,t-1,r):a}function di(e,t,r=1/0,a=1/0,n=Mb()){const[o,i]=n;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const l=Tb(e,t);if(!l.startsWith("[object "))return l;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:r;if(c===0)return l.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const f=u.toJSON();return di("",f,c-1,a,n)}catch{}const m=Array.isArray(t)?[]:{};let h=0;const p=pm(t);for(const f in p){if(!Object.prototype.hasOwnProperty.call(p,f))continue;if(h>=a){m[f]="[MaxProperties ~]";break}const y=p[f];m[f]=di(f,y,c-1,a,n),h++}return i(t),m}function Tb(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(um(t))return lm(t);if(Nx(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Vs(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=Rb(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function Rb(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function Pb(e){return~-encodeURI(e).split(/%..|./).length}function Ib(e){return Pb(JSON.stringify(e))}function Mb(){const e=new WeakSet;function t(a){return e.has(a)?!0:(e.add(a),!1)}function r(a){e.delete(a)}return[t,r]}function Xr(e,t=[]){return[e,t]}
6function Lb(e,t){const[r,a]=e;return[r,[...a,t]]}function ui(e,t){const r=e[1];for(const a of r){const n=a[0].type;if(t(a,n))return!0}return!1}function Ob(e,t){return ui(e,(r,a)=>t.includes(a))}function mi(e){const t=qn(Fe);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Db(e){const[t,r]=e;let a=JSON.stringify(t);function n(o){typeof a=="string"?a=typeof o=="string"?a+o:[mi(a),o]:a.push(typeof o=="string"?mi(o):o)}for(const o of r){const[i,l]=o;if(n(` 7${JSON.stringify(i)} 8`),typeof l=="string"||l instanceof Uint8Array)n(l);else{let c;try{c=JSON.stringify(l)}catch{c=JSON.stringify(vs(l))}n(c)}}return typeof a=="string"?a:Fb(a)}function Fb(e){const t=e.reduce((n,o)=>n+o.length,0),r=new Uint8Array(t);let a=0;for(const n of e)r.set(n,a),a+=n.length;return r}function $b(e){const t=typeof e.data=="string"?mi(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Bb={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function Ac(e){return Bb[e]}function Cm(e){if(!(e!=null&&e.sdk))return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function zb(e,t,r,a){var o;const n=(o=e.sdkProcessingMetadata)==null?void 0:o.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!r&&a&&{dsn:Oa(a)},...n&&{trace:n}}}function Hb(e,t){var a,n,o,i;if(!t)return e;const r=e.sdk||{};return e.sdk={...r,name:r.name||t.name,version:r.version||t.version,integrations:[...((a=e.sdk)==null?void 0:a.integrations)||[],...t.integrations||[]],packages:[...((n=e.sdk)==null?void 0:n.packages)||[],...t.packages||[]],settings:(o=e.sdk)!=null&&o.settings||t.settings?{...(i=e.sdk)==null?void 0:i.settings,...t.settings}:void 0},e}function Ub(e,t,r,a){const n=Cm(r),o={sent_at:new Date().toISOString(),...n&&{sdk:n},...!!a&&t&&{dsn:Oa(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Xr(o,[i])}function Vb(e,t,r,a){const n=Cm(r),o=e.type&&e.type!=="replay_event"?e.type:"event";Hb(e,r==null?void 0:r.sdk);const i=zb(e,n,a,t);return delete e.sdkProcessingMetadata,Xr(i,[[{type:o},e]])}const Co=0,Tc=1,Rc=2;function Da(e){return new _a(t=>{t(e)})}function dl(e){return new _a((t,r)=>{r(e)})}class _a{constructor(t){this._state=Co,this._handlers=[],this._runExecutor(t)}then(t,r){return new _a((a,n)=>{this._handlers.push([!1,o=>{if(!t)a(o);else try{a(t(o))}catch(i){n(i)}},o=>{if(!r)n(o);else try{a(r(o))}catch(i){n(i)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new _a((r,a)=>{let n,o;return this.then(i=>{o=!1,n=i,t&&t()},i=>{o=!0,n=i,t&&t()}).then(()=>{if(o){a(n);return}r(n)})})}_executeHandlers(){if(this._state===Co)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===Tc&&r[1](this._value),this._state===Rc&&r[2](this._value),r[0]=!0)})}_runExecutor(t){const r=(o,i)=>{if(this._state===Co){if(Ia(i)){i.then(a,n);return}this._state=o,this._value=i,this._executeHandlers()}},a=o=>{r(Tc,o)},n=o=>{r(Rc,o)};try{t(a,n)}catch(o){n(o)}}}function qb(e,t,r,a=0){try{const n=fi(t,r,e,a);return Ia(n)?n:Da(n)}catch(n){return dl(n)}}function fi(e,t,r,a){const n=r[a];if(!e||!n)return e;const o=n({...e},t);return je&&o===null&&pe.log(`Event processor "${n.id||"?"}" dropped event`),Ia(o)?o.then(i=>fi(i,t,r,a+1)):fi(o,t,r,a+1)}let xs,Pc,Ic,Ms;function Wb(e){const t=Fe._sentryDebugIds,r=Fe._debugIds;if(!t&&!r)return{};const a=t?Object.keys(t):[],n=r?Object.keys(r):[];if(Ms&&a.length===Pc&&n.length===Ic)return Ms;Pc=a.length,Ic=n.length,Ms={},xs||(xs={});const o=(i,l)=>{for(const c of i){const u=l[c],m=xs==null?void 0:xs[c];if(m&&Ms&&u)Ms[m[0]]=u,xs&&(xs[c]=[m[0],u]);else if(u){const h=e(c);for(let p=h.length-1;p>=0;p--){const f=h[p],y=f==null?void 0:f.filename;if(y&&Ms&&xs){Ms[y]=u,xs[c]=[y,u];break}}}}};return t&&o(a,t),r&&o(n,r),Ms}function Gb(e,t){const{fingerprint:r,span:a,breadcrumbs:n,sdkProcessingMetadata:o}=t;Kb(e,t),a&&Xb(e,a),Jb(e,r),Zb(e,n),Qb(e,o)}function Mc(e,t){const{extra:r,tags:a,attributes:n,user:o,contexts:i,level:l,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:m,eventProcessors:h,attachments:p,propagationContext:f,transactionName:y,span:x}=t;sa(e,"extra",r),sa(e,"tags",a),sa(e,"attributes",n),sa(e,"user",o),sa(e,"contexts",i),e.sdkProcessingMetadata=La(e.sdkProcessingMetadata,c,2),l&&(e.level=l),y&&(e.transactionName=y),x&&(e.span=x),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),m.length&&(e.fingerprint=[...e.fingerprint,...m]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]
8),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...f}}function sa(e,t,r){e[t]=La(e[t],r,1)}function Yb(e,t){const r=Vx().getScopeData();return e&&Mc(r,e.getScopeData()),t&&Mc(r,t.getScopeData()),r}function Kb(e,t){const{extra:r,tags:a,user:n,contexts:o,level:i,transactionName:l}=t;Object.keys(r).length&&(e.extra={...r,...e.extra}),Object.keys(a).length&&(e.tags={...a,...e.tags}),Object.keys(n).length&&(e.user={...n,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),i&&(e.level=i),l&&e.type!=="transaction"&&(e.transaction=l)}function Zb(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function Qb(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Xb(e,t){e.contexts={trace:xb(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Ab(t),...e.sdkProcessingMetadata};const r=km(t),a=ll(r).description;a&&!e.transaction&&e.type==="transaction"&&(e.transaction=a)}function Jb(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function ey(e,t,r,a,n,o){const{normalizeDepth:i=3,normalizeMaxBreadth:l=1e3}=e,c={...t,event_id:t.event_id||r.event_id||Vt(),timestamp:t.timestamp||Ma()},u=r.integrations||e.integrations.map(b=>b.name);ty(c,e),ay(c,u),n&&n.emit("applyFrameMetadata",t),t.type===void 0&&sy(c,e.stackParser);const m=oy(a,r.captureContext);r.mechanism&&Mr(c,r.mechanism);const h=n?n.getEventProcessors():[],p=Yb(o,m),f=[...r.attachments||[],...p.attachments];f.length&&(r.attachments=f),Gb(c,p);const y=[...h,...p.eventProcessors];return(r.data&&r.data.__sentry__===!0?Da(c):qb(y,c,r)).then(b=>(b&&ry(b),typeof i=="number"&&i>0?ny(b,i,l):b))}function ty(e,t){var l,c;const{environment:r,release:a,dist:n,maxValueLength:o}=t;e.environment=e.environment||r||cl,!e.release&&a&&(e.release=a),!e.dist&&n&&(e.dist=n);const i=e.request;i!=null&&i.url&&o&&(i.url=ii(i.url,o)),o&&((c=(l=e.exception)==null?void 0:l.values)==null||c.forEach(u=>{u.value&&(u.value=ii(u.value,o))}))}function sy(e,t){var a,n;const r=Wb(t);(n=(a=e.exception)==null?void 0:a.values)==null||n.forEach(o=>{var i,l;(l=(i=o.stacktrace)==null?void 0:i.frames)==null||l.forEach(c=>{c.filename&&(c.debug_id=r[c.filename])})})}function ry(e){var a,n;const t={};if((n=(a=e.exception)==null?void 0:a.values)==null||n.forEach(o=>{var i,l;(l=(i=o.stacktrace)==null?void 0:i.frames)==null||l.forEach(c=>{c.debug_id&&(c.abs_path?t[c.abs_path]=c.debug_id:c.filename&&(t[c.filename]=c.debug_id),delete c.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.entries(t).forEach(([o,i])=>{r.push({type:"sourcemap",code_file:o,debug_id:i})})}function ay(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function ny(e,t,r){var n,o;if(!e)return null;const a={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:vs(i.data,t,r)}}))},...e.user&&{user:vs(e.user,t,r)},...e.contexts&&{contexts:vs(e.contexts,t,r)},...e.extra&&{extra:vs(e.extra,t,r)}};return(n=e.contexts)!=null&&n.trace&&a.contexts&&(a.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(a.contexts.trace.data=vs(e.contexts.trace.data,t,r))),e.spans&&(a.spans=e.spans.map(i=>({...i,...i.data&&{data:vs(i.data,t,r)}}))),(o=e.contexts)!=null&&o.flags&&a.contexts&&(a.contexts.flags=vs(e.contexts.flags,3,r)),a}function oy(e,t){if(!t)return e;const r=e?e.clone():new fs;return r.update(t),r}function iy(e){if(e)return ly(e)?{captureContext:e}:dy(e)?{captureContext:e}:e}function ly(e){return e instanceof fs||typeof e=="function"}const cy=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function dy(e){return Object.keys(e).some(t=>cy.includes(t))}function Em(e,t){return As().captureException(e,iy(t))}function Am(e,t){return As().captureEvent(e,t)}function uy(e,t){fr().setContext(e,t)}function Lc(e){const t=fr(),r=As(),{userAgent:a}=Fe.navigator||{},n=Mx({user:r.getUser()||t.getUser(),...a&&{userAgent:a},...e}),o=t.getSession();return(o==null?void 0:o.status)==="ok"&&Lr(o,{status:"exited"}),Tm(),t.setSession(n),n}function Tm(){const e=fr(),r=As().getSession()||e.getSession();r&&Lx(r),Rm(),e.setSession()}function Rm(){const e=fr(),t=xt(),r=e.getSession();r&&t&&t.captureSession(r)}function Oc(e=!1){if(e){Tm();return}Rm()}const my="7";function fy(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function hy(e){return`${fy(e)}${e.projectId}/envelope/`}function py(e,t){const r={sentry_version:my};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function gy(e,t,r){return t||`${hy(e)}?${py(e,r)}`}const Dc=[];function xy(e){const t={};return e.forEach(r=>{const{name:a}=r,n=t[a];n&&!n.isDefaultInstance&&r.isDefaultInstance||(t[a]=r)}
8),Object.values(t)}function by(e){const t=e.defaultIntegrations||[],r=e.integrations;t.forEach(n=>{n.isDefaultInstance=!0});let a;if(Array.isArray(r))a=[...t,...r];else if(typeof r=="function"){const n=r(t);a=Array.isArray(n)?n:[n]}else a=t;return xy(a)}function yy(e,t){const r={};return t.forEach(a=>{a&&Pm(e,a,r)}),r}function Fc(e,t){for(const r of t)r!=null&&r.afterAllSetup&&r.afterAllSetup(e)}function Pm(e,t,r){if(r[t.name]){je&&pe.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,!Dc.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Dc.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const a=t.preprocessEvent.bind(t);e.on("preprocessEvent",(n,o)=>a(n,o,e))}if(typeof t.processEvent=="function"){const a=t.processEvent.bind(t),n=Object.assign((o,i)=>a(o,i,e),{id:t.name});e.addEventProcessor(n)}je&&pe.log(`Integration installed: ${t.name}`)}function vy(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function wy(e,t,r,a){const n={};return t!=null&&t.sdk&&(n.sdk={name:t.sdk.name,version:t.sdk.version}),r&&a&&(n.dsn=Oa(a)),Xr(n,[vy(e)])}function Im(e,t){const r=t??_y(e)??[];if(r.length===0)return;const a=e.getOptions(),n=wy(r,a._metadata,a.tunnel,e.getDsn());Mm().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(n)}function _y(e){return Mm().get(e)}function Mm(){return Kr("clientToLogBufferMap",()=>new WeakMap)}function jy(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function ky(e,t,r,a){const n={};return t!=null&&t.sdk&&(n.sdk={name:t.sdk.name,version:t.sdk.version}),r&&a&&(n.dsn=Oa(a)),Xr(n,[jy(e)])}function Lm(e,t){const r=t??Ny(e)??[];if(r.length===0)return;const a=e.getOptions(),n=ky(r,a._metadata,a.tunnel,e.getDsn());Om().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(n)}function Ny(e){return Om().get(e)}function Om(){return Kr("clientToMetricBufferMap",()=>new WeakMap)}function Dm(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const ul=Symbol.for("SentryBufferFullError");function ml(e=100){const t=new Set;function r(){return t.size<e}function a(i){t.delete(i)}function n(i){if(!r())return dl(ul);const l=i();return t.add(l),l.then(()=>a(l),()=>a(l)),l}function o(i){if(!t.size)return Da(!0);const l=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return l;const c=[l,new Promise(u=>Dm(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:n,drain:o}}const Sy=60*1e3;function Cy(e,t=Zn()){const r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;const a=Date.parse(`${e}`);return isNaN(a)?Sy:a-t}function Ey(e,t){return e[t]||e.all||0}function Ay(e,t,r=Zn()){return Ey(e,t)>r}function Ty(e,{statusCode:t,headers:r},a=Zn()){const n={...e},o=r==null?void 0:r["x-sentry-rate-limits"],i=r==null?void 0:r["retry-after"];if(o)for(const l of o.trim().split(",")){const[c,u,,,m]=l.split(":",5),h=parseInt(c,10),p=(isNaN(h)?60:h)*1e3;if(!u)n.all=a+p;else for(const f of u.split(";"))f==="metric_bucket"?(!m||m.split(";").includes("custom"))&&(n[f]=a+p):n[f]=a+p}else i?n.all=a+Cy(i,a):t===429&&(n.all=a+60*1e3);return n}const Fm=64;function Ry(e,t,r=ml(e.bufferSize||Fm)){let a={};const n=i=>r.drain(i);function o(i){const l=[];if(ui(i,(h,p)=>{const f=Ac(p);Ay(a,f)?e.recordDroppedEvent("ratelimit_backoff",f):l.push(h)}),l.length===0)return Promise.resolve({});const c=Xr(i[0],l),u=h=>{if(Ob(c,["client_report"])){je&&pe.warn(`Dropping client report. Will not send outcomes (reason: ${h}).`);return}ui(c,(p,f)=>{e.recordDroppedEvent(h,Ac(f))})},m=()=>t({body:Db(c)}).then(h=>h.statusCode===413?(je&&pe.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),h):(je&&h.statusCode!==void 0&&(h.statusCode<200||h.statusCode>=300)&&pe.warn(`Sentry responded with status code ${h.statusCode} to sent event.`),a=Ty(a,h),h),h=>{throw u("network_error"),je&&pe.error("Encountered error running transport request:",h),h});
8return r.add(m).then(h=>h,h=>{if(h===ul)return je&&pe.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw h})}return{send:o,flush:n}}function Py(e,t,r){const a=[{type:"client_report"},{timestamp:Ma(),discarded_events:e}];return Xr(t?{dsn:t}:{},[a])}function $m(e){const t=[];e.message&&t.push(e.message);try{const r=e.exception.values[e.exception.values.length-1];r!=null&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`))}catch{}return t}function Iy(e){var c;const{trace_id:t,parent_span_id:r,span_id:a,status:n,origin:o,data:i,op:l}=((c=e.contexts)==null?void 0:c.trace)??{};return{data:i??{},description:e.transaction,op:l,parent_span_id:r,span_id:a??"",start_timestamp:e.start_timestamp??0,status:n,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:i==null?void 0:i[ym],exclusive_time:i==null?void 0:i[vm],measurements:e.measurements,is_segment:!0}}function My(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[ym]:e.profile_id},...e.exclusive_time&&{[vm]:e.exclusive_time}}}},measurements:e.measurements}}const $c="Not capturing exception because it's already been captured.",Bc="Discarded session because of missing or non-string release",Bm=Symbol.for("SentryInternalError"),zm=Symbol.for("SentryDoNotSendEventError"),Ly=5e3;function hn(e){return{message:e,[Bm]:!0}}function Eo(e){return{message:e,[zm]:!0}}function zc(e){return!!e&&typeof e=="object"&&Bm in e}function Hc(e){return!!e&&typeof e=="object"&&zm in e}function Uc(e,t,r,a,n){let o=0,i,l=!1;e.on(r,()=>{o=0,clearTimeout(i),l=!1}),e.on(t,c=>{o+=a(c),o>=8e5?n(e):l||(l=!0,i=Dm(setTimeout(()=>{n(e)},Ly)))}),e.on("flush",()=>{n(e)})}class Oy{constructor(t){var a,n,o;if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=ml(((a=t.transportOptions)==null?void 0:a.bufferSize)??Fm),t.dsn?this._dsn=pb(t.dsn):je&&pe.warn("No DSN provided, client will not send events."),this._dsn){const i=gy(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:i})}this._options.enableLogs=this._options.enableLogs??((n=this._options._experiments)==null?void 0:n.enableLogs),this._options.enableLogs&&Uc(this,"afterCaptureLog","flushLogs",By,Im),(this._options.enableMetrics??((o=this._options._experiments)==null?void 0:o.enableMetrics)??!0)&&Uc(this,"afterCaptureMetric","flushMetrics",$y,Lm)}captureException(t,r,a){const n=Vt();if(gc(t))return je&&pe.log($c),n;const o={event_id:n,...r};return this._process(()=>this.eventFromException(t,o).then(i=>this._captureEvent(i,o,a)).then(i=>i),"error"),o.event_id}captureMessage(t,r,a,n){const o={event_id:Vt(),...a},i=rl(t)?t:String(t),l=Gn(t),c=l?this.eventFromMessage(i,r,o):this.eventFromException(t,o);return this._process(()=>c.then(u=>this._captureEvent(u,o,n)),l?"unknown":"error"),o.event_id}captureEvent(t,r,a){const n=Vt();if(r!=null&&r.originalException&&gc(r.originalException))return je&&pe.log($c),n;const o={event_id:n,...r},i=t.sdkProcessingMetadata||{},l=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=Vc(t.type);return this._process(()=>this._captureEvent(t,o,l||a,c),u),o.event_id}captureSession(t){this.sendSession(t),Lr(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const r=this._transport;if(!r)return!0;this.emit("flush");const a=await this._isClientDoneProcessing(t),n=await r.flush(t);return a&&n}async close(t){const r=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),r}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const r=this._integrations[t.name];Pm(this,t,this._integrations),r||Fc(this,[t])}sendEvent(t,r={}
8){this.emit("beforeSendEvent",t,r);let a=Vb(t,this._dsn,this._options._metadata,this._options.tunnel);for(const n of r.attachments||[])a=Lb(a,$b(n));this.sendEnvelope(a).then(n=>this.emit("afterSendEvent",t,n))}sendSession(t){const{release:r,environment:a=cl}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!r){je&&pe.warn(Bc);return}o.release=o.release||r,o.environment=o.environment||a,t.attrs=o}else{if(!t.release&&!r){je&&pe.warn(Bc);return}t.release=t.release||r,t.environment=t.environment||a}this.emit("beforeSendSession",t);const n=Ub(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,r,a=1){if(this._options.sendClientReports){const n=`${t}:${r}`;je&&pe.log(`Recording outcome: "${n}"${a>1?` (${a} times)`:""}`),this._outcomes[n]=(this._outcomes[n]||0)+a}}on(t,r){const a=this._hooks[t]=this._hooks[t]||new Set,n=(...o)=>r(...o);return a.add(n),()=>{a.delete(n)}}emit(t,...r){const a=this._hooks[t];a&&a.forEach(n=>n(...r))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(r){return je&&pe.error("Error while sending envelope:",r),{}}return je&&pe.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=yy(this,t),Fc(this,t)}_updateSessionFromEvent(t,r){var c,u;let a=r.level==="fatal",n=!1;const o=(c=r.exception)==null?void 0:c.values;if(o){n=!0,a=!1;for(const m of o)if(((u=m.mechanism)==null?void 0:u.handled)===!1){a=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&a)&&(Lr(t,{...a&&{status:"crashed"},errors:t.errors||Number(n||a)}),this.captureSession(t))}async _isClientDoneProcessing(t){let r=0;for(;!t||r<t;){if(await new Promise(a=>setTimeout(a,1)),!this._numProcessing)return!0;r++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,a,n){const o=this.getOptions(),i=Object.keys(this._integrations);return!r.integrations&&(i!=null&&i.length)&&(r.integrations=i),this.emit("preprocessEvent",t,r),t.type||n.setLastEventId(t.event_id||r.event_id),ey(o,t,r,a,this,n).then(l=>{if(l===null)return l;this.emit("postprocessEvent",l,r),l.contexts={trace:Wx(a),...l.contexts};const c=Eb(this,a);return l.sdkProcessingMetadata={dynamicSamplingContext:c,...l.sdkProcessingMetadata},l})}_captureEvent(t,r={},a=As(),n=fr()){return je&&hi(t)&&pe.log(`Captured error event \`${$m(t)[0]||"<unknown>"}\``),this._processEvent(t,r,a,n).then(o=>o.event_id,o=>{je&&(Hc(o)?pe.log(o.message):zc(o)?pe.warn(o.message):pe.warn(o))})}_processEvent(t,r,a,n){const o=this.getOptions(),{sampleRate:i}=o,l=Hm(t),c=hi(t),m=`before send for type \`${t.type||"error"}\``,h=typeof i>"u"?void 0:gb(i);if(c&&typeof h=="number"&&Nn()>h)return this.recordDroppedEvent("sample_rate","error"),dl(Eo(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const p=Vc(t.type);return this._prepareEvent(t,r,a,n).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",p),Eo("An event processor returned `null`, will not send event.");if(r.data&&r.data.__sentry__===!0)return f;const x=Fy(this,o,f,r);return Dy(x,m)}).then(f=>{var _;if(f===null){if(this.recordDroppedEvent("before_send",p),l){const E=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",E)}throw Eo(`${m} returned \`null\`, will not send event.`)}const y=a.getSession()||n.getSession();if(c&&y&&this._updateSessionFromEvent(y,f),l){const b=((_=f.sdkProcessingMetadata)==null?void 0:_.spanCountBeforeProcessing)||0,E=f.spans?f.spans.length:0,v=b-E;v>0&&this.recordDroppedEvent("before_send","span",v)}const x=f.transaction_info;if(l&&x&&f.transaction!==t.transaction){const b="custom";f.transaction_info={...x,source:b}}return this.sendEvent(f,r),f}).then(null,f=>{throw Hc(f)||zc(f)?f:(this.captureException(f,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:f}),hn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 9Reason: ${f}`))})}_process(t,r){this._numProcessing++,this._promiseBuffer.add(t).then(a=>(this._numProcessing--,a),a=>(this._numProcessing--,a===ul&&this.recordDroppedEvent("queue_overflow",r),a))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([r,a])=>{const[n,o]=r.split(":");return{reason:n,category:o,quantity:a}})}_flushOutcomes(){je&&pe.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){je&&pe.log("No outcomes to send");return}if(!this._dsn){je&&pe.log("No dsn provided, will not send outcomes");return}je&&pe.log("Sending outcomes:",t);const r=Py(t,this._options.tunnel&&Oa(this._dsn));this.sendEnvelope(r)}}function Vc(e){return e==="replay_event"?"replay":e||"error"}function Dy(e,t){const r=`${t} must return \`null\` or a valid event.`;if(Ia(e))return e.then(a=>{if(!wa(a)&&a!==null)throw hn(r);return a},a=>{throw hn(`${t} rejected with ${a}`)});if(!wa(e)&&e!==null)throw hn(r);return e}function Fy(e,t,r,a){const{beforeSend:n,beforeSendTransaction:o,beforeSendSpan:i,ignoreSpans:l}=t;
9let c=r;if(hi(c)&&n)return n(c,a);if(Hm(c)){if(i||l){const u=Iy(c);if(l!=null&&l.length&&Ec(u,l))return null;if(i){const m=i(u);m?c=La(r,My(m)):Sc()}if(c.spans){const m=[],h=c.spans;for(const f of h){if(l!=null&&l.length&&Ec(f,l)){Nb(h,f);continue}if(i){const y=i(f);y?m.push(y):(Sc(),m.push(f))}else m.push(f)}const p=c.spans.length-m.length;p&&e.recordDroppedEvent("before_send","span",p),c.spans=m}}if(o){if(c.spans){const u=c.spans.length;c.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return o(c,a)}}return c}function hi(e){return e.type===void 0}function Hm(e){return e.type==="transaction"}function $y(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Um(e.attributes)}function By(e){let t=0;return e.message&&(t+=e.message.length*2),t+Um(e.attributes)}function Um(e){if(!e)return 0;let t=0;return Object.values(e).forEach(r=>{Array.isArray(r)?t+=r.length*qc(r[0]):Gn(r)?t+=qc(r):t+=100}),t}function qc(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function zy(e){return Wn(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function Wc(e){return zy(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function Hy(e,t){t.debug===!0&&(je?pe.enable():Zr(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),As().update(t.initialScope);const a=new e(t);return Uy(a),a.init(),a}function Uy(e){As().setClient(e)}function Ao(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",a=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:a,relative:t[5]+r+a}}function Vy(e,t=!0){if(e.startsWith("data:")){const r=e.match(/^data:([^;,]+)/),a=r?r[1]:"text/plain",n=e.includes(";base64,"),o=e.indexOf(",");let i="";if(t&&o!==-1){const l=e.slice(o+1);i=l.length>10?`${l.slice(0,10)}... [truncated]`:l}return`data:${a}${n?",base64":""}${i?`,${i}`:""}`}return e}function qy(e){var t;"aggregates"in e?((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Vm(e,t,r=[t],a="npm"){const n=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};n.name||(n.name=`sentry.javascript.${t}`,n.packages=r.map(o=>({name:`${a}:@sentry/${o}`,version:nr})),n.version=nr)}const Wy=100;function lr(e,t){const r=xt(),a=fr();if(!r)return;const{beforeBreadcrumb:n=null,maxBreadcrumbs:o=Wy}=r.getOptions();if(o<=0)return;const l={timestamp:Ma(),...e},c=n?Zr(()=>n(l,t)):l;c!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",c,t),a.addBreadcrumb(c,o))}let Gc;const Gy="FunctionToString",Yc=new WeakMap,Yy=()=>({name:Gy,setupOnce(){Gc=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=ol(this),r=Yc.has(xt())&&t!==void 0?t:this;return Gc.apply(r,e)}}catch{}},setup(e){Yc.set(e,!0)}}),Ky=Yy,Zy=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],Qy="EventFilters",Xy=(e={})=>{let t;return{name:Qy,setup(r){const a=r.getOptions();t=Kc(e,a)},processEvent(r,a,n){if(!t){const o=n.getOptions();t=Kc(e,o)}return ev(r,t)?null:r}}},Jy=(e={})=>({...Xy(e),name:"InboundFilters"});function Kc(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Zy],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function ev(e,t){if(e.type){if(e.type==="transaction"&&sv(e,t.ignoreTransactions))return je&&pe.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 10Event: ${tr(e)}`),!0}else{if(tv(e,t.ignoreErrors))return je&&pe.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 11Event: ${tr(e)}`),!0;if(ov(e))return je&&pe.warn(`Event dropped due to not having an error message, error type or stacktrace. 12Event: ${tr(e)}`),!0;if(rv(e,t.denyUrls))return je&&pe.warn(`Event dropped due to being matched by \`denyUrls\` option. 13Event: ${tr(e)}. 14Url: ${Sn(e)}`),!0;if(!av(e,t.allowUrls))return je&&pe.warn(`Event dropped due to not being matched by \`allowUrls\` option. 15Event: ${tr(e)}. 16Url: ${Sn(e)}`),!0}return!1}function tv(e,t){return t!=null&&t.length?$m(e).some(r=>Qn(r,t)):!1}function sv(e,t){if(!(t!=null&&t.length))return!1;const r=e.transaction;return r?Qn(r,t):!1}
16function rv(e,t){if(!(t!=null&&t.length))return!1;const r=Sn(e);return r?Qn(r,t):!1}function av(e,t){if(!(t!=null&&t.length))return!0;const r=Sn(e);return r?Qn(r,t):!0}function nv(e=[]){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Sn(e){var t,r;try{const a=[...((t=e.exception)==null?void 0:t.values)??[]].reverse().find(o=>{var i,l,c;return((i=o.mechanism)==null?void 0:i.parent_id)===void 0&&((c=(l=o.stacktrace)==null?void 0:l.frames)==null?void 0:c.length)}),n=(r=a==null?void 0:a.stacktrace)==null?void 0:r.frames;return n?nv(n):null}catch{return je&&pe.error(`Cannot extract url for event ${tr(e)}`),null}}function ov(e){var t,r;return(r=(t=e.exception)==null?void 0:t.values)!=null&&r.length?!e.message&&!e.exception.values.some(a=>a.stacktrace||a.type&&a.type!=="Error"||a.value):!1}function iv(e,t,r,a,n,o){var l;if(!((l=n.exception)!=null&&l.values)||!o||!qs(o.originalException,Error))return;const i=n.exception.values.length>0?n.exception.values[n.exception.values.length-1]:void 0;i&&(n.exception.values=pi(e,t,a,o.originalException,r,n.exception.values,i,0))}function pi(e,t,r,a,n,o,i,l){if(o.length>=r+1)return o;let c=[...o];if(qs(a[n],Error)){Zc(i,l,a);const u=e(t,a[n]),m=c.length;Qc(u,n,m,l),c=pi(e,t,r,a[n],n,[u,...c],u,m)}return qm(a)&&a.errors.forEach((u,m)=>{if(qs(u,Error)){Zc(i,l,a);const h=e(t,u),p=c.length;Qc(h,`errors[${m}]`,p,l),c=pi(e,t,r,u,n,[h,...c],h,p)}}),c}function qm(e){return Array.isArray(e.errors)}function Zc(e,t,r){e.mechanism={handled:!0,type:"auto.core.linked_errors",...qm(r)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Qc(e,t,r,a){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:a}}function lv(e){const t="console";ur(t,e),mr(t,cv)}function cv(){"console"in Fe&&cx.forEach(function(e){e in Fe.console&&Pt(Fe.console,e,function(t){return kn[e]=t,function(...r){ts("console",{args:r,level:e});const n=kn[e];n==null||n.apply(Fe.console,r)}})})}function dv(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const uv="Dedupe",mv=()=>{let e;return{name:uv,processEvent(t){if(t.type)return t;try{if(hv(t,e))return je&&pe.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},fv=mv;function hv(e,t){return t?!!(pv(e,t)||gv(e,t)):!1}function pv(e,t){const r=e.message,a=t.message;return!(!r&&!a||r&&!a||!r&&a||r!==a||!Gm(e,t)||!Wm(e,t))}function gv(e,t){const r=Xc(t),a=Xc(e);return!(!r||!a||r.type!==a.type||r.value!==a.value||!Gm(e,t)||!Wm(e,t))}function Wm(e,t){let r=dc(e),a=dc(t);if(!r&&!a)return!0;if(r&&!a||!r&&a||(r=r,a=a,a.length!==r.length))return!1;for(let n=0;n<a.length;n++){const o=a[n],i=r[n];if(o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1}return!0}function Gm(e,t){let r=e.fingerprint,a=t.fingerprint;if(!r&&!a)return!0;if(r&&!a||!r&&a)return!1;r=r,a=a;try{return r.join("")===a.join("")}catch{return!1}}function Xc(e){var t,r;return(r=(t=e.exception)==null?void 0:t.values)==null?void 0:r[0]}const xv="ConversationId",bv=()=>({name:xv,setup(e){e.on("spanStart",t=>{const r=As().getScopeData(),a=fr().getScopeData(),n=r.conversationId||a.conversationId;n&&t.setAttribute(Xx,n)})}}),yv=bv;function Ym(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const ja=Fe;function vv(){return"history"in ja&&!!ja.history}function wv(){if(!("fetch"in ja))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function gi(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function _v(){var r;if(typeof EdgeRuntime=="string")return!0;if(!wv())return!1;if(gi(ja.fetch))return!0;let e=!1;const t=ja.document;if(t&&typeof t.createElement=="function")try{const a=t.createElement("iframe");a.hidden=!0,t.head.appendChild(a),(r=a.contentWindow)!=null&&r.fetch&&(e=gi(a.contentWindow.fetch)),t.head.removeChild(a)}catch(a){je&&pe.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",a)}return e}function jv(e,t){const r="fetch";ur(r,e),mr(r,()=>kv(void 0,t))}function kv(e,t=!1){t&&!_v()||Pt(Fe,"fetch",function(r){return function(...a){const n=new Error,{method:o,url:i}=Nv(a),l={args:a,fetchData:{method:o,url:i},startTimestamp:_s()*1e3,virtualError:n,headers:Sv(a)};return ts("fetch",{...l}),r.apply(Fe,a).then(async c=>(ts("fetch",{...l,endTimestamp:_s()*1e3,response:c}),c),c=>{ts("fetch",{...l,endTimestamp:_s()*1e3,error:c}),Wn(c)&&c.stack===void 0&&(c.stack=n.stack,Ws(c,"framesToPop",1));const u=xt(),m=(u==null?void 0:u.getOptions().enhanceFetchErrorMessages)??"always";if(m!==!1&&c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const f=new URL(l.fetchData.url).host;m==="always"?c.message=`${c.message} (${f})`:Ws(c,"__sentry_fetch_url_host__",f)}catch{}throw c})}})}function pn(e,t){return!!e&&typeof e=="object"&&!!e[t]}
vendor: 6,027 bytes, line 16
16function Jc(e){return typeof e=="string"?e:e?pn(e,"url")?e.url:e.toString?e.toString():"":""}function Nv(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,a]=e;return{url:Jc(r),method:pn(a,"method")?String(a.method).toUpperCase():mm(r)&&pn(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Jc(t),method:pn(t,"method")?String(t.method).toUpperCase():"GET"}}function Sv(e){const[t,r]=e;try{if(typeof r=="object"&&r!==null&&"headers"in r&&r.headers)return new Headers(r.headers);if(mm(t))return new Headers(t.headers)}catch{}}function Cv(){return"npm"}const Ze=Fe;let xi=0;function Km(){return xi>0}function Ev(){xi++,setTimeout(()=>{xi--})}function Dr(e,t={}){function r(n){return typeof n=="function"}if(!r(e))return e;try{const n=e.__sentry_wrapped__;if(n)return typeof n=="function"?n:e;if(ol(e))return e}catch{return e}const a=function(...n){try{const o=n.map(i=>Dr(i,t));return e.apply(this,o)}catch(o){throw Ev(),qx(i=>{i.addEventProcessor(l=>(t.mechanism&&(li(l,void 0),Mr(l,t.mechanism)),l.extra={...l.extra,arguments:n},l)),Em(o)}),o}};try{for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n])}catch{}hm(a,e),Ws(e,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get(){return e.name}})}catch{}return a}function Av(){const e=nl(),{referrer:t}=Ze.document||{},{userAgent:r}=Ze.navigator||{},a={...t&&{Referer:t},...r&&{"User-Agent":r}};return{url:e,headers:a}}function fl(e,t){const r=hl(e,t),a={type:Mv(t),value:Lv(t)};return r.length&&(a.stacktrace={frames:r}),a.type===void 0&&a.value===""&&(a.value="Unrecoverable error caught"),a}function Tv(e,t,r,a){const n=xt(),o=n==null?void 0:n.getOptions().normalizeDepth,i=Bv(t),l={__serialized__:Sm(t,o)};if(i)return{exception:{values:[fl(e,i)]},extra:l};const c={exception:{values:[{type:Yn(t)?t.constructor.name:a?"UnhandledRejection":"Error",value:Fv(t,{isUnhandledRejection:a})}]},extra:l};if(r){const u=hl(e,r);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function To(e,t){return{exception:{values:[fl(e,t)]}}}function hl(e,t){const r=t.stacktrace||t.stack||"",a=Pv(t),n=Iv(t);try{return e(r,a,n)}catch{}return[]}const Rv=/Minified React error #\d+;/i;function Pv(e){return e&&Rv.test(e.message)?1:0}function Iv(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Zm(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Mv(e){const t=e==null?void 0:e.name;return!t&&Zm(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Lv(e){const t=e==null?void 0:e.message;return Zm(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?Wc(t.error):Wc(e):"No error message"}function Ov(e,t,r,a){const n=(r==null?void 0:r.syntheticException)||void 0,o=pl(e,t,n,a);return Mr(o),o.level="error",r!=null&&r.event_id&&(o.event_id=r.event_id),Da(o)}function Dv(e,t,r="info",a,n){const o=(a==null?void 0:a.syntheticException)||void 0,i=bi(e,t,o,n);return i.level=r,a!=null&&a.event_id&&(i.event_id=a.event_id),Da(i)}function pl(e,t,r,a,n){let o;if(dm(t)&&t.error)return To(e,t.error);if(mc(t)||_x(t)){const i=t;if("stack"in t)o=To(e,t);else{const l=i.name||(mc(i)?"DOMError":"DOMException"),c=i.message?`${l}: ${i.message}`:l;o=bi(e,c,r,a),li(o,c)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return Wn(t)?To(e,t):wa(t)||Yn(t)?(o=Tv(e,t,r,n),Mr(o,{synthetic:!0}),o):(o=bi(e,t,r,a),li(o,`${t}`),Mr(o,{synthetic:!0}),o)}function bi(e,t,r,a){const n={};if(a&&r){const o=hl(e,r);o.length&&(n.exception={values:[{value:t,stacktrace:{frames:o}}]}),Mr(n,{synthetic:!0})}if(rl(t)){const{__sentry_template_string__:o,__sentry_template_values__:i}=t;return n.logentry={message:o,params:i},n}return n.message=t,n}function Fv(e,{isUnhandledRejection:t}){const r=Ax(e),a=t?"promise rejection":"exception";return dm(e)?`Event \`ErrorEvent\` captured as ${a} with message \`${e.message}\``:Yn(e)?`Event \`${$v(e)}\` (type=${e.type}) captured as ${a}`:`Object captured as ${a} with keys: ${r}`}function $v(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Bv(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];if(r instanceof Error)return r}}class zv extends Oy{constructor(t){var m;const r=Hv(t),a=Ze.SENTRY_SDK_SOURCE||Cv();Vm(r,"browser",["browser"],a),(m=r._metadata)!=null&&m.sdk&&(r._metadata.sdk.settings={infer_ip:r.sendDefaultPii?"auto":"never",...r._metadata.sdk.settings}),super(r);const{sendDefaultPii:n,sendClientReports:o,enableLogs:i,_experiments:l,enableMetrics:c}=this._options,u=c??(l==null?void 0:l.enableMetrics)??!0;Ze.document&&(o||i||u)&&Ze.document.addEventListener("visibilitychange",()=>{Ze.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),i&&Im(this),u&&Lm(this))}),n&&this.on("beforeSendSession",qy)}eventFromException(t,r){return Ov(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",a){return Dv(this._options.stackParser,t,r,a,this._options.attachStacktrace)}_prepareEvent(t,r,a,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,a,n)}}function Hv(e){var t;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(t=Ze.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const Uv=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,wt=Fe,Vv=1e3;let ed,yi,vi;function qv(e){const t="dom";ur(t,e),mr(t,Wv)}function Wv(){if(!wt.document)return;const e=ts.bind(null,"dom"),t=td(e,!0);wt.document.addEventListener("click",t,!1),wt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{var o,i;const n=(o=wt[r])==null?void 0:o.prototype;(i=n==null?void 0:n.hasOwnProperty)!=null&&i.call(n,"addEventListener")&&(Pt(n,"addEventListener",function(l){return function(c,u,m){if(c==="click"||c=="
16keypress")try{const h=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},p=h[c]=h[c]||{refCount:0};if(!p.handler){const f=td(e);p.handler=f,l.call(this,c,f,m)}p.refCount++}catch{}return l.call(this,c,u,m)}}),Pt(n,"removeEventListener",function(l){return function(c,u,m){if(c==="click"||c=="keypress")try{const h=this.__sentry_instrumentation_handlers__||{},p=h[c];p&&(p.refCount--,p.refCount<=0&&(l.call(this,c,p.handler,m),p.handler=void 0,delete h[c]),Object.keys(h).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return l.call(this,c,u,m)}}))})}function Gv(e){if(e.type!==yi)return!1;try{if(!e.target||e.target._sentryId!==vi)return!1}catch{}return!0}function Yv(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function td(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const a=Kv(r);if(Yv(r.type,a))return;Ws(r,"_sentryCaptured",!0),a&&!a._sentryId&&Ws(a,"_sentryId",Vt());const n=r.type==="keypress"?"input":r.type;Gv(r)||(e({event:r,name:n,global:t}),yi=r.type,vi=a?a._sentryId:void 0),clearTimeout(ed),ed=wt.setTimeout(()=>{vi=void 0,yi=void 0},Vv)}}function Kv(e){try{return e.target}catch{return null}}let Qa;function Qm(e){const t="history";ur(t,e),mr(t,Zv)}function Zv(){if(wt.addEventListener("popstate",()=>{const t=wt.location.href,r=Qa;if(Qa=t,r===t)return;ts("history",{from:r,to:t})}),!vv())return;function e(t){return function(...r){const a=r.length>2?r[2]:void 0;if(a){const n=Qa,o=Qv(String(a));if(Qa=o,n===o)return t.apply(this,r);ts("history",{from:n,to:o})}return t.apply(this,r)}}Pt(wt.history,"pushState",e),Pt(wt.history,"replaceState",e)}function Qv(e){try{return new URL(e,wt.location.origin).toString()}catch{return e}}const gn={};function Xv(e){const t=gn[e];if(t)return t;let r=wt[e];if(gi(r))return gn[e]=r.bind(wt);const a=wt.document;if(a&&typeof a.createElement=="function")try{const n=a.createElement("iframe");n.hidden=!0,a.head.appendChild(n);const o=n.contentWindow;o!=null&&o[e]&&(r=o[e]),a.head.removeChild(n)}catch(n){Uv&&pe.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,n)}return r&&(gn[e]=r.bind(wt))}function Jv(e){gn[e]=void 0}const ha="__sentry_xhr_v3__";function e0(e){const t="xhr";ur(t,e),mr(t,t0)}function t0(){if(!wt.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,a){const n=new Error,o=_s()*1e3,i=ws(a[0])?a[0].toUpperCase():void 0,l=s0(a[1]);if(!i||!l)return t.apply(r,a);r[ha]={method:i,url:l,request_headers:{}},i==="POST"&&l.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const c=()=>{const u=r[ha];if(u&&r.readyState===4){try{u.status_code=r.status}catch{}const m={endTimestamp:_s()*1e3,startTimestamp:o,xhr:r,virtualError:n};ts("xhr",m)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(u,m,h){return c(),u.apply(m,h)}}):r.addEventListener("readystatechange",c),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(u,m,h){const[p,f]=h,y=m[ha];return y&&ws(p)&&ws(f)&&(y.request_headers[p.toLowerCase()]=f),u.apply(m,h)}}),t.apply(r,a)}}),e.send=new Proxy(e.send,{apply(t,r,a){const n=r[ha];if(!n)return t.apply(r,a);a[0]!==void 0&&(n.body=a[0]);const o={startTimestamp:_s()*1e3,xhr:r};return ts("xhr",o),t.apply(r,a)}})}function s0(e){if(ws(e))return e;try{return e.toString()}catch{}}const r0=40;function a0(e,t=Xv("fetch")){let r=0,a=0;async function n(o){const i=o.body.length;r+=i,a++;const l={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:r<=6e4&&a<15,...e.fetchOptions};try{const c=await t(e.url,l);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw Jv("fetch"),c}finally{r-=i,a--}}return Ry(e,n,ml(e.bufferSize||r0))}const Xn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,n0=30,o0=50;function wi(e,t,r,a){const n={filename:e,function:t==="<anonymous>"?ir:t,in_app:!0};return r!==void 0&&(n.lineno=r),a!==void 0&&(n.colno=a),n}const i0=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,l0=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,c0=/\((\S*)(?::(\d+))(?::(\d+))\)/,d0=/at (.+?) ?\(data:(.+?),/,u0=e=>{const t=e.match(d0);
vendor: 4,830 bytes, line 16
16if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const r=i0.exec(e);if(r){const[,n,o,i]=r;return wi(n,ir,+o,+i)}const a=l0.exec(e);if(a){if(a[2]&&a[2].indexOf("eval")===0){const l=c0.exec(a[2]);l&&(a[2]=l[1],a[3]=l[2],a[4]=l[3])}const[o,i]=Xm(a[1]||ir,a[2]);return wi(i,o,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},m0=[n0,u0],f0=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,h0=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,p0=e=>{const t=f0.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=h0.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let a=t[3],n=t[1]||ir;return[n,a]=Xm(n,a),wi(a,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},g0=[o0,p0],x0=[m0,g0],b0=im(...x0),Xm=(e,t)=>{const r=e.indexOf("safari-extension")!==-1,a=e.indexOf("safari-web-extension")!==-1;return r||a?[e.indexOf("@")!==-1?e.split("@")[0]:ir,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Xa=1024,y0="Breadcrumbs",v0=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:y0,setup(r){t.console&&lv(k0(r)),t.dom&&qv(j0(r,t.dom)),t.xhr&&e0(N0(r)),t.fetch&&jv(S0(r)),t.history&&Qm(C0(r)),t.sentry&&r.on("beforeSendEvent",_0(r))}}},w0=v0;function _0(e){return function(r){xt()===e&&lr({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:tr(r)},{event:r})}}function j0(e,t){return function(a){if(xt()!==e)return;let n,o,i=typeof t=="object"?t.serializeAttribute:void 0,l=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;l&&l>Xa&&(Xn&&pe.warn(`\`dom.maxStringLength\` cannot exceed ${Xa}, but a value of ${l} was configured. Sentry will use ${Xa} instead.`),l=Xa),typeof i=="string"&&(i=[i]);try{const u=a.event,m=E0(u)?u.target:u;n=fm(m,{keyAttrs:i,maxStringLength:l}),o=Ex(m)}catch{n="<unknown>"}if(n.length===0)return;const c={category:`ui.${a.name}`,message:n};o&&(c.data={"ui.component_name":o}),lr(c,{event:a.event,name:a.name,global:a.global})}}function k0(e){return function(r){if(xt()!==e)return;const a={category:"console",data:{arguments:r.args,logger:"console"},level:dv(r.level),message:pc(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)a.message=`Assertion failed: ${pc(r.args.slice(1)," ")||"console.assert"}`,a.data.arguments=r.args.slice(1);else return;lr(a,{input:r.args,level:r.level})}}function N0(e){return function(r){if(xt()!==e)return;const{startTimestamp:a,endTimestamp:n}=r,o=r.xhr[ha];if(!a||!n||!o)return;const{method:i,url:l,status_code:c,body:u}=o,m={method:i,url:l,status_code:c},h={xhr:r.xhr,input:u,startTimestamp:a,endTimestamp:n},p={category:"xhr",data:m,type:"http",level:Ym(c)};e.emit("beforeOutgoingRequestBreadcrumb",p,h),lr(p,h)}}function S0(e){return function(r){if(xt()!==e)return;const{startTimestamp:a,endTimestamp:n}=r;if(n&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.fetchData.method,r.fetchData.url,r.error){const o=r.fetchData,i={data:r.error,input:r.args,startTimestamp:a,endTimestamp:n},l={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",l,i),lr(l,i)}else{const o=r.response,i={...r.fetchData,status_code:o==null?void 0:o.status};r.fetchData.request_body_size,r.fetchData.response_body_size,o==null||o.status;const l={input:r.args,response:o,startTimestamp:a,endTimestamp:n},c={category:"fetch",data:i,type:"http",level:Ym(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,l),lr(c,l)}}}function C0(e){return function(r){if(xt()!==e)return;let a=r.from,n=r.to;const o=Ao(Ze.location.href);let i=a?Ao(a):void 0;const l=Ao(n);i!=null&&i.path||(i=o),o.protocol===l.protocol&&o.host===l.host&&(n=l.relative),o.protocol===i.protocol&&o.host===i.host&&(a=i.relative),lr({category:"navigation",data:{from:a,to:n}})}}function E0(e){return!!e&&!!e.target}const A0=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],T0="BrowserApiErrors",R0=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:T0,setupOnce(){t.setTimeout&&Pt(Ze,"setTimeout",sd),t.setInterval&&Pt(Ze,"setInterval",sd),t.requestAnimationFrame&&Pt(Ze,"requestAnimationFrame",I0),t.XMLHttpRequest&&"XMLHttpRequest"in Ze&&Pt(XMLHttpRequest.prototype,"send",M0);const r=t.eventTarget;
16r&&(Array.isArray(r)?r:A0).forEach(n=>L0(n,t))}}},P0=R0;function sd(e){return function(...t){const r=t[0];return t[0]=Dr(r,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Vs(e)}`}}),e.apply(this,t)}}function I0(e){return function(t){return e.apply(this,[Dr(t,{mechanism:{data:{handler:Vs(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function M0(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(n=>{n in r&&typeof r[n]=="function"&&Pt(r,n,function(o){const i={mechanism:{data:{handler:Vs(o)},handled:!1,type:`auto.browser.browserapierrors.xhr.${n}`}},l=ol(o);return l&&(i.mechanism.data.handler=Vs(l)),Dr(o,i)})}),e.apply(this,t)}}function L0(e,t){var n,o;const a=(n=Ze[e])==null?void 0:n.prototype;(o=a==null?void 0:a.hasOwnProperty)!=null&&o.call(a,"addEventListener")&&(Pt(a,"addEventListener",function(i){return function(l,c,u){try{O0(c)&&(c.handleEvent=Dr(c.handleEvent,{mechanism:{data:{handler:Vs(c),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&D0(this,l,c),i.apply(this,[l,Dr(c,{mechanism:{data:{handler:Vs(c),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),u])}}),Pt(a,"removeEventListener",function(i){return function(l,c,u){try{const m=c.__sentry_wrapped__;m&&i.call(this,l,m,u)}catch{}return i.call(this,l,c,u)}}))}function O0(e){return typeof e.handleEvent=="function"}function D0(e,t,r){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,r)}const F0=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof Ze.document>"u"){Xn&&pe.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Lc({ignoreDuration:!0}),Oc(),t==="route"&&Qm(({from:r,to:a})=>{r!==void 0&&r!==a&&(Lc({ignoreDuration:!0}),Oc())})}}},$0="CultureContext",B0=()=>({name:$0,preprocessEvent(e){var r;const t=H0();t&&(e.contexts={...e.contexts,culture:{...t,...(r=e.contexts)==null?void 0:r.culture}})}}),z0=B0;function H0(){try{const e=Ze.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const U0="GlobalHandlers",V0=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:U0,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(W0(r),rd("onerror")),t.onunhandledrejection&&(G0(r),rd("onunhandledrejection"))}}},q0=V0;function W0(e){bx(t=>{const{stackParser:r,attachStacktrace:a}=Jm();if(xt()!==e||Km())return;const{msg:n,url:o,line:i,column:l,error:c}=t,u=Z0(pl(r,c||n,void 0,a,!1),o,i,l);u.level="error",Am(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function G0(e){vx(t=>{const{stackParser:r,attachStacktrace:a}=Jm();if(xt()!==e||Km())return;const n=Y0(t),o=Gn(n)?K0(n):pl(r,n,void 0,a,!0);o.level="error",Am(o,{originalException:n,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function Y0(e){if(Gn(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function K0(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Z0(e,t,r,a){const n=e.exception=e.exception||{},o=n.values=n.values||[],i=o[0]=o[0]||{},l=i.stacktrace=i.stacktrace||{},c=l.frames=l.frames||[],u=a,m=r,h=Q0(t)??nl();return c.length===0&&c.push({colno:u,filename:h,function:ir,in_app:!0,lineno:m}),e}function rd(e){Xn&&pe.log(`Global Handler attached: ${e}`)}function Jm(){const e=xt();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function Q0(e){if(!(!ws(e)||e.length===0))return e.startsWith("data:")?`<${Vy(e,!1)}>`:e}const X0=()=>({name:"HttpContext",preprocessEvent(e){var a;if(!Ze.navigator&&!Ze.location&&!Ze.document)return;const t=Av(),r={...t.headers,...(a=e.request)==null?void 0:a.headers};e.request={...t,...e.request,headers:r}}}),J0="cause",ew=5,tw="LinkedErrors",sw=(e={})=>{const t=e.limit||ew,r=e.key||J0;return{name:tw,preprocessEvent(a,n,o){const i=o.getOptions();iv(fl,i.stackParser,r,t,a,n)}}},rw=sw;function aw(){return nw()?(Xn&&Zr(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function nw(){var o;if(typeof Ze.window>"u")return!1;const e=Ze;if(e.nw)return!1;const t=e.chrome||e.browser;if(!((o=t==null?void 0:t.runtime)!=null&&o.id))return!1;const r=nl(),a=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Ze===Ze.top&&a.some(i=>r.startsWith(`${i}://`)))}function ow(e){return[Jy(),Ky(),yv(),P0(),w0(),q0(),rw(),fv(),X0(),z0(),F0()]}function iw(e={}){const t=!e.skipBrowserExtensionCheck&&aw();let r=e.defaultIntegrations==null?ow():e.defaultIntegrations;const a={...e,enabled:t?!1:e.enabled,stackParser:gx(e.stackParser||b0),integrations:by({integrations:e.integrations,defaultIntegrations:r}),transport:e.transport||a0};return Hy(zv,a)}function lw(e){const t={...e};return Vm(t,"react"),uy("react",{version:d.version}),iw(t)}var Cn={},cw=()=>{window.va||(window.va=function(...t){window.vaq||(window.vaq=[]),window.vaq.push(t)})},dw="@vercel/analytics",uw="2.0.1";function ef(){return typeof window<"u"}function tf(){try{const e="production"}catch{}return"production"}function mw(e="auto"){if(e==="auto"){window.vam=tf();return}window.vam=e}function fw(){return(ef()?window.vam:tf())||"production"}function gl(){return fw()==="development"}function hw(e){return e.scriptSrc?Cr(e.scriptSrc):gl()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?Cr(`${e.basePath}
16/insights/script.js`):"/_vercel/insights/script.js"}function pw(e,t){var r;let a=e;if(t)try{a={...(r=JSON.parse(t))==null?void 0:r.analytics,...e}}catch{}mw(a.mode);const n={sdkn:dw+(a.framework?`/${a.framework}`:""),sdkv:uw};return a.disableAutoTrack&&(n.disableAutoTrack="1"),a.viewEndpoint&&(n.viewEndpoint=Cr(a.viewEndpoint)),a.eventEndpoint&&(n.eventEndpoint=Cr(a.eventEndpoint)),a.sessionEndpoint&&(n.sessionEndpoint=Cr(a.sessionEndpoint)),gl()&&a.debug===!1&&(n.debug="false"),a.dsn&&(n.dsn=a.dsn),a.endpoint?n.endpoint=a.endpoint:a.basePath&&(n.endpoint=Cr(`${a.basePath}/insights`)),{beforeSend:a.beforeSend,src:hw(a),dataset:n}}function Cr(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function gw(e={debug:!0},t){var r;if(!ef())return;const{beforeSend:a,src:n,dataset:o}=pw(e,t);if(cw(),a&&((r=window.va)==null||r.call(window,"beforeSend",a)),document.head.querySelector(`script[src*="${n}"]`))return;const i=document.createElement("script");i.src=n;for(const[l,c]of Object.entries(o))i.dataset[l]=c;i.defer=!0,i.onerror=()=>{const l=gl()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${n}. ${l}`)},document.head.appendChild(i)}function xw({route:e,path:t}){var r;(r=window.va)==null||r.call(window,"pageview",{route:e,path:t})}function bw(){if(!(typeof process>"u"||typeof Cn>"u"))return Cn.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function yw(){if(!(typeof process>"u"||typeof Cn>"u"))return Cn.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function ad(e){return d.useEffect(()=>{var t;e.beforeSend&&((t=window.va)==null||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),d.useEffect(()=>{gw({framework:e.framework||"react",basePath:e.basePath??bw(),...e.route!==void 0&&{disableAutoTrack:!0},...e},e.configString??yw())},[]),d.useEffect(()=>{e.route&&e.path&&xw({route:e.route,path:e.path})},[e.route,e.path]),null}var En={},vw=()=>{window.si||(window.si=function(...t){window.siq=window.siq||[],window.siq.push(t)})},ww="@vercel/speed-insights",_w="2.0.0";function jw(){return typeof window<"u"}function kw(){try{const e="production"}catch{}return"production"}function sf(){return kw()==="development"}function Nw(e){return e.scriptSrc?An(e.scriptSrc):sf()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":e.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":e.basePath?An(`${e.basePath}/speed-insights/script.js`):"/_vercel/speed-insights/script.js"}function Sw(e,t){var r;let a=e;if(t)try{a={...(r=JSON.parse(t))==null?void 0:r.speedInsights,...e}}catch{}const n={sdkn:ww+(a.framework?`/${a.framework}`:""),sdkv:_w};return a.sampleRate&&(n.sampleRate=a.sampleRate.toString()),a.route&&(n.route=a.route),sf()&&a.debug===!1&&(n.debug="false"),a.dsn&&(n.dsn=a.dsn),a.endpoint?n.endpoint=An(a.endpoint):a.basePath&&(n.endpoint=An(`${a.basePath}/speed-insights/vitals`)),{src:Nw(a),beforeSend:a.beforeSend,dataset:n}}function An(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function Cw(e={},t){var r;if(!jw()||e.route===null)return null;vw();const{beforeSend:a,src:n,dataset:o}=Sw(e,t);if(document.head.querySelector(`script[src*="${n}"]`))return null;a&&((r=window.si)==null||r.call(window,"beforeSend",a));const i=document.createElement("script");i.src=n,i.defer=!0;for(const[l,c]of Object.entries(o))i.dataset[l]=c;return i.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${n}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(i),{setRoute:l=>{i.dataset.route=l??void 0}}}function Ew(){if(!(typeof process>"u"||typeof En>"u"))return En.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function Aw(){if(!(typeof process>"u"||typeof En>"u"))return En.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function nd(e){d.useEffect(()=>{var r;e.beforeSend&&((r=window.si)==null||r.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);const t=d.useRef(null);return d.useEffect(()=>{if(!t.current){const r=Cw({framework:e.framework??"react",basePath:e.basePath??Ew(),...e}
16,e.configString??Aw());r&&(t.current=r.setRoute)}},[e]),d.useEffect(()=>{t.current&&e.route&&t.current(e.route)},[e.route]),null}function Tw(e){if(typeof window<"u"){const o=new URLSearchParams(window.location.search).get("subdomain");if(o)return o.toLowerCase()}if(e==="localhost"||e==="127.0.0.1"||e.startsWith("192.168.")||e.startsWith("10.")||e.endsWith(".vercel.app"))return null;const t=".mustwants.com";if(!e.endsWith(t))return null;const r=e.slice(0,e.length-t.length);return!r||r.includes(".")||["www","api","admin","staging","preview","app"].includes(r.toLowerCase())?null:r.toLowerCase()}const Rw=1,Pw=1e6;let Ro=0;function Iw(){return Ro=(Ro+1)%Number.MAX_SAFE_INTEGER,Ro.toString()}const Po=new Map,od=e=>{if(Po.has(e))return;const t=setTimeout(()=>{Po.delete(e),xa({type:"REMOVE_TOAST",toastId:e})},Pw);Po.set(e,t)},Mw=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Rw)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?od(r):e.toasts.forEach(a=>{od(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===r||r===void 0?{...a,open:!1}:a)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},xn=[];let bn={toasts:[]};function xa(e){bn=Mw(bn,e),xn.forEach(t=>{t(bn)})}function it({...e}){const t=Iw(),r=n=>xa({type:"UPDATE_TOAST",toast:{...n,id:t}}),a=()=>xa({type:"DISMISS_TOAST",toastId:t});return xa({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||a()}}}),{id:t,dismiss:a,update:r}}function At(){const[e,t]=d.useState(bn);return d.useEffect(()=>(xn.push(t),()=>{const r=xn.indexOf(t);r>-1&&xn.splice(r,1)}),[e]),{...e,toast:it,dismiss:r=>xa({type:"DISMISS_TOAST",toastId:r})}}var xl="ToastProvider",[bl,Lw,Ow]=sg("Toast"),[rf,u3]=Gr("Toast",[Ow]),[Dw,Jn]=rf(xl),af=e=>{const{__scopeToast:t,label:r="Notification",duration:a=5e3,swipeDirection:n="right",swipeThreshold:o=50,children:i}=e,[l,c]=d.useState(null),[u,m]=d.useState(0),h=d.useRef(!1),p=d.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${xl}\`. Expected non-empty \`string\`.`),s.jsx(bl.Provider,{scope:t,children:s.jsx(Dw,{scope:t,label:r,duration:a,swipeDirection:n,swipeThreshold:o,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:d.useCallback(()=>m(f=>f+1),[]),onToastRemove:d.useCallback(()=>m(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:i})})};af.displayName=xl;var nf="ToastViewport",Fw=["F8"],_i="toast.viewportPause",ji="toast.viewportResume",of=d.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:a=Fw,label:n="Notifications ({hotkey})",...o}=e,i=Jn(nf,r),l=Lw(r),c=d.useRef(null),u=d.useRef(null),m=d.useRef(null),h=d.useRef(null),p=Es(t,h,i.onViewportChange),f=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=i.toastCount>0;d.useEffect(()=>{const _=b=>{var v;a.length!==0&&a.every(w=>b[w]||b.code===w)&&((v=h.current)==null||v.focus())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[a]),d.useEffect(()=>{const _=c.current,b=h.current;if(y&&_&&b){const E=()=>{if(!i.isClosePausedRef.current){const C=new CustomEvent(_i);b.dispatchEvent(C),i.isClosePausedRef.current=!0}},v=()=>{if(i.isClosePausedRef.current){const C=new CustomEvent(ji);b.dispatchEvent(C),i.isClosePausedRef.current=!1}},w=C=>{!_.contains(C.relatedTarget)&&v()},N=()=>{_.contains(document.activeElement)||v()};return _.addEventListener("focusin",E),_.addEventListener("focusout",w),_.addEventListener("pointermove",E),_.addEventListener("pointerleave",N),window.addEventListener("blur",E),window.addEventListener("focus",v),()=>{_.removeEventListener("focusin",E),_.removeEventListener("focusout",w),_.removeEventListener("pointermove",E),_.removeEventListener("pointerleave",N),window.removeEventListener("blur",E),window.removeEventListener("focus",v)}}},[y,i.isClosePausedRef]);const x=d.useCallback(({tabbingDirection:_})=>{const E=l().map(v=>{const w=v.ref.current,N=[w,...Qw(w)];return _==="forwards"?N:N.reverse()});return(_==="forwards"?E.reverse():E).flat()},[l]);return d.useEffect(()=>{const _=h.current;if(_){const b=E=>{var N,C,j;const v=E.altKey||E.ctrlKey||E.metaKey;if(E.key==="Tab"&&!v){const k=document.activeElement,S=E.shiftKey;if(E.target===_&&S){(N=u.current)==null||N.focus();return}const P=x({tabbingDirection:S?"backwards":"forwards"}),A=P.findIndex(I=>I===k);Io(P.slice(A+1))?E.preventDefault():S?(C=u.current)==null||C.focus():(j=m.current)==null||j.focus()}};return _.addEventListener("keydown",b),()=>_.removeEventListener("keydown",b)}},[l,x]),s.jsxs(rg,{ref:c,role:"region","aria-label":n.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&s.jsx(ki,{ref:u,onFocusFromOutsideViewport:()=>{const _=x({tabbingDirection:"forwards"});Io(_)}}),s.jsx(bl.Slot,{scope:r,children:s.jsx(lt.ol,{tabIndex:-1,...o,ref:p})}),y&&s.jsx(ki,{ref:m,onFocusFromOutsideViewport:()=>{const _=x({tabbingDirection:"backwards"});Io(_)}})]})});of.displayName=nf;var lf="ToastFocusProxy",ki=d.forwardRef((e,t)=>
16{const{__scopeToast:r,onFocusFromOutsideViewport:a,...n}=e,o=Jn(lf,r);return s.jsx(Yi,{"aria-hidden":!0,tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const l=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(l))&&a()}})});ki.displayName=lf;var Fa="Toast",$w="toast.swipeStart",Bw="toast.swipeMove",zw="toast.swipeCancel",Hw="toast.swipeEnd",cf=d.forwardRef((e,t)=>{const{forceMount:r,open:a,defaultOpen:n,onOpenChange:o,...i}=e,[l,c]=Ki({prop:a,defaultProp:n??!0,onChange:o,caller:Fa});return s.jsx(Zi,{present:r||l,children:s.jsx(qw,{open:l,...i,ref:t,onClose:()=>c(!1),onPause:va(e.onPause),onResume:va(e.onResume),onSwipeStart:pt(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:pt(e.onSwipeMove,u=>{const{x:m,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:pt(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:pt(e.onSwipeEnd,u=>{const{x:m,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});cf.displayName=Fa;var[Uw,Vw]=rf(Fa,{onClose(){}}),qw=d.forwardRef((e,t)=>{const{__scopeToast:r,type:a="foreground",duration:n,open:o,onClose:i,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:m,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:f,...y}=e,x=Jn(Fa,r),[_,b]=d.useState(null),E=Es(t,I=>b(I)),v=d.useRef(null),w=d.useRef(null),N=n||x.duration,C=d.useRef(0),j=d.useRef(N),k=d.useRef(0),{onToastAdd:S,onToastRemove:T}=x,M=va(()=>{var z;(_==null?void 0:_.contains(document.activeElement))&&((z=x.viewport)==null||z.focus()),i()}),P=d.useCallback(I=>{!I||I===1/0||(window.clearTimeout(k.current),C.current=new Date().getTime(),k.current=window.setTimeout(M,I))},[M]);d.useEffect(()=>{const I=x.viewport;if(I){const z=()=>{P(j.current),u==null||u()},L=()=>{const me=new Date().getTime()-C.current;j.current=j.current-me,window.clearTimeout(k.current),c==null||c()};return I.addEventListener(_i,L),I.addEventListener(ji,z),()=>{I.removeEventListener(_i,L),I.removeEventListener(ji,z)}}},[x.viewport,N,c,u,P]),d.useEffect(()=>{o&&!x.isClosePausedRef.current&&P(N)},[o,N,x.isClosePausedRef,P]),d.useEffect(()=>(S(),()=>T()),[S,T]);const A=d.useMemo(()=>_?gf(_):null,[_]);return x.viewport?s.jsxs(s.Fragment,{children:[A&&s.jsx(Ww,{__scopeToast:r,role:"status","aria-live":a==="foreground"?"assertive":"polite","aria-atomic":!0,children:A}),s.jsx(Uw,{scope:r,onClose:M,children:Gu.createPortal(s.jsx(bl.ItemSlot,{scope:r,children:s.jsx(ag,{asChild:!0,onEscapeKeyDown:pt(l,()=>{x.isFocusedToastEscapeKeyDownRef.current||M(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(lt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":x.swipeDirection,...y,ref:E,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:pt(e.onKeyDown,I=>{I.key==="Escape"&&(l==null||l(I.nativeEvent),I.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:pt(e.onPointerDown,I=>{I.button===0&&(v.current={x:I.clientX,y:I.clientY})}),onPointerMove:pt(e.onPointerMove,I=>{if(!v.current)return;const z=I.clientX-v.current.x,L=I.clientY-v.current.y,me=!!w.current,$=["left","right"].includes(x.swipeDirection),g=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,X=$?g(0,z):0,de=$?0:g(0,L),re=I.pointerType==="touch"?10:2,D={x:X,y:de},H={originalEvent:I,delta:D};me?(w.current=D,Ja(Bw,h,H,{discrete:!1})):id(D,x.swipeDirection,re)?(w.current=D,Ja($w,m,H,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(z)>re||Math.abs(L)>re)&&(v.current=null)}),onPointerUp:pt(e.onPointerUp,I=>{const z=w.current,L=I.target;if(L.hasPointerCapture(I.pointerId)&&L.releasePointerCapture(I.pointerId),w.current=null,v.current=null,z){const me=I.currentTarget,$={originalEvent:I,delta:z};id(z,x.swipeDirection,x.swipeThreshold)?Ja(Hw,f,$,{discrete:!0}):Ja(zw,p,$,{discrete:!0}),me.addEventListener("click",g=>g.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),Ww=e=>{const{__scopeToast:t,children:r,...a}
16=e,n=Jn(Fa,t),[o,i]=d.useState(!1),[l,c]=d.useState(!1);return Kw(()=>i(!0)),d.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:s.jsx(ng,{asChild:!0,children:s.jsx(Yi,{...a,children:o&&s.jsxs(s.Fragment,{children:[n.label," ",r]})})})},Gw="ToastTitle",df=d.forwardRef((e,t)=>{const{__scopeToast:r,...a}=e;return s.jsx(lt.div,{...a,ref:t})});df.displayName=Gw;var Yw="ToastDescription",uf=d.forwardRef((e,t)=>{const{__scopeToast:r,...a}=e;return s.jsx(lt.div,{...a,ref:t})});uf.displayName=Yw;var mf="ToastAction",ff=d.forwardRef((e,t)=>{const{altText:r,...a}=e;return r.trim()?s.jsx(pf,{altText:r,asChild:!0,children:s.jsx(yl,{...a,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${mf}\`. Expected non-empty \`string\`.`),null)});ff.displayName=mf;var hf="ToastClose",yl=d.forwardRef((e,t)=>{const{__scopeToast:r,...a}=e,n=Vw(hf,r);return s.jsx(pf,{asChild:!0,children:s.jsx(lt.button,{type:"button",...a,ref:t,onClick:pt(e.onClick,n.onClose)})})});yl.displayName=hf;var pf=d.forwardRef((e,t)=>{const{__scopeToast:r,altText:a,...n}=e;return s.jsx(lt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":a||void 0,...n,ref:t})});function gf(e){const t=[];return Array.from(e.childNodes).forEach(a=>{if(a.nodeType===a.TEXT_NODE&&a.textContent&&t.push(a.textContent),Zw(a)){const n=a.ariaHidden||a.hidden||a.style.display==="none",o=a.dataset.radixToastAnnounceExclude==="";if(!n)if(o){const i=a.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...gf(a))}}),t}function Ja(e,t,r,{discrete:a}){const n=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),a?og(n,o):n.dispatchEvent(o)}var id=(e,t,r=0)=>{const a=Math.abs(e.x),n=Math.abs(e.y),o=a>n;return t==="left"||t==="right"?o&&a>r:!o&&n>r};function Kw(e=()=>{}){const t=va(e);_n(()=>{let r=0,a=0;return r=window.requestAnimationFrame(()=>a=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(a)}},[t])}function Zw(e){return e.nodeType===e.ELEMENT_NODE}function Qw(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const n=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||n?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Io(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Xw=af,xf=of,bf=cf,yf=df,vf=uf,wf=ff,_f=yl;const ld=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cd=Zu,hr=(e,t)=>r=>{var a;if((t==null?void 0:t.variants)==null)return cd(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:o}=t,i=Object.keys(n).map(u=>{const m=r==null?void 0:r[u],h=o==null?void 0:o[u];if(m===null)return null;const p=ld(m)||ld(h);return n[u][p]}),l=r&&Object.entries(r).reduce((u,m)=>{let[h,p]=m;return p===void 0||(u[h]=p),u},{}),c=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((u,m)=>{let{class:h,className:p,...f}=m;return Object.entries(f).every(y=>{let[x,_]=y;return Array.isArray(_)?_.includes({...o,...l}[x]):{...o,...l}[x]===_})?[...u,h,p]:u},[]);return cd(e,i,c,r==null?void 0:r.class,r==null?void 0:r.className)};/** 17 * @license lucide-react v0.462.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const Jw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jf=(...e)=>e.filter((t,r,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===r).join(" ").trim();/** 22 * @license lucide-react v0.462.0 - ISC 23 * 24 * This source code is licensed under the ISC license. 25 * See the LICENSE file in the root directory of this source tree. 26 */var e2={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"};/** 27 * @license lucide-react v0.462.0 - ISC 28 * 29 * This source code is licensed under the ISC license. 30 * See the LICENSE file in the root directory of this source tree. 31 */const t2=d.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:n="",children:o,iconNode:i,...l},c)=>d.createElement("svg",{ref:c,...e2,width:t,height:t,stroke:e,strokeWidth:a?Number(r)*24/Number(t):r,className:jf("lucide",n),...l},[...i.map(([u,m])=>d.createElement(u,m)),...Array.isArray(o)?o:[o]]));/** 32 * @license lucide-react v0.462.0 - ISC 33 * 34 * This source code is licensed under the ISC license. 35 * See the LICENSE file in the root directory of this source tree. 36 */const V=(e,t)=>{const r=d.forwardRef(({className:a,...n},o)=>d.createElement(t2,{ref:o,iconNode:t,className:jf(`lucide-${Jw(e)}`,a),...n}));return r.displayName=`${e}`,r};/** 37 * @license lucide-react v0.462.0 - ISC 38 * 39 * This source code is licensed under the ISC license. 40 * See the LICENSE file in the root directory of this source tree. 41 */const dd=V("AirVent",[["path",{d:"M6 12H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"larmp2"}],["path",{d:"M6 8h12",key:"6g4wlu"}],["path",{d:"M18.3 17.7a2.5 2.5 0 0 1-3.16 3.83 2.53 2.53 0 0 1-1.14-2V12",key:"1bo8pg"}],["path",{d:"M6.6 15.6A2 2 0 1 0 10 17v-5",key:"t9h90c"}]]);/** 42 * @license lucide-react v0.462.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const ka=V("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);/** 47 * @license lucide-react v0.462.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */const eo=V("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 52 * @license lucide-react v0.462.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const cs=V("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 57 * @license lucide-react v0.462.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const s2=V("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** 62 * @license lucide-react v0.462.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const ud=V("Bath",[["path",{d:"M10 4 8 6",key:"1rru8s"}],["path",{d:"M17 19v2",key:"ts1sot"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M7 19v2",key:"12npes"}],["path",{d:"M9 5 7.621 3.621A2.121 2.121 0 0 0 4 5v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5",key:"14ym8i"}]]);/** 67 * @license lucide-react v0.462.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const vl=V("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"}]]);/** 72 * @license lucide-react v0.462.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const wl=V("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** 77 * @license lucide-react v0.462.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const to=V("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/** 82 * @license lucide-react v0.462.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const r2=V("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}
86],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/** 87 * @license lucide-react v0.462.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const sr=V("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 92 * @license lucide-react v0.462.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const _l=V("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/** 97 * @license lucide-react v0.462.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const a2=V("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/** 102 * @license lucide-react v0.462.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const n2=V("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** 107 * @license lucide-react v0.462.0 - ISC 108 * 109 * This source code is licensed under the ISC license. 110 * See the LICENSE file in the root directory of this source tree. 111 */const Er=V("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/** 112 * @license lucide-react v0.462.0 - ISC 113 * 114 * This source code is licensed under the ISC license. 115 * See the LICENSE file in the root directory of this source tree. 116 */const so=V("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 117 * @license lucide-react v0.462.0 - ISC 118 * 119 * This source code is licensed under the ISC license. 120 * See the LICENSE file in the root directory of this source tree. 121 */const kf=V("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 122 * @license lucide-react v0.462.0 - ISC 123 * 124 * This source code is licensed under the ISC license. 125 * See the LICENSE file in the root directory of this source tree. 126 */const Zs=V("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 127 * @license lucide-react v0.462.0 - ISC 128 * 129 * This source code is licensed under the ISC license. 130 * See the LICENSE file in the root directory of this source tree. 131 */const o2=V("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 132 * @license lucide-react v0.462.0 - ISC 133 * 134 * This source code is licensed under the ISC license. 135 * See the LICENSE file in the root directory of this source tree. 136 */const Nf=V("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 137 * @license lucide-react v0.462.0 - ISC 138 * 139 * This source code is licensed under the ISC license. 140 * See the LICENSE file in the root directory of this source tree. 141 */const jl=V("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 142 * @license lucide-react v0.462.0 - ISC 143 * 144 * This source code is licensed under the ISC license. 145 * See the LICENSE file in the root directory of this source tree. 146 */const i2=V("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 147 * @license lucide-react v0.462.0 - ISC 148 * 149 * This source code is licensed under the ISC license. 150 * See the LICENSE file in the root directory of this source tree. 151 */const yn=V("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 152 * @license lucide-react v0.462.0 - ISC 153 * 154 * This source code is licensed under the ISC license. 155 * See the LICENSE file in the root directory of this source tree. 156 */const l2=V("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 157 * @license lucide-react v0.462.0 - ISC 158 * 159 * This source code is licensed under the ISC license. 160 * See the LICENSE file in the root directory of this source tree. 161 */const Ni=V("CircleX",[["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"}]]);/** 162 * @license lucide-react v0.462.0 - ISC 163 * 164 * This source code is licensed under the ISC license. 165 * See the LICENSE file in the root directory of this source tree. 166 */const c2=V("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 167 * @license lucide-react v0.462.0 - ISC 168 * 169 * This source code is licensed under the ISC license. 170 * See the LICENSE file in the root directory of this source tree.
171 */const ba=V("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"}]]);/** 172 * @license lucide-react v0.462.0 - ISC 173 * 174 * This source code is licensed under the ISC license. 175 * See the LICENSE file in the root directory of this source tree. 176 */const kl=V("ClipboardList",[["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:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/** 177 * @license lucide-react v0.462.0 - ISC 178 * 179 * This source code is licensed under the ISC license. 180 * See the LICENSE file in the root directory of this source tree. 181 */const Nl=V("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 182 * @license lucide-react v0.462.0 - ISC 183 * 184 * This source code is licensed under the ISC license. 185 * See the LICENSE file in the root directory of this source tree. 186 */const d2=V("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"}]]);/** 187 * @license lucide-react v0.462.0 - ISC 188 * 189 * This source code is licensed under the ISC license. 190 * See the LICENSE file in the root directory of this source tree. 191 */const md=V("Dog",[["path",{d:"M11.25 16.25h1.5L12 17z",key:"w7jh35"}],["path",{d:"M16 14v.5",key:"1lajdz"}],["path",{d:"M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309",key:"u7s9ue"}],["path",{d:"M8 14v.5",key:"1nzgdb"}],["path",{d:"M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5",key:"v8hric"}]]);/** 192 * @license lucide-react v0.462.0 - ISC 193 * 194 * This source code is licensed under the ISC license. 195 * See the LICENSE file in the root directory of this source tree. 196 */const u2=V("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** 197 * @license lucide-react v0.462.0 - ISC 198 * 199 * This source code is licensed under the ISC license. 200 * See the LICENSE file in the root directory of this source tree. 201 */const m2=V("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);/** 202 * @license lucide-react v0.462.0 - ISC 203 * 204 * This source code is licensed under the ISC license. 205 * See the LICENSE file in the root directory of this source tree. 206 */const fd=V("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/** 207 * @license lucide-react v0.462.0 - ISC 208 * 209 * This source code is licensed under the ISC license. 210 * See the LICENSE file in the root directory of this source tree. 211 */const en=V("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"}]]);/** 212 * @license lucide-react v0.462.0 - ISC 213 * 214 * This source code is licensed under the ISC license. 215 * See the LICENSE file in the root directory of this source tree. 216 */const ya=V("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 217 * @license lucide-react v0.462.0 - ISC 218 * 219 * This source code is licensed under the ISC license. 220 * See the LICENSE file in the root directory of this source tree. 221 */const or=V("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 222 * @license lucide-react v0.462.0 - ISC 223 * 224 * This source code is licensed under the ISC license. 225 * See the LICENSE file in the root directory of this source tree. 226 */const Si=V("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 227 * @license lucide-react v0.462.0 - ISC 228 * 229 * This source code is licensed under the ISC license. 230 * See the LICENSE file in the root directory of this source tree. 231 */const Sl=V("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"}]]);/** 232 * @license lucide-react v0.462.0 - ISC 233 * 234 * This source code is licensed under the ISC license. 235 * See the LICENSE file in the root directory of this source tree. 236 */const f2=V("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** 237 * @license lucide-react v0.462.0 - ISC 238 * 239 * This source code is licensed under the ISC license. 240 * See the LICENSE file in the root directory of this source tree. 241 */const hd=V("Footprints",[["path",{d:"M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z",key:"1dudjm"}],["path",{d:"M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z",key:"l2t8xc"}],["path",{d:"M16 17h4",key:"1dejxt"}],["path",{d:"M4 13h4",key:"1bwh8b"}]]);/** 242 * @license lucide-react v0.462.0 - ISC 243 * 244 * This source code is licensed under the ISC license. 245 * See the LICENSE file in the root directory of this source tree. 246 */const h2=V("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"}]]);/** 247 * @license lucide-react v0.462.0 - ISC 248 * 249 * This source code is licensed under the ISC license. 250 * See the LICENSE file in the root directory of this source tree. 251 */const Sf=V("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** 252 * @license lucide-react v0.462.0 - ISC 253 * 254 * This source code is licensed under the ISC license. 255 * See the LICENSE file in the root directory of this source tree. 256 */const ro=V("Handshake",[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]]);/** 257 * @license lucide-react v0.462.0 - ISC 258 * 259 * This source code is licensed under the ISC license. 260 * See the LICENSE file in the root directory of this source tree. 261 */const p2=V("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/** 262 * @license lucide-react v0.462.0 - ISC 263 * 264 * This source code is licensed under the ISC license. 265 * See the LICENSE file in the root directory of this source tree. 266 */const Gs=V("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** 267 * @license lucide-react v0.462.0 - ISC 268 * 269 * This source code is licensed under the ISC license. 270 * See the LICENSE file in the root directory of this source tree.
271 */const g2=V("Heater",[["path",{d:"M11 8c2-3-2-3 0-6",key:"1ldv5m"}],["path",{d:"M15.5 8c2-3-2-3 0-6",key:"1otqoz"}],["path",{d:"M6 10h.01",key:"1lbq93"}],["path",{d:"M6 14h.01",key:"zudwn7"}],["path",{d:"M10 16v-4",key:"1c25yv"}],["path",{d:"M14 16v-4",key:"1dkbt8"}],["path",{d:"M18 16v-4",key:"1yg9me"}],["path",{d:"M20 6a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3",key:"1ubg90"}],["path",{d:"M5 20v2",key:"1abpe8"}],["path",{d:"M19 20v2",key:"kqn6ft"}]]);/** 272 * @license lucide-react v0.462.0 - ISC 273 * 274 * This source code is licensed under the ISC license. 275 * See the LICENSE file in the root directory of this source tree. 276 */const ns=V("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 277 * @license lucide-react v0.462.0 - ISC 278 * 279 * This source code is licensed under the ISC license. 280 * See the LICENSE file in the root directory of this source tree. 281 */const x2=V("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);/** 282 * @license lucide-react v0.462.0 - ISC 283 * 284 * This source code is licensed under the ISC license. 285 * See the LICENSE file in the root directory of this source tree. 286 */const Cf=V("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 287 * @license lucide-react v0.462.0 - ISC 288 * 289 * This source code is licensed under the ISC license. 290 * See the LICENSE file in the root directory of this source tree. 291 */const Ci=V("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"}]]);/** 292 * @license lucide-react v0.462.0 - ISC 293 * 294 * This source code is licensed under the ISC license. 295 * See the LICENSE file in the root directory of this source tree. 296 */const Cl=V("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"}]]);/** 297 * @license lucide-react v0.462.0 - ISC 298 * 299 * This source code is licensed under the ISC license. 300 * See the LICENSE file in the root directory of this source tree. 301 */const Ei=V("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"}]]);/** 302 * @license lucide-react v0.462.0 - ISC 303 * 304 * This source code is licensed under the ISC license. 305 * See the LICENSE file in the root directory of this source tree. 306 */const Ef=V("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/** 307 * @license lucide-react v0.462.0 - ISC 308 * 309 * This source code is licensed under the ISC license. 310 * See the LICENSE file in the root directory of this source tree. 311 */const qt=V("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 312 * @license lucide-react v0.462.0 - ISC 313 * 314 * This source code is licensed under the ISC license. 315 * See the LICENSE file in the root directory of this source tree. 316 */const b2=V("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);/** 317 * @license lucide-react v0.462.0 - ISC 318 * 319 * This source code is licensed under the ISC license. 320 * See the LICENSE file in the root directory of this source tree.
321 */const It=V("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"}]]);/** 322 * @license lucide-react v0.462.0 - ISC 323 * 324 * This source code is licensed under the ISC license. 325 * See the LICENSE file in the root directory of this source tree. 326 */const El=V("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** 327 * @license lucide-react v0.462.0 - ISC 328 * 329 * This source code is licensed under the ISC license. 330 * See the LICENSE file in the root directory of this source tree. 331 */const $a=V("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"}]]);/** 332 * @license lucide-react v0.462.0 - ISC 333 * 334 * This source code is licensed under the ISC license. 335 * See the LICENSE file in the root directory of this source tree. 336 */const ao=V("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 337 * @license lucide-react v0.462.0 - ISC 338 * 339 * This source code is licensed under the ISC license. 340 * See the LICENSE file in the root directory of this source tree. 341 */const $s=V("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 342 * @license lucide-react v0.462.0 - ISC 343 * 344 * This source code is licensed under the ISC license. 345 * See the LICENSE file in the root directory of this source tree. 346 */const Af=V("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** 347 * @license lucide-react v0.462.0 - ISC 348 * 349 * This source code is licensed under the ISC license. 350 * See the LICENSE file in the root directory of this source tree. 351 */const y2=V("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** 352 * @license lucide-react v0.462.0 - ISC 353 * 354 * This source code is licensed under the ISC license. 355 * See the LICENSE file in the root directory of this source tree. 356 */const v2=V("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"}]]);/** 357 * @license lucide-react v0.462.0 - ISC 358 * 359 * This source code is licensed under the ISC license. 360 * See the LICENSE file in the root directory of this source tree. 361 */const no=V("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 362 * @license lucide-react v0.462.0 - ISC 363 * 364 * This source code is licensed under the ISC license. 365 * See the LICENSE file in the root directory of this source tree. 366 */const w2=V("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** 367 * @license lucide-react v0.462.0 - ISC 368 * 369 * This source code is licensed under the ISC license. 370 * See the LICENSE file in the root directory of this source tree. 371 */const _2=V("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/** 372 * @license lucide-react v0.462.0 - ISC 373 * 374 * This source code is licensed under the ISC license. 375 * See the LICENSE file in the root directory of this source tree. 376 */const j2=V("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/** 377 * @license lucide-react v0.462.0 - ISC 378 * 379 * This source code is licensed under the ISC license. 380 * See the LICENSE file in the root directory of this source tree. 381 */const Tf=V("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 382 * @license lucide-react v0.462.0 - ISC 383 * 384 * This source code is licensed under the ISC license. 385 * See the LICENSE file in the root directory of this source tree. 386 */const Rf=V("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 387 * @license lucide-react v0.462.0 - ISC 388 * 389 * This source code is licensed under the ISC license. 390 * See the LICENSE file in the root directory of this source tree. 391 */const k2=V("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 392 * @license lucide-react v0.462.0 - ISC 393 * 394 * This source code is licensed under the ISC license. 395 * See the LICENSE file in the root directory of this source tree. 396 */const N2=V("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** 397 * @license lucide-react v0.462.0 - ISC 398 * 399 * This source code is licensed under the ISC license. 400 * See the LICENSE file in the root directory of this source tree. 401 */const S2=V("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"}]]);/** 402 * @license lucide-react v0.462.0 - ISC 403 * 404 * This source code is licensed under the ISC license. 405 * See the LICENSE file in the root directory of this source tree. 406 */const C2=V("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** 407 * @license lucide-react v0.462.0 - ISC 408 * 409 * This source code is licensed under the ISC license. 410 * See the LICENSE file in the root directory of this source tree. 411 */const Pf=V("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 412 * @license lucide-react v0.462.0 - ISC 413 * 414 * This source code is licensed under the ISC license. 415 * See the LICENSE file in the root directory of this source tree. 416 */const E2=V("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"}]]);/** 417 * @license lucide-react v0.462.0 - ISC 418 * 419 * This source code is licensed under the ISC license. 420 * See the LICENSE file in the root directory of this source tree. 421 */const A2=V("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"}]]);/** 422 * @license lucide-react v0.462.0 - ISC 423 * 424 * This source code is licensed under the ISC license. 425 * See the LICENSE file in the root directory of this source tree. 426 */const Ai=V("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
426y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 427 * @license lucide-react v0.462.0 - ISC 428 * 429 * This source code is licensed under the ISC license. 430 * See the LICENSE file in the root directory of this source tree. 431 */const Ba=V("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 432 * @license lucide-react v0.462.0 - ISC 433 * 434 * This source code is licensed under the ISC license. 435 * See the LICENSE file in the root directory of this source tree. 436 */const T2=V("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 437 * @license lucide-react v0.462.0 - ISC 438 * 439 * This source code is licensed under the ISC license. 440 * See the LICENSE file in the root directory of this source tree. 441 */const Mo=V("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 442 * @license lucide-react v0.462.0 - ISC 443 * 444 * This source code is licensed under the ISC license. 445 * See the LICENSE file in the root directory of this source tree. 446 */const If=V("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** 447 * @license lucide-react v0.462.0 - ISC 448 * 449 * This source code is licensed under the ISC license. 450 * See the LICENSE file in the root directory of this source tree. 451 */const R2=V("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"}]]);/** 452 * @license lucide-react v0.462.0 - ISC 453 * 454 * This source code is licensed under the ISC license. 455 * See the LICENSE file in the root directory of this source tree. 456 */const pd=V("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/** 457 * @license lucide-react v0.462.0 - ISC 458 * 459 * This source code is licensed under the ISC license. 460 * See the LICENSE file in the root directory of this source tree. 461 */const P2=V("Trash2",[["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"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 462 * @license lucide-react v0.462.0 - ISC 463 * 464 * This source code is licensed under the ISC license. 465 * See the LICENSE file in the root directory of this source tree. 466 */const pa=V("Trees",[["path",{d:"M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z",key:"1l6gj6"}],["path",{d:"M7 16v6",key:"1a82de"}],["path",{d:"M13 19v3",key:"13sx9i"}],["path",{d:"M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5",key:"1sj9kv"}]]);/** 467 * @license lucide-react v0.462.0 - ISC 468 * 469 * This source code is licensed under the ISC license. 470 * See the LICENSE file in the root directory of this source tree. 471 */const I2=V("UserCheck",[["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"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** 472 * @license lucide-react v0.462.0 - ISC 473 * 474 * This source code is licensed under the ISC license. 475 * See the LICENSE file in the root directory of this source tree. 476 */const Al=V("UserPlus",[["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"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 477 * @license lucide-react v0.462.0 - ISC 478 * 479 * This source code is licensed under the ISC license. 480 * See the LICENSE file in the root directory of this source tree. 481 */const pr=V("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"}]]);/** 482 * @license lucide-react v0.462.0 - ISC 483 * 484 * This source code is licensed under the ISC license. 485 * See the LICENSE file in the root directory of this source tree. 486 */const kt=V("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"}]]);/** 487 * @license lucide-react v0.462.0 - ISC 488 * 489 * This source code is licensed under the ISC license. 490 * See the LICENSE file in the root directory of this source tree. 491 */const M2=V("Warehouse",[["path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z",key:"gksnxg"}],["path",{d:"M6 18h12",key:"9pbo8z"}],["path",{d:"M6 14h12",key:"4cwo0f"}],["rect",{width:"12",height:"12",x:"6",y:"10",key:"apd30q"}]]);/** 492 * @license lucide-react v0.462.0 - ISC 493 * 494 * This source code is licensed under the ISC license. 495 * See the LICENSE file in the root directory of this source tree. 496 */const Mf=V("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}
vendor: 8,331 bytes, lines 496-506
496],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/** 497 * @license lucide-react v0.462.0 - ISC 498 * 499 * This source code is licensed under the ISC license. 500 * See the LICENSE file in the root directory of this source tree. 501 */const Mt=V("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 502 * @license lucide-react v0.462.0 - ISC 503 * 504 * This source code is licensed under the ISC license. 505 * See the LICENSE file in the root directory of this source tree. 506 */const L2=V("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]),Tl="-",O2=e=>{const t=F2(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:i=>{const l=i.split(Tl);return l[0]===""&&l.length!==1&&l.shift(),Lf(l,t)||D2(i)},getConflictingClassGroupIds:(i,l)=>{const c=r[i]||[];return l&&a[i]?[...c,...a[i]]:c}}},Lf=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],a=t.nextPart.get(r),n=a?Lf(e.slice(1),a):void 0;if(n)return n;if(t.validators.length===0)return;const o=e.join(Tl);return(i=t.validators.find(({validator:l})=>l(o)))==null?void 0:i.classGroupId},gd=/^\[(.+)\]$/,D2=e=>{if(gd.test(e)){const t=gd.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},F2=e=>{const{theme:t,prefix:r}=e,a={nextPart:new Map,validators:[]};return B2(Object.entries(e.classGroups),r).forEach(([o,i])=>{Ti(i,a,o,t)}),a},Ti=(e,t,r,a)=>{e.forEach(n=>{if(typeof n=="string"){const o=n===""?t:xd(t,n);o.classGroupId=r;return}if(typeof n=="function"){if($2(n)){Ti(n(a),t,r,a);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([o,i])=>{Ti(i,xd(t,o),r,a)})})},xd=(e,t)=>{let r=e;return t.split(Tl).forEach(a=>{r.nextPart.has(a)||r.nextPart.set(a,{nextPart:new Map,validators:[]}),r=r.nextPart.get(a)}),r},$2=e=>e.isThemeGetter,B2=(e,t)=>t?e.map(([r,a])=>{const n=a.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,l])=>[t+i,l])):o);return[r,n]}):e,z2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,a=new Map;const n=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,a=r,r=new Map)};return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=a.get(o))!==void 0)return n(o,i),i},set(o,i){r.has(o)?r.set(o,i):n(o,i)}}},Of="!",H2=e=>{const{separator:t,experimentalParseClassName:r}=e,a=t.length===1,n=t[0],o=t.length,i=l=>{const c=[];let u=0,m=0,h;for(let _=0;_<l.length;_++){let b=l[_];if(u===0){if(b===n&&(a||l.slice(_,_+o)===t)){c.push(l.slice(m,_)),m=_+o;continue}if(b==="/"){h=_;continue}}b==="["?u++:b==="]"&&u--}const p=c.length===0?l:l.substring(m),f=p.startsWith(Of),y=f?p.substring(1):p,x=h&&h>m?h-m:void 0;return{modifiers:c,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:x}};return r?l=>r({className:l,parseClassName:i}):i},U2=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(a=>{a[0]==="["?(t.push(...r.sort(),a),r=[]):r.push(a)}),t.push(...r.sort()),t},V2=e=>({cache:z2(e.cacheSize),parseClassName:H2(e),...O2(e)}),q2=/\s+/,W2=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:n}=t,o=[],i=e.trim().split(q2);let l="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:m,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:f}=r(u);let y=!!f,x=a(y?p.substring(0,f):p);if(!x){if(!y){l=u+(l.length>0?" "+l:l);continue}if(x=a(p),!x){l=u+(l.length>0?" "+l:l);continue}y=!1}const _=U2(m).join(":"),b=h?_+Of:_,E=b+x;if(o.includes(E))continue;o.push(E);const v=n(x,y);for(let w=0;w<v.length;++w){const N=v[w];o.push(b+N)}l=u+(l.length>0?" "+l:l)}return l};function G2(){let e=0,t,r,a="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Df(t))&&(a&&(a+=" "),a+=r);return a}const Df=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=Df(e[a]))&&(r&&(r+=" "),r+=t);return r};function Y2(e,...t){let r,a,n,o=i;function i(c){const u=t.reduce((m,h)=>h(m),e());return r=V2(u),a=r.cache.get,n=r.cache.set,o=l,l(c)}function l(c){const u=a(c);if(u)return u;const m=W2(c,r);return n(c,m),m}return function(){return o(G2.apply(null,arguments))}}const ze=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ff=/^\[(?:([a-z-]+):)?(.+)\]$/i,K2=/^\d+\/\d+$/,Z2=new Set(["px","full","screen"]),Q2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,X2=/\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$/,J2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,e1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,t1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bs=e=>Rr(e)||Z2.has(e)||K2.test(e),Ls=e=>Jr(e,"length",c1),Rr=e=>!!e&&!Number.isNaN(Number(e)),Lo=e=>Jr(e,"number",Rr),ra=e=>!!e&&Number.isInteger(Number(e)),s1=e=>e.endsWith("%")&&Rr(e.slice(0,-1)),ke=e=>Ff.test(e),Os=e=>Q2.test(e),r1=new Set(["length","size","percentage"]),a1=e=>Jr(e,r1,$f),n1=e=>Jr(e,"position",$f),o1=new Set(["image","url"]),i1=e=>Jr(e,o1,u1),l1=e=>Jr(e,"",d1),aa=()=>!0,Jr=(e,t,r)=>{const a=Ff.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):r(a[2]):!1},c1=e=>X2.test(e)&&!J2.test(e),$f=()=>!1,d1=e=>e1.test(e),u1=e=>t1.test(e),m1=()=>{const e=ze("colors"),t=ze("spacing"),r=ze("blur"),a=ze("brightness"),n=ze("borderColor"),o=ze("borderRadius"),i=ze("borderSpacing"),l=ze("borderWidth"),c=ze("contrast"),u=ze("grayscale"),m=ze("hueRotate"),h=ze("invert"),p=ze("gap"),f=ze("gradientColorStops"),y=ze("gradientColorStopPositions"),x=ze("inset"),_=ze("margin"),b=ze("opacity"),E=ze("padding"),v=ze("saturate"),w=ze("scale"),N=ze("sepia"),C=ze("skew"),j=ze("space"),k=ze("translate"),S=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",ke,t],P=()=>[ke,t],A=()=>["",bs,Ls],I=()=>["auto",Rr,ke],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>["start","end","center","between","around","evenly","stretch"],g=()=>["","0",ke],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],de=()=>[Rr,ke];return{cacheSize:500,separator:":",theme:{colors:[aa],spacing:[bs,Ls],blur:["none","",Os,ke],brightness:de(),borderColor:[e],borderRadius:["none","","full",Os,ke],borderSpacing:P(),borderWidth:A(),contrast:de(),grayscale:g(),hueRotate:de(),invert:g(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[s1,Ls],inset:M(),margin:M(),opacity:de(),padding:P(),saturate:de(),scale:de(),sepia:g(),skew:de(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",ke]}],container:["container"],columns:[{columns:[Os]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"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:[...z(),ke]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}
vendor: 9,951 bytes, line 506
506],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ra,ke]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ke]}],grow:[{grow:g()}],shrink:[{shrink:g()}],order:[{order:["first","last","none",ra,ke]}],"grid-cols":[{"grid-cols":[aa]}],"col-start-end":[{col:["auto",{span:["full",ra,ke]},ke]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[aa]}],"row-start-end":[{row:["auto",{span:[ra,ke]},ke]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ke]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ke]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...$()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ke,t]}],"min-w":[{"min-w":[ke,t,"min","max","fit"]}],"max-w":[{"max-w":[ke,t,"none","full","min","max","fit","prose",{screen:[Os]},Os]}],h:[{h:[ke,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ke,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ke,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Os,Ls]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Lo]}],"font-family":[{font:[aa]}],"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-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ke]}],"line-clamp":[{"line-clamp":["none",Rr,Lo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",bs,ke]}],"list-image":[{"list-image":["none",ke]}],"list-style-type":[{list:["none","disc","decimal",ke]}],"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:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",bs,Ls]}],"underline-offset":[{"underline-offset":["auto",bs,ke]}],"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:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke]}],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",ke]}],"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:[...z(),n1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",a1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},i1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],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:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:L()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[bs,ke]}],"outline-w":[{outline:[bs,Ls]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[bs,Ls]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Os,l1]}],"shadow-color":[{shadow:[aa]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...me(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":me()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[a]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Os,ke]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[h]}],saturate:[{saturate:[v]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ke]}],duration:[{duration:de()}],ease:[{ease:["linear","in","out","in-out",ke]}],delay:[{delay:de()}],animate:[{animate:["none","spin","ping","pulse","bounce",ke]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[ra,ke]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ke]}],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",ke]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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"]}
506],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",ke]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[bs,Ls,Lo]}],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"]}}},f1=Y2(m1);function F(...e){return f1(Zu(e))}const h1=Xw,Bf=d.forwardRef(({className:e,...t},r)=>s.jsx(xf,{ref:r,className:F("fixed bottom-0 z-[100] flex max-h-screen w-full flex-col p-4 sm:right-0 sm:flex-col md:max-w-[420px]",e),...t}));Bf.displayName=xf.displayName;const p1=hr("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),zf=d.forwardRef(({className:e,variant:t,...r},a)=>s.jsx(bf,{ref:a,className:F(p1({variant:t}),e),...r}));zf.displayName=bf.displayName;const g1=d.forwardRef(({className:e,...t},r)=>s.jsx(wf,{ref:r,className:F("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));g1.displayName=wf.displayName;const Hf=d.forwardRef(({className:e,...t},r)=>s.jsx(_f,{ref:r,className:F("absolute right-2 top-2 rounded-md p-1 text-foreground
506/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(Mt,{className:"h-4 w-4"})}));Hf.displayName=_f.displayName;const Uf=d.forwardRef(({className:e,...t},r)=>s.jsx(yf,{ref:r,className:F("text-sm font-semibold",e),...t}));Uf.displayName=yf.displayName;const Vf=d.forwardRef(({className:e,...t},r)=>s.jsx(vf,{ref:r,className:F("text-sm opacity-90",e),...t}));Vf.displayName=vf.displayName;function x1(){const{toasts:e}=At();return s.jsxs(h1,{swipeDirection:"right",children:[e.map(function({id:t,title:r,description:a,action:n,...o}){return s.jsxs(zf,{...o,children:[s.jsxs("div",{className:"grid gap-1",children:[r&&s.jsx(Uf,{children:r}),a&&s.jsx(Vf,{children:a})]}),n,s.jsx(Hf,{})]},t)}),s.jsx(Bf,{})]})}var bd=["light","dark"],b1="(prefers-color-scheme: dark)",y1=d.createContext(void 0),v1={setTheme:e=>{},themes:[]},w1=()=>{var e;return(e=d.useContext(y1))!=null?e:v1};d.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:a,enableColorScheme:n,defaultTheme:o,value:i,attrs:l,nonce:c})=>{let u=o==="system",m=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=n?bd.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(y,x=!1,_=!0)=>{let b=i?i[y]:y,E=x?y+"|| ''":`'${b}'`,v="";return n&&_&&!x&&bd.includes(y)&&(v+=`d.style.colorScheme = '${y}';`),r==="class"?x||b?v+=`c.add(${E})`:v+="null":b&&(v+=`d[s](n,${E})`),v},f=e?`!function(){${m}${p(e)}}()`:a?`!function(){try{${m}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${b1}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}${u?"":"else{"+p(o,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${m}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}else{${p(o,!1,!1)};}${h}}catch(t){}}();`;return d.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:f}})});var _1=e=>{switch(e){case"success":return N1;case"info":return C1;case"warning":return S1;case"error":return E1;default:return null}},j1=Array(12).fill(0),k1=({visible:e,className:t})=>q.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},q.createElement("div",{className:"sonner-spinner"},j1.map((r,a)=>q.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),N1=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},q.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),S1=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},q.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),C1=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},q.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),E1=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},q.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),A1=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},q.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),q.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),T1=()=>{let[e,t]=q.useState(document.hidden);return q.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Ri=1,R1=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
506{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...a}=e,n=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Ri++,o=this.toasts.find(l=>l.id===n),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),o?this.toasts=this.toasts.map(l=>l.id===n?(this.publish({...l,...e,id:n,title:r}),{...l,...e,id:n,dismissible:i,title:r}):l):this.addToast({title:r,...a,dismissible:i,id:n}),n},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
506this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let a=e instanceof Promise?e:e(),n=r!==void 0,o,i=a.then(async c=>{if(o=["resolve",c],q.isValidElement(c))n=!1,this.create({id:r,type:"default",message:c});else if(I1(c)&&!c.ok){n=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:r,type:"error",message:u,description:m})}else if(t.success!==void 0){n=!1;let u=typeof t.success=="function"?await t.success(c):t.success,m=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"success",message:u,description:m})}}).catch(async c=>{if(o=["reject",c],t.error!==void 0){n=!1;let u=typeof t.error=="function"?await t.error(c):t.error,m=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"error",message:u,description:m})}}).finally(()=>{var c;n&&(this.dismiss(r),r=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>i.then(()=>o[0]==="reject"?u(o[1]):c(o[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Ri++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},jt=new R1,P1=(e,t)=>{let r=(t==null?void 0:t.id)||Ri++;return jt.addToast({title:e,...t,id:r}),r},I1=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",M1=P1,L1=()=>jt.toasts,O1=()=>jt.getActiveToasts(),m3=Object.assign(M1,{success:jt.success,info:jt.info,warning:jt.warning,error:jt.error,custom:jt.custom,message:jt.message,promise:jt.promise,dismiss:jt.dismiss,loading:jt.loading},{getHistory:L1,getToasts:O1});function D1(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",t==="top"&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}D1(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
506left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
506:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
506--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 507`);function tn(e){return e.label!==void 0}var F1=3,$1="32px",B1="16px",yd=4e3,z1=356,H1=14,U1=20,V1=200;function Qt(...e){return e.filter(Boolean).join(" ")}function q1(e){let[t,r]=e.split("-"),a=[];return t&&a.push(t),r&&a.push(r),a}var W1=e=>{var t,r,a,n,o,i,l,c,u,m,h;let{invert:p,toast:f,unstyled:y,interacting:x,setHeights:_,visibleToasts:b,heights:E,index:v,toasts:w,expanded:N,removeToast:C,defaultRichColors:j,closeButton:k,style:S,cancelButtonStyle:T,actionButtonStyle:M,className:P="",descriptionClassName:A="",duration:I,position:z,gap:L,loadingIcon:me,expandByDefault:$,classNames:g,icons:X,closeButtonAriaLabel:de="Close toast",pauseWhenPageIsHidden:re}=e,[D,H]=q.useState(null),[Z,ee]=q.useState(null),[ae,Y]=q.useState(!1),[te,Se]=q.useState(!1),[Le,fe]=q.useState(!1),[Pe,le]=q.useState(!1),[he,Oe]=q.useState(!1),[tt,K]=q.useState(0),[G,Ce]=q.useState(0),$e=q.useRef(f.duration||I||yd),Qe=q.useRef(null),He=q.useRef(null),Ae=v===0,bt=v+1<=b,De=f.type,ot=f.dismissible!==!1,mt=f.className||"",hs=f.descriptionClassName||"",Ft=q.useMemo(()=>E.findIndex(_e=>_e.toastId===f.id)||0,[E,f.id]),Rs=q.useMemo(()=>{var _e;return(_e=f.closeButton)!=null?_e:k},[f.closeButton,k]),ps=q.useMemo(()=>f.duration||I||yd,[f.duration,I]),ft=q.useRef(0),yt=q.useRef(0),gs=q.useRef(0),Gt=q.useRef(null),[Me,B]=z.split("-"),ge=q.useMemo(()=>E.reduce((_e,Be,Ue)=>Ue>=Ft?_e:_e+Be.height,0),[E,Ft]),xe=T1(),Ne=f.invert||p,ye=De==="loading";yt.current=q.useMemo(()=>Ft*L+ge,[Ft,ge]),q.useEffect(()=>{$e.current=ps},[ps]),q.useEffect(()=>{Y(!0)},[]),q.useEffect(()=>{let _e=He.current;if(_e){let Be=_e.getBoundingClientRect().height;return Ce(Be),_(Ue=>[{toastId:f.id,height:Be,position:f.position},...Ue]),()=>_(Ue=>Ue.filter(Yt=>Yt.toastId!==f.id))}},[_,f.id]),q.useLayoutEffect(()=>{if(!ae)return;let _e=He.current,Be=_e.style.height;_e.style.height="auto";let Ue=_e.getBoundingClientRect().height;_e.style.height=Be,Ce(Ue),_(Yt=>Yt.find(Kt=>Kt.toastId===f.id)?Yt.map(Kt=>Kt.toastId===f.id?{...Kt,height:Ue}:Kt):[{toastId:f.id,height:Ue,position:f.position},...Yt])},[ae,f.title,f.description,_,f.id]);let Ve=q.useCallback(()=>{Se(!0),K(yt.current),_(_e=>_e.filter(Be=>Be.toastId!==f.id)),setTimeout(()=>{C(f)},V1)},[f,C,_,yt]);q.useEffect(()=>{if(f.promise&&De==="loading"||f.duration===1/0||f.type==="loading")return;let _e;return N||x||re&&xe?(()=>{if(gs.current<ft.current){let Be=new Date().getTime()-ft.current;$e.current=$e.current-Be}
507gs.current=new Date().getTime()})():$e.current!==1/0&&(ft.current=new Date().getTime(),_e=setTimeout(()=>{var Be;(Be=f.onAutoClose)==null||Be.call(f,f),Ve()},$e.current)),()=>clearTimeout(_e)},[N,x,f,De,re,xe,Ve]),q.useEffect(()=>{f.delete&&Ve()},[Ve,f.delete]);function Xs(){var _e,Be,Ue;return X!=null&&X.loading?q.createElement("div",{className:Qt(g==null?void 0:g.loader,(_e=f==null?void 0:f.classNames)==null?void 0:_e.loader,"sonner-loader"),"data-visible":De==="loading"},X.loading):me?q.createElement("div",{className:Qt(g==null?void 0:g.loader,(Be=f==null?void 0:f.classNames)==null?void 0:Be.loader,"sonner-loader"),"data-visible":De==="loading"},me):q.createElement(k1,{className:Qt(g==null?void 0:g.loader,(Ue=f==null?void 0:f.classNames)==null?void 0:Ue.loader),visible:De==="loading"})}return q.createElement("li",{tabIndex:0,ref:He,className:Qt(P,mt,g==null?void 0:g.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,g==null?void 0:g.default,g==null?void 0:g[De],(r=f==null?void 0:f.classNames)==null?void 0:r[De]),"data-sonner-toast":"","data-rich-colors":(a=f.richColors)!=null?a:j,"data-styled":!(f.jsx||f.unstyled||y),"data-mounted":ae,"data-promise":!!f.promise,"data-swiped":he,"data-removed":te,"data-visible":bt,"data-y-position":Me,"data-x-position":B,"data-index":v,"data-front":Ae,"data-swiping":Le,"data-dismissible":ot,"data-type":De,"data-invert":Ne,"data-swipe-out":Pe,"data-swipe-direction":Z,"data-expanded":!!(N||$&&ae),style:{"--index":v,"--toasts-before":v,"--z-index":w.length-v,"--offset":`${te?tt:yt.current}px`,"--initial-height":$?"auto":`${G}px`,...S,...f.style},onDragEnd:()=>{fe(!1),H(null),Gt.current=null},onPointerDown:_e=>{ye||!ot||(Qe.current=new Date,K(yt.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(fe(!0),Gt.current={x:_e.clientX,y:_e.clientY}))},onPointerUp:()=>{var _e,Be,Ue,Yt;if(Pe||!ot)return;Gt.current=null;let Kt=Number(((_e=He.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ps=Number(((Be=He.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Js=new Date().getTime()-((Ue=Qe.current)==null?void 0:Ue.getTime()),Zt=D==="x"?Kt:Ps,Is=Math.abs(Zt)/Js;if(Math.abs(Zt)>=U1||Is>.11){K(yt.current),(Yt=f.onDismiss)==null||Yt.call(f,f),ee(D==="x"?Kt>0?"right":"left":Ps>0?"down":"up"),Ve(),le(!0),Oe(!1);return}fe(!1),H(null)},onPointerMove:_e=>{var Be,Ue,Yt,Kt;if(!Gt.current||!ot||((Be=window.getSelection())==null?void 0:Be.toString().length)>0)return;let Ps=_e.clientY-Gt.current.y,Js=_e.clientX-Gt.current.x,Zt=(Ue=e.swipeDirections)!=null?Ue:q1(z);!D&&(Math.abs(Js)>1||Math.abs(Ps)>1)&&H(Math.abs(Js)>Math.abs(Ps)?"x":"y");let Is={x:0,y:0};D==="y"?(Zt.includes("top")||Zt.includes("bottom"))&&(Zt.includes("top")&&Ps<0||Zt.includes("bottom")&&Ps>0)&&(Is.y=Ps):D==="x"&&(Zt.includes("left")||Zt.includes("right"))&&(Zt.includes("left")&&Js<0||Zt.includes("right")&&Js>0)&&(Is.x=Js),(Math.abs(Is.x)>0||Math.abs(Is.y)>0)&&Oe(!0),(Yt=He.current)==null||Yt.style.setProperty("--swipe-amount-x",`${Is.x}px`),(Kt=He.current)==null||Kt.style.setProperty("--swipe-amount-y",`${Is.y}px`)}},Rs&&!f.jsx?q.createElement("button",{"aria-label":de,"data-disabled":ye,"data-close-button":!0,onClick:ye||!ot?()=>{}:()=>{var _e;Ve(),(_e=f.onDismiss)==null||_e.call(f,f)},className:Qt(g==null?void 0:g.closeButton,(n=f==null?void 0:f.classNames)==null?void 0:n.closeButton)},(o=X==null?void 0:X.close)!=null?o:A1):null,f.jsx||d.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:q.createElement(q.Fragment,null,De||f.icon||f.promise?q.createElement("div",{"data-icon":"",className:Qt(g==null?void 0:g.icon,(i=f==null?void 0:f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||Xs():null,f.type!=="loading"?f.icon||(X==null?void 0:X[De])||_1(De):null):null,q.createElement("div",{"data-content":"",className:Qt(g==null?void 0:g.content,(l=f==null?void 0:f.classNames)==null?void 0:l.content)},q.createElement("div",{"data-title":"",className:Qt(g==null?void 0:g.title,(c=f==null?void 0:f.classNames)==null?void 0:c.title)},typeof f.title=="function"?f.title():f.title),f.description?q.createElement("div",{"data-description":"",className:Qt(A,hs,g==null?void 0:g.description,(u=f==null?void 0:f.classNames)==null?void 0:u.description)},typeof f.description=="function"?f.description():f.description):null),d.isValidElement(f.cancel)?f.cancel:f.cancel&&tn(f.cancel)?q.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||T,onClick:_e=>{var Be,Ue;tn(f.cancel)&&ot&&((Ue=(Be=f.cancel).onClick)==null||Ue.call(Be,_e),Ve())},className:Qt(g==null?void 0:g.cancelButton,(m=f==null?void 0:f.classNames)==null?void 0:m.cancelButton)},f.cancel.label):null,d.isValidElement(f.action)?f.action:f.action&&tn(f.action)?q.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||M,onClick:_e=>{var Be,Ue;tn(f.action)&&((Ue=(Be=f.action).onClick)==null||Ue.call(Be,_e),!_e.defaultPrevented&&Ve())},className:Qt(g==null?void 0:g.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};function vd(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function G1(e,t){let r={};return[e,t].forEach((a,n)=>{let o=n===1,i=o?"--mobile-offset":"--offset",l=o?B1:$1;function c(u){["top","right","bottom","left"].forEach(m=>{r[`${i}-${m}`]=typeof u=="number"?`${u}px`:u})}
507typeof a=="number"||typeof a=="string"?c(a):typeof a=="object"?["top","right","bottom","left"].forEach(u=>{a[u]===void 0?r[`${i}-${u}`]=l:r[`${i}-${u}`]=typeof a[u]=="number"?`${a[u]}px`:a[u]}):c(l)}),r}var Y1=d.forwardRef(function(e,t){let{invert:r,position:a="bottom-right",hotkey:n=["altKey","KeyT"],expand:o,closeButton:i,className:l,offset:c,mobileOffset:u,theme:m="light",richColors:h,duration:p,style:f,visibleToasts:y=F1,toastOptions:x,dir:_=vd(),gap:b=H1,loadingIcon:E,icons:v,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:N}=e,[C,j]=q.useState([]),k=q.useMemo(()=>Array.from(new Set([a].concat(C.filter(re=>re.position).map(re=>re.position)))),[C,a]),[S,T]=q.useState([]),[M,P]=q.useState(!1),[A,I]=q.useState(!1),[z,L]=q.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),me=q.useRef(null),$=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=q.useRef(null),X=q.useRef(!1),de=q.useCallback(re=>{j(D=>{var H;return(H=D.find(Z=>Z.id===re.id))!=null&&H.delete||jt.dismiss(re.id),D.filter(({id:Z})=>Z!==re.id)})},[]);return q.useEffect(()=>jt.subscribe(re=>{if(re.dismiss){j(D=>D.map(H=>H.id===re.id?{...H,delete:!0}:H));return}setTimeout(()=>{Ag.flushSync(()=>{j(D=>{let H=D.findIndex(Z=>Z.id===re.id);return H!==-1?[...D.slice(0,H),{...D[H],...re},...D.slice(H+1)]:[re,...D]})})})}),[]),q.useEffect(()=>{if(m!=="system"){L(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;let re=window.matchMedia("(prefers-color-scheme: dark)");try{re.addEventListener("change",({matches:D})=>{L(D?"dark":"light")})}catch{re.addListener(({matches:H})=>{try{L(H?"dark":"light")}catch(Z){console.error(Z)}})}},[m]),q.useEffect(()=>{C.length<=1&&P(!1)},[C]),q.useEffect(()=>{let re=D=>{var H,Z;n.every(ee=>D[ee]||D.code===ee)&&(P(!0),(H=me.current)==null||H.focus()),D.code==="Escape"&&(document.activeElement===me.current||(Z=me.current)!=null&&Z.contains(document.activeElement))&&P(!1)};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},[n]),q.useEffect(()=>{if(me.current)return()=>{g.current&&(g.current.focus({preventScroll:!0}),g.current=null,X.current=!1)}},[me.current]),q.createElement("section",{ref:t,"aria-label":`${w} ${$}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((re,D)=>{var H;let[Z,ee]=re.split("-");return C.length?q.createElement("ol",{key:re,dir:_==="auto"?vd():_,tabIndex:-1,ref:me,className:l,"data-sonner-toaster":!0,"data-theme":z,"data-y-position":Z,"data-lifted":M&&C.length>1&&!o,"data-x-position":ee,style:{"--front-toast-height":`${((H=S[0])==null?void 0:H.height)||0}px`,"--width":`${z1}px`,"--gap":`${b}px`,...f,...G1(c,u)},onBlur:ae=>{X.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(X.current=!1,g.current&&(g.current.focus({preventScroll:!0}),g.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||X.current||(X.current=!0,g.current=ae.relatedTarget)},onMouseEnter:()=>P(!0),onMouseMove:()=>P(!0),onMouseLeave:()=>{A||P(!1)},onDragEnd:()=>P(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},C.filter(ae=>!ae.position&&D===0||ae.position===re).map((ae,Y)=>{var te,Se;return q.createElement(W1,{key:ae.id,icons:v,index:Y,toast:ae,defaultRichColors:h,duration:(te=x==null?void 0:x.duration)!=null?te:p,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:r,visibleToasts:y,closeButton:(Se=x==null?void 0:x.closeButton)!=null?Se:i,interacting:A,position:re,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,removeToast:de,toasts:C.filter(Le=>Le.position==ae.position),heights:S.filter(Le=>Le.position==ae.position),setHeights:T,expandByDefault:o,gap:b,loadingIcon:E,exp
507anded:M,pauseWhenPageIsHidden:N,swipeDirections:e.swipeDirections})})):null}))});const K1=({...e})=>{const{theme:t="system"}=w1();return s.jsx(Y1,{position:"bottom-right",theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},Rl=ig,Pi=lg,Ii=cg,Tn=d.forwardRef(({className:e,sideOffset:t=4,...r},a)=>s.jsx(Mu,{ref:a,sideOffset:t,className:F("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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}));Tn.displayName=Mu.displayName;const Z1="https://oljfrvuqbiwnhtgzlrxb.supabase.co",Q1="sb_publishable_OSkUEoafPlIneIxYlVEnVQ_cc3Y0uKy",R=Ig(Z1,Q1,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),Oo="mw:auth-debug",Mi="mw_user_type",X1="mw:last-active-heartbeat:",J1=5*60*1e3;function e_(){try{const e=localStorage.getItem(Mi);if(e==="buyer"||e==="professional")return e}catch{}return null}function t_(){if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search).get("authDebug");return t==="1"?(localStorage.setItem(Oo,"true"),!0):t==="0"?(localStorage.removeItem(Oo),!1):localStorage.getItem(Oo)==="true"}function yr(e){return e?{userId:e.user.id,email:e.user.email??null,expiresAt:e.expires_at?new Date(e.expires_at*1e3).toISOString():null,expires
507In:e.expires_in??null}:null}function $t(){return typeof window>"u"?[]:Object.keys(localStorage).filter(e=>e.includes("-auth-token")).sort().map(e=>{const t=localStorage.getItem(e);let r="empty";if(t)try{const a=JSON.parse(t);r=Array.isArray(a)?`array(${a.length})`:typeof a}catch{r="string"}return{key:e,present:!!t,size:(t==null?void 0:t.length)??0,parsedType:r}})}function rt(e,t={}){if(!t_()||typeof window>"u")return;const r={at:new Date().toISOString(),label:e,details:t},a=window;a.__MW_AUTH_DEBUG_LOGS__=[...a.__MW_AUTH_DEBUG_LOGS__??[],r].slice(-100),console.log("[AuthDebug]",e,t)}function s_(e,t){return(e==null?void 0:e.access_token)!==(t==null?void 0:t.access_token)||(e==null?void 0:e.user.id)!==(t==null?void 0:t.user.id)}async function r_(e){const t=Date.now(),r=`${X1}${e}`;try{const o=Number(localStorage.getItem(r)??0);if(o&&t-o<J1)return;localStorage.setItem(r,String(t))}catch{}const a=new Date(t).toISOString(),{error:n}=await R.from("profiles").update({last_active_at:a}).eq("user_id",e);rt("recordSessionActivity",{userId:e,lastActiveAt:a,error:(n==null?void 0:n.message)??null})}const qf=d.createContext(void 0);function a_({children:e}){const[t,r]=d.useState(null),[a,n]=d.useState(null),[o,i]=d.useState(null),[l,c]=d.useState(null),[u,m]=d.useState([]),h=u.find(S=>S.status==="approved")||u.find(S=>S.status==="pending")||u.find(S=>S.status==="draft")||u[0]||null,[p,f]=d.useState(!1),[y,x]=d.useState(!1),[_,b]=d.useState(!0),[E]=d.useState(e_),v=async S=>{try{rt("fetchProfile:start",{userId:S});const{data:T}=await R.from("profiles").select("*").eq("user_id",S).single(),{data:{user:M}}=await R.auth.getUser();T&&(M!=null&&M.email)&&T.email!==M.email&&(await R.from("profiles").update({email:M.email}).eq("user_id",S),T.email=M.email),i(T),T!=null&&T.user_type&&localStorage.setItem(Mi,T.user_type);const[{data:P},{data:A},{data:I}]=await Promise.all([R.from("buyer_profiles").select("*").eq("user_id",S).maybeSingle(),R.from("professional_profiles").select("*").eq("user_id",S).is("deleted_at",null).order("created_at",{ascending:!0}),R.from("user_roles").select("role").eq("user_id",S)]);c(P),m(A||[]);const z=(I||[]).map(L=>L.role);f(z.includes("admin")||z.includes("super_admin")),x(z.includes("super_admin")),rt("fetchProfile:success",{userId:S,hasProfile:!!T,hasBuyerProfile:!!P,proProfiles:(A||[]).length,roles:z})}catch(T){console.error("Error fetching profile:",T),rt("fetchProfile:error",{userId:S,error:T instanceof Error?T.message:String(T)})}},w=async()=>{t&&await v(t.id)},N=async S=>{if(!t)return;const{error:T}=await R.from("profiles").update({user_type:S}).eq("user_id",t.id);T||await v(t.id)};d.useEffect(()=>{let S=!0,T=null;rt("AuthProvider:mount",{url:window.location.href,authStorage:$t()});const M=(g,X)=>{if(!S)return;const de=s_(T,g);T=g,de&&(n(g),r((g==null?void 0:g.user)??null)),g!=null&&g.user?(r_(g.user.id),de&&v(g.user.id)):de&&(i(null),c(null),m([]),f(!1),x(!1)),rt("syncSession",{source:X,sessionChanged:de,session:yr(g)})},{data:{subscription:P}}=R.auth.onAuthStateChange((g,X)=>{S&&(rt("onAuthStateChange",{event:g,session:yr(X),authStorage:$t()}),M(X,`auth:${g}`))}),A=async()=>{var X;let g=null;try{rt("initializeAuth:getSession:start",{authStorage:$t()});const{data:{session:de},error:re}=await R.auth.getSession();if(!S)return;g=de,rt("initializeAuth:getSession:result",{error:(re==null?void 0:re.message)??null,session:yr(g),authStorage:$t()}),M(g,"initializeAuth")}catch(de){rt("initializeAuth:getSession:error",{error:de instanceof Error?de.message:String(de),authStorage:$t()})}finally{S&&(rt("initializeAuth:complete",{userId:((X=g==null?void 0:g.user)==null?void 0:X.id)??null}),b(!1))}},I=g=>{var X;!g.key||!g.key.includes("-auth-token")||rt("storage:event",{key:g.key,oldValuePresent:g.oldValue!==null,newValuePresent:g.newValue!==null,newValueSize:((X=g.newValue)==null?void 0:X.length)??0,authStorage:$t()})},z=g=>{R.auth.getSession().then(({data:{session:X},error:de})=>{rt(`${g}:getSession`,{error:(de==null?void 0:de.message)??null,session:yr(X),authStorage:$t()}),M(X,g)}).catch(()=>{})},L=()=>{document.visibilityState==="visible"&&z("visibility")},me=()=>{z("focus")},$=g=>{z(g.persisted?"pageshow:bfcache":"pageshow")};return window.addEventListener("storage",I),window.addEventListener("focus",me),window.addEventListener("pageshow",$),document.addEventListener("visibilitychange",L),A(),()=>{S=!1,window.removeEventListener("storage",I),window.removeEventListener("focus",me),window.removeEventListener("pageshow",$),document.removeEventListener("visibilitychange",L),P.unsubscribe()}},[]);const C=async(S,T,M,P)=>{rt("signUp:start",{email:S,userType:M});const{error:A}=await R.auth.signUp({email:S,password:T,options:{data:{user_type:M,...P}}});return rt("signUp:result",{email:S,userType:M,error:(A==null?void 0:A.message)??null,authStorage:$t()}),{error:A}},j=async(S,T,M=!1)=>{rt("signIn:start",{email:S,rememberMe:M,authStorage:$t()});const{error:P}=await R.auth.signInWithPassword({email:S,password:T});!P&&M?localStorage.setItem("rememberMe","true"):localStorage.removeItem("rememberMe");const{data:{session:A},error:I}=await R.auth.getSession();return rt("signIn:result",{email:S,rememberMe:M,error:(P==null?void 0:P.message)??null,getSessionError:(I==null?void 0:I.message)??null,session:yr(A),authStorage:$t()}),{error:P}},k=async()=>{rt("signOut:start",{session:yr(a),authStorage:$t()});const{error:S}=await R.auth.signOut();rt("signOut:result",{error:(S==null?void 0:S.message)??null,authStorage:$t()}),sessionStorage.removeItem("loginFlow"),localStorage.removeItem(Mi),r(null),n(null),i(null),c(null),m([]),f(!1),x(!1)};return s.jsx(qf.Provider,{value:{user:t,session:a,profile:o,buyerProfile:l,proProfile:h,proProfiles:u,hasBuyerProfile:!!l,hasProProfile:u.length>0,isAdmin:p,isSuperAdmin:y,isLoading:_,cachedUserType:E,signUp:C,signIn:j,signOut:k,refreshProfile:w,switchUserType:N},children:e})}const n_={user:null,session:null,profile:null,buyerProfile:null,proProfile:null,proProfiles:[],hasBuyerProfile:!1,hasProProfile:!1,isAdmin:!1,isSuperAdmin:!1,isLoading:!1,cachedUserType:null,signUp:async()=>({error:new Error("No AuthProvider")}),signIn:async()=>({error:new Error("No AuthProvider")}),signOut:async()=>{},refreshProfile:async()=>{},switchUserType:async()=>{}};function be(){const e=d.useContext(qf);return e===void 0?(console.warn("useAuth called outside AuthProvider â returning unauthenticated default"),n_):e}const Wf=d.createContext(void 0),Do="__MW_AUTH_MODAL_STORE__";
507function wd(){let e={isOpen:!1,tab:"login",defaultProRole:void 0,requestKey:0};const t=new Set,r=()=>{t.forEach(a=>a())};return{getSnapshot:()=>e,subscribe:a=>(t.add(a),()=>t.delete(a)),open:(a="signup",n)=>{e={isOpen:!0,tab:a,defaultProRole:n,requestKey:e.requestKey+1},r()},close:()=>{e={...e,isOpen:!1},r()}}}function Gf(){if(typeof window>"u")return wd();const e=window;return e[Do]||(e[Do]=wd()),e[Do]}function Yf(e){return d.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function o_({children:e}){const t=d.useMemo(()=>Gf(),[]),{isOpen:r,tab:a,defaultProRole:n,requestKey:o}=Yf(t),i=d.useCallback((u="signup",m)=>{t.open(u,m)},[t]),l=d.useCallback(()=>{t.close()},[t]),c=d.useMemo(()=>({isOpen:r,tab:a,defaultProRole:n,requestKey:o,openAuthModal:i,closeAuthModal:l}),[l,n,r,i,o,a]);return s.jsx(Wf.Provider,{value:c,children:e})}function za(){const e=d.useContext(Wf),t=Gf(),{isOpen:r,tab:a,defaultProRole:n,requestKey:o}=Yf(t);return e||{isOpen:r,tab:a,defaultProRole:n,requestKey:o,openAuthModal:t.open,closeAuthModal:t.close}}var Ie;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{const o={};for(const i of n)o[i]=i;return o},e.getValidEnumValues=n=>{const o=e.objectKeys(n).filter(l=>typeof n[n[l]]!="number"),i={};for(const l of o)i[l]=n[l];return e.objectValues(i)},e.objectValues=n=>e.objectKeys(n).map(function(o){return n[o]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const o=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&o.push(i);return o},e.find=(n,o)=>{for(const i of n)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function a(n,o=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=a,e.jsonStringifyReplacer=(n,o)=>typeof o=="bigint"?o.toString():o})(Ie||(Ie={}));var _d;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(_d||(_d={}));const ie=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ds=e=>{switch(typeof e){case"undefined":return ie.undefined;case"string":return ie.string;case"number":return Number.isNaN(e)?ie.nan:ie.number;case"boolean":return ie.boolean;case"function":return ie.function;case"bigint":return ie.bigint;case"symbol":return ie.symbol;case"object":return Array.isArray(e)?ie.array:e===null?ie.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ie.promise:typeof Map<"u"&&e instanceof Map?ie.map:typeof Set<"u"&&e instanceof Set?ie.set:typeof Date<"u"&&e instanceof Date?ie.date:ie.object;default:return ie.unknown}}
vendor: 6,016 bytes, line 507
507,W=Ie.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"]);class Lt extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(o){return o.message},a={_errors:[]},n=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)a._errors.push(r(i));else{let l=a,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(r(i))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return n(this),a}static assert(t){if(!(t instanceof Lt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},a=[];for(const n of this.issues)if(n.path.length>0){const o=n.path[0];r[o]=r[o]||[],r[o].push(t(n))}else a.push(t(n));return{formErrors:a,fieldErrors:r}}get formErrors(){return this.flatten()}}Lt.create=e=>new Lt(e);const Li=(e,t)=>{let r;switch(e.code){case W.invalid_type:e.received===ie.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case W.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ie.jsonStringifyReplacer)}`;break;case W.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ie.joinValues(e.keys,", ")}`;break;case W.invalid_union:r="Invalid input";break;case W.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ie.joinValues(e.options)}`;break;case W.invalid_enum_value:r=`Invalid enum value. Expected ${Ie.joinValues(e.options)}, received '${e.received}'`;break;case W.invalid_arguments:r="Invalid function arguments";break;case W.invalid_return_type:r="Invalid function return type";break;case W.invalid_date:r="Invalid date";break;case W.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Ie.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case W.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case W.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case W.custom:r="Invalid input";break;case W.invalid_intersection_types:r="Intersection results could not be merged";break;case W.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case W.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ie.assertNever(e)}return{message:r}};let i_=Li;function l_(){return i_}const c_=e=>{const{data:t,path:r,errorMaps:a,issueData:n}=e,o=[...r,...n.path||[]],i={...n,path:o};if(n.message!==void 0)return{...n,path:o,message:n.message};let l="";const c=a.filter(u=>!!u).slice().reverse();for(const u of c)l=u(i,{data:t,defaultError:l}).message;return{...n,path:o,message:l}};function se(e,t){const r=l_(),a=c_({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Li?void 0:Li].filter(n=>!!n)});e.common.issues.push(a)}class Ot{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const a=[];for(const n of r){if(n.status==="aborted")return ve;n.status==="dirty"&&t.dirty(),a.push(n.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,r){const a=[];for(const n of r){const o=await n.key,i=await n.value;a.push({key:o,value:i})}return Ot.mergeObjectSync(t,a)}static mergeObjectSync(t,r){const a={};for(const n of r){const{key:o,value:i}=n;if(o.status==="aborted"||i.status==="aborted")return ve;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(a[o.value]=i.value)}return{status:t.value,value:a}}}const ve=Object.freeze({status:"aborted"}),ga=e=>({status:"dirty",value:e}),Wt=e=>
vendor: 5,405 bytes, line 507
507({status:"valid",value:e}),jd=e=>e.status==="aborted",kd=e=>e.status==="dirty",Fr=e=>e.status==="valid",Rn=e=>typeof Promise<"u"&&e instanceof Promise;var ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ce||(ce={}));class Ys{constructor(t,r,a,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=a,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Nd=(e,t)=>{if(Fr(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 r=new Lt(e.common.issues);return this._error=r,this._error}}};function Ee(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:a,description:n}=e;if(t&&(r||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(i,l)=>{const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??l.defaultError}:typeof l.data>"u"?{message:c??a??l.defaultError}:i.code!=="invalid_type"?{message:l.defaultError}:{message:c??r??l.defaultError}},description:n}}class Re{get description(){return this._def.description}_getType(t){return Ds(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Ds(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ot,ctx:{common:t.parent.common,data:t.data,parsedType:Ds(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Rn(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const a=this.safeParse(t,r);if(a.success)return a.data;throw a.error}safeParse(t,r){const a={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ds(t)},n=this._parseSync({data:t,path:a.path,parent:a});return Nd(a,n)}"~validate"(t){var a,n;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ds(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:r});return Fr(o)?{value:o.value}:{issues:r.common.issues}}catch(o){(n=(a=o==null?void 0:o.message)==null?void 0:a.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>Fr(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){const a=await this.safeParseAsync(t,r);if(a.success)return a.data;throw a.error}async safeParseAsync(t,r){const a={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ds(t)},n=this._parse({data:t,path:a.path,parent:a}),o=await(Rn(n)?n:Promise.resolve(n));return Nd(a,o)}refine(t,r){const a=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,o)=>{const i=t(n),l=()=>o.addIssue({code:W.custom,...a(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(l(),!1)):i?!0:(l(),!1)})}refinement(t,r){return this._refinement((a,n)=>t(a)?!0:(n.addIssue(typeof r=="function"?r(a,n):r),!1))}_refinement(t){return new Br({schema:this,typeName:we.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}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),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Bs.create(this,this._def)}nullable(){return zr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return us.create(this)}promise(){return Ln.create(this,this._def)}or(t){return In.create([this,t],this._def)}and(t){return Mn.create(this,t,this._def)}transform(t){return new Br({...Ee(this._def),schema:this,typeName:we.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Di({...Ee(this._def),innerType:this,defaultValue:r,typeName:we.ZodDefault})}
vendor: 4,168 bytes, line 507
507brand(){return new P_({typeName:we.ZodBranded,type:this,...Ee(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Fi({...Ee(this._def),innerType:this,catchValue:r,typeName:we.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Pl.create(this,t)}readonly(){return $i.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const d_=/^c[^\s-]{8,}$/i,u_=/^[0-9a-z]+$/,m_=/^[0-9A-HJKMNP-TV-Z]{26}$/i,f_=/^[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,h_=/^[a-z0-9_-]{21}$/i,p_=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,g_=/^[-+]?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)?)??$/,x_=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,b_="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Fo;const y_=/^(?:(?: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])$/,v_=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,w_=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,__=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,j_=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,k_=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Kf="((\\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])))",N_=new RegExp(`^${Kf}$`);function Zf(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function S_(e){return new RegExp(`^${Zf(e)}$`)}function C_(e){let t=`${Kf}T${Zf(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function E_(e,t){return!!((t==="v4"||!t)&&y_.test(e)||(t==="v6"||!t)&&w_.test(e))}function A_(e,t){if(!p_.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const a=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(a));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return!1}}function T_(e,t){return!!((t==="v4"||!t)&&v_.test(e)||(t==="v6"||!t)&&__.test(e))}class Fs extends Re{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ie.string){const o=this._getOrReturnCtx(t);
vendor: 17,307 bytes, line 507
507return se(o,{code:W.invalid_type,expected:ie.string,received:o.parsedType}),ve}const a=new Ot;let n;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:W.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="max")t.data.length>o.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:W.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,l=t.data.length<o.value;(i||l)&&(n=this._getOrReturnCtx(t,n),i?se(n,{code:W.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):l&&se(n,{code:W.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),a.dirty())}else if(o.kind==="email")x_.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"email",code:W.invalid_string,message:o.message}),a.dirty());else if(o.kind==="emoji")Fo||(Fo=new RegExp(b_,"u")),Fo.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"emoji",code:W.invalid_string,message:o.message}),a.dirty());else if(o.kind==="uuid")f_.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"uuid",code:W.invalid_string,message:o.message}),a.dirty());else if(o.kind==="nanoid")h_.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"nanoid",code:W.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid")d_.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid",code:W.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid2")u_.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid2",code:W.invalid_string,message:o.message}),a.dirty());else if(o.kind==="ulid")m_.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ulid",code:W.invalid_string,message:o.message}),a.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),se(n,{validation:"url",code:W.invalid_string,message:o.message}),a.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"regex",code:W.invalid_string,message:o.message}),a.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(t,n),se(n,{code:W.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),a.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)||(n=this._getOrReturnCtx(t,n),se(n,{code:W.invalid_string,validation:{startsWith:o.value},message:o.message}),a.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(n=this._getOrReturnCtx(t,n),se(n,{code:W.invalid_string,validation:{endsWith:o.value},message:o.message}),a.dirty()):o.kind==="datetime"?C_(o).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:W.invalid_string,validation:"datetime",message:o.message}),a.dirty()):o.kind==="date"?N_.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:W.invalid_string,validation:"date",message:o.message}),a.dirty()):o.kind==="time"?S_(o).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:W.invalid_string,validation:"time",message:o.message}),a.dirty()):o.kind==="duration"?g_.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"duration",code:W.invalid_string,message:o.message}),a.dirty()):o.kind==="ip"?E_(t.data,o.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ip",code:W.invalid_string,message:o.message}),a.dirty()):o.kind==="jwt"?A_(t.data,o.alg)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"jwt",code:W.invalid_string,message:o.message}),a.dirty()):o.kind==="cidr"?T_(t.data,o.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cidr",code:W.invalid_string,message:o.message}),a.dirty()):o.kind==="base64"?j_.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64",code:W.invalid_string,message:o.message}),a.dirty()):o.kind==="base64url"?k_.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64url",code:W.invalid_string,message:o.message}),a.dirty()):Ie.assertNever(o);return{status:a.value,value:t.data}}_regex(t,r,a){return this.refinement(n=>t.test(n),{validation:r,code:W.invalid_string,...ce.errToObj(a)})}_addCheck(t){return new Fs({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ce.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ce.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ce.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ce.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ce.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ce.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...ce.errToObj(t==null?void 0: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==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ce.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ce.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...ce.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...ce.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...ce.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...ce.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...ce.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...ce.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...ce.errToObj(r)})}nonempty(t){return this.min(1,ce.errToObj(t))}trim(){return new Fs({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Fs({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Fs({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get 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 isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Fs.create=e=>new Fs({checks:[],typeName:we.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ee(e)});function R_(e,t){const r=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,n=r>a?r:a,o=Number.parseInt(e.toFixed(n).replace(".","")),i=Number.parseInt(t.toFixed(n).replace(".",""));return o%i/10**n}class Na extends Re{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)!==ie.number){const o=this._getOrReturnCtx(t);return se(o,{code:W.invalid_type,expected:ie.number,received:o.parsedType}),ve}let a;const n=new Ot;for(const o of this._def.checks)o.kind==="int"?Ie.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),se(a,{code:W.invalid_type,expected:"integer",received:"float",message:o.message}),n.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(a=this._getOrReturnCtx(t,a),se(a,{code:W.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(a=this._getOrReturnCtx(t,a),se(a,{code:W.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="multipleOf"?R_(t.data,o.value)!==0&&(a=this._getOrReturnCtx(t,a),se(a,{code:W.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),se(a,{code:W.not_finite,message:o.message}),n.dirty()):Ie.assertNever(o);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ce.toString(r))}setLimit(t,r,a,n){return new Na({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:a,message:ce.toString(n)}]})}_addCheck(t){return new Na({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ie.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(r===null||a.value>r)&&(r=a.value):a.kind==="max"&&(t===null||a.value<t)&&(t=a.value)}return Number.isFinite(r)&&Number.isFinite(t)}}Na.create=e=>new Na({checks:[],typeName:we.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Sa extends Re{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ie.bigint)return this._getInvalidInput(t);let a;const n=new Ot;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(a=this._getOrReturnCtx(t,a),se(a,{code:W.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(a=this._getOrReturnCtx(t,a),se(a,{code:W.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),se(a,{code:W.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):Ie.assertNever(o);return{status:n.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return se(r,{code:W.invalid_type,expected:ie.bigint,received:r.parsedType}),ve}gte(t,r){return this.setLimit("min",t,!0,ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ce.toString(r))}setLimit(t,r,a,n){return new Sa({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:a,message:ce.toString(n)}]})}_addCheck(t){return new Sa({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Sa.create=e=>new Sa({checks:[],typeName:we.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ee(e)});class Sd extends Re{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ie.boolean){const a=this._getOrReturnCtx(t);return se(a,{code:W.invalid_type,expected:ie.boolean,received:a.parsedType}),ve}return Wt(t.data)}}Sd.create=e=>new Sd({typeName:we.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Pn extends Re{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ie.date){const o=this._getOrReturnCtx(t);return se(o,{code:W.invalid_type,expected:ie.date,received:o.parsedType}),ve}if(Number.isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return se(o,{code:W.invalid_date}),ve}const a=new Ot;let n;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:W.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),a.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:W.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),a.dirty()):Ie.assertNever(o);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Pn({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:ce.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:ce.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}Pn.create=e=>new Pn({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:we.ZodDate,...Ee(e)});class Cd extends Re{_parse(t){if(this._getType(t)!==ie.symbol){const a=this._getOrReturnCtx(t);return se(a,{code:W.invalid_type,expected:ie.symbol,received:a.parsedType}),ve}return Wt(t.data)}}Cd.create=e=>new Cd({typeName:we.ZodSymbol,...Ee(e)});class Ed extends Re{_parse(t){if(this._getType(t)!==ie.undefined){const a=this._getOrReturnCtx(t);return se(a,{code:W.invalid_type,expected:ie.undefined,received:a.parsedType}),ve}return Wt(t.data)}}Ed.create=e=>new Ed({typeName:we.ZodUndefined,...Ee(e)});class Ad extends Re{_parse(t){if(this._getType(t)!==ie.null){const a=this._getOrReturnCtx(t);return se(a,{code:W.invalid_type,expected:ie.null,received:a.parsedType}),ve}return Wt(t.data)}}Ad.create=e=>new Ad({typeName:we.ZodNull,...Ee(e)});class Td extends Re{constructor(){super(...arguments),this._any=!0}_parse(t){return Wt(t.data)}}Td.create=e=>new Td({typeName:we.ZodAny,...Ee(e)});class Rd extends Re{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Wt(t.data)}}Rd.create=e=>new Rd({typeName:we.ZodUnknown,...Ee(e)});class Ks extends Re{_parse(t){const r=this._getOrReturnCtx(t);return se(r,{code:W.invalid_type,expected:ie.never,received:r.parsedType}),ve}}Ks.create=e=>new Ks({typeName:we.ZodNever,...Ee(e)});class Pd extends Re{_parse(t){if(this._getType(t)!==ie.undefined){const a=this._getOrReturnCtx(t);return se(a,{code:W.invalid_type,expected:ie.void,received:a.parsedType}),ve}return Wt(t.data)}}Pd.create=e=>new Pd({typeName:we.ZodVoid,...Ee(e)});class us extends Re{_parse(t){const{ctx:r,status:a}=this._processInputParams(t),n=this._def;
vendor: 16,619 bytes, line 507
507if(r.parsedType!==ie.array)return se(r,{code:W.invalid_type,expected:ie.array,received:r.parsedType}),ve;if(n.exactLength!==null){const i=r.data.length>n.exactLength.value,l=r.data.length<n.exactLength.value;(i||l)&&(se(r,{code:i?W.too_big:W.too_small,minimum:l?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(se(r,{code:W.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(se(r,{code:W.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),r.common.async)return Promise.all([...r.data].map((i,l)=>n.type._parseAsync(new Ys(r,i,r.path,l)))).then(i=>Ot.mergeArray(a,i));const o=[...r.data].map((i,l)=>n.type._parseSync(new Ys(r,i,r.path,l)));return Ot.mergeArray(a,o)}get element(){return this._def.type}min(t,r){return new us({...this._def,minLength:{value:t,message:ce.toString(r)}})}max(t,r){return new us({...this._def,maxLength:{value:t,message:ce.toString(r)}})}length(t,r){return new us({...this._def,exactLength:{value:t,message:ce.toString(r)}})}nonempty(t){return this.min(1,t)}}us.create=(e,t)=>new us({type:e,minLength:null,maxLength:null,exactLength:null,typeName:we.ZodArray,...Ee(t)});function Sr(e){if(e instanceof Ke){const t={};for(const r in e.shape){const a=e.shape[r];t[r]=Bs.create(Sr(a))}return new Ke({...e._def,shape:()=>t})}else return e instanceof us?new us({...e._def,type:Sr(e.element)}):e instanceof Bs?Bs.create(Sr(e.unwrap())):e instanceof zr?zr.create(Sr(e.unwrap())):e instanceof cr?cr.create(e.items.map(t=>Sr(t))):e}class Ke extends Re{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(),r=Ie.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ie.object){const u=this._getOrReturnCtx(t);return se(u,{code:W.invalid_type,expected:ie.object,received:u.parsedType}),ve}const{status:a,ctx:n}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),l=[];if(!(this._def.catchall instanceof Ks&&this._def.unknownKeys==="strip"))for(const u in n.data)i.includes(u)||l.push(u);const c=[];for(const u of i){const m=o[u],h=n.data[u];c.push({key:{status:"valid",value:u},value:m._parse(new Ys(n,h,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof Ks){const u=this._def.unknownKeys;if(u==="passthrough")for(const m of l)c.push({key:{status:"valid",value:m},value:{status:"valid",value:n.data[m]}});else if(u==="strict")l.length>0&&(se(n,{code:W.unrecognized_keys,keys:l}),a.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const m of l){const h=n.data[m];c.push({key:{status:"valid",value:m},value:u._parse(new Ys(n,h,n.path,m)),alwaysSet:m in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const u=[];for(const m of c){const h=await m.key,p=await m.value;u.push({key:h,value:p,alwaysSet:m.alwaysSet})}return u}).then(u=>Ot.mergeObjectSync(a,u)):Ot.mergeObjectSync(a,c)}get shape(){return this._def.shape()}strict(t){return ce.errToObj,new Ke({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,a)=>{var o,i;const n=((i=(o=this._def).errorMap)==null?void 0:i.call(o,r,a).message)??a.defaultError;return r.code==="unrecognized_keys"?{message:ce.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new Ke({...this._def,unknownKeys:"strip"})}passthrough(){return new Ke({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ke({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ke({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:we.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Ke({...this._def,catchall:t})}pick(t){const r={};for(const a of Ie.objectKeys(t))t[a]&&this.shape[a]&&(r[a]=this.shape[a]);return new Ke({...this._def,shape:()=>r})}omit(t){const r={};for(const a of Ie.objectKeys(this.shape))t[a]||(r[a]=this.shape[a]);return new Ke({...this._def,shape:()=>r})}deepPartial(){return Sr(this)}partial(t){const r={};for(const a of Ie.objectKeys(this.shape)){const n=this.shape[a];t&&!t[a]?r[a]=n:r[a]=n.optional()}return new Ke({...this._def,shape:()=>r})}required(t){const r={};for(const a of Ie.objectKeys(this.shape))if(t&&!t[a])r[a]=this.shape[a];else{let o=this.shape[a];for(;o instanceof Bs;)o=o._def.innerType;r[a]=o}return new Ke({...this._def,shape:()=>r})}keyof(){return Qf(Ie.objectKeys(this.shape))}}Ke.create=(e,t)=>new Ke({shape:()=>e,unknownKeys:"strip",catchall:Ks.create(),typeName:we.ZodObject,...Ee(t)});Ke.strictCreate=(e,t)=>new Ke({shape:()=>e,unknownKeys:"strict",catchall:Ks.create(),typeName:we.ZodObject,...Ee(t)});Ke.lazycreate=(e,t)=>new Ke({shape:e,unknownKeys:"strip",catchall:Ks.create(),typeName:we.ZodObject,...Ee(t)});class In extends Re{_parse(t){const{ctx:r}=this._processInputParams(t),a=this._def.options;function n(o){for(const l of o)if(l.result.status==="valid")return l.result;for(const l of o)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;const i=o.map(l=>new Lt(l.ctx.common.issues));return se(r,{code:W.invalid_union,unionErrors:i}),ve}if(r.common.async)return Promise.all(a.map(async o=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(n);{let o;const i=[];for(const c of a){const u={...r,common:{...r.common,issues:[]},parent:null},m=c._parseSync({data:r.data,path:r.path,parent:u});if(m.status==="valid")return m;m.status==="dirty"&&!o&&(o={result:m,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const l=i.map(c=>new Lt(c));return se(r,{code:W.invalid_union,unionErrors:l}),ve}}get options(){return this._def.options}}In.create=(e,t)=>new In({options:e,typeName:we.ZodUnion,...Ee(t)});function Oi(e,t){const r=Ds(e),a=Ds(t);if(e===t)return{valid:!0,data:e};if(r===ie.object&&a===ie.object){const n=Ie.objectKeys(t),o=Ie.objectKeys(e).filter(l=>n.indexOf(l)!==-1),i={...e,...t};for(const l of o){const c=Oi(e[l],t[l]);if(!c.valid)return{valid:!1};i[l]=c.data}return{valid:!0,data:i}}else if(r===ie.array&&a===ie.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let o=0;o<e.length;o++){const i=e[o],l=t[o],c=Oi(i,l);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return r===ie.date&&a===ie.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Mn extends Re{_parse(t){const{status:r,ctx:a}=this._processInputParams(t),n=(o,i)=>{if(jd(o)||jd(i))return ve;const l=Oi(o.value,i.value);return l.valid?((kd(o)||kd(i))&&r.dirty(),{status:r.value,value:l.data}):(se(a,{code:W.invalid_intersection_types}),ve)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([o,i])=>n(o,i)):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Mn.create=(e,t,r)=>new Mn({left:e,right:t,typeName:we.ZodIntersection,...Ee(r)});class cr extends Re{_parse(t){const{status:r,ctx:a}=this._processInputParams(t);if(a.parsedType!==ie.array)return se(a,{code:W.invalid_type,expected:ie.array,received:a.parsedType}),ve;if(a.data.length<this._def.items.length)return se(a,{code:W.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&a.data.length>this._def.items.length&&(se(a,{code:W.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...a.data].map((i,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new Ys(a,i,a.path,l)):null}).filter(i=>!!i);return a.common.async?Promise.all(o).then(i=>Ot.mergeArray(r,i)):Ot.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new cr({...this._def,rest:t})}}cr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new cr({items:e,typeName:we.ZodTuple,rest:null,...Ee(t)})};class Id extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:a}=this._processInputParams(t);if(a.parsedType!==ie.map)return se(a,{code:W.invalid_type,expected:ie.map,received:a.parsedType}),ve;const n=this._def.keyType,o=this._def.valueType,i=[...a.data.entries()].map(([l,c],u)=>({key:n._parse(new Ys(a,l,a.path,[u,"key"])),value:o._parse(new Ys(a,c,a.path,[u,"value"]))}));if(a.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of i){const u=await c.key,m=await c.value;if(u.status==="aborted"||m.status==="aborted")return ve;(u.status==="dirty"||m.status==="dirty")&&r.dirty(),l.set(u.value,m.value)}return{status:r.value,value:l}})}else{const l=new Map;for(const c of i){const u=c.key,m=c.value;if(u.status==="aborted"||m.status==="aborted")return ve;(u.status==="dirty"||m.status==="dirty")&&r.dirty(),l.set(u.value,m.value)}return{status:r.value,value:l}}}}Id.create=(e,t,r)=>new Id({valueType:t,keyType:e,typeName:we.ZodMap,...Ee(r)});class Ca extends Re{_parse(t){const{status:r,ctx:a}=this._processInputParams(t);if(a.parsedType!==ie.set)return se(a,{code:W.invalid_type,expected:ie.set,received:a.parsedType}),ve;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(se(a,{code:W.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&a.data.size>n.maxSize.value&&(se(a,{code:W.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());const o=this._def.valueType;function i(c){const u=new Set;for(const m of c){if(m.status==="aborted")return ve;m.status==="dirty"&&r.dirty(),u.add(m.value)}return{status:r.value,value:u}}const l=[...a.data.values()].map((c,u)=>o._parse(new Ys(a,c,a.path,u)));return a.common.async?Promise.all(l).then(c=>i(c)):i(l)}min(t,r){return new Ca({...this._def,minSize:{value:t,message:ce.toString(r)}})}max(t,r){return new Ca({...this._def,maxSize:{value:t,message:ce.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Ca.create=(e,t)=>new Ca({valueType:e,minSize:null,maxSize:null,typeName:we.ZodSet,...Ee(t)});class Md extends Re{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Md.create=(e,t)=>new Md({getter:e,typeName:we.ZodLazy,...Ee(t)});class Ld extends Re{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return se(r,{received:r.data,code:W.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ld.create=(e,t)=>new Ld({value:e,typeName:we.ZodLiteral,...Ee(t)});function Qf(e,t){return new $r({values:e,typeName:we.ZodEnum,...Ee(t)})}class $r extends Re{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),a=this._def.values;return se(r,{expected:Ie.joinValues(a),received:r.parsedType,code:W.invalid_type}),ve}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),a=this._def.values;return se(r,{received:r.data,code:W.invalid_enum_value,options:a}),ve}return Wt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return $r.create(t,{...this._def,...r})}exclude(t,r=this._def){return $r.create(this.options.filter(a=>!t.includes(a)),{...this._def,...r})}}$r.create=Qf;class Od extends Re{_parse(t){const r=Ie.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==ie.string&&a.parsedType!==ie.number){const n=Ie.objectValues(r);return se(a,{expected:Ie.joinValues(n),received:a.parsedType,code:W.invalid_type}),ve}if(this._cache||(this._cache=new Set(Ie.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const n=Ie.objectValues(r);return se(a,{received:a.data,code:W.invalid_enum_value,options:n}),ve}return Wt(t.data)}get enum(){return this._def.values}}Od.create=(e,t)=>new Od({values:e,typeName:we.ZodNativeEnum,...Ee(t)});class Ln extends Re{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ie.promise&&r.common.async===!1)return se(r,{code:W.invalid_type,expected:ie.promise,received:r.parsedType}),ve;const a=r.parsedType===ie.promise?r.data:Promise.resolve(r.data);return Wt(a.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Ln.create=(e,t)=>new Ln({type:e,typeName:we.ZodPromise,...Ee(t)});class Br extends Re{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===we.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:a}=this._processInputParams(t),n=this._def.effect||null,o={addIssue:i=>{se(a,i),i.fatal?r.abort():r.dirty()},get path(){return a.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){const i=n.transform(a.data,o);if(a.common.async)return Promise.resolve(i).then(async l=>{if(r.value==="aborted")return ve;const c=await this._def.schema._parseAsync({data:l,path:a.path,parent:a});return c.status==="aborted"?ve:c.status==="dirty"||r.value==="dirty"?ga(c.value):c});{if(r.value==="aborted")return ve;const l=this._def.schema._parseSync({data:i,path:a.path,parent:a});return l.status==="aborted"?ve:l.status==="dirty"||r.value==="dirty"?ga(l.value):l}}if(n.type==="refinement"){const i=l=>{const c=n.refinement(l,o);if(a.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(a.common.async===!1){const l=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return l.status==="aborted"?ve:(l.status==="dirty"&&r.dirty(),i(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(l=>l.status==="aborted"?ve:(l.status==="dirty"&&r.dirty(),i(l.value).then(()=>({status:r.value,value:l.value}))))}if(n.type==="transform")if(a.common.async===!1){const i=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Fr(i))return ve;const l=n.transform(i.value,o);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(i=>Fr(i)?Promise.resolve(n.transform(i.value,o)).then(l=>({status:r.value,value:l})):ve);Ie.assertNever(n)}}Br.create=(e,t,r)=>new Br({schema:e,typeName:we.ZodEffects,effect:t,...Ee(r)});Br.createWithPreprocess=(e,t,r)=>new Br({schema:t,effect:{type:"preprocess",transform:e},typeName:we.ZodEffects,...Ee(r)});class Bs extends Re{_parse(t){return this._getType(t)===ie.undefined?Wt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Bs.create=(e,t)=>new Bs({innerType:e,typeName:we.ZodOptional,...Ee(t)});class zr extends Re{_parse(t){return this._getType(t)===ie.null?Wt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}zr.create=(e,t)=>new zr({innerType:e,typeName:we.ZodNullable,...Ee(t)});class Di extends Re{_parse(t){const{ctx:r}=this._processInputParams(t);let a=r.data;return r.parsedType===ie.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Di.create=(e,t)=>new Di({innerType:e,typeName:we.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class Fi extends Re{_parse(t){const{ctx:r}=this._processInputParams(t),a={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Rn(n)?n.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Lt(a.common.issues)},input:a.data})}
507)):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Lt(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Fi.create=(e,t)=>new Fi({innerType:e,typeName:we.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});class Dd extends Re{_parse(t){if(this._getType(t)!==ie.nan){const a=this._getOrReturnCtx(t);return se(a,{code:W.invalid_type,expected:ie.nan,received:a.parsedType}),ve}return{status:"valid",value:t.data}}}Dd.create=e=>new Dd({typeName:we.ZodNaN,...Ee(e)});class P_ extends Re{_parse(t){const{ctx:r}=this._processInputParams(t),a=r.data;return this._def.type._parse({data:a,path:r.path,parent:r})}unwrap(){return this._def.type}}class Pl extends Re{_parse(t){const{status:r,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?ve:o.status==="dirty"?(r.dirty(),ga(o.value)):this._def.out._parseAsync({data:o.value,path:a.path,parent:a})})();{const n=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?ve:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:a.path,parent:a})}}static create(t,r){return new Pl({in:t,out:r,typeName:we.ZodPipeline})}}class $i extends Re{_parse(t){const r=this._def.innerType._parse(t),a=n=>(Fr(n)&&(n.value=Object.freeze(n.value)),n);return Rn(r)?r.then(n=>a(n)):a(r)}unwrap(){return this._def.innerType}}$i.create=(e,t)=>new $i({innerType:e,typeName:we.ZodReadonly,...Ee(t)});Ke.lazycreate;var we;(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"})(we||(we={}));const oo=Fs.create;Ks.create;us.create;const f3=Ke.create;Ke.strictCreate;In.create;Mn.create;cr.create;const h3=$r.create;Ln.create;Bs.create;zr.create;const _t=Qi,I_=Xi,Xf=d.forwardRef(({className:e,...t},r)=>s.jsx(Aa,{ref:r,className:F("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}));Xf.displayName=Aa.displayName;const gt=d.forwardRef(({className:e,children:t,overlayClassName:r,"aria-describedby":a,...n},o)=>s.jsxs(I_,{children:[s.jsx(Xf,{className:r}),s.jsxs(Ta,{ref:o,"aria-describedby":a??void 0,className:F("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 max-h-[calc(100dvh-2rem)] overflow-y-auto 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:rounded-lg",e),...n,children:[t,s.jsxs(Hn,{className:"absolute right-4 top-4 roun
507ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(Mt,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));gt.displayName=Ta.displayName;const ms=({className:e,...t})=>s.jsx("div",{className:F("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ms.displayName="DialogHeader";const Hr=({className:e,...t})=>s.jsx("div",{className:F("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2",e),...t});Hr.displayName="DialogFooter";const ut=d.forwardRef(({className:e,...t},r)=>s.jsx(Ra,{ref:r,className:F("text-lg font-semibold leading-none tracking-tight",e),...t}));ut.displayName=Ra.displayName;const St=d.forwardRef(({className:e,...t},r)=>s.jsx(Pa,{ref:r,className:F("text-sm text-muted-foreground",e),...t}));St.displayName=Pa.displayName;const M_=[{question:"What is MustWants?",answer:"MustWants is a platform designed specifically for military families to find homes and connect with trusted real estate professionals. We understand the unique challenges of PCS moves and provide tools to make your home search easier."},{question:"Is MustWants free for home buyers?",answer:"Yes! MustWants is completely free for military families searching for a home. You can browse listings, save favorites, and connect with professionals at no cost."},{question:"What is the Partner feature?",answer:"The Partner feature allows you to connect your account with your spouse or partner. This lets you both save favorites and see which homes you both like, making it easier to house hunt together even when you're apart."},{question:"How are professionals on MustWants vetted?",answer:"All professionals on our platform go through an application and review process. We prioritize professionals who have experience working with military families and understand VA loans, PCS timelines, and other military-specific needs."}],Nt={title:"MustWants | Military Home Search, PCS Tools, and Vetted Pros",description:"Search homes near military bases, use PCS planning tools, and connect with vetted military-friendly real estate professionals without giving up your privacy.",keywords:"military housing, PCS move, military relocation, VA loan homes, military family, base housing, military real estate",ogImage:"/og-images/home.png",ogImageUrl:"https://mustwants.com/og-images/home.png",ogImageAlt:"MustWants | Military Home Search, PCS Tools, and Vetted Pros"},Il="MustWants",Q="https://mustwants.com",Jf="[email protected]",Bi="[email protected]",Fd="[email protected]",p3=Jf,g3="904-501-3795",L_={copyrightHolder:"MustWants, Inc.",patents:"Patent #12,041,649, Patent Pending #63/774,358, Trademark #90556109, #97725360"},js={title:Nt.title,description:Nt.description,keywords:Nt.keywords,ogImage:Nt.ogImage,ogImageAlt:Nt.ogImageAlt,ogImageWidth:1200,ogImageHeight:630,twitterHandle:"@MustWants",twitterDomain:"mustwants.com"},Ml=hr("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium 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 [&.border]:border-[1.5px] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-icon-accent text-mw-black font-semibold rounded-sm shadow-sm [background-image:none] hover:bg-icon-background hover:text-mw-black hover:shadow-md data-[state=active]:bg-icon-background data-[state=active]:text-mw-black data-[state=on]:bg-icon-background data-[state=on]:text-mw-black disabled:bg-mw-gray disabled:text-[#4E4E4E] disabled:shadow-none",destructive:"bg-destructive [background-image:none] text-destructive-foreground rounded-sm hover:bg-destructive/90",outline:"border-[1.5px] border-mw-dark-gray bg-transparent text-mw-dark-gray rounded-sm hover:bg-mw-dark-gray hover:text-white",outlineDark:"border-[1.5px] border-mw-gray-200 bg-transparent text-mw-gray-200 rounded-sm hover:bg-mw-gray-200 hover:text-mw-black",secondary:"border-[1.5px] border-mw-dark-gray bg-transparent text-mw-dark-gray rounded-sm hover:bg-mw-dark-gray hover:text-white",ghost:"hover:bg-accent hover:text-accent-foreground rounded-sm",link:"text-mw-olive underline-offset-4 hover:underline",signup:"bg-mw-red text-white font-semibold rounded-sm hover:bg-mw-red/90",login:"border-[1.5px] border-icon-accent text-icon-accent bg-transparent roun
507ded-sm hover:bg-icon-accent hover:text-mw-black",filter:"border-[1.5px] border-mw-dark-gray bg-transparent text-mw-black rounded-sm hover:bg-mw-dark-gray hover:text-white",filterActive:"border-[1.5px] border-mw-dark-gray bg-mw-dark-gray text-white rounded-sm hover:bg-mw-black"},size:{default:"h-10 px-6 py-2",sm:"h-9 px-4",lg:"h-12 px-8 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),U=d.forwardRef(({className:e,variant:t,size:r,asChild:a=!1,...n},o)=>{const i=a?Yr:"button",l=n["aria-label"]??(r==="icon"&&typeof n.title=="string"?n.title:void 0);return s.jsx(i,{className:F(Ml({variant:t,size:r,className:e})),ref:o,...n,"aria-label":l})});U.displayName="Button";const We=d.forwardRef(({className:e,type:t,...r},a)=>s.jsx("input",{type:t,className:F("flex h-10 w-full rounded-sm border-[1.5px] border-mw-dark-gray bg-white px-4 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-[hsl(var(--mw-placeholder))] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:border-mw-dark-gray disabled:cursor-not-allowed disabled:opacity-50 md:text-sm transition-colors",e),ref:a,...r}));We.displayName="Input";var O_="Label",eh=d.forwardRef((e,t)=>s.jsx(lt.label,{...e,ref:t,onMouseDown:r=>{var n;r.target.closest("button, input, select, textarea")||((n=e.onMouseDown)==null||n.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));eh.displayName=O_;var th=eh;const D_=hr("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Te=d.forwardRef(({className:e,...t},r)=>s.jsx(th,{ref:r,className:F(D_(),e),...t}));Te.displayName=th.displayName;const Ye={brand:{black:"#28262B",darkGray:"#28262B",gray:"#E5E7EB",white:"#FAFAFA",red:"#F40357",olive:"#CCD96F",turquoise:"#CCD96F"},css:{background:"hsl(var(--background))",foreground:"hsl(var(--foreground))",border:"hsl(var(--border))",mutedForeground:"hsl(var(--muted-foreground))",primary:"hsl(var(--primary))",mwBlack:"hsl(var(--mw-black))",mwRed:"hsl(var(--mw-red))",mwOlive:"hsl(var(--mw-olive))",mwTurquoise:"hsl(var(--mw-turquoise))"},surface:{white:"#ffffff",neutral100:"#E5E7EB",neutral200:"#e5e7eb",dark:"#1a1a1a",darkAlt:"#2a2a2a",darkInput:"#333",darkFooter:"#111",mapInk:"#28262B",transparent:"rgba(0,0,0,0)"},overlay:{black10:"rgba(0,0,0,0.1)",black20:"rgba(0,0,0,0.2)",black25:"rgba(0,0,0,0.25)",black28:"rgba(0,0,0,0.28)",black30:"rgba(0,0,0,0.3)",black35:"rgba(0,0,0,0.35)",black80:"rgba(0,0,0,0.8)",black100:"rgba(0, 0, 0, 1.0)",white95:"rgba(255,255,255,0.95)"},data:{noData:"#EF4444",noDataNeutral:"#e5e7eb",positiveGreen:"#22c55e",positiveLime:"#84cc16",warningYellow:"#eab308",warningOrange:"#f97316",blue:"#3b82f6",purple:"#a855f7",homeValueScale:["#D4DE1F","#D8E34D","#DDE77A","#E2EBA8","#E7EFD5","#ECF4E3"],wealthScale:["#5DA88A","#7DBDA3","#9DD1BC","#BDE5D5","#DEF2EA","#EEF8F4"],travelBlueScale:["#1a3a5c","#2563eb","#60a5fa","#93c5fd"],travelWarmScale:["#9a3412","#ea580c","#fb923c","#fed7aa"],travelPurpleScale:["#581c87","#7c3aed","#a78bfa","#c4b5fd"],crimeBlueScale:["#dbeafe","#93c5fd","#3b82f6","#1d4ed8","#1e3a5f"],riskScaleLowToHigh:["#22c55e","#84cc16","#eab308","#f97316","#ef4444"]},listing:{favorite:"#E91E63",viewed:"#9E9E9E",matchBadge:"#FAFAFA",hoverOutline:"#CCD96F",hoverBackground:"#E4E9BD"},icon:{accent:"#CCD96F",background:"#F7F9E8",foreground:"#6F781E"},social:{facebook:"#1877F2",instagram:"#E4405F",linkedin:"#0A66C2",youtube:"#FF0000",bluesky:"#1185FE",pinterest:"#BD081C",googleBlue:"#4285F4",googleGreen:"#34A853",googleYellow:"#FBBC05",googleRed:"#EA4335"}},x3={mapDrop:`drop-shadow(0 2px 4px ${Ye.overlay.black30})`,mapStrongDrop:`drop-shadow(0 2px 4px ${Ye.overlay.black35})`,mapTooltip:`0 2px 6px ${Ye.overlay.black30}`,mapCard:`0 2px 8px ${Ye.overlay.black30}`,mapLabel:"0 4px 12px rgba(0,0,0,0.15)"},er={agent:"#1B2A5B",broker:"#1B2A5B",lender:"#374151",home_inspector:"#5A7A1A",insurance_agent:"#6D28D9",title_insurance_agent:"#115E59",attorney:"#5B1A1A",property_manager:"#0F766E",business_owner:Ye.brand.olive},b3={agent:er.agent,lender:er.lender,home_inspector:er.home_inspector,insurance_agent:er.insurance_agent,title_insurance:"#B45309",real_estate_attorney:"#9F1239",property_manager:er.property_manager,business_owner:er.business_owner},y3={agent:"bg-pro-role-agent text-white",broker:"bg-pro-role-agent text-white",lender:"bg-pro-role-lender text-white",home_inspector:"bg-pro-role-home-inspector text-white",insurance_agent:"bg-pro-role-insurance-agent text-white",title_insurance_agent:"bg-pro-role-title-insurance text-white",attorney:"bg-pro-role-attorney text-white",property_manager:"bg-pro-role-property-manager text-white",business_owner:"bg-mw-olive text-mw-black"}
507,ys={"air-force":"#00308F",army:"#4B5320","coast-guard":"#223C70","marine-corps":"#A6192E",navy:"#000080","space-force":"#009EE0","army-guard":"#556B2F","air-guard":"#4169E1",dod:"#1C3D5A"},vr={facebook:"text-social-facebook hover:bg-social-facebook/10 focus-visible:ring-social-facebook/40",instagram:"text-social-instagram hover:bg-social-instagram/10 focus-visible:ring-social-instagram/40",linkedin:"text-social-linkedin hover:bg-social-linkedin/10 focus-visible:ring-social-linkedin/40",youtube:"text-social-youtube hover:bg-social-youtube/10 focus-visible:ring-social-youtube/40",bluesky:"text-social-bluesky hover:bg-social-bluesky/10 focus-visible:ring-social-bluesky/40",pinterest:"text-social-pinterest hover:bg-social-pinterest/10 focus-visible:ring-social-pinterest/40"},$o={chart:{primary:Ye.brand.olive,secondary:Ye.data.travelBlueScale[1],tertiary:Ye.data.warningYellow,accent:Ye.data.travelPurpleScale[1],warning:Ye.data.warningOrange,negative:Ye.brand.red,sequence:[Ye.brand.olive,Ye.data.travelBlueScale[1],Ye.data.warningYellow,Ye.data.travelPurpleScale[1],Ye.data.warningOrange,Ye.brand.red]},ui:{icon:"text-icon-accent",positiveText:"text-icon-foreground",highlightCard:"border-mw-olive/30 bg-icon-background",highlightPanel:"bg-icon-background"}},v3={sequence:$o.chart.sequence,primary:$o.chart.primary,info:$o.chart.secondary};function sh({label:e="Sign in with Google",disabled:t=!1,signupIntent:r}){const[a,n]=d.useState(!1),{toast:o}=At(),i=async()=>{n(!0);try{localStorage.setItem("oauthRedirectPending","true"),localStorage.setItem("oauthRedirectPendingAt",String(Date.now()));const l=new URLSearchParams(window.location.search).get("redirectTo");l!=null&&l.startsWith("/")&&!l.startsWith("//")&&localStorage.setItem("authRedirectTo",l),(r==null?void 0:r.userType)==="professional"&&r.proRole&&localStorage.setItem("proSignupIntent",JSON.stringify({role:r.proRole}));const{data:c,error:u}=await R.auth.signInWithOAuth({provider:"google",options:{redirectTo:window.location.origin,skipBrowserRedirect:!0}});if(u)throw u;c!=null&&c.url&&(window.location.href=c.url)}catch(l){localStorage.removeItem("oauthRedirectPending"),localStorage.removeItem("oauthRedirectPendingAt"),o({variant:"destructive",title:"Google sign-in failed",description:l instanceof Error?l.message:"An unexpected error occurred. Please try again."}),n(!1)}};return s.jsxs(U,{type:"button",variant:"outline",className:"relative w-full",onClick:i,disabled:a||t,children:[a?s.jsx(qt,{className:"mr-2 h-4 w-4 animate-spin"}):s.jsxs("svg",{className:"mr-2 h-4 w-4",viewBox:"0 0 24 24",children:[s.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:Ye.social.googleBlue}),s.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:Ye.social.googleGreen}),s.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:Ye.social.googleYellow}),s.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:Ye.social.googleRed})]}),s.jsx("span",{children:e}),s.jsx(cs,{className:"h-4 w-4","aria-hidden":"true"})]})}var F_=Object.defineProperty,$_=Object.defineProperties,B_=Object.getOwnPropertyDescriptors,On=Object.getOwnPropertySymbols,rh=Object.prototype.hasOwnProperty,ah=Object.prototype.propertyIsEnumerable,$d=(e,t,r)=>t in e?F_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z_=(e,t)=>{for(var r in t||(t={}))rh.call(t,r)&&$d(e,r,t[r]);if(On)for(var r of On(t))ah.call(t,r)&&$d(e,r,t[r]);return e},H_=(e,t)=>$_(e,B_(t)),U_=(e,t)=>{var r={};for(var a in e)rh.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&On)for(var a of On(e))t.indexOf(a)<0&&ah.call(e,a)&&(r[a]=e[a]);return r};function V_(e){let t=setTimeout(e,0),r=setTimeout(e,10),a=setTimeout(e,50);return[t,r,a]}function q_(e){let t=d.useRef();return d.useEffect(()=>{t.current=e}),t.current}var W_=18,nh=40,G_=`${nh}px`,Y_=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function K_({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:a}){let[n,o]=d.useState(!1),[i,l]=d.useState(!1),[c,u]=d.useState(!1),m=d.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&n&&i,[n,i,r]),h=d.useCallback(()=>{let p=e.current,f=t.current;
507if(!p||!f||c||r==="none")return;let y=p,x=y.getBoundingClientRect().left+y.offsetWidth,_=y.getBoundingClientRect().top+y.offsetHeight/2,b=x-W_,E=_;document.querySelectorAll(Y_).length===0&&document.elementFromPoint(b,E)===p||(o(!0),u(!0))},[e,t,c,r]);return d.useEffect(()=>{let p=e.current;if(!p||r==="none")return;function f(){let x=window.innerWidth-p.getBoundingClientRect().right;l(x>=nh)}f();let y=setInterval(f,1e3);return()=>{clearInterval(y)}},[e,r]),d.useEffect(()=>{let p=a||document.activeElement===t.current;if(r==="none"||!p)return;let f=setTimeout(h,0),y=setTimeout(h,2e3),x=setTimeout(h,5e3),_=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(f),clearTimeout(y),clearTimeout(x),clearTimeout(_)}},[t,a,r,h]),{hasPWMBadge:n,willPushPWMBadge:m,PWM_BADGE_SPACE_WIDTH:G_}}var oh=d.createContext({}),ih=d.forwardRef((e,t)=>{var r=e,{value:a,onChange:n,maxLength:o,textAlign:i="left",pattern:l,placeholder:c,inputMode:u="numeric",onComplete:m,pushPasswordManagerStrategy:h="increase-width",pasteTransformer:p,containerClassName:f,noScriptCSSFallback:y=Z_,render:x,children:_}=r,b=U_(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),E,v,w,N,C;let[j,k]=d.useState(typeof b.defaultValue=="string"?b.defaultValue:""),S=a??j,T=q_(S),M=d.useCallback(le=>{n==null||n(le),k(le)},[n]),P=d.useMemo(()=>l?typeof l=="string"?new RegExp(l):l:null,[l]),A=d.useRef(null),I=d.useRef(null),z=d.useRef({value:S,onChange:M,isIOS:typeof window<"u"&&((v=(E=window==null?void 0:window.CSS)==null?void 0:E.supports)==null?void 0:v.call(E,"-webkit-touch-callout","none"))}),L=d.useRef({prev:[(w=A.current)==null?void 0:w.selectionStart,(N=A.current)==null?void 0:N.selectionEnd,(C=A.current)==null?void 0:C.selectionDirection]});d.useImperativeHandle(t,()=>A.current,[]),d.useEffect(()=>{let le=A.current,he=I.current;if(!le||!he)return;z.current.value!==le.value&&z.current.onChange(le.value),L.current.prev=[le.selectionStart,le.selectionEnd,le.selectionDirection];function Oe(){if(document.activeElement!==le){re(null),H(null);return}let G=le.selectionStart,Ce=le.selectionEnd,$e=le.selectionDirection,Qe=le.maxLength,He=le.value,Ae=L.current.prev,bt=-1,De=-1,ot;if(He.length!==0&&G!==null&&Ce!==null){let Rs=G===Ce,ps=G===He.length&&He.length<Qe;if(Rs&&!ps){let ft=G;if(ft===0)bt=0,De=1,ot="forward";else if(ft===Qe)bt=ft-1,De=ft,ot="backward";else if(Qe>1&&He.length>1){let yt=0;if(Ae[0]!==null&&Ae[1]!==null){ot=ft<Ae[1]?"backward":"forward";let gs=Ae[0]===Ae[1]&&Ae[0]<Qe;ot==="backward"&&!gs&&(yt=-1)}bt=yt+ft,De=yt+ft+1}}bt!==-1&&De!==-1&&bt!==De&&A.current.setSelectionRange(bt,De,ot)}let mt=bt!==-1?bt:G,hs=De!==-1?De:Ce,Ft=ot??$e;re(mt),H(hs),L.current.prev=[mt,hs,Ft]}if(document.addEventListener("selectionchange",Oe,{capture:!0}),Oe(),document.activeElement===le&&X(!0),!document.getElementById("input-otp-style")){let G=document.createElement("style");if(G.id="input-otp-style",document.head.appendChild(G),G.sheet){let Ce="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";na(G.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),na(G.sheet,`[data-input-otp]:autofill { ${Ce} }`),na(G.sheet,`[data-input-otp]:-webkit-autofill { ${Ce} }`),na(G.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),na(G.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let tt=()=>{he&&he.style.setProperty("--root-height",`${le.clientHeight}px`)};tt();let K=new ResizeObserver(tt);return K.observe(le),()=>{document.removeEventListener("selectionchange",Oe,{capture:!0}),K.disconnect()}},[]);
507let[me,$]=d.useState(!1),[g,X]=d.useState(!1),[de,re]=d.useState(null),[D,H]=d.useState(null);d.useEffect(()=>{V_(()=>{var le,he,Oe,tt;(le=A.current)==null||le.dispatchEvent(new Event("input"));let K=(he=A.current)==null?void 0:he.selectionStart,G=(Oe=A.current)==null?void 0:Oe.selectionEnd,Ce=(tt=A.current)==null?void 0:tt.selectionDirection;K!==null&&G!==null&&(re(K),H(G),L.current.prev=[K,G,Ce])})},[S,g]),d.useEffect(()=>{T!==void 0&&S!==T&&T.length<o&&S.length===o&&(m==null||m(S))},[o,m,T,S]);let Z=K_({containerRef:I,inputRef:A,pushPasswordManagerStrategy:h,isFocused:g}),ee=d.useCallback(le=>{let he=le.currentTarget.value.slice(0,o);if(he.length>0&&P&&!P.test(he)){le.preventDefault();return}typeof T=="string"&&he.length<T.length&&document.dispatchEvent(new Event("selectionchange")),M(he)},[o,M,T,P]),ae=d.useCallback(()=>{var le;if(A.current){let he=Math.min(A.current.value.length,o-1),Oe=A.current.value.length;(le=A.current)==null||le.setSelectionRange(he,Oe),re(he),H(Oe)}X(!0)},[o]),Y=d.useCallback(le=>{var he,Oe;let tt=A.current;if(!p&&(!z.current.isIOS||!le.clipboardData||!tt))return;let K=le.clipboardData.getData("text/plain"),G=p?p(K):K;le.preventDefault();let Ce=(he=A.current)==null?void 0:he.selectionStart,$e=(Oe=A.current)==null?void 0:Oe.selectionEnd,Qe=(Ce!==$e?S.slice(0,Ce)+G+S.slice($e):S.slice(0,Ce)+G+S.slice(Ce)).slice(0,o);if(Qe.length>0&&P&&!P.test(Qe))return;tt.value=Qe,M(Qe);let He=Math.min(Qe.length,o-1),Ae=Qe.length;tt.setSelectionRange(He,Ae),re(He),H(Ae)},[o,M,P,S]),te=d.useMemo(()=>({position:"relative",cursor:b.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[b.disabled]),Se=d.useMemo(()=>({position:"absolute",inset:0,width:Z.willPushPWMBadge?`calc(100% + ${Z.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:Z.willPushPWMBadge?`inset(0 ${Z.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[Z.PWM_BADGE_SPACE_WIDTH,Z.willPushPWMBadge,i]),Le=d.useMemo(()=>d.createElement("input",H_(z_({autoComplete:b.autoComplete||"one-time-code"},b),{"data-input-otp":!0,"data-input-otp-placeholder-shown":S.length===0||void 0,"data-input-otp-mss":de,"data-input-otp-mse":D,inputMode:u,pattern:P==null?void 0:P.source,"aria-placeholder":c,style:Se,maxLength:o,value:S,ref:A,onPaste:le=>{var he;Y(le),(he=b.onPaste)==null||he.call(b,le)},onChange:ee,onMouseOver:le=>{var he;$(!0),(he=b.onMouseOver)==null||he.call(b,le)},onMouseLeave:le=>{var he;$(!1),(he=b.onMouseLeave)==null||he.call(b,le)},onFocus:le=>{var he;ae(),(he=b.onFocus)==null||he.call(b,le)},onBlur:le=>{var he;X(!1),(he=b.onBlur)==null||he.call(b,le)}})),[ee,ae,Y,u,Se,o,D,de,b,P==null?void 0:P.source,S]),fe=d.useMemo(()=>({slots:Array.from({length:o}).map((le,he)=>{var Oe;let tt=g&&de!==null&&D!==null&&(de===D&&he===de||he>=de&&he<D),K=S[he]!==void 0?S[he]:null,G=S[0]!==void 0?null:(Oe=c==null?void 0:c[he])!=null?Oe:null;return{char:K,placeholderChar:G,isActive:tt,hasFakeCaret:tt&&K===null}}),isFocused:g,isHovering:!b.disabled&&me}),[g,me,o,D,de,b.disabled,S]),Pe=d.useMemo(()=>x?x(fe):d.createElement(oh.Provider,{value:fe},_),[_,fe,x]);return d.createElement(d.Fragment,null,y!==null&&d.createElement("noscript",null,d.createElement("style",null,y)),d.createElement("div",{ref:I,"data-input-otp-container":!0,style:te,className:f},Pe,d.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Le)))});ih.displayName="Input";function na(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var Z_=` 508[data-input-otp] { 509 --nojs-bg: white !important; 510 --nojs-fg: black !important; 511 512 background-color: var(--nojs-bg) !important; 513 color: var(--nojs-fg) !important; 514 caret-color: var(--nojs-fg) !important; 515 letter-spacing: .25em !important; 516 text-align: center !important; 517 border: 1px solid var(--nojs-fg) !important; 518 border-radius: 4px !important; 519 width: 100% !important; 520} 521@media (prefers-color-scheme: dark) { 522 [data-input-otp] { 523 --nojs-bg: black !important; 524 --nojs-fg: white !important; 525 } 526}`;const Ll=d.forwardRef(({className:e,containerClassName:t,...r},a)=>s.jsx(ih,{ref:a,containerClassName:F("flex items-center gap-2 has-[:disabled]:opacity-50",t),className:F("disabled:cursor-not-allowed",e),...r}));
526Ll.displayName="InputOTP";const Ol=d.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:F("flex items-center",e),...t}));Ol.displayName="InputOTPGroup";const Rt=d.forwardRef(({index:e,className:t,...r},a)=>{const n=d.useContext(oh),{char:o,hasFakeCaret:i,isActive:l}=n.slots[e];return s.jsxs("div",{ref:a,className:F("relative flex h-10 w-10 items-center justify-center border-y-[1.5px] border-r-[1.5px] border-mw-dark-gray text-sm transition-all first:rounded-l-md first:border-l-[1.5px] last:rounded-r-md",l&&"z-10 ring-2 ring-ring ring-offset-background",t),...r,children:[o,i&&s.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:s.jsx("div",{className:"animate-caret-blink h-4 w-px bg-foreground duration-1000"})})]})});Rt.displayName="InputOTPSlot";const Q_=d.forwardRef(({...e},t)=>s.jsx("div",{ref:t,role:"separator",...e,children:s.jsx(m2,{})}));Q_.displayName="InputOTPSeparator";function lh({onSubmit:e,isLoading:t,errors:r,onCreateAccount:a,onSendMagicCode:n,onVerifyMagicCode:o,onSendResetCode:i,onResetPassword:l,initialMagicEmail:c,onMagicEmailConsumed:u}){const[m,h]=d.useState("email"),[p,f]=d.useState(""),[y,x]=d.useState(!1),[_,b]=d.useState(!1),[E,v]=d.useState(!1),[w,N]=d.useState(""),[C,j]=d.useState(0),[k,S]=d.useState(!1),[T,M]=d.useState(""),[P,A]=d.useState(""),[I,z]=d.useState(""),[L,me]=d.useState(""),$="login-local-error";d.useEffect(()=>{c&&(f(c),h("magic-otp"),j(60),u==null||u())},[c,u]),d.useEffect(()=>{if(C<=0)return;const fe=setTimeout(()=>j(C-1),1e3);return()=>clearTimeout(fe)},[C]);const g=fe=>{fe.preventDefault();const Pe=p.trim();Pe&&(f(Pe),h("password"))},X=async fe=>{fe.preventDefault();const le=new FormData(fe.currentTarget).get("password");await e(p,le,!0)},de=async()=>{S(!0),z("");const fe=await n(p);fe?z(fe):(h("magic-otp"),N(""),j(60)),S(!1)},re=async()=>{S(!0),z("");const fe=await i(p);fe?z(fe):(h("forgot-otp"),N(""),j(60)),S(!1)},D=async()=>{if(w.length!==6)return;S(!0),z("");const fe=await o(p,w);fe&&(z(fe),N("")),S(!1)},H=()=>{w.length===6&&(me(w),N(""),z(""),h("new-password"))},Z=async fe=>{if(fe.preventDefault(),z(""),T.length<8){z("Password must be at least 8 characters");return}if(T!==P){z("Passwords do not match");return}S(!0);const Pe=await l(p,L,T);Pe&&z(Pe),S(!1)},ee=async fe=>{j(60);const Pe=fe==="magiclink"?await n(p):await i(p);Pe&&z(Pe)},ae=s.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["First time here?"," ",s.jsx("button",{type:"button",onClick:a,className:"text-mw-black font-bold underline underline-offset-2 transition-colors hover:text-icon-foreground",children:"Create an account"})]}),Y=s.jsxs("div",{className:"relative my-4",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx("span",{className:"w-full border-t"})}),s.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:s.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"or"})})]}),te=()=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"login-inline-email",className:"sr-only",children:"Email"}),s.jsx(We,{id:"login-inline-email",type:"email",value:p,onChange:fe=>f(fe.target.value),autoComplete:"email",autoCapitalize:"none",autoCorrect:"off",inputMode:"email"})]}),Se=s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"login-otp-code",className:"sr-only",children:"Verification code"}),s.jsx("p",{id:"login-otp-help",className:"sr-only",children:"Enter the 6-digit code sent to your email."}),s.jsx("div",{className:"flex justify-center",children:s.jsx(Ll,{id:"login-otp-code",maxLength:6,value:w,onChange:N,autoComplete:"one-time-code",inputMode:"numeric",pattern:"\\d*","aria-label":"6-digit verification code","aria-describedby":I?`login-otp-help ${$}`:"login-otp-help","aria-invalid":!!I,children:s.jsxs(Ol,{children:[s.jsx(Rt,{index:0}),s.jsx(Rt,{index:1}),s.jsx(Rt,{index:2}),s.jsx(Rt,{index:3}),s.jsx(Rt,{index:4}),s.jsx(Rt,{index:5})]})})})]}),Le=fe=>s.jsx(U,{type:"button",variant:"outline",className:"w-full",onClick:()=>ee(fe),disabled:C>0,children:C>0?`Resend in ${C}s`:"Resend code"});return m==="email"?s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"font-heading font-bold text-2xl text-center",children:"Sign in to MustWants"}),s.jsxs("form",{onSubmit:g,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"login-email",children:"Email"}),s.jsx(We,{id:"login-email",type:"email",placeholder:"[email protected]",value:p,onChange:fe=>f(fe.target.value),autoComplete:"email",autoCapitalize:"none",autoCorrect:"off",inputMode:"email","aria-invalid":!!r.email,"aria-describedby":r.email?"login-email-error":void 0,required:!0}),r.email&&s.jsx("p",{id:"login-email-error",role:"alert","aria-live":"assertive",className:"text-destructive text-sm",children:r.email})]}),s.jsx(U,{type:"submit",className:"w-full",children:"Continue"})]}),Y,s.jsx(sh,{label:"Continue with Google"}),ae]}):m==="password"?s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"font-heading font-bold text-2xl",children:"Enter your password"}),te(),s.jsxs("form",{onSubmit:X,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"login-password",children:"Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(We,{id:"login-password",name:"password",type:y?"text":"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",autoComplete:"current-password","aria-invalid":!!(r.password||I),"aria-describedby":[r.password?"login-password-error":"",I?$:""].filter(
526Boolean).join(" ")||void 0,required:!0}),s.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",onClick:()=>x(!y),children:y?s.jsx(ya,{className:"h-4 w-4"}):s.jsx(or,{className:"h-4 w-4"})})]}),r.password&&s.jsx("p",{id:"login-password-error",role:"alert","aria-live":"assertive",className:"text-destructive text-sm",children:r.password}),s.jsx("div",{className:"flex items-center gap-1.5 text-sm",children:s.jsx("button",{type:"button",onClick:re,disabled:k,className:"text-mw-black font-bold underline disabled:opacity-50",children:"Forgot password?"})})]}),s.jsx(U,{type:"submit",className:"w-full",disabled:t,children:t?s.jsxs(s.Fragment,{children:[s.jsx(qt,{className:"mr-2 h-4 w-4 animate-spin"}),"Signing in..."]}):"Continue"}),s.jsx(U,{type:"button",variant:"outline",onClick:de,disabled:k,className:"w-full",children:k?"Sending...":"Send a secure code to your email"})]}),I&&s.jsx("p",{id:$,role:"alert","aria-live":"assertive",className:"text-destructive text-sm text-center",children:I}),ae]}):m==="magic-otp"?s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"font-heading font-bold text-2xl",children:"Check your inbox"}),te(),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["We sent a sign-in code to ",s.jsx("span",{className:"font-semibold text-foreground",children:p})]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Can't find it? Check your spam or junk folder - the email comes from ",s.jsx("span",{className:"font-medium",children:Bi}),"."]}),Se,I&&s.jsx("p",{id:$,role:"alert","aria-live":"assertive",className:"text-destructive text-sm text-center",children:I}),s.jsx(U,{className:"w-full",onClick:D,disabled:w.length!==6||k,children:k?s.jsxs(s.Fragment,{children:[s.jsx(qt,{className:"mr-2 h-4 w-4 animate-spin"}),"Verifying..."]}):"Verify Code"}),Le("magiclink"),ae]}):m==="forgot-otp"?s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"font-heading font-bold text-2xl",children:"Check your inbox"}),te(),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["We sent a reset code to ",s.jsx("span",{className:"font-semibold text-foreground",children:p}),". Can't find it? Check your spam or junk folder - the email comes from ",s.jsx("span",{className:"font-medium",children:Bi}),"."]}),Se,I&&s.jsx("p",{id:$,role:"alert","aria-live":"assertive",className:"text-destructive text-sm text-center",children:I}),s.jsx(U,{className:"w-full",onClick:H,disabled:w.length!==6,children:"Continue"}),Le("recovery"),ae]}):s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"font-heading font-bold text-2xl",children:"Set new password"}),te(),s.jsxs("form",{onSubmit:Z,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"new-password",children:"New password"}),s.jsxs("div",{className:"relative",children:[s.jsx(We,{id:"new-password",type:_?"text":"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:T,onChange:fe=>M(fe.target.value),autoComplete:"new-password","aria-invalid":!!I,"aria-describedby":I?$:void 0,required:!0}),s.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",onClick:()=>b(!_),children:_?s.jsx(ya,{className:"h-4 w-4"}):s.jsx(or,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"confirm-password",children:"Confirm password"}),s.jsxs("div",{className:"relative",children:[s.jsx(We,{id:"confirm-password",type:E?"text":"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:P,onChange:fe=>A(fe.target.value),autoComplete:"new-password","aria-invalid":!!I,"aria-describedby":I?$:void 0,required:!0}),s.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",onClick:()=>v(!E),children:E?s.jsx(ya,{className:"h-4 w-4"}):s.jsx(or,{className:"h-4 w-4"})})]})]}),I&&s.jsx("p",{id:$,role:"alert","aria-live":"assertive",className:"text-destructive text-sm",children:I}),s.jsx(U,{type:"submit",className:"w-full",disabled:k,children:k?s.jsxs(s.Fragment,{children:[s.jsx(qt,{className:"mr-2 h-4 w-4 animate-spin"}),"Resetting..."]}):"Reset Password"})]}),ae]})}const io=pg,lo=gg,Ha=d.forwardRef(({className:e,children:t,...r},a)=>s.jsxs(Lu,{ref:a,className:F("flex h-10 w-full items-center justify-between rounded-md border-[1.5px] border-mw-dark-gray bg-background px-3 py-2 text-sm r
526ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-inset focus:ring-ring focus:border-mw-dark-gray disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,s.jsx(dg,{asChild:!0,children:s.jsx(Zs,{className:"h-4 w-4 opacity-50"})})]}));Ha.displayName=Lu.displayName;const ch=d.forwardRef(({className:e,...t},r)=>s.jsx(Ou,{ref:r,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(jl,{className:"h-4 w-4"})}));ch.displayName=Ou.displayName;const dh=d.forwardRef(({className:e,...t},r)=>s.jsx(Du,{ref:r,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(Zs,{className:"h-4 w-4"})}));dh.displayName=Du.displayName;const Ua=d.forwardRef(({className:e,children:t,position:r="popper",...a},n)=>s.jsx(ug,{children:s.jsxs(Fu,{ref:n,className:F("relative z-[70] 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",r==="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:r,...a,children:[s.jsx(ch,{}),s.jsx(mg,{className:F("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(dh,{})]})}));Ua.displayName=Fu.displayName;const X_=d.forwardRef(({className:e,...t},r)=>s.jsx($u,{ref:r,className:F("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));X_.displayName=$u.displayName;const Va=d.forwardRef(({className:e,children:t,...r},a)=>s.jsxs(Bu,{ref:a,className:F("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(fg,{children:s.jsx(kf,{className:"h-4 w-4"})})}),s.jsx(hg,{children:t})]}));Va.displayName=Bu.displayName;const J_=d.forwardRef(({className:e,...t},r)=>s.jsx(zu,{ref:r,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));J_.displayName=zu.displayName;const Dl={agent:"Real Estate Agent / Broker",broker:"Real Estate Agent / Broker",attorney:"Real Estate Attorney",home_inspector:"Home Inspector",insurance_agent:"Insurance Agent",lender:"Mortgage Lender",title_insurance_agent:"Title Insurance Agent",property_manager:"Property Manager",business_owner:"Business Partner"},qa=["agent","lender","home_inspector","attorney","insurance_agent","title_insurance_agent","property_manager","business_owner"],w3={agent:{title:"Real Estate Agents",singularTitle:"Real Estate Agent / Broker",fields:[{id:"brokerage",label:"Brokerage Affiliation",placeholder:"e.g., RE/MAX, Keller Williams",helpText:"Your affiliated brokerage",type:"text"}]},broker:{title:"Real Estate Agents",singularTitle:"Real Estate Agent / Broker",fields:[]},lender:{title:"Mortgage Lenders",singularTitle:"Mortgage Lender",fields:[{id:"nmlsId",label:"NMLS ID",placeholder:"Your NMLS ID number",helpText:"Nationwide Multistate Licensing System ID",type:"text",required:!0},{id:"loanTypes",label:"Loan Types Offered",placeholder:"Select loan types",type:"multiselect",options:["VA Loans","FHA Loans","Conventional","USDA Loans","Jumbo Loans","Refinancing"]}]},attorney:{title:"Real Estate Attorneys",singularTitle:"Real Estate Attorney",fields:[{id:"barNumber",label:"Bar Number",placeholder:"Your state bar number",type:"text",required:!0},{id:"barState",label:"Bar State",placeholder:"State where you're licensed",type:"text",required:!0},{id:"practiceAreas",label:"Practice Areas",placeholder:"Select practice areas",type:"multiselect",options:["Residential Real Estate","Commercial Real Estate","SCRA/Military Law","Foreclosure Defense","Title Disputes","Contract Review"]}]},home_inspector:{title:"Home Inspectors",singularTitle:"Home Inspector",fields:[{id:"inspectionTypes",label:"Inspection Types",placeholder:"Select inspection types",type:"multiselect",options:["General Home Inspection","Rad
526on Testing","Mold Inspection","Termite/Pest Inspection","Pool/Spa Inspection","Roof Inspection","HVAC Inspection","Electrical Inspection","Plumbing Inspection"]},{id:"inspectionAssociations",label:"Professional Associations",placeholder:"e.g., ASHI, InterNACHI",type:"text"}]},insurance_agent:{title:"Insurance Agents",singularTitle:"Insurance Agent",fields:[{id:"insuranceTypes",label:"Insurance Types",placeholder:"Select insurance types",type:"multiselect",options:["Homeowners Insurance","Flood Insurance","Title Insurance","Life Insurance","Auto Insurance","Umbrella Policies"]},{id:"licensedStates",label:"Licensed States",placeholder:"States where you're licensed",helpText:"Enter comma-separated state codes",type:"text"}]},title_insurance_agent:{title:"Title Insurance Agents",singularTitle:"Title Insurance Agent",fields:[{id:"underwriters",label:"Underwriter Affiliations",placeholder:"Select underwriters",type:"multiselect",options:["First American","Fidelity National","Old Republic","Stewart Title","Chicago Title","WFG National Title"]},{id:"titleServices",label:"Services Offered",placeholder:"Select services",type:"multiselect",options:["Title Search","Title Insurance","Escrow Services","Closing Services","Document Preparation"]}]},property_manager:{title:"Property Managers",singularTitle:"Property Manager",fields:[{id:"portfolioSize",label:"Portfolio Size",placeholder:"Number of properties managed",type:"text"},{id:"propertyTypes",label:"Property Types",placeholder:"Select property types",type:"multiselect",options:["Single Family Homes","Condos/Townhomes","Multi-Family","Vacation Rentals","Commercial"]},{id:"pmServices",label:"Services Offered",placeholder:"Select services",type:"multiselect",options:["Tenant Screening","Rent Collection","Maintenance Coordination","Property Marketing","Financial Reporting","Eviction Handling"]}]},business_owner:{title:"Business Partners",singularTitle:"Business Partner",fields:[]}};function uh({userType:e,onSubmit:t,isLoading:r,errors:a,signupEmail:n,onSignupEmailChange:o,onEmailBlur:i,emailCheckLoading:l,emailExists:c,onBack:u,onGoToLogin:m,onSendMagicLink:h,sendingVerification:p,defaultReferralCode:f,defaultProRole:y,defaultFirstName:x}){const[_,b]=d.useState(!1),[E,v]=d.useState(!1),[w,N]=d.useState(y||""),[C,j]=d.useState(x||""),[k,S]=d.useState(""),[T,M]=d.useState(f||""),[P,A]=d.useState(""),[I,z]=d.useState(""),[L,me]=d.useState(""),$="signup-form-error",g=qa.map(ee=>[ee,Dl[ee]]),X=async()=>{if(me(""),P.length<8){me("Password must be at least 8 characters");return}if(P!==I){me("Passwords do not match");return}await t({firstName:C,lastName:k,email:n,password:P,confirmPassword:I,referralCode:T,...e==="professional"&&w?{proRole:w}:{}})},de=s.jsxs("div",{className:"relative my-4",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx("span",{className:"w-full border-t"})}),s.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:s.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"or"})})]}),re=s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"referralCode",children:"Referral Code (optional)"}),s.jsx(We,{id:"referralCode",placeholder:"ENTER A REFERRAL CODE",value:T,onChange:ee=>M(ee.target.value),autoComplete:"off"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"If someone referred you, enter the
526ir code here"})]}),D=s.jsxs("div",{className:"space-y-2",children:[s.jsx(sh,{label:"Sign up with Google",disabled:e==="professional"&&!w,signupIntent:{userType:e,proRole:w||void 0}}),e==="professional"&&!w&&s.jsx("p",{className:"text-center text-sm font-medium text-mw-red",children:"Select your profession first"})]}),H=s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Te,{htmlFor:"firstName",children:["First Name ",s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsx(We,{id:"firstName",value:C,onChange:ee=>j(ee.target.value),autoComplete:"given-name",required:!0,minLength:2,maxLength:50})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Te,{htmlFor:"lastName",children:["Last Name ",s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsx(We,{id:"lastName",value:k,onChange:ee=>S(ee.target.value),autoComplete:"family-name",required:!0,minLength:2,maxLength:50})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Te,{htmlFor:"signup-email",children:["Email ",s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsx(We,{id:"signup-email",type:"email",placeholder:"[email protected]",required:!0,value:n,onChange:ee=>o(ee.target.value),onBlur:i,autoComplete:"email",autoCapitalize:"none",autoCorrect:"off",inputMode:"email","aria-invalid":!!a.email,"aria-describedby":a.email?"signup-email-error":void 0}),l&&s.jsxs("p",{role:"status","aria-live":"polite",className:"text-muted-foreground text-sm flex items-center gap-1",children:[s.jsx(qt,{className:"h-3 w-3 animate-spin"})," Checkingâ¦"]}),c&&s.jsxs("div",{className:"rounded-md border border-mw-olive/30 bg-icon-background p-3 text-sm space-y-2",children:[s.jsx("p",{className:"font-medium text-foreground",children:"This email is already registered."}),s.jsx("p",{className:"text-muted-foreground",children:"Log in or send a secure code instead."}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(U,{type:"button",size:"sm",variant:"outline",onClick:m,children:"Log in"}),s.jsxs(U,{type:"button",size:"sm",onClick:h,disabled:p,children:[p?s.jsx(qt,{className:"h-3 w-3 animate-spin mr-1"}):s.jsx(ao,{className:"h-3 w-3 mr-1"}),"Send Secure Code"]})]})]}),a.email&&s.jsx("p",{id:"signup-email-error",role:"alert","aria-live":"assertive",className:"text-destructive text-sm",children:a.email})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Te,{htmlFor:"signup-password",children:["Password ",s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsxs("div",{className:"relative",children:[s.jsx(We,{id:"signup-password",type:_?"text":"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:P,onChange:ee=>A(ee.target.value),autoComplete:"new-password","aria-invalid":!!(a.password||L),"aria-describedby":[a.password?"signup-password-error":"",L?$:""].filter(Boolean).join(" ")||void 0,required:!0}),s.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",onClick:()=>b(!_),children:_?s.jsx(ya,{className:"h-4 w-4"}):s.jsx(or,{className:"h-4 w-4"})})]}),a.password&&s.jsx("p",{id:"signup-password-error",role:"alert","aria-live":"assertive",className:"text-destructive text-sm",children:a.password})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Te,{htmlFor:"confirmPassword",children:["Confirm Password ",s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsxs("div",{className:"relative",children:[s.jsx(We,{id:"confirmPassword",type:E?"text":"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:I,onChange:ee=>z(ee.target.value),autoComplete:"new-password","aria-invalid":!!(a.c
526onfirmPassword||L),"aria-describedby":[a.confirmPassword?"signup-confirm-password-error":"",L?$:""].filter(Boolean).join(" ")||void 0,required:!0}),s.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",onClick:()=>v(!E),children:E?s.jsx(ya,{className:"h-4 w-4"}):s.jsx(or,{className:"h-4 w-4"})})]}),a.confirmPassword&&s.jsx("p",{id:"signup-confirm-password-error",role:"alert","aria-live":"assertive",className:"text-destructive text-sm",children:a.confirmPassword})]}),L&&s.jsx("p",{id:$,role:"alert","aria-live":"assertive",className:"text-destructive text-sm",children:L})]}),Z=s.jsx(U,{type:"button",className:"w-full enabled:bg-mw-olive enabled:text-mw-black enabled:hover:bg-mw-olive/90",onClick:X,disabled:r||!C.trim()||!k.trim()||!n.trim()||e==="professional"&&!w,children:r?s.jsxs(s.Fragment,{children:[s.jsx(qt,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating account..."]}):e==="buyer"?"Create a Free Account":"Create a Pro Account"});return s.jsxs("div",{className:"space-y-4",children:[s.jsxs(U,{type:"button",variant:"ghost",size:"sm",onClick:u,className:"-ml-2 h-8 px-2 text-muted-foreground hover:text-foreground",children:[s.jsx(eo,{className:"h-4 w-4"}),"Back"]}),s.jsx("h2",{className:"font-heading font-bold text-2xl",children:e==="buyer"?"Create your user account":"Create your pro account"}),e==="professional"&&s.jsx("div",{className:"space-y-4",children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Te,{children:["Professional Type ",s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsxs(io,{value:w,onValueChange:ee=>N(ee),children:[s.jsx(Ha,{className:"bg-background",children:s.jsx(lo,{placeholder:"Select your profession"})}),s.jsx(Ua,{className:"bg-background z-50",children:g.map(([ee,ae])=>s.jsx(Va,{value:ee,children:ae},ee))})]})]})}),e==="buyer"?s.jsxs(s.Fragment,{children:[re,s.jsx("div",{className:"flex justify-center","aria-hidden":"true",children:s.jsx("span",{className:"h-px w-8 rounded-full bg-border"})}),D,de,H,Z]}):s.jsxs(s.Fragment,{children:[re,s.jsx("div",{className:"flex justify-center","aria-hidden":"true",children:s.jsx("span",{className:"h-px w-8 rounded-full bg-border"})}),D,de,H,Z]}),s.jsxs("p",{className:"text-center text-xs text-muted-foreground",children:["By signing up, you agree to our"," ",s.jsx(oe,{to:"/policies?tab=terms",target:"_blank",className:"text-mw-black font-bold underline",children:"Terms of Service"})," ","and"," ",s.jsx(oe,{to:"/policies?tab=privacy",target:"_blank",className:"text-mw-black font-bold underline",children:"Privacy Policy"})]})]})}function mh({onSelect:e,onGoToLogin:t}){return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"font-heading font-bold text-2xl text-center",children:"Choose Your Account Type"}),s.jsxs("div",{className:"space-y-3 py-4",children:[s.jsx(U,{type:"button",className:"w-full",onClick:()=>e("buyer"),children:"I'm a Home Buyer or Seller"}),s.jsx(U,{type:"button",variant:"outline",className:"w-full",onClick:()=>e("professional"),children:"I'm a Real Estate Professional"})]})]}),s.jsxs("div",{className:"flex items-start gap-3 rounded-sm bg-muted px-4 py-3",children:[s.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-mw-red text-white",children:s.jsx(b2,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-foreground",children:"MustWants Will Never Sell Your Data or Leads"}),s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Your personal information stays private and secure, always."})]})]}),s.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Already have an account?"," ",s.jsx("button",{type:"button",onClick:t,className:"font-bold text-mw-black underline underline-offset-2 transition-colors hover:text-icon-foreground",children:"Sign in"})]})]})}const Bd=oo().email("Please enter a valid email address"),ej=oo().min(8,"Password must be at least 8 characters");function tj(){const{isOpen:e,tab:t,defaultProRole:r,requestKey:a,closeAuthModal:n}=za(),{signIn:o,signUp:i,refreshProfile:l}=be(),c=ct(),{toast:u}=At(),[m,h]=d.useState(!1),[p,f]=d.useState({}),[y,x]=d.useState(t),[_,b]=d.useState("buyer"),[E,v]=d.useState(!!r),[w,N]=d.use
526State(""),[C,j]=d.useState(!1),[k,S]=d.useState(!1),[T,M]=d.useState(!1);d.useEffect(()=>{e&&(x(t),f({}),h(!1),r?(b("professional"),v(!0)):t==="login"?v(!1):t==="signup"&&(b("buyer"),v(!1)))},[r,e,a,t]);const P=D=>{D||(n(),setTimeout(()=>{f({}),h(!1),N(""),j(!1),v(!1)},200))},A=D=>{b(D),v(!0)},I=(D,H)=>{const Z={};try{Bd.parse(D)}catch(ee){ee instanceof Lt&&(Z.email=ee.errors[0].message)}try{ej.parse(H)}catch(ee){ee instanceof Lt&&(Z.password=ee.errors[0].message)}return f(Z),Object.keys(Z).length===0},z=async(D,H,Z)=>{if(!I(D,H))return;h(!0);const{error:ee}=await o(D,H,Z);if(ee)u({variant:"destructive",title:"Sign in failed",description:ee.message==="Invalid login credentials"?"Email or password is incorrect. Please try again.":ee.message});else{u({title:"Welcome back!",description:"You have successfully signed in."});const{data:{session:ae}}=await R.auth.getSession();if(ae!=null&&ae.user){const{data:Y}=await R.from("profiles").select("password_reset_required").eq("user_id",ae.user.id).single();Y!=null&&Y.password_reset_required&&(await R.from("profiles").update({password_reset_required:!1}).eq("user_id",ae.user.id),await l())}n()}h(!1)},L=d.useCallback(async D=>{const{data:H,error:Z}=await R.functions.invoke("custom-otp",{body:{action:"send",email:D.trim(),type:"magiclink"}});return Z||!(H!=null&&H.success)?(H==null?void 0:H.error)||"Failed to send code":(u({title:"Code sent!",description:"Check your inbox for a sign-in code."}),null)},[u]),me=async(D,H)=>{const{data:Z,error:ee}=await R.functions.invoke("custom-otp",{body:{action:"verify",email:D.trim(),code:H,type:"magiclink"}});
526if(ee||!(Z!=null&&Z.success))return(Z==null?void 0:Z.error)||"Invalid or expired code.";if(Z.token_hash){const{error:ae}=await R.auth.verifyOtp({token_hash:Z.token_hash,type:"magiclink"});if(ae)return ae.message}return n(),null},$=async D=>{const{data:H,error:Z}=await R.functions.invoke("custom-otp",{body:{action:"send",email:D.trim(),type:"recovery"}});return Z||!(H!=null&&H.success)?(H==null?void 0:H.error)||"Failed to send code":(u({title:"Code sent!",description:"Check your inbox for a reset code."}),null)},g=async(D,H,Z)=>{const{data:ee,error:ae}=await R.functions.invoke("custom-otp",{body:{action:"verify",email:D.trim(),code:H,type:"recovery",new_password:Z}});return ae||!(ee!=null&&ee.success)?(ee==null?void 0:ee.error)||"Failed to reset password.":(u({title:"Password reset!",description:"You can now sign in with your new password."}),null)},X=async D=>{var ee;if(!I(D.email,D.password))return;if(D.password!==D.confirmPassword){f({confirmPassword:"Passwords do not match"});return}if(_==="professional"&&!D.proRole){u({variant:"destructive",title:"Professional type required",description:"Please select your professional type."});return}h(!0);let H;if((ee=D.referralCode)!=null&&ee.trim())try{const{data:ae,error:Y}=await R.functions.invoke("check-referral-code",{body:{code:D.referralCode.trim()}});!Y&&(ae!=null&&ae.valid)&&(H=ae.code)}catch{}const{error:Z}=await i(D.email,D.password,_,{first_name:D.firstName,last_name:D.lastName,referred_by_code:H,..._==="professional"&&D.proRole?{pro_role:D.proRole}:{}});if(Z){let ae=Z.message;if(ae.includes("already registered")){ae="An account with this email already exists. Please log in instead.",u({variant:"destructive",title:"Sign up failed",description:ae}),x("login"),h(!1);return}u({variant:"destructive",title:"Sign up failed",description:ae}),h(!1);return}try{await R.functions.invoke("custom-otp",{body:{action:"send",email:D.email,type:"signup"}})}catch{}n(),c("/auth?tab=signup"),h(!1)},de=async()=>{var H;const D=w.trim();if(!D){j(!1);return}try{Bd.parse(D)}catch{j(!1);return}S(!0);try{const Z=await R.functions.invoke("check-email-exists",{body:{email:D}});j(((H=Z.data)==null?void 0:H.exists)===!0)}catch{j(!1)}S(!1)},re=d.useCallback(async()=>{M(!0);const D=await L(w.trim());D?u({variant:"destructive",title:"Error",description:D}):x("login"),M(!1)},[L,w,u]);return s.jsx(_t,{open:e,onOpenChange:P,children:s.jsxs(gt,{className:"max-h-[90dvh] overflow-y-auto p-6 sm:max-w-lg",children:[s.jsx(Yi,{children:s.jsx(ut,{children:y==="login"?"Sign In":"Create Account"})}),y==="login"?s.jsx(lh,{onSubmit:z,isLoading:m,errors:p,onCreateAccount:()=>{v(!1),x("signup")},onSendMagicCode:L,onVerifyMagicCode:me,onSendResetCode:$,onResetPassword:g}):E?s.jsx(uh,{userType:_,onSubmit:X,isLoading:m,errors:p,signupEmail:w,onSignupEmailChange:D=>{N(D),j(!1)},onEmailBlur:de,emailCheckLoading:k,emailExists:C,onBack:()=>v(!1),onGoToLogin:()=>x("login"),onSendMagicLink:re,sendingVerification:T,defaultProRole:r}):s.jsx(mh,{onSelect:A,onGoToLogin:()=>x("login")})]})})}function sj(){const{pathname:e}=Et();return d.useEffect(()=>{window.scrollTo(0,0)},[e]),null}const wr=20,zd=864e5,rj=8e3,aj=6e3,nj=1e4,oj=6e4,ij=3,lj=8e3,Bo="mw-sp-shown-count",zo="mw-sp-cooldown-until";function vn(e){return e.replace(/\s*\([^)]*@[^)]*\)\s*/g," ").trim()}function cj(e){const t=vn(e),r=t.match(/^(.+?)\s+just\s+/i),a=r?r[1].trim():t,n=a.lastIndexOf(":"),i=(n!==-1?a.slice(n+1).trim():a).split(/\s+/).filter(Boolean);if(i.length>=2){const l=i[0].charAt(0).toUpperCase()+i[0].slice(1).toLowerCase(),c=i[i.length-1][0].toUpperCase();return`${l} ${c}.`}return i.length===1&&i[0].length>1&&!i[0].includes("@")?i[0].charAt(0).toUpperCase()+i[0].slice(1).toLowerCase():"Someone"}function dj(e){switch(e.type){case"new_user":return{text:`${cj(e.message||e.title)} just joined MustWants!`,href:"/signup",icon:Al};case"pending_app":{const t=e.title.replace(/^New\s+(Professional\s+)?Application:\s*/i,"").replace(/\s*application$/i,"").trim();return{text:`${/^[aeiou]/i.test(t)?"An":"A"} ${t} is joining!`,href:"/find-pro",icon:to}}case"new_listing":return{text:vn(e.message||e.title),href:"/find-home",icon:ns};case"new_blog":return{text:e.title,href:"/blog",icon:wl};case"home_saved":return{text:vn(e.message||"A home was just saved to favorites!"),href:"/find-home",icon:Gs};case"pro_connected":return{text:vn(e.message||"A buyer just connected with a professional!"),href:"/find-pro",icon:ro};default:return null}}function uj(e){const t=[...e];for(let r=t.length-1;r>0;r--){const a=Math.floor(Math.random()*(r+1));[t[r],t[a]]=[t[a],t[r]]}return t}function Hd(e,t){try{return parseInt(localStorage.getItem(e)||Str
526ing(t),10)||t}catch{return t}}function sn(e,t){try{localStorage.setItem(e,String(t))}catch{}}function mj(){const{user:e,isLoading:t}=be(),r=ct(),{pathname:a}=Et(),n=d.useRef([]),o=d.useRef(0),i=d.useRef(0),l=d.useRef(0),c=d.useRef(),u=d.useRef(!1),m=d.useRef(r);m.current=r;const h=d.useCallback(()=>Date.now()<Hd(zo,0),[]),p=d.useCallback(()=>{if(h())return;if(i.current>=wr){sn(zo,Date.now()+zd);return}if(o.current>=n.current.length)return;const y=n.current[o.current];o.current++;const x=dj(y);if(!x){f(0);return}if(it({description:x.text,duration:lj}),i.current++,l.current++,sn(Bo,i.current),i.current>=wr){sn(zo,Date.now()+zd);return}f()},[]),f=d.useCallback(y=>{if(i.current>=wr||o.current>=n.current.length)return;let x;typeof y=="number"?x=y:l.current>=ij?(l.current=0,x=oj):x=nj,c.current=setTimeout(p,x)},[]);return d.useEffect(()=>{if(t||e||u.current||h())return;u.current=!0,i.current=Hd(Bo,0),i.current>=wr&&(i.current=0,sn(Bo,0));const y=setTimeout(async()=>{for(let x=0;x<2;x++){const{data:_,error:b}=await R.rpc("get_social_proof_events");if(!b&&_&&_.length>0){n.current=uj(_),i.current<wr&&n.current.length>0&&(c.current=setTimeout(p,2e3));return}x===0&&await new Promise(E=>setTimeout(E,3e3))}},aj);return()=>clearTimeout(y)},[t,e,h]),d.useEffect(()=>{if(!(t||e)&&!h()&&!(i.current>=wr)&&n.current.length!==0)return c.current&&clearTimeout(c.current),l.current=0,c.current=setTimeout(()=>{p()},rj),()=>{c.current&&clearTimeout(c.current)}},[a,t,e]),null}const fj={business_partner:"business_owner",broker:"agent"};function hj(e){const t=fj[e]??e;if(qa.includes(t))return t}function pj(){const e=ct(),{user:t,profile:r,hasProProfile:a,isLoading:n,refreshProfile:o}=be(),i=d.useRef(!1),l=d.useRef(null),[c,u]=d.useState(!1),m=()=>{localStorage.removeItem("oauthRedirectPending"),localStorage.removeItem("oauthRedirectPendingAt")};return d.useEffect(()=>{if(n)return;const h=()=>{l.current&&(clearTimeout(l.current),l.current=null)},p=window.location.hash,f=new URLSearchParams(window.location.search),y=p.includes("access_token"),x=f.has("code"),_=f.has("error"),b=p.includes("error="),E=localStorage.getItem("oauthRedirectPending")==="true",v=Number(localStorage.getItem("oauthRedirectPendingAt")||0),w=v?Date.now()-v:0;if(_||b){h(),m(),u(!1);return}if(E&&!y&&!x&&v&&w>2*60*1e3){h(),m(),u(!1);return}if(!(y||x||E)){h(),u(!1);return}if(!t||!r){u(!0),h(),l.current=setTimeout(()=>{i.current||(m(),u(!1))},12e3);return}h(),u(!0),m(),sessionStorage.setItem("loginFlow","true"),window.history.replaceState(null,"",window.location.pathname);const C=localStorage.getItem("proSignupIntent");if(C&&!a&&!i.current){i.current=!0,localStorage.removeItem("proSignupIntent");let k;try{const S=JSON.parse(C);S.role&&(k=hj(S.role))}catch{}if(k||console.warn("[useOAuthRedirect] Unknown pro role in intent, skipping:",C),k){(async()=>{try{await R.from("profiles").update({user_type:"professional"}).eq("user_id",t.id),await R.from("professional_profiles").insert({user_id:t.id,pro_role:k,status:"draft",subscription_tier:"free",is_visible:!1});try{await R.functions.invoke("auto-link-referral")}catch{}await o()}catch(S){console.error("Failed to create pro profile from OAuth intent:",S)}finally{u(!1),e("/pro/dashboard",{replace:!0}),i.current=!1}})();return}}u(!1);const j=localStorage.getItem("authRedirectTo");localStorage.removeItem("authRedirectTo"),j!=null&&j.startsWith("/")&&!j.startsWith("//")?e(j,{replace:!0}):r.user_type==="professional"?e("/pro/dashboard",{replace:!0}):e("/dashboard",{replace:!0})},[t,r,a,n,e,o]),d.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]),{isRedirecting:c}}const gj={sm:"w-8 h-8",md:"w-16 h-16",lg:"w-32 h-32"},xj="#28262B";function fh({className:e,size:t="md",color:r=xj}){const[a,n]=d.useState(!0);return d.useEffect(()=>{const o=setInterval(()=>{n(!a)},a?3e3:500);return()=>{clearInterval(o)}},[a]),s.jsxs("div",{className:F(gj[t],e),children:[a&&s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 500 500",className:"w-full h-full",children:[s.jsxs("g",{id:"mustwants-logo-group1",children:[s.jsx("path",{className:"logo-path-fill",fill:r,d:"M240.17,77.54l-29.12,25.85s-33.91-15.07-69.2.59-49.2,54.67-49.2,54.67c0,0-12.42,47.96,11.93,72.81l69.83,74.05,77.53,76.78,96.49-94.2,32.49-32.02s42.33-37.02,33.43-84.66-53.59-78.59-91.88-73.74-44.03,12.51-83.47,51.82-79.77,78.56-79.77,78.56l-20.42,20.37-23.9-25.76,99.97-99.97,44.42-41.1s44.42-34.46,104.15-15.06,85,75.3,86.79,97.51,5.87,64.58-30.12,103.38c-35.99,38.8-116.88,118.17-116.88,118.17l-50.99,51.03-116.61-117.54-48.77-51.88s-54.54-46.56-25.27-127.7S174.79,57.54,202.12,63.25c19.65,4.1,38.05,14.3,38.05,14.3Z"}),s.jsx("path",{id:"group1-stroke",className:"logo-path-stroke",stroke:r,d:"M240.17,77.54l-29.12,25.85s-33.91-15.07-69.2.59-49.2,54.67-49.2,54.67c0,0-12.42,47.96,11.93,72.81l69.83,74.05,77.53,76.78,96.49-94.2,32.49-32.02s42.33-37.02,33.43-84.66-53.59-78.59-91.88-73.74-44.03,12.51-83.47,51.82-79.77,78.56-79.77,78.56l-20.42,20.37-23.9-25.76,99.97-99.97,44.42-41.1s44.42-34.46,104.15-15.06,85,75.3,86.79,97.51,5.87,64.58-30.12,103.38c-35.99,38.8-116.88,118.17-116.88,118.17l-50.99,51.03-116.61-117.54-48.77-51.88s-54.54-46.56-25.27-127.7S174.79,57.54,202.12,63.25c19.65,4.1,38.05,14.3,38.05,14.3Z"})]}),s.jsxs("g",{id:"mustwants-logo-group2",children:[s.jsx("path",{className:"logo-path-fill",fill:r,d:"M265.26,144.99l24.24-22.44,98.94,100.08-23.4,25.99s-94.18-93.57-99.77-103.63Z"}),s.jsx("path",{id:"group2-stroke",className:"logo-path-stroke",stroke:r,d:"M265.26,144.99l24.24-22.44,98.94,100.08-23.4,25.99s-94.18-93.57-99.77-103.63Z"})]}),s.jsxs("g",{id:"mustwants-logo-group3",children:[s.jsx("polygon",{className:"logo-path-fill",fill:r,points:"383.09 331.6 419.84 294.33 419.84 432.85 281.37 432.85 317.84 396.28 382.52 396.56 383.09 331.6"}),s.jsx("polygon",{id:"group3-stroke",className:"logo-path-stroke",stroke:r,points:"383.09 331.6 419.84 294.33 419.84 432.85 281.37 432.85 317.84 396.28 382.52 396.56 383.09 331.6"})]}),s.jsxs("g",{id:"mustwants-logo-group4",children:[s.jsx("polygon",{className:"logo-path-fill",fill:r,points:"83.72 294.33 119.78 330.13 119.78 394.88 185.35 396.52 222.24 432.85 83.72 432.85 83.72 294.33"}),s.jsx("polygon",{id:"group4-stroke",className:"logo-path-stroke",stroke:r,points:"83.72 294.33 119.78 330.13 119.78 394.88 185.35 396.52 222.24 432.85 83.72 432.85 83.72 294.33"})]})]}),s.jsx("span",{className:"sr-only",children:"Loading..."})]})}function bj(){const{isRedirecting:e}=pj();return e?s.jsxs("div",{className:"fixed inset-0 z-[9999] flex flex-col items-center justify-center bg-background gap-4 text-muted-foreground",children:[s.jsx(fh,{size:"lg",color:"currentColor"}),s.jsx("p",{className:"text-sm",children:"Signing you inâ¦"})]}):null}class hh extends d.Component{constructor(r){super(r);is(this,"handleReload",()=>{window.location.reload()});this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,a){console.error("ErrorBoundary caught:",r,a),Em(r,{contexts:{react:{componentStack:a.componentStack}}})}render(){return this.state.hasError?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:s.jsxs("div",{className:"text-center max-w-md",children:[s.jsx("h1",{className:"text-3xl font-heading font-bold text-foreground mb-4",children:"Something went wrong"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"We're sorry - an unexpected error occurred. Please try reloading the page."}),s.jsx("button",{onClick:this.handleReload,className:"inline-flex items-center justify-center rounded-md bg-primary px-6 py-3 text-sm font-medium text-primary-foreground shadow hover:bg-primary/90 transition-colors",children:"Reload Page"})]})}):this.props.children}}var co="Checkbox",[yj,_3]=Gr(co),[vj,Fl]=yj(co);function wj(e){const{__scopeCheckbox:t,checked:r,children:a,defaultChecked:n,disabled:o,form:i,name:l,onCheckedChange:c,required:u,value:m="on",internal_do_not_use_render:h}=e,[p,f]=Ki({prop:r,defaultProp:n??!1,onChange:c,caller:co}),[y,x]=d.useState(null),[_,b]=d.useState(null),E=d.useRef(!1),v=y?!!i||!!y.closest("form"):!0,w={checked:p,disabled:o,setChecked:f,control:y,setControl:x,name:l,form:i,value:m,hasConsumerStoppedPropagationRef:E,required:u,defaultChecked:zs(n)?!1:n,isFormControl:v,bubbleInput:_,setBubbleInput:b};
526return s.jsx(vj,{scope:t,...w,children:_j(h)?h(w):a})}var ph="CheckboxTrigger",gh=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...a},n)=>{const{control:o,value:i,disabled:l,checked:c,required:u,setControl:m,setChecked:h,hasConsumerStoppedPropagationRef:p,isFormControl:f,bubbleInput:y}=Fl(ph,e),x=Es(n,m),_=d.useRef(c);return d.useEffect(()=>{const b=o==null?void 0:o.form;if(b){const E=()=>h(_.current);return b.addEventListener("reset",E),()=>b.removeEventListener("reset",E)}},[o,h]),s.jsx(lt.button,{type:"button",role:"checkbox","aria-checked":zs(c)?"mixed":c,"aria-required":u,"data-state":wh(c),"data-disabled":l?"":void 0,disabled:l,value:i,...a,ref:x,onKeyDown:pt(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:pt(r,b=>{h(E=>zs(E)?!0:!E),y&&f&&(p.current=b.isPropagationStopped(),p.current||b.stopPropagation())})})});gh.displayName=ph;var $l=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:a,checked:n,defaultChecked:o,required:i,disabled:l,value:c,onCheckedChange:u,form:m,...h}=e;return s.jsx(wj,{__scopeCheckbox:r,checked:n,defaultChecked:o,disabled:l,required:i,onCheckedChange:u,name:a,form:m,value:c,internal_do_not_use_render:({isFormControl:p})=>s.jsxs(s.Fragment,{children:[s.jsx(gh,{...h,ref:t,__scopeCheckbox:r}),p&&s.jsx(vh,{__scopeCheckbox:r})]})})});$l.displayName=co;var xh="CheckboxIndicator",bh=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:a,...n}=e,o=Fl(xh,r);return s.jsx(Zi,{present:a||zs(o.checked)||o.checked===!0,children:s.jsx(lt.span,{"data-state":wh(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});bh.displayName=xh;var yh="CheckboxBubbleInput",vh=d.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:a,hasConsumerStoppedPropagationRef:n,checked:o,defaultChecked:i,required:l,disabled:c,name:u,value:m,form:h,bubbleInput:p,setBubbleInput:f}=Fl(yh,e),y=Es(r,f),x=Hu(o),_=Uu(a);d.useEffect(()=>{const E=p;if(!E)return;const v=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(v,"checked").set,C=!n.current;if(x!==o&&N){const j=new Event("click",{bubbles:C});E.indeterminate=zs(o),N.call(E,zs(o)?!1:o),E.dispatchEvent(j)}},[p,x,o,n]);const b=d.useRef(zs(o)?!1:o);return s.jsx(lt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??b.current,required:l,disabled:c,name:u,value:m,form:h,...t,tabIndex:-1,ref:y,style:{...t.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});vh.displayName=yh;function _j(e){return typeof e=="function"}function zs(e){return e==="indeterminate"}function wh(e){return zs(e)?"indeterminate":e?"checked":"unchecked"}const ht=d.forwardRef(({className:e,...t},r)=>s.jsx($l,{ref:r,className:F("peer h-4 w-4 shrink-0 rounded-none border border-mw-olive ring-offset-background data-[state=checked]:bg-mw-olive data-[state=checked]:text-mw-black focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:s.jsx(bh,{className:F("flex items-center justify-center text-current"),children:s.jsx(kf,{className:"h-4 w-4"})})}));ht.displayName=$l.displayName;const Ho="mw-cookie-consent";function j3(){window.dispatchEvent(new CustomEvent("mw-reopen-cookie-consent"))}function jj(){const[e,t]=d.useState(!1),[r,a]=d.useState(!1),[n,o]=d.useState(!0),[i,l]=d.useState(!0),c=d.useId(),u=d.useId(),m=d.useId(),h=d.useId(),p=d.useCallback(()=>{try{const y=localStorage.getItem(Ho);if(y){const x=JSON.parse(y);o(x.analytics??!0),l(x.marketing??!0)}}catch{}a(!1),t(!0)},[]);d.useEffect(()=>(!new URLSearchParams(window.location.search).has("og")&&!localStorage.getItem(Ho)&&t(!0),window.addEventListener("mw-reopen-cookie-consent",p),()=>window.removeEventListener("mw-reopen-cookie-consent",p)),[p]);const f=y=>{localStorage.setItem(Ho,JSON.stringify({...y,timestamp:new Date().toISOString()})),window.dispatchEvent(new CustomEvent("mw-cookie-consent-updated",{detail:y})),t(!1)};return e?s.jsx("div",{className:"fixed inset-x-0 bottom-0 z-[60] max-h-dvh overflow-y-auto p-3 sm:left-0 sm:right-auto sm:w-[32rem]
526sm:max-w-[calc(100vw-2rem)] sm:p-4 md:p-6",children:s.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":r?m:c,"aria-describedby":r?h:u,className:"rounded-lg border border-border bg-background p-4 shadow-xl sm:p-5",children:r?s.jsxs(s.Fragment,{children:[s.jsx("h3",{id:m,className:"text-lg font-semibold text-foreground mb-2",children:"Customize Cookies"}),s.jsx("p",{id:h,className:"text-sm text-muted-foreground mb-5",children:"Select which types of cookies you allow. Essential cookies cannot be disabled."}),s.jsxs("div",{className:"space-y-4 mb-6",children:[s.jsxs("label",{className:"flex items-start gap-3",children:[s.jsx(ht,{checked:!0,disabled:!0}),s.jsxs("span",{className:"min-w-0 text-sm text-foreground",children:["Essential Cookies ",s.jsx("span",{className:"text-muted-foreground",children:"(Always Enabled)"})]})]}),s.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[s.jsx(ht,{checked:n,onCheckedChange:y=>o(!!y)}),s.jsx("span",{className:"min-w-0 text-sm text-foreground",children:"Analytics Cookies"})]}),s.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[s.jsx(ht,{checked:i,onCheckedChange:y=>l(!!y)}),s.jsx("span",{className:"min-w-0 text-sm text-foreground",children:"Marketing Cookies"})]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 sm:justify-end",children:[s.jsx(U,{className:"w-full sm:w-auto",variant:"outline",size:"sm",onClick:()=>a(!1),children:"Cancel"}),s.jsx(U,{className:"w-full sm:w-auto",size:"sm",onClick:()=>f({essential:!0,analytics:n,marketing:i}),children:"Save Preferences"})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("h3",{id:c,className:"text-lg font-semibold text-foreground mb-2",children:"We value your privacy"}),s.jsxs("p",{id:u,className:"text-sm text-muted-foreground mb-5",children:['We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. By clicking "Accept Cookies", you consent to our use of cookies. Read our'," ",s.jsx(oe,{to:"/policies?tab=privacy",className:"text-mw-olive underline underline-offset-2 hover:text-mw-olive/80",children:"Privacy Policy"})," ","to learn more."]}),s.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:justify-end",children:[s.jsx(U,{className:"w-full sm:w-auto",variant:"outline",size:"sm",onClick:()=>a(!0),children:"Customize"}),s.jsx(U,{className:"w-full sm:w-auto",variant:"outline",size:"sm",onClick:()=>f({essential:!0,analytics:!1,marketing:!1}),children:"Reject All"}),s.jsx(U,{className:"w-full sm:w-auto",size:"sm",onClick:()=>f({essential:!0,analytics:!0,marketing:!0}),children:"Accept Cookies"})]})]})})}):null}const kj=hr("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 uo({className:e,variant:t,...r}){return s.jsx("div",{className:F(kj({variant:t}),e),...r})}function Nj({title:e,subtitle:t,badge:r,variant:a="dark",children:n}){const o=a==="dark";return s.jsx("section",{className:`pt-8 pb-4 md:pt-10 md:pb-5 ${o?"bg-mw-black":"bg-background"}`,children:s.jsxs("div",{className:"container text-center",children:[r&&s.jsx(uo,{className:"bg-icon-accent text-mw-black mb-2.5",children:r.text}),s.jsx("h1",{className:`text-3xl md:text-4xl font-heading font-bold mb-2.5 ${o?"text-white":"text-foreground"}`,children:e}),s.jsx("div",{className:"flex justify-center mb-2.5",children:s.jsx("div",{className:"w-16 h-0.5 bg-icon-accent rounded-full"})}),t&&s.jsx("p",{className:`text-sm md:text-base max-w-2xl mx-auto ${o?"text-mw-gray-100/80":"text-muted-foreground"}`,children:t}),n]})})}function ue({className:e,...t}){return s.jsx("div",{className:F("animate-pulse rounded-md bg-muted",e),...t})}const Sj=["w-14","w-24","w-28","w-24","w-32","w-36","w-40"];function _r({className:e,imageClassName:t}){return s.jsxs("div",{className:F("h-full overflow-hidden rounded-lg border border-border bg-card",e),"aria-hidden":"true",children:[s.jsx(ue,{className:F("aspect-[19/10] w-full rounded-none bg-muted/70",t)}),s.jsxs("div",{className:"flex min-h-[260px] flex-col p-4",children:[s.jsx(ue,{className:"mb-4 h-7 w-32 rounded-full bg-icon-background"}),s.jsxs("div",{className:"mb-4 space-y-2",children:[s.jsx(ue,{className:"h-6 w-full"}),s.jsx(ue,{className:"h-6 w-4/5"})]}),s.jsxs("div",{className:"mb-6 space-y-2",children:[s.jsx(ue,{className:"h-4 w-full"}),s.jsx(ue,{className:"h-4 w-11/12"}),s.jsx(ue,{className:"h-4 w-2/3"})]}),s.jsxs("div",{className:"mt-auto flex items-center gap-2 border-t border-border/60 pt-4",children:[s.jsx(ue,{className:"h-7 w-7 rounded-full"}),s.jsx(ue,{className:"h-4 w-28"}),s.jsx(ue,{className:"h-1 w-1 rounded-full"}),s.jsx(ue,{className:"h-4 w-20"})]})]})]})}function _h({showWriteAction:e=!1}){return s.jsxs("div",{role:"status","aria-live":"polite","aria-label":"Loading blog articles",children:[s.jsx(Nj,{title:"MustWants Blog",subt
526itle:"Guides, stories, and practical insights for military families navigating PCS moves, VA loans, and home decisions.",variant:"light",children:s.jsxs("div",{className:"relative mt-6",children:[e&&s.jsx("div",{className:"mb-4 flex justify-center md:absolute md:right-0 md:top-0 md:mb-0",children:s.jsx(ue,{className:"h-9 w-32 rounded-sm"})}),s.jsx("div",{className:"mx-auto mb-6 max-w-md",children:s.jsx(ue,{className:"h-10 w-full rounded-md"})}),s.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:Sj.map((t,r)=>s.jsx(ue,{className:F("h-9 rounded-full",t)},r))})]})}),s.jsx("section",{className:"pt-6 pb-14 md:pb-20",children:s.jsx("div",{className:"container",children:s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:[s.jsx(_r,{}),s.jsx(_r,{}),s.jsx(_r,{}),s.jsx(_r,{}),s.jsx(_r,{}),s.jsx(_r,{})]})})})]})}var jh={exports:{}},kh={};/** 527 * @license React 528 * use-sync-external-store-shim.production.js 529 * 530 * Copyright (c) Meta Platforms, Inc. and affiliates. 531 * 532 * This source code is licensed under the MIT license found in the 533 * LICENSE file in the root directory of this source tree. 534 */var Ur=d;function Cj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ej=typeof Object.is=="function"?Object.is:Cj,Aj=Ur.useState,Tj=Ur.useEffect,Rj=Ur.useLayoutEffect,Pj=Ur.useDebugValue;function Ij(e,t){var r=t(),a=Aj({inst:{value:r,getSnapshot:t}}),n=a[0].inst,o=a[1];return Rj(function(){n.value=r,n.getSnapshot=t,Uo(n)&&o({inst:n})},[e,r,t]),Tj(function(){return Uo(n)&&o({inst:n}),e(function(){Uo(n)&&o({inst:n})})},[e]),Pj(r),r}function Uo(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ej(e,r)}catch{return!0}}function Mj(e,t){return t()}var Lj=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Mj:Ij;kh.useSyncExternalStore=Ur.useSyncExternalStore!==void 0?Ur.useSyncExternalStore:Lj;jh.exports=kh;var Oj=jh.exports;function Dj(){return Oj.useSyncExternalStore(Fj,()=>!0,()=>!1)}function Fj(){return()=>{}}var Bl="Avatar",[$j,k3]=Gr(Bl),[Bj,Nh]=$j(Bl),Sh=d.forwardRef((e,t)=>{const{__scopeAvatar:r,...a}=e,[n,o]=d.useState("idle");return s.jsx(Bj,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:o,children:s.jsx(lt.span,{...a,ref:t})})});Sh.displayName=Bl;var Ch="AvatarImage",Eh=d.forwardRef((e,t)=>{const{__scopeAvatar:r,src:a,onLoadingStatusChange:n=()=>{},...o}=e,i=Nh(Ch,r),l=zj(a,o),c=va(u=>{n(u),i.onImageLoadingStatusChange(u)});return _n(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?s.jsx(lt.img,{...o,ref:t,src:a}):null});Eh.displayName=Ch;var Ah="AvatarFallback",Th=d.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:a,...n}=e,o=Nh(Ah,r),[i,l]=d.useState(a===void 0);return d.useEffect(()=>{if(a!==void 0){const c=window.setTimeout(()=>l(!0),a);return()=>window.clearTimeout(c)}},[a]),i&&o.imageLoadingStatus!=="loaded"?s.jsx(lt.span,{...n,ref:t}):null});Th.displayName=Ah;function Ud(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function zj(e,{referrerPolicy:t,crossOrigin:r}){const a=Dj(),n=d.useRef(null),o=a?(n.current||(n.current=new window.Image),n.current):null,[i,l]=d.useState(()=>Ud(o,e));return _n(()=>{l(Ud(o,e))},[o,e]),_n(()=>{const c=h=>()=>{l(h)};if(!o)return;const u=c("loaded"),m=c("error");return o.addEventListener("load",u),o.addEventListener("error",m),t&&(o.referrerPolicy=t),typeof r=="string"&&(o.crossOrigin=r),()=>{o.removeEventListener("load",u),o.removeEventListener("error",m)}},[o,r,t]),i}var Rh=Sh,Ph=Eh,Ih=Th;const ks=d.forwardRef(({className:e,...t},r)=>s.jsx(Rh,{ref:r,className:F("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ks.displayName=Rh.displayName;const Ns=d.forwardRef(({className:e,...t},r)=>s.jsx(Ph,{ref:r,className:F("h-full w-full object-cover object-center",e),...t}));Ns.displayName=Ph.displayName;const Ss=d.forwardRef(({className:e,...t},r)=>s.jsx(Ih,{ref:r,className:F("flex h-full w-full items-center justify-center rounded-full bg-mw-gray text-mw-black",e),...t}));Ss.displayName=Ih.displayName;function Vr({className:e,fallback:t="/placeholder.svg",onError:r,onLoad:a,aspectRatio:n,priority:o,loading:i,decoding:l,fetchPriority:c,style:u,...m}){const[h,p]=d.useState(!1),f=n?{aspectRatio:n,...u}:u,y=c??(o?"high":void 0);return s.jsx("img",{...m,style:f,loading:i??(o?"eager":"lazy"),decoding:l??(o?"sync":"async"),...y?{fetchpriority:y}:{},className:F("transition-opacity duration-500",h?"opacity-100":"opacity-0",e),onLoad:x=>{p(!0),a==null||a(x)},onError:x=>{t&&(x.currentTarget.src=t),p(!0),r==null||r(x)}})}const dt=d.forwardRef(({className:e,hover:t=!1,...r},a)=>s.jsx("div",{ref:a,className:F("rounded-lg border bg-card text-card-foreground shadow-sm",t&&"mw-card-hover cursor-pointer",e),...r}));
534dt.displayName="Card";const Hj=d.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:F("flex flex-col space-y-1.5 p-6",e),...t}));Hj.displayName="CardHeader";const Uj=d.forwardRef(({className:e,...t},r)=>s.jsx("h3",{ref:r,className:F("text-2xl font-semibold leading-none tracking-tight font-heading",e),...t}));Uj.displayName="CardTitle";const Vj=d.forwardRef(({className:e,...t},r)=>s.jsx("p",{ref:r,className:F("text-sm text-muted-foreground",e),...t}));Vj.displayName="CardDescription";const vt=d.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:F("p-6 pt-0",e),...t}));vt.displayName="CardContent";const qj=d.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:F("flex items-center p-6 pt-0",e),...t}));qj.displayName="CardFooter";function N3(e,t){return`${e??""}${t??""}`.replace(/[^a-zA-Z0-9]/g,"").toLowerCase()||"mustwantsteam"}function Wj(e,t,r){return`/blog/${r}`}const Gj=200;function Yj(e){return e.replace(/```[\s\S]*?```/g," ").replace(/`[^`]*`/g," ").replace(/!\[[^\]]*\]\([^)]*\)/g," ").replace(/\[[^\]]*\]\([^)]*\)/g," ").replace(/<[^>]+>/g," ").replace(/[#>*_~|[\](){}+=-]/g," ").replace(/&[a-z]+;/gi," ").replace(/\s+/g," ").trim()}function Mh(...e){const t=Yj(e.filter(Boolean).join(" "));if(!t)return 1;const r=t.split(/\s+/).filter(Boolean).length;return Math.max(1,Math.ceil(r/Gj))}function Lh(e){return`${e} min read`}function zi(e){return e&&e.replace(/\b\w+/g,t=>/^\d+$/.test(t)||t.length<=2&&/^[A-Z]+$/.test(t)?t:t.charAt(0).toUpperCase()+t.slice(1).toLowerCase())}function Oh(e){if(!e)return e;const t=/^[\s]*[-*â¢][\s]+.+$|^[\s]*\d+[.)]\s+.+$/gm;return e.replace(t,"").replace(/\n{2,}/g," ").replace(/\n/g," ").replace(/\s+/g," ").trim()}function Kj(e,t){if(!e)return e;const r=Oh(e);if(r.length<=t)return r;const a=/\.\s*/g,n=[];let o=0,i;for(;(i=a.exec(r))!==null;)n.push(r.slice(o,i.index+1).trim()),o=i.index+i[0].length;let l="";for(const c of n)if((l+" "+c).trim().length<=t)l+=(l?" ":"")+c;else break;if(!l&&r.length>t){const c=r.slice(0,t),u=c.lastIndexOf(" ");l=u>0?c.slice(0,u)+"â¦":c+"â¦"}return l}function Zj(e,t){const r=Kj(e,t);if(!r||/[.!?]["')\]]?$/.test(r))return r;const a=/[.!?]["')\]]?(?=\s|$)/g;let n=-1,o;for(;(o=a.exec(r))!==null;)n=o.index+o[0].length;return n>0?r.slice(0,n).trim():r}const Ea="/assets/must-wants-logo-square-BQL1dbun.jpeg",Vd="/og-images/blog.png",Dh={news:"News",buy_home:"Buy a Home",sell_home:"Sell a Home",va_loans_bah:"VA Loans & BAH",base_local_life:"Base & Local Life",military_family_tips:"Military Family Tips"};function S3({post:e,className:t,linkClassName:r}){const a=e.author_name||"MustWants Team",n=a==="MustWants Team",o=n?"MW":e.author_initials||a.slice(0,2).toUpperCase()||"MW",i=n?Ea:e.author_avatar||Ea,l=Lh(Mh(e.content,e.excerpt,e.title)),c=e.excerpt?Oh(e.excerpt):"",u=e.featured_image||Vd,m=e.featured_image?e.title:"";return s.jsx(oe,{to:Wj(e.author_slug,e.published_at,e.slug),state:{blogPostPreview:e},className:F("block h-full",r),children:s.jsxs(dt,{hover:!0,className:F("h-full overflow-hidden bg-card flex flex-col",t),children:[s.jsx("div",{className:"aspect-[19/10] bg-muted overflow-hidden flex-shrink-0",children:s.jsx(Vr,{src:u,alt:m,className:"w-full h-full object-cover",loading:"lazy",fallback:Vd})}),s.jsxs(vt,{className:"p-4 flex flex-col flex-1",children:[s.jsx(uo,{className:"bg-white text-mw-black border border-mw-black/25 mb-2 w-fit",children:Dh[e.category]||e.category}),s.jsx("h3",{className:"font-heading font-semibold text-lg mb-2 line-clamp-3",children:e.title}),c&&s.jsx("p",{className:"text-sm text-muted-foreground mb-4 line-clamp-4",children:c}),s.jsxs("div",{className:"mt-auto border-t border-border/60 pt-4 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsxs(ks,{className:"w-7 h-7",children:[s.jsx(Ns,{src:i,className:"object-cover"}),s.jsx(Ss,{className:"bg-icon-accent text-mw-black text-[8px]",children:o})]}),a]}),s.jsx("span",{children:"·"}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Nl,{className:"w-3 h-3"}),l]})]})]})]})})}function C3({className:e}){return s.jsxs(dt,{className:F("h-full overflow-hidden bg-card flex flex-col",e),"aria-hidden":"true",children:[s.jsx(ue,{className:"aspect-[19/10] w-full rounded-none bg-muted/70"}),s.jsxs(vt,{className:"p-4 flex flex-col flex-1",children:[s.jsx(ue,{className:"h-7 w-36 rounded-full mb-4 bg-icon-background"}),s.jsxs("div",{className:"space-y-2 mb-4",children:[s.jsx(ue,{className:"h-6 w-full"}),s.jsx(ue,{className:"h-6 w-4/5"}),s.jsx(ue,{className:"h-6 w-3/5"})]}),s.jsxs("div",{className:"space-y-2 mb-6",children:[s.jsx(ue,{className:"h-4 w-full"}),s.jsx(ue,{className:"h-4 w-11/12"}),s.jsx(ue,{className:"h-4 w-2/3"})]}),s.jsxs("div",{className:"mt-auto border-t border-border/60 pt-4 flex items-center gap-2",children:[s.jsx(ue,{className:"h-7 w-7 rounded-full"}),s.jsx(ue,{className:"h-4 w-28"}),s.jsx(ue,{className:"h-1 w-1 rounded-full"}),s.jsx(ue,{className:"h-4 w-20"})]})]})]})}function Fh({preview:e}){const t=e==null?void 0:e.title,r=e!=null&&e.excerpt?Zj(e.excerpt,220):"",a=(e==null?void 0:e.author_name)||"MustWants Team",n=a==="MustWants Team",o=n?"MW":(e==null?void 0:e.author_initials)||a.slice(0,2).toUpperCase()||"MW",i=n?Ea:(e==null?void 0:e.author_avatar)||Ea,l=e?Lh(Mh(e.content,e.excerpt,e.title)):null;return s.jsxs("article",{className:"pt-6 pb-6 md:pt-8 md:pb-8","aria-busy":"true",children:[s.jsx("div",{className:"container",children:s.jsx("div",{className:"flex items-center justify-between mb-8",children:s.jsx(U,{variant:"ghost",size:"sm",className:"text-mw-black hover:text-mw-black",asChild:!0,children:s.jsxs(oe,{to:"/blog",className:"!no-underline hover:!no-underline",children:[s.jsx(eo,{className:"w-4 h-4 mr-2"}),"Back to all articles"]})})})}),s.jsxs("div",{className:"container max-w-4xl",children:[s.jsxs("header",{className:"mb-4",children:[e?s.jsx(uo,{className:"mb-4 bg-white text-mw-black border border-mw-black/25",children:Dh[e.category]||e.category}):s.jsx(ue,{className:"mb-4 h-7 w-32 rounded-full bg-white border border-mw-black/25"}),t?s.jsx("h1",{className:"text-3xl md:text-4xl font-heading font-bold mb-2",children:t}):s.jsxs("div",{className:"space-y-3",children:[s.jsx(ue,{className:"h-10 w-full max-w-3xl"}),s.jsx(ue,{className:"h-10 w-4/5 max-w-2xl"})]}),r?s.jsx("p",{className:"text-base text-muted-foreground",children:r}):s.jsxs("div",{className:"mt-5 space-y-2",children:[s.jsx(ue,{className:"h-5 w-full"}),s.jsx(ue,{className:"h-5 w-3/4"})]}),s.jsx("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 mt-7 text-sm text-muted-foreground",children:e?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsxs(ks,{className:"w-9 h-9",children:[s.jsx(Ns,{src:i}),s.jsx(Ss,{className:"bg-icon-accent text-mw-black text-xs",children:o})]}),n?"The MustWants Team":a]}),l&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground
534/40",children:"·"}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Nl,{className:"w-4 h-4"}),l]})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(ue,{className:"h-9 w-9 rounded-full"}),s.jsx(ue,{className:"h-4 w-44"}),s.jsx(ue,{className:"h-1 w-1 rounded-full"}),s.jsx(ue,{className:"h-4 w-28"})]})})]}),(e==null?void 0:e.featured_image)&&s.jsx("div",{className:"aspect-[19/10] rounded-lg overflow-hidden mt-6 mb-8 bg-muted animate-fade-in",children:s.jsx(Vr,{src:e.featured_image,alt:e.title,className:"w-full h-full object-cover",loading:"eager"})}),s.jsx("div",{className:"space-y-4 pt-6","aria-hidden":"true",children:[92,98,86,94,76,88,64].map((c,u)=>s.jsx(ue,{className:"h-4 rounded-sm",style:{width:`${c}%`}},u))}),s.jsxs("div",{className:"border-t border-border pt-6 mt-8","aria-hidden":"true",children:[s.jsx(ue,{className:"h-7 w-48 mb-4"}),s.jsx("div",{className:"rounded-lg border border-border p-6",children:s.jsxs("div",{className:"flex items-start gap-5",children:[s.jsx(ue,{className:"h-20 w-20 rounded-full shrink-0"}),s.jsxs("div",{className:"flex-1 space-y-3",children:[s.jsx(ue,{className:"h-5 w-52"}),s.jsx(ue,{className:"h-4 w-full"}),s.jsx(ue,{className:"h-4 w-3/4"})]})]})})]})]})]})}function Qj({item:e,itemRef:t,isOpen:r,closeMenu:a,onKeyDown:n}){const o=ct(),[i,l]=d.useState(!1),[c,u]=d.useState("right"),m=d.useRef(null),h=d.useRef(null),p=d.useRef(null),f=d.useRef([]),y=e.children??[],x=d.useMemo(()=>y.map((j,k)=>j.sectionHeader?-1:k).filter(j=>j>=0),[y]),_=d.useCallback(()=>{var M;const j=h.current;if(!j)return;const k=j.getBoundingClientRect(),S=((M=p.current)==null?void 0:M.offsetWidth)??220,T=k.right+S+8;u(T>window.innerWidth?"left":"right")},[]),b=d.useCallback(()=>{_(),l(!0)},[_]),E=()=>{m.current&&clearTimeout(m.current),b()},v=()=>{m.current=setTimeout(()=>l(!1),150)};d.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]),d.useEffect(()=>{if(i)return _(),window.addEventListener("resize",_),()=>window.removeEventListener("resize",_)},[i,_]);const w=j=>{if(j.key==="ArrowRight"){j.preventDefault(),b();const k=x[0];k!==void 0&&setTimeout(()=>{var S;return(S=f.current[k])==null?void 0:S.focus()},0)}else n(j)},N=(j,k)=>{var T,M;const S=x.indexOf(k);if(j.key==="ArrowDown"){j.preventDefault();const P=x[S+1]??x[0];(T=f.current[P])==null||T.focus()}else if(j.key==="ArrowUp"){j.preventDefault();const P=x[S-1]??x[x.length-1];(M=f.current[P])==null||M.focus()}else(j.key==="ArrowLeft"||j.key==="Escape")&&(j.preventDefault(),l(!1),n(j))},C=()=>{y.length>0?i?l(!1):b():e.href?(o(e.href),a()):l(j=>!j)};return s.jsxs("div",{ref:h,className:"relative",onMouseEnter:E,onMouseLeave:v,children:[s.jsxs("button",{ref:j=>{t(j)},type:"button",className:F("flex w-full items-center justify-between gap-2 px-4 py-1.5 text-left text-sm xl:text-base text-white font-semibold hover:bg-mw-dark-gray hover:text-icon-accent transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",e.divider&&"border-t border-mw-dark-gray/50"),role:"menuitem",tabIndex:r?0:-1,"aria-haspopup":"true","aria-expanded":i,onClick:C,onKeyDown:w,children:[s.jsx("span",{children:e.label}),s.jsx(Nf,{className:"h-3.5 w-3.5","aria-hidden":"true"})]}),s.jsx("div",{className:F("absolute top-0 z-50 min-w-[220px]",c==="right"?"left-full pl-0.5":"right-full pr-0.5",i?"block":"hidden"),role:"menu","aria-label":`${e.label} submenu`,children:s.jsx("div",{ref:p,className:"bg-mw-black border border-mw-dark-gray/50 shadow-lg pt-0 pb-2",children:y.map((j,k)=>s.jsx(d.Fragment,{children:j.sectionHeader?s.jsx("div",{className:F("w-full text-left px-4 py-1 text-icon-accent text-xs xl:text-sm uppercase tracking-wider font-semibold",j.divider&&"border-t border-mw-dark-gray/50"),role:"presentation",children:j.label}):j.href?s.jsx(oe,{ref:S=>{f.current[k]=S},to:j.href,className:F("block w-full text-left px-4 py-1.5 text-sm xl:text-base text-white font-semibold hover:bg-mw-dark-gray hover:text-icon-accent transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",j.divider&&"border-t border-mw-dark-gray/50"),role:"menuitem",tabIndex:i?0:-1,onClick:()=>{l(!1),a()},onKeyDown:S=>N(S,k),children:j.label}):s.jsx("button",{ref:S=>{f.current[k]=S},className:F("block w-full text-left px-4 py-1.5 text-sm xl:text-base text-white font-semibold hover:bg-mw-dark-gray hover:text-icon-accent transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",j.divider&&"border-t border-mw-dark-gray/50"),role:"menuitem",tabIndex:i?0:-1,onClick:()=>{var S;(S=j.onClick)==null||S.call(j),l(!1),a()},onKeyDown:S=>N(S,k),children:j.label})},k))})})]})}function oa({label:e,href:t,items:r,align:a="start"}
534){const n=ct(),[o,i]=d.useState(!1),l=d.useRef(null),c=d.useRef(null),u=d.useRef([]),m=d.useMemo(()=>r.map((b,E)=>b.sectionHeader?-1:E).filter(b=>b>=0),[r]),h=()=>{l.current&&clearTimeout(l.current),i(!0)},p=()=>{l.current=setTimeout(()=>i(!1),150)},f=()=>i(b=>!b),y=b=>{var E,v,w,N;if(b.key==="Escape")i(!1),(v=(E=c.current)==null?void 0:E.querySelector("button"))==null||v.focus();else if(b.key==="ArrowDown"){b.preventDefault(),o||i(!0);const C=m[0];C!==void 0&&((w=u.current[C])==null||w.focus())}else if(b.key==="ArrowUp"){b.preventDefault();const C=m[m.length-1];C!==void 0&&((N=u.current[C])==null||N.focus())}},x=(b,E)=>{var w,N,C,j;const v=m.indexOf(E);if(b.key==="ArrowDown"){b.preventDefault();const k=m[v+1]??m[0];(w=u.current[k])==null||w.focus()}else if(b.key==="ArrowUp"){b.preventDefault();const k=m[v-1]??m[m.length-1];(N=u.current[k])==null||N.focus()}else b.key==="Escape"&&(i(!1),(j=(C=c.current)==null?void 0:C.querySelector("button"))==null||j.focus())};d.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const _=()=>i(!1);return s.jsxs("div",{ref:c,className:"relative h-full flex items-center",onMouseEnter:h,onMouseLeave:p,onKeyDown:y,children:[s.jsxs("button",{className:"flex items-center gap-1 text-white font-semibold hover:text-icon-accent transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-icon-accent focus-visible:rounded whitespace-nowrap","aria-expanded":o,"aria-haspopup":"true",onClick:b=>{t?(n(t),i(!1)):f()},children:[e,s.jsx(Zs,{className:F("w-4 h-4 transition-transform duration-200",o&&"rotate-180")})]}),s.jsx("div",{className:F("absolute top-full z-50 min-w-[200px]",a==="end"?"right-0":"-left-4",o?"block":"hidden"),role:"menu","aria-label":e,children:s.jsx("div",{className:"bg-mw-black border border-mw-dark-gray/50 border-t-0 shadow-lg pt-0 pb-2",children:r.map((b,E)=>s.jsx(d.Fragment,{children:b.sectionHeader?s.jsx("div",{className:F("w-full text-left px-4 py-1 text-icon-accent text-xs xl:text-sm uppercase tracking-wider font-semibold",b.divider&&"border-t border-mw-dark-gray/50"),role:"presentation",children:b.label}):b.children&&b.children.length>0?s.jsx(Qj,{item:b,itemRef:v=>{u.current[E]=v},isOpen:o,closeMenu:_,onKeyDown:v=>x(v,E)}):b.href?s.jsx(oe,{ref:v=>{u.current[E]=v},to:b.href,className:F("block w-full text-left px-4 py-1.5 text-sm xl:text-base text-white font-semibold hover:bg-mw-dark-gray hover:text-icon-accent transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",b.divider&&"border-t border-mw-dark-gray/50"),role:"menuitem",tabIndex:o?0:-1,onClick:()=>i(!1),onKeyDown:v=>x(v,E),children:b.label}):s.jsx("button",{ref:v=>{u.current[E]=v},className:F("block w-full text-left px-4 py-1.5 text-sm xl:text-base text-white font-semibold hover:bg-mw-dark-gray hover:text-icon-accent transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",b.divider&&"border-t border-mw-dark-gray/50"),role:"menuitem",tabIndex:o?0:-1,onClick:()=>{var v;(v=b.onClick)==null||v.call(b),i(!1)},onKeyDown:v=>x(v,E),children:b.label})},E))})})]})}var Xj="Separator",qd="horizontal",Jj=["horizontal","vertical"],$h=d.forwardRef((e,t)=>{const{decorative:r,orientation:a=qd,...n}=e,o=ek(a)?a:qd,l=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return s.jsx(lt.div,{"data-orientation":o,...l,...n,ref:t})});$h.displayName=Xj;function ek(e){return Jj.includes(e)}var Bh=$h;const qr=d.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...a},n)=>s.jsx(Bh,{ref:n,decorative:r,orientation:t,className:F("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...a}));qr.displayName=Bh.displayName;const zl=d.forwardRef(({className:e,...t},r)=>s.jsx("textarea",{className:F("flex min-h-[80px] w-full rounded-md border-[1.5px] border-mw-dark-gray bg-background px-3 py-2 text-base md:text-sm ring-offset-background placeholder:text-[hsl(var(--mw-placeholder))] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));zl.displayName="Textarea";const tk=[{value:"bug",label:"Bug Report"},{value:"feedback",label:"Feedback"},{value:"question",label:"Question"},{value:"feature_request",label:"Feature Request"},{value:"other",label:"Other"}];function Hl({open:e,onOpenChange:t,syncUrlWithQueryParam:r=!1}){const{user:a,profile:n}=be(),{toast:o}=At(),[i,l]=Un(),c=d.useRef(null),[u,m]=d.useState(!1),[h,p]=d.useState(!1),[f,y]=d.use
534State(!1),[x,_]=d.useState(""),[b,E]=d.useState(""),[v,w]=d.useState(""),[N,C]=d.useState(""),[j,k]=d.useState(""),[S,T]=d.useState(null),[M,P]=d.useState(null),[A,I]=d.useState(""),z=d.useRef(!1),L=/^https:\/\/www\.loom\.com\/share\/[a-zA-Z0-9]+$/,me=A.length>0&&!L.test(A);d.useEffect(()=>{if(e&&n&&!f){const D=[n.first_name,n.last_name].filter(Boolean).join(" ");_(D),E(n.email||"")}},[e,n,f]),d.useEffect(()=>{if(!r)return;const D=i.get("modal")==="feedback";if(!z.current){z.current=!0,e&&!D&&l(H=>{const Z=new URLSearchParams(H);return Z.set("modal","feedback"),Z},{replace:!0});return}e&&!D?l(H=>{const Z=new URLSearchParams(H);return Z.set("modal","feedback"),Z},{replace:!0}):!e&&D&&l(H=>{const Z=new URLSearchParams(H);return Z.delete("modal"),Z},{replace:!0})},[e,i,l,r]);const $=()=>{p(!1),y(!1),_(""),E(""),w(""),C(""),k(""),I(""),T(null),P(null)},g=D=>{var Z;const H=(Z=D.target.files)==null?void 0:Z[0];if(H){if(H.size>5*1024*1024){o({title:"File too large",description:"Max 5 MB.",variant:"destructive"});return}T(H),P(URL.createObjectURL(H))}},X=()=>{T(null),P(null),c.current&&(c.current.value="")},de=async D=>{if(D.preventDefault(),!v){o({title:"Topic required",description:"Please select a topic.",variant:"destructive"});return}if(j.trim().length<10){o({title:"Feedback too short",description:"Please enter at least 10 characters.",variant:"destructive"});return}if(!f&&!a&&(!x.trim()||!b.trim())){o({title:"Name and email required",description:"Please provide your name and email, or choose to stay anonymous.",variant:"destructive"});return}if(A&&!L.test(A)){o({title:"Invalid Loom link",description:"Please enter a valid Loom share URL.",variant:"destructive"});return}m(!0);try{let H=null;if(S){const te=S.name.split(".").pop()||"png",Se=`${crypto.randomUUID()}.${te}`,{error:Le}=await R.storage.from("feedback-screenshots").upload(Se,S);if(Le)throw Le;const{data:fe}=R.storage.from("feedback-screenshots").getPublicUrl(Se);H=fe.publicUrl}const Z=f?null:a&&n?[n.first_name,n.last_name].filter(Boolean).join(" "):x.trim()||null,ee=f?null:a&&n?n.email:b.trim(),ae={what_to_improve:j.trim(),name:Z,email:ee,user_id:(a==null?void 0:a.id)||null,topic:v,page:N.trim()||null,screenshot_url:H,loom_url:A.trim()||null},{error:Y}=await R.from("feedback").insert(ae);if(Y)throw Y;o({title:"Thank you for your feedback!",description:"Your input helps us improve MustWants."}),p(!0)}catch(H){console.error("Error submitting feedback:",H),o({title:"Something went wrong",description:"Please try again later.",variant:"destructive"})}finally{m(!1)}},re=D=>{D||$(),t(D)};return s.jsx(_t,{open:e,onOpenChange:re,children:s.jsx(gt,{className:"sm:max-w-lg",children:h?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-col items-center justify-center py-4 space-y-3 text-center",children:[s.jsx(yn,{className:"w-12 h-12 text-primary"}),s.jsx(ut,{className:"text-xl",children:"Thank you!"}),s.jsx(St,{children:"Your feedback helps us improve MustWants."})]}),s.jsxs(Hr,{className:"gap-2 sm:gap-0",children:[s.jsx(U,{variant:"outline",onClick:()=>$(),className:"w-full sm:min-w-[14rem]",children:"Send Another Feedback"}),s.jsx(U,{onClick:()=>re(!1),className:"w-full sm:min-w-[14rem]",children:"Close"})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs(ms,{children:[s.jsx(ut,{children:"Send Feedback"}),s.jsx(St,{children:"Tell us what you think or let us know if something isn't working right."})]}),s.jsxs("form",{onSubmit:de,className:"space-y-4",children:[a&&n?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(ht,{id:"anonymous",checked:f,onCheckedChange:D=>y(D===!0)}),s.jsx(Te,{htmlFor:"anonymous",className:"text-sm font-normal cursor-pointer",children:"I want to stay anonymous"})]}),!f&&s.jsxs(s.Fragment,{children:[s.jsx(qr,{}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:["Submitting as ",s.jsx("span",{className:"font-medium text-foreground",children:[n.first_name,n.last_name].filter(Boolean).join(" ")})]})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(ht,{id:"anonymous",checked:f,onCheckedChange:D=>y(D===!0)}),s.jsx(Te,{htmlFor:"anonymous",className:"text-sm font-normal cursor-pointer",children:"I want to stay anonymous"})]}),!f&&s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"name",children:"Name"}),s.jsx(We,{id:"name",value:x,onChange:D=>_(D.target.value),placeholder:"Your name",required:!f})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"email",children:"Email"}),s.jsx(We,{id:"email",type:"email",value:b,onChange:D=>E(D.target.value),placeholder:"[email protected]",required:!f})]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"topic",children:"Topic *"}),s.jsxs(io,{value:v,onValueChange:w,children:[s.jsx(Ha,{children:s.jsx(lo,{placeholder:"Select a topic..."})}),s.jsx(Ua,{children:tk.map(D=>s.jsx(Va,{value:D.value,children:D.label},D.value))})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"page",children:"Page (optional)"}),s.jsx(We,{id:"page",value:N,onChange:D=>C(D.target.value),placeholder:"e.g. Dashboard"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"feedback",children:"Feedback or Bug Report *"}),s.jsx(zl,{id:"feedback",value:j,onChange:D=>k(D.target.value),placeholder:"e.g. The map on the housing costs page doesn't load when I select a base. I'm using Chrome on Mac.",rows:6,required:!0,minLength:10}),j.length>0&&j.length<10&&s.jsx("p",{className:"text-xs text-destructive",children:"At least 10 characters required"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"loom",children:"Loom Recording (optional)"}),s.jsx(We,{id:"loom",value:A,onChange:D=>I(D.target.value),placeholder:"https://www.loom.com/share/..."}),me&&s.jsx("p",{className:"text-xs text-destructive",children:"Please enter a valid Loom share link (https://www.loom.com/share/...)"})]}),s.jsxs("div",{className:"space-y-2",children:[M?s.jsxs("div",{className:"relative inline-block",children:[s.jsx("img",{src:M,alt:"Screenshot preview",className:"rounded-md border max-h-32 object-contain"}),s.jsx(U,{type:"button",variant:"destructive",size:"icon",className:"absolute -top-2 -right-2 h-6 w-6",onClick:X,children:s.jsx(Mt,{className:"w-3 h-3"})})]}):s.jsxs(U,{type:"button",variant:"outline",size:"sm",onClick:()=>{var D;return(D=c.current)==null?void 0:D.click()},children:[s.jsx(x2,{className:"w-4 h-4 mr-2"})," Attach Screenshot"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Full-screen screenshots help us understand the issue faster."}),s.jsx("input",{ref:c,type:"file",accept:"image/*",className:"hidden",onChange:g})]}),s.jsxs(Hr,{children:[s.jsx(U,{type:"button",variant:"outline",onClick:()=>re(!1),disabled:u,children:"Cancel"}),s.jsx(U,{type:"submit",disabled:u,children:u?"Sending...":"Send Feedback"})]})]})]})})})}const zh=e=>{if(!e||typeof e!="object")return!1;const t="code"in e?e.code:void 0,r="message"in e?e.message:void 0;return t==="PGRST202"||typeof r=="string"&&(r.includes("Could not find the function")||r.includes("does not exist")||r.includes("ON CONFLICT does not support deferrable unique constraints"))},Hh=(e,t)=>e instanceof Error&&e.message||e&&typeof e=="object"&&"message"in e&&typeof e.message=="string"?e.message:t;async function Uh(){const{data:e,error:t}=await R.from("admin_notifications").select("id").order("created_at",{ascending:!1}).limit(50);if(t)throw t;return(e||[]).map(r=>r.id)}async function Vh(e,t){if(t.length===0)return new Map;const{data:r,error:a}=await R.from("admin_notification_reads").select("notification_id, dismissed").eq("user_id",e).in("notification_id",t);if(a)throw a;const n=new Map;
534return(r||[]).forEach(o=>n.set(o.notification_id,o)),n}async function sk(e){const t=await R.rpc("clear_admin_notifications");if(!t.error)return;if(!zh(t.error))throw t.error;const r=await Uh();r.length!==0&&await Promise.all(r.map(a=>qh(e,a)))}async function rk(e,t){const r=await R.rpc("dismiss_admin_notification",{p_notification_id:t});if(r.error){if(!zh(r.error))throw r.error;await qh(e,t)}}async function qh(e,t){const r=new Date().toISOString(),a=await R.from("admin_notification_reads").update({dismissed:!0,read_at:r}).eq("notification_id",t).eq("user_id",e).select("id");if(a.error)throw a.error;if((a.data||[]).length>0)return;const n=await R.from("admin_notification_reads").insert({notification_id:t,user_id:e,dismissed:!0,read_at:r});if(!n.error)return;if(n.error.code!=="23505")throw n.error;const o=await R.from("admin_notification_reads").update({dismissed:!0,read_at:r}).eq("notification_id",t).eq("user_id",e);if(o.error)throw o.error}function ak(){const{isAdmin:e,user:t}=be();return et({queryKey:["admin","notifications",t==null?void 0:t.id],queryFn:async()=>{const r=await R.from("admin_notifications").select("*").order("created_at",{ascending:!1}).limit(50);if(r.error)throw r.error;const a=r.data||[];if(a.length===0)return[];const n=a.map(u=>u.id),[o,i]=await Promise.all([Vh(t.id,n),R.from("admin_email_preferences").select("*").eq("user_id",t.id).maybeSingle()]),l={new_user:"inapp_new_user",pending_app:"inapp_pending_app",new_blog:"inapp_new_blog",new_listing:"inapp_new_listing",new_feedback:"inapp_new_feedback"},c=i.data;return a.filter(u=>{if(o.has(u.id))return!1;const m=l[u.type];return!(m&&c&&c[m]===!1)}).slice(0,20).map(u=>({...u,is_read:!1}))},enabled:e&&!!(t!=null&&t.id),refetchInterval:3e4,staleTime:1e4})}function nk(){const{isAdmin:e,user:t}=be();return et({queryKey:["admin","notifications","unread-count",t==null?void 0:t.id],queryFn:async()=>{const r=await Uh();if(r.length===0)return 0;const a=await Vh(t.id,r);return r.filter(n=>!a.has(n)).length},enabled:e&&!!(t!=null&&t.id),refetchInterval:3e4,staleTime:1e4})}function ok(){const{isAdmin:e}=be(),t=os();d.useEffect(()=>{if(!e)return;const r=R.channel("admin-notifications-realtime").on("postgres_changes",{event:"*",schema:"public",table:"admin_notifications"},()=>{t.invalidateQueries({queryKey:["admin","notifications"]})}).subscribe();return()=>{R.removeChannel(r)}},[e,t])}function ik(){const e=os(),{user:t}=be(),{toast:r}=At();return Us({mutationFn:async()=>{await sk(t.id)},onMutate:async()=>{await e.cancelQueries({queryKey:["admin","notifications"]});const a=e.getQueryData(["admin","notifications",t==null?void 0:t.id]),n=e.getQueryData(["admin","notifications","unread-count",t==null?void 0:t.id]);return e.setQueryData(["admin","notifications",t==null?void 0:t.id],[]),e.setQueryData(["admin","notifications","unread-count",t==null?void 0:t.id],0),{prevNotifs:a,prevCount:n}},onError:(a,n,o)=>{(o==null?void 0:o.prevNotifs)!==void 0&&e.setQueryData(["admin","notifications",t==null?void 0:t.id],o.prevNotifs),(o==null?void 0:o.prevCount)!==void 0&&e.setQueryData(["admin","notifications","unread-count",t==null?void 0:t.id],o.prevCount),r({variant:"destructive",title:"Failed to clear notifications",description:Hh(a,"The admin notifications were not cleared.")})},onSettled:()=>{e.invalidateQueries({queryKey:["admin","notifications"]})}})}function lk(){const e=os(),{user:t}=be(),{toast:r}=At();return Us({mutationFn:async a=>{await rk(t.id,a)},onMutate:async a=>{await e.cancelQueries({queryKey:["admin","notifications"]});const n=e.getQueryData(["admin","notifications",t==null?void 0:t.id]),o=e.getQueryData(["admin","notifications","unread-count",t==null?void 0:t.id]),i=n!=null&&n.some(l=>l.id===a)?1:0;return e.setQueryData(["admin","notifications",t==null?void 0:t.id],l=>(l||[]).filter(c=>c.id!==a)),i>0&&e.setQueryData(["admin","notifications","unread-count",t==null?void 0:t.id],l=>Math.max(0,(l||0)-i)),{prevNotifs:n,prevCount:o}},onError:(a,n,o)=>{(o==null?void 0:o.prevNotifs)!==void 0&&e.setQueryData(["admin","notifications",t==null?void 0:t.id],o.prevNotifs),(o==null?void 0:o.prevCount)!==void 0&&e.setQueryData(["admin","notifications","unread-count",t==null?void 0:t.id],o.prevCount),r({variant:"destructive",title:"Failed to update notification",description:Hh(a,"The admin notification could not be dismissed.")}
534)},onSettled:()=>{e.invalidateQueries({queryKey:["admin","notifications"]})}})}const Wh=e=>{if(!e||typeof e!="object")return!1;const t="code"in e?e.code:void 0,r="message"in e?e.message:void 0;return t==="PGRST202"||typeof r=="string"&&(r.includes("Could not find the function")||r.includes("does not exist"))},Gh=(e,t)=>e instanceof Error&&e.message||e&&typeof e=="object"&&"message"in e&&typeof e.message=="string"?e.message:t;async function ck(e){const t=await R.rpc("clear_user_notifications");if(!t.error)return;if(!Wh(t.error))throw t.error;const r=await R.from("user_notifications").update({is_read:!0}).eq("user_id",e).eq("is_read",!1);if(r.error)throw r.error}async function dk(e,t){const r=await R.rpc("mark_user_notification_read",{p_notification_id:t});if(!r.error)return;if(!Wh(r.error))throw r.error;const a=await R.from("user_notifications").update({is_read:!0}).eq("id",t).eq("user_id",e).eq("is_read",!1);if(a.error)throw a.error}function uk(){const{user:e}=be();return et({queryKey:["user","notifications",e==null?void 0:e.id],queryFn:async()=>{const{data:t,error:r}=await R.from("user_notifications").select("*").eq("user_id",e.id).eq("is_read",!1).order("created_at",{ascending:!1}).limit(30);if(r)throw r;return t||[]},enabled:!!(e!=null&&e.id),refetchInterval:3e4,staleTime:1e4})}function mk(){const{user:e}=be();return et({queryKey:["user","notifications","unread-count",e==null?void 0:e.id],queryFn:async()=>{const{count:t,error:r}=await R.from("user_notifications").select("id",{count:"exact",head:!0}).eq("user_id",e.id).eq("is_read",!1);if(r)throw r;return t||0},enabled:!!(e!=null&&e.id),refetchInterval:3e4,staleTime:1e4})}function fk(){const{user:e}=be(),t=os();d.useEffect(()=>{if(!(e!=null&&e.id))return;const r=R.channel("user-notifications-realtime").on("postgres_changes",{event:"*",schema:"public",table:"user_notifications",filter:`user_id=eq.${e.id}`},()=>{t.invalidateQueries({queryKey:["user","notifications"]})}).subscribe();return()=>{R.removeChannel(r)}},[e==null?void 0:e.id,t])}function hk(){const e=os(),{user:t}=be(),{toast:r}=At();return Us({mutationFn:async()=>{await ck(t.id)},onMutate:async()=>{await e.cancelQueries({queryKey:["user","notifications"]});const a=e.getQueryData(["user","notifications",t==null?void 0:t.id]),n=e.getQueryData(["user","notifications","unread-count",t==null?void 0:t.id]);return e.setQueryData(["user","notifications",t==null?void 0:t.id],[]),e.setQueryData(["user","notifications","unread-count",t==null?void 0:t.id],0),{prev:a,prevCount:n}},onError:(a,n,o)=>{(o==null?void 0:o.prev)!==void 0&&e.setQueryData(["user","notifications",t==null?void 0:t.id],o.prev),(o==null?void 0:o.prevCount)!==void 0&&e.setQueryData(["user","notifications","unread-count",t==null?void 0:t.id],o.prevCount),r({variant:"destructive",title:"Failed to clear notifications",description:Gh(a,"The notifications were not cleared.")})},onSettled:()=>{e.invalidateQueries({queryKey:["user","notifications"]})}})}function pk(){const e=os(),{user:t}=be(),{toast:r}=At();return Us({mutationFn:async a=>{await dk(t.id,a)},onMutate:async a=>{await e.cancelQueries({queryKey:["user","notifications"]});const n=e.getQueryData(["user","notifications",t==null?void 0:t.id]),o=e.getQueryData(["user","notifications","unread-count",t==null?void 0:t.id]),i=n!=null&&n.some(l=>l.id===a&&!l.is_read)?1:0;return e.setQueryData(["user","notifications",t==null?void 0:t.id],l=>(l||[]).filter(c=>c.id!==a)),i>0&&e.setQueryData(["user","notifications","unread-count",t==null?void 0:t.id],l=>Math.max(0,(l||0)-i)),{prev:n,prevCount:o}},onError:(a,n,o)=>{(o==null?void 0:o.prev)!==void 0&&e.setQueryData(["user","notifications",t==null?void 0:t.id],o.prev),(o==null?void 0:o.prevCount)!==void 0&&e.setQueryData(["user","notifications","unread-count",t==null?void 0:t.id],o.prevCount),r({variant:"destructive",title:"Failed to update notification",description:Gh(a,"The notification could not be marked as read.")})},onSettled:()=>{e.invalidateQueries({queryKey:["user","notifications"]})}})}const Wd={news:{icon:_2,label:"News"},info:{icon:Cf,label:"Info"},bug_fix:{icon:r2,label:"Bug Fix"},update:{icon:S2,label:"Update"},announcement:{icon:y2,label:"Announcement"}};function gk({broadcastId:e,onClose:t}){const{data:r}=et({queryKey:["broadcast-detail",e],queryFn:async()=>
534{if(!e)return null;const{data:o,error:i}=await R.from("broadcast_notifications").select("id, title, message, icon, sent_at, created_at").eq("id",e).maybeSingle();if(i)throw i;return o},enabled:!!e}),n=(Wd[(r==null?void 0:r.icon)??""]??Wd.info).icon;return s.jsx(_t,{open:!!e,onOpenChange:o=>{o||t()},children:s.jsx(gt,{className:"sm:max-w-md p-0 gap-0 overflow-hidden border-0 [&>button]:text-mw-white",children:r&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"bg-mw-black px-6 pt-6 pb-4 rounded-t-lg",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"rounded-full bg-icon-background p-2.5 shrink-0",children:s.jsx(n,{className:"h-5 w-5 text-icon-accent"})}),s.jsx("h3",{className:"font-heading font-bold text-base leading-snug text-mw-white",children:r.title})]})}),s.jsxs("div",{className:"px-6 py-5 space-y-4",children:[s.jsx("p",{className:"text-sm text-foreground/80 whitespace-pre-wrap leading-relaxed",children:r.message}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r.sent_at?jn(new Date(r.sent_at),"MMM d, yyyy 'at' h:mm a"):jn(new Date(r.created_at),"MMM d, yyyy")})]})]})})})}const xk=e=>{switch(e){case"new_user":return s.jsx(pr,{className:"w-4 h-4 text-blue-500"});case"pending_app":return s.jsx(to,{className:"w-4 h-4 text-amber-500"});case"new_blog":return s.jsx(wl,{className:"w-4 h-4 text-purple-500"});case"new_listing":return s.jsx(_l,{className:"w-4 h-4 text-green-500"});case"new_feedback":return s.jsx(no,{className:"w-4 h-4 text-orange-500"});case"connection_request":return s.jsx(Al,{className:"w-4 h-4 text-blue-500"});case"connection_accepted":return s.jsx(kt,{className:"w-4 h-4 text-green-500"});case"listing_approved":return s.jsx(yn,{className:"w-4 h-4 text-green-500"});case"listing_rejected":return s.jsx(Ni,{className:"w-4 h-4 text-red-500"});case"listing_archived":return s.jsx(ns,{className:"w-4 h-4 text-muted-foreground"});case"pro_approved":return s.jsx(yn,{className:"w-4 h-4 text-green-500"});case"pro_rejected":return s.jsx(Ni,{className:"w-4 h-4 text-red-500"});case"partner_invite":return s.jsx(Gs,{className:"w-4 h-4 text-pink-500"});case"partner_accepted":return s.jsx(Gs,{className:"w-4 h-4 text-green-500"});case"info_sharing_request":return s.jsx(It,{className:"w-4 h-4 text-amber-500"});case"info_sharing_approved":return s.jsx(yn,{className:"w-4 h-4 text-green-500"});case"profile_view":return s.jsx(or,{className:"w-4 h-4 text-blue-500"});default:return s.jsx(vl,{className:"w-4 h-4 text-muted-foreground"})}},bk=e=>{if(e.source==="admin")switch(e.type){case"new_user":return"/admin?tab=users";case"pending_app":return"/admin?tab=applications";case"new_blog":return"/admin?tab=blog";case"new_listing":return"/admin?tab=listings";case"new_feedback":return"/admin?tab=feedback";default:return"/admin"}switch(e.type){case"connection_request":return"/pro/connections";case"connection_accepted":return"/dashboard?tab=connections";case"listing_approved":case"listing_rejected":case"listing_archived":return"/my-listings";case"pro_approved":case"pro_rejected":return"/pro/dashboard";case"partner_invite":case"partner_accepted":return"/dashboard?tab=partner";case"info_sharing_request":return e.reference_id?`/approve-sharing/${e.reference_id}`:"/dashboard?tab=connections";case"info_sharing_approved":return e.reference_id?`/pro/connections/${e.reference_id}`:"/pro/connections";case"profile_view":return"/pro/analytics";default:return"/dashboard"}};function yk(){const e=ct(),{user:t,isAdmin:r}=be(),[a,n]=d.useState(!1),[o,i]=d.useState(!1),[l,c]=d.useState(null),u=d.useRef(null),{data:m=[]}=ak();ok();const{data:h=0}=nk(),p=ik(),f=lk(),{data:y=[],isLoading:x}=uk();fk();const{data:_=0}=mk(),b=hk(),E=pk(),v=(r?h:0)+_,w=d.useMemo(()=>{const A=r?m.map(z=>({...z,source:"admin"})):[],I=y.map(z=>({...z,source:"user"}));return[...A,...I].sort((z,L)=>new Date(L.created_at).getTime()-new Date(z.created_at).getTime()).slice(0,30)},[m,y,r]),N=d.useMemo(()=>w.filter(A=>A.type==="new_user"&&A.reference_id).map(A=>A.reference_id),[w]),{data:C}=et({queryKey:["admin","notification-profiles",N],queryFn:async()=>
534{if(N.length===0)return{};const{data:A}=await R.from("profiles").select("user_id, first_name, last_name, email").in("user_id",N),I={};return(A||[]).forEach(z=>{I[z.user_id]=z}),I},enabled:N.length>0,staleTime:3e4}),j=A=>{if(A.type==="new_user"&&A.reference_id&&C){const I=C[A.reference_id];if(I){const z=[I.first_name,I.last_name].filter(Boolean).join(" ");return z?`${z} joined`:`${I.email} joined`}}return A.message},k=async()=>{if(!(o||w.length===0)){i(!0);try{const A=[b.mutateAsync()];r&&A.unshift(p.mutateAsync()),await Promise.allSettled(A)}finally{i(!1)}}},S=()=>{u.current&&clearTimeout(u.current),n(!0)},T=()=>{u.current=setTimeout(()=>n(!1),150)};d.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);const M=A=>{if(A.source==="admin"){f.mutate(A.id);return}A.is_read||E.mutate(A.id)},P=A=>{if(M(A),A.reference_type==="broadcast"&&A.reference_id){n(!1),c(A.reference_id);return}n(!1),e(bk(A))};return t?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative flex items-center",style:{height:"var(--topbar-height)"},onMouseEnter:S,onMouseLeave:T,children:[s.jsxs("button",{className:"relative text-white hover:text-icon-accent transition-colors p-2",children:[s.jsx(vl,{className:"w-5 h-5"}),v>0&&s.jsx("span",{className:"absolute -top-1 -right-1 min-w-[18px] h-[18px] px-1 text-[10px] font-bold bg-destructive text-destructive-foreground rounded-full flex items-center justify-center",children:v>99?"99+":v})]}),s.jsx("div",{className:F("absolute top-full right-0 z-50 w-80 max-w-[calc(100vw-2rem)]",a?"block":"hidden"),children:s.jsxs("div",{className:"bg-mw-black border border-mw-dark-gray/50 border-t-0 shadow-lg",children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[s.jsx("span",{className:"font-semibold text-sm xl:text-base text-white",children:"Notifications"}),w.length>0&&s.jsxs(U,{variant:"ghost",size:"sm",className:"text-xs h-auto py-1 px-2 text-mw-gray-100 hover:text-destructive hover:bg-mw-dark-gray",onPointerDown:A=>{A.stopPropagation(),A.preventDefault(),k()},disabled:o||p.isPending||b.isPending,children:[s.jsx(P2,{className:"w-3 h-3 mr-1"}),"Clear"]})]}),s.jsx("div",{className:"max-h-[400px] overflow-y-auto",children:x?s.jsx("div",{className:"py-8 text-center text-sm text-mw-gray-100",children:"Loading..."}):w.length===0?s.jsx("div",{className:"py-8 text-center text-sm text-mw-gray-100",children:"No notifications yet"}):s.jsx("div",{children:w.map(A=>s.jsx("button",{className:F("w-full text-left px-4 py-3 hover:bg-mw-dark-gray transition-colors",!A.is_read&&"bg-mw-dark-gray/50"),onClick:()=>P(A),children:s.jsxs("div",{className:"flex gap-3 w-full min-w-0",children:[s.jsx("div",{className:"flex-shrink-0 mt-0.5",children:xk(A.type)}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-start gap-2 min-w-0",children:[s.jsx("p",{className:F("text-sm xl:text-base text-white flex-1 min-w-0 break-words whitespace-normal",!A.is_read&&"font-medium"),children:A.title}),!A.is_read&&s.jsx("span",{className:"w-2 h-2 bg-icon-accent rounded-full flex-shrink-0 mt-1.5"})]}),(()=>{const I=j(A);return I?s.jsx("p",{className:"text-xs text-mw-gray-100 mt-0.5 break-words whitespace-normal line-clamp-2",children:I}):null})(),s.jsxs("p",{className:"text-xs text-mw-gray-100 mt-1",children:[A.type==="profile_view"&&s.jsxs(s.Fragment,{children:[jn(new Date(A.created_at),"MMM d, yyyy 'at' h:mm a")," · "]}),Mg(new Date(A.created_at),{addSuffix:!0})]})]})]})},`${A.source}-${A.id}`))})})]})})]}),s.jsx(gk,{broadcastId:l,onClose:()=>c(null)})]}):null}var Yh="AlertDialog",[vk,E3]=Gr(Yh,[Vu]),Ts=Vu(),Kh=e=>{const{__scopeAlertDialog:t,...r}=e,a=Ts(t);return s.jsx(Qi,{...a,...r,modal:!0})};Kh.displayName=Yh;var wk="AlertDialogTrigger",Zh=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...a}=e,n=Ts(r);return s.jsx(xg,{...n,...a,ref:t})});Zh.displayName=wk;var _k="AlertDialogPortal",Qh=e=>{const{__scopeAlertDialog:t,...r}=e,a=Ts(t);return s.jsx(Xi,{...a,...r})};Qh.displayName=_k;var jk="AlertDialogOverlay",Xh=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...a}=e,n=Ts(r);return s.jsx(Aa,{...n,...a,ref:t})});Xh.displayName=jk;var Pr="AlertDialogContent",[kk,Nk]=vk(Pr),Sk=yg("AlertDialogContent"),Jh=d.forwardRef((e,t)=>
534{const{__scopeAlertDialog:r,children:a,...n}=e,o=Ts(r),i=d.useRef(null),l=Es(t,i),c=d.useRef(null);return s.jsx(bg,{contentName:Pr,titleName:ep,docsSlug:"alert-dialog",children:s.jsx(kk,{scope:r,cancelRef:c,children:s.jsxs(Ta,{role:"alertdialog",...o,...n,ref:l,onOpenAutoFocus:pt(n.onOpenAutoFocus,u=>{var m;u.preventDefault(),(m=c.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[s.jsx(Sk,{children:a}),s.jsx(Ek,{contentRef:i})]})})})});Jh.displayName=Pr;var ep="AlertDialogTitle",tp=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...a}=e,n=Ts(r);return s.jsx(Ra,{...n,...a,ref:t})});tp.displayName=ep;var sp="AlertDialogDescription",rp=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...a}=e,n=Ts(r);return s.jsx(Pa,{...n,...a,ref:t})});rp.displayName=sp;var Ck="AlertDialogAction",ap=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...a}=e,n=Ts(r);return s.jsx(Hn,{...n,...a,ref:t})});ap.displayName=Ck;var np="AlertDialogCancel",op=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...a}=e,{cancelRef:n}=Nk(np,r),o=Ts(r),i=Es(t,n);return s.jsx(Hn,{...o,...a,ref:i})});op.displayName=np;var Ek=({contentRef:e})=>{const t=`\`${Pr}\` requires a description for the component to be accessible for screen reader users. 535 536You can add a description to the \`${Pr}\` by passing a \`${sp}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 537 538Alternatively, 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 \`${Pr}\`. 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. 539 540For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return d.useEffect(()=>{var a;document.getElementById((a=e.current)==null?void 0:a.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Ak=Kh,Tk=Zh,Rk=Qh,ip=Xh,lp=Jh,cp=ap,dp=op,up=tp,mp=rp;const Pk=Ak,A3=Tk,Ik=Rk,fp=d.forwardRef(({className:e,...t},r)=>s.jsx(ip,{className:F("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:r}));fp.displayName=ip.displayName;const hp=d.forwardRef(({className:e,...t},r)=>s.jsxs(Ik,{children:[s.jsx(fp,{}),s.jsx(lp,{ref:r,className:F("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:rounded-lg",e),...t})]}));hp.displayName=lp.displayName;const pp=({className:e,...t})=>s.jsx("div",{className:F("flex flex-col space-y-2 text-center sm:text-left",e),...t});pp.displayName="AlertDialogHeader";const gp=({className:e,...t})=>s.jsx("div",{className:F("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});gp.displayName="AlertDialogFooter";const xp=d.forwardRef(({className:e,...t},r)=>s.jsx(up,{ref:r,className:F("text-lg font-semibold",e),...t}));xp.displayName=up.displayName;const bp=d.forwardRef(({className:e,...t},r)=>s.jsx(mp,{ref:r,className:F("text-sm text-muted-foreground",e),...t}));bp.displayName=mp.displayName;const yp=d.forwardRef(({className:e,...t},r)=>s.jsx(cp,{ref:r,className:F(Ml(),e),...t}));yp.displayName=cp.displayName;const vp=d.forwardRef(({className:e,...t},r)=>s.jsx(dp,{ref:r,className:F(Ml({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));vp.displayName=dp.displayName;function mo({open:e,onOpenChange:t,onConfirm:r}){return s.jsx(Pk,{open:e,onOpenChange:t,children:s.jsxs(hp,{className:"bg-white",children:[s.jsxs(pp,{children:[s.jsx(xp,{children:"Sign out?"}),s.jsx(bp,{children:"Are you sure you want to sign out of your account?"})]}),s.jsxs(gp,{children:[s.jsx(vp,{children:"Cancel"}),s.jsx(yp,{className:"!bg-mw-red [background-image:none] text-white hover:!bg-mw-gray hover:text-mw-black focus-visible:!bg-mw-gray focus-visible:text-mw-black",onClick:r,children:"Sign Out"})]})]})})}const Mk="/assets/must-wants-logo-text-white-zYPRvCI7.png",Wa="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='84'%20height='79'%20viewBox='0%200%2084%2079'%20fill='none'%3e%3cpath%20d='M22.719%200.217194C12.1819%201.84923%203.27737%209.61377%200.704943%2019.406C-0.234981%2023.1646%20-0.234981%2029.0004%200.704943%2032.759C2.43638%2039.2377%203.32684%2040.3752%2023.1642%2060.3552L41.7648%2
540079L59.4749%2061.3443C69.2205%2051.6016%2078.0261%2042.3534%2079.1144%2040.7708C81.8847%2036.666%2083.1215%2032.9568%2083.4183%2028.0607C83.913%2019.9994%2081.7858%2014.0648%2076.2946%208.229C67.8848%20-0.673004%2054.8743%20-2.50286%2043.9909%203.72855C41.7153%205.01439%2013.3197%2032.8085%2013.3197%2033.7481C13.3197%2034.0448%2014.3586%2035.4296%2015.5953%2036.8638L17.9204%2039.5344L31.8214%2025.6868C39.4892%2018.0707%2046.6128%2011.2953%2047.7012%2010.6523C55.4184%205.90459%2064.8177%207.19044%2070.9024%2013.768C74.4643%2017.6256%2075.7999%2021.038%2075.7999%2026.3792C75.7999%2029.8906%2075.6021%2030.8797%2074.2169%2033.7976C72.7823%2036.8638%2071.1993%2038.6442%2057.4467%2052.3929C49.1358%2060.8003%2042.0616%2067.6252%2041.7153%2067.6252C41.4185%2067.6252%2034.3443%2060.7014%2025.984%2052.2445C9.51055%2035.6274%208.37275%2034.1438%207.6307%2028.308C7.28441%2025.1923%208.02646%2020.7907%209.46108%2018.0212C10.6484%2015.5979%2014.0123%2011.9382%2016.2879%2010.504C20.3444%207.98173%2026.3797%207.04207%2030.733%208.37737L32.6624%208.97084L35.6305%205.95405L38.6482%202.98671L35.7295%201.89869C31.2772%200.266655%2026.4787%20-0.376274%2022.719%200.217194Z'%20fill='%23CCD96F'/%3e%3cpath%20d='M47.6013%2015.1539C46.2161%2016.2419%2044.9299%2017.3794%2044.732%2017.7256C44.4847%2018.0718%2048.4423%2022.3744%2054.9228%2028.9026L65.5093%2039.4861L67.8838%2036.9144C69.17%2035.4802%2070.2089%2034.046%2070.2089%2033.7987C70.2089%2033.502%2065.7072%2028.7048%2060.1666%2023.2152L50.0748%2013.1757L47.6013%2015.1539Z'%20fill='%23CCD96F'/%3e%3cpath%20d='M6.39368%2063.3217V78.01H21.0862H35.8281L31.8706%2074.0536L27.9625%2070.1466L20.9872%2069.9982L14.0615%2069.8498V63.0744V56.2495L10.2523%2052.4415L6.39368%2048.5839V63.3217Z'%20fill='%23CCD96F'/%3e%3cpath%20d='M73.0312%2052.6887L69.2221%2056.4968V63.3217V70.0971H62.3953H55.6179L51.6603%2074.0536L47.7028%2078.01H62.4447H77.1372V63.4206C77.1372%2055.4088%2077.0878%2048.8312%2076.9888%2048.8312C76.9393%2048.8312%2075.1584%2050.5621%2073.0312%2052.6887Z'%20fill='%23CCD96F'/%3e%3c/svg%3e",rn=768;function Lk(){const[e,t]=d.useState(()=>{if(!(typeof window>"u"))return window.innerWidth<rn});return d.useEffect(()=>{const r=window.matchMedia(`(max-width: ${rn-1}px)`),a=()=>{t(window.innerWidth<rn)};return r.addEventListener("change",a),t(window.innerWidth<rn),()=>r.removeEventListener("change",a)},[]),!!e}const Ok=Qi,Dk=Xi,wp=d.forwardRef(({className:e,...t},r)=>s.jsx(Aa,{className:F("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:r}));wp.displayName=Aa.displayName;const Fk=hr("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"}}),_p=d.forwardRef(({side:e="right",className:t,children:r,...a},n)=>s.jsxs(Dk,{children:[s.jsx(wp,{}),s.jsxs(Ta,{ref:n,className:F(Fk({side:e}),t),...a,children:[r,s.jsxs(Hn,{className:"absolute right-4 top-4 roun
540ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none text-white",children:[s.jsx(Mt,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));_p.displayName=Ta.displayName;const $k=({className:e,...t})=>s.jsx("div",{className:F("flex flex-col space-y-2 text-center sm:text-left",e),...t});$k.displayName="SheetHeader";const Bk=d.forwardRef(({className:e,...t},r)=>s.jsx(Ra,{ref:r,className:F("text-lg font-semibold text-foreground",e),...t}));Bk.displayName=Ra.displayName;const zk=d.forwardRef(({className:e,...t},r)=>s.jsx(Pa,{ref:r,className:F("text-sm text-muted-foreground",e),...t}));zk.displayName=Pa.displayName;const Dn="sidebar:state",Hk=60*60*24*7,Uk="14rem",Vk="18rem",qk="3rem",Wk="b";function Gk(){try{const t=localStorage.getItem(Dn);if(t!==null)return t==="true"}catch{}const e=document.cookie.match(new RegExp(`(?:^|; )${Dn}=([^;]*)`));return e?e[1]==="true":null}const Ul=d.createContext(null);function Qs(){const e=d.useContext(Ul);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Cs=d.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:a,style:n,children:o,...i},l)=>{const c=Lk(),[u,m]=d.useState(!1),[h,p]=d.useState(()=>Gk()??e),f=t??h,y=d.useCallback(E=>{const v=typeof E=="function"?E(f):E;r?r(v):p(v);try{localStorage.setItem(Dn,String(v))}catch{}document.cookie=`${Dn}=${v}; path=/; max-age=${Hk}`},[r,f]),x=d.useCallback(()=>c?m(E=>!E):y(E=>!E),[c,y,m]);d.useEffect(()=>{const E=v=>{v.key===Wk&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),x())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[x]);const _=f?"expanded":"collapsed",b=d.useMemo(()=>({state:_,open:f,setOpen:y,isMobile:c,openMobile:u,setOpenMobile:m,toggleSidebar:x}),[_,f,y,c,u,m,x]);return s.jsx(Ul.Provider,{value:b,children:s.jsx(Rl,{delayDuration:0,children:s.jsx("div",{style:{"--sidebar-width":Uk,"--sidebar-width-icon":qk,...n},className:F("group/sidebar-wrapper flex min-h-0 h-full w-full has-[[data-variant=inset]]:bg-sidebar",a),ref:l,...i,children:o})})})});Cs.displayName="SidebarProvider";const fo=d.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:a,children:n,...o},i)=>{const{isMobile:l,state:c,openMobile:u,setOpenMobile:m}=Qs();return r==="none"?s.jsx("div",{className:F("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",a),ref:i,...o,children:n}):l?s.jsx(Ok,{open:u,onOpenChange:m,...o,children:s.jsx(_p,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground border-r-0 [&>button:last-child]:hidden",style:{"--sidebar-width":Vk},side:e,children:s.jsx("div",{className:"flex h-full w-full flex-col",children:n})})}):s.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground lg:block","data-state":c,"data-collapsible":c==="collapsed"?r:"","data-variant":t,"data-side":e,children:[s.jsx("div",{className:F("relative h-[calc(100svh-var(--topbar-height))] w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),s.jsx("div",{className:F("fixed top-[--topbar-height] z-10 hidden h-[calc(100svh-var(--topbar-height))] w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear lg:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...o,children:s.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:n})})]})});fo.displayName="Sidebar";const Dt=d.forwardRef(({className:e,onClick:t,...r},a)=>{const{toggleSidebar:n}=Qs();return s.jsxs(U,{ref:a,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:F("h-7 w-7",e),onClick:o=>{t==null||t(o),n()},...r,children:[s.jsx(j2,{}),s.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});Dt.displayName="SidebarTrigger";const Yk=d.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:a}=Qs();return s.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:F("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 hover:after:bg-sidebar-border sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Yk.displayName="SidebarRail";const dr=d.forwardRef(({className:e,...t},r)=>s.jsx("main",{ref:r,className:F("relative flex min-h-0 flex-1 flex-col bg-background overflow-auto","peer-data-[variant=inset]:min-
540h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));dr.displayName="SidebarInset";const Kk=d.forwardRef(({className:e,...t},r)=>s.jsx(We,{ref:r,"data-sidebar":"input",className:F("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));Kk.displayName="SidebarInput";const ho=d.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,"data-sidebar":"header",className:F("flex flex-col gap-2 p-2",e),...t}));ho.displayName="SidebarHeader";const po=d.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,"data-sidebar":"footer",className:F("flex flex-col gap-2 p-2",e),...t}));po.displayName="SidebarFooter";const Zk=d.forwardRef(({className:e,...t},r)=>s.jsx(qr,{ref:r,"data-sidebar":"separator",className:F("mx-2 w-auto bg-sidebar-border",e),...t}));Zk.displayName="SidebarSeparator";const go=d.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,"data-sidebar":"content",className:F("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));go.displayName="SidebarContent";const at=d.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,"data-sidebar":"group",className:F("relative flex w-full min-w-0 flex-col p-2",e),...t}));at.displayName="SidebarGroup";const Ct=d.forwardRef(({className:e,asChild:t=!1,...r},a)=>{const n=t?Yr:"div";return s.jsx(n,{ref:a,"data-sidebar":"group-label",className:F("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});Ct.displayName="SidebarGroupLabel";const Qk=d.forwardRef(({className:e,asChild:t=!1,...r},a)=>{const n=t?Yr:"button";return s.jsx(n,{ref:a,"data-sidebar":"group-action",className:F("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});Qk.displayName="SidebarGroupAction";const nt=d.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,"data-sidebar":"group-content",className:F("w-full text-sm",e),...t}));nt.displayName="SidebarGroupContent";const st=d.forwardRef(({className:e,...t},r)=>s.jsx("ul",{ref:r,"data-sidebar":"menu",className:F("flex w-full min-w-0 flex-col gap-1",e),...t}));st.displayName="SidebarMenu";const Xe=d.forwardRef(({className:e,...t},r)=>s.jsx("li",{ref:r,"data-sidebar":"menu-item",className:F("group/menu-item relative",e),...t}));Xe.displayName="SidebarMenuItem";const Xk=hr("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Je=d.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:a="default",tooltip:n,className:o,...i},l)=>{const c=e?Yr:"button",{isMobile:u,state:m}=Qs(),h=s.jsx(c,{ref:l,"data-sidebar":"menu-button","data-size":a,"data-active":t,className:F(Xk({variant:r,size:a}),o),...i});return n?(typeof n=="string"&&(n={children:n}),s.jsxs(Pi,{children:[s.jsx(Ii,{asChild:!0,children:h}),s.jsx(Tn,{side:"right",align:"center",hidden:m!=="collapsed"||u,...n})]})):h});Je.displayName="SidebarMenuButton";const Jk=d.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...a},n)=>{const o=t?Yr:"button";return s.jsx(o,{ref:n,"data-sidebar":"menu-action",className:F("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...a})});Jk.displayName="SidebarMenuAction";const eN=d.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:F("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));eN.displayName="SidebarMenuBadge";const tN=d.forwardRef(({className:e,showIcon:t=!1,...r},a)=>{const n=d.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return s.jsxs("div",{ref:a,"data-sidebar":"menu-skeleton",className:F("flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[t&&s.jsx(ue,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),s.jsx(ue,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":n}})]})});tN.displayName="SidebarMenuSkeleton";const sN=d.forwardRef(({className:e,...t},r)=>s.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:F("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));sN.displayName="SidebarMenuSub";const rN=d.forwardRef(({...e},t)=>s.jsx("li",{ref:t,...e}));rN.displayName="SidebarMenuSubItem";const aN=d.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:a,...n},o)=>{const i=e?Yr:"a";return s.jsx(i,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:F("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",a),...n})});aN.displayName="SidebarMenuSubButton";const Hi=[{label:"For Sale",href:"/find-home?listing_type=mls_sale,fsbo"},{label:"For Rent",href:"/find-home?listing_type=mls_rent,frbo"},{label:"FSBO/FRBO",href:"/find-home?q=United%20States&listing_type=fsbo,frbo"},{label:"Homes Near Bases",href:"/homes-for-sale"},{label:"Rentals Near Bases",href:"/homes-for-rent"}];function nN(e){return et({queryKey:["primary-pro-logo",e],queryFn:async()=>
540{if(!e)return{logoUrl:null,companyName:null};const{data:t,error:r}=await R.from("connections").select("pro_id, pro_role").eq("buyer_id",e).neq("client_status","archived").in("pro_role",["agent","lender"]);if(r)throw r;if(!t||t.length===0)return{logoUrl:null,companyName:null};const a=t.find(l=>l.pro_role==="agent"),n=t.find(l=>l.pro_role==="lender"),o=a||n;if(!o)return{logoUrl:null,companyName:null};const{data:i}=await R.from("professional_profiles").select("company_logo_url, company").eq("user_id",o.pro_id).maybeSingle();return{logoUrl:(i==null?void 0:i.company_logo_url)??null,companyName:(i==null?void 0:i.company)??null}},enabled:!!e,staleTime:5*60*1e3})}function oN(){return d.useContext(Ul)}const iN=[{label:"Buy vs Rent",href:"/resources/calculators/buy-vs-rent"},{label:"VA Mortgage",href:"/resources/calculators/va-mortgage"},{label:"Affordability",href:"/resources/calculators/affordability"},{label:"Rent Analysis",href:"/resources/calculators/rent-analysis"},{label:"Closing Costs",href:"/resources/calculators/closing-cost"},{label:"Amortization",href:"/resources/calculators/amortization"},{label:"Refinance vs Sell",href:"/resources/calculators/refinance-vs-sell"}],Gd=[{label:"Visual Data Maps",href:"/resources/maps"},{label:"Community Map",href:"/resources/community-map"},{label:"Coverage Map",href:"/resources/coverage-map"},{label:"MLS Coverage",href:"/resources/mls-coverage"},{label:"Checklists",href:"/resources/checklists"},{label:"Blogs",href:"/blog"},{label:"Podcast",href:"/resources/podcast"},{label:"Our Partners",href:"/resources/partners"},{label:"Calculators",href:"/resources/calculators",children:iN}],Yd=[{label:"For Sale by Owner",href:"/list-home/for-sale-by-owner"},{label:"For Rent by Owner",href:"/list-home/for-rent-by-owner"}],Kd=[{label:"Real Estate Agent",href:"/pro/agent"},{label:"Lender",href:"/pro/lender"},{label:"Home Inspector",href:"/pro/inspector"},{label:"Attorney",href:"/pro/attorney"},{label:"Insurance Agent",href:"/pro/insurance"},{label:"Title Insurance Agent",href:"/pro/title"},{label:"Property Manager",href:"/pro/property-manager"},{label:"Business Partner",href:"/pro/business"}];function lN({profile:e,avatarUrl:t,initials:r,isAdmin:a,canSwitch:n,onSwitch:o,onSignOut:i,proProfile:l}){const[c,u]=d.useState(!1),m=d.useRef(null),h=d.useRef(null),p=d.useRef(null),f=()=>{m.current&&clearTimeout(m.current),u(!0)},y=()=>{m.current=setTimeout(()=>u(!1),150)},x=()=>u(b=>!b),_=b=>{var w,N,C,j;const E=Array.from(((w=h.current)==null?void 0:w.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])'))??[]),v=E.indexOf(document.activeElement);if(b.key==="Escape")b.preventDefault(),u(!1),(N=p.current)==null||N.focus();else if(b.key==="ArrowDown"){if(b.preventDefault(),!c){u(!0),setTimeout(()=>{var T,M;(M=Array.from(((T=h.current)==null?void 0:T.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])'))??[])[0])==null||M.focus()},0);return}const k=E[v+1]??E[0];k==null||k.focus()}else if(b.key==="ArrowUp"){b.preventDefault();const k=E[v-1]??E[E.length-1];k==null||k.focus()}else b.key==="Home"?(b.preventDefault(),(C=E[0])==null||C.focus()):b.key==="End"&&(b.preventDefault(),(j=E[E.length-1])==null||j.focus())};return d.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]),s.jsxs("div",{ref:h,className:"relative flex items-center",style:{height:"var(--topbar-height)"},onMouseEnter:f,onMouseLeave:y,onKeyDown:_,children:[s.jsx("button",{ref:p,className:"h-9 w-9 rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-icon-accent group",onClick:x,"aria-expanded":c,"aria-haspopup":"true","aria-label":"User menu",children:s.jsxs(ks,{className:F("h-9 w-9 transition-all",c?"ring-2 ring-icon-accent":"group-hover:ring-2 group-hover:ring-icon-accent"),children:[t&&s.jsx(Ns,{src:t,alt:"Profile"}),s.jsx(Ss,{className:"bg-icon-accent text-mw-black",children:r})]})}),s.jsx("div",{className:F("absolute top-full right-0 z-50 min-w-[220px]",c?"block":"hidden"),role:"menu","aria-label":"User menu",children:s.jsxs("div",{className:"bg-mw-black border border-mw-dark-gray/50 border-t-0 shadow-lg pt-0 pb-2",children:[s.jsxs("div",{className:"px-4 py-2 border-b border-mw-dark-gray/50",children:[s.jsxs("p",{className:"font-semibold text-white text-sm xl:text-base",children:[e==null?void 0:e.first_name," ",e==null?void 0:e.last_name]}),s.jsx("p",{className:"text-xs xl:text-sm text-mw-gray-100",children:e==null?void 0:e.email})]}),s.jsxs(oe,{to:"/profile",role:"menuitem",className:"flex items-center gap-2 px-4 py-1.5 text-sm xl:text-base text-white font-semibold hover:bg-mw-dark-gray hover:text-icon-accent transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",onClick:()=>u(!1),children:[s.jsx(pr,{className:"w-4 h-4"}),"Profile"]}),(e==null?void 0:e.user_type)==="professional"?s.jsxs(s.Fragment,{children:[s.jsxs(oe,{to:"/pro/connections",role:"menuitem","aria-disabled":(l==null?void 0:l.subscription_tier)==="free",className:F("flex items-center justify-between px-4 py-1.5 text-sm xl:text-base font-semibold transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",(l==null?void 0:l.subscription_tier)==="free"?"text-mw-gray-100 hover:text-mw-gray-100":"text-white hover:bg-mw-dark-gray hover:text-icon-accent"),onClick:b=>{(l==null?void 0:l.subscription_tier)==="free"&&b.preventDefault(),u(!1)},children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(kt,{className:"w-4 h-4"}),"Connections"]}),(l==null?void 0:l.subscription_tier)==="free"&&s.jsx(It,{className:"w-3.5 h-3.5 text-mw-gray-100"})]}),(l==null?void 0:l.pro_role)!=="business_owner"&&(l==null?void 0:l.pro_role)!=="property_manager"&&s.jsxs(oe,{to:"/blog/new",role:"menuitem","aria-disabled":(l==null?void 0:l.subscription_tier)!=="pro"&&(l==null?void 0:l.tier_source)!=="legacy",className:F("flex items-center justify-between px-4 py-1.5 text-sm xl:text-base font-semibold transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",(l==null?void 0:l.subscription_tier)!=="pro"&&(l==null?void 0:l.tier_source)!=="legacy"?"text-mw-gray-100 hover:text-mw-gray-100":"text-white hover:bg-mw-dark-gray hover:text-icon-accent"),onClick:b=>{(l==null?void 0:l.subscription_tier)!=="pro"&&(l==null?void 0:l.tier_source)!=="legacy"&&b.preventDefault(),u(!1)},children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(If,{className:"w-4 h-4"}),"Submit Blog"]}),(l==null?void 0:l.subscription_tier)!=="pro"&&(l==null?void 0:l.tier_source)!=="legacy"&&s.jsx(It,{className:"w-3.5 h-3.5 text-mw-gray-100"})]}),s.jsxs(oe,{to:"/pro/analytics",role:"menuitem","aria-disabled":(l==null?void 0:l.subscription_tier)!=="pro",className:F("flex items-center justify-between px-4 py-1.5 text-sm xl:text-base font-semibold transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",(l==null?void 0:l.subscription_tier)!=="pro"?"text-mw-gray-100 hover:bg-mw-dark-gray hover:text-icon-accent":"text-white hover:bg-mw-dark-gray hover:text-icon-accent"),onClick:()=>u(!1),children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(so,{className:"w-4 h-4"}),"Analytics"]}),(l==null?void 0:l.subscription_tier)!=="pro"&&s.jsx(It,{className:"w-3.5 h-3.5 text-mw-gray-100"})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(oe,{to:"/priorities",role:"menuitem",className:"block px-4 py-1.5 text-sm xl:text-base text-white font-semibold hover:bg-mw-dark-gray hover:text-icon-accent transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",onClick:()=>u(!1),children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(Ef,{className:"w-4 h-4"}),"Priorities"]})}),s.jsx(oe,{to:"/favorites",role:"menuitem",className:"block px-4 py-1.5 text-sm xl:text-base text-white font-semibold hover:bg-mw-dark-gray hover:text-icon-accent transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",onClick:()=>u(!1),children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(Gs,{className:"w-4 h-4"}),"Favorites"]})}),n&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"border-t border-mw-dark-gray/50 my-0"}),s.jsxs("button",{role:"menuitem",onClick:()=>{o(),u(!1)},className:"block w-full text-left px-4 py-1.5 text-sm xl:text-base text-white font-semibold hover:bg-mw-dark-gray hover:text-icon-accent transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",children:[s.jsx(ka,{className:"w-4 h-4 mr-2 inline"}),"Switch to Pro"]})]})]}),a&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"border-t border-mw-dark-gray/50 my-0"}),s.jsxs(oe,{to:"/admin",role:"menuitem",className:"flex items-center gap-2 px-4 py-1.5 text-sm xl:text-base text-white font-semibold hover:bg-mw-dark-gray hover:text-icon-accent transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",onClick:()=>u(!1),children:[s.jsx(Ba,{className:"w-4 h-4"}),"Admin Dashboard"]})]}),n&&(e==null?void 0:e.user_type)==="professional"&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"border-t border-mw-dark-gray/50 my-0"}),s.jsxs("button",{role:"menuitem",onClick:()=>{o(),u(!1)},className:"block w-full text-left px-4 py-1.5 text-sm xl:text-base text-white font-semibold hover:bg-mw-dark-gray hover:text-icon-accent transition-colors focus-visible:bg-mw-dark-gray focus-visible:text-icon-accent focus:outline-none",children:[s.jsx(ka,{className:"w-4 h-4 mr-2 inline"}),"Switch to Buyer"]})]}),s.jsx("div",{className:"border-t border-mw-dark-gray/50"}),s.jsxs("button",{role:"menuitem",onClick:()=>{i(),u(!1)},className:"flex w-full items-center gap-2 px-4 py-1.5 text-left text-sm font-semibold text-white transition-colors hover:bg-mw-olive hover:text-mw-black focus-visible:bg-mw-olive focus-visible:text-mw-black focus:outline-none xl:text-base",children:[s.jsx($a,{className:"w-4 h-4"}),"Sign Out"]})]})})]})}function ss(){Et();const[e]=Un(),t=d.useRef(!1),[r,a]=d.useState(!1),[n,o]=d.useState(()=>e.get("modal")==="feedback"),[i,l]=d.useState(!1),{user:c,profile:u,proProfile:m,isAdmin:h,hasBuyerProfile:p,hasProProfile:f,isLoading:y,switchUserType:x,signOut:_}=be(),b=ct(),{openAuthModal:E}=za(),v=oN(),w=!y,{data:N}
540=nN(c==null?void 0:c.id),[C,j]=d.useState(!1),k=!!(N!=null&&N.logoUrl)&&!C;d.useEffect(()=>{j(!1)},[N==null?void 0:N.logoUrl]);const S=v&&!!c,T=()=>{S?v.setOpenMobile(!v.openMobile):a(!0)},M=!0,P=e.get("modal");d.useEffect(()=>{if(P!=="feedback"){t.current=!1;return}!n&&!t.current&&o(!0)},[P,n]);const A=g=>{t.current=!g,o(g)},I=()=>{l(!0)},z=async()=>{await _(),b("/")},L=async()=>{const g=(u==null?void 0:u.user_type)==="buyer"?"professional":"buyer";await x(g),b(g==="professional"?"/pro/dashboard":"/dashboard")},me=p&&f,$=()=>{var g,X;return u!=null&&u.first_name&&(u!=null&&u.last_name)?`${u.first_name[0]}${u.last_name[0]}`.toUpperCase():((X=(g=c==null?void 0:c.email)==null?void 0:g[0])==null?void 0:X.toUpperCase())||"U"};return s.jsxs(s.Fragment,{children:[s.jsx("header",{className:"fixed top-0 left-0 w-full z-50 h-topbar bg-mw-black",children:s.jsxs("div",{className:"container h-full flex items-center justify-between",children:[s.jsx(oe,{to:"/",className:"flex items-center hover:scale-105 transition-transform duration-300 will-change-transform",children:k?s.jsx("img",{src:(N==null?void 0:N.logoUrl)||"",alt:(N==null?void 0:N.companyName)||"MustWants",loading:"eager",decoding:"sync",className:"max-h-10 xl:max-h-12 w-auto max-w-[180px] object-contain",onError:()=>j(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("img",{src:Mk,alt:"MustWants",width:200,height:40,loading:"eager",decoding:"sync",className:"h-8 xl:h-10 w-auto block"}),!M]})}),s.jsxs("nav",{className:`hidden lg:flex items-center gap-4 xl:gap-6 ml-auto h-full ${c?"text-sm xl:text-[15px]":"text-sm xl:text-base"}`,children:[w&&c&&s.jsx(oe,{to:(u==null?void 0:u.user_type)==="professional"?"/pro/dashboard":"/dashboard",className:"text-white font-semibold mw-link-underline hover:text-icon-accent transition-colors",children:"Dashboard"}),s.jsx(oa,{label:"Find a Home",href:"/find-home",items:Hi.map(g=>({label:g.label,href:g.href}))}),s.jsx(oe,{to:"/find-pro",className:"text-white font-semibold mw-link-underline hover:text-icon-accent transition-colors",children:"Find a Pro"}),s.jsx(oa,{label:"List a Home",items:Yd.map(g=>({label:g.label,href:g.href}))}),s.jsx(oa,{label:"Resources",items:[...Gd.map(g=>({label:g.label,href:g.href,children:g.children})),{label:"All PCS Resources",href:"/resources",divider:!0}]}),s.jsx(oa,{label:"Help",items:[{label:"About Us",href:"/about"},{label:"Contact Us",href:"/contact"},{label:"FAQs",href:"/faq"},{label:"Send Feedback",onClick:()=>o(!0)}]}),w&&!c&&s.jsxs(s.Fragment,{children:[s.jsx(qr,{orientation:"vertical",className:"h-6 bg-mw-dark-gray"}),s.jsx(oa,{label:"Real Estate Pros",align:"end",items:[{label:"I'm a...",sectionHeader:!0},...Kd.map(g=>({label:g.label,href:g.href})),{label:"All Pros",href:"/pro",divider:!0}]})]})]}),s.jsxs("div",{className:"hidden lg:flex items-center gap-2 xl:gap-4 ml-3 xl:ml-6",children:[s.jsx(qr,{orientation:"vertical",className:"h-6 bg-mw-dark-gray"}),w?c?s.jsxs(s.Fragment,{children:[s.jsx(yk,{}),s.jsx(lN,{profile:u,avatarUrl:u==null?void 0:u.avatar_url,initials:$(),isAdmin:h,canSwitch:me,onSwitch:L,onSignOut:I,proProfile:m})]}):s.jsxs(s.Fragment,{children:[s.jsx(U,{variant:"login",size:"sm",onClick:()=>E("login"),children:"Log In"}),s.jsx(U,{size:"sm",onClick:()=>E("signup"),children:"Sign Up"})]}):null]}),s.jsxs("div",{className:"flex lg:hidden items-center gap-3",children:[w?c?s.jsx(oe,{to:"/profile",className:"block","aria-label":"Open profile",children:s.jsxs(ks,{className:"h-9 w-9 hover:ring-2 hover:ring-icon-accent transition-all",children:[(u==null?void 0:u.avatar_url)&&s.jsx(Ns,{src:u.avatar_url,alt:"Profile"}),s.jsx(Ss,{className:"bg-icon-accent text-mw-black",children:$()})]})}):s.jsxs(s.Fragment,{children:[s.jsx(U,{variant:"login",size:"sm",className:"hidden sm:inline-flex",onClick:()=>E("login"),children:"Log In"}),s.jsx(U,{size:"sm",className:"hidden sm:inline-flex",onClick:()=>E("signup"),children:"Sign Up"})]}):null,s.jsx("button",{className:"text-white p-2 transition-colors hover:text-icon-accent",onClick:T,"aria-label":v!=null&&v.openMobile?"Close menu":"Open menu",children:v!=null&&v.openMobile?s.jsx(Mt,{size:24}):s.jsx(v2,{size:24})})]})]})}),!S&&s.jsx("div",{className:`fixed inset-0 bg-black/50 z-[60] transition-opacity duration-300 lg:hidden ${r?"opacity-100":"opacity-0 pointer-events-none"}`,onClick:()=>a(!1),"aria-hidden":"true"}),!S&&s.jsxs("div",{className:`fixed top-0 left-0 h-full w-[280px] bg-mw-black z-[70] flex flex-col transform transition-transform duration-500 ease-in-out lg:hidden ${r?"translate-x-0":"-translate-x-full"}`,role:"dialog","aria-modal":"true","aria-label":"Navigation menu",onKeyDown:g=>{g.key==="Escape"&&a(!1)},children:[s.jsxs("div",{className:"flex items-center justify-between px-4 h-topbar",children:[s.jsx(oe,{to:"/",onClick:()=>a(!1),children:s.jsx("img",{src:Wa,alt:"MustWants",className:"h-8 w-auto",width:32,height:32,loading:"eager",decoding:"sync"})}),s.jsx("button",{className:"text-white hover:opacity-80 transition-opacity",onClick:()=>a(!1),"aria-label":"Close menu",children:s.jsx(Mt,{size:24})})]}),s.jsxs("nav",{className:"flex-1 flex flex-col p-4 overflow-y-auto",children:[w&&c&&s.jsx(oe,{to:(u==null?void 0:u.user_type)==="professional"?"/pro/dashboard":"/dashboard",className:"text-white font-semibold py-3 hover:text-icon-accent transition-colors border-b border-mw-dark-gray/50",onClick:()=>a(!1),children:"Dashboard"}),s.jsx("div",{className:"pt-3 border-b border-mw-dark-gray/50",children:s.jsx("span",{className:"text-icon-accent text-sm uppercase tracking-wider font-semibold",children:"Find a Home"})}),Hi.map(g=>s.jsx(oe,{to:g.href,className:"text-white font-semibold py-3 hover:text-icon-accent transition-colors border-b border-mw-dark-gray/50 pl-4",onClick:()=>a(!1),children:g.label},g.href)),s.jsx("div",{className:"pt-3 border-b border-mw-dark-gray/50",children:s.jsx("span",{className:"text-icon-accent text-sm uppercase tracking-wider font-semibold",children:"List a Home"})}),Yd.map(g=>s.jsx(oe,{to:g.href,className:"text-white font-semibold py-3 hover:text-icon-accent transition-colors border-b border-mw-dark-gray/50 pl-4",onClick:()=>a(!1),children:g.label},g.href)),s.jsx(oe,{to:"/find-pro",className:"text-white font-semibold py-3 hover:text-icon-accent transition-colors border-b border-mw-dark-gray/50",onClick:()=>a(!1),children:"Find a Pro"}),s.jsx("div",{className:"pt-3 border-b border-mw-dark-gray/50",children:s.jsx("span",{className:"text-icon-accent text-sm uppercase tracking-wider font-semibold",children:"Resources"})}),Gd.map(g=>g.children&&g.children.length>0?s.jsxs("details",{className:"group border-b border-mw-dark-gray/50",children:[s.jsxs("summary",{className:"flex items-center justify-between text-white font-semibold py-3 pl-4 pr-2 hover:text-icon-accent transition-colors cursor-pointer list-none",children:[s.jsx(oe,{to:g.href,className:"flex-1",onClick:X=>{X.stopPropagation(),a(!1)},children:g.label}),s.jsx(Zs,{className:"w-4 h-4 transition-transform duration-200 group-open:rotate-180"})]}),s.jsx("div",{className:"bg-mw-dark-gray/20",children:g.children.map(X=>s.jsx(oe,{to:X.href,className:"block text-white text-sm py-2.5 pl-8 hover:text-icon-accent transition-colors border-t border-mw-dark-gray/50",onClick:()=>a(!1),children:X.label},X.href))})]},g.href):s.jsx(oe,{to:g.href,className:"text-white font-semibold py-3 hover:text-icon-accent transition-colors border-b border-mw-dark-gray/50 pl-4",onClick:()=>a(!1),children:g.label},g.href)),s.jsx(oe,{to:"/resources",className:"text-white font-semibold py-3 hover:text-icon-accent transition-colors border-b border-mw-dark-gray/50 pl-4",onClick:()=>a(!1),children:"All PCS Resources"}),s.jsx("div",{className:"pt-3 border-b border-mw-dark-gray/50",children:s.jsx("span",{className:"text-icon-accent text-sm uppercase tracking-wider font-semibold",children:"Help"})}),s.jsx(oe,{to:"/about",className:"text-white font-semibold py-3 hover:text-icon-accent transition-colors border-b border-mw-dark-gray/50 pl-4",onClick:()=>a(!1),children:"About Us"}),s.jsx(oe,{to:"/contact",className:"text-white font-semibold py-3 hover:text-icon-accent transition-colors border-b border-mw-dark-gray/50 pl-4",onClick:()=>a(!1),children:"Contact Us"}),s.jsx(oe,{to:"/faq",className:"text-white font-semibold py-3 hover:text-icon-accent transition-colors border-b border-mw-dark-gray/50 pl-4",onClick:()=>a(!1),children:"FAQs"}),s.jsx("button",{className:"text-white font-semibold py-3 hover:text-icon-accent transition-colors border-b border-mw-dark-gray/50 pl-4 w-full text-left",onClick:()=>{o(!0),a(!1)},children:"Send Feedback"}),w&&!c&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"pt-3 border-b border-mw-dark-gray/50",children:s.jsx("span",{className:"text-icon-accent text-sm uppercase tracking-wider font-semibold",children:"Real Estate Pros"})}),s.jsx("div",{className:"pl-4 py-2 text-icon-accent/70 text-xs uppercase tracking-wider",children:"I'm a..."}),Kd.map(g=>s.jsx(oe,{to:g.href,className:"text-white font-semibold py-3 hover:text-icon-accent transition-colors border-b border-mw-dark-gray/50 pl-4",onClick:()=>a(!1),children:g.label},g.href)),s.jsx(oe,{to:"/pro",className:"text-white font-semibold py-3 hover:text-icon-accent transition-colors border-b border-mw-dark-gray/50 pl-4",onClick:()=>a(!1),children:"All Pros"})]})]}),s.jsx("div",{className:"shrink-0 p-4 border-t border-mw-dark-gray",children:w?c?s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsxs(oe,{to:"/profile",className:"text-white font-medium py-2 hover:text-icon-accent flex items-center gap-2",onClick:()=>a(!1),children:[s.jsx(pr,{className:"w-4 h-4"}),"My Profile"]}),(u==null?void 0:u.user_type)==="professional"?s.jsxs(s.Fragment,{children:[s.jsxs(oe,{to:"/pro/connections",className:F("font-medium py-2 flex items-center justify-between",(m==null?void 0:m.subscription_tier)==="free"?"text-mw-gray-100":"text-white hover:text-icon-accent"),onClick:()=>a(!1),children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(kt,{className:"w-4 h-4"}),"Connections"]}),(m==null?void 0:m.subscription_tier)==="free"&&s.jsx(It,{className:"w-3.5 h-3.5"})]}),(m==null?void 0:m.pro_role)!=="business_owner"&&(m==null?void 0:m.pro_role)!=="property_manager"&&s.jsxs(oe,{to:"/blog/new",className:F("font-medium py-2 flex items-center justify-between",(m==null?void 0:m.subscription_tier)!=="pro"&&(m==null?void 0:m.tier_source)!=="legacy"?"text-mw-gray-100":"text-white hover:text-icon-accent"),onClick:g=>{(m==null?void 0:m.subscription_tier)!=="pro"&&(m==null?void 0:m.tier_source)!=="legacy"&&g.preventDefault(),a(!1)},children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(If,{className:"w-4 h-4"}),"Submit Blog"]}),(m==null?void 0:m.subscription_tier)!=="pro"&&(m==null?void 0:m.tier_source)!=="legacy"&&s.jsx(It,{className:"w-3.5 h-3.5"})]}),s.jsxs(oe,{to:"/pro/analytics",className:F("font-medium py-2 flex items-center justify-between",(m==null?void 0:m.subscription_tier)!=="pro"?"text-mw-gray-100":"text-white hover:text-icon-accent"),onClick:()=>a(!1),children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(so,{className:"w-4 h-4"}),"Analytics"]}),(m==null?void 0:m.subscription_tier)!=="pro"&&s.jsx(It,{className:"w-3.5 h-3.5"})]})]}):s.jsxs(oe,{to:"/favorites",className:"text-white font-medium py-2 hover:text-icon-accent flex items-center gap-2",onClick:()=>a(!1),children:[s.jsx(Gs,{className:"w-4 h-4"}),"Favorites"]}),h&&s.jsxs(oe,{to:"/admin",className:"text-white font-medium py-2 hover:text-icon-accent flex items-center gap-2",onClick:()=>a(!1),children:[s.jsx(Ba,{className:"w-4 h-4"}),"Admin Dashboard"]}),me&&s.jsxs("button",{className:"text-white font-medium py-2 hover:text-icon-accent flex items-center gap-2",onClick:()=>{L(),a(!1)},children:[s.jsx(ka,{className:"w-4 h-4"}),"Switch to ",(u==null?void 0:u.user_type)==="buyer"?"Pro":"Buyer"]}),s.jsxs(U,{variant:"ghost",className:"w-full mt-2 mb-4 text-white hover:bg-mw-olive hover:text-mw-black focus-visible:bg-mw-olive focus-visible:text-mw-black",onClick:()=>{I(),a(!1)},children:[s.jsx($a,{className:"w-4 h-4 mr-2"}),"Sign Out"]})]}):s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx(U,{variant:"login",className:"w-full",onClick:()=>{a(!1),E("login")},children:"Log In"}),s.jsx(U,{className:"w-full",onClick:()=>{a(!1),E("signup")},children:"Sign Up"})]}):null})]}),s.jsx(Hl,{open:n,onOpenChange:A,syncUrlWithQueryParam:!0}),s.jsx(mo,{open:i,onOpenChange:l,onConfirm:z})]})}const cN=[{site:"Facebook",href:"https://www.facebook.com/mustwants/",icon:Si},{site:"Instagram",href:"https://www.instagram.com/mustwants/",icon:Ci},{site:"X",href:"https://twitter.com/mustwants/",customIcon:!0},{site:"LinkedIn",href:"https://www.linkedin.com/company/mustwants/",icon:Ei},{site:"YouTube",href:"https://www.youtube.com/@mustwants/videos",icon:L2},{site:"BlueSky",href:"https://bsky.app/profile/mustwants.bsky.social",customIcon:!0}],dN="/assets/sdvosb-0RFjPMTg.png",uN="/assets/veteran-owned-white-DaY
540wCWm6.png",mN="/assets/veteran-owned-CSiTC45W.png",fN="/assets/military-spouse-UXt1sDJp.png";function hN({variant:e="dark",size:t="md",className:r=""}){const a={xs:"h-8 w-auto sm:h-9",sm:"h-[80px] w-auto sm:h-[100px] md:h-[120px]",md:"h-[100px] w-auto sm:h-[120px] md:h-[140px]",lg:"h-[100px] w-auto sm:h-[140px] md:h-[160px] lg:h-[180px]"},n=e==="dark"?uN:mN;return s.jsxs("div",{className:`flex items-center gap-3 ${r}`,children:[s.jsx("img",{src:dN,alt:"Service Disabled Veteran Owned Small Business",width:180,height:180,className:a[t],loading:"lazy"}),s.jsx("img",{src:n,alt:"Veteran Owned Business",width:180,height:180,className:a[t],loading:"lazy"}),s.jsx("img",{src:fN,alt:"Military Spouse Empowered Business",width:180,height:180,className:a[t],loading:"lazy"})]})}const pN=[{label:"FIND A HOME",href:"/find-home"},{label:"FIND A PRO",href:"/find-pro"},{label:"PCS RESOURCES",href:"/resources"},{label:"ABOUT",href:"/about"},{label:"CONTACT",href:"/contact"},{label:"POLICIES",href:"/policies"}];function gN({className:e}){return s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function xN({className:e}){return s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566.944 1.561 1.266.902 1.565.139 1.908 0 3.08 0 3.768c0 .69.378 5.65.624 6.479.815 2.736 3.713 3.66 6.383 3.364.136-.02.275-.039.415-.056-.138.022-.276.04-.415.056-3.912.58-7.387 2.005-2.83 7.078 5.013 5.19 6.87-1.113 7.823-4.308.953 3.195 2.05 9.271 7.733 4.308 4.267-4.308 1.172-6.498-2.74-7.078a8.741 8.741 0 0 1-.415-.056c.14.017.279.036.415.056 2.67.297 5.568-.628 6.383-3.364.246-.828.624-5.79.624-6.478 0-.69-.139-1.861-.902-2.206-.659-.298-1.664-.62-4.3 1.24C16.046 4.748 13.087 8.687 12 10.8Z"})})}function Hs(){return s.jsxs("footer",{className:"bg-mw-black text-white",children:[s.jsx("div",{className:"container py-2.5",children:s.jsxs("div",{className:"flex flex-col lg:flex-row items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[s.jsx(oe,{to:"/",className:"inline-block hover:scale-110 transition-transform duration-300 flex-shrink-0",children:s.jsx("img",{src:Wa,alt:"MustWants",className:"h-8 w-auto"})}),s.jsx(hN,{variant:"dark",size:"xs"})]}),s.jsx("nav",{className:"flex-1 flex flex-wrap items-center justify-center gap-x-6 gap-y-2",children:pN.map(e=>s.jsx(oe,{to:e.href,className:"text-xs font-semibold tracking-wider text-mw-gray-100 hover:text-icon-accent transition-colors",children:e.label},e.href))}),s.jsx("div",{className:"flex items-center gap-4",children:cN.map(e=>s.jsx("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-mw-gray-100 hover:text-icon-accent hover:scale-110 transition-all duration-300","aria-label":e.site,children:e.icon?s.jsx(e.icon,{className:"w-5 h-5"}):e.site==="X"?s.jsx(gN,{className:"w-5 h-5"}):e.site==="BlueSky"?s.jsx(xN,{className:"w-5 h-5"}):null},e.site))})]})}),s.jsx("div",{className:"border-t border-mw-dark-gray",children:s.jsx("div",{className:"container py-1.5",children:s.jsxs("p",{className:"text-center text-xs text-mw-gray-100",children:["Copyright © ",Il," ",new Date().getFullYear(),", All Rights Reserved",s.jsxs("span",{className:"text-mw-gray-100/70",children:[" | ",L_.patents]})]})})})]})}function Ui(){const[e,t]=d.useState(!1);d.useEffect(()=>{const a=()=>{t(window.scrollY>300)};return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)},[]);const r=()=>{window.scrollTo({top:0,behavior:"smooth"})};return e?s.jsx(U,{onClick:r,size:"icon",className:"fixed bottom-6 right-6 z-50 h-12 w-12 rounded-full bg-icon-accent hover:bg-icon-background text-mw-dark-gray shadow-lg transition-all duration-300 hover:scale-110","aria-label":"Scroll to top",children:s.jsx(jl,{className:"h-6 w-6 text-mw-dark-gray"})}):null}function rs(){const{profile:e,proProfile:t}=be(),{pathname:r}=Et();if((e==null?void 0:e.user_type)!=="professional"||(t==null?void 0:t.status)!=="draft"||r.startsWith("/pro/vetting"))return null;const a=!!(t.bio||t.company);return s.jsx("div",{className:"shrink-0 w-full border-b border-mw-olive/30 bg-icon-background",children:s.jsxs("div",{className:"mx-auto flex max-w-7xl items-center gap-3 px-4 py-2.5",children:[s.jsx(E2,{className:"hidden h-4 w-4 shrink-0 text-icon-accent sm:block"}),s.jsxs("p",{className:"min-w-0 flex-1 text-sm text-foreground",children:[s.jsx("span",{className:"font-medium",children:"Finish setting up your Pro profile."})," ",s.jsx("span",{className:"hidden text-muted-foreground sm:inline",children:"Complete onboarding to submit for review and get listed in Find a Pro."})]}),s.jsx(U,{size:"sm",asChild:!0,className:"shrink-0",children:s.jsxs(oe,{to:"/pro/vetting",children:[a?"Continue Onboarding":"Start Onboarding",s.jsx(cs,{className:"ml-1.5 h-4 w-4"})]})})]})})}const bN=[{title:"Find a Home",url:"/find-home",icon:ns},...Hi.map(e=>({title:e.label,url:e.href,icon:ns})),{title:"Find a Pro",url:"/find-pro",icon:kt}],yN=[{title:"Visual Data Maps",url:"/resources/maps",icon:Af},{title:"Checklists",url:"/resources/checklists",icon:kl},{title:"Blog",url:"/blog",icon:Sl},{title:"Calculators & Tools",url:"/resources/calculators",icon:a2},{title:"Podcast",url:"/resources/podcast",icon:p2},{title:"Partners",url:"/resources/partners",icon:ro}],vN=[{title:"About Us",url:"/about",icon:Cf},{title:"Contact Us",url:"/contact",icon:ao},{title:"FAQs",url:"/faq",icon:l2}];function Vl({excludeUrls:e=[]}){const{isMobile:t,setOpenMobile:r}=Qs(),a=Et();if(!t)return null;const n=bN.filter(c=>!e.includes(c.url)),o=yN.filter(c=>!e.includes(c.url)),i=c=>c.includes("?")?`${a.pathname}${a.search}`===c:a.pathname===c,l=()=>r(!1);return s.jsxs(s.Fragment,{children:[n.length>0&&s.jsxs(at,{children:[s.jsx(Ct,{className:"text-icon-accent text-xs uppercase tracking-wider font-semibold",children:"Navigate"}),s.jsx(nt,{children:s.jsx(st,{children:n.map(c=>s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,isActive:i(c.url),className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:s.jsxs(oe,{to:c.url,onClick:l,className:"flex items-center gap-2",children:[s.jsx(c.icon,{className:"h-4 w-4"}),s.jsx("span",{children:c.title})]})})},c.url))})})]}),o.length>0&&s.jsxs(at,{children:[s.jsx(Ct,{className:"text-icon-accent text-xs uppercase tracking-wider font-semibold",children:"PCS Resources"}),s.jsx(nt,{children:s.jsx(st,{children:o.map(c=>s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,isActive:i(c.url),className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:s.jsxs(oe,{to:c.url,onClick:l,className:"flex items-center gap-2",children:[s.jsx(c.icon,{className:"h-4 w-4"}),s.jsx("span",{children:c.title})]})})},c.url))})})]}),s.jsxs(at,{children:[s.jsx(Ct,{className:"text-icon-accent text-xs uppercase tracking-wider font-semibold",children:"Help"}),s.jsx(nt,{children:s.jsx(st,{children:vN.map(c=>s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,isActive:i(c.url),className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:s.jsxs(oe,{to:c.url,onClick:l,className:"flex items-center gap-2",children:[s.jsx(c.icon,{className:"h-4 w-4"}),s.jsx("span",{children:c.title})]})})},c.url))})})]})]})}const Ut=d.forwardRef(({className:e,activeClassName:t,pendingClassName:r,to:a,...n},o)=>s.jsx(Tg,{ref:o,to:a,className:({isActive:i,isPending:l})=>F(e,i&&t,l&&r),...n}));Ut.displayName="NavLink";const Zd={agent:0,lender:1,title_insurance_agent:2,home_inspector:3,insurance_agent:4,attorney:5},jp="mw_sidebar_pro_logos",wN=6;function _N(){try{const e=localStorage.getItem(jp);return e?JSON.parse(e):[]}catch{return[]}}function jN(e){try{localStorage.setItem(jp,JSON.stringify(e))}catch{}}function kN(){const{user:e}=be(),t=os(),[r,a]=d.useState(_N);return d.useEffect(()=>{if(!e){a([]);return}return t.getQueryCache().subscribe(()=>{const o=t.getQueryData(["buyer-connections",e.id]);if(!o)return;const i=o.filter(u=>u.professional).map(u=>({id:u.professional.id,photoUrl:u.professional.photoUrl,companyLogoUrl:u.professional.companyLogoUrl,proRole:u.pro_role})).sort((u,m)=>(Zd[u.proRole]??99)-(Zd[m.proRole]??99)).slice(0,wN),l=JSON.stringify(r),c=JSON.stringify(i);l!==c&&(a(i),jN(i))})},[e,t]),r}function NN({collapsed:e,onLogoClick:t}
540){const r=kN(),[a,n]=d.useState(new Set),o=r.filter(i=>i.companyLogoUrl&&!a.has(i.id));return e||o.length===0?null:s.jsxs(s.Fragment,{children:[s.jsx(at,{className:"pb-0",children:s.jsx(nt,{children:s.jsx("div",{className:"flex flex-col gap-2 px-3 py-2",children:o.map(i=>s.jsx("button",{type:"button",onClick:()=>t==null?void 0:t(i.id),className:"cursor-pointer hover:opacity-80 transition-opacity text-left",children:s.jsx("img",{src:i.companyLogoUrl,alt:"",className:"h-8 w-auto object-contain object-left",onError:()=>n(l=>new Set(l).add(i.id))})},i.id))})})}),s.jsx("div",{className:"px-3",children:s.jsx(qr,{className:"bg-mw-dark-gray"})})]})}const Qd="mw_marketing_visitor_id";function xo(){if(typeof window>"u")return null;try{const e=window.localStorage.getItem(Qd);if(e)return e;const t=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`;return window.localStorage.setItem(Qd,t),t}catch{return null}}let Tt=null;async function ql(){var a;const{data:e}=await R.auth.getUser(),t=((a=e==null?void 0:e.user)==null?void 0:a.id)??null;if(!t)return Tt={viewerUserId:null,isAdmin:!1},{viewerUserId:t,isAdmin:!1};if((Tt==null?void 0:Tt.viewerUserId)===t&&Tt.isAdmin!==void 0)return{viewerUserId:t,isAdmin:Tt.isAdmin};if((Tt==null?void 0:Tt.viewerUserId)!==t||!Tt.promise){const n=(async()=>{try{const{data:o,error:i}=await R.from("user_roles").select("role").eq("user_id",t);return i?(console.warn("[trackProEvent]",i.message),!1):(o??[]).some(l=>l.role==="admin"||l.role==="super_admin")}catch{return!1}})();Tt={viewerUserId:t,promise:n}}const r=await Tt.promise;return Tt={viewerUserId:t,isAdmin:r},{viewerUserId:t,isAdmin:r}}function Vo(e,t,r){const a=xo();ql().then(({viewerUserId:n,isAdmin:o})=>{o||R.from("pro_engagement_events").insert({pro_user_id:e,event_type:t,metadata:{...r??{},visitor_id:a,viewer_user_id:n}}).then(({error:i})=>{i&&console.warn("[trackProEvent]",i.message)})})}function SN(e){fetch(Vi(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),keepalive:!0}).catch(()=>{})}let qo=null;function kp(){return qo||(qo=crypto.randomUUID()),qo}function Np(){const e=navigator.userAgent,t={user_agent:e,device_type:CN(e),browser:EN(e),os:AN(e),screen_size:`${window.screen.width}x${window.screen.height}`,language:navigator.language,page_path:window.location.pathname};document.referrer&&(t.referrer=document.referrer);const r=new URLSearchParams(window.location.search);for(const a of["utm_source","utm_medium","utm_campaign"]){const n=r.get(a);n&&(t[a]=n)}return t}function CN(e){return/tablet|ipad/i.test(e)?"tablet":/mobile|iphone|android.*mobile/i.test(e)?"mobile":"desktop"}function EN(e){return/edg\//i.test(e)?"Edge":/chrome/i.test(e)&&!/edg/i.test(e)?"Chrome":/firefox/i.test(e)?"Firefox":/safari/i.test(e)&&!/chrome/i.test(e)?"Safari":"Other"}function AN(e){return/windows/i.test(e)?"Windows":/macintosh|mac os/i.test(e)?"macOS":/android/i.test(e)?"Android":/iphone|ipad|ipod/i.test(e)?"iOS":/linux/i.test(e)?"Linux":"Other"}function Vi(){return"https://oljfrvuqbiwnhtgzlrxb.supabase.co/functions/v1/track-webpage-event"}function T3(e,t,r){ql().then(({viewerUserId:a,isAdmin:n})=>{n||SN({pro_user_id:e,event_type:t,metadata:{...Np(),session_id:kp(),visitor_id:xo(),viewer_user_id:a,...r}})})}function Xd(e,t){const r=JSON.stringify({pro_user_id:e,event_type:"webpage_leave",metadata:{...Np(),session_id:kp(),visitor_id:xo(),duration_seconds:String(Math.round(t))}});navigator.sendBeacon(Vi(),new Blob([r],{type:"application/json"}))||fetch(Vi(),{method:"POST",headers:{"Content-Type":"application/json"},body:r,keepalive:!0}).catch(()=>{})}function R3(e,t){ql().then(({isAdmin:r})=>{r||Xd(e,t)}).catch(()=>{Xd(e,t)})}async function ds(e,t,r){var l;const{maxRetries:a=2,delayMs:n=800,backoff:o=!0}=r??{};let i=null;for(let c=0;c<=a;c++){if((l=t==null?void 0:t.signal)!=null&&l.aborted)return{data:null,error:new DOMException("Aborted","AbortError")};try{const{data:u,error:m}=await R.functions.invoke(e,t);if(!m)return{data:u,error:null};const h=m.message??"";if((h.includes("Failed to fetch")||h.includes("Failed to send")||h.includes("non-2xx")||h.includes("NOT_FOUND"))&&c<a){const f=o?n*Math.pow(2,c):n;console.warn(`[invokeWithRetry] ${e} attempt ${c+1} failed, retrying in ${f}
540ms...`,h),await Jd(f);continue}i=m}catch(u){if(i=u instanceof Error?u:new Error(String(u)),c<a){const m=o?n*Math.pow(2,c):n;console.warn(`[invokeWithRetry] ${e} attempt ${c+1} threw, retrying in ${m}ms...`,i.message),await Jd(m);continue}}}return{data:null,error:i}}function Jd(e){return new Promise(t=>setTimeout(t,e))}const P3=Object.freeze(Object.defineProperty({__proto__:null,invokeWithRetry:ds},Symbol.toStringTag,{value:"Module"})),TN={agent:"real_estate",broker:"real_estate",attorney:"attorney",home_inspector:"home_inspector",insurance_agent:"insurance_agent",lender:"lender",title_insurance_agent:"title_insurance_agent"},RN={real_estate:"Real Estate Agent / Broker",attorney:"Attorney",home_inspector:"Home Inspector",insurance_agent:"Insurance Agent",lender:"Lender",title_insurance_agent:"Title Insurance Agent"},PN=["agent","attorney","home_inspector","insurance_agent","lender","title_insurance_agent"],IN=["property_manager","business_owner"];function wn(e){return TN[e]||null}function I3(e){return PN.includes(e)}const eu={agent:"Real Estate Agent / Broker",broker:"Real Estate Agent / Broker",attorney:"Attorney",home_inspector:"Home Inspector",insurance_agent:"Insurance Agent",lender:"Lender",title_insurance_agent:"Title Insurance Agent",property_manager:"Property Manager",business_owner:"Business Partner"};function Sp(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function MN(e){const t=Sp(e);if(!t)return null;const r=Object.entries(t).filter(([,a])=>typeof a=="string");return r.length===0?null:Object.fromEntries(r)}function Wl(){const{user:e,profile:t,buyerProfile:r}=be(),a=os(),{data:n=[],isLoading:o,error:i}=et({queryKey:["buyer-connections",e==null?void 0:e.id],queryFn:async()=>{if(!e)return[];const{data:v,error:w}=await R.from("connections").select("*").eq("buyer_id",e.id).neq("client_status","archived");if(w)throw w;if(!v||v.length===0)return[];const N=v.map(A=>A.pro_id),{data:C,error:j}=await R.from("professional_profiles").select(` 541 id, user_id, pro_role, photo_url, company_logo_url, company, city, state, phone, bio, services, 542 years_experience, military_friendly, va_specialist, languages, latitude, longitude, subscription_tier, 543 website, military_branch, military_status, service_areas, social_links, license_number, role_specific_data 544 `).in("user_id",N);if(j)throw j;const{data:k,error:S}=await R.from("profiles").select("user_id, first_name, last_name, email").in("user_id",N);if(S)throw S;const T=new Map((C||[]).map(A=>[A.user_id,A])),M=new Map((k||[]).map(A=>[A.user_id,A]));return v.map(A=>{var $,g;const I=T.get(A.pro_id),z=M.get(A.pro_id),L=Sp(I.role_specific_data),me=((g=($=L==null?void 0:L.licenses)==null?void 0:$[0])==null?void 0:g.agentNmls)||null;return{...A,professional:I&&z?{id:I.id,firstName:z.first_name||"",lastName:z.last_name||"",photoUrl:I.photo_url,companyLogoUrl:I.company_logo_url,company:I.company,city:I.city,state:I.state,phone:I.phone,email:z.email,bio:I.bio,services:I.services||[],yearsExperience:I.years_experience,militaryFriendly:I.military_friendly??!0,vaSpecialist:I.va_specialist??!1,languages:I.languages||["English"],latitude:I.latitude?Number(I.latitude):null,longitude:I.longitude?Number(I.longitude):null,subscriptionTier:I.subscription_tier||"free",website:I.website,militaryBranch:I.military_branch,militaryStatus:I.military_status||[],serviceAreas:I.service_areas||[],socialLinks:MN(I.social_links),licenseNumber:I.license_number||"",nmlsNumber:me}:void 0}})},enabled:!!e}),l=v=>n.find(w=>wn(w.pro_role)===v),c=v=>{const w=wn(v);return w?!l(w):!1},u=v=>{const w=wn(v);return w?!!l(w):!1},m=Us({mutationFn:async({proId:v,proRole:w,buyerPhoneOverride:N})=>{if(!e)throw new Error("User not authenticated");await R.from("connections").delete().eq("buyer_id",e.id).eq("pro_role",w).eq("client_status","archived");const{error:C}=await R.from("connections").insert({buyer_id:e.id,pro_id:v,pro_role:w,client_status:"current",status:"accepted"});if(C)throw C;if(r!=null&&r.partner_id){const{data:j}=await R.from("profiles").select("user_id").eq("id",r.partner_id).single();j&&(await R.from("connections").delete().eq("buyer_id",j.user_id
544).eq("pro_role",w).eq("client_status","archived"),await R.from("connections").insert({buyer_id:j.user_id,pro_id:v,pro_role:w,client_status:"current",status:"accepted"}).select().maybeSingle())}h(v,w,N),p(v,w),f(e.id,v,w)},onSuccess:()=>{a.invalidateQueries({queryKey:["buyer-connections"]})}}),h=async(v,w,N)=>{try{const C=[t==null?void 0:t.first_name,t==null?void 0:t.last_name].filter(Boolean).join(" ")||"A buyer",j=N??(t==null?void 0:t.phone)??"",k=(r==null?void 0:r.moving_to)||"",S=(r==null?void 0:r.pcs_date)||"",T=await ds("send-connection-notification",{body:{buyerId:e==null?void 0:e.id,proId:v,proRole:w,buyerName:C,buyerPhone:j,buyerEmail:(t==null?void 0:t.email)??"",buyerLocation:k,buyerPcsDate:S}});T.error?console.error("Failed to send connection notification:",T.error):console.debug("Connection notification sent successfully")}catch(C){console.error("Error sending connection notification:",C)}},p=async(v,w)=>{try{const N=await ds("send-buyer-connection-confirmation",{body:{buyerId:e==null?void 0:e.id,proId:v,proRole:w}});N.error?console.error("Failed to send buyer confirmation:",N.error):console.debug("Buyer confirmation email sent successfully")}catch(N){console.error("Error sending buyer confirmation:",N)}},f=async(v,w,N)=>{try{const{data:C}=await R.from("connections").select("id").eq("buyer_id",v).eq("pro_id",w).eq("pro_role",N).order("created_at",{ascending:!1}).limit(1).single();if(!C)return;await ds("send-info-sharing-request",{body:{buyerId:v,proId:w,proRole:N,connectionId:C.id}})}catch(C){console.error("Error sending info sharing request:",C)}},y=async(v,w,N)=>{await m.mutateAsync({proId:v,proRole:w,buyerPhoneOverride:N})},x=async(v,w)=>{try{const N=[t==null?void 0:t.first_name,t==null?void 0:t.last_name].filter(Boolean).join(" ")||"A buyer",C=(t==null?void 0:t.phone)??"",j=(r==null?void 0:r.moving_to)||"";await ds("send-disconnection-notification",{body:{buyerId:e==null?void 0:e.id,proId:v,proRole:w,buyerName:N,buyerPhone:C,buyerEmail:(t==null?void 0:t.email)??"",buyerLocation:j}})}catch(N){console.error("Error sending disconnection notification:",N)}},_=async(v,w)=>{try{await ds("send-buyer-disconnection-email",{body:{buyerId:e==null?void 0:e.id,proId:v,proRole:w}})}catch(N){console.error("Error sending buyer disconnection email:",N)}},b=Us({mutationFn:async({proId:v,proRole:w})=>{if(!e)throw new Error("User not authenticated");const{error:N}=await R.from("connections").update({client_status:"archived",archived_by:"buyer"}).eq("buyer_id",e.id).eq("pro_id",v).eq("pro_role",w);if(N)throw N;if(r!=null&&r.partner_id){const{data:C}=await R.from("profiles").select("user_id").eq("id",r.partner_id).single();C&&await R.from("connections").update({client_status:"archived",archived_by:"buyer"}).eq("buyer_id",C.user_id).eq("pro_id",v).eq("pro_role",w)}x(v,w),_(v,w)},onSuccess:()=>{a.invalidateQueries({queryKey:["buyer-connections"]})}});return{connections:n,isLoading:o,error:i,getConnectionByType:l,canConnectWithRole:c,hasExistingConnection:u,createConnection:y,removeConnection:async(v,w)=>{await b.mutateAsync({proId:v,proRole:w})},isCreating:m.isPending,isRemoving:b.isPending}}const qi="mw_sub_tier";function LN(){try{const e=localStorage.getItem(qi);if(e==="free"||e==="basic"||e==="pro")return e}catch{}return"free"}function Gl(){const{user:e,profile:t}=be(),[r,a]=d.useState({subscribed:!1,tier:LN(),productId:null,subscriptionEnd:null,hasMarketingAddon:!1,isLegacy:!1}),[n,o]=d.useState(!1),[i,l]=d.useState(null),c=d.useCallback(async()=>{if(!e||(t==null?void 0:t.user_type)!=="professional"){try{localStorage.removeItem(qi)}catch{}a({subscribed:!1,tier:"free",productId:null,subscriptionEnd:null,hasMarketingAddon:!1,isLegacy:!1});return}o(!0),l(null);try{const{data:h,error:p}=await ds("check-subscription");if(p){console.error("Error checking subscription:",p),l(p.message);return}const f=h.tier||"free";try{localStorage.setItem(qi,f)}catch{}a({subscribed:h.subscribed,tier:f,productId:h.product_id||null,subscriptionEnd:h.subscription_end||null,hasMarketingAddon:h.has_marketing_addon||!1,isLegacy:h.is_legacy||!1})}catch(h){console.error("Error checking subscription:",h),l(h instanceof Error?h.message:"Failed to check
544subscription")}finally{o(!1)}},[e,t==null?void 0:t.user_type]);d.useEffect(()=>{e&&(t==null?void 0:t.user_type)==="professional"&&c()},[e,t==null?void 0:t.user_type,c]),d.useEffect(()=>{if(!e||(t==null?void 0:t.user_type)!=="professional")return;const h=setInterval(c,5*60*1e3);return()=>clearInterval(h)},[e,t==null?void 0:t.user_type,c]);const u=d.useCallback(async h=>{if(!e)throw new Error("You must be logged in to subscribe");const{data:p,error:f}=await ds("create-checkout",{body:{priceId:h}});if(f)throw new Error(f.message);return p!=null&&p.url&&window.open(p.url,"_blank"),p},[e]),m=d.useCallback(async()=>{if(!e)throw new Error("You must be logged in");const{data:h,error:p}=await ds("customer-portal");if(p)throw new Error(p.message);return h!=null&&h.url&&window.open(h.url,"_blank"),h},[e]);return{subscription:r,isLoading:n,error:i,checkSubscription:c,createCheckout:u,openCustomerPortal:m,isPro:r.tier==="pro",isBasic:r.tier==="basic",isProOrAbove:r.tier==="pro",hasMarketingAddon:r.hasMarketingAddon,isLegacy:r.isLegacy}}const ON=hr("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Cp=d.forwardRef(({className:e,variant:t,...r},a)=>s.jsx("div",{ref:a,role:"alert",className:F(ON({variant:t}),e),...r}));Cp.displayName="Alert";const DN=d.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:F("mb-1 font-medium leading-none tracking-tight",e),...t}));DN.displayName="AlertTitle";const Ep=d.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:F("text-sm [&_p]:leading-relaxed",e),...t}));Ep.displayName="AlertDescription";const Fn={agent:"Real Estate Agent",broker:"Real Estate Agent",attorney:"Attorney",home_inspector:"Home Inspector",insurance_agent:"Insurance Agent",lender:"Lender",title_insurance_agent:"Title Insurance Agent",property_manager:"Property Manager",business_owner:"Business Partner"},FN=["agent","lender","home_inspector","attorney","insurance_agent","title_insurance_agent","property_manager","business_owner"],M3=[...FN],$N=["agent","attorney","home_inspector","insurance_agent","lender","title_insurance_agent"];function an(e){return $N.includes(e)}function Ir(e){const t=e.replace(/\D/g,"").slice(0,10);return t.length===0?"":t.length<=3?`(${t}`:t.length<=6?`(${t.slice(0,3)}) ${t.slice(3)}`:`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`}function tu(e){return e.replace(/\D/g,"")}function BN({isOpen:e,onClose:t,onConfirm:r,professional:a,hasExistingConnection:n,phoneValue:o,onPhoneChange:i,phoneError:l,isLoading:c=!1}){var p,f;if(!a)return null;const u=wn(a.proRole),m=u?RN[u]:Fn[a.proRole],h=`${((p=a.firstName)==null?void 0:p[0])||""}${((f=a.lastName)==null?void 0:f[0])||""}`.toUpperCase();return s.jsx(_t,{open:e,onOpenChange:t,children:s.jsxs(gt,{className:"sm:max-w-md",children:[s.jsxs(ms,{children:[s.jsxs(ut,{className:"flex items-center gap-2",children:[s.jsx(I2,{className:"w-5 h-5 text-icon-accent"}),"Connect with Professional"]}),s.jsx(St,{children:"You're about to connect with this professional."})]}),s.jsxs("div",{className:"py-4",children:[s.jsxs("div",{className:"flex items-center gap-4 p-4 bg-muted rounded-lg mb-4",children:[s.jsxs(ks,{className:"h-20 w-20 shrink-0 ring-2 ring-mw-olive/40 bg-white",children:[s.jsx(Ns,{src:a.photoUrl||void 0,alt:`${a.firstName} ${a.lastName}`,className:"object-cover"}),s.jsx(Ss,{className:"text-xl font-semibold",children:h})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("h3",{className:"font-semibold text-lg",children:[a.firstName," ",a.lastName]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:Fn[a.proRole]}),a.company&&s.jsx("p",{className:"text-sm text-muted-foreground",children:a.company})]})]}),s.jsxs("div",{className:"space-y-2 mb-4",children:[s.jsx(Te,{htmlFor:"connection-phone",children:"Phone Number"}),s.jsx(We,{id:"connection-phone",type:"tel",inputMode:"tel",autoComplete:"tel",placeholder:"XXX-XXX-XXXX",value:o,onChange:y=>i(Ir(y.target.value)),className:l?"border-destructive":"","aria-invalid":l?"true":"false","aria-describedby":l?"connection-phone-error":void 0,disabled:c}),l&&s.jsx("p",{id:"connection-phone-error",className:"text-sm text-destructive",role:"alert",children:l})]}),s.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted-foreground bg-muted/50 rounded-lg p-3 mb-4",children:[s.jsx(Ai,{className:"w-4 h-4 shrink-0 mt-0.5 text-icon-accent"}),s.jsx("p",{children:"MustWants cares about your personal information - we will never sell your data."})]}),n&&s.jsxs(Cp,{variant:"destructive",className:"mb-4",children:[s.jsx(i2,{className:"h-4 w-4"}),s.jsxs(Ep,{children:["You already have a ",m," connection. You can only connect with one professional per category."]})]}),!n&&s.jsx("div",{className:"text-sm text-muted-foreground bg-mw-sand/30 rounded-lg p-3",children:s.jsxs("p",{children:[s.jsx("strong",{children:"Note:"})," You can only connect with one ",m," at a time. This professional will be notified and may contact you to discu
544ss your needs."]})})]}),s.jsxs(Hr,{className:"flex gap-2",children:[s.jsx(U,{variant:"outline",onClick:t,disabled:c,children:"Cancel"}),s.jsx(U,{onClick:r,disabled:c||n,children:c?"Connecting...":"Confirm Connection"})]})]})})}function zN(e){const{data:t,isLoading:r}=et({queryKey:["referrer-pro",e],enabled:!!e,staleTime:6e5,queryFn:async()=>{if(!e)return null;const{data:a,error:n}=await R.from("professional_profiles").select("user_id, photo_url, pro_role").eq("referral_code",e).eq("status","approved").eq("is_visible",!0).is("deleted_at",null).limit(1).maybeSingle();if(n||!a)return null;const{data:o,error:i}=await R.from("profiles").select("first_name, last_name").eq("user_id",a.user_id).maybeSingle();return i||!o?null:{userId:a.user_id,firstName:o.first_name||"",lastName:o.last_name||"",photoUrl:a.photo_url,proRole:a.pro_role}}});return{referrer:t??null,isLoading:r}}function HN(e){try{const t=new URL(e).hostname;if(!t.endsWith(".mustwants.com"))return null;const r=t.slice(0,-14);return r&&!r.includes(".")?r:null}catch{return null}}function Yl(e){const t=HN(e);return t?`/pro-site/${t}`:null}function L3(e){const t=Yl(e);return t?`${Q}${t}`:null}function O3(e){return Yl(e)??e}function UN(e){const[t,r]=d.useState(null);return d.useEffect(()=>{let a=!1;if(!e){r(null);return}return R.from("professional_webpages").select("website_url").eq("pro_id",e).eq("active",!0).maybeSingle().then(({data:n})=>{a||r(n!=null&&n.website_url?Yl(n.website_url):null)}),()=>{a=!0}},[e]),t}const VN="/assets/air-force-C_pp03ol.png",qN="/assets/army-BfsSlj5H.png",WN="/assets/coast-guard-DdvhrdjX.png",GN="/assets/department-of-defense-2d6VqYKK.png",su="/assets/marine-corps-ChGbuDR0.png",Wo="/assets/national-guard-B-qc_9kz.png",YN="/assets/navy-BkiDFoKy.png",KN="/assets/space-force-DEH6pAtv.png",$n={air_force:{name:"United States Air Force",shortName:"Air Force",seal:VN},army:{name:"United States Army",shortName:"Army",seal:qN},coast_guard:{name:"United States Coast Guard",shortName:"Coast Guard",seal:WN},marine_corps:{name:"United States Marine Corps",shortName:"Marine Corps",seal:su},marines:{name:"United States Marine Corps",shortName:"Marine Corps",seal:su},navy:{name:"United States Navy",shortName:"Navy",seal:YN},space_force:{name:"United States Space Force",shortName:"Space Force",seal:KN},national_guard:{name:"National Guard",shortName:"National Guard",seal:Wo},army_guard:{name:"Army National Guard",shortName:"Army NG",seal:Wo},air_guard:{name:"Air National Guard",shortName:"Air NG",seal:Wo},dod:{name:"Department of Defense",shortName:"DoD",seal:GN}},ru={us_army:"army",u_s__army:"army","u.s._army":"army",us_air_force:"air_force",u_s__air_force:"air_force",usaf:"air_force",af:"air_force",us_navy:"navy",u_s__navy:"navy",usn:"navy",us_marine_corps:"marine_corps",u_s__marine_corps:"marine_corps",usmc:"marine_corps",us_coast_guard:"coast_guard",u_s__coast_guard:"coast_guard",uscg:"coast_guard",us_space_force:"space_force",ussf:"space_force"};function Ap(e){const t=e.toLowerCase().replace(/[\s-]+/g,"_");if($n[t])return t;if(ru[t])return ru[t];for(const r of Object.keys($n))if(t.includes(r))return r;return t}function D3(e){var t;return e&&((t=$n[Ap(e)])==null?void 0:t.seal)||null}function Tp(e){return e&&$n[Ap(e)]||null}const ZN=new Set(["AL","AK","AZ","CA","CO","CT","DE","DC","FL","GA","HI","IA","ID","KS","KY","MD","MI","MS","NE","NV","NJ","NC","PA","SC","TN","TX","UT","VA","WA","WV","WY"]),bo={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District of Columbia",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming"},QN=Object.fromEntries(Object.entries(bo).map(([e,t])=>[t.toLowerCase(),e]));function F3(){return et({queryKey:["coverage-states"],queryFn:async()=>{var n,o;const[e,t]=await Promise.all([R.from("coverage_states").select("state_abbr, is_connected"),R.from("state_mls_entries").select("state_abbr, mls_name")]);if(e.error)throw e.error;t.error&&console.error("[coverage-states] Failed to load MLS entries:",t.error);const r=new Set;
544(n=e.data)==null||n.forEach(i=>{i.is_connected&&r.add(i.state_abbr)});const a={};return(o=t.data)==null||o.forEach(i=>{r.has(i.state_abbr)&&(a[i.state_abbr]||(a[i.state_abbr]=[]),a[i.state_abbr].push(i.mls_name))}),{connectedStates:r,mlsByState:a}},staleTime:5*60*1e3})}function $3(e,t){return(t??ZN).has(e.toUpperCase())}function XN(e){return bo[e.toUpperCase()]||e}function B3(e){const r=e.toUpperCase().trim().match(/\b([A-Z]{2})\b(?:\s+\d{5})?$/);if(r&&bo[r[1]])return r[1];const a=e.toLowerCase();for(const[n,o]of Object.entries(QN))if(a.includes(n))return o;return null}function au({className:e}){return s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}const JN=Object.keys(bo),jr="inline-flex items-center justify-center rounded-full transition-all duration-200 hover:-translate-y-0.5 hover:scale-110 hover:shadow-sm focus-visible:outline-none focus-visible:ring-2";function eS({professional:e,isOpen:t,onClose:r,onViewOnMap:a,onViewReferrer:n}){var hs,Ft,Rs,ps,ft,yt,gs,Gt;const{user:o,profile:i,proProfile:l}=be(),{openAuthModal:c}=za(),{isLegacy:u}=Gl(),{connections:m,hasExistingConnection:h,createConnection:p,removeConnection:f,isCreating:y,isRemoving:x}=Wl();ct();const[_,b]=d.useState(!1),[E,v]=d.useState(!1),[w,N]=d.useState(!1),[C,j]=d.useState(!1),[k,S]=d.useState(!1),[T,M]=d.useState(!1),[P,A]=d.useState(""),[I,z]=d.useState(""),[L,me]=d.useState(!1),{referrer:$}=zN(e==null?void 0:e.referredByCode),g=UN(e==null?void 0:e.id),X=d.useRef(null);if(d.useEffect(()=>{const Me=e==null?void 0:e.userId;if(!t||!Me){t||(X.current=null);return}X.current!==Me&&(X.current=Me,Vo(Me,"profile_view"))},[t,e==null?void 0:e.userId]),!e)return null;const de=`${((hs=e.firstName)==null?void 0:hs[0])||""}${((Ft=e.lastName)==null?void 0:Ft[0])||""}`.toUpperCase(),re=`${e.firstName} ${e.lastName}`.trim()||e.company||"Business Partner",D=[...new Set(((Rs=e.coverageStates)!=null&&Rs.length?e.coverageStates:((ps=e.serviceAreas)==null?void 0:ps.filter(Me=>Me.length===2))??[]).map(Me=>Me.toUpperCase()))],H=e.coverageType==="national"||JN.every(Me=>D.includes(Me)),Z=H||e.coverageType==="state"&&(D.length>0||(((ft=e.serviceAreas)==null?void 0:ft.length)??0)>0),ee=!!o,ae=(i==null?void 0:i.user_type)==="professional",Y=!ae,te=l==null?void 0:l.subscription_tier,Se=ae&&(te==="basic"||te==="pro"||u),Le=ee&&Y&&m.some(Me=>Me.pro_id===e.userId),Pe=e.proRole==="business_owner"||e.proRole==="property_manager"||Le||Se,le=Y&&an(e.proRole),he=h(e.proRole),Oe=e.email&&!/^marketing\+[^@]*@mustwants\.com$/i.test(e.email)?e.email:null,tt=!!(e.phone||Oe),K=y||L,G=Tp(e.militaryBranch),Ce=e.militaryStatus.length>0?e.militaryStatus.map(Me=>Me.replace(/_/g," ").replace(/\b\w/g,B=>B.toUpperCase())).join(", "):null,$e=e.website?e.website.startsWith("http")?e.website:`https://${e.website}`:null,Qe=er[e.proRole]??Ye.css.mwOlive,He=Fn[e.proRole],Ae=e.socialLinks||{},bt=()=>{if(!ee){N(!0);return}le&&(e.userId&&Vo(e.userId,"connect_intent"),A(Ir((i==null?void 0:i.phone)||"")),z(""),b(!0))},De=async()=>{const Me=tu(P);if(Me.length<10){z("Please enter a valid phone number.");return}try{const B=tu((i==null?void 0:i.phone)||"");if(Me!==B){me(!0);const{error:ge}=await R.from("profiles").update({phone:Me}).eq("user_id",o.id);if(ge)throw ge}await p(e.userId,e.proRole,Me),b(!1),M(!0)}catch(B){console.error("Error creating connection:",B),it({title:"Connection failed",description:"Failed to create connection. Please try again.",variant:"destructive"})}finally{me(!1)}},ot=async()=>{try{await f(e.userId,e.proRole),v(!1),r(),it({title:"Professional removed",description:`${re} was removed from My Professionals.`})}catch(Me){console.error("Error removing connection:",Me),it({title:"Remove failed",description:"Failed to remove this professional. Please try again.",variant:"destructive"})}},mt=()=>{M(!1),r()};return s.jsxs(s.Fragment,{children:[s.jsx(_t,{open:t,onOpenChange:Me=>{Me||mt()},children:s.jsxs(gt,{style:T?void 0:{borderColor:Qe},className:T?"sm:max-w-md":"max-w-3xl p-0 gap-0 [&>button]:hidden flex flex-col overflow-hidden rounded-none sm:rounded-lg h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[90vh] border-2",children:[s.jsx(ut,{className:"sr-only",children:re}),s.jsxs(St,{className:"sr-only",children:["Professional profile details for ",re]}),T?s.jsxs("div",{className:"space-y-4 py-2",children:[s.jsxs(ms,{children:[s.jsx(ut,{children:"Connection Successful"}),s.jsxs(St,{children:["A connection email was successfully sent to ",re,". This professional can now be found under Your Professionals."]})]}),s.jsx("div",{className:"flex justify-end",children:s.jsx(U,{onClick:mt,children:"Close"})})]}):s.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 sm:px-6 py-3 shrink-0",style:{backgroundColor:Qe},children:[s.jsx("p",{className:"text-xs sm:text-sm font-semibold uppercase tracking-[0.14em] text-white",children:He}),s.jsx("button",{onClick:mt,className:"rounded-sm text-white/90 hover:text-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70","aria-label":"Close",children:s.jsx(Mt,{className:"w-5 h-5"})})]}),s.jsx("div",{className:"px-4 sm:px-6 pt-4 pb-5",children:s.jsxs("div",{className:"flex flex-col sm:flex-row gap-5",children:[s.jsxs("div",{className:"flex flex-row gap-4 sm:contents",children:[s.jsx("div",{className:"shrink-0 self-start",children:s.jsxs(ks,{className:"w-24 h-24 sm:w-40 sm:h-40 border-4",style:{borderColor:Qe},children:[s.jsx(Ns,{src:e.photoUrl||void 0,alt:re,className:"object-cover"}),s.jsx(Ss,{className:"text-3xl sm:text-5xl bg-muted text-muted-foreground",children:de})]})}),s.jsxs("div",{className:"flex-1 min-w-0 sm:hidden pt-1 flex flex-col items-start",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("h2",{className:"text-xl font-heading font-bold leading-tight",children:re}),e.proRole=="lender"&&s.jsxs(s.Fragment,{children:[e.licenseNumber&&s.jsxs("span",{className:"text-sm font-medium",children:["NMLS #",e.licenseNumber||""]}),e.nmlsNumber&&s.jsxs("span",{className:"text-sm font-medium",children:[" / NMLS #",e.nmlsNumber||""]})]}),e.city&&e.state&&s.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[s.jsx($s,{className:"w-3.5 h-3.5 shrink-0"}),s.jsxs("span",{children:[e.city,", ",e.state]})]})]}),(g||$e||Object.keys(Ae).length>0)&&s.jsxs("div",{className:"mt-3 flex flex-col items-start gap-2",children:[g&&s.jsxs("a",{href:g,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 self-start text-sm font-bold text-mw-black underline underline-offset-2 hover:text-mw-black/80",children:[s.jsx(en,{className:"w-3.5 h-3.5 shrink-0"}),"View Homepage"]}),$e&&s.jsxs("a",{href:$e,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 self-start text-sm font-bold text-mw-black underline underline-offset-2 hover:text-mw-black/80",children:[s.jsx(en,{className:"w-3.5 h-3.5 shrink-0"}),"Website"]}),Object.keys(Ae).length>0&&s.jsxs("div",{className:"flex items-center justify-start gap-1.5",children:[Ae.facebook&&s.jsx("a",{href:Ae.facebook,target:"_blank",rel:"noopener noreferrer",className:`${jr} h-8 w-8 ${vr.facebook}`,"aria-label":"Facebook",children:s.jsx(Si,{className:"w-4 h-4"})}),Ae.instagram&&s.jsx("a",{href:Ae.instagram,target:"_blank",rel:"noopener noreferrer",className:`${jr} h-8 w-8 ${vr.instagram}`,"aria-label":"Instagram",children:s.jsx(Ci,{className:"w-4 h-4"})}),Ae.linkedin&&s.jsx("a",{href:Ae.linkedin,target:"_blank",rel:"noopener noreferrer",className:`${jr} h-8 w-8 ${vr.linkedin}`,"aria-label":"LinkedIn",children:s.jsx(Ei,{className:"w-4 h-4"})}),Ae.x&&s.jsx("a",{href:Ae.x,target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-8 w-8 items-center justify-center rounded-full text-foreground transition-all duration-200 hover:-translate-y-0.5 hover:scale-110 hover:bg-foreground
544/5 hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foreground/20","aria-label":"X",children:s.jsx(au,{className:"w-4 h-4"})})]})]})]})]}),s.jsxs("div",{className:"flex-1 grid grid-cols-1 sm:grid-cols-[minmax(0,1fr)_minmax(0,1.2fr)] gap-x-5 gap-y-2 items-start",children:[s.jsxs("div",{className:"hidden sm:flex pt-4 sm:pt-6 flex-col items-start",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("h2",{className:"text-xl font-heading font-bold leading-tight",children:re}),e.proRole=="lender"&&s.jsxs(s.Fragment,{children:[e.licenseNumber&&s.jsxs("span",{className:"text-sm font-medium",children:["NMLS #",e.licenseNumber||""]}),e.nmlsNumber&&s.jsxs("span",{className:"text-sm font-medium",children:[" / NMLS #",e.nmlsNumber||""]})]}),e.city&&e.state&&s.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[s.jsx($s,{className:"w-3.5 h-3.5 shrink-0"}),s.jsxs("span",{children:[e.city,", ",e.state]})]})]}),(g||$e||Object.keys(Ae).length>0)&&s.jsxs("div",{className:"mt-4 flex flex-col items-start gap-2",children:[g&&s.jsxs("a",{href:g,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 self-start text-sm font-bold text-mw-black underline underline-offset-2 hover:text-mw-black/80",children:[s.jsx(en,{className:"w-3.5 h-3.5 shrink-0"}),"View Homepage"]}),$e&&s.jsxs("a",{href:$e,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 self-start text-sm font-bold text-mw-black underline underline-offset-2 hover:text-mw-black/80",children:[s.jsx(en,{className:"w-3.5 h-3.5 shrink-0"}),"Website"]}),Object.keys(Ae).length>0&&s.jsxs("div",{className:"flex items-center justify-start gap-1.5",children:[Ae.facebook&&s.jsx("a",{href:Ae.facebook,target:"_blank",rel:"noopener noreferrer",className:`${jr} h-9 w-9 ${vr.facebook}`,"aria-label":"Facebook",children:s.jsx(Si,{className:"w-5 h-5"})}),Ae.instagram&&s.jsx("a",{href:Ae.instagram,target:"_blank",rel:"noopener noreferrer",className:`${jr} h-9 w-9 ${vr.instagram}`,"aria-label":"Instagram",children:s.jsx(Ci,{className:"w-5 h-5"})}),Ae.linkedin&&s.jsx("a",{href:Ae.linkedin,target:"_blank",rel:"noopener noreferrer",className:`${jr} h-9 w-9 ${vr.linkedin}`,"aria-label":"LinkedIn",children:s.jsx(Ei,{className:"w-5 h-5"})}),Ae.x&&s.jsx("a",{href:Ae.x,target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-9 w-9 items-center justify-center rounded-full text-foreground transition-all duration-200 hover:-translate-y-0.5 hover:scale-110 hover:bg-foreground
544/5 hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foreground/20","aria-label":"X",children:s.jsx(au,{className:"w-5 h-5"})})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[e.companyLogoUrl&&!k&&s.jsx("img",{src:e.companyLogoUrl,alt:e.company||"Company logo",className:"max-h-12 max-w-[180px] object-contain",onError:()=>S(!0)}),e.company&&s.jsx("p",{className:"text-sm font-medium",children:e.company}),s.jsxs("div",{className:Pe?"":"blur-sm select-none pointer-events-none",children:[e.phone&&s.jsxs("a",{href:`tel:${e.phone}`,className:"underline inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors w-full max-w-full",children:[s.jsx(Rf,{className:"w-3.5 h-3.5 shrink-0"}),s.jsx("span",{className:"break-all",children:Ir(e.phone)})]}),Oe&&s.jsxs("a",{href:`mailto:${Oe}`,className:"underline inline-flex items-start gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors w-full max-w-full",children:[s.jsx(ao,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),s.jsx("span",{className:"break-all",children:Oe})]})]}),!Pe&&tt&&(ae&&!Se?s.jsxs("button",{onClick:()=>j(!0),className:"flex items-center gap-1 text-xs text-muted-foreground hover:underline",children:[s.jsx(It,{className:"w-3 h-3"}),"Upgrade to Basic to view"]}):s.jsxs("button",{onClick:()=>{ee?Y&&!Le&&bt():N(!0)},className:"flex items-center gap-1 text-xs text-muted-foreground hover:underline",children:[s.jsx(It,{className:"w-3 h-3"}),"Connect to view"]}))]})]})]})}),(G||Ce)&&s.jsxs("div",{className:"px-4 sm:px-6 pb-4",children:[s.jsx("h3",{className:"font-heading font-bold text-sm mb-1",children:"Service Affiliation:"}),s.jsxs("div",{className:"flex items-center gap-3",children:[G&&s.jsx("img",{src:G.seal,alt:G.name,className:"w-14 h-14 object-contain"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:[Ce,G==null?void 0:G.shortName].filter(Boolean).join(" · ")})]})]}),e.bio&&s.jsxs("div",{className:"px-4 sm:px-6 pb-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm mb-1",children:"About:"}),s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e.bio})]}),Z&&s.jsxs("div",{className:"px-4 sm:px-6 pb-5",children:[s.jsx("h3",{className:"font-heading font-bold text-sm mb-1",children:"Coverage:"}),s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:H?"National Coverage":D.length?D.map(Me=>XN(Me)).join(", "):(yt=e.serviceAreas)==null?void 0:yt.join(", ")})]}),s.jsxs("div",{className:"px-4 sm:px-6 py-4 border-t shrink-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[$?s.jsxs("button",{type:"button",onClick:()=>{r(),n==null||n($.userId)},className:"flex items-center gap-2.5 text-xs text-muted-foreground hover:text-foreground transition-colors group",children:[s.jsxs(ks,{className:"h-6 w-6 border border-mw-olive",children:[s.jsx(Ns,{src:$.photoUrl||void 0,alt:`${$.firstName} ${$.lastName}`,className:"object-cover"}),s.jsx(Ss,{className:"text-[10px] bg-muted text-muted-foreground",children:(((gs=$.firstName)==null?void 0:gs[0])||"")+(((Gt=$.lastName)==null?void 0:Gt[0])||"")})]}),s.jsxs("span",{className:"group-hover:underline",children:["Recommended by ",$.firstName," ",$.lastName]})]}):s.jsxs("div",{className:"flex items-center gap-2.5 text-xs text-muted-foreground",children:[s.jsx("img",{src:Ea,alt:"","aria-hidden":!0,className:"h-6 w-6 rounded-md object-cover"}),s.jsx("span",{children:"Recommended by MustWants"})]}),s.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-3 ml-auto",children:[!Le&&e.latitude&&e.longitude&&s.jsxs(U,{variant:"outline",size:"sm",onClick:()=>{e.userId&&Vo(e.userId,"map_pin_click",{source:"see_coverage_button"}),a?(r(),a(e)):window.open(`https://www.google.com/maps?q=${e.latitude},${e.longitude}`,"_blank")},children:[s.jsx($s,{className:"w-4 h-4 mr-1"})," See Coverage on Map"]}),$e&&!an(e.proRole)&&s.jsxs(U,{size:"sm",onClick:()=>window.open($e,"_blank","noopener,noreferrer"),children:["Visit Partner ",s.jsx(s2,{className:"w-4 h-4 ml-1"})]}),Le?s.jsx(U,{variant:"outline",onClick:()=>v(!0),disabled:x,children:x?"Removing...":"Remove"}):(le||!ee)&&an(e.proRole)?s.jsx(U,{onClick:bt,disabled:he,children:he?`Already have a ${Fn[e.proRole]}`:`Connect with ${e.firstName}`}):null]})]}),!Le&&(le||!ee)&&an(e.proRole)&&!he&&s.jsx("p",{className:"text-xs text-muted-foreground italic mt-1 text-right",children:"You'll be able to confirm."})]})]})]})}),s.jsx(_t,{open:w,onOpenChange:N,children:s.jsxs(gt,{className:"sm:max-w-md",children:[s.jsxs(ms,{children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-icon-background flex items-center justify-center mx-auto mb-2",children:s.jsx(El,{className:"w-6 h-6 text-icon-accent"})}),s.jsx(ut,{className:"text-center",children:"Sign In to Connect with Pros"}),s.jsx(St,{className:"text-center",children:"Create a free account or sign in to start connecting with this professional."})]}),s.jsx("div",{className:"flex justify-center pt-2",children:s.jsx(U,{onClick:()=>{N(!1),r(),c("login")},children:"Sign In / Create Account"})})]})}),s.jsx(BN,{isOpen:_,onClose:()=>{b(!1),z("")},onConfirm:De,professional:e,hasExistingConnection:he,phoneValue:P,onPhoneChange:Me=>{A(Me),z("")},phoneError:I,isLoading:K}),s.jsx(_t,{open:E,onOpenChange:v,children:s.jsxs(gt,{className:"sm:max-w-lg",children:[s.jsxs(ms,{children:[s.jsx(ut,{children:"Are you sure you want to delete this professional?"}),s.jsx(St,{className:"pt-2 text-sm leading-relaxed",children:"Deleting this professional will remove them from the âMy Professionalsâ section. You can add them back at any time by searching for them on âFind a Proâ page and selecting Connect."})]}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(U,{variant:"outline",onClick:()=>v(!1),disabled:x,children:"Cancel"}),s.jsx(U,{variant:"destructive",onClick:ot,disabled:x,children:x?"Removing...":"Remove"})]})]})}),s.jsx(_t,{open:C,onOpenChange:j,children:s.jsxs(gt,{className:"sm:max-w-md",children:[s.jsx(ut,{children:"Upgrade to view contact info"}),s.jsxs(St,{children:["Upgrade to a ",s.jsx("strong",{children:"Basic"})," subscription to view contact details for other professionals on the platform."]}),s.jsxs("div",{className:"flex gap-3 pt-4",children:[s.jsx(U,{variant:"outline",className:"flex-1",onClick:()=>j(!1),children:"Not now"}),s.jsx(U,{className:"flex-1",onClick:()=>{j(!1),r(),window.location.href="/pro/subscription"},children:"View Plans"})]})]})})]})}const tS=[{title:"Dashboard",url:"/dashboard",icon:Cl},{title:"Priorities",url:"/priorities",icon:Ef},{title:"Find a Home",url:"/find-home",icon:ns},{title:"Find a Pro",url:"/find-pro",icon:kt}],sS=[{title:"My Pros",url:"/my-pros",icon:ro},{title:"My Favorites",url:"/favorites",icon:Gs},{title:"My Listings",url:"/my-listings",icon:sr}],rS=[{title:"Checklists",url:"/resources/checklists",icon:kl},{title:"Blogs",url:"/blog",icon:Sl}],aS=[{title:"My Profile",url:"/profile",icon:pr}];function Ga(){const e=Et(),t=ct(),{state:r,isMobile:a,setOpenMobile:n}=Qs(),{signOut:o,profile:i,isAdmin:l,buyerProfile:c,hasProProfile:u,hasBuyerProfile:m,switchUserType:h}
544=be(),p=r==="collapsed"&&!a,[f,y]=d.useState(!1),[x,_]=d.useState(!1),[b,E]=d.useState(null),{connections:v}=Wl(),w=d.useCallback(T=>{const M=v.find(A=>{var I;return((I=A.professional)==null?void 0:I.id)===T});if(!(M!=null&&M.professional))return;const P=M.professional;E({id:P.id,userId:M.pro_id,firstName:P.firstName,lastName:P.lastName,proRole:M.pro_role,company:P.company,city:P.city,state:P.state,bio:P.bio,services:P.services,phone:P.phone,email:P.email,photoUrl:P.photoUrl,yearsExperience:P.yearsExperience,militaryFriendly:P.militaryFriendly,vaSpecialist:P.vaSpecialist,languages:P.languages,latitude:P.latitude,longitude:P.longitude,subscriptionTier:P.subscriptionTier,website:P.website,militaryBranch:P.militaryBranch,militaryStatus:P.militaryStatus,companyLogoUrl:P.companyLogoUrl,serviceAreas:P.serviceAreas,socialLinks:P.socialLinks,referredByCode:null})},[v]),N=m&&u,C=(c==null?void 0:c.onboarding_completed)===!1&&(c==null?void 0:c.hide_profile_card)!==!0,j=T=>e.pathname===T,k=()=>{a&&n(!1)},S=async()=>{await h("professional"),a&&n(!1),t("/pro/dashboard")};return s.jsxs(s.Fragment,{children:[s.jsxs(fo,{collapsible:"icon",className:"bg-mw-black border-r border-mw-dark-gray",children:[s.jsx(ho,{className:"bg-mw-black p-0",children:a?s.jsxs("div",{className:"flex items-center justify-between px-4 h-topbar",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(oe,{to:"/",children:s.jsx("img",{src:Wa,alt:"MustWants",className:"h-8 w-auto",width:32,height:32,loading:"eager",decoding:"sync"})}),s.jsx("span",{className:"text-xs tracking-widest uppercase text-icon-accent/70 font-medium",children:"USER"})]}),s.jsxs("button",{onClick:()=>n(!1),className:"text-white hover:opacity-80 transition-opacity",children:[s.jsx(Mt,{className:"h-6 w-6"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]}):p?s.jsxs("div",{className:"flex flex-col items-center gap-2 py-3",children:[s.jsx("span",{className:"text-[9px] tracking-widest uppercase text-icon-accent font-medium",children:"USER"}),s.jsx(Dt,{className:"text-white hover:text-icon-accent hover:bg-mw-dark-gray h-8 w-8 rounded-full"})]}):s.jsxs("div",{className:"flex items-center justify-between px-4 pt-4 pb-2",children:[s.jsx("span",{className:"text-xs tracking-widest uppercase text-icon-accent/70 font-medium",children:"USER"}),s.jsx(Dt,{className:"text-white hover:text-icon-accent hover:bg-mw-dark-gray h-8 w-8"})]})}),s.jsxs(go,{className:"bg-mw-black",children:[s.jsx(NN,{collapsed:p,onLogoClick:w}),s.jsx(at,{children:s.jsx(nt,{children:s.jsx(st,{children:tS.map(T=>s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,isActive:j(T.url),tooltip:p?T.title:void 0,className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:s.jsxs(Ut,{to:T.url,onClick:k,className:`flex items-center gap-2 ${p?"justify-center w-full":""}`,activeClassName:"text-mw-black",children:[s.jsx(T.icon,{className:p?"h-5 w-5":"h-4 w-4"}),!p&&s.jsx("span",{children:T.title}),!p&&T.url==="/dashboard"&&C&&s.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-mw-red animate-pulse ml-1"})]})})},T.url))})})}),s.jsxs(at,{children:[s.jsx(Ct,{className:"text-icon-accent text-xs uppercase tracking-wider font-semibold",children:"My Stuff"}),s.jsx(nt,{children:s.jsx(st,{children:sS.map(T=>s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,isActive:j(T.url),tooltip:p?T.title:void 0,className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:s.jsxs(Ut,{to:T.url,onClick:k,className:`flex items-center gap-2 ${p?"justify-center w-full":""}`,activeClassName:"text-mw-black",children:[s.jsx(T.icon,{className:p?"h-5 w-5":"h-4 w-4"}),!p&&s.jsx("span",{children:T.title})]})})},T.url))})})]}),s.jsxs(at,{children:[s.jsx(Ct,{className:"text-icon-accent text-xs uppercase tracking-wider font-semibold",children:"Resources"}),s.jsx(nt,{children:s.jsx(st,{children:rS.map(T=>s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,isActive:j(T.url),tooltip:p?T.title:void 0,className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:s.jsxs(Ut,{to:T.url,onClick:k,className:`flex items-center gap-2 ${p?"justify-center w-full":""}`,activeClassName:"text-mw-black",children:[s.jsx(T.icon,{className:p?"h-5 w-5":"h-4 w-4"}),!p&&s.jsx("span",{children:T.title})]})})},T.url))})})]}),s.jsxs(at,{children:[s.jsx(Ct,{className:"text-icon-accent text-xs uppercase tracking-wider font-semibold",children:"Account"}),s.jsx(nt,{children:s.jsxs(st,{children:[aS.map(T=>s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,isActive:j(T.url),tooltip:p?T.title:void 0,className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:s.jsxs(Ut,{to:T.url,onClick:k,className:`flex items-center gap-2 ${p?"justify-center w-full":""}`,activeClassName:"text-mw-black",children:[s.jsx(T.icon,{className:p?"h-5 w-5":"h-4 w-4"}),!p&&s.jsx("span",{children:T.title})]})})},T.url)),s.jsx(Xe,{children:s.jsx(Je,{tooltip:p?"Send Feedback":void 0,className:"text-white hover:text-icon-accent hover:bg-mw-dark-gray text-base font-semibold cursor-pointer",onClick:()=>y(!0),children:s.jsxs("span",{className:`flex items-center gap-2 ${p?"justify-center w-full":""}`,children:[s.jsx(no,{className:p?"h-5 w-5":"h-4 w-4"}),!p&&s.jsx("span",{children:"Send Feedback"})]})})})]})})]}),s.jsx(Vl,{excludeUrls:["/find-home","/find-pro","/resources/checklists","/blog"]})]}),s.jsxs(po,{className:"border-t border-mw-dark-gray bg-mw-black",children:[l&&s.jsx("div",{className:p?"pt-2":"px-2 pt-2",children:s.jsx(st,{children:s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,isActive:j("/admin"),tooltip:p?"Admin":void 0,className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:s.jsxs(Ut,{to:"/admin",onClick:k,className:`flex items-center gap-2 ${p?"justify-center w-full":""}`,activeClassName:"text-mw-black",children:[s.jsx(Ba,{className:p?"h-5 w-5":"h-4 w-4"}),!p&&s.jsx("span",{children:"Admin"})]})})})})}),s.jsxs("div",{className:`p-2 ${p?"flex flex-col items-center":""}`,children:[!p&&i&&s.jsxs("div",{className:"mb-2 px-2",children:[s.jsxs("p",{className:"text-sm font-medium text-white truncate",children:[i.first_name," ",i.last_name]}),s.jsx("p",{className:"text-xs text-white truncate",children:i.email})]}),a&&N&&s.jsxs(U,{variant:"ghost",size:"sm",className:"w-full justify-start text-white hover:text-icon-accent hover:bg-mw-dark-gray",onClick:S,children:[s.jsx(ka,{className:"h-4 w-4"}),s.jsx("span",{className:"ml-2",children:"Switch to Pro"})]}),s.jsx("div",{className:`${p?"my-2 w-8":"my-2 w-full"} h-px bg-white/20`}),s.jsxs(U,{variant:"ghost",size:"sm",className:`text-white hover:text-white hover:bg-mw-dark-gray ${p?"w-auto p-2":"w-full justify-start"}`,onClick:()=>_(!0),children:[s.jsx($a,{className:p?"h-5 w-5":"h-4 w-4"}),!p&&s.jsx("span",{className:"ml-2",children:"Sign Out"})]})]})]})]}),s.jsx(Hl,{open:f,onOpenChange:y}),s.jsx(mo,{open:x,onOpenChange:_,onConfirm:o}),s.jsx(eS,{professional:b,isOpen:!!b,onClose:()=>E(null)})]})}const Bn={free:0,basic:1,pro:2},nn={free:"Free",basic:"Basic",pro:"Pro"};function z3({requiredTier:e,featureName:t,children:r,skipVettingChecks:a}){const{subscription:n,isLoading:o}=Gl(),{proProfile:i}=be();return o?null:Bn[n.tier]>=Bn[e]?s.jsx(s.Fragment,{children:r}):a?s.jsx("div",{className:"flex items-center justify-center min-h-[60vh] px-4",children:s.jsx(dt,{className:"max-w-md w-full border-2 border-dashed border-muted-foreground
544/25",children:s.jsxs(vt,{className:"pt-8 pb-8 text-center space-y-4",children:[s.jsx("div",{className:"mx-auto w-14 h-14 rounded-full bg-muted flex items-center justify-center",children:s.jsx(It,{className:"w-7 h-7 text-muted-foreground"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("h2",{className:"text-xl font-heading font-bold",children:["Upgrade to ",nn[e]]}),s.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:[s.jsx("strong",{children:t})," is available on the"," ",nn[e]," plan and above. Upgrade your subscription to unlock this feature."]})]}),s.jsx(U,{asChild:!0,className:"mt-2",children:s.jsxs(oe,{to:"/pro/subscription",children:["View Plans",s.jsx(cs,{className:"w-4 h-4 ml-2"})]})})]})})}):i&&!i.company&&i.status==="approved"&&n.tier==="free"?s.jsx("div",{className:"flex items-center justify-center min-h-[60vh] px-4",children:s.jsx(dt,{className:"max-w-md w-full border-2 border-dashed border-muted-foreground/25",children:s.jsxs(vt,{className:"pt-8 pb-8 text-center space-y-4",children:[s.jsx("div",{className:"mx-auto w-14 h-14 rounded-full bg-muted flex items-center justify-center",children:s.jsx(ba,{className:"w-7 h-7 text-muted-foreground"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"text-xl font-heading font-bold",children:"Complete Your Profile First"}),s.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:["To access ",s.jsx("strong",{children:t}),", complete your professional profile for review."]})]}),s.jsx(U,{asChild:!0,className:"mt-2",children:s.jsxs(oe,{to:"/pro/vetting",children:["Complete Profile",s.jsx(cs,{className:"w-4 h-4 ml-2"})]})})]})})}):(i==null?void 0:i.status)==="rejected"?(i==null?void 0:i.rejection_type)==="reapply_allowed"?s.jsx("div",{className:"flex items-center justify-center min-h-[60vh] px-4",children:s.jsx(dt,{className:"max-w-md w-full border-2 border-dashed border-destructive/25",children:s.jsxs(vt,{className:"pt-8 pb-8 text-center space-y-4",children:[s.jsx("div",{className:"mx-auto w-14 h-14 rounded-full bg-destructive/10 flex items-center justify-center",children:s.jsx(ba,{className:"w-7 h-7 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"text-xl font-heading font-bold",children:"Additional Information Required"}),s.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:["We need additional information to complete your application. Please update your profile and resubmit to access ",s.jsx("strong",{children:t}),"."]})]}),s.jsx(U,{asChild:!0,className:"mt-2",children:s.jsxs(oe,{to:"/pro/vetting",children:["Update & Resubmit",s.jsx(cs,{className:"w-4 h-4 ml-2"})]})})]})})}):s.jsx("div",{className:"flex items-center justify-center min-h-[60vh] px-4",children:s.jsx(dt,{className:"max-w-md w-full border-2 border-dashed border-destructive/25",children:s.jsxs(vt,{className:"pt-8 pb-8 text-center space-y-4",children:[s.jsx("div",{className:"mx-auto w-14 h-14 rounded-full bg-destructive/10 flex items-center justify-center",children:s.jsx(Ni,{className:"w-7 h-7 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"text-xl font-heading font-bold",children:"Application Not Approved"}),s.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:"Your application was not approved. If you have questions, please contact support."})]}),s.jsx(U,{asChild:!0,variant:"outline",className:"mt-2",children:s.jsx("a",{href:`mailto:${Jf}`,children:"Contact Support"})})]})})}):(i==null?void 0:i.status)==="draft"?s.jsx("div",{className:"flex items-center justify-center min-h-[60vh] px-4",children:s.jsx(dt,{className:"max-w-md w-full border-2 border-dashed border-muted-foreground/25",children:s.jsxs(vt,{className:"pt-8 pb-8 text-center space-y-4",children:[s.jsx("div",{className:"mx-auto w-14 h-14 rounded-full bg-muted flex items-center justify-center",children:s.jsx(ba,{className:"w-7 h-7 text-muted-foreground"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"text-xl font-heading font-bold",children:"Complete Your Profile"}),s.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:["To access ",s.jsx("strong",{children:t}),", complete your professional profile and submit it for review."]})]}),s.jsx(U,{asChild:!0,className:"mt-2",children:s.jsxs(oe,{to:"/pro/vetting",children:["Get Started",s.jsx(cs,{className:"w-4 h-4 ml-2"})]})})]})})}):(i==null?void 0:i.status)==="pending"?s.jsx("div",{className:"flex items-center justify-center min-h-[60vh] px-4",children:s.jsx(dt,{className:"max-w-md w-full border-2 border-dashed border-muted-foreground
544/25",children:s.jsxs(vt,{className:"pt-8 pb-8 text-center space-y-4",children:[s.jsx("div",{className:"mx-auto w-14 h-14 rounded-full bg-muted flex items-center justify-center",children:s.jsx(Nl,{className:"w-7 h-7 text-muted-foreground"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"text-xl font-heading font-bold",children:"Application Under Review"}),s.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:["Your profile is being reviewed. You'll be able to access ",s.jsx("strong",{children:t})," once approved."]})]}),s.jsx(U,{asChild:!0,variant:"outline",className:"mt-2 text-mw-black",children:s.jsxs(oe,{to:"/pro/dashboard",children:["Back to Dashboard",s.jsx(cs,{className:"w-4 h-4 ml-2"})]})})]})})}):s.jsx("div",{className:"flex items-center justify-center min-h-[60vh] px-4",children:s.jsx(dt,{className:"max-w-md w-full border-2 border-dashed border-muted-foreground/25",children:s.jsxs(vt,{className:"pt-8 pb-8 text-center space-y-4",children:[s.jsx("div",{className:"mx-auto w-14 h-14 rounded-full bg-muted flex items-center justify-center",children:s.jsx(It,{className:"w-7 h-7 text-muted-foreground"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("h2",{className:"text-xl font-heading font-bold",children:["Upgrade to ",nn[e]]}),s.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:[s.jsx("strong",{children:t})," is available on the"," ",nn[e]," plan and above. Upgrade your subscription to unlock this feature."]})]}),s.jsx(U,{asChild:!0,className:"mt-2",children:s.jsxs(oe,{to:"/pro/subscription",children:["View Plans",s.jsx(cs,{className:"w-4 h-4 ml-2"})]})})]})})})}function nS(e,t){return Bn[e]>=Bn[t]}const oS=[{title:"Dashboard",url:"/pro/dashboard",icon:Cl},{title:"Pro Profile",url:"/pro/vetting",icon:ba},{title:"My Blogs",url:"/pro/blog",icon:Sl,requiredTier:"pro"},{title:"My Listings",url:"/pro/listings",icon:sr,requiredTier:"pro"},{title:"My Homepage",url:"/pro/homepage",icon:h2,requiredTier:"pro"}],iS=[{title:"Find a Home",url:"/find-home",icon:ns},{title:"Find a Pro",url:"/find-pro",icon:kt}],nu=[{title:"Connections",url:"/pro/connections",icon:ro,requiredTier:"basic"},{title:"Analytics",url:"/pro/analytics",icon:so,requiredTier:"pro"}],ia={title:"Complete Profile",url:"/pro/vetting",icon:ba},lS=[{title:"My Profile",url:"/profile",icon:pr},{title:"Subscription",url:"/pro/subscription",icon:d2}];function Ya(){const e=Et(),t=ct(),{state:r,isMobile:a,setOpenMobile:n}=Qs(),{signOut:o,profile:i,isAdmin:l,proProfile:c,hasBuyerProfile:u,hasProProfile:m,switchUserType:h}=be(),{subscription:p}=Gl(),f=r==="collapsed"&&!a,[y,x]=d.useState(!1),[_,b]=d.useState(!1),E=u&&m,v=M=>e.pathname===M,w=()=>{a&&n(!1)},N=async()=>{await h("buyer"),a&&n(!1),t("/dashboard")},C=d.useMemo(()=>{if(!c)return!1;const M=c.status;if(M!=="approved"&&M!=="rejected")return!1;const P=`pro-decision-seen-${c.id}`;return localStorage.getItem(P)!==M},[c]);d.useEffect(()=>{c&&e.pathname==="/pro/vetting"&&C&&localStorage.setItem(`pro-decision-seen-${c.id}`,c.status)},[e.pathname,c,C]);const j=(c==null?void 0:c.status)==="approved"&&p.tier==="free"&&!c.company,k=M=>M.requiredTier&&!nS(p.tier,M.requiredTier),S=M=>{const P=k(M);return s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,isActive:v(M.url),tooltip:f?M.title:void 0,className:`${P?"text-gray-400 hover:text-gray-400 hover:bg-mw-dark-gray/20":"text-white hover:text-mw-black hover:bg-mw-olive"} data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold`,children:s.jsxs(Ut,{to:M.url,onClick:w,className:`relative flex items-center gap-2 ${f?"justify-center w-full":""}`,activeClassName:"text-mw-black",children:[s.jsx(M.icon,{className:f?"h-5 w-5":"h-4 w-4"}),!f&&s.jsx("span",{children:M.title}),!f&&M.title==="Pro Profile"&&(c==null?void 0:c.status)==="draft"&&s.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-destructive animate-pulse ml-1"}),!f&&M.title==="Pro Profile"&&C&&s.jsx("span",{className:`w-2.5 h-2.5 rounded-full animate-pulse ml-1 ${(c==null?void 0:c.status)==="rejected"?"bg-destructive":"bg-icon-accent"}`}),f&&M.title==="Pro Profile"&&C&&s.jsx("span",{className:`absolute top-1 right-1 w-2 h-2 rounded-full animate-pulse ${(c==null?void 0:c.status)==="rejected"?"bg-destructive":"bg-icon-accent"}`}),!f&&P&&s.jsx(It,{className:"h-3.5 w-3.5 text-gray-400"})]})})},M.url)},T=(c==null?void 0:c.pro_role)==="business_owner"?"BUSINESS":"PRO";return s.jsxs(s.Fragment,{children:[s.jsxs(fo,{collapsible:"icon",className:"bg-mw-black border-r border-mw-dark-gray",children:[s.jsx(ho,{className:"bg-mw-black p-0",children:a?s.jsxs("div",{className:"flex items-center justify-between px-4 h-topbar",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(oe,{to:"/",children:s.jsx("img",{src:Wa,alt:"MustWants",className:"h-8 w-auto",width:32,height:32,loading:"eager",decoding:"sync"})}),s.jsx("span",{className:"text-xs tracking-widest uppercase text-icon-accent/70 font-medium",children:T})]}),s.jsxs("button",{onClick:()=>n(!1),className:"text-white hover:opacity-80 transition-opacity",children:[s.jsx(Mt,{className:"h-6 w-6"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]}):f?s.jsxs("div",{className:"flex flex-col items-center gap-2 py-3",children:[s.jsx("span",{className:"text-[9px] tracking-widest uppercase text-icon-accent font-medium",children:T}),s.jsx(Dt,{className:"text-white hover:text-icon-accent hover:bg-mw-dark-gray h-8 w-8 rounded-full"})]}):s.jsxs("div",{className:"flex items-center justify-between px-4 pt-4 pb-2",children:[s.jsx("span",{className:"text-xs tracking-widest uppercase text-icon-accent/70 font-medium",children:T}),s.jsx(Dt,{className:"text-white hover:text-icon-accent hover:bg-mw-dark-gray h-8 w-8"})]})}),s.jsxs(go,{className:"bg-mw-black",children:[s.jsx(at,{children:s.jsx(nt,{children:s.jsxs(st,{children:[oS.map(S),j&&s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,isActive:v(ia.url),tooltip:f?ia.title:void 0,className:"text-icon-accent hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:s.jsxs(Ut,{to:ia.url,onClick:w,className:`flex items-center gap-2 ${f?"justify-center w-full":""}`,activeClassName:"text-mw-black",children:[s.jsx(ia.icon,{className:f?"h-5 w-5":"h-4 w-4"}),!f&&s.jsx("span",{children:ia.title})]})})})]})})}),s.jsxs(at,{children:[s.jsx(Ct,{className:"text-icon-accent text-xs uppercase tracking-wider font-semibold",children:"Search"}),s.jsx(nt,{children:s.jsx(st,{children:iS.map(S)})})]}),(()=>{const P=(c==null?void 0:c.pro_role)&&IN.includes(c.pro_role)?nu.filter(A=>A.title!=="Connections"):nu;return P.length===0?null:s.jsxs(at,{children:[s.jsx(Ct,{className:"text-icon-accent text-xs uppercase tracking-wider font-semibold",children:"Clients"}),s.jsx(nt,{children:s.jsx(st,{children:P.map(S)})})]})})(),s.jsxs(at,{children:[s.jsx(Ct,{className:"text-icon-accent text-xs uppercase tracking-wider font-semibold",children:"Account"}),s.jsx(nt,{children:s.jsxs(st,{children:[lS.map(M=>s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,isActive:v(M.url),tooltip:f?M.title:void 0,className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:s.jsxs(Ut,{to:M.url,onClick:w,className:`flex items-center gap-2 ${f?"justify-center w-full":""}`,activeClassName:"text-mw-black",children:[s.jsx(M.icon,{className:f?"h-5 w-5":"h-4 w-4"}),!f&&s.jsx("span",{children:M.title})]})})},M.url)),s.jsx(Xe,{children:s.jsx(Je,{tooltip:f?"Send Feedback":void 0,className:"text-white hover:text-icon-accent hover:bg-mw-dark-gray text-base font-semibold cursor-pointer",onClick:()=>x(!0),children:s.jsxs("span",{className:`flex items-center gap-2 ${f?"justify-center w-full":""}`,children:[s.jsx(no,{className:f?"h-5 w-5":"h-4 w-4"}),!f&&s.jsx("span",{children:"Send Feedback"})]})})})]})})]}),s.jsx(Vl,{excludeUrls:["/find-home","/find-pro","/resources/checklists","/blog"]})]}),s.jsxs(po,{className:"border-t border-mw-dark-gray bg-mw-black",children:[l&&s.jsx("div",{className:f?"pt-2":"px-2 pt-2",children:s.jsx(st,{children:s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,isActive:v("/admin"),tooltip:f?"Admin":void 0,className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:s.jsxs(Ut,{to:"/admin",onClick:w,className:`flex items-center gap-2 ${f?"justify-center w-full":""}`,activeClassName:"text-mw-black",children:[s.jsx(Ba,{className:f?"h-5 w-5":"h-4 w-4"}),!f&&s.jsx("span",{children:"Admin"})]})})})})}),s.jsxs("div",{className:`p-2 ${f?"flex flex-col items-center":""}`,children:[!f&&i&&s.jsxs("div",{className:"mb-2 px-2",children:[s.jsxs("p",{className:"text-sm font-medium text-white truncate",children:[i.first_name," ",i.last_name]}),s.jsx("p",{className:"text-xs text-white truncate",children:i.email})]}),a&&E&&s.jsxs(U,{variant:"ghost",size:"sm",className:"w-full justify-start text-white hover:text-icon-accent hover:bg-mw-dark-gray",onClick:N,children:[s.jsx(ka,{className:"h-4 w-4"}),s.jsx("span",{className:"ml-2",children:"Switch to Buyer"})]}),s.jsx("div",{className:`${f?"my-2 w-8":"my-2 w-full"} h-px bg-white/20`}),s.jsxs(U,{variant:"ghost",size:"sm",className:`text-white hover:text-white hover:bg-mw-dark-gray ${f?"w-auto p-2":"w-full justify-start"}`,onClick:()=>b(!0),children:[s.jsx($a,{className:f?"h-5 w-5":"h-4 w-4"}),!f&&s.jsx("span",{className:"ml-2",children:"Sign Out"})]})]})]})]}),s.jsx(Hl,{open:y,onOpenChange:x}),s.jsx(mo,{open:_,onOpenChange:b,onConfirm:o})]})}function cS(){const{isAdmin:e}=be();return et({queryKey:["admin","stats"],queryFn:async()=>{const t=new Date,r=new Date(t.getFullYear(),t.getMonth(),1).toISOString(),a=new Date(t.getTime()-28*24*60*60*1e3).toISOString(),[n,o,i,l,c,u,m,h,p,f,y,x,_]=await Promise.all([R.from("professional_profiles").select("id",{count:"exact",head:!0}
544).eq("status","pending").is("deleted_at",null),R.from("professional_profiles").select("id",{count:"exact",head:!0}).eq("status","approved").is("deleted_at",null),R.from("professional_profiles").select("id",{count:"exact",head:!0}).eq("is_visible",!0).is("deleted_at",null),R.from("professional_profiles").select("id",{count:"exact",head:!0}).not("deleted_at","is",null),R.from("profiles").select("id",{count:"exact",head:!0}),R.from("profiles").select("id",{count:"exact",head:!0}).gte("created_at",r),R.from("blog_posts").select("id",{count:"exact",head:!0}).eq("status","pending_review"),R.from("owner_listings").select("id",{count:"exact",head:!0}).eq("listing_source","fsbo").eq("listing_status","pending"),R.from("feedback").select("id",{count:"exact",head:!0}).filter("status","eq","unread"),R.from("professional_profiles").select("id",{count:"exact",head:!0}).eq("subscription_tier","pro").is("deleted_at",null),R.from("professional_profiles").select("state").eq("pro_role","agent").eq("status","approved").is("deleted_at",null).not("state","is",null),R.from("professional_profiles").select("state").eq("pro_role","lender").eq("status","approved").is("deleted_at",null).not("state","is",null),(async()=>{const j=[];let k=0;const S=1e3;let T=!0;for(;T;){const{data:M}=await R.from("profiles").select("created_at").gte("created_at",a).order("created_at",{ascending:!0}).range(k,k+S-1);M&&M.length>0?(j.push(...M),k+=S,T=M.length===S):T=!1}return{data:j,error:null}})()]),b=new Map;(y.data||[]).forEach(j=>{const k=j.state;b.set(k,(b.get(k)||0)+1)});const E=Array.from(b.entries()).map(([j,k])=>({state:j,count:k})).sort((j,k)=>k.count-j.count),v=new Map;(x.data||[]).forEach(j=>{const k=j.state;v.set(k,(v.get(k)||0)+1)});const w=Array.from(v.entries()).map(([j,k])=>({state:j,count:k})).sort((j,k)=>k.count-j.count),N=new Map;(_.data||[]).forEach(j=>{const S=new Date(j.created_at).toISOString().slice(0,10);N.set(S,(N.get(S)||0)+1)});for(let j=27;j>=0;j--){const S=new Date(t.getTime()-j*24*60*60*1e3).toISOString().slice(0,10);N.has(S)||N.set(S,0)}const C=Array.from(N.entries()).sort(([j],[k])=>j.localeCompare(k)).map(([j,k])=>({date:j,count:k}));return{pendingApps:n.count||0,activePros:o.count||0,visiblePros:i.count||0,softDeletedPros:l.count||0,totalUsers:c.count||0,newUsersThisMonth:u.count||0,pendingBlogs:m.count||0,pendingListings:h.count||0,unreadFeedback:p.count||0,subscribedPros:f.count||0,agentsByState:E,lendersByState:w,dailyGrowth:C}},enabled:e,staleTime:3e4})}function H3(){const{isAdmin:e}=be();return et({queryKey:["admin","pending-pros"],queryFn:async()=>{const{data:t,error:r}=await R.from("professional_profiles").select("*").eq("status","pending").is("deleted_at",null).order("updated_at",{ascending:!1});if(r)throw r;const a=(t||[]).map(i=>i.user_id),{data:n}=await R.from("profiles").select("user_id, first_name, last_name, email").in("user_id",a),o=new Map((n==null?void 0:n.map(i=>[i.user_id,i]))||[]);return(t||[]).map(i=>({...i,profiles:o.get(i.user_id)||null}))},enabled:e})}function U3(e=!1){const{isAdmin:t}=be();return et({queryKey:["admin","all-pros",e],queryFn:async()=>{let r=R.from("professional_profiles").select("*").order("created_at",{ascending:!1});e||(r=r.is("deleted_at",null));const{data:a,error:n}=await r;if(n)throw n;const o=(a||[]).map(c=>c.user_id),{data:i}=await R.from("profiles").select("user_id, first_name, last_name, email").in("user_id",o),l=new Map((i==null?void 0:i.map(c=>[c.user_id,c]))||[]);return(a||[]).map(c=>({...c,profiles:l.get(c.user_id)||null}))},enabled:t})}function V3(){const{isAdmin:e}=be();return et({queryKey:["admin","all-users"],queryFn:async()=>{const t=[];let r=0;const a=1e3;let n=!0;for(;n;){const{data:o,error:i}=await R.from("profiles").select("*").order("created_at",{ascending:!1}).range(r,r+a-1);if(i)throw i;o&&o.length>0?(t.push(...o),r+=a,n=o.length===a):n=!1}return t},enabled:e})}function q3(){const{isAdmin:e}=be();return et({queryKey:["admin","recently-approved-pros"],queryFn:async()=>{const t=new Date(Date.now()-2592e6).toISOString(),{data:r,error:a}=await R.from("professional_profiles").select("*").eq("status","approved").is("deleted_at",null).gte("approved_at",t).order("approved_at",{ascending:!1});if(a)throw a;
544const n=[...new Set([...(r||[]).map(l=>l.user_id),...(r||[]).map(l=>l.approved_by).filter(Boolean)])],{data:o}=await R.from("profiles").select("user_id, first_name, last_name, email").in("user_id",n),i=new Map((o==null?void 0:o.map(l=>[l.user_id,l]))||[]);return(r||[]).map(l=>{const c=l.approved_by?i.get(l.approved_by):null;return{...l,profiles:i.get(l.user_id)||null,approver_name:c?`${c.first_name||""} ${c.last_name||""}`.trim()||c.email:null}})},enabled:e})}function W3(){const{isAdmin:e}=be();return et({queryKey:["admin","blog-posts"],queryFn:async()=>{const{data:t,error:r}=await R.from("blog_posts").select("*").order("created_at",{ascending:!1});if(r)throw r;const a=[...new Set((t||[]).map(i=>i.author_id))],{data:n}=await R.from("profiles").select("user_id, first_name, last_name").in("user_id",a),o=new Map((n==null?void 0:n.map(i=>[i.user_id,`${i.first_name||""} ${i.last_name||""}`.trim()||"Unknown"]))||[]);return(t||[]).map(i=>({...i,author_name:i.author_name||o.get(i.author_id)||"Unknown"}))},enabled:e})}const Kl=["admin","community-submissions"],Rp=["admin","community-pending"];function G3(){return et({queryKey:Kl,queryFn:async()=>{const{data:e,error:t}=await R.from("community_submissions").select("*").eq("is_soft_deleted",!1).order("created_at",{ascending:!1}).limit(500);if(t)throw t;return e??[]},staleTime:3e4})}function dS(){return et({queryKey:Rp,queryFn:async()=>{const{count:e,error:t}=await R.from("community_submissions").select("id",{count:"exact",head:!0}).eq("status","pending").eq("is_soft_deleted",!1);if(t)throw t;return e??0},staleTime:3e4})}function uS(e,t){const r=new Date().toISOString(),a=e.submission;switch(e.kind){case"approve":return{patch:{status:"approved",is_active:!0,approved_at:r,approved_by:t,last_reviewed_at:r,denied_at:null,denied_by:null,denial_reason:null,paused_at:null,paused_by:null,pause_reason:null},audit:{action:"approve",old_status:a.status,new_status:"approved"}};case"deny":return{patch:{status:"denied",is_active:!1,denied_at:r,denied_by:t,denial_reason:e.reason||null,last_reviewed_at:r},audit:{action:"deny",old_status:a.status,new_status:"denied",reason:e.reason||null}};case"pause":return{patch:{status:"paused",is_active:!1,paused_at:r,paused_by:t,pause_reason:e.reason||null,last_reviewed_at:r},audit:{action:"pause",old_status:a.status,new_status:"paused",reason:e.reason||null}};case"resume":return{patch:{status:"approved",is_active:!0,paused_at:null,paused_by:null,pause_reason:null,last_reviewed_at:r},audit:{action:"resume",old_status:a.status,new_status:"approved"}};case"feature":case"unfeature":{const n=e.kind==="feature";return{patch:{is_featured:n},audit:{action:e.kind,metadata:{is_featured:n}}}}case"verify":case"unverify":{const n=e.kind==="verify";return{patch:{verified:n,verified_at:n?r:null,verified_by:n?t:null,last_verified_at:n?r:a.last_verified_at},audit:{action:e.kind,metadata:{verified:n}}}}case"mark_duplicate":{const n=e.duplicateStatus??"unique",o=n==="unique"?null:e.duplicateOfId??a.duplicate_of_id??null;return{patch:{duplicate_status:n,duplicate_of_id:o},audit:{action:"mark_duplicate",old_duplicate_status:a.duplicate_status,new_duplicate_status:n,metadata:{duplicate_of_id:o}}}}case"soft_delete":return{patch:{is_soft_deleted:!0,is_active:!1},audit:{action:"soft_delete",old_status:a.status,new_status:"soft_deleted"}};case"geocode":return{patch:{},audit:{}}}}function Y3(){const e=os(),{toast:t}=At(),{user:r}=be(),a=(r==null?void 0:r.id)??null;return Us({mutationFn:async o=>{const{submission:i}=o;if(o.kind==="geocode"){const{data:h,error:p}=await R.functions.invoke("geocode-submission",{body:{id:i.id}});if(p)throw p;if(!(h!=null&&h.ok))throw new Error(`No location match (${(h==null?void 0:h.reason)??"unknown"})`);return}const{patch:l,audit:c}=uS(o,a),{error:u}=await R.from("community_submissions").update(l).eq("id",i.id);if(u)throw u;const{error:m}=await R.from("community_submission_audit_log").insert([{submission_id:i.id,admin_user_id:a,action:"",old_status:null,new_status:null,old_duplicate_status:null,new_duplicate_status:null,reason:null,metadata:{},...c}]);if(m)throw m;o.kind==="approve"&&!i.is_national&&(i.latitude==null||i.longitude==null)&&(i.city||i.state||i.zipcode||i.installation_name)&&R.functions.invoke("geocode-submission",{body:{id:i.id}}).catch(()=>{})},onSuccess:()=>
544{e.invalidateQueries({queryKey:Kl}),e.invalidateQueries({queryKey:Rp})},onError:o=>{t({variant:"destructive",title:"Action failed",description:o.message})}})}function K3(){const e=os(),{toast:t}=At();return Us({mutationFn:async()=>{const{data:r,error:a}=await R.rpc("rescan_pending_duplicates");if(a)throw a;return r??{scanned:0,unique:0,possible:0,duplicate:0}},onSuccess:r=>{e.invalidateQueries({queryKey:Kl}),t({title:`Re-scanned ${r.scanned} pending`,description:`${r.duplicate} duplicates · ${r.possible} possible · ${r.unique} unique`})},onError:r=>{t({variant:"destructive",title:"Re-scan failed",description:r.message})}})}const mS=[{title:"Applications",tab:"applications",icon:kl},{title:"Professionals",tab:"professionals",icon:to},{title:"Users",tab:"users",icon:kt},{title:"Listings",tab:"listings",icon:_l}],fS=[{title:"Blog Posts",tab:"blog",icon:wl},{title:"Community",tab:"community",icon:Af},{title:"Broadcast",tab:"broadcast",icon:N2}],hS=[{title:"Feedback",tab:"feedback",icon:no},{title:"Coverage",tab:"coverage",icon:$s},{title:"Marketing Data",tab:"marketing-data",icon:so}];function pS(){const e=ct(),t=Et(),[r,a]=Un(),{state:n,isMobile:o,setOpenMobile:i}=Qs(),{signOut:l,profile:c}=be(),{data:u}=cS(),{data:m=0}=dS(),h=n==="collapsed"&&!o,[p,f]=d.useState(!1),y=t.pathname==="/admin",x=()=>{o&&i(!1)},_=y?r.get("tab")||"applications":null,b=C=>{t.pathname!=="/admin"?e(`/admin?tab=${C}`):a({tab:C}),o&&i(!1)},E=async()=>{await l(),e("/")},v=()=>f(!0),w=C=>{switch(C){case"applications":return(u==null?void 0:u.pendingApps)||0;case"listings":return(u==null?void 0:u.pendingListings)||0;case"blog":return(u==null?void 0:u.pendingBlogs)||0;case"community":return m;default:return 0}},N=(c==null?void 0:c.user_type)==="professional"?"/pro/dashboard":"/dashboard";return s.jsxs(s.Fragment,{children:[s.jsxs(fo,{collapsible:"icon",className:"bg-mw-black border-r border-mw-dark-gray",children:[s.jsx(ho,{className:"bg-mw-black p-0",children:o?s.jsxs("div",{className:"flex items-center justify-between px-4 h-topbar",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(oe,{to:"/",children:s.jsx("img",{src:Wa,alt:"MustWants",className:"h-8 w-auto",width:32,height:32,loading:"eager",decoding:"sync"})}),s.jsx("span",{className:"text-xs tracking-widest uppercase text-icon-accent/70 font-medium",children:"ADMIN"})]}),s.jsxs("button",{onClick:()=>i(!1),className:"text-white hover:opacity-80 transition-opacity",children:[s.jsx(Mt,{className:"h-6 w-6"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]}):h?s.jsxs("div",{className:"flex flex-col items-center gap-2 py-3",children:[s.jsx("span",{className:"text-[9px] tracking-widest uppercase text-icon-accent/70 font-medium",children:"ADMIN"}),s.jsx(Dt,{className:"text-white hover:text-icon-accent hover:bg-mw-dark-gray h-8 w-8 rounded-full"})]}):s.jsxs("div",{className:"flex items-center justify-between px-4 pt-4 pb-2",children:[s.jsx("span",{className:"text-xs tracking-widest uppercase text-icon-accent/70 font-medium",children:"ADMIN"}),s.jsx(Dt,{className:"text-white hover:text-icon-accent hover:bg-mw-dark-gray h-8 w-8"})]})}),s.jsxs(go,{className:"bg-mw-black",children:[s.jsx(at,{children:s.jsx(nt,{children:s.jsx(st,{children:s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,tooltip:h?"Back to Dashboard":void 0,className:"text-white hover:text-icon-accent hover:bg-mw-dark-gray text-base font-semibold",children:s.jsxs(Ut,{to:N,onClick:x,className:`flex items-center gap-2 ${h?"justify-center w-full":""}`,children:[s.jsx(eo,{className:h?"h-6 w-6":"h-4 w-4"}),!h&&s.jsx("span",{children:"Back to Dashboard"})]})})})})})}),s.jsx(at,{children:s.jsx(nt,{children:s.jsx(st,{children:s.jsx(Xe,{children:s.jsxs(Je,{onClick:()=>b("applications"),isActive:_==="applications",tooltip:h?"Overview":void 0,className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:[s.jsx(Cl,{className:h?"h-6 w-6":"h-4 w-4"}),!h&&s.jsx("span",{children:"Overview"})]})})})})}),s.jsxs(at,{children:[s.jsx(Ct,{className:"text-icon-accent text-xs uppercase tracking-wider font-semibold",children:"Management"}),s.jsx(nt,{children:s.jsx(st,{children:mS.map(C=>{const j=w(C.tab);return s.jsx(Xe,{children:s.jsxs(Je,{onClick:()=>b(C.tab),isActive:_===C.tab,tooltip:h?C.title:void 0,className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold w-full justify-between",children:[s.jsxs("div",{className:`flex items-center gap-2 ${h?"justify-center w-full":""}`,children:[s.jsx(C.icon,{className:h?"h-6 w-6":"h-4 w-4"}),!h&&s.jsx("span",{children:C.title})]}),!h&&j>0&&s.jsx("span",{className:"px-2 py-0.5 text-xs bg-mw-olive text-mw-black rounded-full",children:j})]})},C.tab)})})})]}),s.jsxs(at,{children:[s.jsx(Ct,{className:"text-icon-accent text-xs uppercase tracking-wider font-semibold",children:"Marketing"}),s.jsx(nt,{children:s.jsx(st,{children:fS.map(C=>{const j=w(C.tab);return s.jsx(Xe,{children:s.jsxs(Je,{onClick:()=>b(C.tab),isActive:_===C.tab,tooltip:h?C.title:void 0,className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold w-full justify-between",children:[s.jsxs("div",{className:`flex items-center gap-2 ${h?"justify-center w-full":""}`,children:[s.jsx(C.icon,{className:h?"h-6 w-6":"h-4 w-4"}),!h&&s.jsx("span",{children:C.title})]}),!h&&j>0&&s.jsx("span",{className:"px-2 py-0.5 text-xs bg-mw-olive text-mw-black rounded-full",children:j})]})},C.tab)})})})]}),s.jsxs(at,{children:[s.jsx(Ct,{className:"text-icon-accent text-xs uppercase tracking-wider font-semibold",children:"Tools"}),s.jsx(nt,{children:s.jsx(st,{children:hS.map(C=>s.jsx(Xe,{children:s.jsxs(Je,{onClick:()=>b(C.tab),isActive:_===C.tab,tooltip:h?C.title:void 0,className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:[s.jsx(C.icon,{className:h?"h-6 w-6":"h-4 w-4"}),!h&&s.jsx("span",{children:C.title})]})},C.tab))})})]}),s.jsxs(at,{children:[s.jsx(Ct,{className:"text-icon-accent text-xs uppercase tracking-wider font-semibold",children:"Account"}),s.jsx(nt,{children:s.jsx(st,{children:s.jsx(Xe,{children:s.jsx(Je,{asChild:!0,isActive:t.pathname==="/admin/notifications",tooltip:h?"Notifications":void 0,className:"text-white hover:text-mw-black hover:bg-mw-olive data-[active=true]:bg-mw-olive data-[active=true]:text-mw-black data-[active=true]:hover:bg-mw-olive data-[active=true]:hover:text-mw-black text-base font-semibold",children:s.jsxs(Ut,{to:"/admin/notifications",className:`flex items-center gap-2 ${h?"justify-center w-full":""}`,activeClassName:"text-icon-accent",children:[s.jsx(vl,{className:h?"h-6 w-6":"h-4 w-4"}),!h&&s.jsx("span",{children:"Notifications"})]})})})})})]}),s.jsx(Vl,{})]}),s.jsx(po,{className:"border-t border-mw-dark-gray bg-mw-black",children:s.jsxs("div",{className:`p-2 ${h?"flex flex-col items-center":""}`,children:[!h&&c&&s.jsxs("div",{className:"mb-2 px-2",children:[s.jsxs("p",{className:"text-sm font-medium text-white truncate",children:[c.first_name," ",c.last_name]}),s.jsx("p",{className:"text-xs text-white truncate",children:c.email})]}),s.jsx("div",{className:`${h?"my-2 w-8":"my-2 w-full"} h-px bg-white/20`}),s.jsxs(U,{variant:"ghost",size:"sm",className:`text-white hover:text-mw-black hover:bg-mw-olive ${h?"w-auto p-2":"w-full justify-start"}`,onClick:v,children:[s.jsx($a,{className:h?"h-6 w-6":"h-4 w-4"}),!h&&s.jsx("span",{className:"ml-2",children:"Sign Out"})]})]})})]}),s.jsx(mo,{open:p,onOpenChange:f,onConfirm:E})]})}function as(){var t;const e=Et();return e.pathname==="/blog"?s.jsx(_h,{}):e.pathname.startsWith("/blog/")?s.jsx(Fh,{preview:((t=e.state)==null?void 0:t.blogPostPreview)??null}):s.jsx("div",{className:"flex-1 flex items-center justify-center py-20",children:s.jsx(fh,{size:"lg"})})}function ou(){const{user:e,profile:t,isLoading:r}=be(),a=!r&&!!e,n=(t==null?void 0:t.user_type)==="professional";return a?s.jsx(Cs,{children:s.jsxs("div",{className:"min-h-screen flex flex-col w-full",children:[s.jsx(ss,{}),s.jsx("div",{className:"h-topbar shrink-0"}),s.jsx(rs,{}),s.jsx("div",{className:"lg:hidden",children:n?s.jsx(Ya,{}):s.jsx(Ga,{})}
544),s.jsx("main",{id:"main-content",tabIndex:-1,className:"flex-1 flex flex-col",children:s.jsx(d.Suspense,{fallback:s.jsx(as,{}),children:s.jsx(es,{})})}),s.jsx(Hs,{}),s.jsx(Ui,{})]})}):s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(ss,{}),s.jsx("div",{className:"h-topbar shrink-0"}),s.jsx(rs,{}),s.jsx("main",{id:"main-content",tabIndex:-1,className:"flex-1 flex flex-col",children:s.jsx(d.Suspense,{fallback:s.jsx(as,{}),children:s.jsx(es,{})})}),s.jsx(Hs,{}),s.jsx(Ui,{})]})}function gS(){const{user:e,profile:t,isLoading:r}=be(),a=!r&&!!e,n=(t==null?void 0:t.user_type)==="professional";return a?s.jsx(Cs,{children:s.jsxs("div",{className:"h-dvh flex flex-col overflow-hidden w-full",children:[s.jsx(ss,{}),s.jsx("div",{className:"h-topbar shrink-0"}),s.jsx(rs,{}),s.jsx("div",{className:"lg:hidden",children:n?s.jsx(Ya,{}):s.jsx(Ga,{})}),s.jsx("main",{id:"main-content",tabIndex:-1,className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:s.jsx(d.Suspense,{fallback:s.jsx(as,{}),children:s.jsx(es,{})})})]})}):s.jsxs("div",{className:"h-dvh flex flex-col overflow-hidden",children:[s.jsx(ss,{}),s.jsx("div",{className:"h-topbar shrink-0"}),s.jsx(rs,{}),s.jsx("main",{id:"main-content",tabIndex:-1,className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:s.jsx(d.Suspense,{fallback:s.jsx(as,{}),children:s.jsx(es,{})})})]})}function xS(){const{user:e,profile:t,isLoading:r}=be(),[a,n]=d.useState(!0);return r||!e?s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(ss,{}),s.jsx("div",{className:"h-topbar shrink-0"}),s.jsx(rs,{}),s.jsx("main",{id:"main-content",tabIndex:-1,className:"flex-1 flex flex-col",children:s.jsx(d.Suspense,{fallback:s.jsx(as,{}),children:s.jsx(es,{})})}),s.jsx(Hs,{}),s.jsx(Ui,{})]}):(t==null?void 0:t.user_type)==="professional"?s.jsx(Cs,{open:a,onOpenChange:n,children:s.jsxs("div",{className:"min-h-screen flex flex-col w-full",children:[s.jsx(ss,{}),s.jsx("div",{className:"h-topbar shrink-0"}),s.jsx(rs,{}),s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[s.jsx(Ya,{}),s.jsxs(dr,{children:[s.jsx("div",{className:"sticky top-0 z-30 flex h-12 items-center gap-4 border-b bg-background px-4 lg:hidden shrink-0 hidden",children:s.jsx(Dt,{className:"-ml-2"})}),s.jsx("main",{id:"main-content",tabIndex:-1,className:"flex-1 flex flex-col",children:s.jsx(d.Suspense,{fallback:s.jsx(as,{}),children:s.jsx(es,{})})}),s.jsx(Hs,{})]})]})]})}):s.jsx(Cs,{open:a,onOpenChange:n,children:s.jsxs("div",{className:"min-h-screen flex flex-col w-full",children:[s.jsx(ss,{}),s.jsx("div",{className:"h-topbar shrink-0"}),s.jsx(rs,{}),s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[s.jsx(Ga,{}),s.jsxs(dr,{children:[s.jsx("div",{className:"sticky top-0 z-30 flex h-12 items-center gap-4 border-b bg-background px-4 lg:hidden shrink-0 hidden",children:s.jsx(Dt,{className:"-ml-2"})}),s.jsx("main",{id:"main-content",tabIndex:-1,className:"flex-1 flex flex-col",children:s.jsx(d.Suspense,{fallback:s.jsx(as,{}),children:s.jsx(es,{})})}),s.jsx(Hs,{})]})]})]})})}function bS(){const{user:e,profile:t,isLoading:r}=be(),[a,n]=d.useState(!1),o=!r&&!!e,i=(t==null?void 0:t.user_type)==="professional";return s.jsx(Cs,{open:a,onOpenChange:n,children:s.jsxs("div",{className:"h-dvh flex flex-col w-full overflow-hidden",children:[s.jsx(ss,{}),s.jsx("div",{className:"h-topbar shrink-0"}),s.jsx(rs,{}),s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[o&&(i?s.jsx(Ya,{}):s.jsx(Ga,{})),s.jsxs(dr,{className:"flex flex-col min-h-0 overflow-hidden",children:[o&&s.jsx("div",{className:"sticky top-0 z-30 flex h-12 items-center gap-4 border-b bg-background px-4 lg:hidden shrink-0 hidden",children:s.jsx(Dt,{className:"-ml-2"})}),s.jsx("main",{id:"main-content",tabIndex:-1,className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:s.jsx(d.Suspense,{fallback:s.jsx(as,{}),children:s.jsx(es,{})})})]})]})]})})}function yS(){const[e,t]=d.useState(!0);return s.jsx(Cs,{open:e,onOpenChange:t,children:s.jsxs("div",{className:"min-h-screen flex flex-col w-full",children:[s.jsx(ss,{}),s.jsx("div",{className:"h-topbar shrink-0"}),s.jsx(rs,{}),s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[s.jsx(Ga,{}),s.jsxs(dr,{children:[s.jsx("div",{className:"sticky top-0 z-30 flex h-12 items-center gap-4 border-b bg-background px-4 lg:hidden shrink-0 hidden",children:s.jsx(Dt,{className:"-ml-2"})}
544),s.jsx("main",{id:"main-content",tabIndex:-1,className:"flex-1 flex flex-col",children:s.jsx(d.Suspense,{fallback:s.jsx(as,{}),children:s.jsx(es,{})})}),s.jsx(Hs,{})]})]})]})})}function vS(){const[e,t]=d.useState(!0);return s.jsx(Cs,{open:e,onOpenChange:t,children:s.jsxs("div",{className:"min-h-screen flex flex-col w-full",children:[s.jsx(ss,{}),s.jsx("div",{className:"h-topbar shrink-0"}),s.jsx(rs,{}),s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[s.jsx(Ya,{}),s.jsxs(dr,{children:[s.jsx("div",{className:"sticky top-0 z-30 flex h-12 items-center gap-4 border-b bg-background px-4 lg:hidden shrink-0 hidden",children:s.jsx(Dt,{className:"-ml-2"})}),s.jsx("main",{id:"main-content",tabIndex:-1,className:"flex-1 flex flex-col",children:s.jsx(d.Suspense,{fallback:s.jsx(as,{}),children:s.jsx(es,{})})}),s.jsx(Hs,{})]})]})]})})}function wS(){const[e,t]=d.useState(!1);return s.jsx(Cs,{open:e,onOpenChange:t,children:s.jsxs("div",{className:"min-h-screen flex flex-col w-full",children:[s.jsx(ss,{}),s.jsx("div",{className:"h-topbar shrink-0"}),s.jsx(rs,{}),s.jsxs("div",{className:"flex flex-1",children:[s.jsx(pS,{}),s.jsxs(dr,{children:[s.jsx("div",{className:"sticky top-16 z-30 flex h-12 items-center justify-end border-b bg-background px-4 lg:hidden hidden",children:s.jsx(Dt,{})}),s.jsx("main",{id:"main-content",tabIndex:-1,className:"flex-1 p-6 lg:p-8",children:s.jsx(d.Suspense,{fallback:s.jsx(as,{}),children:s.jsx(es,{})})}),s.jsx(Hs,{})]})]})]})})}let rr=null,la=null;async function Pp(){return rr||la||(la=(async()=>{try{const{data:e,error:t}=await ds("get-mapbox-token");return!t&&(e!=null&&e.token)?(rr=e.token,rr):null}finally{la=null}})(),la)}function _S(){const[e,t]=d.useState(rr);return d.useEffect(()=>{if(rr){t(rr);return}let r=!1;return Pp().then(a=>{r||t(a)}),()=>{r=!0}},[]),e}const jS={"air-force":{name:"Air Force",color:ys["air-force"],sealPath:"/src/assets/seals/air-force.png"}
544,army:{name:"Army",color:ys.army,sealPath:"/src/assets/seals/army.png"},"coast-guard":{name:"Coast Guard",color:ys["coast-guard"],sealPath:"/src/assets/seals/coast-guard.png"},"marine-corps":{name:"Marine Corps",color:ys["marine-corps"],sealPath:"/src/assets/seals/marine-corps.png"},navy:{name:"Navy",color:ys.navy,sealPath:"/src/assets/seals/navy.png"},"space-force":{name:"Space Force",color:ys["space-force"],sealPath:"/src/assets/seals/space-force.png"},"army-guard":{name:"Army National Guard",color:ys["army-guard"],sealPath:"/src/assets/seals/national-guard.png"},"air-guard":{name:"Air National Guard",color:ys["air-guard"],sealPath:"/src/assets/seals/national-guard.png"},dod:{name:"Department of Defense",color:ys.dod,sealPath:"/src/assets/seals/department-of-defense.png"}},Go={"Fort Liberty":["Fort Bragg"],"Fort Cavazos":["Fort Hood"],"Fort Novosel":["Fort Rucker"],"Fort Moore":["Fort Benning"],"Fort Johnson":["Fort Polk"],"Fort Walker":["Fort A.P. Hill"],"Fort Barfoot":["Fort Pickett"],"Fort Eisenhower":["Fort Gordon"],"Fort Gregg-Adams":["Fort Lee"]};function kS(e){if(typeof e!="string"&&typeof e!="number")return null;const t=String(e).trim().replace(/\.0+$/,"");return/^\d{1,5}$/.test(t)&&Number(t)>0?t.padStart(5,"0"):null}function Yo(e){const t=Array.isArray(e)?e:[e];return[...new Set(t.map(kS).filter(r=>r!==null))]}let ca=null,da=null;async function NS(){return ca||da||(da=(async()=>{const{data:e,error:t}=await R.from("military_installations").select("id, name, branch, state, lat, lng, aliases, zip").order("name");if(!t&&e&&e.length>0){const l=e.map(c=>{var u;return{id:c.id,name:c.name,branch:c.branch||"dod",state:c.state||"",jointBase:!1,lat:c.lat,lng:c.lng,zipCodes:Yo(c.zip),aliases:(u=c.aliases)!=null&&u.length?c.aliases:Go[c.name]||void 0}});return ca=l,l}const{data:r}=await R.from("map_datasets").select("id").eq("slug","military-installations").maybeSingle();if(r){const{data:l,error:c}=await R.from("map_dataset_values").select("geo_id, label, lat, lng, metrics").eq("dataset_id",r.id).order("label");if(!c&&l&&l.length>0){const u=l.map(m=>{const h=m.metrics;return{id:m.geo_id,name:m.label||m.geo_id,branch:h.branch||"dod",state:h.state||"",jointBase:!!h.jointBase,lat:m.lat||0,lng:m.lng||0,zipCodes:Yo(h.zip_codes),aliases:Go[m.label||""]||void 0}});return ca=u,u}}const a=await fetch("/data/military-installations.json");if(!a.ok)throw new Error("Failed to fetch installations");const n=await a.json(),o=new Set,i=n.features.map(l=>{const c=l.properties,u=c.installation,m=c.branch,h=parseFloat(String(c.locationLat)),p=parseFloat(String(c.locationLong));let f=Number.isFinite(h)?h:0,y=Number.isFinite(p)?p:0;return(!Number.isFinite(h)||!Number.isFinite(p))&&l.geometry.type==="Point"&&(f=l.geometry.coordinates[1],y=l.geometry.coordinates[0]),{id:`${m}-${u.toLowerCase().replace(/\s+/g,"-")}`,name:u,branch:m,state:c.state||"",jointBase:!!c.jointBase,lat:f,lng:y,zipCodes:Yo(c.zip_codes),aliases:Go[u]||void 0}}).filter(l=>o.has(l.name)?!1:(o.add(l.name),!0)).sort((l,c)=>l.name.localeCompare(c.name));return ca=i,i})().catch(e=>{throw da=null,e}),da)}function SS(){const[e,t]=d.useState([]),[r,a]=d.useState(!0),[n,o]=d.useState(null);d.useEffect(()=>{NS().then(t).catch(m=>o(m.message)).finally(()=>a(!1))},[]);const i=d.useCallback(m=>{if(!m.trim())return e;const h=m.toLowerCase();return e.filter(p=>{var f;return p.name.toLowerCase().includes(h)||p.state.toLowerCase().includes(h)||((f=p.aliases)==null?void 0:f.some(y=>y.toLowerCase().includes(h)))})},[e]),l=d.useCallback(m=>e.filter(h=>h.branch===m),[e]),c=d.useCallback(m=>m.length===0?e:e.filter(h=>m.includes(h.branch)),[e]),u=d.useCallback((m,h)=>{var p;(p=h.current)==null||p.flyTo({center:[m.lng,m.lat],zoom:10,duration:2e3})},[]);return d.useMemo(()=>{const m={"air-force":[],army:[],"coast-guard":[],"marine-corps":[],navy:[],"space-force":[],"army-guard":[],"air-guard":[],dod:[]};return e.forEach(h=>{m[h.branch].push(h)}),m},[e]),{installations:e,isLoading:r,error:n,searchInstallations:i,getInstallationsByBranch:l,getInstallationsByBranches:c,flyToInstallation:u,branchData:jS}}
544function Ip({value:e,onChange:t,onSelect:r,placeholder:a="Enter city, ZIP, or military base...",className:n,inputClassName:o,clearButtonClassName:i,inputId:l,inputAutoComplete:c,inputAriaLabel:u,inputAriaDescribedBy:m,inputAriaInvalid:h,disabled:p=!1,showIcon:f=!0,enterSelectsSuggestion:y=!0,suppressLocationSuggestions:x=!1}){const[_,b]=d.useState(!1),[E,v]=d.useState(e),[w,N]=d.useState([]),[C,j]=d.useState(!1),[k,S]=d.useState(-1),[T,M]=d.useState(null),P=d.useRef(null),A=d.useRef(null),I=d.useId(),{searchInstallations:z}=SS();d.useEffect(()=>{let Y=!1;return Pp().then(te=>{!Y&&te&&M(te)}),()=>{Y=!0}},[]),d.useEffect(()=>{v(e)},[e]),d.useEffect(()=>{function Y(te){P.current&&!P.current.contains(te.target)&&b(!1)}return document.addEventListener("mousedown",Y),()=>document.removeEventListener("mousedown",Y)},[]);const L=d.useCallback(Y=>Y.length<2?[]:z(Y).slice(0,4).map(Se=>({id:`inst-${Se.name}`,place_name:`${Se.name}, ${Se.state}`,text:Se.name,type:"installation",branch:Se.branch})),[z]),me=d.useCallback(async Y=>{if(!T||Y.length<2){N([]);return}j(!0);try{const te=await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(Y)}.json?access_token=${T}&country=us&types=country,region,place,postcode,address,neighborhood&limit=4&proximity=ip`);if(te.ok){const fe=((await te.json()).features||[]).filter(Pe=>{var le;return!((le=Pe.place_type)!=null&&le.includes("region"))}).map(Pe=>({id:Pe.id,place_name:Pe.place_name,text:Pe.text,type:"address",center:Pe.center,context:Pe.context,house_number:Pe.address}));N(fe)}}catch(te){console.error("Geocoding error:",te),N([])}finally{j(!1)}},[T]),$=E.length>=2?L(E):[],g=[...$,...w],X=g.length>0;d.useEffect(()=>{S(X?0:-1)},[X]);const de=Y=>Y.trim().split(/\s+/).length>=4,re=Y=>{const te=Y.trim();return!!(/^[A-Z][A-Z\s\-'.]+$/.test(te)&&te.split(/\s+/).length>=2||/[a-zA-Z]-[a-zA-Z]/.test(te))},D=Y=>{const te=Y.target.value;if(v(te),t(te),A.current&&clearTimeout(A.current),de(te)||x||re(te)){N([]),b(te.length>=2);return}te.length>=2?(b(!0),A.current=setTimeout(()=>{me(te)},300)):(N([]),b(!1))},H=Y=>{const te=Y.type==="address"&&Y.house_number?`${Y.house_number} ${Y.text}`:Y.text,Se=r?te:Y.place_name;v(Se),t(Se),r==null||r(Y),b(!1),N([]),S(-1)},Z=Y=>{Y.stopPropagation(),v(""),t(""),N([]),b(!1),S(-1)},ee=()=>{E.length>=2&&b(!0)},ae=Y=>{if(!X){Y.key==="Escape"&&b(!1);return}if(Y.key==="ArrowDown"){if(Y.preventDefault(),!_){b(!0),S(0);return}S(te=>(te+1)%g.length);return}if(Y.key==="ArrowUp"){if(Y.preventDefault(),!_){b(!0),S(g.length-1);return}S(te=>te<=0?g.length-1:te-1);return}if(Y.key==="Enter"&&y&&_&&k>=0&&k<g.length){Y.preventDefault(),H(g[k]);return}Y.key==="Enter"&&!y&&(b(!1),S(-1)),Y.key==="Escape"&&(Y.preventDefault(),b(!1),S(-1))};return s.jsxs("div",{ref:P,className:F("relative",n),children:[s.jsxs("div",{className:"relative",children:[f&&s.jsx($s,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none"}),s.jsx(We,{id:l,value:E,onChange:D,onFocus:ee,onKeyDown:ae,placeholder:a,autoComplete:c,disabled:p,role:"combobox","aria-label":u,"aria-describedby":m,"aria-invalid":h,"aria-expanded":_&&X,"aria-controls":I,"aria-autocomplete":"list","aria-activedescendant":_&&k>=0&&k<g.length?`${I}-option-${k}`:void 0,className:F(f&&"pl-10","pr-8",o)}),C?s.jsxs("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground",role:"status","aria-live":"polite",children:[s.jsx(qt,{className:"h-4 w-4 animate-spin"}),s.jsx("span",{className:"sr-only",children:"Loading suggestions"})]}):E?s.jsx(U,{type:"button",variant:"ghost",size:"sm",className:F("absolute right-1 top-1/2 -translate-y-1/2 h-6 w-6 p-0 hover:bg-muted",i),onClick:Z,"aria-label":"Clear search",children:s.jsx(Mt,{className:"h-4 w-4 text-muted-foreground"})}):null]}),_&&X&&s.jsx("div",{className:"absolute z-50 mt-1 w-full overflow-hidden rounded-md border-[1.5px] border-mw-dark-gray bg-white shadow-lg",children:s.jsxs("ul",{id:I,role:"listbox",className:"max-h-60 overflow-auto py-1",children:[$.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("li",{role:"presentation",className:"px-3 py-1.5 text-xs font-medium text-gray-500 bg-mw-gray",children:"Military Installations"}),$.map(Y=>{var te,Se;return s.jsx("li",{role:"presentation",children:s.jsxs("button",{type:"button",id:`${I}-option-${g.findIndex(Le=>Le.id===Y.id)}`,role:"option","aria-selected":((te=g[k])==null?void 0:te.id)===Y.id,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-gray-900 hover:bg-mw-gray text-left",onClick:()=>H(Y),onMouseEnter:()=>S(g.findIndex(Le=>Le.id===Y.id)),children:[s.jsx(sr,{className:"h-4 w-4 text-icon-accent shrink-0"}),s.jsx("span",{className:"truncate flex-1",children:Y.place_name}),s.jsx("span",{className:"text-xs text-gray-500 capitalize",children:((Se=Tp(Y.branch))==null?void 0:Se.shortName)||Y.branch.replace(/-/g," ")})]})},Y.id)})]}),w.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("li",{role:"presentation",className:"px-3 py-1.5 text-xs font-medium text-gray-500 bg-mw-gray",children:"Locations"}),w.map(Y=>{var te;return s.jsx("li",{role:"presentation",children:s.jsxs("button",{type:"button",id:`${I}-option-${g.findIndex(Se=>Se.id===Y.id)}`,role:"option","aria-selected":((te=g[k])==null?void 0:te.id)===Y.id,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-gray-900 hover:bg-mw-gray text-left",onClick:()=>H(Y),onMouseEnter:()=>S(g.findIndex(Se=>Se.id===Y.id)),children:[s.jsx($s,{className:"h-4 w-4 text-gray-500 shrink-0"}),s.jsx("span",{className:"truncate",children:Y.place_name})]})},Y.id)})]})]})})]})}function CS({open:e,onOpenChange:t,prefillAddress:r="",onConfirm:a}){const[n,o]=d.useState(r);d.useEffect(()=>{e&&o(r)},[e,r]);const i=l=>{l.preventDefault();const c=n.trim();c&&(a(c),t(!1))};return s.jsx(_t,{open:e,onOpenChange:t,children:s.jsxs(gt,{className:"sm:max-w-md",children:[s.jsxs(ms,{children:[s.jsxs(ut,{className:"flex items-center gap-2",children:[s.jsx($s,{className:"h-5 w-5 text-primary"}),"Where are you searching?"]}),s.jsx(St,{children:"Enter a city, ZIP code, or military base to search near."})]}),s.jsxs("form",{onSubmit:i,className:"space-y-4",children:[s.jsx(Ip,{value:n,onChange:o,placeholder:"Enter city, ZIP, or military base...",inputClassName:"h-12"}),s.jsxs(Hr,{className:"gap-2 sm:gap-0",children:[s.jsx(U,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),s.jsx(U,{type:"submit",disabled:!n.trim(),children:"Search"})]})]})]})})}function ES(){const[e,t]=d.useState(!1);return{isAIParsing:e,parseHomeQuery:async n=>{t(!0);try{const{data:o,error:i}=await R.functions.invoke("ai-search-parse",{body:{query:n,context:"home"}});return i?(console.error("AI parse error:",i),it({title:"AI Search Error",description:"Couldn't understand your search. Try being more specific or use the address search.",variant:"destructive"}),null):o!=null&&o.error?(it({title:"AI Search Error",description:o.error,variant:"destructive"}),null):o==null?void 0:o.result}catch(o){return console.error("AI search error:",o),it({title:"AI Search Error",description:"Something went wrong. Please try the standard search.",variant:"destructive"}),null}finally{t(!1)}},parseProQuery:async n=>{t(!0);try{const{data:o,error:i}=await R.functions.invoke("ai-search-parse",{body:{query:n,context:"pro"}});return i?(console.error("AI parse error:",i),it({title:"AI Search Error",description:"Couldn't understand your search. Try being more specific.",variant:"destructive"}),null):o!=null&&o.error?(it({title:"AI Search Error",description:o.error,variant:"destructive"}),null):o==null?void 0:o.result}catch(o){return console.error("AI search error:",o),it({title:"AI Search Error",description:"Something went wrong. Please try the standard search.",variant:"destructive"}),null}finally{t(!1)}}}}const Zl={bedrooms:{must:1,want:3},bathrooms:{must:1,want:2},price:{min:2e5,max:5e5,preapproved:!1},location:{address:"",addresses:[],top_locations:[]},stories:{must:1,want:2},lot_size:{size:2,must:1,want:2},home_type:["Single Family"],sqft:{min:1e3,max:3e3},features_rooms:{},comments:""},Ql=[{order:1,name:"price",text:"Price",subtext:"$200,000 - $500,000",value:0},{order:2,name:"bedrooms",text:"Bedrooms",subtext:"Must have 1, Want 3",value:0},{order:3,name:"bathrooms",text:"Bathrooms",subtext:"Must have 1, Want 2",value:0},{order:4,name:"location",text:"Location",subtext:"Not set",value:0},{order:5,name:"house_type",text:"House Type",subtext:"Single Family",value:0},{order:6,name:"lot_size",text:"Lot Size",subtext:"Small Quaint",value:0},{order:7,name:"stories",text:"Stories",subtext:"Must have 1, Want 2",value:0}
544],Z3=["Laundry Room","Playroom","Formal Dining","Gourmet Kitchen","Sitting Room","Deck","Fenced Yard","Patio","Guest House","HOA","Pool","Office","Gym"],Q3=["Single Family","Manufactured","Townhouse","Condo","Multi-Family"],AS={1:"No Yard",2:"Small Quaint",3:"Nice Size",4:"I Need Space"},Mp="custom:";function TS(e){return e.startsWith(Mp)}function X3(e){return TS(e)?e.slice(Mp.length):e}const J3=75e3,eE=3e6,tE=25e3,iu=0,lu=2e4,sE=100;function Xl(e){if(!e||typeof e!="object")return null;const t=e,r=t.min,a=t.max;if(typeof r!="number"||typeof a!="number"||!Number.isFinite(r)||!Number.isFinite(a)||r<iu||r>lu||a<iu||a>lu)return null;const n=Math.min(r,a),o=Math.max(r,a);return{min:n,max:o}}function cu(e){return e>=1e6?`$${(e/1e6).toFixed(1)}M`:`$${(e/1e3).toFixed(0)}K`}function on(e){return`$${e.toLocaleString()}`}function rE(e){return(e==null?void 0:e.rental)!=null}function zn(e,t){return e==="price"?t.rental?"Rental":"Price":""}function Wr(e,t){var r,a;switch(e){case"price":return t.rental?`${on(t.rental.min)} - ${on(t.rental.max)}`:t.price?`${cu(t.price.min)} - ${cu(t.price.max)}`:"Not set";case"bedrooms":return t.bedrooms?`Must have ${t.bedrooms.must}, Want ${t.bedrooms.want}`:"Not set";case"bathrooms":return t.bathrooms?`Must have ${t.bathrooms.must}, Want ${t.bathrooms.want}`:"Not set";case"location":return(r=t.location)!=null&&r.address?t.location.address:"Not set";case"house_type":return(a=t.home_type)!=null&&a.length?t.home_type.join(", "):"Not set";case"lot_size":return t.lot_size&&AS[t.lot_size.size]||"Not set";case"stories":return t.stories?`Must have ${t.stories.must}, Want ${t.stories.want}`:"Not set";case"rental":return t.rental?`${on(t.rental.min)} - ${on(t.rental.max)}`:"Not set";default:return"Not set"}}const zt={priorities:"mw_guest_priorities",questionnaire:"mw_guest_questionnaire"};function Lp(e,t){try{const r=localStorage.getItem(e);if(r)return JSON.parse(r)}catch(r){console.error(`Error loading ${e} from localStorage:`,r)}return t}function du(){const e=Lp(zt.questionnaire,Zl);return{...e,rental:Xl(e.rental)}}function uu(){return Lp(zt.priorities,Ql).filter(e=>e.name!=="rental")}function ua(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.error(`Error saving ${e} to localStorage:`,r)}}function RS(){const[e,t]=d.useState(uu),[r,a]=d.useState(du),[n,o]=d.useState(!1);d.useEffect(()=>{const f=y=>{if(y.key===zt.priorities&&y.newValue)try{const x=JSON.parse(y.newValue);t(x.filter(_=>_.name!=="rental"))}catch{}if(y.key===zt.questionnaire&&y.newValue)try{const x=JSON.parse(y.newValue);a({...x,rental:Xl(x.rental)})}catch{}};return window.addEventListener("storage",f),()=>window.removeEventListener("storage",f)},[]);const i=d.useCallback(()=>{t(uu()),a(du())},[]),l=localStorage.getItem(zt.priorities)!==null;d.useEffect(()=>{t(f=>f.map(y=>({...y,text:zn(y.name,r)||y.text,subtext:Wr(y.name,r)})))},[r]);const c=d.useCallback(f=>{t(f),ua(zt.priorities,f)},[]),u=d.useCallback(f=>{a(y=>{const x={...y,...f};return ua(zt.questionnaire,x),x})},[]),m=d.useCallback(async()=>{const f=e.map(y=>({...y,text:zn(y.name,r)||y.text,subtext:Wr(y.name,r)||y.subtext}));ua(zt.priorities,f),ua(zt.questionnaire,r)},[e,r]),h=d.useCallback((f,y)=>{const x=[...e],[_]=x.splice(f,1);x.splice(y,0,_);const b=x.map((E,v)=>({...E,order:v+1}));t(b),ua(zt.priorities,b)},[e]),p=d.useCallback(()=>{localStorage.removeItem(zt.priorities),localStorage.removeItem(zt.questionnaire),t(Ql),a(Zl)},[]);return{priorities:e,questionnaire:r,isLoading:!1,isEditing:n,setIsEditing:o,updatePriorities:c,updateQuestionnaire:u,savePriorities:m,reorderPriorities:h,clearLocalPriorities:p,hasLocalPriorities:l,refreshFromStorage:i}}const PS={agent:"Agent",broker:"Agent",lender:"Lender",attorney:"Attorney",home_inspector:"Home Inspector",insurance_agent:"Insurance Agent",title_insurance_agent:"Title Insurance Agent",property_manager:"Property Manager",business_owner:"Business Partner"},IS={active_duty:"Active Duty",veteran:"Veteran",mil_retiree:"Military Retiree",mil_spouse:"Military Spouse",mil_dependent:"Military Dependent",national_guard:"National Guard",reserves:"Reserves",dod_civilian:"DoD Civilian"};function MS(){var p,f;const[e,t]=d.useState(0),[r,a]=d.useState(!0),{data:n=[],isLoading:o}=et({queryKey:["hero-pro-highlight"],queryFn:async()=>{const{data:y,error:x}=await R.from("professional_profiles").select("user_id, photo_url, military_status, pro_role, city, state").eq("status","approved").eq("is_visible",!0).neq("pro_role","business_owner").is("deleted_at",null).not("photo_url","is",null).limit(20);if(x)throw x;if(!y||y.length===0)return[];const _=y.sort(()=>Math.random()-.5),b=_.map(w=>
544w.user_id),{data:E}=await R.from("profiles").select("user_id, first_name, last_name").in("user_id",b),v=new Map((E||[]).map(w=>[w.user_id,w]));return _.map(w=>{const N=v.get(w.user_id),C=Array.isArray(w.military_status)?w.military_status:[];return{userId:w.user_id,firstName:(N==null?void 0:N.first_name)||"",lastName:(N==null?void 0:N.last_name)||"",photoUrl:w.photo_url,militaryStatus:C.length>0?String(C[0]):null,proRole:w.pro_role,city:w.city,state:w.state}}).filter(w=>w.firstName||w.lastName)},staleTime:10*60*1e3});if(d.useEffect(()=>{if(n.length<=1)return;const y=setInterval(()=>{a(!1),setTimeout(()=>{t(x=>(x+1)%n.length),a(!0)},300)},12e3);return()=>clearInterval(y)},[n.length]),o)return s.jsx("div",{className:"mt-5 mb-4 sm:mb-6 flex justify-center md:justify-start xl:justify-center",children:s.jsx(ue,{className:"h-16 w-56 rounded-full bg-white/10"})});if(n.length===0)return null;const i=n[e%n.length],l=`${((p=i.firstName)==null?void 0:p[0])||""}${((f=i.lastName)==null?void 0:f[0])||""}`,c=PS[i.proRole]||i.proRole,u=i.militaryStatus?IS[i.militaryStatus]||i.militaryStatus:null,m=i.city&&i.state?`${i.city}, ${i.state}`:i.state||i.city||null,h=m?`${c} in ${m}`:c;return s.jsxs("div",{className:"mt-6 mb-4 sm:mb-6 flex flex-col items-center md:items-start xl:items-center",children:[s.jsx("span",{className:"text-[11px] text-white/70 leading-none mb-1.5 block text-center md:text-left xl:text-center",children:"Meet one of our pros"}),s.jsxs(oe,{to:`/find-pro?pro=${i.userId}`,className:`inline-flex items-center gap-3 bg-white/10 backdrop-blur-sm rounded-full px-4 py-2.5 transition-opacity duration-300 hover:bg-white/20 mx-auto md:mx-0 xl:mx-auto ${r?"opacity-100":"opacity-0"}`,children:[s.jsxs(ks,{className:"h-8 w-8",children:[s.jsx(Ns,{src:i.photoUrl,alt:`${i.firstName} ${i.lastName}`}),s.jsx(Ss,{className:"text-[10px]",children:l})]}),s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("span",{className:"text-sm text-white leading-tight",children:[s.jsxs("span",{className:"font-semibold",children:[i.firstName," ",i.lastName]}),u?`, ${u}`:""]}),s.jsx("span",{className:"text-[11px] text-white/60 leading-tight",children:h})]}),s.jsx(cs,{className:"h-4 w-4 text-white/70 shrink-0"})]})]})}function Op(){const{user:e}=be(),{toast:t}=At(),r=os(),[a,n]=d.useState(Ql),[o,i]=d.useState(Zl),[l,c]=d.useState(!0),[u,m]=d.useState(!1),h=d.useRef(null),p=e==null?void 0:e.id;d.useEffect(()=>{if(!p){c(!1);return}let w=!1;async function N(){try{const{data:C,error:j}=await R.from("buyer_priorities").select("*").eq("user_id",p).order("order",{ascending:!0});if(w)return;if(j)throw j;const{data:k,error:S}=await R.from("buyer_questionnaire").select("*").eq("user_id",p).single();if(w)return;if(S&&S.code!=="PGRST116")throw S;if(C&&C.length>0){const T=C.map(M=>({id:M.id,user_id:M.user_id,order:M.order,name:M.name,text:M.text||M.name,subtext:M.subtext||"",value:M.value||0,iconType:M.icon_type||void 0}));n(T.filter(M=>M.name!=="rental"))}k&&i({id:k.id,user_id:k.user_id,bedrooms:k.bedrooms,bathrooms:k.bathrooms,price:k.price,location:k.location,stories:k.stories,lot_size:k.lot_size,home_type:k.home_type||[],sqft:k.sqft,features_rooms:k.features_rooms,rental:Xl(k.rental),comments:k.comments||""})}catch(C){if(w||(C instanceof Error?C.message:typeof C=="object"&&C&&"message"in C?String(C.message):"").toLowerCase().includes("abort"))return;console.error("Error fetching priorities:",C),t({title:"Error",description:"Failed to load your priorities",variant:"destructive"})}finally{w||c(!1)}}return N(),()=>{w=!0}},[p]),d.useEffect(()=>{n(w=>w.map(N=>({...N,text:zn(N.name,o)||N.text,subtext:Wr(N.name,o)})))},[o]);const f=d.useCallback(async()=>{if(e)try{const{data:w}=await R.from("buyer_questionnaire").select("id").eq("user_id",e.id).single(),N={user_id:e.id,bedrooms:o.bedrooms,bathrooms:o.bathrooms,price:o.price,location:o.location,stories:o.stories,lot_size:o.lot_size,home_type:o.home_type,sqft:o.sqft,features_rooms:o.features_rooms,rental:o.rental??null,comments:o.comments};let C;if(w){const{error:T}=await R.from("buyer_questionnaire").update(N).eq("user_id",e.id);C=T}else{const{error:T}=await R.from("buyer_questionnaire").insert(N);C=T}if(C)throw C;const{error:j}=await R.from("buyer_priorities").delete().eq("user_id",e.id);if(j)throw j;const k=a.map(T=>({user_id:e.id,order:T.order,name:T.name,text:zn(T.name,o)||T.text,subtext:Wr(T.name,o)||T.subtext,value:T.value,icon_type:T.iconType})),{error:S}=await R.from("buyer_priorities").insert(k);if(S)throw S;r.invalidateQueries({queryKey:["homepage-homes-preview"]})}catch(w){console.error("Error saving priorities:",w),t({title:"Error",description:"Failed to save your priorities",variant:"destructive"})}},[e,a,o,t,r]),y=d.useRef(f);d.useEffect(()=>{y.current=f},[f]);const x=d.useCallback(()=>{h.current&&clearTimeout(h.current),h.current=setTimeout(()=>y.current(),800)},[]),_=d.useCallback(w=>{n(w),x()},[x]),b=d.useCallback(w=>{i(N=>({...N,...w})),x()},[x]),E=d.useCallback(async()=>{h.current&&clearTimeout(h.current),await f(),t({title:"Saved",description:"Your priorities have been saved"})},[f,t]),v=d.useCallback((w,N)=>{const C=[...a],[j]=C.splice(w,1);C.splice(N,0,j);const k=C.map((S,T)=>({...S,order:T+1}));n(k),x()},[a,x]);return d.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),{priorities:a,questionnaire:o,isLoading:l,isEditing:u,setIsEditing:m,updatePriorities:_,updateQuestionnaire:b,savePriorities:E,reorderPriorities:v}}function LS(e,t,r){var c,u,m,h,p,f,y,x,_,b,E,v,w,N,C,j;const a=JSON.parse(JSON.stringify(t));if(r.priorities)for(const k of r.priorities)switch(k.name){case"bedrooms":(k.must!=null||k.want!=null)&&(a.bedrooms={must:k.must??((c=a.bedrooms)==null?void 0:c.must)??1,want:k.want??((u=a.bedrooms)==null?void 0:u.want)??3},a.bedrooms.must>a.bedrooms.want&&(a.bedrooms.want=a.bedrooms.must));break;case"bathrooms":(k.must!=null||k.want!=null)&&(a.bathrooms={must:k.must??((m=a.bathrooms)==null?void 0:m.must)??1,want:k.want??((h=a.bathrooms)==null?void 0:h.want)??2},a.bathrooms.must>a.bathrooms.want&&(a.bathrooms.want=a.bathrooms.must));break;case"stories":(k.must!=null||k.want!=null)&&(a.stories={must:k.must??((p=a.stories)==null?void 0:p.must)??1,want:k.want??((f=a.stories)==null?void 0:f.want)??2},a.stories.must>a.stories.want&&(a.stories.want=a.stories.must));break;case"lot_size":(k.must!=null||k.want!=null)&&(a.lot_size={size:k.want??((y=a.lot_size)==null?void 0:y.size)??2,must:k.must??((x=a.lot_size)==null?void 0:x.must)??1,want:k.want??((_=a.lot_size)==null?void 0:_.want)??2},a.lot_size.must>a.lot_size.want&&(a.lot_size.want=a.lot_size.must));break}if(r.price&&(a.price={min:r.price.min??((b=a.price)==null?void 0:b.min)??2e5,max:r.price.max??((E=a.price)==null?void 0:E.max)??5e5,preapproved:((v=a.price)==null?void 0:v.preapproved)??!1}),r.sqft&&(a.sqft={min:r.sqft.min??((w=a.sqft)==null?void 0:w.min)??1e3,max:r.sqft.max??((N=a.sqft)==null?void 0:N.max)??3e3}),r.home_types&&r.home_types.length>0&&(a.home_type=r.home_types),r.features&&r.features.length>0){const k={...a.features_rooms||{}};for(const S of r.features)k[S.name]=S.value;a.features_rooms=k}r.address&&(a.location={address:r.address,addresses:((C=a.location)==null?void 0:C.addresses)??[],top_locations:((j=a.location)==null?void 0:j.top_locations)??[]});const n=(r.priorities||[]).map(k=>k.name),o=e.filter(k=>!n.includes(k.name)),i=n.map((k,S)=>({...e.find(M=>M.name===k)||{name:k,text:k.charAt(0).toUpperCase()+k.slice(1).replace("_"," "),value:0},order:S+1,subtext:Wr(k,a)}));return{priorities:[...i,...o.map((k,S)=>({...k,order:i.length+S+1,subtext:Wr(k.name,a)}))],questionnaire:a}}function OS(){const[e,t]=d.useState(""),[r,a]=d.useState("sale"),[n,o]=d.useState(!1),[i,l]=d.useState(!1),[c,u]=d.useState(null),m=ct(),{user:h}=be(),{isAIParsing:p,parseHomeQuery:f}=ES(),y=RS(),x=Op(),_=r==="sale"?"mls_sale,fsbo":"mls_rent,frbo",b=N=>N.trim().split(/\s+/).length>=4,E=async N=>{N.preventDefault();const C=e.trim();if(!C){m(`/find-home?listing_type=${_}`);return}if(b(C)){const j=await f(C);if(!j)return;const{priorities:k,questionnaire:S}=h?x:y,T=LS(k,S,j);h||(y.updatePriorities(T.priorities),y.updateQuestionnaire(T.questionnaire));const M=S==null?void 0:S.location,P=M==null?void 0:M.address;j.address?v(j.address,j):P&&typeof P=="string"?v(P,j):(u(j),l(!0))}else m(`/find-home?q=${encodeURIComponent(C)}&listing_type=${_}`)},v=d.useCallback((N,C)=>{it({title:"⨠AI adjusted your search priorities",description:N?`Searching near ${N}`:"Priorities updated based on your description"}),m(N?`/find-home?q=${encodeURIComponent(N)}&listing_type=${_}`:`/find-home?listing_type=${_}`)},[m,_]),w=d.useCallback(N=>{c&&(v(N,c),u(null))},[c,v]);return s.jsxs(s.Fragment,{children:[s.jsx(am,{children:s.jsx("link",{rel:"preload",href:"/hero-bg.jpg",as:"image",type:"image/jpeg"})}),s.jsxs("section",{className:"relative min-h-[280px] sm:min-h-[320px] lg:min-h-[340px] overflow-x-clip",children:[s.jsx("img",{src:"/hero-bg.jpg",alt:"","aria-hidden":!0,fetchPriority:"high",onLoad:()=>o(!0),className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-700 ${n?"opacity-100":"opacity-0"}`}),s.jsx("div",{className:"absolute inset-0 bg-mw-black/70"}),s.jsxs("div",{className:"relative z-10 container flex flex-col items-center justify-center text-center text-white pt-16 sm:pt-20 pb-2 sm:pb-3",children:[s.jsxs("h1",{className:"font-heading text-3xl md:text-4xl lg:text-5xl font-bold mb-6 animate-fade-in-up text-white text-center md:text-left",children:["Find Your Next Home",s.jsx("br",{className:"hidden lg:inline"})," Near Military Installations"]}),s.jsxs("div",{className:"w-full max-w-2xl mx-auto",children:[s.jsx("div",{className:"flex",children:s.jsxs("div",{className:"inline-flex rounded-md bg-white/10 p-0.5 animate-fade-in-up",style:{animationDelay:"0.1s"},children:[s.jsx("button",{type:"button",onClick:()=>a("sale"),className:`px-4 py-1.5 rounded-sm text-sm font-medium transition-all ${r==="sale"?"bg-mw-dark-gray text-white shadow-sm":"text-white/80 hover:text-white hover:bg-white/10"}`,children:"Sale"}),s.jsx("button",{type:"button",onClick:()=>a("rent"),className:`px-4 py-1.5 rounded-sm text-sm font-medium transition-all ${r==="rent"?"bg-mw-dark-gray text-white shadow-sm":"text-white/80 hover:text-white hover:bg-white/10"}`,children:"Rent"})]})}),s.jsx("form",{onSubmit:E,className:"flex flex-col sm:flex-row items-center sm:items-start gap-3 animate-fade-in-up",style:{animationDelay:"0.15s"},children:s.jsxs("div",{className:"relative flex-1 w-full flex",children:[s.jsx(Ip,{value:e,onCh
544ange:t,placeholder:"Search by city, ZIP, base, or describe your ideal home...",className:"flex-1 w-full",inputClassName:"h-12 text-base bg-white text-mw-black pl-4 pr-14 rounded-r-none border-0 ring-0 focus-visible:ring-0 focus-visible:border-0",clearButtonClassName:"right-4",disabled:p,showIcon:!1}),s.jsx(U,{type:"submit",size:"sm",className:"h-12 w-12 p-0 rounded-l-none border-0 shrink-0 bg-icon-accent text-mw-black shadow-none hover:bg-icon-background hover:text-icon-foreground",disabled:p,"aria-label":"Search",children:p?s.jsx(qt,{className:"h-4 w-4 animate-spin"}):s.jsx(Pf,{className:"h-4 w-4"})})]})})]}),s.jsx(MS,{})]}),s.jsx(CS,{open:i,onOpenChange:l,prefillAddress:(c==null?void 0:c.address)||"",onConfirm:w})]})]})}const ln="mustwants_favorites";function DS(e){if(!e)return!1;const t=typeof e=="object"&&"message"in e?String(e.message):String(e);return/abort/i.test(t)}function FS(){const{user:e}=be(),[t,r]=d.useState([]),[a,n]=d.useState({}),[o,i]=d.useState({}),[l,c]=d.useState(!0),u=d.useCallback(()=>{const v=localStorage.getItem(ln);if(v)try{r(JSON.parse(v))}catch(w){console.error("Failed to parse favorites from localStorage",w),r([])}},[]),m=d.useCallback(async()=>{if(e!=null&&e.id)try{const{data:v,error:w}=await R.from("favorites").select("home_id, custom_name, notes").eq("user_id",e.id);if(w)throw w;r((v==null?void 0:v.map(j=>j.home_id))||[]);const N={},C={};v==null||v.forEach(j=>{j.custom_name&&(N[j.home_id]=j.custom_name),j.notes&&j.notes.trim()&&(C[j.home_id]=!0)}),n(N),i(C)}catch(v){DS(v)||(console.error("Error loading favorites:",v),u())}else u();c(!1)},[e==null?void 0:e.id,u]);d.useEffect(()=>{m()},[m]),d.useEffect(()=>{(async()=>{if(!(e!=null&&e.id))return;const w=localStorage.getItem(ln);if(w)try{const N=JSON.parse(w);if(N.length===0)return;for(const k of N)await R.from("favorites").upsert({user_id:e.id,home_id:k},{onConflict:"user_id,home_id"});localStorage.removeItem(ln);const{data:C}=await R.from("favorites").select("home_id, custom_name").eq("user_id",e.id);r((C==null?void 0:C.map(k=>k.home_id))||[]);const j={};C==null||C.forEach(k=>{k.custom_name&&(j[k.home_id]=k.custom_name)}),n(j)}catch(N){console.error("Error syncing favorites:",N)}})()},[e==null?void 0:e.id]),d.useEffect(()=>{!e&&!l&&localStorage.setItem(ln,JSON.stringify(t))},[t,e,l]);const h=d.useCallback(async v=>{if(e){const{error:w}=await R.from("favorites").insert({user_id:e.id,home_id:v});if(w){console.error("Error adding favorite:",w);return}}r(w=>w.includes(v)?w:[...w,v])},[e]),p=d.useCallback(async v=>{if(e){const{error:w}=await R.from("favorites").delete().eq("user_id",e.id).eq("home_id",v);if(w){console.error("Error removing favorite:",w);return}}r(w=>w.filter(N=>N!==v))},[e]),f=d.useCallback(async(v,w,N)=>{if(e)try{const{error:C}=await R.from("favorites").update({notes:w||null,custom_name:N||null}).eq("user_id",e.id).eq("home_id",v);if(C)throw C}catch(C){throw console.error("Error updating favorite notes:",C),C}},[e]),y=d.useCallback(async v=>{t.includes(v)?await p(v):await h(v)},[t,h,p]),x=d.useCallback(v=>t.includes(v),[t]),_=d.useCallback(v=>a[v]??null,[a]),b=d.useCallback(v=>!!o[v],[o]),E=d.useCallback(async()=>{if(e)try{await R.from("favorites").delete().eq("user_id",e.id)}catch(v){console.error("Error clearing favorites:",v);return}r([])},[e]);return{favorites:t,addFavorite:h,removeFavorite:p,toggleFavorite:y,isFavorite:x,getNickname:_,hasNotes:b,clearFavorites:E,updateFavoriteNotes:f,refetch:m,count:t.length,isLoading:l}}function kr(e){return(e instanceof Error?e.message:typeof e=="object"&&e&&"message"in e?String(e.message):"").toLowerCase().includes("abort")}function Nr(e){return e.map(t=>({id:t.id,user_id:t.user_id,listing_id:t.listing_id,rank:t.rank,notes:t.notes,created_at:t.created_at,updated_at:t.updated_at,listing:void 0}))}function $S(e=[]){const{user:t,buyerProfile:r}=be(),a=(t==null?void 0:t.id)??null,n=(r==null?void 0:r.partner_id)??null,[o,i]=d.useState([]),[l,c]=d.useState([]),[u,m]=d.useState(!0),[h,p]=d.useState(null),f=d.useRef(!1),y=d.useRef(!1),x=d.useRef(o);x.current=o,d.useEffect(()=>{let j=!1;return(async()=>
544{if(!a){i([]),m(!1);return}try{const{data:S,error:T}=await R.from("favorite_rankings").select("*").eq("user_id",a).order("rank",{ascending:!0});if(j)return;if(T)throw T;if(!S||S.length===0){i([]);return}const M=S.map(L=>L.listing_id),{data:P,error:A}=await R.from("all_active_listings").select("id").in("id",M);if(j)return;if(A)throw A;const I=new Set((P==null?void 0:P.map(L=>L.id))||[]),z=S.filter(L=>I.has(L.listing_id));i(Nr(z||[]))}catch(S){if(j||kr(S))return;console.error("Error loading rankings:",S),p(S instanceof Error?S.message:"Failed to load rankings")}finally{j||m(!1)}})(),()=>{j=!0}},[a]),d.useEffect(()=>{let j=!1;return(async()=>{if(y.current=!1,!a||u||f.current)return;const S=x.current,T=new Set(e),M=new Set(S.map(L=>L.listing_id)),P=e.filter(L=>!M.has(L)),A=S.filter(L=>!T.has(L.listing_id)),I=S.filter(L=>T.has(L.listing_id)),z=I.some((L,me)=>L.rank!==me+1);if(!(P.length===0&&A.length===0&&!z)){f.current=!0;try{await R.from("favorite_rankings").delete().eq("user_id",a);const $=[...I.sort((X,de)=>X.rank-de.rank).map(X=>X.listing_id),...P].map((X,de)=>{var re;return{user_id:a,listing_id:X,rank:de+1,notes:((re=S.find(D=>D.listing_id===X))==null?void 0:re.notes)||null}});if($.length>0){const{error:X}=await R.from("favorite_rankings").insert($);if(X)throw X}if(j)return;const{data:g}=await R.from("favorite_rankings").select("*").eq("user_id",a).order("rank",{ascending:!0});j||i(Nr(g||[]))}catch(L){!j&&!kr(L)&&console.error("Error syncing rankings:",L)}finally{f.current=!1}}})(),()=>{j=!0}},[a,u,e]);const _=d.useCallback(async j=>{if(t)try{y.current=!0,await R.from("favorite_rankings").delete().eq("user_id",t.id);const k=j.map(M=>({user_id:t.id,listing_id:M.listing_id,rank:M.rank,notes:M.notes||null})),{error:S}=await R.from("favorite_rankings").insert(k);if(S)throw S;const{data:T}=await R.from("favorite_rankings").select("*").eq("user_id",t.id).order("rank",{ascending:!0});i(Nr(T||[])),it({title:"Rankings saved",description:"Your favorite rankings have been updated."})}catch(k){if(kr(k))return;console.error("Error updating rankings:",k),it({title:"Failed to save rankings",description:k instanceof Error?k.message:"Please try again.",variant:"destructive"})}},[t]),b=d.useCallback(async(j,k)=>{if(t)try{y.current=!0;const S=x.current,T=S.length>0?Math.max(...S.map(A=>A.rank))+1:1,{error:M}=await R.from("favorite_rankings").insert({user_id:t.id,listing_id:j,rank:T,notes:k||null});if(M)throw M;const{data:P}=await R.from("favorite_rankings").select("*").eq("user_id",t.id).order("rank",{ascending:!0});i(Nr(P||[]))}catch(S){if(kr(S))return;console.error("Error adding ranking:",S),it({title:"Failed to add ranking",description:S instanceof Error?S.message:"Please try again.",variant:"destructive"})}},[t]),E=d.useCallback(async j=>{if(t)try{y.current=!0;const{error:k}=await R.from("favorite_rankings").delete().eq("user_id",t.id).eq("listing_id",j);if(k)throw k;const T=x.current.filter(P=>P.listing_id!==j).sort((P,A)=>P.rank-A.rank);if(T.length>0){const P=T.map((A,I)=>({user_id:t.id,listing_id:A.listing_id,rank:I+1,notes:A.notes||null}));await R.from("favorite_rankings").delete().eq("user_id",t.id),await R.from("favorite_rankings").insert(P)}const{data:M}=await R.from("favorite_rankings").select("*").eq("user_id",t.id).order("rank",{ascending:!0});i(Nr(M||[]))}catch(k){if(kr(k))return;console.error("Error removing ranking:",k),it({title:"Failed to remove ranking",description:k instanceof Error?k.message:"Please try again.",variant:"destructive"})}},[t]),v=d.useMemo(()=>{const j=new Map;return o.forEach(k=>j.set(k.listing_id,k.rank)),j},[o]),w=d.useMemo(()=>{const j=new Map;return l.forEach(k=>j.set(k.listing_id,k.rank)),j},[l]),N=d.useCallback(j=>v.get(j)??null,[v]),C=d.useCallback(j=>w.get(j)??null,[w]);return d.useEffect(()=>{let j=!1;return(async()=>{if(!a||!n){c([]);return}try{const{data:S}=await R.from("profiles").select("id").eq("user_id",a).maybeSingle();if(j||!S)return;const{data:T}=await R.from("buyer_profiles").select("user_id").eq("partner_id",S.id).maybeSingle();if(j||!T)return;const{data:M,error:P}=await R.from("favorite_rankings").select("*").eq("user_id",T.user_id).order("rank",{ascending:!0});if(P)throw P;if(!M||M.length===0){c([]);return}const A=M.map($=>$.listing_id),{data:I,error:z}=await R.from("all_active_listings").select("id").in("id",A);if(j)return;if(z)throw z;const L=new Set((I==null?void 0:I.map($=>
544$.id))||[]),me=M.filter($=>L.has($.listing_id));j||c(Nr(me||[]))}catch(S){!j&&!kr(S)&&console.error("Error loading partner rankings:",S)}})(),()=>{j=!0}},[a,n]),{rankings:o,isLoading:u,error:h,updateRankings:_,addRanking:b,removeRanking:E,getRankForListing:N,getPartnerRankForListing:C}}function BS(e,t="mls"){const r=xo();R.auth.getUser().then(({data:a})=>{var n;R.from("listing_views").insert({listing_id:e,listing_source:t,viewer_id:((n=a==null?void 0:a.user)==null?void 0:n.id)??null,visitor_id:r}).then(({error:o})=>{o&&console.warn("[trackListingView]",o.message)})})}const zS=wg,HS=_g,Dp=d.forwardRef(({className:e,align:t="center",sideOffset:r=4,...a},n)=>s.jsx(vg,{children:s.jsx(qu,{ref:n,align:t,sideOffset:r,className:F("z-[70] 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),...a})}));Dp.displayName=qu.displayName;function US({images:e,address:t,startIndex:r,onClose:a}){const[n,o]=d.useState(r),i=d.useCallback(()=>{o(u=>u===0?e.length-1:u-1)},[e.length]),l=d.useCallback(()=>{o(u=>u===e.length-1?0:u+1)},[e.length]);d.useEffect(()=>{const u=m=>{m.key==="Escape"?a():m.key==="ArrowLeft"?i():m.key==="ArrowRight"&&l()};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[a,i,l]),d.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}),[]);const c=u=>{u.currentTarget.src="/placeholder.svg"};return s.jsxs("div",{className:"fixed inset-0 z-[100] bg-black/95 flex items-center justify-center animate-fade-in",onClick:a,children:[s.jsx(U,{variant:"ghost",size:"icon",className:"absolute top-4 right-4 text-white hover:bg-white/20 h-10 w-10 z-10",onClick:a,"aria-label":"Close lightbox",children:s.jsx(Mt,{className:"h-6 w-6"})}),s.jsxs("div",{className:"absolute top-4 left-4 text-white/80 text-sm z-10",children:[n+1," / ",e.length]}),e.length>1&&s.jsxs(s.Fragment,{children:[s.jsx(U,{variant:"ghost",size:"icon",className:"absolute left-4 top-1/2 -translate-y-1/2 text-white hover:bg-white/20 h-12 w-12 z-10",onClick:u=>{u.stopPropagation(),i()},"aria-label":"Previous photo",children:s.jsx(o2,{className:"size-10"})}),s.jsx(U,{variant:"ghost",size:"icon",className:"absolute right-4 top-1/2 -translate-y-1/2 text-white hover:bg-white/20 h-12 w-12 z-10",onClick:u=>{u.stopPropagation(),l()},"aria-label":"Next photo",children:s.jsx(Nf,{className:"size-10"})})]}),s.jsx("img",{src:e[n].replace(/^http:\/\//i,"https://"),alt:`${t} - Photo ${n+1}`,className:"max-h-[90vh] max-w-[90vw] object-contain select-none",onClick:u=>u.stopPropagation(),onError:c})]})}function VS(e,t){return e==null||t==null||isNaN(e)||isNaN(t)?"/placeholder.svg":`https://maps.googleapis.com/maps/api/streetview?size=640x640&location=${e},${t}&key=AIzaSyCFUqeSxVp6e4wdbjbytRf01tvK1O7-WXA`}function mu({src:e,alt:t}){const[r,a]=d.useState(!1),o=e.toLowerCase().includes("mlsgrid")?`https://oljfrvuqbiwnhtgzlrxb.supabase.co/functions/v1/image-proxy?url=${encodeURIComponent(e)}`:e;return s.jsxs(s.Fragment,{children:[!r&&s.jsx("div",{className:"absolute inset-0 bg-muted animate-pulse"}),s.jsx("img",{src:o,alt:t,className:`w-full h-full object-cover hover:scale-105 transition-all duration-500 ${r?"opacity-100":"opacity-0"}`,loading:"lazy",referrerPolicy:"no-referrer",onLoad:()=>a(!0),onError:i=>{i.currentTarget.src="/placeholder.svg",a(!0)}})]})}function qS({currentRank:e,onSave:t}){const{user:r}=be(),{openAuthModal:a}=za(),[n,o]=d.useState(!1),[i,l]=d.useState(!1),[c,u]=d.useState(e!=null?String(e):""),m=d.useRef(null);d.useEffect(()=>{n&&(u(e!=null?String(e):""),setTimeout(()=>{var p;return(p=m.current)==null?void 0:p.select()},50))},[n,e]);const h=()=>{if(!r){o(!1),l(!0);return}const p=parseInt(c,10);t(isNaN(p)||p<1?null:p),o(!1)};return s.jsxs(s.Fragment,{children:[s.jsxs(zS,{open:n,onOpenChange:o,children:[s.jsx(HS,{asChild:!0,children:s.jsxs("button",{className:"bg-mw-black text-icon-accent text-xs font-bold px-2.5 py-1 rounded-sm whitespace-nowrap inline-flex items-center gap-1 hover:bg-mw-black/80 transition-colors cursor-pointer",children:["My Rank: ",e??"--",s.jsx(Tf,{className:"w-3 h-3 opacity-60"})]})}),s.jsxs(Dp,{className:"w-44 p-3 z-[100]",align:"start",side:"bottom",children:[s.jsx("p",{className:"text-xs font-medium mb-2",children:"Set your rank"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(We,{ref:m,type:"number",min:1,value:c,onChange:p=>u(p.target.value),onKeyDown:p=>{p.key==="Enter"&&h()},className:"h-8 text-sm",placeholder:"#"}),s.jsx(U,{size:"sm",className:"h-8 px-3",onClick:h,children:"Set"})]}),e!=null&&s.jsx("button",{className:"text-xs text-destructive mt-2 hover:underline",onClick:()=>{t(null),o(!1)},children:"Remove rank"})]})]}),s.jsx(_t,{open:i,onOpenChange:l,children:s.jsxs(gt,{className:"sm:max-w-md",children:[s.jsxs(ms,{children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-icon-background flex items-center justify-center mx-auto mb-2",children:s.jsx(El,{className:"w-6 h-6 text-icon-accent"})}),s.jsx(ut,{className:"text-center",children:"Sign In to Rank Homes"}),s.jsx(St,{className:"text-center",children:"Create a free account or sign in to rank homes and track y
544our favorites."})]}),s.jsx("div",{className:"flex justify-center pt-2",children:s.jsx(U,{onClick:()=>{l(!1),a("signup")},children:"Sign In / Create Account"})})]})})]})}function WS({images:e,address:t,matchScore:r,userRank:a,partnerRank:n,userRankLabel:o="My Rank",partnerRankLabel:i="Partner's Rank",onUserRankChange:l,latitude:c,longitude:u}){const[m,h]=d.useState(!1),[p,f]=d.useState(0),x=e.length>0&&!e[0].includes("no-mls-photo.jpg")?e:[VS(c,u)],_=x.length,b=x.slice(0,5),E=k=>{f(k),h(!0)},v=(k,S,T)=>k.includes("supabase.co/storage/v1/object/public/")?k.replace("/object/public/","/render/image/public/")+`?width=${S}&height=${T}&resize=cover`:k.replace(/^http:\/\//i,"https://"),w=(k,S,T,M,P,A)=>s.jsxs("button",{className:`relative overflow-hidden cursor-pointer focus:outline-none bg-muted ${T}`,onClick:()=>E(S),"aria-label":`View photo ${S+1}`,children:[s.jsx(mu,{src:v(k,M,P),alt:`${t} - Photo ${S+1}`}),A]},S),N=_>1?s.jsxs("button",{className:"absolute bottom-2 right-2 z-10 bg-black/60 text-white text-xs px-3 py-1.5 rounded backdrop-blur-sm flex items-center gap-1.5 hover:bg-black/75 transition-colors",onClick:k=>{k.stopPropagation(),E(0)},children:[s.jsx(n2,{className:"h-3.5 w-3.5"}),"See All ",_," Photos"]}):null,C=_>5?s.jsx("div",{className:"absolute inset-0 bg-black/50 flex items-center justify-center pointer-events-none",children:s.jsxs("span",{className:"text-white text-sm font-semibold",children:["+",_-5," more"]})}):null,j=()=>_===1?s.jsx("div",{className:"relative rounded-lg overflow-hidden aspect-[2/1]",children:w(b[0],0,"w-full h-full",800,600)}):_===2?s.jsxs("div",{className:"relative grid grid-cols-2 gap-1 rounded-lg overflow-hidden aspect-[2/1]",children:[w(b[0],0,"",400,400),w(b[1],1,"",400,400),N]}):_===3?s.jsxs("div",{className:"relative grid grid-cols-4 grid-rows-2 gap-1 rounded-lg overflow-hidden aspect-[2/1]",children:[w(b[0],0,"col-span-2 row-span-2",800,600),w(b[1],1,"col-span-2",400,300),w(b[2],2,"col-span-2",400,300),N]}):_===4?s.jsxs("div",{className:"relative grid grid-cols-4 grid-rows-2 gap-1 rounded-lg overflow-hidden aspect-[2/1]",children:[w(b[0],0,"col-span-2 row-span-2",800,600),w(b[1],1,"col-span-2",400,300),w(b[2],2,"col-span-1",200,300),w(b[3],3,"col-span-1",200,300),N]}):s.jsxs("div",{className:"relative grid grid-cols-4 grid-rows-2 gap-1 rounded-lg overflow-hidden aspect-[2/1]",children:[w(b[0],0,"col-span-2 row-span-2",800,600),w(b[1],1,"col-span-1",200,300),w(b[2],2,"col-span-1",200,300),w(b[3],3,"col-span-1",200,300),w(b[4],4,"col-span-1",200,300,C),N]});return s.jsxs("div",{className:"relative flex flex-col gap-2",children:[s.jsx("div",{className:"hidden sm:block",children:j()}),s.jsx("div",{className:"sm:hidden relative",children:s.jsxs("button",{className:"relative w-full aspect-[4/3] rounded-lg overflow-hidden cursor-pointer bg-muted",onClick:()=>E(0),children:[s.jsx(mu,{src:v(x[0],800,600),alt:`${t} - Photo 1`}),_>1&&s.jsxs("div",{className:"absolute bottom-2 right-2 bg-black/70 text-white text-xs px-2 py-1 rounded",children:["1 / ",_]})]})}),(a!=null||n!=null||l)&&s.jsxs("div",{className:"absolute bottom-2 left-2 sm:static flex flex-wrap gap-1 z-10",children:[l?s.jsx(qS,{currentRank:a??null,onSave:l}):s.jsxs("span",{className:"bg-mw-black text-icon-accent text-xs font-bold px-2.5 py-1 rounded-sm whitespace-nowrap",children:[o,": ",a??"--"]}),s.jsxs("span",{className:"bg-mw-black text-white text-xs font-bold px-2.5 py-1 rounded-sm whitespace-nowrap",children:[i,": ",n??"--"]})]}),m&&s.jsx(US,{images:x.map(k=>k.toLowerCase().includes("mlsgrid")?`https://oljfrvuqbiwnhtgzlrxb.supabase.co/functions/v1/image-proxy?url=${encodeURIComponent(k)}`:k),address:t,startIndex:p,onClose:()=>h(!1)})]})}const GS=jg,YS=kg,KS=Ng;function Jl({title:e,children:t,defaultOpen:r=!0,className:a,trailing:n}){const[o,i]=d.useState(r);return s.jsxs(GS,{open:o,onOpenChange:i,className:a,children:[s.jsx(YS,{asChild:!0,children:s.jsxs("button",{className:"flex w-full items-center justify-between py-1 text-left group transition-colors hover:text-icon-foreground",children:[s.jsx("h3",{className:"font-heading font-semibold text-sm",children:e}),s.jsxs("div",{className:"flex items-center gap-2",children:[n,s.jsx(Zs,{className:F("h-4 w-4 text-muted-foreground transition-transform duration-200 group-hover:text-icon-foreground",o&&"rotate-180")}
544)]})]})}),s.jsx(KS,{children:t})]})}function ZS(e){const{user:t}=be(),{toast:r}=At(),[a,n]=d.useState(null),[o,i]=d.useState(null),[l,c]=d.useState(null),[u,m]=d.useState(!0),[h,p]=d.useState(!1);d.useEffect(()=>{(async()=>{if(!t){c(null);return}const{data:x}=await R.from("buyer_profiles").select("partner_id").eq("user_id",t.id).single();if(x!=null&&x.partner_id){const{data:_}=await R.from("profiles").select("user_id").eq("id",x.partner_id).single();c((_==null?void 0:_.user_id)||null)}else c(null)})()},[t]),d.useEffect(()=>{(async()=>{if(!e||!t){n(null),i(null),m(!1);return}m(!0);try{const{data:x}=await R.from("favorites").select("notes, custom_name, areas_needing_work, va_assumable").eq("user_id",t.id).eq("home_id",e).maybeSingle(),_=x;if(n(_?{notes:_.notes,custom_name:_.custom_name,areas_needing_work:_.areas_needing_work||[],va_assumable:_.va_assumable??!1}:null),l){const{data:b}=await R.from("favorites").select("notes, custom_name, areas_needing_work, va_assumable").eq("user_id",l).eq("home_id",e).maybeSingle(),E=b;i(E?{notes:E.notes,custom_name:E.custom_name,areas_needing_work:E.areas_needing_work||[],va_assumable:E.va_assumable??!1}:null)}else i(null)}catch(x){console.error("Error fetching notes:",x)}finally{m(!1)}})()},[e,t,l]),d.useEffect(()=>{if(!e||!l)return;const y=R.channel(`partner-notes-${e}`).on("postgres_changes",{event:"*",schema:"public",table:"favorites",filter:`user_id=eq.${l}`},x=>{if(x.eventType==="DELETE")i(null);else{const _=x.new;_.home_id===e&&i({notes:_.notes,custom_name:_.custom_name,areas_needing_work:_.areas_needing_work||[],va_assumable:_.va_assumable??!1})}}).subscribe();return()=>{R.removeChannel(y)}},[e,l]);const f=d.useCallback(async(y,x,_,b)=>{if(!(!t||!e)){p(!0);try{const E={notes:y||null,custom_name:x||null,areas_needing_work:_,va_assumable:b},{error:v}=await R.from("favorites").update(E).eq("user_id",t.id).eq("home_id",e);if(v)throw v;n({notes:y||null,custom_name:x||null,areas_needing_work:_,va_assumable:b}),r({title:"Notes saved",description:"Your notes have been updated."})}catch(E){console.error("Error updating notes:",E),r({title:"Error saving notes",description:"Please try again.",variant:"destructive"})}finally{p(!1)}}},[t,e,r]);return{userNotes:a,partnerNotes:o,isLoading:u,updateNotes:f,isSaving:h,partnerId:l}}const ma=["Kitchen","Flooring","Rugs / Carpet","Interior Paint","Ceiling Fans","Exterior Paint","Landscaping","Fence","Shed","A/C Unit","Water Heater"];function QS({homeId:e,isFavorite:t,onToggleFavorite:r}){const{user:a}=be(),{userNotes:n,partnerNotes:o,isLoading:i,updateNotes:l,isSaving:c,partnerId:u}=ZS(e),m=ct(),[h,p]=d.useState(!1),[f,y]=d.useState(""),[x,_]=d.useState(""),[b,E]=d.useState([]),[v,w]=d.useState(!1),[N,C]=d.useState(""),j=b.filter(A=>!ma.includes(A)),k=()=>{const A=N.trim();A&&!b.includes(A)&&E(I=>[...I,A]),C("")},S=!(n!=null&&n.custom_name)&&!(n!=null&&n.notes)&&(!(n!=null&&n.areas_needing_work)||n.areas_needing_work.length===0);d.useEffect(()=>{n?(y(n.custom_name||""),_(n.notes||""),E(n.areas_needing_work||[]),w(n.va_assumable??!1)):(y(""),_(""),E([]),w(!1))},[n]),d.useEffect(()=>{!i&&t&&S&&p(!0)},[i,t,S]);const T=async()=>{await l(x,f,b,v),p(!1)},M=A=>{E(I=>I.includes(A)?I.filter(z=>z!==A):[...I,A])};if(!a)return s.jsx("div",{className:"py-4 border-t",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:"Sign in to add personal notes about this home."})});if(!t)return s.jsx("div",{className:"py-4 border-t border-b",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Save this home to your favorites to add personal notes."}),r&&s.jsxs(U,{variant:"outline",size:"sm",onClick:()=>r(e),className:"shrink-0 border-mw-black text-mw-black hover:bg-mw-black hover:text-white",children:[s.jsx(Gs,{className:"h-4 w-4 mr-1.5"})," Add to Favorites"]})]})});if(i)return s.jsxs("div",{className:"py-4 border-t space-y-3",children:[s.jsx(ue,{className:"h-6 w-32"}),s.jsx(ue,{className:"h-10 w-full"}),s.jsx(ue,{className:"h-20 w-full"})]});const P=!!u;return s.jsx("div",{className:"border-t pt-3",children:s.jsx(Jl,{title:"Your Notes",trailing:P?void 0:s.jsxs("button",{type:"button",onClick:A=>{A.stopPropagation(),m("/profile")},className:"flex items-center gap-1 text-xs text-mw-olive hover:underline font-medium",children:[s.jsx(Al,{className:"h-3.5 w-3.5"}),"Invite a Partner"]}),children:s.jsxs("div",{className:P?"grid grid-cols-1 md:grid-cols-2 gap-4 pt-2":"pt-2",children:[s.jsx(dt,{children:s.jsxs(vt,{className:"p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(pr,{className:"h-4 w-4 text-icon-accent"}),s.jsx("span",{className:"font-heading font-semibold text-xs uppercase tracking-wide text-mw-olive",children:"Your Notes"})]}),h?s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx(Te,{htmlFor:"note-nickname",className:"text-xs text-muted-foreground",children:"Home Nickname"}),s.jsx(We,{id:"note-nickname",placeholder:"e.g., Dream House on Oak St",value:f,onChange:A=>y(A.target.value),className:"mt-1 h-9 text-sm"})]}),s.jsxs("div",{children:[s.jsx(Te,{htmlFor:"note-comments",className:"text-xs text-muted-foreground",children:"General Comments"}),s.jsx(zl,{id:"note-comments",placeholder:"Add your thoughts about this home...",value:x,onChange:A=>_(A.target.value),className:"mt-1 min-h-[80px] text-sm"})]}),s.jsxs("div",{children:[s.jsx(Te,{className:"text-xs text-muted-foreground",children:"VA Assumable"}),s.jsxs("label",{className:"flex items-center gap-2 mt-2 cursor-pointer",children:[s.jsx(ht,{checked:v,onCheckedChange:A=>w(A===!0)}),s.jsx("span",{className:"text-sm",children:"This home has a VA assumable mortgage"})]})]}),s.jsxs("div",{children:[s.jsx(Te,{className:"text-xs text-muted-foreground",children:"Areas That Need Work"}),s.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 mt-2",children:[ma.map(A=>s.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[s.jsx(ht,{checked:b.includes(A),onCheckedChange:()=>M(A)}),s.jsx("span",{className:"text-sm",children:A})]},A)),j.map(A=>s.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[s.jsx(ht,{checked:!0,onCheckedChange:()=>M(A)}),s.jsx("span",{className:"text-sm",children:A})]},A))]}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsx("button",{type:"button",onClick:k,disabled:!N.trim(),className:"flex items-center justify-center h-6 w-6 rounded-sm border border-mw-olive text-mw-olive disabled:opacity-30",children:s.jsx(k2,{className:"h-3.5 w-3.5"})}),s.jsx(We,{placeholder:"Add custom areaâ¦",value:N,onChange:A=>C(A.target.value),onKeyDown:A=>{A.key==="Enter"&&(A.preventDefault(),k())},className:"h-8 text-sm flex-1"})]})]}),s.jsxs(U,{onClick:T,disabled:c,size:"sm",className:"h-9 px-6",children:[s.jsx(C2,{className:"h-4 w-4 mr-1.5"}),c?"Saving...":"Save"]})]}):s.jsxs(s.Fragment,{children:[f&&s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:"Nickname"}
544),s.jsx("p",{className:"text-sm font-medium mt-0.5",children:f})]}),x&&s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:"Comments"}),s.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap mt-0.5",children:x})]}),v&&s.jsx("div",{children:s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx(ht,{checked:!0,disabled:!0}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"VA Assumable"})]})}),b.length>0&&s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:"Areas That Need Work"}),s.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 mt-2",children:[ma.map(A=>s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx(ht,{checked:b.includes(A),disabled:!0}),s.jsx("span",{className:"text-sm text-muted-foreground",children:A})]},A)),j.map(A=>s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx(ht,{checked:!0,disabled:!0}),s.jsx("span",{className:"text-sm text-muted-foreground",children:A})]},A))]})]}),s.jsxs(U,{onClick:()=>p(!0),size:"sm",variant:"outline",className:"border-icon-accent text-mw-olive hover:bg-icon-background hover:text-icon-foreground font-semibold h-9 px-6",children:[s.jsx(Tf,{className:"h-4 w-4 mr-1.5"})," Edit"]})]})]})}),P&&s.jsx(dt,{children:s.jsxs(vt,{className:"p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(kt,{className:"h-4 w-4 text-mw-sand"}),s.jsx("span",{className:"font-heading font-semibold text-xs uppercase tracking-wide text-mw-sand",children:"Partner's Notes"})]}),o?s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:"General Comments"}),s.jsx("div",{className:"mt-1 rounded-md bg-muted/40 p-3 min-h-[80px]",children:o.notes?s.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:o.notes}):s.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No comments yet."})})]}),o.va_assumable&&s.jsx("div",{children:s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx(ht,{checked:!0,disabled:!0}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"VA Assumable"})]})}),s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:"Areas That Need Work"}),s.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 mt-2",children:[ma.map(A=>{var I;return s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx(ht,{checked:((I=o.areas_needing_work)==null?void 0:I.includes(A))||!1,disabled:!0}),s.jsx("span",{className:"text-sm text-muted-foreground",children:A})]},A)}),(o.areas_needing_work||[]).filter(A=>!ma.includes(A)).map(A=>s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx(ht,{checked:!0,disabled:!0}),s.jsx("span",{className:"text-sm text-muted-foreground",children:A})]},A))]})]})]}):s.jsx("p",{className:"text-muted-foreground italic text-xs",children:"Your partner hasn't saved this home yet."})]})})]})})})}function cn({label:e,value:t}){return t==null||t===""?null:s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:e}),s.jsx("span",{className:"font-medium",children:t})]})}function XS(e,t){if(e==="Pikes Peak MLS")return"The real estate listing information and related content displayed on this site is provided exclusively for consumers' personal, non-commercial use and may not be used for any purpose other than to identify prospective properties consumers may be interested in purchasing. Any offer of compensation is made only to Participants of the PPMLS. This information and related content is deemed reliable but is not guaranteed accurate by the Pikes Peak REALTOR® Services Corp.";if(e==="realMLS (Northeast Florida Multiple Listing Service)"){const r=t??"";return`Disclaimer: All information deemed reliable but not guaranteed. All properties are subject to prior sale, change or withdrawal. Neither listing broker(s) or information provider(s) shall be responsible for any typographical errors, misinformation, misprints and shall be held totally harmless. Listing(s) information is provided for c
544onsumers personal, non-commercial use and may not be used for any purpose other than to identify prospective properties consumers may be interested in purchasing. Information on this site was last updated ${r}. The data relating to real estate for sale on this website comes in part from the Internet Data Exchange program of Northeast Florida Multiple Listing Service (DBA as realMLS) (last updated ${r}). Real estate listings held by other brokerage firms, REALTORS® may be marked with the Internet Data Exchange logo and detailed information about those properties will include the name of the listing broker(s) when required by the MLS. All rights reserved.`}return`Copyright ${e}, All Rights Reserved. The data relating to real estate for sale on this website appears in part through the ${e} Internet Data Exchange program, a voluntary cooperative exchange of property listing data between licensed real estate brokerage firms in which participates, and is provided by ${e} through a licensing agreement. Information Deemed Reliable But Not Guaranteed. The information provided by this website is for the personal, non-commercial use of consumers and may not be used for any purpose other than to identify prospective properties consumers may be interested in purchasing. Some properties which appear for sale on this website may no longer be available because they are under contract, have Closed or are no longer being offered for sale. Some real estate firms do not participate in IDX and their listings do not appear on this website. Some properties listed with participating firms do not appear on this website at the request of the seller.`}function JS({updatedAt:e,mlsName:t="MLS"}){const r=e?jn(new Date(e),"MMMM d, yyyy 'at' hh:mm a"):null,a=XS(t,r);return s.jsxs("div",{className:"pt-5 mt-3 border-t space-y-3",children:[s.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:["MustWants is the technical entity responsible for the display of this from ",t,". For questions or comments about the accuracy of this information, please"," ",s.jsx(oe,{to:"/contact",className:"underline text-mw-olive",children:"contact us for support"}),"."]}),s.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:[a," ",Il," is the technical entity responsible for the display of the"," ",t," data. For questions or comments about the accuracy of this information, please contact us for support at:"," ",s.jsx("a",{href:`mailto:${Fd}`,className:"underline text-mw-olive",children:Fd}),"."]}),r&&s.jsxs("p",{className:"text-xs text-muted-foreground italic",children:["Last updated: ",r]})]})}function aE(e){return e.associationFeeFrequency!=null&&e.associationFeeFrequency!=="Not Applicable"?{has_hoa:!0,fee:e.associationFee??0,frequency:e.associationFeeFrequency,name:"",email:"",phone:"",management:"",webpage:""}:null}function eC(e){return{hasPool:e.mw_hasPool??!1,hasLaundry:e.mw_hasLaundry??!1,hasFencedYard:e.mw_hasFencedYard??!1,hasPatioOrPorch:e.mw_hasPatioOrPorch??!1,isSingleStory:e.mw_isSingleStory??!1,hasGarage:e.garageYN??!1,hasCarport:e.carportYN??!1,hasBasement:e.basementYN??!1,garageSpaces:e.garageSpaces??0,carportSpaces:e.carportSpaces??0,poolFeatures:e.poolFeatures??null,HOAAmenities:e.HOAAmenities??null,homeFeatures:e.homeFeatures??null,accessibilityFeatures:e.accessibilityFeatures??null,interiorFeatures:e.interiorFeatures??null,exteriorFeatures:e.exteriorFeatures??null,patioAndPorchFeatures:e.patioAndPorchFeatures??null,parkingFeatures:e.parkingFeatures??null,laundryFeatures:e.laundryFeatures??null,appliances:e.appliances??[]}}function tC(e){const t=eC(e),r=[],a={hasPool:"Pool",hasLaundry:"Laundry",hasFencedYard:"Fenced Yard",hasPatioOrPorch:"Patio / Porch",isSingleStory:"Single Story",hasGarage:"Garage",hasCarport:"Carport",hasBasement:"Basement"};function n(i){if(typeof i!="boolean"&&!(typeof i=="number"&&i>0)){if(typeof i=="string"&&i.trim()){i.split(",").map(l=>l.trim()).filter(Boolean).forEach(l=>r.push(l));return}if(Array.isArray(i)){i.filter(l=>typeof l=="string"&&!!l.trim()).forEach(l=>r.push(l));return}
544i!==null&&typeof i=="object"&&Object.values(i).forEach(n)}}for(const[i,l]of Object.entries(a))t[i]===!0&&r.push(l);t.garageSpaces>0&&r.push(`${t.garageSpaces} Garage Space${t.garageSpaces>1?"s":""}`),t.carportSpaces>0&&r.push(`${t.carportSpaces} Carport Space${t.carportSpaces>1?"s":""}`);const o=new Set([...Object.keys(a),"garageSpaces","carportSpaces"]);for(const[i,l]of Object.entries(t))o.has(i)||n(l);return[...new Set(r)]}function nE(e){return e?Object.entries(e).filter(([,t])=>t===!0).map(([t])=>t):[]}function fu(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(e)}function sC(e){return new Date(e).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}function rC(e){var t,r;return{id:e.id,listingId:e.listingId,source:"mls",address:e.address,city:e.city??"",state:e.stateOrProvince??"",zip:e.postalCode??"",price:e.price,beds:e.bedrooms,baths:e.bathrooms,sqft:e.sqft,lotSize:e.lotSizeSquareFeet??e.lotSize,yearBuilt:((t=e.homeFeatures)==null?void 0:t.built)??null,stories:e.storiesTotal??e.stories,homeType:e.propertySubType??e.propertyType,garage:e.garageSpaces,bathroomsFull:e.bathroomsFull,bathroomsHalf:e.bathroomsHalf,bathroomsThreeQuarter:e.bathroomsThreeQuarter,bathroomsOneQuarter:e.bathroomsOneQuarter,images:e.images??[],listingFor:e.listingFor,listingType:e.listingType,standardStatus:e.standardStatus,mlsNumber:e.listingId,created_at:e.created_at,updated_at:e.updated_at,remarks:e.remarks,appliances:((r=e.appliances)==null?void 0:r.flatMap(a=>a.split(",")).map(a=>a.trim()).filter(Boolean))??[],interiorFeatures:e.interiorFeatures,exteriorFeatures:e.exteriorFeatures,laundryFeatures:e.laundryFeatures,parkingFeatures:e.parkingFeatures,patioAndPorchFeatures:e.patioAndPorchFeatures,accessibilityFeatures:e.accessibilityFeatures,HOAAmenities:e.HOAAmenities,associationFee:e.associationFee,associationFeeFrequency:e.associationFeeFrequency,contactName:e.listAgentFullName,contactPhone:e.listAgentPreferredPhone,contactEmail:null}}function aC(e){var o,i;const t=e,r=t.hoa,a=t.home_amenities,n=a?Object.entries(a).filter(([,l])=>l).map(([l])=>l).join(", "):null;return{id:e.id,listingId:e.mls_number||e.id,source:"fsbo",address:e.address,city:e.city,state:e.state,zip:e.zip,price:e.price,beds:e.beds,baths:e.baths,sqft:e.sqft,lotSize:e.lot_size?parseFloat(e.lot_size):null,yearBuilt:e.year_built,stories:t.stories??null,homeType:e.home_type,garage:e.garage,bathroomsFull:t.full_baths??null,bathroomsHalf:t.half_baths??null,bathroomsThreeQuarter:t.three_quarter_baths??null,bathroomsOneQuarter:t.quarter_baths??null,images:e.images??[],listingFor:e.listing_for,listingType:e.listing_source,standardStatus:e.listing_status,mlsNumber:e.mls_number,created_at:e.created_at,updated_at:e.updated_at,remarks:e.description,appliances:[],interiorFeatures:n,exteriorFeatures:Array.isArray(e.features)?e.features.join(", "):null,laundryFeatures:(o=e.features)!=null&&o.includes("laundry")?"In Unit":null,parkingFeatures:e.garage?`${e.garage} Garage Space${e.garage>1?"s":""}`:null,patioAndPorchFeatures:(i=e.features)!=null&&i.includes("patio_porch")?"Patio / Porch":null,accessibilityFeatures:null,HOAAmenities:(r==null?void 0:r.name)??null,associationFee:(r==null?void 0:r.fee)??null,associationFeeFrequency:(r==null?void 0:r.frequency)??null,contactName:e.owner?[e.owner.first_name,e.owner.last_name].filter(Boolean).join(" "):t.contact_name||null,contactPhone:e.contact_phone,contactEmail:e.contact_email}}const nC="/assets/deck-prtPD7qU.svg",hu="/assets/dining-room-DOvGl076.svg",pu="/assets/fence-CToA99aD.svg",gu="data:image/svg+xml,%3csvg%20width='21'%20height='22'%20viewBox='0%200%2021%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.8222%201.75537H18.8889C19.2814%201.75537%2019.6%202.07395%2019.6%202.46648V19.5331C19.6%2019.9257%2019.2814%2020.2443%2018.8889%2020.2443H1.8222C1.42966%2020.2443%201.11108%2019.9257%201.11108%2019.5331V2.46648C1.11108%202.07395%201.42966%201.75537%201.8222%201.75537Z'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M19.6%207.44434H1.11108'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M16.7555%203.88867C17.1481%203.88867%2017.4667%204.20725%2017.4667%204.59978C17.4667%204.99232%2017.1481%205.31089%2016.7555%205.31089C16.363%205.31089%2016.0444%204.99232%2016.0444%204.59978C16.0444%204.20725%2016.363%203.88867%2016.7555%203.88867Z'%20fill='%233C3C3C'/%3e%3cpath%20d='M12.4888%203.88867C12.8814
544%203.88867%2013.1999%204.20725%2013.1999%204.59978C13.1999%204.99232%2012.8814%205.31089%2012.4888%205.31089C12.0963%205.31089%2011.7777%204.99232%2011.7777%204.59978C11.7777%204.20725%2012.0963%203.88867%2012.4888%203.88867Z'%20fill='%233C3C3C'/%3e%3cpath%20d='M8.22222%203.88867C8.61475%203.88867%208.93333%204.20725%208.93333%204.59978C8.93333%204.99232%208.61475%205.31089%208.22222%205.31089C7.82969%205.31089%207.51111%204.99232%207.51111%204.59978C7.51111%204.20725%207.82969%203.88867%208.22222%203.88867Z'%20fill='%233C3C3C'/%3e%3cpath%20d='M3.9555%203.88867C4.34803%203.88867%204.66661%204.20725%204.66661%204.59978C4.66661%204.99232%204.34803%205.31089%203.9555%205.31089C3.56296%205.31089%203.24438%204.99232%203.24438%204.59978C3.24438%204.20725%203.56296%203.88867%203.9555%203.88867Z'%20fill='%233C3C3C'/%3e%3cpath%20d='M3.95557%2010.2886H16.7556V17.3997H3.95557V10.2886Z'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M19.6%207.44434H1.11108'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3c/svg%3e",Ko="data:image/svg+xml,%3csvg%20width='23'%20height='22'%20viewBox='0%200%2023%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22.1778%200.408691L22.8135%201.68016L21.0735%202.55056V20.2444C21.0735%2020.9939%2020.4932%2021.6083%2019.7572%2021.6624L19.6512%2021.6666H4.00679C3.25728%2021.6666%202.64288%2021.0864%202.58884%2020.3504L2.58457%2020.2444V11.795L1.48022%2012.3468L0.844482%2011.0754L2.58457%2010.2057V4.59998H4.00679V9.49456L22.1778%200.408691ZM19.6512%203.26167L4.00679%2011.0839V20.2444H8.27346V13.1333C8.27346%2012.3838%208.85373%2011.7694%209.58973%2011.7146L9.69568%2011.7111H13.9623C14.7119%2011.7111%2015.3263%2012.2914%2015.381%2013.0274L15.3846%2013.1333V20.2444H19.6512V3.26167ZM13.9623%2013.1333H9.69568V20.2444H13.9623V13.1333ZM17.5179%207.44442C17.9104%207.44442%2018.229%207.763%2018.229%208.15554C18.229%208.54807%2017.9104%208.86665%2017.5179%208.86665C17.1254%208.86665%2016.8068%208.54807%2016.8068%208.15554C16.8068%207.763%2017.1254%207.44442%2017.5179%207.44442Z'%20fill='%233C3C3C'/%3e%3c/svg%3e",xu="data:image/svg+xml,%3csvg%20width='24'%20height='18'%20viewBox='0%200%2024%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.4667%204.73291H20.8889C21.2815%204.73291%2021.6001%205.05149%2021.6001%205.44402V12.5551C21.6001%2012.9477%2021.2815%2013.2662%2020.8889%2013.2662H19.4667C19.0742%2013.2662%2018.7556%2012.9477%2018.7556%2012.5551V5.44402C18.7556%205.05149%2019.0742%204.73291%2019.4667%204.73291Z'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M16.6222%201.88867H18.0445C18.437%201.88867%2018.7556%202.20725%2018.7556%202.59978V15.3998C18.7556%2015.7923%2018.437%2016.1109%2018.0445%2016.1109H16.6222C16.2297%2016.1109%2015.9111%2015.7923%2015.9111%2015.3998V2.59978C15.9111%202.20725%2016.2297%201.88867%2016.6222%201.88867Z'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M6.66668%201.88867H8.0889C8.48143%201.88867%208.80001%202.20725%208.80001%202.59978V15.3998C8.80001%2015.7923%208.48143%2016.1109%208.0889%2016.1109H6.66668C6.27414%2016.1109%205.95557%2015.7923%205.95557%2015.3998V2.59978C5.95557%202.20725%206.27414%201.88867%206.66668%201.88867Z'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M3.8222%204.73291H5.24442C5.63695%204.73291%205.95553%205.05149%205.95553%205.44402V12.5551C5.95553%2012.9477%205.63695%2013.2662%205.24442%2013.2662H3.8222C3.42966%2013.2662%203.11108%2012.9477%203.11108%2012.5551V5.44402C3.11108%205.05149%203.42966%204.73291%203.8222%204.73291Z'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M21.6%209H23.7333'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M8.80005%209H15.9112'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M0.977783%209H3.11112'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3c/svg%3e",oC="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_14600_17776)'%3e%3cpath%20d='M39.69%2042.5782C39.69%2040.6412%2039.69%2038.6956%2039.69%2036.6966C39.69%2034.6977%2039.69%2032.644%2039.69%2030.4893C39.69%2028.2885%2039.983%2025.5414%2040.1295%2023.118C40.276%2020.6945%2040.2752%2018.5953%2039.69%2017.6893C39.6431%2017.6175%2039.1645%2017.6175%2038.6696%2017.6353C38.1753%2017.6531%2037.6648%2017.6893%2
544037.5567%2017.6893C34.634%2017.6893%2034.144%2016.4776%2032.5789%2015.556C30.9213%2014.5797%2030.3389%2014.1011%2028.3122%2014.1338C24.1302%2014.2013%2022.4562%2017.7612%2019.0678%2017.6893C15.6239%2017.6168%2012.8996%2013.321%209.82333%2013.4227C7.03436%2013.5151%204.40111%2017.673%201.29%2017.6893C-2.39498%2017.7093%20-4.22964%2013.4092%20-7.24333%2014.8449C-6.01524%2024.3624%20-9.02324%2033.1297%20-7.24333%2037.6005C-6.87355%2038.5292%20-4.96138%2039.5958%20-3.68778%2040.4449C-1.89151%2041.6431%20-0.568132%2042.5839%201.29%2042.5782C4.56894%2042.5683%206.66387%2038.2703%2010.5344%2038.3116C13.2921%2038.3407%2016.5938%2042.655%2019.7789%2042.5782C23.5919%2042.4858%2024.8655%2038.18%2029.0233%2038.3116C33.0518%2038.4396%2034.5138%2043.9948%2039.69%2042.5782Z'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M7.68999%207.02246H24.7567C25.1492%207.02246%2025.4678%207.34104%2025.4678%207.73357V24.8002C25.4678%2025.1928%2025.1492%2025.5114%2024.7567%2025.5114H7.68999C7.29746%2025.5114%206.97888%2025.1928%206.97888%2024.8002V7.73357C6.97888%207.34104%207.29746%207.02246%207.68999%207.02246Z'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M16.2233%2010.5781C19.365%2010.5781%2021.9122%2013.1253%2021.9122%2016.267C21.9122%2019.4087%2019.365%2021.9559%2016.2233%2021.9559C13.0816%2021.9559%2010.5344%2019.4087%2010.5344%2016.267C10.5344%2013.1253%2013.0816%2010.5781%2016.2233%2010.5781Z'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M9.82329%209.15576C10.2158%209.15576%2010.5344%209.47434%2010.5344%209.86687C10.5344%2010.2594%2010.2158%2010.578%209.82329%2010.578C9.43076%2010.578%209.11218%2010.2594%209.11218%209.86687C9.11218%209.47434%209.43076%209.15576%209.82329%209.15576Z'%20fill='%233C3C3C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_14600_17776'%3e%3crect%20width='32'%20height='32'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Zo="data:image/svg+xml,%3csvg%20width='23'%20height='21'%20viewBox='0%200%2023%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.688843%2010.9111H22.0222'%20stroke='%233C3C3C'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3cpath%20d='M2.82214%2020.8667V10.9111'%20stroke='%233C3C3C'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.8888%2020.8667V10.9111'%20stroke='%233C3C3C'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3cpath%20d='M2.82214%2010.9111H19.8888V16.6C19.8888%2017.7783%2018.9338%2018.7334%2017.7555%2018.7334H4.95548C3.77717%2018.7334%202.82214%2017.7783%202.82214%2016.6V10.9111Z'%20stroke='%233C3C3C'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3cpath%20d='M17.0444%2010.1998V5.93311'%20stroke='%233C3C3C'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.6222%201.6665H18.4666L19.8888%206.64428H14.2L15.6222%201.6665Z'%20stroke='%233C3C3C'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.95557%207.35547H8.51112V10.911H4.95557V7.35547Z'%20stroke='%233C3C3C'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.22988%207.3751L4.95557%204.51074'%20stroke='%233C3C3C'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3c/svg%3e",bu="data:image/svg+xml,%3csvg%20width='19'%20height='23'%20viewBox='0%200%2019%2023'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.29651%208.45856H15.0444M9.35553%200.688965V2.68079V14.1475M9.35553%201.34745C12.4972%201.34745%2015.0444%203.89465%2015.0444%207.03634V14.1475H9.35553C9.35553%2014.1475%209.35553%203.56968%209.35553%201.34745Z'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M9.41455%208.45856H3.66664M9.35553%200.688965V2.68079V14.1475M9.35553%201.34745C6.21384%201.34745%203.66664%203.89465%203.66664%207.03634V14.1475H9.35553C9.35553%2014.1475%209.35553%203.56968%209.35553%201.34745Z'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M16.4667%2014.1475V21.2586'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M13.6222%2014.1475V21.2586'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M10.7777%2014.1475V21.2586'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M7.93335%2014.1475V21.2586'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M5.08887%2014.1475V21.2586'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M2.24438%2014.1475V21.2586'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M0.111084%2021.2588H18.6'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3cpath%20d='M0.111084%2014.1475H18.6'%20stroke='%233C3C3C'%20stroke-width='2'/%3e%3c/svg%3e",yu="/assets/playroom-B5F_hHHc.svg",Qo="/assets/pool-BitDBs29.svg",vu="/assets/sitting-room-B-NE3Qdg.svg",iC={pool:{svg:Qo,label:"Pool"},swimming:{svg:Qo,label:"Pool"},fireplace:{icon:f2,label:"Fireplace"},smart:{icon:T2,label:"Smart Home"},garage:{icon:Er,label:"Garage"},fence:{svg:pu,label:"Fenced Yard"},fenced:{svg:pu,label:"Fenced Yard"},dog:{icon:md,label:"Pet Friendly"},pet:{icon:md,label:"Pet Friendly"},gym:{svg:xu,label:"Gym"},fitness:{svg:xu,label:"Fitness"},"a/c":{icon:dd,label:"A/C"},"air condition":{icon:dd,label:"A/C"},security:{icon:Ai,label:"Security"},gated:{icon:Ai,label:"Gated"},solar:{icon:R2,label:"Solar"},sprinkler:{icon:fd,label:"Sprinkler"},irrigation:{icon:fd,label:"Irrigation"},garden:{icon:pa,label:"Garden"},shed:{icon:M2,label:"Shed"},"mother-in-law":{svg:Ko,label:"In-Law Suite"},"guest house":{svg:Ko,label:"Guest House"},"in-law":{svg:Ko,label:"In-Law Suite"},basement:{icon:ns,label:"Basement"},office:{svg:Zo,label:"Office"},study:{svg:Zo,label:"Office"},den:{svg:Zo,label:"Office"}
544,"dining room":{svg:hu,label:"Formal Dining"},"formal dining":{svg:hu,label:"Formal Dining"},"sitting room":{svg:vu,label:"Sitting Room"},"living room":{svg:vu,label:"Living Room"},playroom:{svg:yu,label:"Playroom"},"play room":{svg:yu,label:"Playroom"},laundry:{svg:oC,label:"Laundry Room"},hoa:{icon:_l,label:"HOA"},walkable:{icon:hd,label:"Walkable"},"walk score":{icon:hd,label:"Walkable"},school:{icon:Sf,label:"Great Schools"},deck:{svg:nC,label:"Deck"},patio:{svg:bu,label:"Patio"},porch:{svg:bu,label:"Porch"},"gourmet kitchen":{svg:gu,label:"Gourmet Kitchen"},"kitchen island":{svg:gu,label:"Kitchen Island"},"hot tub":{icon:ud,label:"Hot Tub"},spa:{icon:ud,label:"Spa"},"water heater":{icon:g2,label:"Water Heater"},view:{icon:w2,label:"View"},waterfront:{svg:Qo,label:"Waterfront"},wifi:{icon:Mf,label:"WiFi"}};function lC({home:e,fsboListing:t}){const r=e?rC(e):t?aC(t):null;if(!r)return null;let a=[];e?a=tC(e):a=t.features;const n=r.garage,o=new Map;for(const l of a){const c=l.toLowerCase();for(const[u,m]of Object.entries(iC))c.includes(u)&&!o.has(m.label)&&o.set(m.label,m)}n!=null&&n>0&&!o.has("Garage")&&o.set("Garage",{icon:Er,label:`${n}-Car Garage`});const i=Array.from(o.values()).slice(0,8);return i.length===0?null:s.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 pt-3",children:i.map(l=>s.jsxs("div",{className:"flex items-center gap-2",children:[l.svg?s.jsx("img",{src:l.svg,alt:"",className:"w-7 h-7 flex-shrink-0"}):s.jsx(l.icon,{className:"w-6 h-6 text-mw-black flex-shrink-0"}),s.jsx("span",{className:"text-xs text-foreground font-medium",children:l.label})]},l.label))})}const cC="/assets/home-page-map-59H8APzi.png",dC=16.7;function uC(e){if(e>=1e6){const t=e/1e6;return`$${t%1===0?t.toFixed(0):t.toFixed(1)}M`}return e>=1e3?`$${Math.round(e/1e3)}K`:`$${e}`}function mC({latitude:e,longitude:t,price:r}){const a=ct(),n=Et(),o=_S(),i=typeof e=="number"&&typeof t=="number",l=i&&!!o,c=typeof r=="number"?uC(r):"Home",u=l?`https://api.mapbox.com/styles/v1/mapbox/streets-v12/static/${t},${e},${dC},0/1200x675?access_token=${o}`:null,m=()=>{const h=`${n.pathname}${n.search}`,p=new URLSearchParams({returnTo:h});i&&p.set("q",`${e},${t}`);const f=`/resources/maps?${p.toString()}`;ne(()=>import("./HousingCostsMapPage-CCSVys6Q.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])).catch(()=>null).finally(()=>{requestAnimationFrame(()=>{a(f,{state:{returnTo:h}})})})};return s.jsx("div",{className:"rounded-lg shadow-sm border bg-card p-5 space-y-3",children:s.jsx(Jl,{title:"Neighborhood Maps",children:s.jsxs("div",{className:"space-y-3 pt-2",children:[s.jsx("button",{type:"button",className:"relative block aspect-video w-full rounded-md overflow-hidden border border-border transition-opacity hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mw-black focus-visible:ring-offset-2",onClick:m,"aria-label":"Open visual data maps for this home",children:u?s.jsxs(s.Fragment,{children:[s.jsx(Vr,{src:u,alt:"Static neighborhood map preview for this home",className:"w-full h-full object-cover",loading:"lazy"}),s.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:s.jsxs("div",{className:"relative -translate-y-3 drop-shadow-lg",children:[s.jsx("div",{className:"rounded bg-map-tooltip px-3 py-1.5 text-sm font-bold leading-none text-white shadow-md",children:c}),s.jsx("div",{className:"mx-auto h-0 w-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-map-tooltip"})]})})]}):s.jsx(Vr,{src:cC,alt:"Static map preview showing military installations across the United States",className:"w-full h-full object-cover",loading:"lazy"})}),s.jsx(U,{variant:"outline",size:"sm",className:"w-full border-mw-black text-mw-black hover:bg-mw-black hover:text-white text-xs",onClick:m,children:"View Neighborhood Maps"})]})})})}const fC={ReColorado:"https://mustwants-watermark-images.s3.amazonaws.com/recolorado-logo.png","Lee County AOR":"https://mustwants-watermark-images.s3.amazonaws.com/lee-county-logo.png",NTREIS:"https://mustwants-watermark-images.s3.amazonaws.com/ntreis-logo.jpg",CTXMLS:"https://mustwants-watermark-images.s3.amazonaws.com/ctxmls-logo.png","North Carolina Regional MLS":"https://mustwants-watermark-images.s3.amazonaws.com/midcarolina-logo.png","Greater Fairbanks Board of REALTORS":"https://mustwants-watermark-images.s3.amazonaws.com/gfbr-logo.png","Stellar MLS":"https://mustwants-watermark-images.s3.amazonaws.com/stellar-logo.png","Intermountain MLS":"https://mustwants-watermark-images.s3.amazonaws.com/intermountain-logo.png",HiCentral:"https://mustwants-watermark-images.s3.amazonaws.com/hicentral-logo.png","Bright MLS":"https://mustwants-watermark-images.s3.amazonaws.com/bright-logo.png","realMLS (Northeast Florida Multiple Listing Service)":"https://mustwants-watermark-images.s3.amazonaws.com/nefar-logo.png","East Alabama Board of Realtors":"https://mustwants-watermark-images.s3.amazonaws.com/east-alabama-logo.png",MLSListings:"https://mustwants-watermark-images.s3.amazonaws.com/mlslistings-logo.png",CRMLS:"https://mustwants-watermark-images.s3.amazonaws.com/crmls-logo.png","Pikes Peak MLS":"https://mustwants-watermark-images.s3.amazonaws.com/ppmls-logo.png","Wichita Falls AOR":"https://mustwants-watermark-images.s3.amazonaws.com/wichita-falls-logo.png","Greater Las Vegas Assoc of Realtors":"https://mustwants-watermark-images.s3.amazonaws.com/glvar-logo.png","Longleaf Pine Realtors":"https://mustwants-watermark-images.s3.amazonaws.com/longleaf-logo.jpeg","St Augustine St Johns (SASJCMLS)":"https://mustwants-watermark-images.s3.amazonaws.com/sasjcmls-logo.png","GEPAR (Greater El Paso Assoc of Realtors)":"https://mustwants-watermark-images.s3.amazonaws.com/gepar-logo.png","Columbus Georgia MLS":"https://mustwants-watermark-images.s3.amazonaws.com/cbor-logo.png",ACTRIS:"https://mustwants-watermark-images.s3.amazonaws.com/actris-logo.png",SABOR:"https://mustwants-watermark-images.s3.amazonaws.com/sabor-logo.png","Charleston Trident (CHSMLS)":"https://mustwants-watermark-images.s3.amazonaws.com/chsmls-logo.png",UtahRealEstate:"https://mustwants-watermark-images.s3.amazonaws.com/utah-re-logo.png","Consolidated MLS":"https://mustwants-watermark-images.s3.amazonaws.com/cmls-logo.png","Lowcountry Regional MLS":"https://mustwants-watermark-images.s3.amazonaws.com/lowcountry-logo.png","First MLS":"https://mustwants-watermark-images.s3.amazonaws.com/firstmls-logo.png","Great Plains Regional MLS":"https://mustwants-watermark-images.s3.amazonaws.com/gprmls-logo.png",NWMLS:"https://mustwants-watermark-images.s3.amazonaws.com/nwmls-logo.png",SCKMLS:"https://mustwants-watermark-images.s3.amazonaws.com/sckmls-logo.png","GLAR (Greater Louisville Assoc of Realtors)":"https://mustwants-watermark-images.s3.amazonaws.com/glar-logo.png",SmartMLS:"https://mustwants-watermark-images.s3.amazonaws.com/smartmls-logo.png",ARMLS:"https://mustwants-watermark-images.s3.amazonaws.com/armls-logo.png"},Fp="https://mustwants-watermark-images.s3.amazonaws.com/mustwants-logo.png";function hC(e){return fC[e]??Fp}function pC(){return Fp}const gC=["agent","broker","lender","home_inspector","attorney","insurance_agent","title_insurance_agent","property_manager"],wu={agent:"Real Estate Agent",broker:"Broker",lender:"Lender",home_inspector:"Home Inspector",attorney:"Attorney",insurance_agent:"Insurance Agent",title_insurance_agent:"Title Insurance Agent",property_manager:"Property Manager"};function Wi(e){return e===!1||typeof e=="string"&&e.trim().toLowerCase()==="false"}function xC({id:e,listingId:t,mlsName:r,isOpen:a,onClose:n,isFavorite:o,onToggleFavorite:i,userRank:l,partnerRank:c,onUserRankChange:u,searchType:m,searchInput:h,hideFavoriteActions:p,currentIndex:f,totalHomes:y,onPreviousHome:x,onNextHome:_}
544){const[b,E]=d.useState(!1),[v,w]=d.useState(!1),N=d.useRef(null),C=d.useRef(null),[j,k]=d.useState(null),{connections:S}=Wl(),[T,M]=d.useState({propertyDetails:!0,interiorFeatures:!0,exteriorLot:!0,utilitiesGreen:!0,structureParking:!0,hoaCommunity:!0,taxesFinancials:!0,schools:!0,agentOffice:!0,agentOnly:!0}),P=K=>{M(G=>({...G,[K]:!G[K]}))},{data:A,isLoading:I,error:z}=et({queryKey:["listing-detail",e,t,r],queryFn:async()=>{if(!e&&!t)return null;const{data:K,error:G}=await R.functions.invoke("search-home-by-id",{body:{id:e,listing_id:t,mls_name:r}});if(G)throw new Error(G.message||"Failed to fetch listing details");return K},enabled:a&&(!!e||!!t),staleTime:5*60*1e3}),L=A,me=K=>{if(K==null||K==="")return"";if(Array.isArray(K))return K.join(", ");if(typeof K=="string"){if(K.startsWith("[")&&K.endsWith("]"))try{const G=JSON.parse(K);if(Array.isArray(G))return G.join(", ")}catch{}return K.replace(/,([^\s])/g,", $1")}return String(K)},$=(K,G)=>{if(!L)return null;const Ce=L[K];if(Ce!=null&&Ce!=="")return Ce;if(G){const $e=L[G];if($e!=null&&$e!=="")return $e}return null},g=(K,G)=>{const Ce=$(K,G);return me(Ce)};d.useEffect(()=>{{k(null);return}},[null]);const de=d.useCallback(K=>{if(C.current&&(C.current.disconnect(),C.current=null),N.current=K,!K||b)return;const G=()=>{w(K.scrollHeight>K.clientHeight+1)};requestAnimationFrame(G);const Ce=new ResizeObserver(G);Ce.observe(K),C.current=Ce},[b]);d.useEffect(()=>{w(!1),E(!1)},[L]);const re=(()=>{const K=typeof window<"u"?localStorage.getItem("mw_user_type"):null;return K==="agent"||K==="professional"})(),D=d.useRef(null);if(d.useEffect(()=>{if(!a){D.current=null;return}if(!L)return;const K=L.id,G="listing_source"in L?L.listing_source:void 0,Ce=G==="fsbo"||G==="frbo"?G:"mls";D.current!==K&&(D.current=K,BS(K,Ce))},[L,a]),!a)return null;if(I)return s.jsxs(_t,{open:a,onOpenChange:n,children:[s.jsx(ut,{className:"sr-only",children:"Loading Home"}),s.jsx(gt,{className:"max-w-6xl p-10 flex items-center justify-center min-h-[400px]",children:s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsx(qt,{className:"w-10 h-10 animate-spin text-mw-olive"}),s.jsx("p",{className:"text-mw-olive font-medium",children:"Loading property details..."})]})})]});if(z||!L&&!I)return s.jsxs(_t,{open:a,onOpenChange:n,children:[s.jsx(ut,{className:"sr-only",children:"Fetch Home Error"}),s.jsxs(gt,{className:"max-w-md p-10 flex flex-col items-center gap-4",children:[s.jsx("h2",{className:"text-xl font-heading font-bold text-mw-red",children:"Error"}),s.jsx("p",{className:"text-center text-muted-foreground",children:z instanceof Error?z.message:"We couldn't find the listing you're looking for."}),s.jsx(U,{onClick:n,variant:"outline",className:"border-mw-olive text-icon-accent",children:"Close"})]})]});const H=L.id,Z=null,ee=L.listing_date||L.created_at,ae=L.lastModification||L.updated_at,Y=L.remarks??L.description,te=L.listing_source==="fsbo"||L.listing_source==="frbo"||L.source==="fsbo"||L.mls_name==="fsbo"||L.mls_name==="frbo"||L.listingType==="fsbo"||L.listingType==="frbo"||!L.listingId?"fsbo":"mls";L.contact_phone||L.listOfficePhone,L.contact_email||L.listOfficePhone,L.preferred_contact||L.listAgentPreferredPhone;const Se=L.sqft,Le=typeof f=="number"&&f>0,fe=typeof f=="number"&&typeof y=="number"&&f<y-1,Pe=ee?Math.max(0,Math.floor((Date.now()-new Date(ee).getTime())/864e5)):null,le=!Wi(L.InternetListingDisplayPricesYN),Oe=(K=>{if(!K)return null;const G=K.toLowerCase();return G.includes("active")||G==="active"?{label:"Active",className:"bg-green-100 text-green-800"}:G.includes("pending")||G==="pending"?{label:"Pending",className:"bg-yellow-100 text-yellow-800"}:G.includes("closed")||G.includes("sold")?{label:"Closed",className:"bg-red-100 text-red-800"}:{label:K,className:"bg-gray-100 text-gray-800"}})($("StandardStatus","standardStatus")),tt=async()=>{if(!H)return;const K=new URLSearchParams;K.set("home",H),m&&(K.set("searchType",m),m==="base"&&h?K.set("base",h):h&&K.set("q",h));const G=`${Q}/find-home?${K.toString()}`;try{navigator.share?await navigator.share({url:G}):(await navigator.clipboard.writeText(G),it({title:"Link copied!",description:"Share link has been copied to your clipboard."}))}catch{try{await navigator.clipboard.writeText(G),it({title:"Link copied!"})}catch(Ce){console.warn("[HomeDetailModal] Failed to copy share link",Ce)}}};return s.jsx(_t,{open:a,onOpenChange:n,children:s.jsxs(gt,{className:"max-w-6xl p-0 gap-0 [&>button.absolute]:hidden flex flex-col overflow-hidden rounded-none sm:rounded-lg h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[92vh]",children:[s.jsx(ut,{className:"sr-only",children:"Home Details"}),s.jsx(St,{className:"sr-only",children:L?`Details for ${zi(L.address)}`:"Loading home details..."}),s.jsxs("div",{className:"bg-white text-mw-black px-3 sm:px-4 md:px-6 py-2 sm:py-3 flex items-center justify-between gap-2 sm:gap-4 border-b-4 border-mw-olive shrink-0",children:[s.jsx("div",{className:"flex items-center gap-3 min-w-0 overflow-x-auto",children:L&&s.jsxs(Rl,{delayDuration:200,children:[s.jsxs(Pi,{children:[s.jsx(Ii,{asChild:!0,children:s.jsx("img",{src:te==="fsbo"?pC():hC(""),alt:te==="fsbo"?"MustWants":L.mls_name||"MLS",className:"h-7 w-auto flex-shrink-0"})}),s.jsx(Tn,{side:"bottom",className:"text-xs",children:te==="fsbo"?"Listed on MustWants":L.mls_name||"MLS"})]}),Oe&&s.jsxs("span",{className:F("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",Oe.className),children:["â ",Oe.label]}),Pe!==null&&s.jsxs("span",{className:"text-xs text-muted-foreground bg-muted px-2.5 py-0.5 rounded-full",children:[Pe," day",Pe!==1?"s":""," on MustWants"]}),gC.map(K=>{var Ce;const G=S.find($e=>$e.pro_role===K);return(Ce=G==null?void 0:G.professional)!=null&&Ce.companyLogoUrl?s.jsxs(Pi,{children:[s.jsx(Ii,{asChild:!0,children:s.jsx("img",{src:G.professional.companyLogoUrl,alt:G.professional.company||wu[K],className:"h-7 w-auto max-w-[100px] flex-shrink-0 object-contain"})}),s.jsx(Tn,{side:"bottom",className:"text-xs",children:G.professional.company||wu[K]})]},K):null})]})}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[L&&!p&&s.jsxs(U,{variant:"secondary",size:"sm",className:F("h-8 px-3 text-xs border border-mw-dark-gray",o?"bg-mw-red text-white border-mw-red hover:bg-mw-dark-gray hover:text-white hover:border-mw-dark-gray":"bg-background hover:bg-mw-dark-gray hover:text-white hover:border-mw-dark-gray"),onClick:()=>i(H),children:[s.jsx(Gs,{className:`w-4 h-4 mr-1.5 ${o?"fill-current text-current":""}`}),o?"Favorited":"Add to Favorites"]}),L&&s.jsxs(U,{variant:"secondary",size:"sm",className:"h-8 px-3 text-xs border border-mw-dark-gray bg-background hover:bg-mw-dark-gray hover:text-white hover:border-mw-dark-gray",onClick:tt,children:[s.jsx(A2,{className:"w-4 h-4 mr-1.5"})," Share"]}),s.jsx(U,{variant:"secondary",size:"sm",className:"h-8 w-8 p-0",onClick:n,children:s.jsx(Mt,{className:"w-4 h-4"})})]})]}),s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:I&&!L?s.jsxs("div",{className:"p-8 space-y-6",children:[s.jsx(ue,{className:"h-[400px] w-full rounded-xl"}
544),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-6",children:[s.jsxs("div",{className:"lg:col-span-3 space-y-4",children:[s.jsx(ue,{className:"h-32 w-full"}),s.jsx(ue,{className:"h-64 w-full"})]}),s.jsxs("div",{className:"lg:col-span-2 space-y-4",children:[s.jsx(ue,{className:"h-48 w-full"}),s.jsx(ue,{className:"h-48 w-full"})]})]})]}):L?s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-0",children:[s.jsxs("div",{className:"lg:col-span-3 px-4 md:px-6 py-4 space-y-4 flex flex-col",children:[s.jsx("div",{className:"lg:hidden order-first",children:s.jsx(_u,{home:L,matchScore:Z,sqft:Se})}),s.jsx(WS,{images:L.images,address:L.address,matchScore:Z,userRank:l,partnerRank:c,onUserRankChange:u,latitude:L.latitude,longitude:L.longitude}),Y&&s.jsxs(Jl,{title:"Description",defaultOpen:!0,children:[s.jsx("p",{ref:de,className:`text-sm text-muted-foreground leading-relaxed whitespace-pre-line ${b?"":"line-clamp-4"}`,children:Y}),(v||b)&&s.jsx(U,{variant:"link",size:"sm",className:"text-mw-olive hover:text-mw-black px-0 h-auto py-1 text-xs",onClick:()=>E(!b),children:b?s.jsxs(s.Fragment,{children:["Read Less ",s.jsx(jl,{className:"w-3 h-3 ml-0.5"})]}):s.jsxs(s.Fragment,{children:["Read More ",s.jsx(Zs,{className:"w-3 h-3 ml-0.5"})]})})]}),!p&&s.jsx(QS,{homeId:H,isFavorite:o,onToggleFavorite:i,userRank:l,partnerRank:c}),s.jsx(ls,{title:"Property Details",icon:s.jsx(ns,{className:"w-4 h-4"}),isOpen:T.propertyDetails,onToggle:()=>P("propertyDetails"),className:"border-l-2 border-mw-olive/30 pl-2",children:s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:[s.jsx(O,{label:"Type",value:g("PropertySubType","propertySubType")||"Residential"}),s.jsx(O,{label:"Sqft",value:g("LivingArea","sqft")}),(()=>{const K=g("LotSizeSquareFeet","lotSize");if(!K)return null;const G=g("LotSizeSource");return s.jsx(O,{label:"Lot Size (sqft)",value:G?`${K} (${G})`:K})})(),s.jsx(O,{label:"Bedrooms",value:g("BedroomsTotal","bedrooms")}),s.jsx(O,{label:"Full Baths",value:g("BathroomsFull","bathroomsFull")}),s.jsx(O,{label:"Half Baths",value:g("BathroomsHalf","bathroomsHalf")}),s.jsx(O,{label:"Stories",value:g("Stories","stories")}),s.jsx(O,{label:"Year Built",value:g("YearBuilt")}),s.jsx(O,{label:"Year Updated",value:g("YearBuiltEffective")}),s.jsx(O,{label:"Nickname",value:g("Nickname","nickname")}),s.jsx(O,{label:"Sqft Source",value:g("SqftSource")}),s.jsx(O,{label:"Lease Terms",value:g("LeaseTerm","leaseTerm")})]})}),re&&s.jsxs(ls,{title:"Agent-Only",icon:s.jsx(It,{className:"w-4 h-4"}),isOpen:T.agentOnly,onToggle:()=>P("agentOnly"),badge:s.jsx("span",{className:"text-xs font-bold text-white bg-mw-red px-1.5 py-0.5 rounded ml-2",children:"Agent Only"}),className:"border-mw-red/30 bg-red-50/30 border-l-2 border-l-mw-red/40",children:[s.jsxs("div",{className:"mb-4",children:[s.jsx(Xo,{children:"Private Remarks"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:g("PrivateRemarks")||"No private remarks available"})]}),s.jsx(Bt,{title:"Commission & Terms",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"Buyer's Agent Commission",value:g("BuyerBrokerageCompensation")}),s.jsx(O,{label:"Dual Variable Commission",value:$("DualOrVariableRateCommissionYN")?"Yes":"No"}),s.jsx(O,{label:"Listing Terms",value:g("ListingTerms")}),s.jsx(O,{label:"Current Financing",value:g("CurrentFinancing")})]})}),s.jsx(Bt,{title:"Inclusions & Concessions",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"Inclusions",value:g("Inclusions")}),s.jsx(O,{label:"Exclusions",value:g("Exclusions")}),s.jsx(O,{label:"Concessions",value:g("Concessions")}),s.jsx(O,{label:"Concessions Amount",value:g("ConcessionsAmount")})]})}),s.jsx(Bt,{title:"Disclosures & Documents",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"Disclosures",value:g("Disclosures")}),s.jsx(O,{label:"Documents Available",value:g("DocumentsAvailable")}),s.jsx(O,{label:"MLS Status",value:g("MlsStatus","mlsStatus")})]})}),s.jsx(Bt,{title:"Owner & Showing",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"Owner Name",value:g("OwnerName")}),s.jsx(O,{label:"Owner Phone",value:g("OwnerPhone")}),s.jsx(O,{label:"Occupant",value:g("OccupantType")}),s.jsx(O,{label:"Occupant Name",value:g("OccupantName")}
544),s.jsx(O,{label:"Occupant Phone",value:g("OccupantPhone")}),s.jsx(O,{label:"Lock Box Type",value:g("LockBoxType")}),s.jsx(O,{label:"Lock Box Location",value:g("LockBoxLocation")}),s.jsx(O,{label:"Showing Contact",value:g("ShowingContactName")}),s.jsx(O,{label:"Showing Contact Phone",value:g("ShowingContactPhone")}),s.jsx(O,{label:"Showing Considerations",value:g("ShowingConsiderations")}),s.jsx(O,{label:"Showing Instructions",value:g("ShowingInstructions")}),s.jsx(O,{label:"Showing Requirements",value:g("ShowingRequirements")})]})})]}),s.jsx(ls,{title:"Interior Features",icon:s.jsx(sr,{className:"w-4 h-4"}),isOpen:T.interiorFeatures,onToggle:()=>P("interiorFeatures"),className:"border-l-2 border-mw-olive/30 pl-2",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"Accessibility Features",value:g("AccessibilityFeatures","accessibilityFeatures")}),s.jsx(O,{label:"Appliances",value:g("Appliances")}),s.jsx(O,{label:"Basement",value:g("Basement")}),s.jsx(O,{label:"Cooling",value:g("Cooling")}),s.jsx(O,{label:"Door Features",value:g("DoorFeatures")}),s.jsx(O,{label:"Fireplace Features",value:g("FireplaceFeatures")}),s.jsx(O,{label:"Flooring",value:g("Flooring")}),s.jsx(O,{label:"Heating",value:g("Heating")}),s.jsx(O,{label:"Home Amenities",value:g("HomeAmenities")}),s.jsx(O,{label:"Interior Features",value:g("InteriorFeatures","interiorFeatures")}),s.jsx(O,{label:"Laundry Features",value:g("LaundryFeatures","laundryFeatures")}),s.jsx(O,{label:"Levels",value:g("Levels","levels")}),s.jsx(O,{label:"Rooms",value:g("RoomType","roomType")}),s.jsx(O,{label:"Security Features",value:g("SecurityFeatures")}),s.jsx(O,{label:"Window Features",value:g("WindowFeatures")})]})}),s.jsx(ls,{title:"Exterior & Lot",icon:s.jsx(pa,{className:"w-4 h-4"}),isOpen:T.exteriorLot,onToggle:()=>P("exteriorLot"),className:"border-l-2 border-mw-olive/30 pl-2",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"Exterior Features",value:g("ExteriorFeatures","exteriorFeatures")}),s.jsx(O,{label:"Fencing",value:g("Fencing")}),s.jsx(O,{label:"Horse Amenities",value:g("HorseAmenities")}),s.jsx(O,{label:"Lot Features",value:g("LotFeatures")}),s.jsx(O,{label:"Patio / Porch",value:g("PatioAndPorchFeatures","patioAndPorchFeatures")}),s.jsx(O,{label:"Pool Features",value:g("PoolFeatures","poolFeatures")}),s.jsx(O,{label:"Spa Features",value:g("SpaFeatures")}),s.jsx(O,{label:"View",value:g("View")}),s.jsx(O,{label:"Waterfront Features",value:g("WaterfrontFeatures")})]})}),s.jsx(ls,{title:"Utilities & Green Energy",icon:s.jsx(Mo,{className:"w-4 h-4"}),isOpen:T.utilitiesGreen,onToggle:()=>P("utilitiesGreen"),badge:s.jsx("span",{className:"text-xs font-bold text-mw-black bg-mw-olive px-1.5 py-0.5 rounded ml-2",children:"New"}),className:"border-l-2 border-mw-olive/30 pl-2",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"Utilities",value:g("Utilities")}),s.jsx(O,{label:"Monthly Utilities",value:g("MonthlyUtilities")}),s.jsx(O,{label:"Preferred Contact",value:g("PreferredContact")}),s.jsx(O,{label:"Electric",value:g("Electric")}),s.jsx(O,{label:"Gas",value:g("Gas")}),s.jsx(O,{label:"Water Source",value:g("WaterSource")}),s.jsx(O,{label:"Sewer",value:g("Sewer")}),s.jsx(O,{label:"Heating",value:g("Heating")}),s.jsx(O,{label:"Cooling",value:g("Cooling")}),s.jsx(O,{label:"Energy Efficient Features",value:g("GreenEnergyEfficient")}),s.jsx(O,{label:"Green Energy Generation",value:g("GreenEnergyGeneration")}),s.jsx(O,{label:"Water Conservation",value:g("GreenWaterConservation")}),s.jsx(O,{label:"Power Production",value:g("PowerProductionType")}),s.jsx(O,{label:"Green Verification",value:g("GreenVerification")})]})}),s.jsxs(ls,{title:"Structure & Parking",icon:s.jsx(Er,{className:"w-4 h-4"}),isOpen:T.structureParking,onToggle:()=>P("structureParking"),badge:s.jsx("span",{className:"text-xs font-bold text-mw-black bg-mw-olive px-1.5 py-0.5 rounded ml-2",children:"New"}),className:"border-l-2 border-mw-olive/30 pl-2",children:[s.jsx(Bt,{title:"Structure",children:s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(O,{label:"Architectural Style",value:g("ArchitecturalStyle")}),s.jsx(O,{label:"Construction",value:g("ConstructionMaterials")}
544),s.jsx(O,{label:"Foundation",value:g("FoundationDetails")}),s.jsx(O,{label:"Other Structures",value:g("OtherStructures")}),s.jsx(O,{label:"Roof",value:g("Roof")})]})}),s.jsx(Bt,{title:"Parking",children:s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(O,{label:"Carport Spaces",value:g("CarportSpaces","carportSpaces")}),s.jsx(O,{label:"Garage Spaces",value:g("GarageSpaces","garageSpaces")}),s.jsx(O,{label:"Garage Door Opener",value:g("GarageDoorOpener")}),s.jsx(O,{label:"Parking Features",value:g("ParkingFeatures","parkingFeatures")}),s.jsx(O,{label:"Total Parking Spaces",value:g("ParkingTotal")})]})})]}),s.jsxs(ls,{title:"HOA & Community",icon:s.jsx(kt,{className:"w-4 h-4"}),isOpen:T.hoaCommunity,onToggle:()=>P("hoaCommunity"),badge:s.jsx("span",{className:"text-xs font-bold text-mw-black bg-mw-olive px-1.5 py-0.5 rounded ml-2",children:"New"}),className:"border-l-2 border-mw-olive/30 pl-2",children:[s.jsx(Bt,{title:"HOA",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"HOA Amenities",value:g("AssociationAmenities","HOAAmenities")}),s.jsx(O,{label:"HOA Fee",value:g("AssociationFee","associationFee")}),s.jsx(O,{label:"HOA Fee Includes",value:g("AssociationFeeIncludes")}),s.jsx(O,{label:"HOA Name",value:g("AssociationName")}),s.jsx(O,{label:"HOA Phone",value:g("AssociationPhone")}),s.jsx(O,{label:"Pets Allowed",value:g("PetsAllowed")})]})}),s.jsx(Bt,{title:"Community",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"Community Features",value:g("CommunityFeatures")}),s.jsx(O,{label:"Owner Pays",value:g("OwnerPays")}),s.jsx(O,{label:"Rent Includes",value:g("RentIncludes")}),s.jsx(O,{label:"Tenant Pays",value:g("TenantPays")})]})}),(L.listingFor==="rent"||L.listing_for==="rent")&&s.jsx(Bt,{title:"Rental Details",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"Lease Terms",value:g("LeaseTerm","leaseTerm")}),s.jsx(O,{label:"Security Deposit",value:g("SecurityDeposit")}),s.jsx(O,{label:"Pets Allowed",value:g("PetsAllowed")}),s.jsx(O,{label:"Pet Types",value:g("PetTypes")}),s.jsx(O,{label:"Pet Deposit",value:g("PetDeposit")}),s.jsx(O,{label:"Pet Rent",value:g("PetRent")}),s.jsx(O,{label:"Breed Restrictions",value:g("BreedRestrictions")}),s.jsx(O,{label:"Rent Includes",value:g("RentIncludes")}),s.jsx(O,{label:"Tenant Pays",value:g("TenantPays")}),s.jsx(O,{label:"Rental Discounts",value:g("RentalDiscounts")})]})})]}),s.jsx(ls,{title:"Taxes & Financials",icon:s.jsx(u2,{className:"w-4 h-4"}),isOpen:T.taxesFinancials,onToggle:()=>P("taxesFinancials"),badge:s.jsx("span",{className:"text-xs font-bold text-mw-black bg-mw-olive px-1.5 py-0.5 rounded ml-2",children:"New"}),className:"border-l-2 border-mw-olive/30 pl-2",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"Cap Rate",value:g("CapRate")}),s.jsx(O,{label:"Financial Data Source",value:g("FinancialDataSource")}),s.jsx(O,{label:"Parcel Number",value:g("ParcelNumber")}),s.jsx(O,{label:"Tax Annual Amount",value:g("TaxAnnualAmount")}),s.jsx(O,{label:"Vacancy Allowance",value:g("VacancyAllowance")}),s.jsx(O,{label:"Vacancy Rate",value:g("VacancyAllowanceRate")}),s.jsx(O,{label:"Zoning",value:g("Zoning")})]})}),s.jsx(ls,{title:"Schools",icon:s.jsx(Sf,{className:"w-4 h-4"}),isOpen:T.schools,onToggle:()=>P("schools"),badge:s.jsx("span",{className:"text-xs font-bold text-mw-black bg-mw-olive px-1.5 py-0.5 rounded ml-2",children:"New"}),className:"border-l-2 border-mw-olive/30 pl-2",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"Elementary School",value:g("ElementarySchool")}),s.jsx(O,{label:"Elementary School District",value:g("ElementarySchoolDistrict")}),s.jsx(O,{label:"Middle School",value:g("MiddleOrJuniorSchool")}),s.jsx(O,{label:"Middle School District",value:g("MiddleOrJuniorSchoolDistrict")}),s.jsx(O,{label:"High School",value:g("HighSchool")}),s.jsx(O,{label:"High School District",value:g("HighSchoolDistrict")})]})}),s.jsxs(ls,{title:"Agent & Office Info",icon:s.jsx(pr,{className:"w-4 h-4"}),isOpen:T.agentOffice,onToggle:()=>P("agentOffice"),badge:s.jsx("span",{className:"text-xs font-bold text-mw-black bg-mw-olive px-1.5 py-0.5 rounded ml-2",children:"New"}),className:"border-l-2 border-mw-olive/30 pl-2",children:[s.jsx(Bt,{title:"Listing Agent",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"List Agent",value:g("ListAgentFullName","listAgentFullName")}
544),s.jsx(O,{label:"Agent Phone",value:g("ListAgentPreferredPhone","listAgentPreferredPhone")}),s.jsx(O,{label:"Agent Email",value:g("ListAgentEmail")}),s.jsx(O,{label:"Agent License #",value:g("ListAgentStateLicense","listAgentStateLicense")}),s.jsx(O,{label:"Listing Office",value:g("ListOfficeName","listOfficeName")}),s.jsx(O,{label:"Office Phone",value:g("ListOfficePhone","listOfficePhone")}),s.jsx(O,{label:"Listing Team",value:g("ListTeamName")})]})}),s.jsx(Bt,{title:"Co-Listing Agent",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"Co-Listing Agent",value:g("CoListAgentFullName")}),s.jsx(O,{label:"Co-Listing License #",value:g("CoListAgentStateLicense")}),s.jsx(O,{label:"Co-Listing Office",value:g("CoListOfficeName")})]})}),s.jsx(Bt,{title:"Buyer's Agent",children:s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(O,{label:"Buyer's Agent",value:g("BuyerAgentFullName")}),s.jsx(O,{label:"Buyer's Agent License #",value:g("BuyerAgentStateLicense")}),s.jsx(O,{label:"Buyer's Office",value:g("BuyerOfficeName")}),s.jsx(O,{label:"Buyer's Team",value:g("BuyerTeamName")}),s.jsx(O,{label:"Co-Buyer's Agent",value:g("CoBuyerAgentFullName")}),s.jsx(O,{label:"Co-Buyer's Agent License #",value:g("CoBuyerAgentStateLicense")}),s.jsx(O,{label:"Co-Buyer's Office",value:g("CoBuyerOfficeName")})]})})]}),te!=="fsbo"&&s.jsx("div",{className:"order-last",children:s.jsx(JS,{updatedAt:ae??void 0,mlsName:L.mls_name||"MLS"})})]}),s.jsxs("div",{className:"lg:col-span-2 border-t lg:border-t-0 lg:border-l px-4 md:px-6 py-4 space-y-4",children:[s.jsx("div",{className:"hidden lg:block",children:s.jsx(_u,{home:L,matchScore:Z,sqft:Se})}),s.jsxs("div",{className:"rounded-lg shadow-sm border bg-card p-5 space-y-3",children:[s.jsxs("div",{children:[s.jsx(Xo,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:te==="fsbo"?L.listingFor==="rent"||L.listing_for==="rent"?"Landlord / Owner Contact":"Seller / Owner Contact":"Listing Agent"}),s.jsx("p",{className:"font-medium",children:te==="fsbo"?L.contact_name||(j==null?void 0:j.first_name)||g("ListAgentFullName","listAgentFullName")||"Property Owner":g("ListAgentFullName","listAgentFullName")||"N/A"}),te!=="fsbo"&&$("ListAgentStateLicense","listAgentStateLicense")&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["License #",g("ListAgentStateLicense","listAgentStateLicense")]})]}),s.jsx("div",{children:s.jsx("p",{className:"text-lg font-bold text-mw-olive",children:te==="fsbo"&&L.contact_phone?Ir(L.contact_phone):$("ListAgentPreferredPhone","listAgentPreferredPhone")?Ir($("ListAgentPreferredPhone","listAgentPreferredPhone")):"N/A"})}),s.jsxs("div",{children:[s.jsx(Xo,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:te==="fsbo"?"Listing Type":"Listing Office"}),s.jsx("p",{className:"font-medium",children:te==="fsbo"?L.listingFor==="rent"||L.listing_for==="rent"?"For Rent By Owner (FRBO)":"For Sale By Owner (FSBO)":g("ListOfficeName","listOfficeName")||"N/A"})]}),(()=>{const K=(te==="fsbo"?L.contact_phone:null)||$("ListAgentPreferredPhone","listAgentPreferredPhone"),G=(te==="fsbo"?L.contact_email:null)||$("ListAgentEmail");return!K&&!G?null:s.jsxs("div",{className:"pt-2 space-y-2",children:[G&&s.jsxs(U,{variant:"default",className:"w-full bg-mw-olive text-mw-black hover:bg-icon-accent font-semibold",size:"sm",onClick:()=>window.location.href=`mailto:${G}`,children:[s.jsx(ao,{className:"w-4 h-4 mr-2"})," Send Email"]}),K&&s.jsxs(U,{variant:"outline",className:"w-full border-mw-dark-gray",size:"sm",onClick:()=>window.location.href=`tel:${K}`,children:[s.jsx(Rf,{className:"w-4 h-4 mr-2"})," ",te==="fsbo"?"Call Owner":"Call Agent"]})]})})()]}),s.jsxs("div",{className:"rounded-lg shadow-sm border bg-card p-5 space-y-3",children:[s.jsx("h3",{className:"font-heading font-semibold text-sm text-mw-olive uppercase tracking-wider",children:"Listing Details"}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(cn,{label:te==="fsbo"?"Listing #":"MLS #",value:g("ListingId","listingId")||L.mls_number||L.id}),ee&&s.jsx(cn,{label:"Listed On",value:sC(ee)}),!Wi(L.InternetListingDisplayDaysOnSiteYN)&&L.daysOnMarket!=null&&s.jsx(cn,{label:"Days on Market",value:String(L.daysOnMarket)}),s.jsx(cn,{label:"Source",value:te==="fsbo"?"Owner Listed (MustWants)":L.mls_name||g("OriginatingSystemName","originatingSystemName")||"N
544/A"})]})]}),s.jsxs("div",{className:"rounded-lg shadow-sm border bg-card p-5 space-y-3",children:[s.jsx("h3",{className:"font-heading font-semibold text-sm text-mw-olive uppercase tracking-wider",children:"Property Summary"}),s.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[$("PrimaryBRFirstLevel")&&s.jsx(Ge,{icon:s.jsx(ns,{className:"w-3 h-3"}),label:"1st Floor Primary"}),$("GarageYN","garageYN")&&s.jsx(Ge,{icon:s.jsx(Er,{className:"w-3 h-3"}),label:"Attached Garage"}),$("BasementYN","basementYN")&&s.jsx(Ge,{icon:s.jsx(sr,{className:"w-3 h-3"}),label:"Basement"}),$("CarportYN","carportYN")&&s.jsx(Ge,{icon:s.jsx(Er,{className:"w-3 h-3"}),label:"Carport"}),$("CoolingYN")&&s.jsx(Ge,{icon:s.jsx(pd,{className:"w-3 h-3"}),label:"Cooling"}),$("mw_hasFencedYard")&&s.jsx(Ge,{icon:s.jsx(pa,{className:"w-3 h-3"}),label:"Fenced Yard"}),$("FireplaceYN")&&s.jsx(Ge,{icon:s.jsx(Mo,{className:"w-3 h-3"}),label:"Fireplace"}),(()=>{const K=$("GarageSpaces","garageSpaces");return K&&Number(K)>0&&s.jsx(Ge,{icon:s.jsx(Er,{className:"w-3 h-3"}),label:"Garage"})})(),$("HeatingYN")&&s.jsx(Ge,{icon:s.jsx(pd,{className:"w-3 h-3"}),label:"Heating"}),$("AssociationYN")&&s.jsx(Ge,{icon:s.jsx(kt,{className:"w-3 h-3"}),label:"HOA"}),$("HomeWarrantyYN")&&s.jsx(Ge,{icon:s.jsx(Ba,{className:"w-3 h-3"}),label:"Home Warranty"}),$("HorseYN")&&s.jsx(Ge,{icon:s.jsx(kt,{className:"w-3 h-3"}),label:"Horses Allowed"}),$("LaundryFeatures","laundryFeatures")&&s.jsx(Ge,{icon:s.jsx(Mf,{className:"w-3 h-3"}),label:"Laundry"}),$("NewConstructionYN")&&s.jsx(Ge,{icon:s.jsx(sr,{className:"w-3 h-3"}),label:"New Construction"}),$("PatioAndPorchFeatures","patioAndPorchFeatures")&&s.jsx(Ge,{icon:s.jsx(pa,{className:"w-3 h-3"}),label:"Patio or Porch"}),$("PoolPrivateYN")&&s.jsx(Ge,{icon:s.jsx(kt,{className:"w-3 h-3"}),label:"Pool"}),$("GreenEnergyEfficient")&&s.jsx(Ge,{icon:s.jsx(Mo,{className:"w-3 h-3"}),label:"Renewable Energy"}),$("SeniorCommunityYN")&&s.jsx(Ge,{icon:s.jsx(kt,{className:"w-3 h-3"}),label:"Senior Community"}),$("mw_isSingleStory")&&s.jsx(Ge,{icon:s.jsx(sr,{className:"w-3 h-3"}),label:"Single Story"}),$("SpaYN")&&s.jsx(Ge,{icon:s.jsx(kt,{className:"w-3 h-3"}),label:"Spa"}),$("ViewYN")&&s.jsx(Ge,{icon:s.jsx(or,{className:"w-3 h-3"}),label:"View"}),$("WaterfrontYN")&&s.jsx(Ge,{icon:s.jsx(pa,{className:"w-3 h-3"}),label:"Waterfront"})]})]}),s.jsx(mC,{latitude:L.latitude??null,longitude:L.longitude??null,price:le?L.price:null})]})]}):null}),L&&typeof y=="number"&&y>1&&s.jsxs("div",{className:"shrink-0 border-t bg-background px-4 md:px-6 py-3 flex items-center justify-between gap-3",children:[s.jsx(U,{type:"button",variant:"outline",size:"sm",onClick:x,disabled:!Le,children:"Previous"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[typeof f=="number"?f+1:1," of ",y]}),s.jsx(U,{type:"button",variant:"outline",size:"sm",onClick:_,disabled:!fe,children:"Next"})]})]})})}function ls({title:e,icon:t,children:r,isOpen:a,onToggle:n,badge:o,className:i}){return s.jsxs("div",{className:F("border-b pb-2",i),children:[s.jsxs("button",{className:"w-full flex items-center justify-between py-3 text-left hover:bg-muted/20 px-1 rounded transition-colors",onClick:n,children:[s.jsxs("div",{className:"flex items-center gap-2 font-semibold text-sm",children:[t,s.jsx("span",{children:e}),o]}),s.jsx(Zs,{className:F("w-4 h-4 transition-transform",a&&"rotate-180")})]}),a&&s.jsx("div",{className:"px-1 pb-2 space-y-3",children:r})]})}function Bt({title:e,children:t}){return s.jsxs("div",{children:[s.jsx("h4",{className:"text-xs font-bold text-mw-olive uppercase tracking-wider border-b-2 border-mw-olive pb-1 mb-2",children:e}),t]})}function O({label:e,value:t}){return t==null||t===""?null:s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-wider",children:e}),s.jsx("p",{className:"text-sm font-medium",children:typeof t=="boolean"?t?"Yes":"No":String(t)})]})}function Xo({children:e,className:t}){return s.jsx("p",{className:F("text-[10px] font-bold text-muted-foreground uppercase tracking-wider",t),children:e})}function Ge({icon:e,label:t}){return s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-muted text-xs font-medium border",children:[e,t]})}function _u({home:e,matchScore:t,sqft:r}
544){const[a,n]=d.useState(!0),o=!Wi(e.InternetListingDisplayPricesYN);return s.jsxs("div",{className:"rounded-lg shadow-sm border bg-card p-5 space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[o&&s.jsx("h2",{className:"text-3xl md:text-4xl font-heading font-bold",children:fu(e.price)}),o&&(()=>{const i=e.ClosePrice??e.closePrice;if(!i)return null;const l=typeof i=="number"?fu(i):`$${i}`;return s.jsxs("span",{className:"text-sm text-muted-foreground ml-2",children:["Close: ",s.jsx("span",{className:"font-semibold text-mw-black",children:l})]})})(),t!==null&&s.jsxs(uo,{className:"bg-icon-accent text-mw-black font-semibold",children:[t,"% Match"]}),s.jsx("button",{type:"button",onClick:()=>n(i=>!i),className:"ml-auto p-1 text-muted-foreground hover:text-foreground transition-colors",children:s.jsx(Zs,{className:F("h-4 w-4 transition-transform duration-200",a&&"rotate-180")})})]}),a&&s.jsxs(s.Fragment,{children:[(()=>{const i=zi(e.city||e.city||""),l=e.stateOrProvince||e.state||"",c=e.postalCode||e.zip||"",u=zi(e.address||""),m=[i,[l,c].filter(Boolean).join(" ")].filter(Boolean).join(", "),h=i&&u.includes(i)?u:m?`${u}, ${m}`:u;return s.jsxs("div",{className:"flex items-start gap-1.5 text-foreground",children:[s.jsx($s,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"text-base font-medium",children:h})]})})(),(()=>{const i=e.bedrooms??e.beds,l=e.bathrooms??e.baths,c=e.BathroomsFull??e.bathroomsFull??e.full_baths,u=e.BathroomsHalf??e.bathroomsHalf??e.half_baths,m=c!=null?`${c} full${u!=null?` · ${u} half`:""}`:void 0;return s.jsxs("div",{className:"grid grid-cols-3 gap-4 py-4 border-y",children:[s.jsx(Jo,{value:i,label:"Beds"}),s.jsx(Jo,{value:l,label:"Baths",detail:m}),s.jsx(Jo,{value:(r==null?void 0:r.toLocaleString())??null,label:"Sq. Ft."})]})})(),s.jsx(lC,{home:e})]})]})}function Jo({value:e,label:t,detail:r}){return s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-2xl font-heading font-bold",children:e??"â"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:t}),r&&s.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:r})]})}const bC=29.4241,yC=-98.4936;function vC(){var w;const{user:e,hasBuyerProfile:t}=be(),{openAuthModal:r}=za(),{questionnaire:a}=Op(),{favorites:n,toggleFavorite:o,isFavorite:i}=FS(),{getRankForListing:l,getPartnerRankForListing:c}=$S(n),[u,m]=d.useState(null),[h,p]=d.useState(!1);ct();const f=!!e&&t,y=N=>{if(!e){p(!0);return}o(N)},x=e&&((w=a==null?void 0:a.location)!=null&&w.address)?a.location.address:"",{data:_,isLoading:b}=et({queryKey:["homepage-homes-preview",x],staleTime:5*60*1e3,queryFn:async()=>{let N=bC,C=yC;if(x)try{const S=`https://oljfrvuqbiwnhtgzlrxb.supabase.co/functions/v1/geocode-address?address=${encodeURIComponent(x)}`,T=await fetch(S,{headers:{apikey:"sb_publishable_OSkUEoafPlIneIxYlVEnVQ_cc3Y0uKy"}});if(T.ok){const M=await T.json();M!=null&&M.latitude&&(M!=null&&M.longitude)&&(N=M.latitude,C=M.longitude)}}catch{}const{data:j,error:k}=await R.rpc("newest_listings_near",{p_lat:N,p_lng:C,p_radius_miles:50,p_limit:4});if(k)throw k;return j??[]}}),E=N=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(N);d.useEffect(()=>{u!==null&&(!_||u<0||u>=_.length)&&m(null)},[u,_]);const v=u!==null&&_?_[u]??null:null;return s.jsxs("section",{className:"py-12 bg-white",children:[s.jsxs("div",{className:"container",children:[s.jsxs("div",{className:"mb-12",children:[s.jsx("h2",{className:"font-heading text-3xl md:text-4xl font-bold text-mw-black mb-2",children:"Newest Homes for Military Families"}),s.jsx("p",{className:"text-mw-dark-gray text-lg",children:"Browse the latest listings near military installations."})]}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:b?Array.from({length:4}).map((N,C)=>s.jsxs(dt,{className:"overflow-hidden rounded-none",children:[s.jsx(ue,{className:"aspect-[4/3] w-full rounded-none"}),s.jsxs("div",{className:"p-4 space-y-2",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsx(ue,{className:"h-4 w-32"}),s.jsx(ue,{className:"h-4 w-20"})]}),s.jsx(ue,{className:"h-3 w-24"}),s.jsx(ue,{className:"h-3 w-36"})]})]},C)):_&&_.length>0?_.map((N,C)=>{var j;return s.jsxs(dt,{className:`overflow-hidden group rounded-none transition-all duration-300 hover:ring-2 hover:ring-icon-accent hover:shadow-lg cursor-pointer ${C===3?"hidden sm:block lg:hidden xl:block":""}`,onClick:()=>m(C),children:[s.jsx("div",{className:"relative aspect-[4/3] overflow-hidden",children:s.jsx(Vr,{src:(j=N.images)!=null&&j[0]?N.images[0].includes("supabase.co/storage/v1/object/public/")?N.images[0].replace("/object/public/","/render/image/public/")+"?width=600&height=450&resize=cover":N.images[0]:"/placeholder.svg",alt:N.address,width:600,height:450,sizes:"(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 25vw",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",loading:"lazy"})}),s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-1",children:[s.jsx("p",{className:"font-heading font-bold text-sm uppercase text-foreground truncate",children:N.address}),s.jsx("p",{className:"font-heading font-bold text-sm text-foreground whitespace-nowrap",children:E(N.price)})]}),s.jsxs("p",{className:"text-xs uppercase text-muted-foreground mb-2",children:[N.city,", ",N.stateOrProvince]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:[N.bedrooms&&`${N.bedrooms} bds`,N.bathrooms&&`${N.bathrooms}
544 ba`,N.sqft&&`${N.sqft.toLocaleString()} sqft`].filter(Boolean).join(" | ")})]})]},N.id)}):null}),s.jsx("div",{className:"flex justify-center mt-10",children:s.jsx(U,{variant:"outline",asChild:!0,children:s.jsxs(oe,{to:"/find-home",children:["Find More Homes",s.jsx(cs,{className:"ml-2 h-4 w-4"})]})})})]}),s.jsx(xC,{id:v==null?void 0:v.id,isOpen:!!v,onClose:()=>m(null),isFavorite:v&&f?i(v.id):!1,onToggleFavorite:y,userRank:v&&f?l(v.id):null,partnerRank:v&&f?c(v.id):null,currentIndex:u??void 0,totalHomes:(_==null?void 0:_.length)??0,onPreviousHome:()=>m(N=>N!==null&&N>0?N-1:N),onNextHome:()=>m(N=>N!==null&&_&&N<_.length-1?N+1:N)}),s.jsx(_t,{open:h,onOpenChange:p,children:s.jsxs(gt,{className:"sm:max-w-md",children:[s.jsxs(ms,{children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-icon-background flex items-center justify-center mx-auto mb-2",children:s.jsx(El,{className:"w-6 h-6 text-icon-accent"})}),s.jsx(ut,{className:"text-center",children:"Sign In to Save Favorites"}),s.jsx(St,{className:"text-center",children:"Create a free account or sign in to save homes to your favorites and track your home search."})]}),s.jsx("div",{className:"flex justify-center pt-2",children:s.jsx(U,{onClick:()=>{p(!1),r("signup")},children:"Sign In / Create Account"})})]})})]})}const wC="/assets/peterson-sfb-DMTahR01.jpg",_C="/assets/nas-jacksonville-PP8IWsJr.jpg",jC="/assets/ft-bragg-DlGNZBcd.jpg",kC="/assets/camp-pendleton-gr3dcxVS.jpg",NC="/assets/jblm-BpQcjGMa.jpg",SC="/assets/jbsa-Cumrn3um.jpg",ju=[{name:"Peterson SFB",state:"CO",image:wC},{name:"Naval Air Station Jacksonville",state:"FL",image:_C},{name:"Fort Liberty",state:"NC",image:jC},{name:"Marine Corps Base Camp Pendleton",state:"CA",image:kC},{name:"Joint Base Lewis-McChord (JBLM)",state:"WA",image:NC},{name:"Joint Base San Antonio (JBSA)",state:"TX",image:SC}];function CC({name:e,state:t,image:r}){const a=ct();return s.jsxs("button",{onClick:()=>a(`/find-home?base=${encodeURIComponent(e)}`),className:"relative flex-shrink-0 w-[280px] sm:w-[300px] aspect-[4/3] rounded-lg overflow-hidden group cursor-pointer",children:[s.jsx(Vr,{src:r,alt:`${e}, ${t}`,width:600,height:450,sizes:"(max-width: 640px) 280px, 300px",className:"absolute inset-0 w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",loading:"lazy"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-black/20 to-transparent"}),s.jsxs("div",{className:"absolute bottom-4 left-4 text-left",children:[s.jsx("p",{className:"text-white font-heading font-semibold text-lg leading-tight",children:e}),s.jsx("p",{className:"text-white/80 text-sm",children:t})]})]})}function EC(){return s.jsxs("section",{className:"py-12 md:py-16 bg-mw-gray",children:[s.jsxs("div",{className:"container mb-8 text-center",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-heading font-semibold text-foreground",children:"Featured Military Bases"}),s.jsx("p",{className:"mt-2 text-muted-foreground max-w-xl mx-auto",children:"Select a base to browse homes, or find a base using the dropdown options above"})]}),s.jsx("div",{className:"overflow-hidden",children:s.jsx("div",{className:"flex gap-5 animate-marquee hover:[animation-play-state:paused] w-max",children:[...ju,...ju].map((e,t)=>s.jsx(CC,{...e},`${e.name}-${t}`))})})]})}function Xt({factory:e,fallbackHeight:t="300px",fallback:r}){const a=d.useRef(null),[n,o]=d.useState(!1),i=d.useRef(null);i.current||(i.current=d.lazy(e));const l=i.current;d.useEffect(()=>{const u=a.current;if(!u)return;const m=new IntersectionObserver(([h])=>{h.isIntersecting&&(o(!0),m.disconnect())},{rootMargin:"200px"});return m.observe(u),()=>m.disconnect()},[]);const c=r??s.jsx(ue,{className:"w-full rounded-none",style:{height:t},"aria-label":"Loading section"});return s.jsx("div",{ref:a,children:n?s.jsx(d.Suspense,{fallback:c,children:s.jsx(l,{})}):c})}const AC=[{rel:"alternate",href:`${Q}/.well-known/llms.txt`,type:"text/plain",title:"LLMs Summary"},{rel:"alternate",href:`${Q}/.well-known/llms-full.txt`,type:"text/plain",title:"LLMs Full Context"},{rel:"alternate",href:`${Q}/llms-blog.txt`,type:"text/plain",title:"LLMs Blog Index"},{rel:"alternate",href:`${Q}/rss.xml`,type:"application/rss+xml",title:"MustWants Blog RSS"}
544],TC={"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":`${Q}/#organization`,name:"MustWants",url:Q,logo:{"@type":"ImageObject",url:`${Q}/og-image.png`,width:1200,height:630},description:"Military family home search platform. Find homes near military installations and connect with vetted, military-friendly real estate professionals.",foundingDate:"2024",sameAs:["https://www.instagram.com/mustwants","https://www.facebook.com/mustwants","https://www.linkedin.com/company/mustwants"],contactPoint:{"@type":"ContactPoint",contactType:"customer support",url:`${Q}/contact`},areaServed:"US",knowsAbout:["Military Housing","PCS Moves","VA Loans","Military Relocation"]},{"@type":"WebSite","@id":`${Q}/#website`,url:Q,name:"MustWants",description:"Military family home search platform - find homes, connect with pros, PCS with confidence.",publisher:{"@id":`${Q}/#organization`},potentialAction:{"@type":"SearchAction",target:{"@type":"EntryPoint",urlTemplate:`${Q}/find-home?q={search_term_string}`},"query-input":"required name=search_term_string"}}]},RC=js.title,PC=js.description,IC=js.keywords,MC=js.ogImage,LC=js.ogImageAlt,OC=js.ogImageWidth,DC=js.ogImageHeight,ku=Il;function Nu(e){if(!e)return;if(e.startsWith("http://")||e.startsWith("https://"))return e;const t=e.startsWith("/")?e:`/${e}`,r=t==="/"?"/":t.replace(/\/+$/,"");return r==="/"?Q:`${Q}${r}`}function FC(e){const t=e.split("?")[0].toLowerCase();if(t.endsWith(".png"))return"image/png";if(t.endsWith(".webp"))return"image/webp";if(t.endsWith(".avif"))return"image/avif";if(t.endsWith(".gif"))return"image/gif";if(t.endsWith(".svg"))return"image/svg+xml";if(t.endsWith(".jpg")||t.endsWith(".jpeg"))return"image/jpeg"}function ec({title:e,description:t=PC,keywords:r=IC,canonicalUrl:a,alternateLinks:n,ogImage:o=MC,ogImageAlt:i=e||LC,ogImageWidth:l=OC,ogImageHeight:c=DC,ogType:u="website",article:m,noIndex:h=!1,jsonLd:p}){var v;const f=e?`${e} | ${ku}`:RC,y=!a&&!h&&typeof window<"u"?window.location.pathname:void 0,x=Nu(a)??Nu(y),_=o.startsWith("http")?o:`${Q}${o}`,b=FC(_),E=p?Array.isArray(p)?p:[p]:[];return s.jsxs(am,{children:[s.jsx("title",{children:f}),s.jsx("meta",{name:"description",content:t}),s.jsx("meta",{name:"keywords",content:r}),h?s.jsx("meta",{name:"robots",content:"noindex, nofollow"}):s.jsx("meta",{name:"robots",content:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"}),x&&s.jsx("link",{rel:"canonical",href:x}),[...h?[]:AC,...n??[]].map(w=>s.jsx("link",{rel:w.rel||"alternate",href:w.href,...w.type?{type:w.type}:{},...w.title?{title:w.title}:{}},`${w.rel||"alternate"}:${w.type||""}:${w.href}`)),s.jsx("link",{rel:"image_src",href:_}),s.jsx("meta",{property:"og:title",content:f}),s.jsx("meta",{property:"og:description",content:t}),s.jsx("meta",{property:"og:type",content:u}),s.jsx("meta",{property:"og:image",content:_}),s.jsx("meta",{property:"og:image:url",content:_}),s.jsx("meta",{property:"og:image:secure_url",content:_}),s.jsx("meta",{property:"og:image:width",content:String(l)}),s.jsx("meta",{property:"og:image:height",content:String(c)}),s.jsx("meta",{property:"og:image:alt",content:i}),b&&s.jsx("meta",{property:"og:image:type",content:b}),s.jsx("meta",{property:"og:site_name",content:ku}),s.jsx("meta",{property:"og:locale",content:"en_US"}),x&&s.jsx("meta",{property:"og:url",content:x}),s.jsx("meta",{name:"image",content:_}),s.jsx("meta",{itemProp:"image",content:_}),u==="article"&&m&&s.jsxs(s.Fragment,{children:[m.publishedTime&&s.jsx("meta",{property:"article:published_time",content:m.publishedTime}),m.modifiedTime&&s.jsx("meta",{property:"article:modified_time",content:m.modifiedTime}),m.author&&s.jsx("meta",{property:"article:author",content:m.author}),m.section&&s.jsx("meta",{property:"article:section",content:m.section}),(v=m.tags)==null?void 0:v.map(w=>s.jsx("meta",{property:"article:tag",content:w},w))]}),s.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),s.jsx("meta",{name:"twitter:site",content:js.twitterHandle}),s.jsx("meta",{name:"twitter:domain",content:js.twitterDomain}),s.jsx("meta",{name:"twitter:title",content:f}),s.jsx("meta",{name:"twitter:description",content:t}),s.jsx("meta",{name:"twitter:image",content:_}),s.jsx("meta",{name:"twitter:image:alt",content:i}),x&&s.jsx("meta",{name:"twitter:url",content:x}),!h&&s.jsx("script",{type:"application/ld+json",children:JSON.stringify(TC)}),E.map((w,N)=>s.jsx("script",{type:"application/ld+json",children:JSON.stringify(w)},N))]})}const qe="/og-images",$C={home:{description:Nt.description,keywords:Nt.keywords,ogImage:Nt.ogImage},findHome:{title:"Military Home Search Near Bases",description:"Search homes for sale and rent near military installations. Compare listings, save favorites, and plan your PCS move without giving up your privacy.",keywords:"military home search, homes near military bases, PCS housing, military relocation homes, military family home search",ogImage:`${qe}/find-home.png`,jsonLd:{"@context":"https://schema.org","@type":"CollectionPage","@id":`${Q}/find-home#webpage`,url:`${Q}/find-home`,name:"Military Home Search Near Bases | MustWants",description:"Search homes for sale and rent near military installations. Compare listings, save favorites, and plan your PCS move without giving up your privacy.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`},primaryImageOfPage:{"@type":"ImageObject",url:`${Q}/og-images/find-home.png`,width:1200,height:630}}},findPro:{title:"Find Military-Friendly Real Estate Professionals",description:"Connect with vetted real estate agents, lenders, inspectors, attorneys, and other professionals who understand PCS moves, VA loans, and military family needs.",ke
544ywords:"military friendly real estate agent, VA loan lender, PCS relocation specialist, military real estate professionals",ogImage:`${qe}/find-pro.png`,jsonLd:{"@context":"https://schema.org","@type":"CollectionPage","@id":`${Q}/find-pro#webpage`,url:`${Q}/find-pro`,name:"Find Military-Friendly Real Estate Professionals | MustWants",description:"Connect with vetted real estate agents, lenders, inspectors, attorneys, and other professionals who understand PCS moves, VA loans, and military family needs.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`},primaryImageOfPage:{"@type":"ImageObject",url:`${Q}/og-images/find-pro.png`,width:1200,height:630}}},resources:{title:"PCS Resources for Military Families",description:"Explore PCS checklists, maps, tools, and relocation resources built to help military families stay organized and make smarter moving decisions.",keywords:"PCS resources, military relocation resources, military move checklist, PCS planning tools",ogImage:`${qe}/resources.png`,jsonLd:{"@context":"https://schema.org","@type":"CollectionPage","@id":`${Q}/resources#webpage`,url:`${Q}/resources`,name:"PCS Resources for Military Families | MustWants",description:"Explore PCS checklists, maps, tools, and relocation resources built to help military families stay organized and make smarter moving decisions.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`}}},blog:{title:"Military Relocation Blog",description:"Read guides, tips, and insights on PCS moves, VA loans, military home buying, renting, and relocation planning.",keywords:"military relocation blog, PCS tips, military home buying, VA loan blog, military moving advice",ogImage:`${qe}/blog.png`,jsonLd:{"@context":"https://schema.org","@type":"Blog","@id":`${Q}/blog#blog`,url:`${Q}/blog`,name:"Military Relocation Blog | MustWants",description:"Read guides, tips, and insights on PCS moves, VA loans, military home buying, renting, and relocation planning.",inLanguage:"en-US",publisher:{"@id":`${Q}/#organization`}}},about:{title:"About Us",description:"MustWants is built by military families, for military families. Learn about our mission to simplify the home search for service members.",keywords:"veteran owned business, military spouse owned, military family company",ogImage:`${qe}/about.png`,jsonLd:{"@context":"https://schema.org","@type":"AboutPage","@id":`${Q}/about#webpage`,url:`${Q}/about`,name:"About MustWants | Military Home Search Platform",description:"MustWants is built by military families, for military families. Learn about our mission to simplify the home search for service members.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`},about:{"@id":`${Q}/#organization`}}},contact:{title:"Contact Us",description:"Get in touch with the MustWants team. We're here to help with your home search questions.",ke
544ywords:"contact MustWants, military housing help, real estate support",ogImage:`${qe}/contact.png`,jsonLd:{"@context":"https://schema.org","@type":"ContactPage","@id":`${Q}/contact#webpage`,url:`${Q}/contact`,name:"Contact MustWants",description:"Get in touch with the MustWants team. We're here to help with your home search questions.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`}}},faq:{title:"FAQ",description:"Frequently asked questions about MustWants. Learn how our platform helps military families find homes and connect with professionals.",keywords:"MustWants FAQ, military housing questions, PCS help",ogImage:`${qe}/faq.png`},maps:{title:"Military Housing and PCS Maps",description:"Explore interactive maps with housing, BAH, schools, affordability, and location data near military installations.",keywords:"military housing map, PCS map, BAH map, military installation housing data, relocation map",ogImage:`${qe}/visual-data-maps.png`},checklists:{title:"PCS Checklists for Military Moves",description:"Use PCS checklists to track your move, stay organized, and coordinate tasks with your spouse or partner during relocation.",keywords:"PCS checklist, military moving checklist, relocation checklist for military families, PCS planning list",ogImage:`${qe}/checklists.png`,jsonLd:{"@context":"https://schema.org","@type":"CollectionPage","@id":`${Q}/resources/checklists#webpage`,url:`${Q}/resources/checklists`,name:"PCS Checklists for Military Moves | MustWants",description:"Use PCS checklists to track your move, stay organized, and coordinate tasks with your spouse or partner during relocation.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`}}},listHome:{title:"List Your Home",description:"Sell or rent your home to military families. List your property for free on MustWants and reach buyers near military installations.",keywords:"list home for military, FSBO military, rent to military, sell to military family",ogImage:`${qe}/home.png`,jsonLd:{"@context":"https://schema.org","@type":"Service",name:"List Your Home to Military Families",description:"Sell or rent your home to military families. List your property for free on MustWants and reach buyers near military installations.",url:`${Q}/list-home`,provider:{"@id":`${Q}/#organization`},areaServed:{"@type":"Country",name:"United States"},audience:{"@type":"Audience",audienceType:"Military families, service members, and veterans"}}},proLanding:{title:"For Real Estate Professionals",description:"Grow your business with military families. Join MustWants to connect with service members and veterans looking for trusted professionals.",keywords:"military real estate leads, VA loan clients, military realtor network",ogImage:`${qe}/pro-landing.png`,jsonLd:{"@context":"https://schema.org","@type":"Service",name:"MustWants for Real Estate Professionals",description:"Grow your business with military families. Join MustWants to connect with service members and veterans looking for trusted professionals.",url:`${Q}/pro`,provider:{"@id":`${Q}/#organization`},audience:{"@type":"Audience",audienceType:"Real estate agents, lenders, inspectors, attorneys, and other professionals"}}},fsbo:{title:"For Sale By Owner for Military Families",description:"List your home for sale by owner and reach military families searching near bases and installations. Simple pricing and military-focused exposure.",keywords:"for sale by owner military, FSBO military families, list home near military base, sell home by owner military",ogImage:`${qe}/fsbo.png`,jsonLd:{"@context":"https://schema.org","@type":"Service",name:"For Sale By Owner for Military Families",description:"List your home for sale by owner and reach military families searching near bases and installations.",url:`${Q}/list-home/for-sale-by-owner`,provider:{"@id":`${Q}/#organization`},areaServed:{"@type":"Country",name:"United States"},audience:{"@type":"Audience",audienceType:"Military families, service members, and veterans"}}},frbo:{title:"For Rent by Owner",description:"Rent your home on your terms. List your rental property for free on MustWants and reach military families looking for housing.",keywords:"FRBO military, rent home by owner, for rent by owner military",ogImage:`${qe}/frbo.png`,jsonLd:{"@context":"https://schema.org","@type":"Service",name:"For Rent By Owner - Military Housing",description:"Rent your home on your terms. List your rental property for free on MustWants and reach military families looking for housing.",url:`${Q}/list-home/for-rent-by-owner`,provider:{"@id":`${Q}/#organization`},areaServed:{"@type":"Country",name:"United States"},audience:{"@type":"Audience",audienceType:"Military families, service members, and veterans"}}},podcast:{title:"MilSpouses Moving Houses Podcast",description:"Real stories, expert insights, and strategies for military relocations. Listen to the MilSpouses Moving Houses podcast.",keywords:"military spouse podcast, PCS podcast, military relocation podcast",ogImage:`${qe}/podcast.png`,jsonLd:{"@context":"https://schema.org","@type":"PodcastSeries",name:"MilSpouses Moving Houses Podcast",description:"Real stories, expert insights, and strategies for military relocations. Listen to the MilSpouses Moving Houses podcast.",url:`${Q}/resources/podcast`,publisher:{"@id":`${Q}/#organization`}}},partners:{title:"Our Partners",description:"Military-friendly businesses ready to help with your PCS move. Find trusted partners and affiliates on MustWants.",keywords:"military business partners, PCS services, military affiliates",ogImage:`${qe}/partners.png`,jsonLd:{"@context":"https://schema.org","@type":"CollectionPage","@id":`${Q}/resources/partners#webpage`,url:`${Q}/resources/partners`,name:"Military-Friendly Business Partners | MustWants",description:"Military-friendly businesses ready to help with your PCS move. Find trusted partners and affiliates on MustWants.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`}}},policies:{title:"Legal Policies",description:"MustWants terms and conditions, privacy policy, accessibility statement, and DMCA policy.",ke
544ywords:"MustWants terms, privacy policy, accessibility",ogImage:`${qe}/policies.png`,jsonLd:{"@context":"https://schema.org","@type":"WebPage","@id":`${Q}/policies#webpage`,url:`${Q}/policies`,name:"Legal Policies | MustWants",description:"MustWants terms and conditions, privacy policy, accessibility statement, and DMCA policy.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`}}},auth:{title:"Sign In",description:"Sign in or create a MustWants account to search homes, save favorites, and connect with military-friendly professionals.",keywords:"MustWants login, sign up, create account"},housingMap:{title:"Visual Data Maps",description:"Explore interactive maps showing BAH rates, median home values, walkability, crime, travel time, and more near military installations.",keywords:"military data maps, BAH rates map, housing affordability map, crime map, travel time map",ogImage:`${qe}/visual-data-maps.png`,jsonLd:{"@context":"https://schema.org","@type":"CollectionPage","@id":`${Q}/resources/maps#webpage`,url:`${Q}/resources/maps`,name:"Military Housing and PCS Maps | MustWants",description:"Explore interactive maps with housing, BAH, schools, affordability, and location data near military installations.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`}}},professionalsMap:{title:"Vetted Professionals Map",description:"Find vetted, military-friendly real estate agents, lenders, inspectors, and more on an interactive map. See coverage areas and connect.",keywords:"military real estate map, vetted professionals map, military friendly agents map",ogImage:`${qe}/visual-data-maps.png`,jsonLd:{"@context":"https://schema.org","@type":"CollectionPage","@id":`${Q}/resources/maps/professionals#webpage`,url:`${Q}/resources/maps/professionals`,name:"Vetted Professionals Map | MustWants",description:"Find vetted, military-friendly real estate agents, lenders, inspectors, and more on an interactive map.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`}}},mlsCoverage:{title:"MLS Coverage Map",description:"Explore which MLS serves each U.S. county on an interactive map â coverage, confidence, and overlaps â to plan listings and agent coverage near military bases.",keywords:"MLS coverage map, MLS by county, which MLS serves my county, MLS coverage by state, real estate MLS map",ogImage:`${qe}/visual-data-maps.png`,jsonLd:{"@context":"https://schema.org","@type":"CollectionPage","@id":`${Q}/resources/mls-coverage#webpage`,url:`${Q}/resources/mls-coverage`,name:"MLS Coverage Map | MustWants",description:"Interactive county-level map of MLS coverage across the United States.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`}}},coverageMap:{title:"Agent Coverage Map",description:"See where MustWants has vetted real-estate-agent coverage across U.S. military installations. Explore agent density, coverage gaps, and MLS reach near every base.",keywords:"military agent coverage map, real estate agents near military bases, PCS agent finder, military installation real estate coverage, MLS coverage map",ogImage:`${qe}/visual-data-maps.png`,jsonLd:{"@context":"https://schema.org","@type":"CollectionPage","@id":`${Q}/resources/coverage-map#webpage`,url:`${Q}/resources/coverage-map`,name:"Agent Coverage Map | MustWants",description:"Interactive map of MustWants real-estate-agent coverage across U.S. military installations.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`}}},communityMap:{title:"Military Community Map",description:"Find military Facebook groups, Reddit, Discord, and other online communities near your next base. Browse a map of military communities and connect before you PCS.",keywords:"military community map, military facebook groups, base community groups, PCS community, military spouse groups",ogImage:`${qe}/visual-data-maps.png`,jsonLd:{"@context":"https://schema.org","@type":"CollectionPage","@id":`${Q}/resources/community-map#webpage`,url:`${Q}/resources/community-map`,name:"Military Community Map | MustWants",description:"A directory of military-relevant online communities (Facebook groups, Reddit, Discord, and more) mapped near military installations.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`}}},submitCommunity:{title:"Submit a Military Community",description:"Add a military Facebook group, Reddit, Discord, or other community to the MustWants community map for other military families to find.",keywords:"submit military community, add military facebook group, military community directory",ogImage:`${qe}/visual-data-maps.png`},calculators:{title:"Military Home Calculators",description:"Free housing calculators for military families - VA mortgage, BAH-aware affordability, buy vs rent, closing costs, amortization, and more.",keywords:"VA mortgage calculator, military affordability calculator, buy vs rent military, closing cost c
544alculator, amortization, refinance vs sell",ogImage:`${qe}/calculators.png`,jsonLd:{"@context":"https://schema.org","@type":"CollectionPage","@id":`${Q}/resources/calculators#webpage`,url:`${Q}/resources/calculators`,name:"Military Home Calculators | MustWants",description:"Free housing calculators for military families - VA mortgage, BAH-aware affordability, buy vs rent, closing costs, amortization, and more.",inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`}}}},BC=()=>s.jsxs(s.Fragment,{children:[s.jsx(ec,{title:"MustWants | Military Home Search, PCS Tools, and Vetted Pros",description:Nt.description,keywords:Nt.keywords,canonicalUrl:"/",ogImage:Nt.ogImage,ogImageAlt:Nt.ogImageAlt,jsonLd:[{"@context":"https://schema.org","@type":"WebPage","@id":`${Q}/#webpage`,url:Q,name:"MustWants | Military Home Search, PCS Tools, and Vetted Pros",description:Nt.description,inLanguage:"en-US",isPartOf:{"@id":`${Q}/#website`},primaryImageOfPage:{"@type":"ImageObject",url:Nt.ogImageUrl,width:1200,height:630}},{"@context":"https://schema.org","@type":"FAQPage",mainEntity:M_.map(e=>({"@type":"Question",name:e.question,acceptedAnswer:{"@type":"Answer",text:e.answer}}))}]}),s.jsx(OS,{}),s.jsx(vC,{}),s.jsx(EC,{}),s.jsx(Xt,{factory:()=>ne(()=>import("./TrustBanner-BoisjCtz.js"),__vite__mapDeps([19,1,2,3,5,6,7])).then(e=>({default:e.TrustBanner})),fallbackHeight:"120px"}),s.jsx(Xt,{factory:()=>ne(()=>import("./MapsPreviewSection-Cd5LwaV2.js"),__vite__mapDeps([20,1,2,3,5,6,7])).then(e=>({default:e.MapsPreviewSection})),fallbackHeight:"640px"}),s.jsx(Xt,{factory:()=>ne(()=>import("./ToolsSection-C_IzeCRT.js"),__vite__mapDeps([21,1,2,3,5,6,7])).then(e=>({default:e.ToolsSection})),fallbackHeight:"560px"}),s.jsx(Xt,{factory:()=>ne(()=>import("./ProPreviewSection-C7RAzImk.js"),__vite__mapDeps([22,1,2,5,23,24,3,6,7])).then(e=>({default:e.ProPreviewSection})),fallbackHeight:"700px"}),s.jsx(Xt,{factory:()=>ne(()=>import("./BlogPreviewSection-D_dkkV6o.js"),__vite__mapDeps([25,1,2,3,5,6,7])).then(e=>({default:e.BlogPreviewSection})),fallbackHeight:"700px"}),s.jsx(Xt,{factory:()=>ne(()=>import("./TestimonialsSection-CjS1Zk5X.js"),__vite__mapDeps([26,1,2,27,28,29,3,5,6,7])).then(e=>({default:e.TestimonialsSection})),fallbackHeight:"640px"}),s.jsx(Xt,{factory:()=>ne(()=>import("./StorySection-s2ze7Ar0.js"),__vite__mapDeps([30,1,2,3,5,6,7])).then(e=>({default:e.StorySection})),fallbackHeight:"560px"}),s.jsx(Xt,{factory:()=>ne(()=>import("./PartnersSection-BT4ZFfFf.js"),__vite__mapDeps([31,1,2,5,27,28,32,3,6,7])).then(e=>({default:e.PartnersSection})),fallbackHeight:"420px"}),s.jsx(Xt,{factory:()=>ne(()=>import("./FAQSection-CCeYRx8H.js"),__vite__mapDeps([33,1,2,34,3,5,6,7])).then(e=>({default:e.FAQSection})),fallbackHeight:"600px"}),s.jsx(Xt,{factory:()=>ne(()=>import("./TrustBadgesSection-DyR6fyD3.js"),__vite__mapDeps([35,1,2,3,5,6,7])).then(e=>({default:e.TrustBadgesSection})),fallbackHeight:"260px"}),s.jsx(Xt,{factory:()=>ne(()=>import("./CTASection-B-jUQYbD.js"),__vite__mapDeps([36,1,2,3,5,6,7])).then(e=>({default:e.CTASection})),fallbackHeight:"320px"})]});var tc="Radio",[zC,$p]=Gr(tc),[HC,UC]=zC(tc),Bp=d.forwardRef((e,t)=>{const{__scopeRadio:r,name:a,checked:n=!1,required:o,disabled:i,value:l="on",onCheck:c,form:u,...m}=e,[h,p]=d.useState(null),f=Es(t,_=>p(_)),y=d.useRef(!1),x=h?u||!!h.closest("form"):!0;return s.jsxs(HC,{scope:r,checked:n,disabled:i,children:[s.jsx(lt.button,{type:"button",role:"radio","aria-checked":n,"data-state":Vp(n),"data-disabled":i?"":void 0,disabled:i,value:l,...m,ref:f,onClick:pt(e.onClick,_=>{n||c==null||c(),x&&(y.current=_.isPropagationStopped(),y.current||_.stopPropagation())})}),x&&s.jsx(Up,{control:h,bubbles:!y.current,name:a,value:l,checked:n,required:o,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Bp.displayName=tc;var zp="RadioIndicator",Hp=d.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:a,...n}=e,o=UC(zp,r);return s.jsx(Zi,{present:a||o.checked,children:s.jsx(lt.span,{"data-state":Vp(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})})});Hp.displayName=zp;var VC="RadioBubbleInput",Up=d.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:a=!0,...n},o)=>{const i=d.useRef(null),l=Es(i,o),c=Hu(r),u=Uu(t);return d.useEffect(()=>{const m=i.current;if(!m)return;const h=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==r&&f){const y=new Event("click",{bubbles:a});f.call(m,r),m.dispatchEvent(y)}},[c,r,a]),s.jsx(lt.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:l,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Up.displayName=VC;function Vp(e){return e?"checked":"unchecked"}var qC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],yo="RadioGroup",[WC,oE]=Gr(yo,[Wu,$p]),qp=Wu(),Wp=$p(),[GC,YC]=WC(yo),Gp=d.forwardRef((e,t)=>
544{const{__scopeRadioGroup:r,name:a,defaultValue:n,value:o,required:i=!1,disabled:l=!1,orientation:c,dir:u,loop:m=!0,onValueChange:h,...p}=e,f=qp(r),y=Sg(u),[x,_]=Ki({prop:o,defaultProp:n??null,onChange:h,caller:yo});return s.jsx(GC,{scope:r,name:a,required:i,disabled:l,value:x,onValueChange:_,children:s.jsx(Cg,{asChild:!0,...f,orientation:c,dir:y,loop:m,children:s.jsx(lt.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":l?"":void 0,dir:y,...p,ref:t})})})});Gp.displayName=yo;var Yp="RadioGroupItem",Kp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:a,...n}=e,o=YC(Yp,r),i=o.disabled||a,l=qp(r),c=Wp(r),u=d.useRef(null),m=Es(t,u),h=o.value===n.value,p=d.useRef(!1);return d.useEffect(()=>{const f=x=>{qC.includes(x.key)&&(p.current=!0)},y=()=>p.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",y)}},[]),s.jsx(Eg,{asChild:!0,...l,focusable:!i,active:h,children:s.jsx(Bp,{disabled:i,required:o.required,checked:h,...c,...n,name:o.name,ref:m,onCheck:()=>o.onValueChange(n.value),onKeyDown:pt(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:pt(n.onFocus,()=>{var f;p.current&&((f=u.current)==null||f.click())})})})});Kp.displayName=Yp;var KC="RadioGroupIndicator",Zp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...a}=e,n=Wp(r);return s.jsx(Hp,{...n,...a,ref:t})});Zp.displayName=KC;var Qp=Gp,Xp=Kp,ZC=Zp;const Jp=d.forwardRef(({className:e,...t},r)=>s.jsx(Qp,{className:F("grid gap-2",e),...t,ref:r}));Jp.displayName=Qp.displayName;const Gi=d.forwardRef(({className:e,...t},r)=>s.jsx(Xp,{ref:r,className:F("aspect-square h-4 w-4 rounded-full border border-mw-olive text-mw-olive ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:s.jsx(ZC,{className:"flex items-center justify-center",children:s.jsx(c2,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Gi.displayName=Xp.displayName;function QC({onSubmit:e,isLoading:t,userName:r}){const[a,n]=d.useState("buyer"),[o,i]=d.useState(""),[l,c]=d.useState(!1),[u,m]=d.useState(""),[h,p]=d.useState(!1),f=qa.map(x=>[x,Dl[x]]),y=async x=>{if(x.preventDefault(),!l){p(!0);return}p(!1),await e({userType:a,...a==="professional"&&o?{proRole:o}:{},referralCode:u})};return s.jsxs("form",{onSubmit:y,className:"space-y-4",children:[s.jsxs("div",{className:"text-center mb-2",children:[s.jsxs("h2",{className:"text-xl font-heading font-bold",children:["Welcome",r?`, ${r}`:"","!"]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Just a few more details to set up your account."})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs(Te,{children:["I am a... ",s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsxs(Jp,{value:a,onValueChange:x=>n(x),className:"grid grid-cols-2 gap-3",children:[s.jsxs(Te,{htmlFor:"gc-type-buyer",className:`flex flex-col items-center gap-2 p-4 rounded-lg border-2 cursor-pointer transition-all ${a==="buyer"?"border-mw-olive bg-mw-olive text-mw-black shadow-md":"border-muted hover:border-mw-olive/50"}`,children:[s.jsx(Gi,{value:"buyer",id:"gc-type-buyer",className:"sr-only"}),s.jsx(ns,{className:`h-6 w-6 ${a==="buyer"?"text-white":""}`}),s.jsx("span",{className:"font-medium text-sm",children:"Home Buyer/Renter/Seller"})]}),s.jsxs(Te,{htmlFor:"gc-type-professional",className:`flex flex-col items-center gap-2 p-4 rounded-lg border-2 cursor-pointer transition-all ${a==="professional"?"border-mw-olive bg-mw-olive text-mw-black shadow-md":"border-muted hover:border-mw-olive/50"}`,children:[s.jsx(Gi,{value:"professional",id:"gc-type-professional",className:"sr-only"}),s.jsx(to,{className:`h-6 w-6 ${a==="professional"?"text-white":""}`}),s.jsx("span",{className:"font-medium text-sm",children:"Professional or Business"})]})]})]}),a==="professional"&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Te,{children:["Professional Type ",s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsxs(io,{value:o,onValueChange:x=>i(x),children:[s.jsx(Ha,{className:"bg-background",children:s.jsx(lo,{placeholder:"Select your profession"})}),s.jsx(Ua,{className:"bg-background z-50",children:f.map(([x,_])=>s.jsx(Va,{value:x,children:_},x))})]})]}),s.jsxs("div",{className:"flex items-start space-x-2",children:[s.jsx(ht,{id:"gc-data-policy",checked:l,"aria-invalid":h,"aria-describedby":h?"gc-policy-error":void 0,onCheckedChange:x=>{c(x===!0),x&&p(!1)}}),s.jsxs(Te,{htmlFor:"gc-data-policy",className:"text-sm font-normal leading-snug cursor-pointer",children:[s.jsx("span",{className:"text-destructive",children:"*"})," By clicking this checkbox you understand that MustWants will not sell your data to third parties."," ",s.jsx(oe,{to:"/policies/privacy",target:"_blank",className:"text-mw-olive hover:underline",children:"Read our data policy here"}),"."]})]}),h&&s.jsx("p",{id:"gc-policy-error",role:"alert","aria-live":"assertive",className:"text-destructive text-sm",children:"Please accept the data policy to continue."}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Te,{htmlFor:"gc-referralCode",children:"Referral Code (optional)"}),s.jsx(We,{id:"gc-referralCode",placeholder:"ENTER A REFERRAL CODE",value:u,onChange:x=>m(x.target.value),autoComplete:"off"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"If someone referred you, enter the
544ir code here"})]}),s.jsx(U,{type:"submit",className:"w-full",disabled:t,children:t?s.jsxs(s.Fragment,{children:[s.jsx(qt,{className:"mr-2 h-4 w-4 animate-spin"}),"Setting up..."]}):"Complete Setup"})]})}function XC({email:e,otpValue:t,onOtpChange:r,onVerify:a,isVerifying:n,resendCooldown:o,onResend:i,onBack:l,backLabel:c}){return s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"font-heading font-bold text-2xl",children:"Check your inbox"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["We sent a verification code to"," ",s.jsx("span",{className:"font-semibold text-foreground",children:e})]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Can't find it? Check your"," ",s.jsx("span",{className:"font-medium",children:"spam or junk folder"})," - the email comes from ",s.jsx("span",{className:"font-medium",children:Bi}),"."]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{htmlFor:"otp-code-input",className:"sr-only",children:"Verification code"}),s.jsx("p",{id:"otp-code-help",className:"text-sm font-medium",children:"Enter the 6-digit code:"}),s.jsx(Ll,{id:"otp-code-input",maxLength:6,value:t,onChange:r,onComplete:a,autoComplete:"one-time-code",inputMode:"numeric",pattern:"[0-9]*","aria-label":"6-digit verification code","aria-describedby":"otp-code-help",children:s.jsxs(Ol,{children:[s.jsx(Rt,{index:0}),s.jsx(Rt,{index:1}),s.jsx(Rt,{index:2}),s.jsx(Rt,{index:3}),s.jsx(Rt,{index:4}),s.jsx(Rt,{index:5})]})})]}),s.jsx(U,{className:"w-full",disabled:t.length!==6||n,onClick:a,children:n?s.jsxs(s.Fragment,{children:[s.jsx(qt,{className:"mr-2 h-4 w-4 animate-spin"}),"Verifying..."]}):"Verify Code"}),s.jsxs("div",{className:"flex gap-3 w-full",children:[s.jsx(U,{variant:"outline",className:"flex-1",disabled:o>0,onClick:i,children:o>0?`Resend in ${o}s`:"Resend Email"}),s.jsx(U,{variant:"ghost",className:"flex-1",onClick:l,children:c})]})]})}function JC(e){let t=(e||"PRO").toUpperCase().slice(0,3);t.length<3&&(t=t.padEnd(3,"X"));const r=Math.random().toString(36).substring(2,6).toUpperCase();return t+r}function e4({open:e,onOpenChange:t,defaultRole:r}){const{user:a,profile:n,buyerProfile:o,switchUserType:i}=be(),l=ct(),{toast:c}=At(),[u,m]=d.useState(r??""),[h,p]=d.useState(!1);d.useEffect(()=>{e&&r&&m(r)},[e,r]);const f=async()=>{if(!(!a||!n||!u)){p(!0);try{const y=(o==null?void 0:o.referral_code)||JC(n.last_name||"PRO"),{error:x}=await R.from("professional_profiles").insert({user_id:a.id,pro_role:u,status:"draft",subscription_tier:"free",is_visible:!1,referral_code:y});if(x)throw x;await i("professional"),c({title:"Pro account created!",description:"Welcome to your new professional dashboard."}),t(!1),l("/pro/dashboard")}catch(y){const x=y instanceof Error?y.message:"Failed to create professional account";c({variant:"destructive",title:"Error",description:x})}finally{p(!1)}}};return s.jsx(_t,{open:e,onOpenChange:t,children:s.jsxs(gt,{className:"sm:max-w-md",children:[s.jsxs(ms,{children:[s.jsx(ut,{children:"Become a Professional"}),s.jsx(St,{children:"Add a professional account to list your services and connect with military families. You'll start on the free tier - upgrade anytime."})]}),s.jsx("div",{className:"space-y-4 py-2",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-sm font-medium leading-none",children:"What type of professional are you?"}),s.jsxs(io,{value:u,onValueChange:y=>m(y),children:[s.jsx(Ha,{children:s.jsx(lo,{placeholder:"Select your role"})}),s.jsx(Ua,{children:qa.map(y=>s.jsx(Va,{value:y,children:Dl[y]},y))})]})]})}),s.jsxs(Hr,{className:"gap-2 sm:gap-0",children:[s.jsx(U,{variant:"outline",onClick:()=>t(!1),disabled:h,children:"Cancel"}),s.jsx(U,{onClick:f,disabled:!u||h,children:h?"Creatingâ¦":"Create Pro Account"})]})]})})}const Su=oo().email("Please enter a valid email address"),t4=oo().min(8,"Password must be at least 8 characters"),s4={business_partner:"business_owner",broker:"agent"};function r4(e){if(!e)return;const t=s4[e]??e;if(qa.includes(t))return t}function a4(){const e=ct(),[t,r]=Un(),{toast:a}=At(),{signIn:n,signUp:o,user:i,profile:l,buyerProfile:c,proProfile:u,hasProProfile:m,isLoading:h,refreshProfile:p}
544=be(),[f,y]=d.useState(!1),[x,_]=d.useState(!1),[b,E]=d.useState("buyer"),[v,w]=d.useState(!1),[N,C]=d.useState({}),[j,k]=d.useState(""),[S,T]=d.useState(!1),[M,P]=d.useState(!1),[A,I]=d.useState(null),[z,L]=d.useState(!1),[me,$]=d.useState(!1),[g,X]=d.useState(""),[de,re]=d.useState(!1),[D,H]=d.useState(),[Z,ee]=d.useState(!1),[ae,Y]=d.useState(""),[te,Se]=d.useState(0),[Le,fe]=d.useState(""),[Pe,le]=d.useState(!1),he=async B=>{const{data:ge,error:xe}=await R.functions.invoke("custom-otp",{body:{action:"send",email:B.trim(),type:"magiclink"}});return xe||!(ge!=null&&ge.success)?(ge==null?void 0:ge.error)||"Failed to send code":(a({title:"Code sent!",description:"Check your inbox for a sign-in code."}),null)},Oe=async(B,ge)=>{const{data:xe,error:Ne}=await R.functions.invoke("custom-otp",{body:{action:"verify",email:B.trim(),code:ge,type:"magiclink"}});if(Ne||!(xe!=null&&xe.success))return(xe==null?void 0:xe.error)||"Invalid or expired code.";if(xe.token_hash){const{error:ye}=await R.auth.verifyOtp({token_hash:xe.token_hash,type:"magiclink"});if(ye)return ye.message}return null},tt=async B=>{const{data:ge,error:xe}=await R.functions.invoke("custom-otp",{body:{action:"send",email:B.trim(),type:"recovery"}});return xe||!(ge!=null&&ge.success)?(ge==null?void 0:ge.error)||"Failed to send code":(a({title:"Code sent!",description:"Check your inbox for a reset code."}),null)},K=async(B,ge,xe)=>{const{data:Ne,error:ye}=await R.functions.invoke("custom-otp",{body:{action:"verify",email:B.trim(),code:ge,type:"recovery",new_password:xe}});return ye||!(Ne!=null&&Ne.success)?(Ne==null?void 0:Ne.error)||"Failed to reset password.":(a({title:"Password reset!",description:"You can now sign in with your new password."}),null)},[G,Ce]=d.useState(!1),[$e,Qe]=d.useState(!1),He=t.get("tab")==="signup"?"signup":"login",Ae=r4(t.get("role")),bt=t.get("ref"),De=t.get("partner_email"),ot=t.get("partner_name");d.useEffect(()=>{De&&He==="signup"&&!j&&k(De)},[De,He,j]),d.useEffect(()=>{Ae&&He==="signup"&&(E("professional"),w(!0))},[Ae,He]);const mt=B=>{const ge=new URLSearchParams(t);ge.set("tab",B),r(ge),B==="login"?w(!1):Ae||w(!1)},hs=B=>{E(B),w(!0)};d.useEffect(()=>{var B;if(!h&&i&&l&&!G&&((B=i.app_metadata)==null?void 0:B.provider)&&i.app_metadata.provider!=="email"){const xe=new Date(l.created_at),ye=new Date().getTime()-xe.getTime()<12e4,Ve=!(c!=null&&c.onboarding_completed),Xs=sessionStorage.getItem("googleCompletionDone");if(ye&&Ve&&!Xs){Ce(!0);return}}},[h,i,l,c,G]),d.useEffect(()=>{if(!h&&i&&l){if(G||localStorage.getItem("proSignupIntent"))return;if(!l.email_verified&&!x){Z||(ee(!0),Y(l.email));return}if(l.password_reset_required){e("/reset-password");return}const B=t.get("redirectTo");if(B!=null&&B.startsWith("/")&&!B.startsWith("//")){e(B,{replace:!0});return}if(De){e("/profile");return}l.user_type==="professional"?e("/pro/dashboard"):e("/dashboard")}},[i,l,c,u,m,h,e,Z,x,G,De,t]),d.useEffect(()=>{if(te<=0)return;const B=setTimeout(()=>Se(te-1),1e3);return()=>clearTimeout(B)},[te]);const Ft=(B,ge)=>{const xe={};try{Su.parse(B)}catch(Ne){Ne instanceof Lt&&(xe.email=Ne.errors[0].message)}try{t4.parse(ge)}catch(Ne){Ne instanceof Lt&&(xe.password=Ne.errors[0].message)}return C(xe),Object.keys(xe).length===0},Rs=async(B,ge,xe)=>{if(!Ft(B,ge))return;y(!0),_(!0),sessionStorage.setItem("loginFlow","true");const{error:Ne}=await n(B,ge,xe);if(Ne)a({variant:"destructive",title:"Sign in failed",description:Ne.message==="Invalid login credentials"?"Email or password is incorrect. Please try again.":Ne.message});else{a({title:"Welcome back!",description:"You have successfully signed in."});const{data:{session:ye}}=await R.auth.getSession();if(ye!=null&&ye.user){const{data:Ve}=await R.from("profiles").select("password_reset_required").eq("user_id",ye.user.id).single();Ve!=null&&Ve.password_reset_required&&(await R.from("profiles").update({password_reset_required:!1}).eq("user_id",ye.user.id),await p())}}y(!1)},ps=async()=>{var ge,xe;const B=j.trim();if(!B){T(!1);return}try{Su.parse(B)}catch{T(!1);return}L(!0);try{const Ne=await R.functions.invoke("check-email-exists",{body:{email:B}}),ye=((ge=Ne.data)==null?void 0:ge.exists)===!0,Ve=((xe=Ne.data)==null?void 0:xe.is_provisioned)===!0;ye&&Ve?(T(!1),P(!0)):(T(ye),P(!1))}catch{T(!1),P(!1)}L(!1)},ft=async()=>{$(!0);const B=await he(j.trim());B?a({variant:"destructive",title:"Error",description:B}):(X(j.trim()),mt("login")),$(!1)},yt=async B=>{var Ne;if(!Ft(B.email,B.password))return;if(B.password!==B.confirmPassword){C({confirmPassword:"Passwords do not match"});return}if(b==="professional"&&!B.proRole){a({variant:"destructive",title:"Professional type required",description:"Please select your professional type."});return}y(!0);let ge;if((Ne=B.referralCode)!=null&&Ne.trim())try{const{data:ye,error:Ve}=await R.functions.invoke("check-referral-code",{body:{code:B.referralCode.trim()}});Ve?a({variant:"destructive",title:"Could not verify referral code",description:"We'll continue without it. You can add it later in your profile."}):ye!=null&&ye.valid?ge=ye.code:a({variant:"destructive",title:"Invalid referral code",description:"The referral code you entered doesn't exist. You can continue without it."})}catch(ye){console.error("Referral code check error:",ye)}if(M)try{const{data:ye,error:Ve}=await R.functions.invoke("claim-provisioned-user",{body:{email:B.email,password:B.password,firstName:B.firstName,lastName:B.lastName,userType:b,...b==="professional"&&B.proRole?{proRole:B.proRole}:{},...ge?{referredByCode:ge}:{}}});if(Ve||!(ye!=null&&ye.success)){const Xs=(ye==null?void 0:ye.error)||"Failed to set up your account. Please try again.";a({variant:"destructive",title:"Sign up failed",description:Xs}),y(!1);return}I({email:B.email,password:B.password,firstName:B.firstName,lastName:B.lastName,userType:b,proRole:B.proRole,referredByCode:ge});try{await R.functions.invoke("custom-otp",{body:{action:"send",email:B.email,type:"signup"}})}catch(Xs){console.error("Custom OTP send error:",Xs)}Y(B.email),ee(!0),y(!1);return}catch(ye){console.error("Claim provisioned user error:",ye),a({variant:"destructive",title:"Sign up failed",description:"Something went wrong. Please try again."}),y(!1);return}const{error:xe}=await o(B.email,B.password,b,{first_name:B.firstName,last_name:B.lastName,referred_by_code:ge,...b==="professional"&&B.proRole?{pro_role:B.proRole}:{}});if(xe){let ye=xe.message;if(ye.includes("already registered")){b==="professional"&&B.proRole?(localStorage.setItem("proSignupIntent",JSON.stringify({role:B.proRole})),a({title:"Account already exists",description:"Sign in below and we'll help you add a Pro account."}),mt("login")):(ye="An account with this email already exists. Log in and visit your Profile to add a second account type (Buyer or Pro).",a({variant:"destructive",title:"Sign up failed",description:ye})),y(!1);return}a({variant:"destructive",title:"Sign up failed",description:ye}),y(!1);return}try{const{data:ye,error:Ve}=await R.functions.invoke("custom-otp",{body:{action:"send",email:B.email,type:"signup"}});Ve&&console.error("Failed to send custom OTP:",Ve)}catch(ye){console.error("Custom OTP send error:",ye)}Y(B.email),ee(!0),y(!1)},gs=async B=>{var ge;if(!(!i||!l)){Qe(!0);try{let xe;if((ge=B.referralCode)!=null&&ge.trim())try{const{data:Ne}=await R.functions.invoke("check-referral-code",{body:{code:B.referralCode.trim()}});Ne!=null&&Ne.valid&&(xe=Ne.code)}catch{}await R.from("profiles").update({user_type:B.userType}).eq("user_id",i.id),B.userType==="professional"&&B.proRole&&await R.from("professional_profiles").insert({user_id:i.id,pro_role:B.proRole,status:"draft",subscription_tier:"free",is_visible:!1,referred_by_code:xe}),xe&&await R.from("buyer_profiles").update({referred_by_code:xe}).eq("user_id",i.id);try{const{data:Ne}=await R.functions.invoke("auto-link-referral");if(Ne!=null&&Ne.linked){const ye=eu[Ne.pro_role]||Ne.pro_role;a({title:"You've been connected!",description:`Your ${ye} is ready to help you.`})}}catch{}sessionStorage.setItem("googleCompletionDone","true"),Ce(!1),await p(),a({title:"Account set up!",description:"Welcome to MustWants."})}catch(xe){console.error("Google completion error:",xe),a({variant:"destructive",title:"Setup failed",description:"Please try again."})}Qe(!1)}},Gt=async()=>
544{if(Le.length===6){le(!0);try{const{data:B,error:ge}=await R.functions.invoke("custom-otp",{body:{action:"verify",email:ae,code:Le,type:"signup"}});if(ge||!(B!=null&&B.success))a({variant:"destructive",title:"Verification failed",description:(B==null?void 0:B.error)||"Invalid or expired code. Please try again."}),fe("");else{if(a({title:"Email verified!",description:"Your account is ready."}),A){const{error:xe}=await n(A.email,A.password,!0);if(xe){a({variant:"destructive",title:"Sign in failed",description:"Your account is verified but we couldn't sign you in automatically. Please log in."}),I(null),ee(!1),fe(""),mt("login"),le(!1);return}I(null),_(!0),sessionStorage.setItem("loginFlow","true"),await p()}else await p();try{const{data:xe}=await R.functions.invoke("auto-link-referral");if(xe!=null&&xe.linked){const Ne=eu[xe.pro_role]||xe.pro_role;a({title:"You've been connected!",description:`Your ${Ne} is ready to help you.`})}}catch{}}}catch{a({variant:"destructive",title:"Error",description:"Verification failed. Please try again."}),fe("")}le(!1)}},Me=async()=>{Se(60);try{const{data:B,error:ge}=await R.functions.invoke("custom-otp",{body:{action:"send",email:ae,type:"signup"}});ge||!(B!=null&&B.success)?a({variant:"destructive",title:"Could not resend",description:(B==null?void 0:B.error)||"Please try again."}):a({title:"Email resent!",description:"Check your inbox for the verification code."})}catch{a({variant:"destructive",title:"Could not resend",description:"Please try again later."})}};return s.jsxs(s.Fragment,{children:[s.jsx(ec,{...$C.auth,canonicalUrl:"/auth",noIndex:!0}),s.jsx("section",{className:"py-20 bg-muted/30 flex-1",children:s.jsx("div",{className:"container",children:s.jsxs("div",{className:"mx-auto max-w-lg",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-3xl font-heading font-bold mb-2",children:"Welcome to MustWants"}),s.jsx("p",{className:"text-muted-foreground",children:"Sign in or create an account to get started"})]}),G?s.jsx(dt,{children:s.jsx(vt,{className:F("pt-6",He==="signup"&&!v&&"p-8 sm:p-12"),children:s.jsx(QC,{onSubmit:gs,isLoading:$e,userName:(l==null?void 0:l.first_name)||void 0})})}):Z?s.jsx(dt,{children:s.jsx(vt,{className:"pt-6",children:s.jsx(XC,{email:ae,otpValue:Le,onOtpChange:fe,onVerify:Gt,isVerifying:Pe,resendCooldown:te,onResend:Me,onBack:()=>{ee(!1),fe(""),mt("login")},backLabel:"Back to Login",variant:"card"})})}):s.jsx(dt,{children:s.jsx(vt,{className:"pt-6",children:He==="login"?s.jsx(lh,{onSubmit:Rs,isLoading:f,errors:N,onCreateAccount:()=>mt("signup"),onSendMagicCode:he,onVerifyMagicCode:Oe,onSendResetCode:tt,onResetPassword:K,initialMagicEmail:g,onMagicEmailConsumed:()=>X("")}):v?s.jsx(uh,{userType:b,onSubmit:yt,isLoading:f,errors:N,signupEmail:j,onSignupEmailChange:B=>{k(B),T(!1),P(!1)},onEmailBlur:ps,emailCheckLoading:z,emailExists:S,onBack:()=>w(!1),onGoToLogin:()=>mt("login"),onSendMagicLink:ft,sendingVerification:me,defaultReferralCode:bt||void 0,defaultProRole:Ae,defaultFirstName:ot||void 0}):s.jsx(mh,{onSelect:hs,onGoToLogin:()=>mt("login")})})})]})})}),s.jsx(e4,{open:de,onOpenChange:re,defaultRole:D})]})}const n4=()=>{const e=Et();return d.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),s.jsxs(s.Fragment,{children:[s.jsx(ec,{title:"Page Not Found",noIndex:!0}),s.jsx("div",{className:"flex min-h-[60vh] items-center justify-center py-16",children:s.jsxs("div",{className:"container max-w-2xl text-center px-4",children:[s.jsx("div",{className:"mb-6",children:s.jsx("span",{className:"text-8xl md:text-9xl font-heading font-bold text-icon-accent",children:"404"})}),s.jsx("h1",{className:"text-3xl md:text-4xl font-heading font-bold text-foreground mb-4",children:"Oops! Page Not Found"}),s.jsx("p",{className:"text-lg text-muted-foreground mb-8 max-w-md mx-auto",children:"It looks like you've wandered off the map. Don't worry - even the best explorers take a wrong turn sometimes!"}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center items-center",children:[s.jsx(U,{asChild:!0,size:"lg",children:s.jsxs(oe,{to:"/",children:[s.jsx(ns,{className:"mr-2 h-5 w-5"}),"Back to Home"]})}),s.jsx(U,{asChild:!0,variant:"outline",size:"lg",children:s.jsxs(oe,{to:"/find-home",children:[s.jsx(Pf,{className:"mr-2 h-5 w-5"}),"Find a Home"]})})]}),s.jsx("div",{className:"mt-8",children:s.jsxs("button",{onClick:()=>window.history.back(),className:"inline-flex items-center text-mw-black transition-colors hover:text-icon-foreground",children:[s.jsx(eo,{className:"mr-2 h-4 w-4"}),"Go back to previous page"]})}),s.jsxs("div",{className:"mt-12 pt-8 border-t border-border",children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Looking for something specific?"}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-4 text-sm",children:[s.jsx(oe,{to:"/find-pro",className:"text-mw-olive hover:underline",children:"Find a Pro"}),s.jsx(oe,{to:"/resources",className:"text-mw-olive hover:underline",children:"Resources"}),s.jsx(oe,{to:"/faq",className:"text-mw-olive hover:underline",children:"FAQs"}),s.jsx(oe,{to:"/contact",className:"text-mw-olive hover:underline",children:"Contact Us"})]})]})]})})]})},o4=d.lazy(()=>ne(()=>import("./FindProPage-DyjKw78N.js"),__vite__mapDeps([37,1,2,16,38,3,39,18,11,12,5,13,40,23,41,42,43,24,44,4,6,7,45,46,47]))),i4=d.lazy(()=>ne(()=>import("./HomeForSales-ClN9lUsb.js"),__vite__mapDeps([48,1,2,49,29,3,5,6,7]))),l4=d.lazy(()=>ne(()=>import("./HomeForRent-EZyZ5Dfw.js"),__vite__mapDeps([50,1,2,49,47,51,29,52,3,5,6,7]))),c4=d.lazy(()=>ne(()=>import("./FavoritesPage-R9IoXi1k.js"),__vite__mapDeps([53,3,2,1,54,55,16,56,57,58,39,59,60,61,62,38,18,63,64,65,66,67,5,47,51,6,7]))),d4=d.lazy(()=>ne(()=>import("./ResourcesPage-Dcw47XB7.js"),__vite__mapDeps([68,1,2,3,5,6,7]))),u4=d.lazy(()=>ne(()=>import("./AboutPage-i4UToIiC.js"),__vite__mapDeps([69,1,2,70,3,5,6,7]))),m4=d.lazy(()=>ne(()=>import("./ContactPage-Dg6P_S0x.js"),__vite__mapDeps([71,1,2,70,72,73,3,5,6,7]))),f4=d.lazy(()=>ne(()=>import("./FAQPage-DgKRVpzg.js"),__vite__mapDeps([74,1,2,75,34,76,3,5,6,7]))),h4=d.lazy(()=>ne(()=>import("./PoliciesPage-DoGa8xOj.js"),__vite__mapDeps([77,1,2,3,5,6,7]))),Cu=d.lazy(()=>ne(()=>import("./ResetPasswordPage-B9joQFgF.js"),__vite__mapDeps([78,1,2,79,3,5,6,7]))),p4=d.lazy(()=>ne(()=>import("./ProLandingPage-DhAlJXEz.js"),__vite__mapDeps([80,1,2,81,82,83,84,85,29,3,5,6,7]))),g4=d.lazy(()=>ne(()=>
544import("./ProRoleLandingPage-1m-LJXMT.js"),__vite__mapDeps([86,1,2,87,81,88,89,34,90,82,83,84,3,5,6,7]))),x4=d.lazy(()=>ne(()=>import("./AdminPage-CIl-MsIj.js"),__vite__mapDeps([91,1,2,75,92,6,5,93,67,94,95,96,10,97,7,98,70,99,23,3,100,101,41,52,64,15,65,66,17,89,102,34,79,103,76,104,105,106,107,108,12,109,13,57,110,47,51,60,73,111,112,113,46,29,81,18]))),b4=d.lazy(()=>ne(()=>import("./AdminNotificationsPage-DHEEhYIE.js"),__vite__mapDeps([114,1,2,10,5,3,6,7]))),y4=d.lazy(()=>ne(()=>import("./ProfilePage-gUKrhJH6.js"),__vite__mapDeps([115,1,2,116,15,117,105,7,52,73,109,118,8,9,99,97,40,98,70,72,119,3,5,6]))),v4=d.lazy(()=>ne(()=>import("./ProOnboardingPage-B3cyUgmS.js"),__vite__mapDeps([120,1,2,3,5,6,7]))),w4=d.lazy(()=>ne(()=>import("./ProVettingPage-Cv07Kk79.js"),__vite__mapDeps([121,1,2,122,96,10,97,7,98,70,99,23,3,100,123,118,8,9,124,110,125,12,119,126,127,5,6,18])));d.lazy(()=>ne(()=>import("./ProStatusPage-rS5eIkfU.js"),__vite__mapDeps([128,1,2,96,10,97,7,98,70,99,127,3,5,6])));const _4=d.lazy(()=>ne(()=>import("./BuyerDashboardPage-XeXtFjgg.js"),__vite__mapDeps([129,1,2,119,104,130,57,58,39,116,15,117,105,7,52,73,109,23,43,5,17,47,10,131,9,3,6]))),j4=d.lazy(()=>ne(()=>import("./PrioritiesPage-C-75V2fI.js"),__vite__mapDeps([132,1,2,61,62,119,133,10,131,9,57,39,55,3,5,6,7]))),k4=d.lazy(()=>ne(()=>import("./ProDashboardPage-BFxoMqra.js"),__vite__mapDeps([134,1,2,130,57,58,39,42,126,135,110,109,136,5,7,137,62,122,119,3,6]))),N4=d.lazy(()=>ne(()=>import("./ProConnectionsPage-ndQj2kPX.js"),__vite__mapDeps([138,1,2,5,15,102,7,73,126,137,62,119,106,3,6]))),S4=d.lazy(()=>ne(()=>import("./ProClientDetailPage-BKOSedb7.js"),__vite__mapDeps([139,3,2,1,97,7,70,5,75,93,67,137,62,63,54,59,60,73,6]))),C4=d.lazy(()=>ne(()=>import("./ProAnalyticsPage-CF9UoRV3.js"),__vite__mapDeps([140,1,2,126,136,5,7,137,62,119,101,73,6,85,141,142,3]))),E4=d.lazy(()=>ne(()=>import("./ProSubscriptionPage-DP4D09qC.js"),__vite__mapDeps([143,1,2,90,88,89,137,62,119,3,5,6,7]))),A4=d.lazy(()=>ne(()=>import("./ProBlogPage-BqQcRrZS.js"),__vite__mapDeps([144,1,2,94,119,7,3,5,6]))),T4=d.lazy(()=>ne(()=>import("./ProHomepagePage-6wAOz_SX.js"),__vite__mapDeps([145,1,2,10,135,110,109,66,3,5,6,7]))),R4=d.lazy(()=>ne(()=>import("./ProListingsPage-Yvcz9cC6.js"),__vite__mapDeps([146,1,2,15,107,147,5,4,3,6,7,119,106,17]))),Eu=d.lazy(()=>ne(()=>import("./ProListHomePage-Cui5he-5.js"),__vite__mapDeps([148,1,2,123,149,40,147,5,4,3,6,7,99,110,73]))),Au=d.lazy(()=>ne(()=>import("./ListHomePage-C8C2FhGs.js"),__vite__mapDeps([150,1,2,123,149,40,147,5,4,3,6,7,99,110,90,61,62,73]))),P4=d.lazy(()=>ne(()=>import("./MyListingsPage-Clif5NSI.js"),__vite__mapDeps([151,1,2,119,15,107,147,5,4,3,6,7,61,62,90,108,81,106,17]))),I4=d.lazy(()=>ne(()=>import("./MyProsPage-CvkkvFX7.js"),__vite__mapDeps([152,1,2,119,23,3,5,6,7]))),M4=d.lazy(()=>ne(()=>import("./ForSaleByOwnerPage-DGkRRNFY.js"),__vite__mapDeps([153,1,2,154,5,3,6,7]))),L4=d.lazy(()=>ne(()=>import("./ForRentByOwnerPage-B-b5E_MA.js"),__vite__mapDeps([155,1,2,154,5,3,6,7]))),O4=d.lazy(()=>ne(()=>import("./HomeDetailPage-aXWOn_fQ.js"),__vite__mapDeps([156,1,2,54,3,5,6,7]))),D4=d.lazy(()=>ne(()=>import("./ProWebpageRoutePage-B9DBsvM3.js"),__vite__mapDeps([157,1,2,158,3,100,124,27,5,6,7,18]))),F4=d.lazy(()=>ne(()=>import("./ApproveInfoSharingPage-BpqsOZRe.js"),__vite__mapDeps([159,1,2,3,5,6,7]))),$4=d.lazy(()=>ne(()=>import("./PodcastPage-BnK6hyf7.js"),__vite__mapDeps([160,1,2,45,46,87,3,5,6,7]))),B4=d.lazy(()=>ne(()=>import("./ChecklistsPage-CxlRX166.js"),__vite__mapDeps([161,1,2,87,104,61,62,162,3,5,6,7]))),z4=d.lazy(()=>ne(()=>import("./ChecklistDetailPage-DFgxgxsL.js"),__vite__mapDeps([163,1,2,61,62,45,46,117,104,162,3,5,6,7]))),H4=d.lazy(()=>ne(()=>import("./BlogPage-Dwo_VDRG.js"),__vite__mapDeps([164,1,2,36,3,5,6,7]))),ei=d.lazy(()=>ne(()=>import("./BlogPostPage-Ssr_PDhh.js"),__vite__mapDeps([165,1,2,87,103,76,45,46,166,15,3,5,6,7]))),Tu=d.lazy(()=>ne(()=>import("./BlogEditorPage-qxkCuw9A.js"),__vite__mapDeps([167,1,2,92,125,12,6,47,142,166,110,103,76,109,99,73,3,5,7]))),U4=d.lazy(()=>ne(()=>import("./PartnersPage-D9X7vd1Z.js"),__vite__mapDeps([168,1,2,5,45,46,32,3,6,7]))),V4=d.lazy(()=>ne(()=>import("./CalculatorsPage-DpRvRIEe.js"),__vite__mapDeps([169,1,2,87,170,3,62,83,5,6,7]))),q4
544=d.lazy(()=>ne(()=>import("./CalculatorDetailPage-D9IUxruK.js"),__vite__mapDeps([171,1,2,87,45,46,170,3,62,83,5,6,7]))),W4=/(Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed)/i,gr=(e,t)=>{const r=`lazy-import-retry:${t}`;return d.lazy(async()=>{try{const a=await e();return typeof window<"u"&&window.sessionStorage.removeItem(r),a}catch(a){const n=a instanceof Error?a.message:String(a);if(W4.test(n)&&typeof window<"u"){if(!(window.sessionStorage.getItem(r)==="1"))return window.sessionStorage.setItem(r,"1"),window.location.reload(),new Promise(()=>{});window.sessionStorage.removeItem(r)}throw a}})},Ru=gr(()=>ne(()=>import("./HousingCostsMapPage-CCSVys6Q.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])),"housing-costs-map"),G4=gr(()=>ne(()=>import("./ProfessionalsMapPage-BVS1PsT0.js"),__vite__mapDeps([172,1,2,3,14,15,16,11,12,5,13,44,41,87,6,7,18])),"professionals-map"),Y4=gr(()=>ne(()=>import("./CommunityMapPage-6VVnZHtq.js"),__vite__mapDeps([173,1,2,87,45,46,3,174,81,5,41,6,7,18])),"community-map"),K4=gr(()=>ne(()=>import("./SubmitCommunityPage-C8a4dZCs.js"),__vite__mapDeps([175,1,2,174,52,3,5,6,7])),"submit-community"),Z4=gr(()=>ne(()=>import("./CoverageMapPage-Y9fWuIHB.js"),__vite__mapDeps([176,1,2,111,112,3,177,17,67,52,5,6,7,18])),"coverage-map"),Q4=gr(()=>ne(()=>import("./MlsCoveragePage-BFtFPI4r.js"),__vite__mapDeps([178,1,2,113,3,177,111,5,6,7,18])),"mls-coverage"),X4=gr(()=>ne(()=>import("./FindHomePage-3pUOa2CQ.js"),__vite__mapDeps([179,1,2,16,38,3,39,18,15,56,57,58,59,60,133,10,131,9,62,5,47,6,7])),"find-home");function J4({children:e}){const{pathname:t}=Et();return s.jsx(hh,{children:e},t)}function e3(){const{search:e,hash:t}=Et(),r=new URLSearchParams(e);return r.set("tab","signup"),s.jsx(fa,{to:`/auth?${r.toString()}${t}`,replace:!0})}function t3(){var t;const e=Et();return e.pathname==="/blog"?s.jsx(_h,{}):e.pathname.startsWith("/blog/")?s.jsx(Fh,{preview:((t=e.state)==null?void 0:t.blogPostPreview)??null}):s.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",role:"status","aria-live":"polite","aria-label":"Loading page",children:s.jsx("div",{className:"h-10 w-10 rounded-full border-2 border-muted border-t-foreground animate-spin"})})}const s3=new Yu({defaultOptions:{queries:{staleTime:5*60*1e3,retry:1,refetchOnWindowFocus:!1}}}),r3=()=>s.jsx(hh,{children:s.jsx(Ku,{client:s3,children:s.jsx(Rl,{children:s.jsx(a_,{children:s.jsxs(o_,{children:[s.jsx(x1,{}),s.jsx(K1,{}),s.jsxs(Rg,{children:[s.jsx(tj,{}),s.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 focus:z-[100] focus:bg-background focus:px-3 focus:py-2 focus:rounded-sm focus:shadow-md",children:"Skip to main content"}),s.jsx(jj,{}),s.jsx(sj,{}),s.jsx(bj,{}),s.jsx(mj,{}),s.jsx(J4,{children:s.jsx(d.Suspense,{fallback:s.jsx(t3,{}),children:s.jsxs(Pg,{children:[s.jsx(J,{path:"/pro-site/:subdomain",element:s.jsx(D4,{})}),s.jsx(J,{path:"/all-pros",element:s.jsx(fa,{to:"/pro",replace:!0})}),s.jsx(J,{path:"/signup",element:s.jsx(e3,{})}),s.jsxs(J,{element:s.jsx(ou,{}),children:[s.jsx(J,{path:"/",element:s.jsx(BC,{})}),s.jsx(J,{path:"/about",element:s.jsx(u4,{})}),s.jsx(J,{path:"/contact",element:s.jsx(m4,{})}),s.jsx(J,{path:"/faq",element:s.jsx(f4,{})}),s.jsx(J,{path:"/policies",element:s.jsx(h4,{})}),s.jsx(J,{path:"/auth",element:s.jsx(a4,{})}),s.jsx(J,{path:"/auth/reset",element:s.jsx(Cu,{})}),s.jsx(J,{path:"/reset-password",element:s.jsx(Cu,{})}),s.jsx(J,{path:"/pro",element:s.jsx(p4,{})}),s.jsx(J,{path:"/pro/:role",element:s.jsx(g4,{})}),s.jsx(J,{path:"/list-home/for-sale-by-owner",element:s.jsx(M4,{})}),s.jsx(J,{path:"/list-home/for-rent-by-owner",element:s.jsx(L4,{})}),s.jsx(J,{path:"/homes/:slug",element:s.jsx(O4,{})}),s.jsx(J,{path:"/resources",element:s.jsx(d4,{})}),s.jsx(J,{path:"/homes-for-sale",element:s.jsx(i4,{})}),s.jsx(J,{path:"/homes-for-rent",element:s.jsx(l4,{})}),s.jsx(J,{path:"/find-home/home-for-sales",element:s.jsx(fa,{to:"/homes-for-sale",replace:!0})}),s.jsx(J,{path:"/find-home/home-for-rent",element:s.jsx(fa,{to:"/homes-for-rent",replace:!0})}),s.jsx(J,{path:"/podcast",element:s.jsx(fa,{to:"/resources/podcast",replace:!0})}),s.jsx(J,{path:"/resources/podcast",element:s.jsx($4,{})}),s.jsx(J,{path:"/resources/checklists",element:s.jsx(B4,{})}),s.jsx(J,{path:"/resources/checklists/:type",element:s.jsx(z4,{})}),s.jsx(J,{path:"/blog",element:s.jsx(H4,{})}),s.jsx(J,{path:"/blog/:authorSlug/:date/:slug",element:s.jsx(ei,{})}),s.jsx(J,{path:"/blog/:slug",element:s.jsx(ei,{})}),s.jsx(J,{path:"/resources/partners",element:s.jsx(U4,{})}),s.jsx(J,{path:"/resources/calculators",element:s.jsx(V4,{})}),s.jsx(J,{path:"/resources/calculators/:slug",element:s.jsx(q4,{})}),s.jsx(J,{path:"/resources/community-map",element:s.jsx(Y4,{})}),s.jsx(J,{path:"/resources/mls-coverage",element:s.jsx(Q4,{})}),s.jsx(J,{path:"/resources/submit-community",element:s.jsx(K4,{})})]}),s.jsxs(J,{element:s.jsx(gS,{}),children:[s.jsx(J,{path:"/find-home",element:s.jsx(X4,{})}),s.jsx(J,{path:"/find-pro",element:s.jsx(o4,{})}),s.jsx(J,{path:"/resources/coverage-map",element:s.jsx(Z4,{})})]}),s.jsxs(J,{element:s.jsx(xS,{}),children:[s.jsx(J,{path:"/approve-sharing/:connectionId",element:s.jsx(F4,{})}),s.jsx(J,{path:"/pro/onboarding",element:s.jsx(v4,{})}),s.jsx(J,{path:"/pro/vetting",element:s.jsx(w4,{})}),s.jsx(J,{path:"/blog/new",element:s.jsx(Tu,{})}),s.jsx(J,{path:"/blog/edit/:id",element:s.jsx(Tu,{})}),s.jsx(J,{path:"/blog/preview/:id",element:s.jsx(ei,{})}),s.jsx(J,{path:"/list-home",element:s.jsx(Au,{})}),s.jsx(J,{path:"/list-home/:id",element:s.jsx(Au,{})}),s.jsx(J,{path:"/profile",element:s.jsx(y4,{})})]}),s.jsx(J,{element:s.jsx(bS,{}),children:s.jsx(J,{path:"/favorites",element:s.jsx(c4,{})})}),s.jsxs(J,{element:s.jsx(yS,{}),children:[s.jsx(J,{path:"/dashboard",element:s.jsx(_4,{})}),s.jsx(J,{path:"/priorities",element:s.jsx(j4,{})}),s.jsx(J,{path:"/my-pros",element:s.jsx(I4,{})}),s.jsx(J,{path:"/my-listings",element:s.jsx(P4,{})})]}),s.jsxs(J,{element:s.jsx(vS,{}),children:[s.jsx(J,{path:"/pro/dashboard",element:s.jsx(k4,{})}),s.jsx(J,{path:"/pro/connections",element:s.jsx(N4,{})}),s.jsx(J,{path:"/pro/connections/:id",element:s.jsx(S4,{})}),s.jsx(J,{path:"/pro/analytics",element:s.jsx(C4,{})}),s.jsx(J,{path:"/pro/subscription",element:s.jsx(E4,{})}),s.jsx(J,{path:"/pro/blog",element:s.jsx(A4,{})}),s.jsx(J,{path:"/pro/homepage",element:s.jsx(T4,{})}),s.jsx(J,{path:"/pro/listings",element:s.jsx(R4,{})}),s.jsx(J,{path:"/pro/list-home",element:s.jsx(Eu,{})}),s.jsx(J,{path:"/pro/list-home/:id",element:s.jsx(Eu,{})})]}),s.jsxs(J,{element:s.jsx(wS,{}),children:[s.jsx(J,{path:"/admin",element:s.jsx(x4,{})}),s.jsx(J,{path:"/admin/notifications",element:s.jsx(b4,{})})]}),s.jsx(J,{path:"/resources/maps",element:s.jsx(Ru,{})}),s.jsx(J,{path:"/resources/maps/housing",element:s.jsx(Ru,{})}),s.jsx(J,{path:"/resources/maps/professionals",element:s.jsx(G4,{})}),s.jsx(J,{element:s.jsx(ou,{}),children:s.jsx(J,{path:"*",element:s.jsx(n4,{})})})]})})})]})]})})})})});lw({dsn:"https://c0c6946ca974a7920db4c9d6249a1bff@o4509707376984064.ingest.us.sentry.io/4510903226728448",sendDefaultPii:!0}
544);const Pu=Tw(window.location.hostname),Iu=document.getElementById("root");if(Iu){const e=Qu(Iu);if(Pu){const t=q.lazy(()=>ne(()=>import("./ProWebpagePage-CM1mNAzg.js"),__vite__mapDeps([158,1,2,3,100,124,27,5,6,7,18]))),r=new Yu;e.render(s.jsx(q.StrictMode,{children:s.jsxs(ni,{children:[s.jsx(Ku,{client:r,children:s.jsx(q.Suspense,{fallback:s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-mw-gray",children:s.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-mw-olive"})}),children:s.jsx(t,{subdomain:Pu})})}),s.jsx(ad,{}),s.jsx(nd,{})]})}))}else e.render(s.jsx(q.StrictMode,{children:s.jsxs(ni,{children:[s.jsx(r3,{}),s.jsx(ad,{}),s.jsx(nd,{})]})}))}export{ns as $,Ip as A,sr as B,$N as C,_t as D,ES as E,it as F,Vo as G,ec as H,We as I,$C as J,$s as K,qt as L,Af as M,fh as N,j2 as O,Fn as P,XN as Q,jl as R,Pf as S,zl as T,Al as U,eS as V,V as W,Mt as X,Q as Y,u2 as Z,kf as _,U as a,vp as a$,Gs as a0,zS as a1,HS as a2,Dp as a3,Te as a4,kt as a5,FS as a6,$S as a7,Op as a8,RS as a9,Uj as aA,Vj as aB,ya as aC,eu as aD,cs as aE,Ba as aF,_l as aG,to as aH,Nl as aI,Ai as aJ,za as aK,Il as aL,Ni as aM,_S as aN,It as aO,Tf as aP,H3 as aQ,q3 as aR,Cf as aS,Nf as aT,Zs as aU,U3 as aV,Pk as aW,hp as aX,pp as aY,xp as aZ,bp as a_,xC as aa,vl as ab,uo as ac,Nj as ad,dt as ae,vt as af,a2 as ag,ro as ah,ba as ai,wl as aj,L_ as ak,or as al,yn as am,Ei as an,hN as ao,cN as ap,ao as aq,p3 as ar,Hl as as,Jf as at,Mo as au,eo as av,m3 as aw,j3 as ax,g3 as ay,Hj as az,bo as b,l2 as b$,gp as b0,St as b1,Hr as b2,Rl as b3,Pi as b4,Ii as b5,Tn as b6,en as b7,kl as b8,no as b9,WS as bA,lC as bB,Rf as bC,x2 as bD,ue as bE,I2 as bF,Jp as bG,Gi as bH,_2 as bI,r2 as bJ,S2 as bK,y2 as bL,Ok as bM,_p as bN,$k as bO,Bk as bP,zk as bQ,G3 as bR,Y3 as bS,K3 as bT,Kl as bU,cS as bV,dS as bW,d2 as bX,pr as bY,e4 as bZ,p2 as b_,P2 as ba,D3 as bb,A2 as bc,ks as bd,Ns as be,Ss as bf,V3 as bg,Ir as bh,yp as bi,i2 as bj,W3 as bk,k2 as bl,Wj as bm,If as bn,rC as bo,aC as bp,aE as bq,cn as br,sC as bs,GS as bt,YS as bu,KS as bv,nE as bw,C2 as bx,fu as by,zi as bz,F as c,KN as c$,Si as c0,Cp as c1,Ep as c2,tu as c3,Pp as c4,Ye as c5,h2 as c6,Dl as c7,Ci as c8,L2 as c9,E2 as cA,I3 as cB,z3 as cC,TS as cD,X3 as cE,F3 as cF,$3 as cG,Ml as cH,o2 as cI,L3 as cJ,an as cK,T3 as cL,x3 as cM,Kj as cN,Lh as cO,Mh as cP,am as cQ,R3 as cR,er as cS,Tp as cT,Yo as cU,jS as cV,VN as cW,qN as cX,WN as cY,su as cZ,YN as c_,w3 as ca,n2 as cb,wn as cc,Em as cd,Wa as ce,J3 as cf,eE as cg,tE as ch,cu as ci,Q3 as cj,AS as ck,Zl as cl,Ql as cm,Wr as cn,ka as co,Ef as cp,Sl as cq,RN as cr,Xl as cs,zn as ct,LS as cu,O3 as cv,so as cw,A3 as cx,IN as cy,nS as cz,B3 as d,Wo as d0,GN as d1,y3 as d2,hr as d3,c2 as d4,Z3 as d5,Mp as d6,rE as d7,iu as d8,lu as d9,pC as dA,hC as dB,CS as dC,C3 as dD,M_ as dE,P3 as dF,sE as da,on as db,Vr as dc,T2 as dd,_h as de,S3 as df,Dh as dg,cC as dh,vr as di,Ea as dj,El as dk,BN as dl,Fh as dm,Zj as dn,Oj as dp,N3 as dq,s2 as dr,v3 as ds,hd as dt,Sf as du,Er as dv,b3 as dw,Go as dx,ZN as dy,Cl as dz,io as e,Ha as f,lo as g,Ua as h,Va as i,M3 as j,h3 as k,At as l,gt as m,ms as n,f3 as o,ut as p,ht as q,qr as r,oo as s,R as t,be as u,ds as v,Lk as w,Wl as x,Gl as y,SS 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.