PageSourceSearch

https://portal.commoninterest.com/assets/dashboard-CROK4glW.js

js commoninterest.com collected 2026-09-24 13:28:22 UTC 98,787 bytes, 2 lines download raw bytes

1import{r as x,j as e,bi as ne,q as y,F as f,cB as T,u as j,B as S,v as Q,aR as oe,a$ as X,S as B,aS as A,aT as Ye,aU as Je,aV as Ze,dv as es,dw as te,d2 as ae,dx as ss,dy as ts,dz as as,dA as ns,s as ie,bf as z,z as is,k as F,C as ls,aF as Be,ab as _e,ac as Le,af as Ee,ag as Me,aj as Ae,ap as os,ar as rs,dB as ds,dC as cs,dD as ms,dE as xs,dF as hs,M as ps,bg as fs,d1 as gs,dG as bs,V as us}from"./elements-DVh2jUIM.js";import{u as js}from"./useRedesign-DVyq07A4.js";import{L as w,G as $,W as Y,q as re,k as he,j as H,B as $e,N as De,a_ as K,x as Ve,p as ws,T as ce,m as Fe,O as Ns}from"./index-DeQvL4I7.js";import{u as le}from"./useAttachmentViewer-CxkfXrEj.js";import{u as _}from"./useSelectedProperty-XA-z48Yi.js";import{M as We,A as pe}from"./MakeAPayment-CfZVjQGg.js";import{M as Oe}from"./ManagePayment-DWws-XIx.js";import{u as de}from"./usePaymentProviders-un4zwaLi.js";import{U as fe}from"./UpcomingCharges-Bw9OfKNs.js";import{A as ge}from"./authorization-CE7gncHO.js";import{u as be}from"./useAuthorization-D7B2eQha.js";import{u as ue}from"./useLayoutContext-IVuJXBSD.js";import{u as je}from"./useIsMobile-Davbtvz5.js";import{B as vs,C as we,a as ys}from"./BoardTaskDecisionModals-CVmVCPnH.js";import{u as ze}from"./useBoardTasksWidgetEnabled-DUd7o5l-.js";import{W as N}from"./Widget-Bforis7T.js";import{a as Is,B as me}from"./BoardTabPills-BNINpPaI.js";import{C as P,u as ks,a as Cs,g as Ss,B as Rs,b as Ts,c as qs}from"./boardTaskCategories-DqMD85n5.js";import"./NoteContent-T4pgf4E0.js";import{S as Bs}from"./SendMessageModal-CN5Qqgxv.js";import{u as _s,a as Ls}from"./portal-requests-TK48q8QE.js";import{F as Es}from"./FilterableGridWidget-DTFOQF4W.js";import{n as Ms,A as xe}from"./requests-list-utils-CVz2BN7s.js";import{m as As,i as $s}from"./inbox-utils-bRYThakR.js";import{f as Ds,p as Vs}from"./parseISO-D3n5M4GH.js";import{u as Fs,i as Ws}from"./useCommunityFeedEnabled-Fzx8B_Q-.js";import{a as Os}from"./reservations-CbBsI4-7.js";import"./grids-DXrfAsUA.js";import"./startOfDay-AazlW55I.js";import"./board-arc-requests-DriAzWiq.js";import"./useMutation-CfDMVIpo.js";import"./board-requests-BufpzAUw.js";import"./DeclineModal-BTeqVDlm.js";import"./index.esm-BsOhZrKM.js";import"./CollectionDecisionModal-BjmBmGZR.js";import"./ViolationDecisionModal-DySxPNvo.js";import"./WorkOrderDecisionModal-C8f6YJrL.js";import"./FilterableGridFilters-FmWNR7j1.js";import"./board-portal-requests-BfgGLja0.js";import"./index-DWdRGcKw.js";import"./MessageForm-BADqpkoZ.js";import"./useMessageComposer-DeQiPBu-.js";import"./constructNow-BCdMewCy.js";import"./endOfMonth-ypFnROgy.js";import"./endOfDay-DXHghz6c.js";import"./useIsNonHomeownerBoardMember-BFprLkBV.js";function g({id:s,children:t}){const a=x.Children.toArray(t).find(d=>x.isValidElement(d)&&d.type===g.Title),n=x.Children.toArray(t).filter(d=>x.isValidElement(d)&&d.type===g.HeaderButton),i=x.Children.toArray(t).find(d=>x.isValidElement(d)&&d.type===g.Body),l=x.Children.toArray(t).find(d=>x.isValidElement(d)&&d.type===g.Footer);return e.jsxs("div",{id:s,className:"rounded-md bg-widget-bg flex flex-col justify-between",style:{boxShadow:"0 2px 8px 0 rgba(0, 0, 0, 0.12)"},children:[e.jsxs("div",{children:[(a||n.length>0)&&e.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 px-4 md:px-6 min-h-[65px] flex-wrap",children:[a,e.jsx("div",{className:"flex flex-row gap-4 flex-wrap",children:n})]}),i]}),l]})}function zs({children:s,tooltip:t}){return e.jsxs("div",{className:"flex items-center",children:[e.jsx("h2",{className:"text-base font-medium text-base-header mr-3",children:s}),t&&e.jsx(ne,{children:t})]})}function Hs({children:s}){return e.jsx("div",{children:s})}function Us({children:s,className:t}){return e.jsx("div",{className:y("w-full",t),children:s})}function Ps({children:s,linkTo:t,linkText:a}){return e.jsxs("div",{className:y(s?"justify-between":"justify-end","flex items-center px-4 py-5 text md:px-6"),children:[s,t&&e.jsx(w,{to:t,className:"mr-1","data-iq":"widget-link",children:e.jsxs("p",{className:"text-base-link whitespace-nowrap text-sm",children:[e.jsx("span",{children:a}),e.jsx(f,{className:"ml-2",icon:T})]})})]})}g.Title=zs;g.HeaderButton=Hs;g.Body=Us;g.Footer=Ps;function Gs(){var u,I,q,W,D,E,M,V;const{t:s}=j(),{showAttachments:t}=le(),[a]=_(),n=$(),[i,l]=x.useState(1),[d,o]=x.useState(!0),[r,c]=x.useState([]),[m,h]=x.useState(),p=x.useCallback(async()=>
1{if(n)try{o(!0);const R=await Y.getBoardArcRequests({associationId:n==null?void 0:n.id,closed:!1,myItems:!0,availableActions:["vote"]});c(R),h(R[0])}catch(R){console.error(R)}finally{o(!1)}},[n]);x.useEffect(()=>{a&&p()},[a]),x.useEffect(()=>{l(r.findIndex(R=>R.actionItemId===(m==null?void 0:m.actionItemId))+1)},[m]);const b=()=>{if(!m)return;const R=r.indexOf(m);if(R!==-1){const k=(R+1)%r.length,J=r[k];h(J)}},v=()=>{if(!m)return;const R=r.indexOf(m);if(R!==-1){const k=(R-1+r.length)%r.length,J=r[k];h(J)}};return n?e.jsxs(g,{id:"widget__arc-voting",children:[e.jsx(g.Title,{tooltip:s("main.dashboard.widget.boardArcVoting.tooltip"),children:s("main.dashboard.widget.boardArcVoting.voting",{type:n.arcName??"ARC"})}),m&&e.jsx(g.HeaderButton,{children:e.jsx(w,{to:`/board/arcs/${m.actionItemId}`,"data-qa":"link-to-arc-voting",children:e.jsx(S,{children:s("board.arcVoting.vote")})})}),e.jsx(g.Body,{children:!d&&r.length>0?e.jsxs("div",{className:"md:px-6 px-2 flex flex-col justify-between items-center h-full",children:[e.jsx("p",{className:"text-center my-2 text-base-fg md:text-sm text-[12px]",children:s("board.arcVoting.widget.description",{type:n.arcName||"ARC",index:i,length:r.length})}),e.jsxs("div",{className:"w-full px-1 flex items-center justify-between max-w-full",children:[r.length>1&&e.jsx("button",{className:"text-base-fg self-center flex items-center",onClick:v,"data-qa":"shuffle-left-arrow",children:e.jsx(f,{icon:Q,className:"transform scale-y-[2] scale-x-[1.25]"})}),e.jsxs("div",{className:"flex flex-col md:items-center md:justify-around h-full md:px-4 px-6 w-full md:flex-row md:gap-6 gap-2",children:[e.jsxs("div",{className:"flex flex-col md:flex-row w-full md:gap-5",children:[e.jsxs("div",{"data-qa":"widget__arc-voting__xn",className:"w-full h-full flex flex-col items-center md:items-end text-base-header",children:[e.jsx("p",{className:"font-normal whitespace-nowrap hidden md:block",children:s("main.dashboard.widget.boardArcVoting.request",{type:n.arcName??"ARC"})}),e.jsx("p",{className:"text-4xl whitespace-nowrap","aria-live":"polite","data-qa":"balance",children:s("board.arcVoting.widget.xnId",{id:m==null?void 0:m.actionItemId})})]}),m&&e.jsxs("button",{id:"arc__open-attachments",onClick:()=>t({actionItemId:m.actionItemId,title:s("board.arcVoting.popoverTitle",{type:n.arcName??"ARC"})}),children:[e.jsx("span",{className:"sr-only",children:s("board.arcVoting.downloadAttachments")}),e.jsx(f,{icon:oe,className:"text-base-fg text-base"})]})]}),e.jsx("div",{className:"w-1 h-full bg-base-border hidden md:block"}),e.jsxs("div",{"data-qa":"widget__arc-voting__address",className:"w-full h-full text-base-fg text-[14px] text-center md:mt-0 -mt-2 md:text-sm md:text-left",children:[(m==null?void 0:m.propertyAddress)&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"line-clamp-1",children:(u=m==null?void 0:m.propertyAddress)==null?void 0:u.address1}),e.jsx("p",{children:(I=m==null?void 0:m.propertyAddress)==null?void 0:I.address2}),e.jsxs("p",{className:"line-clamp-1",children:[(q=m==null?void 0:m.propertyAddress)==null?void 0:q.city,","," ",(W=m==null?void 0:m.propertyAddress)==null?void 0:W.stateProvince," ",(D=m==null?void 0:m.propertyAddress)==null?void 0:D.postalCode]})]}),e.jsx("p",{className:"line-clamp-1",children:a==null?void 0:a.associationName})]})]}),r.length>1&&e.jsx("button",{className:"text-base-fg self-center flex items-center",onClick:b,"data-qa":"shuffle-right-arrow",children:e.jsx(f,{icon:X,className:"transform scale-y-[2] scale-x-[1.25]"})})]}),e.jsx("div",{className:"flex items-center justify-center w-full py-5 gap-3"})]}):!d&&r.length===0?e.jsx("div",{className:"flex items-center justify-center w-full h-full text-sm font-light",children:e.jsx("p",{children:s("main.dashboard.widget.boardArcVoting.noArcs",{type:n.arcName??"ARC"})})}):e.jsx("div",{className:"flex justify-center items-center h-full",children:e.jsx(B,{})})}),e.jsx(g.Footer,{linkTo:"/board/arcs",linkText:s("main.dashboard.widget.boardArcVoting.arcManagement",{type:n.arcName??"ARC"}).toString(),children:m!=null&&m.votes?e.jsxs("div",{className:"flex gap-2",children:[e.jsx(A,{variant:"success",text:((E=m==null?void 0:m.votes)==null?void 0:E.approve.length.toString())??"0",icon:Ye}),e.jsx(A,{variant:"danger",text:((M=m==null?void 0:m.votes)==null?void 0:M.decline.length.toString())??"0",icon:Je}),e.jsx(A,{variant:"passive",text:((V=m==null?void 0:m.votes)==null?void 0:V.remaining.toString())??"0",icon:Ze})]}):null})]}):null}function Ks(){const{t:s}=j(),t=$(),[a,n]=x.useState(!1),[i,l]=x.useState([]),d=(t==null?void 0:t.arcName)??"ARC",o=[{category:"arcRequests",title:`${d} Management`,count:0,link:{to:"/board/arcs",text:`All ${d}s`}},{category:"workOrders",title:"Work Orders",count:0,link:{to:"/board/work-orders",text:"All Work Orders"}},{category:"inspections",title:"Inspections",count:0,link:{to:"/board/inspections",text:"All Inspections"}},{category:"violations",title:"Violations",count:0,link:{to:"/board/violations",text:"All Violations"}},{category:"collections",title:"Collections",count:0,link:{to:"/board/collections",text:"All Collections"}},{category:"invoices",title:"Invoices",count:0,link:{to:"/board/invoices",text:"All Invoices"}}],r=c=>o.map(m=>{const h=c.find(({categories:p})=>p===m.category);return h?{...m,count:h.count}:null}
1).filter(Boolean);return x.useEffect(()=>{t&&(n(!0),re.getBoardActions(t.id).then(r).then(l).catch(console.error).finally(()=>n(!1)))},[t]),!a&&!i.length?null:e.jsxs(g,{id:"board-actions-widget",children:[e.jsx(g.Title,{tooltip:s("main.dashboard.widget.boardAreaTasks.tooltip"),children:"Board Tasks"}),e.jsx(g.Body,{className:"sm:h-full",children:a?e.jsx("div",{className:"w-full h-[304px] flex justify-center items-center",children:e.jsx(B,{})}):e.jsx("table",{id:"board-actions",className:"w-full","data-qa":"board-actions-widget",children:e.jsx("tbody",{children:i.map(({category:c,count:m,title:h,link:p})=>e.jsxs("tr",{className:"border-b border-widget-border",id:c,"data-qa":`board-actions-row-${c}`,children:[e.jsx("td",{className:"px-4 py-3",width:50,children:m>0?e.jsx("span",{"data-qa":`board-actions-count-${c}`,className:y("inline-flex h-5 w-auto min-w-5 px-1 items-center justify-center rounded-full bg-error text-xs font-normal leading-none text-white"),children:m}):e.jsx("div",{"data-qa":`board-actions-count-${c}`})}),e.jsx("td",{className:"py-3",children:s(h)}),e.jsx("td",{className:"px-4 py-3 flex justify-end",children:e.jsxs(w,{to:p.to,className:"text-sm text-base-link max-sm:w-8 text-right",children:[e.jsx("span",{className:"max-sm:sr-only",children:s(p.text)}),e.jsx(f,{className:"ml-2",icon:T})]})})]},c))})})}),e.jsx(g.Footer,{linkTo:"/board/to-do-list",linkText:"More Items"})]})}function Qs({items:s,currentPage:t,totalItems:a,className:n="",itemsPerPage:i,emptyMessage:l,onChangePage:d,headerRenderer:o,rowRenderer:r,actionRenderer:c}){const{t:m}=j(),h=a?Math.ceil(a/i):1,[p,b]=x.useState(t);return x.useEffect(()=>{const v=Math.max(1,Math.min(p,h));d(v)},[p]),x.useEffect(()=>{b(t)},[t]),e.jsxs("div",{className:y("flex flex-col bg-widget-bg border border-widget-border rounded-md",n),style:{boxShadow:"0 2px 8px 0 rgba(0, 0, 0, 0.12)"},children:[e.jsx("div",{className:"flex justify-between items-center p-4 border-b border-widget-border",children:e.jsx(o,{})}),e.jsx("div",{className:"flex flex-col divide-y border-b border-widget-border divide-widget-border",children:s.length>0?s.map((v,u)=>e.jsx("div",{children:e.jsx(r,{item:v})},Xs(`plw-${u}-`))):e.jsx("p",{className:"px-4 sm:self-center py-5 text-input-fg text-sm font-light",children:l??m("main.pagination.empty")})}),e.jsxs("div",{className:"flex justify-between items-center px-4 py-2",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsxs("button",{className:"px-2 py-1 text-sm text-input-fg",onClick:()=>d(1),disabled:t===1,children:[e.jsx("span",{className:"sr-only",children:m("main.pagination.first")}),e.jsx(f,{icon:es})]}),e.jsxs("button",{className:"px-1 py-1 text-sm text-input-fg",onClick:()=>d(t-1),disabled:t===1,children:[e.jsx("span",{className:"sr-only",children:m("main.pagination.previous")}),e.jsx(f,{icon:te})]}),e.jsxs("p",{className:"px-2 py-1 space-x-2 text-sm text-input-fg",children:[e.jsx("span",{className:"hidden sm:inline-block",children:m("main.pagination.page")}),e.jsxs("label",{children:[e.jsx("span",{className:"sr-only",children:m("main.pagination.page")}),e.jsx("input",{type:"number",className:"text-input-fg bg-input-bg border rounded-lg border-input-border w-12 py-1 focus:outline-none focus:ring-input-active focus:border-input-active",value:p,onChange:v=>{b(parseInt(v.target.value))}})]}),e.jsx("span",{className:"hidden sm:inline-block",children:m("main.pagination.of",{total:h})})]}),e.jsxs("button",{className:"px-1 py-1 text-sm text-input-fg",onClick:()=>d(t+1),disabled:t===h,children:[e.jsx("span",{className:"sr-only",children:m("main.pagination.next")}),e.jsx(f,{icon:ae})]}),e.jsxs("button",{className:"px-2 py-1 text-sm text-input-fg",onClick:()=>d(h),disabled:t===h,children:[e.jsx("span",{className:"sr-only",children:m("main.pagination.last")}),e.jsx(f,{icon:ss})]})]}),c&&e.jsx("div",{className:"flex items-center px-2",children:e.jsx(c,{})})]})]})}function Xs(s=""){return s+Math.random().toString(36).substring(2,9)}const Ne=5,Ys={page:0,lastPage:0,totalItems:0,member:[]};function Js({className:s}){const{t}=j(),[a,n]=x.useState(1),[i,l]=x.useState(Ys),[d]=_();return x.useEffect(()=>{d!=null&&d.ownerId&&he.getMessages({ownerId:d==null?void 0:d.ownerId,pageSize:Ne,page:a,"createdDate.after":new Date(Date.now()-1440*60*60*1e3),includeUnread:!0}).then(l).catch(console.error)},[a,d]),e.jsx(Qs,{className:s,items:i.member,currentPage:a,totalItems:i.totalItems,itemsPerPage:Ne,emptyMessage:t("main.dashboard.widget.messages.empty"),onChangePage:n,headerRenderer:Zs,rowRenderer:et,actionRenderer:st})}function Zs(){const{t:s}=j();return e.jsxs("div",{className:"flex gap-3 items-center lg:mb-[.5vw] sm:mb-12 w-full",children:[e.jsx("p",{className:"text-base font-medium text-base-header",children:"Inbox"}),e.jsx(ne,{children:e.jsx("p",{children:s("main.dashboard.widget.messages.tooltip")})})]})}function et({item:s}){return e.jsxs(w,{to:`/my/messages/${s.actionItemId}`,className:"flex flex-wrap sm:flex-nowrap justify-between w-full sm:w-auto gap-1 sm:gap-4 px-4 py-2 hover:bg-base-hover",children:[e.jsx("p",{className:"w-full flex-[0_0_100%] sm:flex-auto text-sm text-widget-fg sm:w-24",children:s.created.toLocaleDateString()}
1),e.jsxs("div",{className:"flex-1 sm:flex-auto sm:w-full flex h-10 overflow-hidden",children:[s.unread?e.jsx("p",{className:"w-6",children:e.jsx(f,{icon:ts,className:"w-3 text-error"})}):e.jsx("p",{className:"mr-6"}),e.jsxs("div",{className:"w-full overflow-hidden",children:[e.jsx("p",{className:y("text-sm text-base-header",s.unread&&"font-medium"),children:s.messageType}),e.jsx("p",{className:"text-sm text-widget-fg line-clamp-1 text-left",children:s.messageText})]})]}),e.jsx("p",{className:"text-lg flex flex-[0_0_18px] sm:flex-auto items-center",children:s.unread?e.jsx(f,{icon:ns,className:"text-widget-icon"}):e.jsx(f,{icon:as,className:"text-widget-icon/70"})})]})}function st(){return e.jsx(w,{to:"/community/requests",className:"mr-1","data-iq":"widget-link",children:e.jsxs("p",{className:"text-base-link whitespace-nowrap text-sm",children:["View All",e.jsx(f,{className:"ml-2",icon:T})]})})}function tt(){var b,v;const{t:s}=j(),{width:t}=ie(),[a]=_(),n=H(u=>u.accounts),[i,l]=x.useState(1),[d,o]=x.useState([]),[r,c]=x.useState(n.at(0)),{hasVantacaPay:m}=de(r);x.useEffect(()=>{if(!a){c(n.at(0));return}o(n.filter(({accountNumber:u})=>u===a.accountNumber)),c(n.find(({accountNumber:u})=>u===a.accountNumber)??n.at(0))},[n,a]),x.useEffect(()=>{l(d.findIndex(({accountWithSubCode:u})=>u===(r==null?void 0:r.accountWithSubCode))+1)},[r]);const h=()=>{const u=d.findIndex(({accountWithSubCode:I})=>I===(r==null?void 0:r.accountWithSubCode));if(u!==-1){const I=(u+1)%d.length,q=d[I];c(q)}},p=()=>{const u=d.findIndex(({accountWithSubCode:I})=>I===(r==null?void 0:r.accountWithSubCode));if(u!==-1){const I=(u-1+d.length)%d.length,q=d[I];c(q)}};return!a||!a.accountNumber?null:e.jsxs(g,{children:[e.jsx(g.Title,{tooltip:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:s("main.dashboard.widget.payments.tooltip.basicInfo")}),e.jsxs("p",{className:"m-3 text-sm",children:["•"," ",s("main.dashboard.widget.payments.tooltip.dropDownReference")]}),e.jsxs("p",{className:"m-3 text-sm",children:["• ",s("main.dashboard.widget.payments.tooltip.balances")]})]}),children:s("main.dashboard.widget.payments.title")}),m&&e.jsx(g.HeaderButton,{children:e.jsx(Oe,{selectedAccount:r??void 0})}),e.jsx(g.HeaderButton,{children:e.jsx(We,{account:r??void 0,className:"flex flex-row-reverse"})}),e.jsx(g.Body,{children:e.jsxs("div",{className:"md:px-6 px-2 flex flex-col justify-between items-center h-full",children:[e.jsx("p",{className:"text-center my-2 text-base-fg md:text-sm text-[12px]",children:s("main.dashboard.widget.payments.ledgerOf",{index:i,total:d.length})}),e.jsxs("div",{className:"w-full px-1 flex items-center justify-between max-w-full",children:[e.jsxs("button",{className:"text-base-fg self-center",onClick:p,"data-qa":"shuffle-left-arrow",children:[e.jsx("span",{className:"sr-only",children:s("Previous account")}),e.jsx(f,{icon:Q,className:"transform scale-y-[2] scale-x-[1.25]"})]}),e.jsxs("div",{className:"flex flex-col md:items-center md:justify-around h-full md:px-4 px-6 w-full md:flex-row md:gap-6 gap-2",children:[e.jsxs("div",{className:"w-full h-full flex flex-col items-center md:items-end text-base-header",children:[e.jsxs("p",{className:"font-normal whitespace-nowrap hidden md:block",children:[s("billing.accountOverview.accountBalance"),":"]}),e.jsx("p",{className:y((r==null?void 0:r.blockLedger)&&"text-error","text-4xl mb-2"),"aria-live":"polite","data-qa":"balance",children:r!=null&&r.blockLedger?s("billing.blockedLedgers.blocked"):(r==null?void 0:r.balance)!==void 0?z(r.balance):""})]}),e.jsx("div",{className:"w-1 h-full bg-base-border"}),e.jsxs("div",{className:"w-full h-full text-base-fg text-[14px] text-center md:mt-0 -mt-2 md:text-sm md:text-left",children:[e.jsxs("p",{className:"md:whitespace-nowrap font-bold line-clamp-1","data-qa":"account-number",children:[s("billing.accountOverview.accountNumber"),":"," ",r?r.accountWithSubCode:e.jsx("span",{className:"bg-base-fg/60",children:" ".repeat(10)})]}),e.jsx("p",{"data-qa":"address",className:"line-clamp-1 flex flex-col",children:r?e.jsxs(e.Fragment,{children:[e.jsx("span",{id:"address1",children:(b=r.propertyAddress)==null?void 0:b.address1}),e.jsx("span",{id:"address2",children:(v=r.propertyAddress)==null?void 0:v.address2})]}):e.jsx("span",{className:"bg-base-fg/60",children:" ".repeat(10)})}),e.jsx("p",{"data-qa":"assoc-name",className:"line-clamp-1",children:r?r.associationName:e.jsx("span",{className:"bg-base-fg/60",children:" ".repeat(10)})})]})]}),e.jsxs("button",{className:"text-base-fg self-center",onClick:h,"data-qa":"shuffle-right-arrow",children:[e.jsx("span",{className:"sr-only",children:s("Next account")}
1),e.jsx(f,{icon:X,className:"transform scale-y-[2] scale-x-[1.25]"})]})]}),e.jsxs("div",{className:"flex items-center justify-center w-full py-5 gap-3",children:[e.jsx(fe,{accountNumber:r==null?void 0:r.accountNumber,ownerId:r==null?void 0:r.ownerId,subLedgerId:r==null?void 0:r.subLedgerId,className:"self-center",isModalView:!0,qaAttribute:"upcoming-charges"}),e.jsx(ne,{children:s("billing.paymentForm.toolTipMessage.upcomingCharges")})]})]})}),e.jsx(g.Footer,{linkTo:"/billing/account-overview",linkText:t>767?s("main.dashboard.widget.payments.viewAll.long").toString():s("main.dashboard.widget.payments.viewAll.short").toString(),children:r&&e.jsx(pe,{account:r})})]})}function at(){const{t:s}=j(),[t]=_(),[a,n]=x.useState(!1),[i,l]=x.useState(null),[d,o]=x.useState([]),r=x.useCallback(async()=>{const c=new Date(new Date().setDate(new Date().getDate()-30));try{if(!t)return;n(!0),l(null);const{member:m}=await Y.getHomeownerRequests({pageSize:3,"submitted.after":c,propertyId:t==null?void 0:t.propertyId});o(m)}catch(m){m instanceof Error?l(m):l(new Error("Unknown error"))}finally{n(!1)}},[t]);return x.useEffect(()=>{r()},[t]),e.jsxs(g,{children:[e.jsx(g.Title,{tooltip:s("main.dashboard.widget.requests.tooltip"),children:"Recent Requests"}),e.jsx(g.HeaderButton,{children:e.jsx(w,{to:"/community/new-request",children:e.jsx(S,{size:"sm",children:s("main.dashboard.widget.requests.new")})})}),e.jsx(g.Body,{children:a?e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx(B,{})}):i?e.jsx(nt,{error:i,resetErrorBoundary:r}):e.jsx(it,{requests:d})}),e.jsx(g.Footer,{linkTo:"/community/requests",linkText:"View All Requests"})]})}function nt({error:s,resetErrorBoundary:t}){const{t:a}=j();return console.error(s),e.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-sm font-light",children:[e.jsx("p",{children:a("main.dashboard.widget.requests.error")}),e.jsx(S,{variant:"primaryLink",onClick:t,className:"mt-8",children:a("main.dashboard.widget.requests.tryAgain")})]})}function it({requests:s}){const{t}=j();return(s==null?void 0:s.length)===0?e.jsx("div",{className:"flex items-center justify-center h-full text-sm font-light p-4",children:t("main.dashboard.widget.requests.empty")}):e.jsx("ul",{children:s==null?void 0:s.map(a=>e.jsx("li",{className:"border-b border-base-border py-3",children:e.jsx(lt,{...a})},a.id))})}function lt(s){const{t}=j(),{type:a,subject:n,status:i,submitted:l}=s;return e.jsxs("div",{className:"flex-col sm:flex-row flex justify-between items-start sm:items-center gap-1 md:px-6 px-4",children:[e.jsxs("div",{className:"flex",children:[e.jsx("span",{className:"hidden sm:flex items-center text-base-icon",children:e.jsx(f,{icon:is,className:"h-6 w-6 pr-5"})}),e.jsxs("div",{title:`${a} - ${n}`,children:[e.jsxs(w,{to:"/community/requests",className:"text-base-link font-normal line-clamp-1 text-left",children:[a," - ",n]}),e.jsx("div",{className:"text-base-fg text-sm",children:t("main.dashboard.widget.requests.submittedOn",{date:F(l,{naive:!0,format:"numeric"})})})]})]}),e.jsx("div",{className:"text-sm text-base-fg",children:i})]})}function ot(){const{t:s}=j(),[t]=_(),[a,n]=x.useState(!1),[i,l]=x.useState([]);return x.useEffect(()=>{t&&(n(!0),$e.getReservations(t==null?void 0:t.associationId,{pageSize:3,currentUserOnly:!0,"sort.field":"submitted","sort.order":"descending"}).then(d=>l(d.member)).catch(console.error).finally(()=>n(!1)))},[t]),e.jsxs(g,{children:[e.jsx(g.Title,{tooltip:s("main.dashboard.widget.reservations.tooltip"),children:"Recent Reservations"}),e.jsx(g.HeaderButton,{children:e.jsx(w,{to:"/community/new-request",children:e.jsx(S,{size:"sm",children:s("main.dashboard.widget.reservations.new")})})}),e.jsxs(g.Body,{children:[a&&e.jsx("div",{className:"flex items-center justify-center h-full text-sm font-light",children:e.jsx(B,{})}),i.length===0&&e.jsx("div",{className:"flex items-center justify-center h-full text-sm font-light p-4",children:s("main.dashboard.widget.reservations.noReservations")}),i.length>0&&e.jsx("ul",{children:i.map(d=>d.status!=="doNotShow"&&e.jsx("li",{className:"border-b border-base-border py-3",children:e.jsx(rt,{...d})},d.id))})]}),e.jsx(g.Footer,{linkTo:"/community/calendar",linkText:"View Calendar"})]})}function rt({title:s,amenity:t,status:a,start:n}){const{t:i}=j();return e.jsxs("div",{className:"flex-col sm:flex-row flex justify-between items-start sm:items-center gap-1 md:px-6 px-4",children:[e.jsxs("div",{className:"flex",children:[e.jsx("span",{className:"hidden sm:flex items-center text-base-icon",children:e.jsx(f,{icon:ls,className:"h-6 w-6 pr-5"})}),e.jsxs("div",{title:`${t.name}${s?" - ":""}${s}`,children:[e.jsxs(w,{to:"/community/requests",className:"text-base-link font-normal line-clamp-1 text-left",children:[t.name,s?" - ":"",s]}),e.jsxs("div",{className:"text-base-fg text-sm",children:[i("main.dashboard.widget.reservations.scheduledFor")," ",F(n,{naive:!0,format:"numeric"})]})]})]}),e.jsx("div",{className:"text-sm text-base-fg",children:i(`main.reservationStatus.${a}`)})]})}const dt=()=>{const{embedded:s}=De(),{setPageTitle:t}=ue(),{user:a}=be(),n=$();x.useEffect(()=>(t(`Welcome, ${(a==null?void 0:a.userName)??"Neighbor!"}`),()=>{t("")}
1),[a]);const i=(o,r)=>n==null?void 0:n.pages.some(c=>c.legacyController===o&&c.legacyAction===r),l=[i("Homeowner_v2","Billing")&&e.jsx(tt,{},"pay-widget"),i("Homeowner_v2","GeneralRequest")&&e.jsx(at,{},"requests-widget"),i("Homeowner_v2","ReservationRequest")&&e.jsx(ot,{},"reservations-widget")].filter(Boolean),d=n!=null&&n.isBoardMember||n!=null&&n.isArcCommitteeMember?[e.jsx(Ks,{},"board-actions-widget"),(n==null?void 0:n.arcVotingEnabled)&&i("Board_v2","ActionItems_ARC")&&e.jsx(Gs,{},"arc-voting-widget")].filter(Boolean):[];return e.jsx(ge,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:y(s&&"p-4 ","bg-base-bg grid grid-cols-1 lg:grid-cols-2 gap-4"),children:l.length>0&&d.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col gap-y-4",children:l}),!s&&e.jsx("div",{className:"flex flex-col gap-y-4",children:d})]}):e.jsxs(e.Fragment,{children:[l,!s&&d]})}),e.jsx("div",{className:"w-full",children:e.jsx(Js,{})})]})})},ct=()=>{const{t:s}=j(),[t]=_(),a=$(),[n,i]=x.useState(1),[l,d]=x.useState(!0),[o,r]=x.useState([]),[c,m]=x.useState(),{width:h}=ie(),p=x.useCallback(async()=>{if(a)try{d(!0);const u=await Y.getBoardArcRequests({associationId:a==null?void 0:a.id,closed:!1,myItems:!0,availableActions:["vote"]});r(u),m(u[0])}catch(u){console.error(u)}finally{d(!1)}},[a]);x.useEffect(()=>{t&&p()},[p,t]),x.useEffect(()=>{i(o.findIndex(u=>u.actionItemId===(c==null?void 0:c.actionItemId))+1)},[o,c]);const b=()=>{if(!c)return;const u=o.indexOf(c);if(u!==-1){const I=(u+1)%o.length,q=o[I];m(q)}},v=()=>{if(!c)return;const u=o.indexOf(c);if(u!==-1){const I=(u-1+o.length)%o.length,q=o[I];m(q)}};return a?e.jsxs(g,{id:"widget__arc-voting",children:[e.jsx(g.Title,{tooltip:s("main.dashboard.widget.boardArcVoting.tooltip"),children:s("main.dashboard.widget.boardArcVoting.voting",{type:a.arcName??"ARC"})}),c&&o&&e.jsx(g.HeaderButton,{children:h>K?e.jsxs(w,{to:"/board/arcs","data-qa":"link-to-arc-voting",className:"text-base-link font-semibold",children:[s("main.dashboard.widget.boardArcVoting.arcManagement",{type:a.arcName??"ARC"}).toString(),e.jsx(f,{icon:T,className:"ml-2"})]}):e.jsx(ve,{arcRequests:o,currentIndex:n,onShuffleLeft:v,onShuffleRight:b,t:s,association:a})}),e.jsx(g.Body,{children:!l&&o.length>0?e.jsxs("div",{className:"flex flex-col tablet:px-6 px-4",children:[e.jsxs("div",{className:"w-full flex tablet:flex-row flex-col tablet:items-center tablet:justify-start max-w-full",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(pt,{arcRequests:o,currentIndex:n,t:s,association:a}),e.jsx(mt,{currentArc:c,association:a,t:s})]}),e.jsx(xt,{currentArc:c,selectedProperty:t,association:a,t:s,arcRequests:o,currentIndex:n}),o.length>1&&h>K&&e.jsx("div",{className:"flex items-start gap-2 pt-1",children:e.jsx(ve,{arcRequests:o,currentIndex:n,onShuffleLeft:v,onShuffleRight:b,t:s,association:a})})]}),e.jsx(ht,{currentArc:c,t:s})]}):!l&&o.length===0?e.jsxs("div",{className:"flex flex-col tablet:px-6 px-4",children:[e.jsx("div",{className:"w-full flex tablet:flex-row flex-col tablet:items-center tablet:justify-start max-w-full",children:e.jsx("div",{className:"flex items-center justify-center w-full min-h-[120px] text-sm font-light",children:e.jsx("p",{className:"text-center",children:s("main.dashboard.widget.boardArcVoting.noArcs",{type:a.arcName??"ARC"})})})}),e.jsx("div",{className:"pt-6"})]}):e.jsx("div",{className:"flex justify-center items-center h-full",children:e.jsx(B,{})})}),e.jsx(g.Footer,{children:c&&e.jsx(w,{to:`/board/arcs/${c.actionItemId}`,"data-qa":"link-to-arc-voting",children:e.jsx(S,{variant:"secondary",children:s("board.arcVoting.vote")})})})]}):null};function mt({currentArc:s,association:t,t:a}){const{showAttachments:n}=le();return e.jsxs("div",{className:"flex flex-col gap-1 tablet:border-r-2 tablet:border-b-0 border-b-2 border-base-border pb-4 tablet:pb-0 tablet:pr-6","data-qa":"widget__arc-voting__xn",children:[e.jsx("p",{className:"whitespace-nowrap hidden md:block",children:a("main.dashboard.widget.boardArcVoting.request",{type:t.arcName??"ARC"})}),e.jsx("p",{className:"text-4xl font-medium whitespace-nowrap","aria-live":"polite","data-qa":"balance",children:a("board.arcVoting.widget.xnId",{id:s==null?void 0:s.actionItemId})}),s&&e.jsxs("button",{className:"cursor-pointer flex items-center gap-3 text-base-link",id:"arc__open-attachments",onClick:()=>n({actionItemId:s.actionItemId,title:a("board.arcVoting.popoverTitle",{type:t.arcName??"ARC"})}),children:[e.jsx("span",{children:a("board.arcVoting.viewAttachments")}),e.jsx(f,{icon:oe,className:"text-base"})]})]})}function xt({currentArc:s,selectedProperty:t,association:a,t:n,arcRequests:i,currentIndex:l}){var d,o,r,c,m;return e.jsxs("div",{"data-qa":"widget__arc-voting__address",className:"w-full tablet:px-6 px-0 space-y-1 max-w-56 pt-2 tablet:pt-0",children:[e.jsx("p",{className:"text-sm text-base-fg/70 mb-2",children:n("board.arcVoting.widget.description",{type:a.arcName??"ARC",index:l,length:i.length})}),(s==null?void 0:s.propertyAddress)&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"line-clamp-1",children:(d=s==null?void 0:s.propertyAddress)==null?void 0:d.address1}),e.jsx("p",{children:(o=s==null?void 0:s.propertyAddress)==null?void 0:o.address2}),e.jsxs("p",{className:"line-clamp-1 truncate",children:[(r=s==null?void 0:s.propertyAddress)==null?void 0:r.city,","," ",(c=s==null?void 0:s.propertyAddress)==null?void 0:c.stateProvince," ",(m=s==null?void 0:s.propertyAddress)==null?void 0:m.postalCode]})]}),e.jsx("p",{className:"line-clamp-1",children:t==null?void 0:t.associationName})]})}function ht({currentArc:s,t}){var a,n,i;return e.jsxs("div",{className:"flex items-start gap-2 pt-6",children:[e.jsx(A,{variant:"success",text:t("board.arcVoting.widget.approved",{count:((a=s==null?void 0:s.votes)==null?void 0:a.approve.length)??0})}),e.jsx(A,{variant:"danger",text:t("board.arcVoting.widget.declined",{count:((n=s==null?void 0:s.votes)==null?void 0:n.decline.length)??0})}),e.jsx(A,{variant:"passive",text:t("board.arcVoting.widget.pending",{count:((i=s==null?void 0:s.votes)==null?void 0:i.remaining)??0})})]})}function pt({arcRequests:s,currentIndex:t,t:a,association:n}){const{width:i}=ie();return i>=K?null:e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"my-2 md:text-sm text-[12px]",children:a("board.arcVoting.widget.description",{type:(n==null?void 0:n.arcName)||"ARC",index:t,length:s.length})}),e.jsxs(w,{to:"/board/arcs","data-qa":"link-to-arc-voting",className:"text-base-link font-semibold",children:[a("main.dashboard.widget.boardArcVoting.arcManagement",{type:(n==null?void 0:n.arcName)??"ARC"}).toString(),e.jsx(f,{icon:T,className:"ml-2"})]})]})}function ve({arcRequests:s,currentIndex:t,onShuffleLeft:a,onShuffleRight:n,t:i,association:l}){return s.length<=1?null:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{className:y("w-8 h-8 rounded-full flex items-center justify-center transition-colors","bg-base-bg border border-base-border hover:bg-base-fg/5",t===1&&"text-base-fg/40 cursor-not-allowed bg-base-fg/5"),onClick:a,disabled:t===1,"data-qa":"shuffle-left-arrow",children:[e.jsx("span",{className:"sr-only",children:i("board.arcVoting.widget.previousRequest").replace("{{type}}",(l==null?void 0:l.arcName)??"ARC")}),e.jsx(f,{icon:Q,className:"text-sm"})]}),e.jsxs("button",{className:y("w-8 h-8 rounded-full flex items-center justify-center transition-colors","bg-base-bg border border-base-border hover:bg-base-fg/5",t===s.length&&"text-base-fg/40 cursor-not-allowed bg-base-fg/5"),onClick:n,disabled:t===s.length,"data-qa":"shuffle-right-arrow",children:[e.jsx("span",{className:"sr-only",children:i("board.arcVoting.widget.nextRequest").replace("{{type}}",(l==null?void 0:l.arcName)??"ARC")}),e.jsx(f,{icon:X,className:"text-sm"})]})]})}const ft=()=>{const{t:s}=j(),t=$(),[a,n]=x.useState(!1),[i,l]=x.useState([]),d=x.useMemo(()=>{const r=(t==null?void 0:t.arcName)??"ARC";return[{category:"arcRequests",title:`${r} Management`,count:0,link:{to:"/board/arcs",text:`All ${r}s`}},{category:"invoices",title:"Invoices",count:0,link:{to:"/board/invoices",text:"All Invoices"}},{category:"workOrders",title:"Work Orders",count:0,link:{to:"/board/work-orders",text:"All Work Orders"}},{category:"collections",title:"Collections",count:0,link:{to:"/board/collections",text:"All Collections"}},{category:"inspections",title:"Inspections",count:0,link:{to:"/board/inspections",text:"All Inspections"}},{category:"violations",title:"Violations",count:0,link:{to:"/board/violations",text:"All Violations"}}]},[t==null?void 0:t.arcName]),o=x.useCallback(r=>d.map(c=>{const m=r.find(({categories:h})=>h===c.category);return m?{...c,count:m.count}:null}
1).filter(Boolean),[d]);return x.useEffect(()=>{t&&(n(!0),re.getBoardActions(t.id).then(o).then(l).catch(console.error).finally(()=>n(!1)))},[t,o]),!a&&!i.length?null:e.jsxs(g,{id:"board-actions-widget",children:[e.jsx(g.Title,{tooltip:s("main.dashboard.widget.boardAreaTasks.tooltip"),children:s("main.dashboard.widget.boardAreaTasks.title")}),e.jsx(g.HeaderButton,{children:e.jsxs(w,{to:"/board/to-do-list",className:"text-base-link font-semibold",children:[e.jsx("span",{children:s("main.dashboard.widget.boardAreaTasks.moreItems")}),e.jsx(f,{className:"ml-2",icon:T})]})}),e.jsx(g.Body,{className:"sm:h-full",children:a?e.jsx("div",{className:"w-full h-[304px] flex justify-center items-center",children:e.jsx(B,{})}):e.jsx("div",{className:"px-6",children:e.jsx("table",{id:"board-actions",className:"w-full mb-8","data-qa":"board-actions-widget",children:e.jsx("tbody",{children:i.map(({category:r,count:c,title:m,link:h})=>e.jsxs("tr",{className:"border-b border-widget-border last:border-b-1 last:pb-2",id:r,"data-qa":`board-actions-row-${r}`,children:[e.jsx("td",{className:"pl-6 pr-3 py-4 w-1",children:c>0?e.jsx("span",{"data-qa":`board-actions-count-${r}`,className:y("inline-flex h-6 w-auto min-w-7 items-center justify-center rounded-full bg-primary text-xs font-normal leading-none text-white"),children:c}):e.jsx("div",{"data-qa":`board-actions-count-${r}`})}),e.jsx("td",{className:"py-4 font-medium",children:s(m)}),e.jsx("td",{className:"px-6 py-4 flex justify-end",children:e.jsx(w,{to:h.to,className:"text-sm text-base-link max-sm:w-8 text-right",children:e.jsx("span",{className:"max-sm:sr-only text-base-link",children:s("main.dashboard.widget.boardAreaTasks.viewAll")})})})]},r))})})})})]})},ye=5,gt=3,Ie={page:0,lastPage:0,totalItems:0,member:[]},bt=()=>{const{t:s}=j(),[t,a]=x.useState(!1),[n,i]=x.useState(1),[l,d]=x.useState(Ie),[o]=_();x.useEffect(()=>{i(1)},[o==null?void 0:o.ownerId]),x.useEffect(()=>{if(!(o!=null&&o.ownerId)){d(Ie),a(!1);return}a(!0),he.getMessages({ownerId:o.ownerId,pageSize:ye,page:n,"createdDate.after":new Date(Date.now()-1440*60*60*1e3),includeUnread:!0}).then(d).catch(console.error).finally(()=>a(!1))},[n,o==null?void 0:o.ownerId]);const r=l.totalItems?Math.ceil(l.totalItems/ye):1;return e.jsxs(g,{children:[e.jsx(g.Title,{tooltip:s("main.dashboard.widget.messages.tooltip"),children:s("main.dashboard.widget.messages.title")}),e.jsx(g.HeaderButton,{children:e.jsxs(w,{to:"/community/requests",className:"text-base-link font-semibold",children:[e.jsx("span",{children:s("main.dashboard.widget.messages.viewAll")}),e.jsx(f,{className:"ml-2",icon:T})]})}),e.jsxs(g.Body,{children:[t&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx(B,{})}),!t&&l.member.length===0&&e.jsx("div",{className:"flex items-center justify-center h-full text-sm font-light p-4",children:e.jsx("p",{className:"text-center",children:s("main.dashboard.widget.messages.empty")})}),l.member.length>0&&e.jsx("ul",{className:"px-6",children:l.member.map((c,m)=>e.jsx("li",{className:"border-b border-base-border py-2 hover:bg-base-hover",children:e.jsx(ut,{...c})},`${c.actionItemId}-${m}`))})]}),e.jsx(g.Footer,{children:l.member.length>0&&e.jsx(jt,{numberOfPages:r,currentPage:n,onChangePage:i})})]})},ut=({actionItemId:s,created:t,messageType:a,messageText:n,unread:i})=>e.jsxs(w,{to:`/my/messages/${s}`,className:"flex items-center justify-between gap-5 px-4",children:[e.jsx(f,{icon:Be,className:y("text-button-icon bg-gray-100 rounded-full p-4 h-5 w-5",i&&"text-primary")}),e.jsxs("div",{className:"flex-1 overflow-hidden",children:[e.jsxs("div",{className:"flex justify-between mb-1",children:[e.jsx("p",{className:y("text-base-header",i&&"font-bold"),children:a}),e.jsx("p",{className:"text-sm text-base-fg",children:t.toLocaleDateString()})]}),e.jsx("p",{className:"block text-base-fg line-clamp-1 truncate",children:n})]})]}),jt=({numberOfPages:s,currentPage:t,onChangePage:a})=>{const{t:n}=j(),i=je(),l=()=>a(t-1),d=()=>a(t+1),o=x.useMemo(()=>{const c=[];if(s<=gt)return Array.from({length:s},(v,u)=>u+1);const m=Math.max(t-1,2),h=Math.min(t+1,s-1),p=m>2,b=h<s-1;c.push(1),p&&c.push("...");for(let v=m;v<=h;v++)c.push(v);return b&&c.push("..."),s>1&&c.push(s),c},[t,s]),r=x.useMemo(()=>Array.from({length:s},(c,m)=>m+1),[s]);return e.jsxs("div",{className:"flex justify-between items-center gap-2 flex-wrap",children:[i?e.jsx(S,{onClick:l,disabled:t===1,variant:"passiveOutline",size:"sm","aria-label":n("main.pagination.previous"),children:e.jsx(f,{icon:te})}):e.jsx(S,{onClick:l,disabled:t===1,variant:"passiveOutline",startIcon:e.jsx(f,{icon:te}),size:"sm",children:n("main.pagination.previous")}),e.jsx("div",{className:"flex gap-2",children:o.map((c,m)=>{if(c==="...")return e.jsxs(_e,{as:"div",className:"relative",children:[e.jsx(Le,{children:e.jsx(S,{variant:"passiveOutline",size:"sm",children:"..."})}),e.jsx(Ee,{as:x.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:e.jsx(Me,{className:"absolute w-[120px] max-h-96 overflow-auto bottom-full mb-2 z-10 rounded-md bg-widget-bg text-base border shadow-lg focus:outline-none",children:e.jsx("div",{className:"flex flex-col gap-2 p-1",children:r.map(p=>e.jsx(Ae,{children:e.jsx("button",{className:"py-1 rounded-md transition-all duration-200 hover:bg-base-hover",onClick:()=>a(p),children:n("main.pagination.pageNumber",{page:p})})},p))})})})]},`ellipsis-${m}`);const h=c===t;return e.jsx(S,{onClick:()=>a(c),variant:h?"primary":"passiveOutline",className:h?"bg-gray-900 hover:bg-gray-900/90":"",size:"sm","aria-label":`Page ${c}`,"aria-current":h?"page":void 0,children:c},c)})}),i?e.jsx(S,{onClick:d,disabled:t===s,variant:"passiveOutline",size:"sm","aria-label":n("main.pagination.next"),children:e.jsx(f,{icon:ae})}):e.jsx(S,{onClick:d,disabled:t===s,variant:"passiveOutline",endIcon:e.jsx(f,{icon:ae}),size:"sm",children:n("main.pagination.next")})]})},wt=()=>{const{t:s}=j(),[t]=_(),a=H(p=>p.accounts),[n,i]=x.useState(1),[l,d]=x.useState([]),[o,r]=x.use
1State(a.at(0)),{hasVantacaPay:c}=de(o);x.useEffect(()=>{if(!t){r(a.at(0));return}d(a.filter(({accountNumber:p})=>p===t.accountNumber)),r(a.find(({accountNumber:p})=>p===t.accountNumber)??a.at(0))},[a,t]),x.useEffect(()=>{if(!l.length||!o){i(l.length?1:0);return}const p=l.findIndex(({accountWithSubCode:b})=>b===o.accountWithSubCode);i(p>=0?p+1:0)},[o,l]);const m=()=>{const p=l.findIndex(({accountWithSubCode:b})=>b===(o==null?void 0:o.accountWithSubCode));if(p!==-1){const b=(p+1)%l.length,v=l[b];r(v)}},h=()=>{const p=l.findIndex(({accountWithSubCode:b})=>b===(o==null?void 0:o.accountWithSubCode));if(p!==-1){const b=(p-1+l.length)%l.length,v=l[b];r(v)}};return!t||!t.accountNumber?null:e.jsx(g,{children:e.jsx(g.Body,{children:e.jsxs("div",{className:"flex flex-col tablet:flex-row justify-start items-center h-auto tablet:min-h-[239px] px-10 py-8 text-sm",children:[e.jsxs("div",{className:"px-1 flex flex-col tablet:flex-row items-center justify-start w-full tablet:w-[1200px] h-full",children:[e.jsx(Nt,{currentAccount:o,t:s,filteredAccounts:l,currentIndex:n,onShuffleLeft:h,onShuffleRight:m}),e.jsxs("div",{className:"w-full tablet:w-1/2 h-full-mt-2 tablet:mt-0 text-left tablet:text-left pl-0 tablet:pl-8 pt-4 tablet:pt-0 flex flex-col justify-center",children:[e.jsx(vt,{filteredAccounts:l,currentIndex:n,onShuffleLeft:h,onShuffleRight:m,t:s}),e.jsx(yt,{currentAccount:o,t:s})]})]}),e.jsx(It,{currentAccount:o,hasVantacaPay:c})]})})})};function Nt({currentAccount:s,t,filteredAccounts:a,currentIndex:n,onShuffleLeft:i,onShuffleRight:l}){return e.jsxs("div",{className:"w-full tablet:w-1/2 h-full flex flex-col justify-between border-b tablet:gap-4 tablet:border-b-0 tablet:border-r tablet:border-input-border pb-4 tablet:pb-0",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-normal whitespace-nowrap block",children:t("billing.accountOverview.accountBalance")}),e.jsx(ne,{children:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:t("main.dashboard.widget.payments.tooltip.basicInfo")}),e.jsxs("p",{className:"m-3 text-sm",children:["•"," ",t("main.dashboard.widget.payments.tooltip.dropDownReference")]}),e.jsxs("p",{className:"m-3 text-sm",children:["• ",t("main.dashboard.widget.payments.tooltip.balances")]})]})})]}),e.jsx("div",{className:"tablet:hidden flex justify-self-center",children:e.jsx(He,{filteredAccounts:a,currentIndex:n,onShuffleLeft:i,onShuffleRight:l,t})})]}),e.jsx("h2",{className:y((s==null?void 0:s.blockLedger)&&"text-error","text-2xl tablet:text-[42px] mb-2 font-medium"),"aria-live":"polite","data-qa":"balance",children:s!=null&&s.blockLedger?t("billing.blockedLedgers.blocked"):(s==null?void 0:s.balance)!==void 0?z(s.balance):""})]}),e.jsx("div",{className:"flex items-center w-full pt-2 gap-3 flex-wrap",children:e.jsx(fe,{accountNumber:s==null?void 0:s.accountNumber,ownerId:s==null?void 0:s.ownerId,subLedgerId:s==null?void 0:s.subLedgerId,qaAttribute:"upcoming-charges"})}),e.jsx("div",{className:"hidden tablet:flex",children:s&&e.jsx(pe,{account:s})})]})}function vt({filteredAccounts:s,currentIndex:t,onShuffleLeft:a,onShuffleRight:n,t:i}){return s.length<=1?null:e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsxs("span",{className:"text-sm text-input-fg mr-6",children:[i("billing.paymentsWidget.ledgerOf")," ",t," ",i("billing.paymentsWidget.of")," ",s.length]}),e.jsx(He,{filteredAccounts:s,currentIndex:t,onShuffleLeft:a,onShuffleRight:n,t:i,className:"hidden tablet:flex"})]})}function yt({currentAccount:s,t}){var a,n;return e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("p",{className:"whitespace-nowrap tablet:whitespace-nowrap font-semibold line-clamp-1","data-qa":"account-number",children:[t("billing.accountOverview.accountNumber"),":"," ",s?s.accountWithSubCode:e.jsx("span",{children:" ".repeat(10)})]}),e.jsx("p",{"data-qa":"assoc-name",className:"line-clamp-1",children:s?s.associationName:e.jsx("span",{children:" ".repeat(10)})}),e.jsx("p",{"data-qa":"address",className:"line-clamp-1 flex flex-col",children:s?e.jsxs(e.Fragment,{children:[e.jsx("span",{id:"address1",children:(a=s.propertyAddress)==null?void 0:a.address1}),e.jsx("span",{id:"address2",children:(n=s.propertyAddress)==null?void 0:n.address2})]}):e.jsx("span",{children:" ".repeat(10)})}),e.jsx("div",{className:"tablet:hidden",children:s&&e.jsx(pe,{account:s})}),e.jsxs(w,{to:"/billing/account-overview",className:"text-base-link font-semibold",children:[t("billing.paymentsWidget.accountDetails"),e.jsx(f,{icon:T,className:"ml-2"})]})]})}function It({currentAccount:s,hasVantacaPay:t}){return e.jsx("div",{className:"w-full tablet:flex-col flex tablet:justify-center items-center h-full pt-6 tablet:pt-0",children:e.jsxs("div",{className:"tablet:w-[350px] w-full max-w-[400px] space-y-2 flex flex-col",children:[e.jsx(We,{account:s??void 0,className:""}),t&&e.jsx(Oe,{selectedAccount:s??void 0})]})})}function He({filteredAccounts:s,currentIndex:t,onShuffleLeft:a,onShuffleRight:n,t:i,className:l=""}){return s.length<=1?null:e.jsxs("div",{className:`flex items-center gap-2 ${l}`,children:[e.jsxs("button",{className:y("w-8 h-8 rounded-full flex items-center justify-center transition-colors","bg-base-bg border border-base-border hover:bg-base-fg/5",t===1&&"text-base-fg/40 cursor-not-allowed bg-base-fg/5"),onClick:a,disabled:t===1,"data-qa":"shuffle-left-arrow",children:[e.jsx("span",{className:"sr-only",children:i("billing.paymentsWidget.previousAccount")}
1),e.jsx(f,{icon:Q,className:"text-sm"})]}),e.jsxs("button",{className:y("w-8 h-8 rounded-full flex items-center justify-center transition-colors","bg-base-bg border border-base-border hover:bg-base-fg/5",t===s.length&&"text-base-fg/40 cursor-not-allowed bg-base-fg/5"),onClick:n,disabled:t===s.length,"data-qa":"shuffle-right-arrow",children:[e.jsx("span",{className:"sr-only",children:i("billing.paymentsWidget.nextAccount")}),e.jsx(f,{icon:X,className:"text-sm"})]})]})}const kt=()=>{const{t:s}=j(),[t]=_(),[a,n]=x.useState(!1),[i,l]=x.useState(null),[d,o]=x.useState([]),r=x.useCallback(async()=>{const c=new Date(new Date().setDate(new Date().getDate()-30));try{if(!t)return;n(!0),l(null);const{member:m}=await Y.getHomeownerRequests({pageSize:3,"submitted.after":c,propertyId:t==null?void 0:t.propertyId});o(m)}catch(m){m instanceof Error?l(m):l(new Error("Unknown error"))}finally{n(!1)}},[t]);return x.useEffect(()=>{r()},[r,t]),e.jsxs(g,{children:[e.jsx(g.Title,{tooltip:s("main.dashboard.widget.requests.tooltip"),children:s("main.dashboard.widget.requests.title")}),e.jsx(g.HeaderButton,{children:e.jsxs(w,{to:"/community/requests",className:"text-base-link font-semibold",children:[e.jsx("span",{children:s("main.dashboard.widget.requests.viewAll")}),e.jsx(f,{className:"ml-2",icon:T})]})}),e.jsx(g.Body,{children:a?e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx(B,{})}):i?e.jsx(Ct,{error:i,resetErrorBoundary:r}):e.jsx(St,{requests:d})}),e.jsx(g.Footer,{children:e.jsx(w,{to:"/community/new-request",children:e.jsx(S,{size:"sm",variant:"secondary",children:s("main.dashboard.widget.requests.new")})})})]})};function Ct({error:s,resetErrorBoundary:t}){const{t:a}=j();return console.error(s),e.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-sm font-light",children:[e.jsx("p",{className:"text-center",children:a("main.dashboard.widget.requests.error")}),e.jsx(S,{variant:"primaryLink",onClick:t,className:"mt-8",children:a("main.dashboard.widget.requests.tryAgain")})]})}function St({requests:s}){const{t}=j();return(s==null?void 0:s.length)===0?e.jsx("div",{className:"flex items-center justify-center h-full text-sm font-light p-4",children:e.jsx("p",{className:"text-center",children:t("main.dashboard.widget.requests.empty")})}):e.jsx("ul",{className:"px-6",children:s==null?void 0:s.map(a=>e.jsx("li",{className:"border-b border-base-border py-3",children:e.jsx(Rt,{...a})},a.id))})}function Rt(s){const{t}=j(),{type:a,subject:n,status:i,submitted:l}=s;return e.jsxs("div",{className:"flex-col sm:flex-row flex justify-between items-start sm:items-center gap-1 md:px-6 px-4",children:[e.jsxs("div",{className:"flex flex-1",children:[e.jsx("span",{className:"hidden sm:flex items-center text-button-icon",children:e.jsx(f,{icon:os,className:"h-5 w-5 p-4 mr-4 rounded-sm bg-gray-100"})}),e.jsxs("div",{title:`${a} - ${n}`,className:"flex flex-col gap-1",children:[e.jsxs(w,{to:"/community/requests",className:"font-semibold line-clamp-1",children:[a," - ",n]}),e.jsx("div",{className:"text-base-fg text-xs",children:t("main.dashboard.widget.requests.submittedOn",{date:F(l,{naive:!0,format:"numeric"})})})]})]}),e.jsx(A,{text:i,variant:"info"})]})}const Tt=()=>{const{t:s}=j(),[t]=_(),[a,n]=x.useState(!1),[i,l]=x.useState([]);return x.useEffect(()=>{t&&(n(!0),$e.getReservations(t==null?void 0:t.associationId,{pageSize:3,currentUserOnly:!0,"sort.field":"submitted","sort.order":"descending"}).then(d=>l(d.member)).catch(console.error).finally(()=>n(!1)))},[t]),e.jsxs(g,{children:[e.jsx(g.Title,{tooltip:s("main.dashboard.widget.reservations.tooltip"),children:s("main.dashboard.widget.reservations.title")}),e.jsx(g.HeaderButton,{children:e.jsxs(w,{to:"/community/calendar",className:"text-base-link font-semibold",children:[e.jsx("span",{children:s("main.dashboard.widget.reservations.viewAll")}),e.jsx(f,{className:"ml-2",icon:T})]})}),e.jsxs(g.Body,{children:[a&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx(B,{})}),!a&&i.length===0&&e.jsx("div",{className:"flex items-center justify-center h-full text-sm font-light p-4",children:e.jsx("p",{className:"text-center",children:s("main.dashboard.widget.reservations.noReservations")})}),i.length>0&&e.jsx("ul",{className:"px-6",children:i.map(d=>d.status!=="doNotShow"&&e.jsx("li",{className:"border-b border-base-border py-3",children:e.jsx(qt,{...d})},d.id))})]}),e.jsx(g.Footer,{children:e.jsx(w,{to:"/community/new-request",children:e.jsx(S,{size:"sm",variant:"secondary",children:s("main.dashboard.widget.reservations.new")})})})]})};function qt({title:s,amenity:t,status:a,start:n}){const{t:i}=j(),l=x.useMemo(()=>a==="confirmedReservation"?"success":a==="declinedReservation"?"danger":a==="tentativeReservation"||a==="noSelection"?"warning":"info",[a]);return e.jsxs("div",{className:"flex-col sm:flex-row flex justify-between items-start sm:items-center gap-1 md:px-6 px-4",children:[e.jsxs("div",{className:"flex flex-1",children:[e.jsx("span",{className:"hidden sm:flex items-center text-button-icon",children:e.jsx(f,{icon:rs,className:"h-5 w-5 p-4 mr-4 rounded-sm bg-gray-100"})}),e.jsxs("div",{title:`${t.name}${s?" - ":""}${s}`,className:"flex flex-col gap-1",children:[e.jsxs(w,{to:"/community/requests",className:"font-semibold line-clamp-1",children:[t.name,s?" - ":"",s]}),e.jsxs("div",{className:"text-base-fg text-xs",children:[i("main.dashboard.widget.reservations.scheduledFor")," ",F(n,{naive:!0,format:"numeric"})]})]})]}),e.jsx(A,{text:i(`main.reservationStatus.${a}`),variant:l})]})}const Bt=()=>{const{t:s}=j(),{embedded:t}=De(),{setPageTitle:a}=ue(),{user:n}=be(),i=$();x.useEffect(()=>(a(`Welcome, ${(n==null?void 0:n.userName)??"Neighbor!"}`),()=>{a("")}),[a,n]);const l=(r,c)=>i==null?void 0:i.pages.some(m=>m.legacyController===r&&m.legacyAction===c),d=i!=null&&i.properties&&(i==null?void 0:i.properties.length)>0?[l("Homeowner_v2","GeneralRequest")&&e.jsx(kt,{},"requests-widget"),l("Homeowner_v2","ReservationRequest")&&e.jsx(Tt,{}
1,"reservations-widget")].filter(Boolean):[],o=i!=null&&i.isBoardMember||i!=null&&i.isArcCommitteeMember?[e.jsx(ft,{},"board-actions-widget"),(i==null?void 0:i.arcVotingEnabled)&&l("Board_v2","ActionItems_ARC")&&e.jsx(ct,{},"arc-voting-widget")].filter(Boolean):[];return e.jsx(ge,{children:e.jsxs("div",{className:"space-y-4",children:[l("Homeowner_v2","Billing")&&e.jsx("div",{className:"w-full",children:e.jsx(wt,{})}),e.jsxs("div",{className:y(t&&"p-4 ","bg-base-bg flex flex-col gap-4"),children:[d.length>0&&e.jsxs("div",{className:"flex flex-col gap-y-4",children:[!t&&o.length>0&&e.jsx("h3",{className:"text-lg font-semibold text-base-header",children:s("main.dashboard.sections.homeOwner")}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:d})]}),!t&&o.length>0&&e.jsxs("div",{className:"flex flex-col gap-y-4",children:[d.length>0&&e.jsx("h3",{className:"text-lg font-semibold text-base-header",children:s("main.dashboard.sections.boardMember")}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 items-start",children:o})]})]}),e.jsx("div",{className:"w-full",children:e.jsx(bt,{})})]})})},Ue=({typeLabel:s,actionItemId:t,content:a,statusIndicator:n=0,hasAttachments:i=!1,onViewAttachments:l,onViewDetails:d,actions:o})=>{const{t:r}=j();return e.jsxs("div",{className:"flex flex-col gap-6 rounded-2xl border border-base-border bg-base-fill/30 px-8 py-4 tablet:flex-row tablet:items-center tablet:gap-16","data-qa":`board-task-card-${t}`,children:[e.jsxs("div",{className:"flex flex-1 flex-col gap-6 tablet:flex-row tablet:items-center tablet:gap-6",children:[e.jsxs("div",{className:"flex shrink-0 flex-col gap-1.5 tablet:w-[150px]",children:[e.jsx("span",{className:"text-[10px] font-semibold uppercase leading-normal text-neutral-fg","data-qa":"board-task-card__type",children:s}),e.jsxs("span",{className:"text-2xl leading-tight text-base-header","data-qa":"board-task-card__xn","data-qa-value":JSON.stringify({actionItemId:t}),children:[r("main.dashboard.widget.boardTasks.fields.xn")," ",t]}),n!==0&&e.jsx("div",{children:e.jsx(vs,{value:n})}),i&&l&&e.jsxs("button",{type:"button",className:"flex w-fit items-center gap-2 text-xs font-semibold text-base-link",onClick:l,"data-qa":`board-task-card__attachments-${t}`,children:[e.jsx("span",{children:r("main.dashboard.widget.boardTasks.viewAttachments")}),e.jsx(f,{icon:oe})]})]}),e.jsx("div",{className:"hidden shrink-0 self-stretch border-l border-base-border tablet:block","aria-hidden":"true"}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:[e.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[a.title&&e.jsx("p",{className:"text-[13px] font-semibold leading-normal text-base-header","data-qa":"board-task-card__title",children:a.title}),a.description&&e.jsx("p",{className:"text-xs leading-normal text-base-header","data-qa":"board-task-card__description",children:a.description}),a.metaLines.map(c=>e.jsx("p",{className:"truncate text-[11px] leading-normal text-neutral-fg","data-qa":"board-task-card__meta",children:c},c))]}),d&&e.jsx(S,{size:"xs",variant:"passiveOutline",className:"w-fit",onClick:d,"data-qa":`board-task-card__details-${t}`,children:r("main.dashboard.widget.boardTasks.viewDetails")})]})]}),o&&e.jsx("div",{className:"flex shrink-0 items-center gap-3",children:o})]})},ke="flex h-8 w-8 items-center justify-center rounded-full border border-[#D9E7F0] text-base-body disabled:opacity-40",Pe=({current:s,total:t,onPrevious:a,onNext:n})=>{const{t:i}=j();return e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("span",{className:"text-sm text-base-body","data-qa":"board-task-carousel__position",children:i("main.dashboard.widget.boardTasks.reviewing",{current:s,total:t}).toString()}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",className:ke,onClick:a,disabled:s<=1,"aria-label":i("main.dashboard.widget.boardTasks.previous").toString(),"data-qa":"board-task-carousel__previous",children:e.jsx(f,{icon:Q})}),e.jsx("button",{type:"button",className:ke,onClick:n,disabled:s>=t,"aria-label":i("main.dashboard.widget.boardTasks.next").toString(),"data-qa":"board-task-carousel__next",children:e.jsx(f,{icon:X})})]})]})},O=s=>{if(s==null)return;const t=String(s).trim();return t===""?void 0:t};function _t(s,t){const a=s.propertyAddress,n=a?O([a.address1,a.city,a.stateProvince,a.postalCode].filter(d=>O(d)!==void 0).join(", ")):void 0,i=s.dueDate?F(s.dueDate,{format:"numeric",naive:!0}):void 0,l=[n,O(s.homeowner),i?`${t("main.dashboard.widget.boardTasks.fields.dueDate")}: ${i}`:void 0].filter(d=>d!==void 0);return{title:O(s.subject)??O(s.arcType)??O(s.type),description:O(s.description),metaLines:l}}const Lt=()=>{const{t:s}=j(),[t]=_(),a=$(),[n,i]=x.useState(1),[l,d]=x.useState(!0),[o,r]=x.use
1State([]),[c,m]=x.useState(),{width:h}=ie(),p=ze(),b=x.useCallback(async()=>{if(a)try{d(!0);const I=await Y.getBoardArcRequests({associationId:a==null?void 0:a.id,closed:!1,myItems:!0,availableActions:["vote"]});r(I),m(I[0])}catch(I){console.error(I)}finally{d(!1)}},[a]);x.useEffect(()=>{t&&b()},[b,t]),x.useEffect(()=>{i(o.findIndex(I=>I.actionItemId===(c==null?void 0:c.actionItemId))+1)},[o,c]);const v=()=>{if(!c)return;const I=o.indexOf(c);if(I!==-1){const q=(I+1)%o.length,W=o[q];m(W)}},u=()=>{if(!c)return;const I=o.indexOf(c);if(I!==-1){const q=(I-1+o.length)%o.length,W=o[q];m(W)}};return a?p?e.jsx(Dt,{arcRequests:o,currentIndex:n,currentArc:c,association:a,isLoading:l,onShuffleLeft:u,onShuffleRight:v}):e.jsxs(N,{id:"widget__arc-voting",children:[e.jsx(N.Title,{tooltip:s("main.dashboard.widget.boardArcVoting.tooltip"),children:s("main.dashboard.widget.boardArcVoting.voting",{type:a.arcName??"ARC"})}),c&&o&&e.jsx(N.HeaderButton,{children:h>K?e.jsxs(w,{to:"/board/arcs","data-qa":"link-to-arc-voting",className:"text-primary font-semibold",children:[s("main.dashboard.widget.boardArcVoting.arcManagement",{type:a.arcName??"ARC"}).toString(),e.jsx(f,{icon:T,className:"ml-2"})]}):e.jsx(Ce,{arcRequests:o,currentIndex:n,onShuffleLeft:u,onShuffleRight:v,t:s,association:a})}),e.jsx(N.Body,{children:!l&&o.length>0?e.jsxs("div",{className:"flex flex-col tablet:px-6 px-4",children:[e.jsxs("div",{className:"w-full flex tablet:flex-row flex-col tablet:items-center tablet:justify-start max-w-full",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx($t,{arcRequests:o,currentIndex:n,t:s,association:a}),e.jsx(Et,{currentArc:c,association:a,t:s})]}),e.jsx(Mt,{currentArc:c,selectedProperty:t,association:a,t:s,arcRequests:o,currentIndex:n}),o.length>1&&h>K&&e.jsx("div",{className:"flex items-start gap-2 pt-1",children:e.jsx(Ce,{arcRequests:o,currentIndex:n,onShuffleLeft:u,onShuffleRight:v,t:s,association:a})})]}),e.jsx(At,{currentArc:c,t:s})]}):!l&&o.length===0?e.jsxs("div",{className:"flex flex-col tablet:px-6 px-4",children:[e.jsx("div",{className:"w-full flex tablet:flex-row flex-col tablet:items-center tablet:justify-start max-w-full",children:e.jsx("div",{className:"flex items-center justify-center w-full min-h-[120px] text-sm font-light",children:e.jsx("p",{className:"text-center",children:s("main.dashboard.widget.boardArcVoting.noArcs",{type:a.arcName??"ARC"})})})}),e.jsx("div",{className:"pt-6"})]}):e.jsx("div",{className:"flex justify-center items-center h-full",children:e.jsx(B,{})})}),e.jsx(N.Footer,{children:c&&e.jsx(w,{to:`/board/arcs/${c.actionItemId}`,"data-qa":"link-to-arc-voting",children:e.jsx(S,{variant:"secondary",children:s("board.arcVoting.vote")})})})]}):null};function Et({currentArc:s,association:t,t:a}){const{showAttachments:n}=le();return e.jsxs("div",{className:"flex flex-col gap-1 tablet:border-r-2 tablet:border-b-0 border-b-2 border-base-border pb-4 tablet:pb-0 tablet:pr-6","data-qa":"widget__arc-voting__xn",children:[e.jsx("p",{className:"whitespace-nowrap hidden md:block",children:a("main.dashboard.widget.boardArcVoting.request",{type:t.arcName??"ARC"})}),e.jsx("p",{className:"text-4xl font-medium whitespace-nowrap","aria-live":"polite","data-qa":"balance",children:a("board.arcVoting.widget.xnId",{id:s==null?void 0:s.actionItemId})}),s&&e.jsxs("button",{className:"cursor-pointer flex items-center gap-3 text-base-link",id:"arc__open-attachments",onClick:()=>n({actionItemId:s.actionItemId,title:a("board.arcVoting.popoverTitle",{type:t.arcName??"ARC"})}),children:[e.jsx("span",{children:a("board.arcVoting.viewAttachments")}),e.jsx(f,{icon:oe,className:"text-base"})]})]})}function Mt({currentArc:s,selectedProperty:t,association:a,t:n,arcRequests:i,currentIndex:l}){var d,o,r,c,m;return e.jsxs("div",{"data-qa":"widget__arc-voting__address",className:"w-full tablet:px-6 px-0 space-y-1 max-w-56 pt-2 tablet:pt-0",children:[e.jsx("p",{className:"text-sm text-base-fg/70 mb-2",children:n("board.arcVoting.widget.description",{type:a.arcName??"ARC",index:l,length:i.length})}),(s==null?void 0:s.propertyAddress)&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"line-clamp-1",children:(d=s==null?void 0:s.propertyAddress)==null?void 0:d.address1}),e.jsx("p",{children:(o=s==null?void 0:s.propertyAddress)==null?void 0:o.address2}),e.jsxs("p",{className:"line-clamp-1 truncate",children:[(r=s==null?void 0:s.propertyAddress)==null?void 0:r.city,","," ",(c=s==null?void 0:s.propertyAddress)==null?void 0:c.stateProvince," ",(m=s==null?void 0:s.propertyAddress)==null?void 0:m.postalCode]})]}),e.jsx("p",{className:"line-clamp-1",children:t==null?void 0:t.associationName})]})}function At({currentArc:s,t}){var a,n,i;return e.jsxs("div",{className:"flex items-start gap-2 pt-6",children:[e.jsx(A,{variant:"success",text:t("board.arcVoting.widget.approved",{count:((a=s==null?void 0:s.votes)==null?void 0:a.approve.length)??0})}),e.jsx(A,{variant:"danger",text:t("board.arcVoting.widget.declined",{count:((n=s==null?void 0:s.votes)==null?void 0:n.decline.length)??0})}),e.jsx(A,{variant:"passive",text:t("board.arcVoting.widget.pending",{count:((i=s==null?void 0:s.votes)==null?void 0:i.remaining)??0})})]})}function $t({arcRequests:s,currentIndex:t,t:a,association:n}){const{width:i}=ie();return i>=K?null:e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"my-2 md:text-sm text-[12px]",children:a("board.arcVoting.widget.description",{type:(n==null?void 0:n.arcName)||"ARC",index:t,length:s.length})}),e.jsxs(w,{to:"/board/arcs","data-qa":"link-to-arc-voting",className:"text-primary font-semibold",children:[a("main.dashboard.widget.boardArcVoting.arcManagement",{type:(n==null?void 0:n.arcName)??"ARC"}).toString(),e.jsx(f,{icon:T,className:"ml-2"})]})]})}
1function Ce({arcRequests:s,currentIndex:t,onShuffleLeft:a,onShuffleRight:n,t:i,association:l}){return s.length<=1?null:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{className:y("w-8 h-8 rounded-full flex items-center justify-center transition-colors","bg-base-bg border border-base-border hover:bg-base-fg/5",t===1&&"text-base-fg/40 cursor-not-allowed bg-base-fg/5"),onClick:a,disabled:t===1,"data-qa":"shuffle-left-arrow",children:[e.jsx("span",{className:"sr-only",children:i("board.arcVoting.widget.previousRequest").replace("{{type}}",(l==null?void 0:l.arcName)??"ARC")}),e.jsx(f,{icon:Q,className:"text-sm"})]}),e.jsxs("button",{className:y("w-8 h-8 rounded-full flex items-center justify-center transition-colors","bg-base-bg border border-base-border hover:bg-base-fg/5",t===s.length&&"text-base-fg/40 cursor-not-allowed bg-base-fg/5"),onClick:n,disabled:t===s.length,"data-qa":"shuffle-right-arrow",children:[e.jsx("span",{className:"sr-only",children:i("board.arcVoting.widget.nextRequest").replace("{{type}}",(l==null?void 0:l.arcName)??"ARC")}),e.jsx(f,{icon:X,className:"text-sm"})]})]})}function Dt({arcRequests:s,currentIndex:t,currentArc:a,association:n,isLoading:i,onShuffleLeft:l,onShuffleRight:d}){const{t:o}=j(),r=Ve(),{showAttachments:c}=le(),m=n.arcName??"ARC";return e.jsxs(N,{id:"widget__arc-voting",dataFeature:"arc-voting-widget",children:[e.jsx(N.Title,{tooltip:o("main.dashboard.widget.boardArcVoting.tooltip"),children:o("main.dashboard.widget.boardArcVoting.voting",{type:m})}),e.jsxs(N.Body,{className:"flex flex-col gap-4",children:[i&&e.jsx("div",{className:"flex min-h-[160px] items-center justify-center",children:e.jsx(B,{})}),!i&&s.length===0&&e.jsx("p",{className:"min-h-[120px] text-center text-sm font-light",children:o("main.dashboard.widget.boardArcVoting.noArcs",{type:m})}),!i&&s.length>1&&e.jsx(Pe,{current:t,total:s.length,onPrevious:l,onNext:d}),!i&&a&&e.jsx(Ue,{typeLabel:o("main.dashboard.widget.boardArcVoting.request",{type:m}).toString(),actionItemId:a.actionItemId,content:_t(a,o),hasAttachments:a.attach,onViewAttachments:()=>c({actionItemId:a.actionItemId,title:o("board.arcVoting.popoverTitle",{type:m}).toString()}),onViewDetails:()=>r(`/board/arcs/${a.actionItemId}`)})]}),e.jsx(N.Footer,{linkTo:"/board/arcs",linkText:o("main.dashboard.widget.boardArcVoting.arcManagement",{type:m}).toString()})]})}const Vt=()=>{const{t:s}=j(),t=$(),[a,n]=x.useState(!1),[i,l]=x.useState([]),d=x.useMemo(()=>{const r=(t==null?void 0:t.arcName)??"ARC";return[{category:"arcRequests",title:`${r} Management`,count:0,link:{to:"/board/arcs",text:`All ${r}s`}},{category:"invoices",title:"Invoices",count:0,link:{to:"/board/invoices",text:"All Invoices"}},{category:"workOrders",title:"Work Orders",count:0,link:{to:"/board/work-orders",text:"All Work Orders"}},{category:"collections",title:"Collections",count:0,link:{to:"/board/collections",text:"All Collections"}},{category:"inspections",title:"Inspections",count:0,link:{to:"/board/inspections",text:"All Inspections"}},{category:"violations",title:"Violations",count:0,link:{to:"/board/violations",text:"All Violations"}}]},[t==null?void 0:t.arcName]),o=x.useCallback(r=>d.map(c=>{const m=r.find(({categories:h})=>h===c.category);return m?{...c,count:m.count}:null}).filter(Boolean),[d]);return x.useEffect(()=>{t&&(n(!0),re.getBoardActions(t.id).then(o).then(l).catch(console.error).finally(()=>n(!1)))},[t,o]),!a&&!i.length?null:e.jsxs(N,{id:"board-actions-widget",children:[e.jsx(N.Title,{tooltip:s("main.dashboard.widget.boardAreaTasks.tooltip"),children:s("main.dashboard.widget.boardAreaTasks.title")}),e.jsx(N.HeaderButton,{children:e.jsxs(w,{to:"/board/to-do-list",className:"text-primary font-semibold",children:[e.jsx("span",{children:s("main.dashboard.widget.boardAreaTasks.moreItems")}),e.jsx(f,{className:"ml-2",icon:T})]})}),e.jsx(N.Body,{className:"sm:h-full",children:a?e.jsx("div",{className:"w-full h-[304px] flex justify-center items-center",children:e.jsx(B,{})}):e.jsx("div",{className:"px-6",children:e.jsx("table",{id:"board-actions",className:"w-full mb-8","data-qa":"board-actions-widget",children:e.jsx("tbody",{children:i.map(({category:r,count:c,title:m,link:h})=>e.jsxs("tr",{className:"border-b border-widget-border last:border-b-1 last:pb-2",id:r,"data-qa":`board-actions-row-${r}`,children:[e.jsx("td",{className:"pl-6 pr-3 py-4 w-1",children:c>0?e.jsx("span",{"data-qa":`board-actions-count-${r}`,className:y("inline-flex h-6 w-auto min-w-7 items-center justify-center rounded-full bg-primary text-xs font-normal leading-none text-white"),children:c}):e.jsx("div",{"data-qa":`board-actions-count-${r}`})}),e.jsx("td",{className:"py-4 font-medium",children:s(m)}),e.jsx("td",{className:"px-6 py-4 flex justify-end",children:e.jsx(w,{to:h.to,className:"text-sm text-base-link max-sm:w-8 text-right",children:e.jsx("span",{className:"max-sm:sr-only text-base-link",children:s("main.dashboard.widget.boardAreaTasks.viewAll")})})})]},r))})})})})]})},se=s=>s==null?!1:typeof s=="string"?s.trim()!=="":!0,C=s=>s!=null&&s.trim()?s.trim():void 0,Ft=s=>se(s)?F(s,{format:"numeric",naive:!0}):void 0,G=s=>s.filter(t=>t!==void 0),Wt="main.dashboard.widget.boardTasks.fields.";function Ot(s,t){const a=(i,l)=>`${t(Wt+i)}: ${l}`,n=se(s.accountNo)?a("accountNo",String(s.accountNo)):void 0;switch(s.actionCategoryId){case P.INVOICES:{const i=se(s.invoiceTotal)?a("invoiceTotal",z(s.invoiceTotal)):void 0,l=Ft(s.invoiceDate);return{title:C(s.providerName)??C(s.subject),description:C(s.description),metaLines:G([se(s.invoiceNo)?a("invoiceNo",String(s.invoiceNo)):void 0,i,l?a("invoiceDate",l):void 0,n])}}case P.COLLECTIONS:{const i=se(s.ownerBalance)?a("balance",z(s.ownerBalance)):void 0;return{title:C(s.ownerName)??C(s.subject),description:C(s.description),metaLines:G([C(s.propertyAddress),i,n])}}case P.VIOLATIONS:case P.VIOLATION_INSPECTION:return{title:C(s.violationType)??C(s.subject),description:C(s.description),metaLines:G([C(s.propertyAddress),C(s.ownerName),n])};case P.WORK_ORDERS:return{title:C(s.subject)??C(s.providerName),description:C(s.description),metaLines:G([C(s.propertyAddress),C(s.providerName),n])};case P.ARC:return{title:C(s.subject)??C(s.arcTypeDescription),description:C(s.description),metaLines:G([C(s.propertyAddress),C(s.ownerName),n])};default:return{title:C(s.subject)??C(s.typeDescription),description:C(s.description),metaLines:G([C(s.propertyAddress),C(s.ownerName),n])}}}const zt="all-items",Ht=s=>`type:${s}`;function Ut(s,t){const a=new Map;for(const n of s){const i=n.typeDescription??"";i&&a.set(i,(a.get(i)??0)+1)}return[{key:zt,label:t("main.dashboard.widget.boardTasks.myItems").toString(),count:s.length,typeDescription:null},...Array.from(a.entries()).sort(([n],[i])=>n.localeCompare(i)).map(([n,i])=>({key:Ht(n),label:n,count:i,typeDescription:n}))]}const Pt=()=>{const{t:s}=j(),t=Ve(),a=$(),n=(a==null?void 0:a.id)??0,{showAttachments:i}
1=le(),[l,d]=x.useState(0),[o,r]=x.useState(0),[c,m]=x.useState(0),[h,p]=x.useState(we),{data:b,isLoading:v,refetch:u}=ks({associationId:n}),{data:I,isLoading:q}=Cs({associationId:n}),W=v||q,D=x.useMemo(()=>(b==null?void 0:b.items)??[],[b==null?void 0:b.items]),E=x.useMemo(()=>Ut(D,s),[D,s]);x.useEffect(()=>{d(0),r(0)},[n]);const M=E[l]??E[0];x.useEffect(()=>{l>=E.length&&E.length>0&&d(0)},[l,E.length]);const V=x.useMemo(()=>(M==null?void 0:M.typeDescription)==null?D:D.filter(L=>L.typeDescription===M.typeDescription),[D,M]),R=Math.min(o,Math.max(V.length-1,0)),k=V[R];x.useEffect(()=>{o!==R&&r(R)},[o,R]);const J=x.useCallback(L=>{d(L),r(0)},[]),Ge=x.useCallback(async()=>{p(we),await u()},[u]),Ke=x.useCallback(()=>{m(0)},[]),U=I&&k?Ss(I,k.actionCategoryId,k.decision):null,Qe=((k==null?void 0:k.isDecision)??!1)&&((U==null?void 0:U.canApproveDecline)??!1),Xe=(U==null?void 0:U.canMessage)??!1;return W?e.jsx(N,{id:"board-tasks-widget",dataFeature:"board-tasks-widget",children:e.jsx(N.Body,{className:"flex min-h-[160px] items-center justify-center",children:e.jsx(B,{})})}):D.length===0?null:e.jsxs(e.Fragment,{children:[e.jsxs(N,{id:"board-tasks-widget",dataFeature:"board-tasks-widget",children:[e.jsx(N.Title,{tooltip:s("main.dashboard.widget.boardTasks.tooltip").toString(),children:s("main.dashboard.widget.boardTasks.title")}),e.jsx(N.HeaderButton,{children:e.jsxs(w,{to:Rs,className:"whitespace-nowrap text-sm font-semibold text-base-link","data-qa":"board-tasks-widget__view-all",children:[s("main.dashboard.widget.boardTasks.viewAll"),e.jsx(f,{icon:T,className:"ml-2"})]})}),e.jsxs(N.Body,{className:"flex flex-col gap-4",children:[e.jsx(Is,{options:E.map(L=>L.key),selectedIndex:l,onChange:J,getLabel:(L,Z)=>{var ee;return((ee=E[Z])==null?void 0:ee.label)??""},getCount:(L,Z)=>{var ee;return(ee=E[Z])==null?void 0:ee.count},"data-qa":"board-tasks-widget__tabs"}),V.length>1&&e.jsx(Pe,{current:R+1,total:V.length,onPrevious:()=>r(L=>Math.max(L-1,0)),onNext:()=>r(L=>Math.min(L+1,V.length-1))}),k&&e.jsx(Ue,{typeLabel:k.typeDescription??(M==null?void 0:M.label)??"",actionItemId:k.actionItemId,content:Ot(k,s),statusIndicator:k.statusIndicator,hasAttachments:k.hasAttachments,onViewAttachments:()=>i({actionItemId:k.actionItemId,title:k.typeDescription??void 0}),onViewDetails:()=>t(Ts(k,n,qs),{state:{taskItems:V.map(({actionItemId:L,actionCategoryId:Z})=>({actionItemId:L,actionCategoryId:Z}))}}),actions:e.jsxs(e.Fragment,{children:[Qe&&e.jsxs(e.Fragment,{children:[e.jsx(me,{action:"approve",emphasis:"emphasized",onClick:()=>p({open:!0,actionItemId:k.actionItemId,categoryId:k.actionCategoryId,isApproval:!0,decision:k.decision}),"data-qa":`task-approve-${k.actionItemId}`,children:s("board.tasks.actions.approve")}),e.jsx(me,{action:"decline",emphasis:"emphasized",onClick:()=>p({open:!0,actionItemId:k.actionItemId,categoryId:k.actionCategoryId,isApproval:!1,decision:k.decision}),"data-qa":`task-decline-${k.actionItemId}`,children:s("board.tasks.actions.decline")})]}),Xe&&e.jsx(me,{action:"message",onClick:()=>m(k.actionItemId),"data-qa":`task-send-message-${k.actionItemId}`,children:s("board.tasks.actions.message")})]})})]})]}),e.jsx(Bs,{open:c>0,onClose:Ke,actionItemId:c}),e.jsx(ys,{decisionModal:h,associationId:n,onClose:Ge})]})},Gt=5,Kt=()=>{const{t:s}=j(),[t]=_(),a=t==null?void 0:t.ownerId,{data:n,isLoading:i,isError:l}=_s({ownerId:a}),{mutate:d}=Ls(),o=x.useMemo(()=>Ms(n).map(As),[n]),r=x.useMemo(()=>[{label:xe,count:o.length,value:xe}],[o.length]),c=x.useMemo(()=>o.slice(0,Gt),[o]),m=h=>{!h.unread||h.actionItemId<=0||d({actionItemId:h.actionItemId,actionItemNoteId:h.actionItemNoteId})};return e.jsx(Es,{id:"dashboard-messages-widget",semanticClassPrefix:"v3-dashboard-inbox-widget",title:s("main.dashboard.widget.messages.inboxTitle"),headerActions:e.jsxs(w,{to:"/inbox","data-feature":"v3-dashboard-inbox-widget-view-all",className:"text-primary font-semibold",children:[e.jsx("span",{children:s("main.dashboard.widget.messages.viewAll")}),e.jsx(f,{className:"ml-2",icon:T})]}),filters:r,selectedFilter:xe,onFilterChange:()=>{},loading:i,children:l?e.jsx("div",{className:"flex items-center justify-center py-12 text-sm font-light",children:e.jsx("p",{className:"text-center",children:s("main.dashboard.widget.messages.empty")})}):c.length===0?e.jsx("div",{className:"flex items-center justify-center py-12 text-sm font-light",children:e.jsx("p",{className:"text-center",children:s("main.dashboard.widget.messages.empty")})}):e.jsx(e.Fragment,{children:c.map((h,p)=>e.jsx(Qt,{message:h,isLast:p===c.length-1,onClick:m},`${h.id}-${p}`))})})},Qt=({message:s,isLast:t,onClick:a})=>{const n=F(s.date,{format:"short"}),i=$s(s.actionCategoryName),l=s.unread,d=l&&i,o=y("flex gap-[29px] h-[50px] items-center px-[22px] py-[14px] min-w-0 overflow-hidden cursor-pointer hover:bg-gray-50 transition-colors",!t&&"border-b border-[#d9d9d9]");return e.jsxs(w,{to:s.href,"data-feature":"v3-dashboard-inbox-widget-row",className:o,onClick:()=>a(s),children:[e.jsx("div",{className:"w-[8px] shrink-0 flex justify-center",children:l&&e.jsx("div",{className:y("size-2 roun
1ded-full shrink-0",d?"bg-error":"bg-primary"),"aria-hidden":!0})}),e.jsx("div",{className:"w-[120px] shrink-0 overflow-hidden",children:e.jsx("p",{className:y("text-[14px] truncate",i?"text-error font-semibold":"text-base-header",!i&&(l?"font-bold":"font-normal")),children:s.category})}),e.jsxs("div",{className:"flex-1 flex gap-[3px] items-center pr-[30px] text-[14px] text-base-header min-w-0 overflow-hidden",children:[e.jsx("p",{className:y("shrink-0 truncate",l?"font-bold text-black":"font-normal"),children:s.subject}),e.jsx("span",{className:"shrink-0",children:"-"}),e.jsx("p",{className:"flex-1 font-normal opacity-70 overflow-hidden text-ellipsis whitespace-nowrap min-w-0",children:s.snippet})]}),e.jsx("div",{className:"shrink-0 overflow-hidden",children:e.jsx("p",{className:y("text-[14px] whitespace-nowrap truncate",l?"font-bold text-black":"font-normal text-base-header"),children:n})})]})},Se=5,Xt=3,Re={page:0,lastPage:0,totalItems:0,member:[]},Yt=()=>{const{t:s}=j(),[t,a]=x.useState(!1),[n,i]=x.useState(1),[l,d]=x.useState(Re),[o]=_();x.useEffect(()=>{i(1)},[o==null?void 0:o.ownerId]),x.useEffect(()=>{if(!(o!=null&&o.ownerId)){d(Re),a(!1);return}a(!0),he.getMessages({ownerId:o.ownerId,pageSize:Se,page:n,"createdDate.after":new Date(Date.now()-1440*60*60*1e3),includeUnread:!0}).then(d).catch(console.error).finally(()=>a(!1))},[n,o==null?void 0:o.ownerId]);const r=l.totalItems?Math.ceil(l.totalItems/Se):1;return e.jsxs(N,{children:[e.jsx(N.Title,{tooltip:s("main.dashboard.widget.messages.tooltip"),children:s("main.dashboard.widget.messages.title")}),e.jsx(N.HeaderButton,{children:e.jsxs(w,{to:"/community/requests",className:"text-base-link font-semibold",children:[e.jsx("span",{children:s("main.dashboard.widget.messages.viewAll")}),e.jsx(f,{className:"ml-2",icon:T})]})}),e.jsxs(N.Body,{children:[t&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx(B,{})}),!t&&l.member.length===0&&e.jsx("div",{className:"flex items-center justify-center h-full text-sm font-light p-4",children:e.jsx("p",{className:"text-center",children:s("main.dashboard.widget.messages.empty")})}),l.member.length>0&&e.jsx("ul",{children:l.member.map((c,m)=>e.jsx("li",{className:"border-b border-base-border py-2 hover:bg-base-hover",children:e.jsx(Jt,{...c})},`${c.actionItemId}-${m}`))})]}),e.jsx(N.Footer,{children:l.member.length>0&&e.jsx(Zt,{numberOfPages:r,currentPage:n,onChangePage:i})})]})},Jt=({actionItemId:s,created:t,messageType:a,messageText:n,unread:i})=>e.jsxs(w,{to:`/my/messages/${s}`,className:"flex items-center justify-between gap-5 px-4",children:[e.jsx(f,{icon:Be,className:y("text-button-icon bg-gray-100 rounded-full p-4 h-5 w-5",i&&"text-primary")}),e.jsxs("div",{className:"flex-1 overflow-hidden",children:[e.jsxs("div",{className:"flex justify-between mb-1",children:[e.jsx("p",{className:y("text-base-header",i&&"font-bold"),children:a}),e.jsx("p",{className:"text-sm text-base-fg",children:t.toLocaleDateString()})]}),e.jsx("p",{className:"block text-base-fg line-clamp-1 truncate",children:n})]})]}),Zt=({numberOfPages:s,currentPage:t,onChangePage:a})=>{const{t:n}=j(),i=je(),l=()=>a(t-1),d=()=>a(t+1),o=x.useMemo(()=>{const c=[];if(s<=Xt)return Array.from({length:s},(v,u)=>u+1);const m=Math.max(t-1,2),h=Math.min(t+1,s-1),p=m>2,b=h<s-1;c.push(1),p&&c.push("...");for(let v=m;v<=h;v++)c.push(v);return b&&c.push("..."),s>1&&c.push(s),c},[t,s]),r=x.useMemo(()=>Array.from({length:s},(c,m)=>m+1),[s]);return e.jsxs("div",{className:"flex justify-between items-center gap-2 flex-wrap",children:[i?e.jsx(S,{onClick:l,disabled:t===1,variant:"passiveOutline",size:"sm","aria-label":n("main.pagination.previous"),children:e.jsx(f,{icon:te})}):e.jsx(S,{onClick:l,disabled:t===1,variant:"passiveOutline",startIcon:e.jsx(f,{icon:te}),size:"sm",children:n("main.pagination.previous")}),e.jsx("div",{className:"flex gap-2",children:o.map((c,m)=>{if(c==="...")return e.jsxs(_e,{as:"div",className:"relative",children:[e.jsx(Le,{children:e.jsx(S,{variant:"passiveOutline",size:"sm",children:"..."})}),e.jsx(Ee,{as:x.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:e.jsx(Me,{className:"absolute w-[120px] max-h-96 overflow-auto bottom-full mb-2 z-10 rounded-md bg-widget-bg text-base border shadow-lg focus:outline-none",children:e.jsx("div",{className:"flex flex-col gap-2 p-1",children:r.map(p=>e.jsx(Ae,{children:e.jsx("button",{className:"py-1 rounded-md transition-all duration-200 hover:bg-base-hover",onClick:()=>a(p),children:n("main.pagination.pageNumber",{page:p})})},p))})})})]},`ellipsis-${m}`);const h=c===t;return e.jsx(S,{onClick:()=>a(c),variant:h?"primary":"passiveOutline",className:h?"bg-gray-900 hover:bg-gray-900/90":"",size:"sm","aria-label":`Page ${c}`,"aria-current":h?"page":void 0,children:c},c)})}),i?e.jsx(S,{onClick:d,disabled:t===s,variant:"passiveOutline",size:"sm","aria-label":n("main.pagination.next"),children:e.jsx(f,{icon:ae})}):e.jsx(S,{onClick:d,disabled:t===s,variant:"passiveOutline",endIcon:e.jsx(f,{icon:ae}),size:"sm",children:n("main.pagination.next")})]})},ea=()=>{const{t:s}=j(),[t]=_(),a=H(r=>r.accounts),[n,i]=x.useState([]),[l,d]=x.useState(a.at(0)),o=H(r=>r.refreshPayments);return x.useEffect(()=>{if(!t){i([]),d(a.at(0));return}const r=a.filter(({accountNumber:c})=>c===t.accountNumber);i(r),d(r[0]??a.find(({accountNumber:c})=>c===t.accountNumber)??a.at(0)),o("recurringPayments")},[a,t,o]),!t||!t.accountNumber?null:e.jsxs(N,{children:[e.jsx(N.HeaderButton,{children:e.jsx(sa,{accounts:n,currentAccount:l,onSelect:d,t:s})}),e.jsx(N.Title,{children:s("main.dashboard.widget.payments.title")}),e.jsx(N.Body,{children:e.jsx("div",{className:"flex flex-col gap-6",children:e.jsxs("div",{className:"flex gap-6 items-start",children:[e.jsxs("div",{className:"flex flex-col gap-5 grow",children:[e.jsxs("div",{className:"flex flex-col gap-px",children:[e.jsx("p",{"data-qa":"payments-widget__balance",className:"text-4xl font-semibold text-base-header",children:l!=null&&l.blockLedger?s("billing.blockedLedgers.blocked"):(l==null?void 0:l.balance)!==void 0?z(l.balance):""}),e.jsxs("div",{className:"flex items-center gap-1 text-sm text-base-header",children:[e.jsx("p",{className:"opacity-[0.62]",children:s("billing.accountOverview.accountBalance")}),e.jsx(ne,{children:e.jsx("p",{children:s("main.dashboard.widget.payments.tooltip.basicInfo")})})]})]}),e.jsx(fe,{variant:"summary",accountNumber:l==null?void 0:l.accountNumber,ownerId:l==null?void 0:l.ownerId,subLedgerId:l==null?void 0:l.subLedgerId})]}),e.jsxs("div",{className:"flex flex-col gap-6 items-end justify-center pb-3 pt-3.5",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx(ta,{account:l??void 0})}),l&&e.jsxs("div",{className:"flex flex-col gap-6 items-end",children:[e.jsx(na,{account:l}),e.jsx(aa,{account:l})]})]})]})})})]})};function sa({accounts:s,currentAccount:t,onSelect:a,t:n}){const i=s.length>1;return e.jsx("div",{className:"flex items-center gap-2 text-base-header text-right",children:e.jsx(ds,{value:t??null,onChange:l=>l&&a(l),disabled:!i,children:e.jsxs("div",{className:"relative",children:[e.jsxs(cs,{className:y("payments-widget-account-dropdown","flex items-center gap-2 font-medium focus:outline-none",i&&"cursor-pointer hover:opacity-80"),children:[e.jsxs("span",{children:[n("billing.accountOverview.accountNumber"),":"," ",(t==null?void 0:t.accountWithSubCode)??""]}),e.jsx(f,{icon:ms,className:y("text-sm",i&&"flex-shrink-0")})]}),e.jsx(xs,{transition:!0,className:"payments-widget-account-options absolute right-0 z-10 mt-1 max-h-60 min-w-[220px] overflow-auto rounded-md bg-widget-bg py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-none sm:text-sm transition ease-in duration-100 data-[closed]:opacity-0",children:s.map(l=>e.jsx(hs,{value:l,className:({focus:d})=>y("payments-widget-account-option","relative cursor-pointer select-none py-2 pl-3 pr-4 text-base-header",d&&"bg-input-active/10",(t==null?void 0:t.subLedgerId)===l.subLedgerId&&"bg-input-active/10"),children:e.jsxs("div",{className:"flex w-full items-center justify-between gap-4",children:[e.jsx("span",{className:"text-left",children:l.accountWithSubCode}),e.jsx("span",{className:"text-right tabular-nums",children:l.blockLedger?n("billing.blockedLedgers.blocked"):l.balance!==void 0?z(l.balance):""})]})},l.subLedgerId))})]})})})}function ta({account:s}){var m,h;const{t}=j(),{paymentProviders:a,paymentsEnabled:n,isLoading:i,handleProviderSelection:l}=de(s),[d,o]=x.useState(!1),r=je();if(!n)return null;const c=p=>{l(p).catch(console.error).finally(()=>o(!1))};return e.jsxs(e.Fragment,{children:[i?e.jsxs(S,{className:"payments-widget-make-payment payments-widget-make-payment-loading relative bg-primary text-primary-fg px-6 py-2.5 rounded-lg text-base",size:r?"sm":"md",disabled:!0,"aria-label":t("billing.accountOverview.makeAPayment"),children:[e.jsx("span",{className:"invisible",children:t("billing.accountOverview.makeAPayment")}),e.jsx(B,{className:"absolute inset-0 m-auto",color:"white"})]}):a.length>1?e.jsx(S,{"data-qa":"openProviderModalButton",className:"payments-widget-make-payment payments-widget-make-payment-open-modal bg-primary text-primary-fg px-6 py-2.5 rounded-lg text-base",onClick:()=>o(!0),size:r?"sm":"md",children:t("billing.accountOverview.makeAPayment")}):e.jsx(S,{"data-qa":"singleProviderButton",disabled:(m=a==null?void 0:a[0])==null?void 0:m.unauthorized,className:y("payments-widget-make-payment",a.length===0?"hidden":"bg-primary text-primary-fg px-6 py-2.5 rounded-lg text-base"),onClick:()=>c(a==null?void 0:a[0]),size:r?"sm":"md",children:((h=a==null?void 0:a[0])==null?void 0:h.name)||null}),a&&a.length>1&&e.jsx(ps,{open:d,onClose:()=>o(!1),title:t("billing.accountOverview.providerModalTitle").toString(),className:"payments-widget-provider-modal",children:e.jsx("div",{className:"payments-widget-provider-buttons flex flex-wrap items-center justify-center gap-4",children:a.map((p,b)=>e.jsx(S,{"data-qa":"paymentButton",disabled:i||p.unauthorized,className:y("payments-widget-provider-button",`payments-widget-provider-button-${String(p.name).replace(/\s+/g,"-").toLowerCase()}`,"xl:w-44 md:w-5/12 w-full h-10 xl:m-2 mt-3"),onClick:()=>c(p),tabIndex:1,children:p.name},p.id+b))})})]})}function aa({account:s}){const{t}=j(),{hasVantacaPay:a}=de(s);if(!a)return null;const n=`/billing/manage-account?accountNumber=${s.accountNumber}&subLedgerId=${s.subLedgerId}`;return e.jsx(w,{to:n,className:"payments-widget-link payments-widget-link-manage-payments text-sm text-primary hover:underline focus:underline","data-qa":"manage-payments-link",children:t("billing.manageActions.managePaymentShort")})}function na({account:s}){const{t}=j(),a=H(h=>h.properties),[,n]=_(),i=a.find(h=>h.ownerId===s.ownerId),l=H(h=>h.recurringPayments),d=((s==null?void 0:s.autoDraftEnrolled)||l.some(h=>h.account.ownerId===s.ownerId&&h.account.subLedgerId===s.subLedgerId))??!1;if((i==null?void 0:i.autoDraftType)==="off")return null;const o=(i==null?void 0:i.autoDraftType)==="vantacaPay"?"/billing":"/billing/auto-draft",r=h=>
1{if(h==="/billing"&&s){const p=new URLSearchParams;p.set("accountNumber",s.accountNumber),p.set("subLedgerId",s.subLedgerId.toString());const b=p.toString();return h+(b?"?"+b:"")}return h},c=()=>{if(o!=="/billing/auto-draft")return;const h=a.find(p=>p.associationId===s.associationId);h&&n(h)},m=r(o);return e.jsxs(w,{to:m,state:{paymentType:"recurring",paymentMethod:"autoDraft"},"data-qa":"autoPayToggle",onClick:c,className:"payments-widget-link payments-widget-link-autopay flex items-center gap-2 hover:opacity-90 transition-opacity no-underline",children:[!d&&e.jsx(f,{icon:fs,className:"h-4 w-4 flex-shrink-0 text-error","aria-hidden":!0}),e.jsx("div",{className:y("relative inline-flex h-4.5 w-[34px] items-center rounded-lg p-0.5 transition-colors",d?"bg-v3-accent":"bg-error/10"),children:e.jsx("span",{className:`${d?"translate-x-3":"translate-x-0"} inline-block h-3.5 w-4 rounded-md bg-white transition`})}),e.jsxs("p",{className:"text-sm font-semibold text-base-header",children:[t("billing.paymentsWidget.autoPay")," ",d?t("billing.paymentsWidget.enrolled"):""]})]})}const ia=520;function la(s){const t=(s??"").trim();if(!t)return"·";const a=t.split(/\s+/).filter(Boolean);return a.length===1?a[0].slice(0,2).toUpperCase():(a[0][0]+a[a.length-1][0]).toUpperCase()}function oa(s){try{const t=new URL(s),a=t.hostname||t.host;return a.startsWith("www.")?a.slice(4):a}catch{return s}}const ra={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":" "};function da(s){return s.replace(/&amp;|&lt;|&gt;|&quot;|&#39;|&nbsp;/g,t=>ra[t]??t)}function ca(s){let t="",a=!1;for(const n of s)n==="<"?a=!0:n===">"?(a=!1,t+=" "):a||(t+=n);return t}const ma=/^<a\b[^>]*>([\s\S]*?)<\/a>$/i;function xa(s,t=ia){if(!s)return[];const a=s.split(/(<a\b[^>]*>[\s\S]*?<\/a>)/gi),n=[];for(const d of a){const o=ma.exec(d),r=!!o,c=o?o[1]:d,m=da(ca(c)).replace(/\s+/g," ");m&&n.push({text:m,isLink:r})}if(n.length>0){n[0].text=n[0].text.trimStart();const d=n.at(-1);d&&(d.text=d.text.trimEnd())}let i=t;const l=[];for(const d of n){if(i<=0)break;d.text.length<=i?(l.push(d),i-=d.text.length):(l.push({text:d.text.slice(0,i).trimEnd()+"…",isLink:d.isLink}),i=0)}return l.filter(d=>d.text.length>0)}function ha({citation:s}){const t=oa(s.url),a=s.label||t;return e.jsxs("button",{type:"button",title:`${a}
2${s.url}`,onClick:n=>{n.preventDefault(),n.stopPropagation(),window.open(s.url,"_blank","noopener,noreferrer")},className:"inline-flex items-center gap-1.5 rounded-full bg-blue-50 px-2.5 py-1 text-xs font-semibold text-base-fg transition-colors hover:bg-blue-100",children:[e.jsx(f,{icon:bs,className:"h-3 w-3"}),e.jsx("span",{className:"max-w-[160px] truncate",children:t})]})}function pa({post:s}){const{t}=j(),a=s.publishedAt??s.created;let n="";try{n=Ds(Vs(a),{addSuffix:!0})}catch{n=F(a,{format:"numeric"})}const i=xa(s.bodyHtml),l=[...s.media].sort((c,m)=>c.orderNo-m.orderNo),d=l[0],o=l.length,r=s.citations.slice().sort((c,m)=>c.orderNo-m.orderNo);return e.jsxs(w,{to:`/community/feed#post-${s.id}`,className:"flex flex-col gap-3 rounded-xl p-3 transition-colors hover:bg-base-fill sm:flex-row sm:items-start sm:gap-4","data-feature":"recent-posts-mini-card",children:[d&&e.jsxs("div",{className:"relative w-full sm:w-[280px] sm:flex-shrink-0",children:[e.jsx("img",{src:d.mediaUrl,alt:d.originalFileName,loading:"lazy",className:"h-auto max-h-[240px] w-full rounded-lg object-contain"}),o>1&&e.jsxs("span",{"aria-label":t("community.feed.widget.imageCount","{{count}} images",{count:o}),className:"pointer-events-none absolute right-2 top-2 inline-flex items-center gap-1.5 rounded-full bg-black/55 px-2 py-0.5 text-xs font-medium text-white",children:[e.jsx(f,{icon:gs,className:"h-3 w-3"}),o]})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[s.brandLogoUrl?e.jsx("img",{src:s.brandLogoUrl,alt:s.brandDisplayName,className:"h-7 w-7 rounded-full object-cover"}):e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-btn-bg text-input-bg text-xs font-semibold",children:la(s.brandDisplayName)}),e.jsx("span",{className:"truncate text-xs font-semibold text-base-header",children:s.brandDisplayName}),s.isBoardAuthored&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",className:"text-xs text-base-meta",children:"•"}),e.jsx("span",{className:"whitespace-nowrap text-xs text-base-meta",children:t("community.feed.boardAuthoredShort","Board")})]}),e.jsx("span",{"aria-hidden":"true",className:"text-xs text-base-meta",children:"•"}),e.jsx("span",{className:"whitespace-nowrap text-xs text-base-meta",children:n})]}),e.jsx("p",{className:"mt-1.5 line-clamp-2 text-base font-semibold text-base-header",children:s.title}),i.length>0&&e.jsx("p",{className:"mt-1 line-clamp-4 text-sm text-base-meta",children:i.map(c=>e.jsx("span",{className:c.isLink?"font-medium text-base-link underline underline-offset-2":void 0,children:c.text},`${c.isLink?"link":"plain"}-${c.text}`))}),r.length>0&&e.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:r.map(c=>e.jsx(ha,{citation:c},c.citationId))})]})]})}const Te=2;function qe(){return e.jsxs("div",{className:"flex flex-col gap-3 rounded-xl p-3 sm:flex-row sm:items-start sm:gap-4",children:[e.jsx("div",{className:"h-[180px] w-full animate-pulse rounded-lg bg-base-fill sm:h-[160px] sm:w-[280px] sm:flex-shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-7 w-7 animate-pulse rounded-full bg-base-fill"}),e.jsx("div",{className:"h-3 w-32 animate-pulse rounded bg-base-fill"})]}),e.jsx("div",{className:"mt-2 h-4 w-3/4 animate-pulse rounded bg-base-fill"}),e.jsx("div",{className:"mt-1.5 h-3 w-full animate-pulse rounded bg-base-fill"})]})]})}const fa=()=>{var o;const{t:s}=j(),{enabled:t,associationId:a}=Fs(),n=ws({...Ws(a,Te),enabled:t&&a>0});if(!t)return null;const i=((o=n.data)==null?void 0:o.member)??[],l=i.length>0;let d;return n.isLoading?d=e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(qe,{}),e.jsx(qe,{})]}):l?d=e.jsx("div",{className:"flex flex-col gap-3",children:i.slice(0,Te).map(r=>e.jsx(pa,{post:r},r.id))}):d=e.jsx("p",{className:"text-sm text-base-meta",children:s("community.feed.widget.empty","No posts yet — they'll appear here when your management company shares updates.")}),e.jsxs(N,{id:"dashboard-recent-posts-widget",dataFeature:"recent-posts-widget",children:[e.jsx(N.Title,{children:s("community.feed.widget.title","Community Feed")}),l&&e.jsx(N.HeaderButton,{children:e.jsxs(w,{to:"/community/feed","data-feature":"recent-posts-widget-view-all","data-iq":"widget-link",className:"text-primary font-semibold",children:[e.jsx("span",{children:s("community.feed.widget.viewAll","View all posts")}),e.jsx(f,{className:"ml-2",icon:T})]})}),e.jsx(N.Body,{children:d})]})},ga=()=>{const{t:s}=j(),[t]=_(),a=H(r=>r.accounts),[n,i]=x.useState([]),[l,d]=x.useState(!1),o=a.find(r=>r.accountNumber===(t==null?void 0:t.accountNumber))??a.at(0);return x.useEffect(()=>{(async()=>{d(!0);try{const c=await re.getLedgers({accountNumber:o==null?void 0:o.accountNumber,ownerId:o==null?void 0:o.ownerId,subLedgerId:o==null?void 0:o.subLedgerId,pageSize:3,page:1,"sortBy.field":"ledgerDate","sortBy.order":"descending"});i(c.member||[])}catch(c){console.error("Error fetching transactions:",c),i([])}finally{d(!1)}})()},[o==null?void 0:o.accountNumber,o==null?void 0:o.ownerId,o==null?void 0:o.subLedgerId]),!t||!t.accountNumber?null:e.jsxs(N,{children:[e.jsx(N.Title,{children:s("billing.recentTransactions.title","Recent Transactions")}),e.jsx(N.HeaderButton,{children:e.jsxs(w,{to:"/billing/account-history",className:"recent-transactions-widget-link recent-transactions-widget-link-view-all flex items-center gap-[7px] text-primary text-[14px] font-semibold",children:[e.jsx("span",{children:s("billing.recentTransactions.viewAll","View All")}),e.jsx(f,{icon:T})]})}),e.jsx(N.Body,{children:l?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(B,{})}):n.length===0?e.jsx("div",{className:"flex items-center justify-center h-full text-sm font-light p-4",children:e.jsx("p",{className:"text-center",children:s("billing.recentTransactions.noTransactions","No recent transactions")})}):e.jsx("div",{className:"pt-4 overflow-x-auto",children:e.jsx("table",{className:"w-full border-collapse min-w-[320px]",children:e.jsx("tbody",{children:n.map((r,c)=>{var m;return e.jsx(ua,{transaction:r,isLast:c===n.length-1},`${r.accountNumber}-${r.subLedgerId}-${(m=r.ledgerDate)==null?void 0:m.getTime()}-${c}`)})})})})})]})};function ba(s){if(s.isVoided)return ce("billing.recentTransactions.status.voided",{defaultValue:"Voided"});const t=s.transactionType;if(!t)return ce("billing.recentTransactions.status.paid",{defaultValue:"Paid"});const a=`billing.recentTransactions.status.${t}`;return ce(a,{defaultValue:{charge:"Charge",payment:"Paid",adjustment:"Adjustment",writeOff:"Write-off",paymentAdjustment:"Payment adju
2stment",refundCheck:"Refund (check)",void:"Void",refundAch:"Refund (ACH)",deposit:"Deposit",refundDeposit:"Refund (deposit)",depositAdjustment:"Deposit adjustment",depositVoid:"Deposit void",creditDistribution:"Credit distribution"}[t]??t})}function ua({transaction:s,isLast:t}){const a=s.ledgerDate?F(s.ledgerDate,{format:"numeric",naive:!0}):"",n=ba(s),i=s.amount??0;return e.jsxs(e.Fragment,{children:[e.jsxs("tr",{children:[e.jsx("td",{className:"w-[70px] opacity-[0.65] pb-[15px] pr-3 align-middle",children:e.jsx("p",{className:"text-[12px] font-medium text-base-header whitespace-nowrap",children:a})}),e.jsx("td",{className:"pr-3 pb-[15px] align-middle min-w-0",children:e.jsx("p",{className:"text-[15px] font-semibold text-base-header truncate max-w-[140px] mobile:max-w-none",children:s.description??"Transaction"})}),e.jsx("td",{className:"min-w-[90px] max-w-[130px] w-[130px] overflow-hidden pb-[15px] pr-3 align-middle",children:e.jsx("p",{className:"text-[13px] font-normal text-base-header truncate",title:n,children:n})}),e.jsx("td",{className:"w-[67px] pl-3 pb-[15px] align-middle text-right",children:e.jsx("p",{className:"text-[16px] font-semibold text-base-header whitespace-nowrap",children:z(i/100)})})]}),!t&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"h-[12px] p-0 align-top",children:e.jsx("div",{className:"h-px bg-[#d9d9d9] w-full"})})})]})}const ja=()=>{const{t:s}=j(),t=$(),{data:a=[],isLoading:n}=Os(),i=a.length,[l,d]=x.useState(0),[o,r]=x.useState(!0);if(x.useEffect(()=>{(async()=>{if(!t){r(!1);return}let b=0;try{t.isArcCommitteeMember&&(b=(await Y.getBoardArcRequests({associationId:t.id,daysBack:365,closed:!1,myItems:!0,availableActions:["vote","boardChairApproval"]})).length)}catch(v){console.error("Error fetching ARC request data:",v)}finally{d(b),r(!1)}})()},[t]),n||o||i===0&&l===0)return null;const m=s(i===1?"main.dashboard.widget.requestSummary.upcomingReservation":"main.dashboard.widget.requestSummary.upcomingReservations"),h=s(l===1?"main.dashboard.widget.requestSummary.architecturalRequest":"main.dashboard.widget.requestSummary.architecturalRequests");return e.jsx(N,{id:"widget__request-summary",bodyWrapperClassName:"py-4 px-6",children:e.jsx(N.Body,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(f,{icon:us,className:"text-primary shrink-0"}),e.jsxs("p",{className:"text-base text-base-header",children:[s("main.dashboard.widget.requestSummary.youHave")," ",i>0&&e.jsxs(w,{to:"/community/reservations",className:"request-summary-link request-summary-link-reservations text-primary font-semibold no-underline",children:[i," ",m]}),i>0&&l>0&&` ${s("main.dashboard.widget.requestSummary.and")} `,l>0&&e.jsxs(e.Fragment,{children:[e.jsxs(w,{to:"/board/arcs",className:"request-summary-link request-summary-link-arcs text-primary font-semibold no-underline",children:[l," ",h]})," ",s("main.dashboard.widget.requestSummary.pending")]}),s("main.dashboard.widget.requestSummary.period")]})]})})})},wa=()=>{const{t:s}=j(),{setPageTitle:t}=ue(),{user:a}=be(),n=$(),i=Fe();x.useEffect(()=>(t(`Welcome, ${(a==null?void 0:a.userName)??"Neighbor!"}`),()=>{t("")}),[t,a]);const l=(m,h)=>n==null?void 0:n.pages.some(p=>p.legacyController===m&&p.legacyAction===h),d=ze(),o=d&&l("Board_v2","ToDoList"),c=!(n!=null&&n.isBoardMember)&&!(n!=null&&n.isArcCommitteeMember)?[]:o?[e.jsx(Pt,{},"board-tasks-widget")]:[e.jsx(Vt,{},"board-actions-widget"),(n==null?void 0:n.arcVotingEnabled)&&l("Board_v2","ActionItems_ARC")&&e.jsx(Lt,{},"arc-voting-widget")].filter(Boolean);return e.jsx(ge,{children:e.jsxs("div",{className:"V3-dashboard flex flex-col gap-[44px]",children:[(n==null?void 0:n.properties)&&(n==null?void 0:n.properties.length)>0&&e.jsx(ja,{}),l("Homeowner_v2","Billing")&&e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-[44px] [body.hoai-compact_&]:grid-cols-1",children:[e.jsx(ea,{}),e.jsx(ga,{})]}),e.jsx(fa,{}),e.jsx("div",{className:"w-full",children:i?e.jsx(Kt,{}):e.jsx(Yt,{})}),c.length>0&&e.jsxs("div",{className:"flex flex-col gap-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-base-header",children:s("main.dashboard.sections.boardMember")}),e.jsx("div",{className:y("grid grid-cols-1 gap-[44px] items-start",!d&&"lg:grid-cols-2 [body.hoai-compact_&]:grid-cols-1"),children:c})]}),e.jsx(Ns,{})]})})},pn={title:"Welcome, Neighbor!",showPropertySelector:!0,customContentId:["OwnerDashboard","Homeowner_v2"],showAi:!0};function fn(){const s=js();return Fe()?e.jsx(wa,{}):s?e.jsx(Bt,{}):e.jsx(dt,{})}export{fn as Component,pn as handle};

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.